From report at bugs.python.org Mon Oct 1 00:17:20 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Sun, 30 Sep 2012 22:17:20 +0000 Subject: [issue16034] bz2 module appears slower in Python 3.x versus Python 2.x In-Reply-To: <1348547973.67.0.489000428853.issue16034@psf.upfronthosting.co.za> Message-ID: <1349043440.26.0.884715355735.issue16034@psf.upfronthosting.co.za> Nadeem Vawda added the comment: > Recursive inline _check_can_read() will be enough. Now this check calls 4 Python functions (_check_can_read(), readable(), _check_non_closed(), closed). Recursive inlining only readable() in _check_can_read() is achieved significant but less (about 30%) effect. I've inlined readable() into _check_can_read() [3.3: 4258248a44c7 | default: abb5c5bde872]. This seems like a good balance between maximizing our performance in edge cases and not turning the code into a mess in the process ;) Once again, thanks for your contributions! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 00:19:55 2012 From: report at bugs.python.org (Roger Serwy) Date: Sun, 30 Sep 2012 22:19:55 +0000 Subject: [issue12930] reindent.py inserts spaces in multiline literals In-Reply-To: <1315405777.71.0.767109553281.issue12930@psf.upfronthosting.co.za> Message-ID: <1349043595.76.0.840804471196.issue12930@psf.upfronthosting.co.za> Roger Serwy added the comment: This issue also affects reindent.py in Python 3.x. The attached patch adds a "-s" switch to reindent.py to disallow changes to the contents of strings. The rstrip_and_expand_tabs function tokenizes the input to identify all strings and then expands and rstrips all parts of the input not within a string. ---------- versions: +Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27366/issue12930.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 00:21:26 2012 From: report at bugs.python.org (Roger Serwy) Date: Sun, 30 Sep 2012 22:21:26 +0000 Subject: [issue12930] reindent.py inserts spaces in multiline literals In-Reply-To: <1315405777.71.0.767109553281.issue12930@psf.upfronthosting.co.za> Message-ID: <1349043686.68.0.545094495067.issue12930@psf.upfronthosting.co.za> Roger Serwy added the comment: Attached is a simple test of the "-s" functionality for reindent.py. It works on Linux but I'm not sure about Windows. ---------- Added file: http://bugs.python.org/file27367/test_reindent.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 00:36:19 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 30 Sep 2012 22:36:19 +0000 Subject: [issue16074] bad error message in os.rename In-Reply-To: <1348820000.8.0.496903200143.issue16074@psf.upfronthosting.co.za> Message-ID: <1349044579.47.0.323075258591.issue16074@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 00:38:21 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 30 Sep 2012 22:38:21 +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: <1349044701.66.0.0330677601982.issue16076@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 00:46:34 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Sep 2012 22:46:34 +0000 Subject: [issue16034] bz2 module appears slower in Python 3.x versus Python 2.x In-Reply-To: <1348547973.67.0.489000428853.issue16034@psf.upfronthosting.co.za> Message-ID: <1349045194.54.0.301311148242.issue16034@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In fact I have tried other code, a bit faster and more maintainable (see patch). ---------- Added file: http://bugs.python.org/file27368/bz2_bikeshedding.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 00:58:09 2012 From: report at bugs.python.org (Martin Pool) Date: Sun, 30 Sep 2012 22:58:09 +0000 Subject: [issue10951] gcc 4.6 warnings In-Reply-To: <1345404342.61.0.60553703235.issue10951@psf.upfronthosting.co.za> Message-ID: Martin Pool added the comment: Hi, Martin, On 20 August 2012 05:25, Martin v. L?wis wrote: > Martin v. L?wis added the comment: > > (As usual), I'm quite skeptical about this "bulk bug report"; it violates the "one bug at a time" principle, where "one bug" can roughly be defined as "cannot be split into smaller independent issues". I heartily agree with you in general: as well as being non-atomic, it's also hard to have a clear test whether such bugs are fixed. But, I hope this patch has some value even if the bug is not a great example. > For the cases at hand, I think it would be best if somebody with gcc 4.6 available just fixed the "easy" ones, i.e. where the code clearly improves when silenciing the warning. In these cases, I wouldn't mind if they get checked in without code review; I know some favor review for all changes, in which case a separate issue should be opened for a patch fixing a bunch of these. I've fixed what I believe to be all the safe/easy warnings in my patch above. I would appreciate if someone would review it and if possible commit it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 01:07:32 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Sep 2012 23:07:32 +0000 Subject: [issue12930] reindent.py inserts spaces in multiline literals In-Reply-To: <1315405777.71.0.767109553281.issue12930@psf.upfronthosting.co.za> Message-ID: <1349046452.11.0.147361638359.issue12930@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Definitely a bugfix should not add any new switches. Patch would simply lead to preserving of all string literals and nothing more. I will look at Caio's patches a little later. Now Python contains automated tests for some tools. ---------- nosy: +storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 01:14:58 2012 From: report at bugs.python.org (Chris Rebert) Date: Sun, 30 Sep 2012 23:14:58 +0000 Subject: [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <1349046898.27.0.42763305073.issue9650@psf.upfronthosting.co.za> Chris Rebert added the comment: This is now hardcore nitpicking, but I'm conflicted as to whether %p should be grouped with the other locale-related codes or with %I (since it's hard to imagine using %I or %p in a singleton capacity). In any case, props to Mike for putting an actual patch together. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 01:52:57 2012 From: report at bugs.python.org (Michael Foord) Date: Sun, 30 Sep 2012 23:52:57 +0000 Subject: [issue13476] Simple exclusion filter for unittest autodiscovery In-Reply-To: <1322186223.31.0.112270498917.issue13476@psf.upfronthosting.co.za> Message-ID: <1349049177.85.0.561917302575.issue13476@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- assignee: -> michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 02:46:25 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Oct 2012 00:46:25 +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: <1349052385.01.0.794607336754.issue11489@psf.upfronthosting.co.za> Ezio Melotti added the comment: Attached failing test. ---------- keywords: +patch Added file: http://bugs.python.org/file27369/issue11489.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 02:57:27 2012 From: report at bugs.python.org (Roger Serwy) Date: Mon, 01 Oct 2012 00:57:27 +0000 Subject: [issue12930] reindent.py inserts spaces in multiline literals In-Reply-To: <1349046452.11.0.147361638359.issue12930@psf.upfronthosting.co.za> Message-ID: <5068EA77.1020103@gmail.com> Roger Serwy added the comment: > > Definitely a bugfix should not add any new switches. Patch would simply lead to preserving of all string literals and nothing more. I added the switch so that the existing behavior of reindent would stay the same in case some other scripts rely on that behavior. If you'd rather not include the switch, then I'm ok with removing it. The patch causes reindent to no longer removes trailing whitespace on multi-line doc strings. Is that side-effect acceptable? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 03:11:20 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 01 Oct 2012 01:11:20 +0000 Subject: [issue16036] simplify int() signature docs In-Reply-To: <1348568310.1.0.968219969881.issue16036@psf.upfronthosting.co.za> Message-ID: <1349053880.38.0.147214258535.issue16036@psf.upfronthosting.co.za> Chris Jerdonek added the comment: [Django/Rietveld is erroring out for me when I try to reply there, so replying here] On 2012/10/01 01:45:03, cvrebert wrote: > Doc/library/functions.rst:636: arguments are given. If *x* is a number, return > :meth:`x.__int__() > How is "number-ness" determined? Are we just assuming anything with an __int__() > method is a number for purposes of explanation? cvrebert, this patch has already been committed to 3.x. Maybe open a new issue if you think the language can be improved further? (Feel free to add me to the nosy list.) This issue was originally focused more on updating just the signature line (along with any consequent changes to the text). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 03:15:34 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 01 Oct 2012 01:15:34 +0000 Subject: [issue15897] zipimport.c doesn't check return value of fseek() In-Reply-To: <1347235718.45.0.529510656833.issue15897@psf.upfronthosting.co.za> Message-ID: <1349054134.0.0.0868498945119.issue15897@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Felipe, could you please submit a Contributor Agreement Form? http://www.python.org/psf/contrib/ Your patch looks good to me, although I would move almost all """ fclose(fp); PyErr_Format(ZipImportError, "can't read Zip file: %R", archive); return NULL; """ To a "goto" label. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 03:38:27 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Oct 2012 01:38:27 +0000 Subject: [issue14161] python2 file __repr__ does not escape filename In-Reply-To: <1330533810.56.0.673512322833.issue14161@psf.upfronthosting.co.za> Message-ID: <1349055507.52.0.266173642408.issue14161@psf.upfronthosting.co.za> Ezio Melotti added the comment: Not sure why this is still open -- probably I was just waiting for the buildbots and forgot it open. The issue seems fixed, so I'm going to close it now. ---------- assignee: -> ezio.melotti resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 03:41:04 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Oct 2012 01:41:04 +0000 Subject: [issue16004] Add `make touch` to 2.7 Makefile In-Reply-To: <1348391075.72.0.200262721096.issue16004@psf.upfronthosting.co.za> Message-ID: <1349055664.61.0.464208459367.issue16004@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 03:57:48 2012 From: report at bugs.python.org (Roger Serwy) Date: Mon, 01 Oct 2012 01:57:48 +0000 Subject: [issue10834] Python 2.7 x86 IDLE fails to run in Windows 7 In-Reply-To: <1294224063.9.0.656095341139.issue10834@psf.upfronthosting.co.za> Message-ID: <1349056668.58.0.621373998713.issue10834@psf.upfronthosting.co.za> Roger Serwy added the comment: Peter, is this still an issue with 2.7.3? ---------- nosy: +serwy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 04:48:14 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Oct 2012 02:48:14 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1349059694.61.0.206726447289.issue2771@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:11:04 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Oct 2012 04:11:04 +0000 Subject: [issue16036] simplify int() signature docs In-Reply-To: <1348568310.1.0.968219969881.issue16036@psf.upfronthosting.co.za> Message-ID: <3XVVRC2jpNzQld@mail.python.org> Roundup Robot added the comment: New changeset ed76eac4491e by Chris Jerdonek in branch '2.7': Close #16036: Backport 3.x documentation improvement. http://hg.python.org/cpython/rev/ed76eac4491e ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:12:35 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 01 Oct 2012 04:12:35 +0000 Subject: [issue16036] simplify int() signature docs In-Reply-To: <1348568310.1.0.968219969881.issue16036@psf.upfronthosting.co.za> Message-ID: <1349064755.33.0.184620727753.issue16036@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Chris (cvrebert), feel free to create a new issue to improve the int() docs further. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 07:28:53 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 01 Oct 2012 05:28:53 +0000 Subject: [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1349069333.14.0.754603223826.issue15533@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I propose addressing the remainder of this issue by: 1) Documenting the difference in behavior between Windows and non-Windows, adjusting the tests to reflect this difference, and then closing this issue, and then 2) Creating a new issue to discuss whether and in what version to make the behavior of the cwd argument the same across Windows and non-Windows. ---------- stage: patch review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 07:51:07 2012 From: report at bugs.python.org (Roger Serwy) Date: Mon, 01 Oct 2012 05:51:07 +0000 Subject: [issue14997] IDLE tries to run shell window if line is completed with F5 rather than Enter In-Reply-To: <1338773408.15.0.466172747854.issue14997@psf.upfronthosting.co.za> Message-ID: <1349070667.15.0.577489189116.issue14997@psf.upfronthosting.co.za> Changes by Roger Serwy : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 09:15:31 2012 From: report at bugs.python.org (=?utf-8?q?Manuel_P=C3=A9gouri=C3=A9-Gonnard?=) Date: Mon, 01 Oct 2012 07:15:31 +0000 Subject: [issue1185124] pydoc doesn't find all module doc strings Message-ID: <1349075731.72.0.369074479649.issue1185124@psf.upfronthosting.co.za> Changes by Manuel P?gouri?-Gonnard : ---------- nosy: +mpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 09:30:20 2012 From: report at bugs.python.org (Sebastian Noack) Date: Mon, 01 Oct 2012 07:30:20 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349076620.66.0.0257730413729.issue8800@psf.upfronthosting.co.za> Sebastian Noack added the comment: Yes, you could also look at the shared/exclusive lock as one lock with different states. But this approach is neither more common, have a look at Java's ReadWriteLock [1] for example, which works just like my patch does, except that a factory is returned instead of a tuple. Nor does it provide any of the benefits, I have mentioned before (same API as Lock and RLock, better compatibility with existing code an with statement, ability to pass the shared or exclusive lock separetly around). But maybe we could satisfy anybody, by following Richard's and Antoine's suggestion of returning a named tuple. So you could use the ShrdExclLock both ways: # use a single object lock = ShrdExclLock() with lock.shared: ... with lock.exclusive: ... # unpack the the object into two variables and pass them separately around shrd_lock, excl_lock = ShrdExclLock() Thread(target=reader, args=(shrd_lock,)).start() Thread(target=writer, args=(excl_lock,)).start) The majority of us seems to prefer the terms shared and exclusive. However I can't deny that the terms read and write are more common, even though there are also notable exmples where the terms shared and exclusive are used [2] [3]. But let us ignore how other call it for now, and get to the origin of both set of terms, in order to figure out which fits best into Python: shared/exclusive -> abstract description of what it is read/write -> best known use case The reason why I prefer the terms shared and exculsive, is that it is more distinct and less likely to get misunderstand. Also naming a generic implementation after a specific use case is bad API design and I don't know any other case where that was done, in the Python core library. [1] http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/locks/ReadWriteLock.html [2] http://www.postgresql.org/docs/9.2/static/explicit-locking.html [3] http://www.unix.com/man-page/freebsd/9/SX/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 09:33:38 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 01 Oct 2012 07:33:38 +0000 Subject: [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1349076818.92.0.201486997213.issue14783@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching proposed patch. This updates the docstrings for int() and str(), as well as for range() and slice() in a similar way. It also makes the documentation for str() closer to that of the docstring. The documentation for int(), range(), and slice() has already been updated along the lines of this patch. ---------- keywords: +needs review stage: needs patch -> patch review Added file: http://bugs.python.org/file27370/issue-14783-1-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 09:42:09 2012 From: report at bugs.python.org (Sebastian Noack) Date: Mon, 01 Oct 2012 07:42:09 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349077329.16.0.207477591063.issue8800@psf.upfronthosting.co.za> Sebastian Noack added the comment: @richard: I'm sorry, but both of my patches contain changes to 'Lib/threading.py' and can be applied on top of Python 3.3.0. So can you explain what do you mean, by missing the changes to threading.py? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 11:41:16 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 01 Oct 2012 09:41:16 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349084476.44.0.271979814602.issue8800@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: > Personally, I would prefer to make the shared and exclusive locks > attributes of the same object, so one could do > > with selock.shared: > ... > > with selock.exclusive: > ... > Please note, the "same object" could simply be a namedtuple instance. With this, you are stuck with employing a context manager model only. You loose the flexibility to do explicit acquire_read() or acquire_write(). My latest patch has methods shared_lock(), exclusive_lock() that return proxy lock objects that can be used like context managers like you describe, but you still have the flexibility of using the lock manually. As for the bikeshedding, let's look at the list of concrete implementations out there: Windows: SRW locks (slim reader writer) http://msdn.microsoft.com/en-us/library/windows/desktop/aa904937(v=vs.85).aspx Pthreads: rwlock_t (reader/writer) http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/apis/users_86.htm Java: ReadWriteLock, http://docs.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/locks/ReadWriteLock.html Am I missing anything? Don't see why we need to adopt a completly different name or idiom to what people are used to. Also, note that the java version is quite similar to Richard's proposal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 11:49:49 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 01 Oct 2012 09:49:49 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349084989.3.0.06973525463.issue8800@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: >> shared/exclusive -> abstract description of what it is If you want to argue it this way, I counter that the attributes "shared" and "exclusive" apply to the type of "access to the protected object" you are talking about, and yet, the name suggest that they are attributes of the lock itself. In that sense, "reader lock" and "writer lock", describe attributes of the user of the lock, and the verbs "readlock" and "writelock" describe the operation being requested. It's simply more difficult to use the more abstract concepts 'shared' and 'exclusive' as convenient and transparent descriptors of what the thing does, and likely to just brew confusion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 11:52:23 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 01 Oct 2012 09:52:23 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349085143.64.0.281167985679.issue8800@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > @richard: I'm sorry, but both of my patches contain changes to > 'Lib/threading.py' and can be applied on top of Python 3.3.0. So can you > explain what do you mean, by missing the changes to threading.py? I was reading the Rietveld review page http://bugs.python.org/review/8800/#ps6111 which only shows changes to multiprocessing/__init__.py and multiprocessing/synchronize.py. The patch looks like it was produced using git rather than hg, so perhaps Rietveld got confused by this. In that case it is a bug in Rietveld that it produced a partial review instead of producing no review. > # unpack the the object into two variables and pass them separately around > shrd_lock, excl_lock = ShrdExclLock() > > Thread(target=reader, args=(shrd_lock,)).start() > Thread(target=writer, args=(excl_lock,)).start) Although using namedtuple is probably a good idea, I don't think it really adds much flexibility. This example could just as easily be written selock = ShrdExclLock() Thread(target=reader, args=(selock.shared,)).start() Thread(target=writer, args=(selock.exclusive,)).start) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 12:01:31 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 01 Oct 2012 10:01:31 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349085691.57.0.845844870872.issue8800@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > With this, you are stuck with employing a context manager model only. > You loose the flexibility to do explicit acquire_read() or > acquire_write(). You are not restricted to the context manager model. Just use selock.shared.acquire() or selock.exclusive.acquire(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 12:06:28 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 01 Oct 2012 10:06:28 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349085988.62.0.0665384944069.issue8800@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Perhaps I should have pointed out, for Sebastian's benefit, that my second patch uses "timeout" rather than "blocking" since that is the new black in python 3. Also, I think the "threading" implementation shows clearly the problem of having two independent objects that are only losely bound by some shared common variables: The threading.py version has to rely on c_types ints for the common counters. If the two locks were merely two different views of a common RWLock object, this problem could go away, and you could have the threading.RWLock and the multiprocessing.RWLock be different concrete classes derived from a common base class. I also think it is time to drop the "writer preference" model, since it just adds complexity with doubtful benefits. Sebastian's model also does that. I'll provide a new example patch presently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 12:33:08 2012 From: report at bugs.python.org (Wael Al Jishi) Date: Mon, 01 Oct 2012 10:33:08 +0000 Subject: [issue9957] SpooledTemporayFile.truncate should take size parameter In-Reply-To: <1285552951.71.0.864499786785.issue9957@psf.upfronthosting.co.za> Message-ID: <1349087588.98.0.403841981358.issue9957@psf.upfronthosting.co.za> Wael Al Jishi added the comment: Shouldn't this issue be closed, or is there more to be done? ---------- nosy: +Wael.Al.Jishi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 12:54:46 2012 From: report at bugs.python.org (Wael Al Jishi) Date: Mon, 01 Oct 2012 10:54:46 +0000 Subject: [issue16007] Improved Error message for failing re expressions In-Reply-To: <1348416868.74.0.37879499143.issue16007@psf.upfronthosting.co.za> Message-ID: <1349088886.67.0.169050803547.issue16007@psf.upfronthosting.co.za> Wael Al Jishi added the comment: The attached file is very different to the current source, including the docstring. Is this from python 2.x? ---------- nosy: +Wael.Al.Jishi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 13:22:14 2012 From: report at bugs.python.org (Sebastian Noack) Date: Mon, 01 Oct 2012 11:22:14 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349090534.13.0.722543840378.issue8800@psf.upfronthosting.co.za> Sebastian Noack added the comment: > If you want to argue it this way, I counter that the attributes > "shared" and "exclusive" apply to the type of "access to the > protected object" you are talking about, and yet, the name suggest > that they are attributes of the lock itself. A lock's sole purpose is to synchronize access to a protected object or context. So naming a lock after its type of protection absolutely makes sense. Those names are also not supposed to be attributes of the lock, rather two locks (a shared and an exclusive lock) should be created, that might be returned as a namedtuple for convenience. > In that sense, "reader lock" and "writer lock", describe attributes > of the user of the lock, and the verbs "readlock" and "writelock" > describe the operation being requested. The user of the lock isn't necessarily a reader or writer. This is just one of many possible use cases. For example in a server application a shared/exclusive lock might be used to protect a connection to the client. So every time a thread wants to use the connection, a shared lock must be acquired and when a thread wants to shutdown the connection, the exclusive lock must be acquired, in order to ensure that it doesn't interrupt any thread still processing a request for that connection. In that case you clearly wouldn't call the users reader and writer. > The patch looks like it was produced using git rather than hg, so > perhaps Rietveld got confused by this. In that case it is a bug > in Rietveld that it produced a partial review instead of producing > no review. Yes, I have imported the Python 3.3.0 tree into a local git repository and created the patch that way. Since patches generated with git are still compatible with the 'patch' program in order to apply them, I hope that isn't a problem. > Although using namedtuple is probably a good idea, I don't think it > really adds much flexibility. This example could just as easily be > written > > selock = ShrdExclLock() > > Thread(target=reader, args=(selock.shared,)).start() > Thread(target=writer, args=(selock.exclusive,)).start() Yes, that is true, but in some cases it is more convenient to be able unpack the shared/exclusive lock into two variables, with a one-liner. And defining a namedtuple doesn't require any extra code compared to defining a class that holds both locks. In fact it needs less code to be implemented. However the flexibility comes from having two lock objects, doesn't matter how they are accessed, instead as suggested by Kristj?n to have a single lock object, which just provides proxies for use with the with statement. > I also think it is time to drop the "writer preference" model, since > it just adds complexity with doubtful benefits. Sebastian's model > also does that. I have implemented the simplest possible acquisition order. The lock acquired first will be granted first. Without that (or a more advanced policy) in applications with concurrent threads/processes that are heavily using the shared lock, the exclusive lock can never be acquired, because of there is always a shared lock acquired and before it is released the next shared lock will be acquired. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 13:25:29 2012 From: report at bugs.python.org (Nathan Robertson) Date: Mon, 01 Oct 2012 11:25:29 +0000 Subject: [issue15631] Python 3.3 beta 1 installation issue lib/lib64 folders In-Reply-To: <1344794304.26.0.478120841355.issue15631@psf.upfronthosting.co.za> Message-ID: <1349090729.98.0.93284314304.issue15631@psf.upfronthosting.co.za> Nathan Robertson added the comment: This is also an issue on openSUSE 12.2 with the release version of Python 3.3 when compiling from sources. OBS (openSUSE Build Service) has RPMs for 3.3rc1. I'm assuming they've got a patch which fixes this issue, and looking at the spec file (lines 61, 62 - https://build.opensuse.org/package/view_file?file=python3.spec&package=python3&project=devel%3Alanguages%3Apython%3AFactory&rev=cb7b94b33478cb8add5a5eb3ab3068dc): # support lib-vs-lib64 distinction Patch02: Python-3.3.0b2-multilib.patch The URL for that patch is https://build.opensuse.org/package/view_file?file=Python-3.3.0b2-multilib.patch&package=python3&project=devel%3Alanguages%3Apython%3AFactory&rev=cb7b94b33478cb8add5a5eb3ab3068dc I haven't verified it, but I'm guessing that patch has something to do with the issue. The top level directory for the sources for their RPMs are at https://build.opensuse.org/package/files?package=python3&project=devel%3Alanguages%3Apython%3AFactory ---------- nosy: +nathanr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 13:25:38 2012 From: report at bugs.python.org (Wael Al Jishi) Date: Mon, 01 Oct 2012 11:25:38 +0000 Subject: [issue16097] Minor fix in comment in codecs.py Message-ID: <1349090738.01.0.163694971359.issue16097@psf.upfronthosting.co.za> New submission from Wael Al Jishi: Minor fix to a comment in the read() function definition in codecs.py Diff attached. ---------- components: None files: comment-codecs-fix.patch keywords: patch messages: 171705 nosy: Wael.Al.Jishi priority: normal severity: normal status: open title: Minor fix in comment in codecs.py type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27371/comment-codecs-fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 13:39:26 2012 From: report at bugs.python.org (Will Haldean Brown) Date: Mon, 01 Oct 2012 11:39:26 +0000 Subject: [issue16098] Bisect optimization in heapq.nsmallest is never used Message-ID: <1349091566.51.0.299551598321.issue16098@psf.upfronthosting.co.za> New submission from Will Haldean Brown: The implementation of nsmallest in heapq contains an optimization for when n is an order of magnitude less than the size of the data, which uses bisect to find the n-smallest elements. This optimization is guarded by a check to ensure that the data iterable has a length method. This method is then decorated to add support for the key kwarg. The decorator creates a zip object and passes the zip object to the decorated nsmallest. As zip objects are generators, they do not have a __len__ attribute, and the bisect optimization is never used. The attached patch file detects whether the data passed to the decorator has a length attribute, and if it does, it creates a list with the data before passing it to the decorated nsmallest. This is my first patch, so if I've done something wrong please let me know. Thanks! ---------- components: Library (Lib) files: heapq-use-bisect.20121001.patch keywords: patch messages: 171706 nosy: haldean priority: normal severity: normal status: open title: Bisect optimization in heapq.nsmallest is never used type: performance versions: Python 3.4 Added file: http://bugs.python.org/file27372/heapq-use-bisect.20121001.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 13:44:33 2012 From: report at bugs.python.org (Ed Campbell) Date: Mon, 01 Oct 2012 11:44:33 +0000 Subject: [issue16000] test_curses should use unittest In-Reply-To: <1348263086.74.0.172285441847.issue16000@psf.upfronthosting.co.za> Message-ID: <1349091873.23.0.595728996139.issue16000@psf.upfronthosting.co.za> Ed Campbell added the comment: I'd suggest using unittest.TestCase.assertRaises() as a context manager to remove some try-excepts. For example I think function test_userptr_without_set() on line 245 could use: with self.assertRaises(curses.panel.error): p.userptr() I could create a patch if it would help. ---------- nosy: +esc24 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 14:16:35 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 01 Oct 2012 12:16:35 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349093795.94.0.845842594576.issue8800@psf.upfronthosting.co.za> Richard Oudkerk added the comment: I think Sebastian's algorithm does not correctly deal with the non-blocking case. Consider the following situation: * Thread-1 successfully acquires exclusive lock. Now num_got_lock == 1. * Thread-2 blocks waiting for shared lock. Will block until (num_got_lock == 1 and excl_count == 0). Now num_got_lock == 1. * Thread-3 does non-blocking acquire of shared lock but fails. Now num_got_lock == 2. Now, since num_got_lock == 2, the predicate that Thread-2 is waiting for will not happen until num_got_lock overflows. This is probably fixable if we just prevent a failed non-blocking acquire from modifying num_acq_lock and num_got_lock. (But I don't see how to extend the algorithm to allow timeouts.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 14:32:24 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 01 Oct 2012 12:32:24 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349094744.91.0.707516689421.issue8800@psf.upfronthosting.co.za> Richard Oudkerk added the comment: My previous comment applied to Sebastian's first patch. The second seems to fix the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 14:35:30 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Oct 2012 12:35:30 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349094930.56.0.769769501891.issue8800@psf.upfronthosting.co.za> Christian Heimes added the comment: I wonder, why are you creating your own algorithm here? There must be plenty of reference implementations that are already used in production code. Don't be a shamed to copy a Java implementation! :) The entire threading module is a rip-off of the Java threading API. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 14:58:25 2012 From: report at bugs.python.org (Nikolay Bogoychev) Date: Mon, 01 Oct 2012 12:58:25 +0000 Subject: [issue16099] robotparser doesn't support request rate and crawl delay parameters Message-ID: <1349096305.17.0.983395980337.issue16099@psf.upfronthosting.co.za> New submission from Nikolay Bogoychev: Robotparser doesn't support two quite important optional parameters from the robots.txt file. I have implemented those in the following way: (Robotparser should be initialized in the usual way: rp = robotparser.RobotFileParser() rp.set_url(..) rp.read ) crawl_delay(useragent) - Returns time in seconds that you need to wait for crawling if none is specified, or doesn't apply to this user agent, returns -1 request_rate(useragent) - Returns a list in the form [request,seconds]. if none is specified, or doesn't apply to this user agent, returns -1 ---------- components: Library (Lib) files: robotparser.patch keywords: patch messages: 171711 nosy: XapaJIaMnu priority: normal severity: normal status: open title: robotparser doesn't support request rate and crawl delay parameters type: enhancement versions: Python 2.7 Added file: http://bugs.python.org/file27373/robotparser.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 15:16:01 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Oct 2012 13:16:01 +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: <1349097361.43.0.642048180519.issue16099@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks for the patch. New features must be implemented in Python 3.4. Python 2.7 is in feature freeze mode and therefore doesn't get new features. ---------- keywords: +gsoc nosy: +christian.heimes stage: -> test needed versions: +Python 3.4 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 15:18:14 2012 From: report at bugs.python.org (Sebastian Noack) Date: Mon, 01 Oct 2012 13:18:14 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349097494.53.0.271705005937.issue8800@psf.upfronthosting.co.za> Sebastian Noack added the comment: I would love to see how other people would implement a shared/exclusive lock that can be acquired from different processes. However it really seems that nobody did it before. If you know a reference implementation I would be more than happy. There are plenty of implementations for threading only, but they won't work with multiprocessing, due to the limitations in the ways you can share data between processes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 15:19:16 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Oct 2012 13:19:16 +0000 Subject: [issue16098] Bisect optimization in heapq.nsmallest is never used In-Reply-To: <1349091566.51.0.299551598321.issue16098@psf.upfronthosting.co.za> Message-ID: <1349097556.98.0.533341945714.issue16098@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +rhettinger, stutzbach stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 15:21:59 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Oct 2012 13:21:59 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349097719.72.0.44625150618.issue8800@psf.upfronthosting.co.za> Antoine Pitrou added the comment: On the naming front: shorthands like "Shrd" and "Excl" are a bit frown upon. Since "SharedExclusiveLock" is on the long side, I would suggest calling the API "SELock". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 15:37:51 2012 From: report at bugs.python.org (Nikolay Bogoychev) Date: Mon, 01 Oct 2012 13:37:51 +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: <1349098671.96.0.190566126789.issue16099@psf.upfronthosting.co.za> Nikolay Bogoychev added the comment: Okay, sorry didn't know that (: Here's the same patch (Same functionality) for python3 Feedback is welcome, as always (: ---------- Added file: http://bugs.python.org/file27374/robotparser.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 15:39:54 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Oct 2012 13:39:54 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349098794.85.0.325696357688.issue8800@psf.upfronthosting.co.za> Christian Heimes added the comment: A RW lock is part of POSIX threads [1]. It's usually a good idea to either use POSIX functions or to mimic their behavior. After all POSIX is an industry standard. Boost and Java have several lock and rw lock implementations. Wikipedia [2] is a good starting point for the various implementations. The page also mentions a seqlock which looks interesting to me as it's fast for few writers with lots of readers. [1] http://linux.die.net/man/3/pthread_rwlock_init [2] http://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 15:46:54 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Oct 2012 13:46:54 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1349098794.85.0.325696357688.issue8800@psf.upfronthosting.co.za> Message-ID: <1349099144.3443.10.camel@localhost.localdomain> Antoine Pitrou added the comment: > A RW lock is part of POSIX threads [1]. It's usually a good idea to > either use POSIX functions or to mimic their behavior. After all POSIX > is an industry standard. We've already departed from that. Our Lock is nothing like a mutex, for example (it's more of a binary semaphore). We follow POSIX when exposing POSIX APIs (as in the os module), but otherwise we have our own abstractions, for example the 3.x I/O stack. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 15:51:08 2012 From: report at bugs.python.org (Sebastian Noack) Date: Mon, 01 Oct 2012 13:51:08 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349099468.69.0.784468418438.issue8800@psf.upfronthosting.co.za> Sebastian Noack added the comment: Thanks, but as I already said there are a lot of implementations for shared/exclusive lock that can be acquired from different threads. But we need with threading as well as with multiprocessing. And by the way POSIX is the standard for implementing UNIX-like systems and not an industry standard for implementing anything, including high-level languages like Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 15:52:20 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Oct 2012 13:52:20 +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: <1349099540.46.0.557407470192.issue16099@psf.upfronthosting.co.za> Christian Heimes added the comment: We have a team that mentors new contributors. If you are interested to get your patch into Python 3.4, please read http://pythonmentors.com/ . The people are really friendly and will help you with every step of the process. ---------- keywords: +easy -gsoc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 15:56:02 2012 From: report at bugs.python.org (Tim Golden) Date: Mon, 01 Oct 2012 13:56:02 +0000 Subject: [issue16097] Minor fix in comment in codecs.py In-Reply-To: <1349090738.01.0.163694971359.issue16097@psf.upfronthosting.co.za> Message-ID: <1349099762.15.0.134397829914.issue16097@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- assignee: -> tim.golden nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 16:42:02 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 01 Oct 2012 14:42:02 +0000 Subject: [issue16086] tp_flags: Undefined behaviour with 32 bits long In-Reply-To: <1348934655.6.0.704339106877.issue16086@psf.upfronthosting.co.za> Message-ID: <1349102522.82.0.586900027003.issue16086@psf.upfronthosting.co.za> Martin v. L?wis added the comment: What matters is that precompiled stay compatible; in addition, existing source code should continue to compile unmodified. In the specific case, the flags type also shows up in PyType_Spec. As a consequence, the actual TPFLAGS_ values *do* constitute a part of the API. OTOH, a number of the flags are not considered part of the API at all (unfortunately, they aren't explicitly excluded, either). Before we make such a change, we should really declare what flags are meant to be by an extension module, and what flags are implementation details only to be used by the object runtime itself. Wrt. the proposed change: changing tp_flags to unsigned int is fine. I cannot see any real problem with changing PyType_Spec.flags to unsigned int - changing it to unsigned long would be incompatible on some systems. Wrt. changing the existing flags: I'd prefer some deprecation procedure that just bans them from being used in an extension module (ultimately wrapping them within Py_BUILD_CORE). Once they are deprecated, changing their type is clearly fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 16:44:07 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 01 Oct 2012 14:44:07 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349102646.99.0.453775395606.issue8800@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > The page also mentions a seqlock which looks interesting to me as > it's fast for few writers with lots of readers. A seqlock is suitable for consistent views of simple data structures (e.g. a counter in the Linux kernel), but it won't fly for a high-level language like Python. The problem is that, despite its name, it's not a lock, but it's based on retries, which means that: - the critical section must be idempotent (no side effect like incrementing a variable, or crediting a bank account :-) - your critical section is simple enough so that it can tolerate inconsistent views, e.g.: with seqlock.rlock(): z = 1/(x-y) if the writer threads make sure that x!=y when they hold the seqlock, you can still, if you're unlucky, fall at the wrong time and x==y, then you get a nice ZeroDivisionError. (And yes, you have the same kind of issues with transational memory, as well as others...). Otherwise, having a rwlock would be a nice addition, but since the GIL serializes everything anyway, this isn't likely to benefit many situations (unless you do I/O, of course), on CPython at least. That's why it's definitely important to have the equivalent for multiprocessing. Also, I prefer reader-writer lock because that's how everyone calls it (not only POSIX), and RWLock looks better than SELock (well, at least to me). ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 16:45:58 2012 From: report at bugs.python.org (Sascha) Date: Mon, 01 Oct 2012 14:45:58 +0000 Subject: [issue16100] Compiling vim with Python 3.3 support fails Message-ID: <1349102758.43.0.280298808198.issue16100@psf.upfronthosting.co.za> New submission from Sascha: Hello there, I hope I'm right here. I tried to compile vim with Python 3.3 32bit support. OS: Windows 7 64bit Compiler: MinGW Compiling vim with Python 3.2 32bit support works! The error message: obj/if_python3.o:if_python3.c:(.text+0x739): undefined reference to `__imp__PyUnicode_AsUnicode' ---------- components: Windows messages: 171722 nosy: v_core priority: normal severity: normal status: open title: Compiling vim with Python 3.3 support fails type: compile error versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 16:51:41 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Oct 2012 14:51:41 +0000 Subject: [issue16086] tp_flags: Undefined behaviour with 32 bits long In-Reply-To: <1349102522.82.0.586900027003.issue16086@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: tp_flags type is long, not int. Le 1 oct. 2012 16:42, "Martin v. L?wis" a ?crit : > > Martin v. L?wis added the comment: > > What matters is that precompiled stay compatible; in addition, existing > source code should continue to compile unmodified. > > In the specific case, the flags type also shows up in PyType_Spec. As a > consequence, the actual TPFLAGS_ values *do* constitute a part of the API. > > OTOH, a number of the flags are not considered part of the API at all > (unfortunately, they aren't explicitly excluded, either). Before we make > such a change, we should really declare what flags are meant to be by an > extension module, and what flags are implementation details only to be used > by the object runtime itself. > > Wrt. the proposed change: changing tp_flags to unsigned int is fine. I > cannot see any real problem with changing PyType_Spec.flags to unsigned int > - changing it to unsigned long would be incompatible on some systems. > > Wrt. changing the existing flags: I'd prefer some deprecation procedure > that just bans them from being used in an extension module (ultimately > wrapping them within Py_BUILD_CORE). Once they are deprecated, changing > their type is clearly fine. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 16:58:52 2012 From: report at bugs.python.org (Felipe Cruz) Date: Mon, 01 Oct 2012 14:58:52 +0000 Subject: [issue15897] zipimport.c doesn't check return value of fseek() In-Reply-To: <1347235718.45.0.529510656833.issue15897@psf.upfronthosting.co.za> Message-ID: <1349103532.46.0.667117435161.issue15897@psf.upfronthosting.co.za> Felipe Cruz added the comment: Hello! Just sent the Contributor Agreement Form. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 17:42:49 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Oct 2012 15:42:49 +0000 Subject: [issue16097] Minor fix in comment in codecs.py In-Reply-To: <1349090738.01.0.163694971359.issue16097@psf.upfronthosting.co.za> Message-ID: <3XVnnL6xsFzNZF@mail.python.org> Roundup Robot added the comment: New changeset bb77400af434 by Tim Golden in branch '3.3': Issue16097 Fix small typo in comment (patch by Wael Al Jishi) http://hg.python.org/cpython/rev/bb77400af434 New changeset cbf651ab3e21 by Tim Golden in branch 'default': Issue16097 Fix small typo in comment (patch by Wael Al Jishi) http://hg.python.org/cpython/rev/cbf651ab3e21 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 17:48:52 2012 From: report at bugs.python.org (Tim Golden) Date: Mon, 01 Oct 2012 15:48:52 +0000 Subject: [issue16097] Minor fix in comment in codecs.py In-Reply-To: <1349090738.01.0.163694971359.issue16097@psf.upfronthosting.co.za> Message-ID: <1349106532.57.0.0696872063188.issue16097@psf.upfronthosting.co.za> Tim Golden added the comment: Committed in bb77400af434. Thanks ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 17:55:37 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 01 Oct 2012 15:55:37 +0000 Subject: [issue16100] Compiling vim with Python 3.3 support fails In-Reply-To: <1349102758.43.0.280298808198.issue16100@psf.upfronthosting.co.za> Message-ID: <1349106937.89.0.00921373123424.issue16100@psf.upfronthosting.co.za> R. David Murray added the comment: We don't currently support mingw, and I don't think any of our active developers have experience with it. If this actually worked in 3.2 then the fix *might* be relatively easy. Hopefully you or someone else will be interested enough to work out a patch. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 18:03:56 2012 From: report at bugs.python.org (Mike Hoy) Date: Mon, 01 Oct 2012 16:03:56 +0000 Subject: [issue12322] ElementPath 1.3 expressions documentation In-Reply-To: <1307959369.7.0.162667287307.issue12322@psf.upfronthosting.co.za> Message-ID: <1349107436.55.0.533389154355.issue12322@psf.upfronthosting.co.za> Mike Hoy added the comment: Here is a link to our docs page with the info that needs to be changed: http://docs.python.org/py3k/library/xml.etree.elementtree.html#supported-xpath-syntax I was going to work on a patch but in irc we decided to wait to see what people had to say about this. Also we think documenting the Error you receive (if any) when trying to go above the "found" element may be a necessary part of the doc change. ---------- nosy: +mikehoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 18:05:56 2012 From: report at bugs.python.org (Sascha) Date: Mon, 01 Oct 2012 16:05:56 +0000 Subject: [issue16100] Compiling vim with Python 3.3 support fails In-Reply-To: <1349102758.43.0.280298808198.issue16100@psf.upfronthosting.co.za> Message-ID: <1349107556.85.0.535975034111.issue16100@psf.upfronthosting.co.za> Sascha added the comment: Actually I'd have no problem using 3.2 Though with 3.2 I got the problem described here: https://groups.google.com/forum/?fromgroups=#!topic/vim_dev/5MYb23t9ZBM I was hoping this is fixed in 3.3, but now I can't even compile it ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 18:21:47 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 01 Oct 2012 16:21:47 +0000 Subject: [issue16100] Compiling vim with Python 3.3 support fails In-Reply-To: <1349102758.43.0.280298808198.issue16100@psf.upfronthosting.co.za> Message-ID: <1349108507.14.0.158506599486.issue16100@psf.upfronthosting.co.za> R. David Murray added the comment: Well, that looks like a bug in VIM, not Python. Though if that order of calls is required and it is not documented, that would be a doc bug (especially if it used to work in the other order in python2.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 18:32:52 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 01 Oct 2012 16:32:52 +0000 Subject: [issue16000] test_curses should use unittest In-Reply-To: <1348263086.74.0.172285441847.issue16000@psf.upfronthosting.co.za> Message-ID: <1349109171.77.0.0983461746567.issue16000@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Ed, yes, switching all of test_curses to using unittest patterns is the eventual goal of this issue, though this may be done in more than one stage. As I said in my previous comment, I limited the first patch to focusing on the proper setUp(), tearDown(), etc that we should be using. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 18:38:41 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Oct 2012 16:38:41 +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: <1349109521.31.0.00818032466084.issue16076@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- priority: normal -> high stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 18:40:31 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 01 Oct 2012 16:40:31 +0000 Subject: [issue16000] test_curses should use unittest In-Reply-To: <1348263086.74.0.172285441847.issue16000@psf.upfronthosting.co.za> Message-ID: <1349109631.79.0.832243098843.issue16000@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Ed, yes, switching all of test_curses to using unittest patterns is the eventual goal of this issue, though this may be done in more than one stage. As I said in my previous comment, I limited the first patch to focus on the proper setUp(), tearDown(), etc that we should be using. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 18:47:09 2012 From: report at bugs.python.org (Brett Cannon) Date: Mon, 01 Oct 2012 16:47:09 +0000 Subject: [issue16101] Verify all imported modules at startup are needed Message-ID: <1349110028.76.0.413324569089.issue16101@psf.upfronthosting.co.za> New submission from Brett Cannon: It's probably time to examine what modules are imported at startup and whether they are necessary or if some can be trimmed off so as to avoid the overhead. ---------- messages: 171733 nosy: brett.cannon priority: normal severity: normal status: open title: Verify all imported modules at startup are needed type: resource usage versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 18:49:53 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Mon, 01 Oct 2012 16:49:53 +0000 Subject: [issue16079] list duplicate test names with patchcheck In-Reply-To: <1348827338.06.0.659343787847.issue16079@psf.upfronthosting.co.za> Message-ID: <1349110193.73.0.520890622438.issue16079@psf.upfronthosting.co.za> Xavier de Gaye added the comment: The attached script, named duplicate_code_names.py, takes a file name list as argument and prints duplicate code names found in these files ordered by function, class, method and nested class or function. The script output on the whole std lib (see the result in the attached file std_lib_duplicates.txt): $ time ./python Tools/scripts/duplicate_code_names.py $(find Lib -name "*py") > std_lib_duplicates.txt Lib/test/badsyntax_future4.py: compile error: from __future__ imports must occur at the beginning of the file (badsyntax_future4.py, line 3) Lib/test/badsyntax_future6.py: compile error: from __future__ imports must occur at the beginning of the file (badsyntax_future6.py, line 3) Lib/test/badsyntax_future3.py: compile error: future feature rested_snopes is not defined (badsyntax_future3.py, line 3) Lib/test/badsyntax_future9.py: compile error: not a chance (badsyntax_future9.py, line 3) Lib/test/bad_coding.py: compile error: unknown encoding for 'Lib/test/bad_coding.py': uft-8 Lib/test/badsyntax_future8.py: compile error: future feature * is not defined (badsyntax_future8.py, line 3) Lib/test/badsyntax_3131.py: compile error: invalid character in identifier (badsyntax_3131.py, line 2) Lib/test/badsyntax_future7.py: compile error: from __future__ imports must occur at the beginning of the file (badsyntax_future7.py, line 3) Lib/test/bad_coding2.py: compile error: encoding problem for 'Lib/test/bad_coding2.py': utf-8 Lib/test/badsyntax_pep3120.py: compile error: invalid or missing encoding declaration for 'Lib/test/badsyntax_pep3120.py' Lib/test/badsyntax_future5.py: compile error: from __future__ imports must occur at the beginning of the file (badsyntax_future5.py, line 4) Lib/lib2to3/tests/data/different_encoding.py: compile error: invalid syntax (different_encoding.py, line 3) Lib/lib2to3/tests/data/py2_test_grammar.py: compile error: invalid token (py2_test_grammar.py, line 31) Lib/lib2to3/tests/data/bom.py: compile error: invalid syntax (bom.py, line 2) Lib/lib2to3/tests/data/crlf.py: compile error: invalid syntax (crlf.py, line 1) Lib/__phello__.foo.py: __phello__.foo not a valid module name real 6m14.854s user 6m14.455s sys 0m0.392s FWIW running the same command with python 3.2 takes about 2.5 minutes instead of more than 6 minutes (importlib ?). ---------- Added file: http://bugs.python.org/file27375/duplicate_code_names.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 18:50:35 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Mon, 01 Oct 2012 16:50:35 +0000 Subject: [issue16079] list duplicate test names with patchcheck In-Reply-To: <1348827338.06.0.659343787847.issue16079@psf.upfronthosting.co.za> Message-ID: <1349110235.96.0.523788658156.issue16079@psf.upfronthosting.co.za> Changes by Xavier de Gaye : Added file: http://bugs.python.org/file27376/std_lib_duplicates.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 19:16:58 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 01 Oct 2012 17:16:58 +0000 Subject: [issue16086] tp_flags: Undefined behaviour with 32 bits long In-Reply-To: Message-ID: <5069D008.1040409@v.loewis.de> Martin v. L?wis added the comment: > tp_flags type is long, not int. Indeed, and PyType_Spec.flags is int, not long. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 19:33:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Oct 2012 17:33:30 +0000 Subject: [issue16102] uuid._netbios_getnode() is outdated Message-ID: <1349112809.97.0.499056156586.issue16102@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Function uuid._netbios_getnode() in Lib/uuid.py is not properly ported from Python 2. At least it uses indexing on map result. Perhaps there are other errors. The function obviously not been tested for years. ---------- components: Library (Lib), Windows messages: 171736 nosy: storchaka priority: normal severity: normal status: open title: uuid._netbios_getnode() is outdated type: behavior versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 19:52:06 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Oct 2012 17:52:06 +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: <1349113926.11.0.0940613632782.issue16076@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In 3.2 repr(xml.etree.ElementTree.Element) is "". In 3.3 repr(xml.etree.ElementTree.Element) is "". ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 19:53:02 2012 From: report at bugs.python.org (Georg Brandl) Date: Mon, 01 Oct 2012 17:53:02 +0000 Subject: [issue16089] _elementtree causes segfault in GC In-Reply-To: <1348970862.81.0.736695242293.issue16089@psf.upfronthosting.co.za> Message-ID: <1349113982.45.0.465830504876.issue16089@psf.upfronthosting.co.za> Georg Brandl added the comment: Let's make sure this gets into 3.3.1. ---------- priority: critical -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 20:03:17 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Oct 2012 18:03:17 +0000 Subject: [issue16089] _elementtree causes segfault in GC In-Reply-To: <1348970862.81.0.736695242293.issue16089@psf.upfronthosting.co.za> Message-ID: <1349114597.73.0.987270269803.issue16089@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a collection of assorted small fixes for celementtree. There are probably other problems lurking (the coding style there is quite old). I cannot say anything about the crasher until there's a simple reproducer :) ---------- nosy: +pitrou Added file: http://bugs.python.org/file27377/ctree.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 20:10:17 2012 From: report at bugs.python.org (Stefan Krah) Date: Mon, 01 Oct 2012 18:10:17 +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: <1349115017.33.0.434368942695.issue15599@psf.upfronthosting.co.za> Stefan Krah added the comment: I can't reproduce it either even on the machine that magically caught every problem in #15781. FWIW, the Gentoo bot also had a completely isolated segfault in test_ssl lately. Antoine, are you OK with setting the switch interval to 1e-5 for all platforms? Otherwise we'll probably have many platform specific workarounds. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 20:10:58 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Oct 2012 18:10:58 +0000 Subject: [issue15599] test_circular_imports() of test_threaded_import fails on FreeBSD 9.0 In-Reply-To: <1349115017.33.0.434368942695.issue15599@psf.upfronthosting.co.za> Message-ID: <1349114987.3443.25.camel@localhost.localdomain> Antoine Pitrou added the comment: > Antoine, are you OK with setting the switch interval to 1e-5 for > all platforms? Otherwise we'll probably have many platform specific > workarounds. Yes, I'm ok with it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 21:09:01 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Oct 2012 19:09:01 +0000 Subject: [issue16089] _elementtree causes segfault in GC In-Reply-To: <1348970862.81.0.736695242293.issue16089@psf.upfronthosting.co.za> Message-ID: <1349118541.64.0.535234704261.issue16089@psf.upfronthosting.co.za> Antoine Pitrou added the comment: More assorted celementtree cleanups. ---------- Added file: http://bugs.python.org/file27378/ctree2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 22:01:13 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Oct 2012 20:01:13 +0000 Subject: [issue16103] Help() fails at raw_input readline (IDLE 2.7.3, Win7, pythonw) Message-ID: <1349121673.49.0.0542189425732.issue16103@psf.upfronthosting.co.za> New submission from Terry J. Reedy: Problem is only 2.7.3 (not 3.2.3, 3.3.0), tested on Windows Command Line Window >>> help() ... help> _ The _ is blinking, waiting for input. IDLE Shell >>> help() ... help> Traceback (most recent call last): File "", line 1, in help() File "C:\Programs\Python27\lib\site.py", line 467, in __call__ return pydoc.help(*args, **kwds) File "C:\Programs\Python27\lib\pydoc.py", line 1750, in __call__ self.interact() File "C:\Programs\Python27\lib\pydoc.py", line 1762, in interact request = self.getline('help> ') File "C:\Programs\Python27\lib\pydoc.py", line 1773, in getline return raw_input(prompt) UnsupportedOperation: readline There is no blinking _, at that is from the raw_input() call that failed. There is no problem with help() in IDLE for 3.2, 3.3. I see two possibilities: 1. This has nothing to do with Idle directly, but is a problem with pythonw and raw_input/readline that was later fixed. 2. This is a result of how stdin is proxied by Idle and that there is a difference between 2.7 and 3.x. builtin_raw_input in bltinmodule.c calls s = PyOS_Readline(PyFile_AsFile(fin), PyFile_AsFile(fout), prompt); and I presume PyOS_Readline eventually calls fin.readline() UnsupportedOperation is defined (in 2.7, at least) in _pyio.py _pyio._unsupported(self, name) raises it with names. That in turn is the default body for every operation. In particular, def readline(self): self._unsupported("readline") So I presume 2. is the problem and the proxy in the pythonw process is an io subclass that needs readline defined for help() to work. (Is proxying same on all OSes? Or would problem be Windows only?) ---------- components: IDLE, Windows messages: 171743 nosy: serwy, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Help() fails at raw_input readline (IDLE 2.7.3, Win7, pythonw) type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 22:46:54 2012 From: report at bugs.python.org (Daniel Holth) Date: Mon, 01 Oct 2012 20:46:54 +0000 Subject: [issue16104] Use multiprocessing in compileall script Message-ID: <1349124414.14.0.0730954283721.issue16104@psf.upfronthosting.co.za> New submission from Daniel Holth: compileall would benefit approximately linearly from additional CPU cores. There should be an option. The noisy output would have to change. Right now it prints "compiling" and then "done" synchronously with doing the actual work. ---------- messages: 171744 nosy: dholth priority: normal severity: normal status: open title: Use multiprocessing in compileall script _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 23:05:59 2012 From: report at bugs.python.org (Felipe Cruz) Date: Mon, 01 Oct 2012 21:05:59 +0000 Subject: [issue16105] Pass read only FD to signal.set_wakeup_fd Message-ID: <1349125559.77.0.651840030069.issue16105@psf.upfronthosting.co.za> New submission from Felipe Cruz: It's possible to set a read only FD to signal.set_wakeup_fd(fd) Since write call[1] inside 'trip_signal' return code is ignored, no error will be raised. An untested solution is to call fcntl in this FD to check presence of write flags. 1 - http://hg.python.org/cpython/file/fb90e2ff95b7/Modules/signalmodule.c#l187 ---------- components: Library (Lib) messages: 171745 nosy: felipecruz priority: normal severity: normal status: open title: Pass read only FD to signal.set_wakeup_fd type: behavior versions: Python 2.6, Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 23:13:42 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Oct 2012 21:13:42 +0000 Subject: [issue16089] _elementtree causes segfault in GC In-Reply-To: <1348970862.81.0.736695242293.issue16089@psf.upfronthosting.co.za> Message-ID: <1349126022.41.0.298415126224.issue16089@psf.upfronthosting.co.za> Antoine Pitrou added the comment: By the way, the crash involves an _ElementInterface subclass named SimpleElementTreeVar: #0 0x0000000000524c0f in visit_decref (op=Traceback (most recent call last): File "/home/antoine/cpython/33/python-gdb.py", line 1298, in to_string pyop = PyObjectPtr.from_pyobject_ptr(self.gdbval) File "/home/antoine/cpython/33/python-gdb.py", line 370, in from_pyobject_ptr cls = cls.subclass_from_type(p.type()) File "/home/antoine/cpython/33/python-gdb.py", line 318, in subclass_from_type tp_name = t.field('tp_name').string() File "/usr/lib64/python2.7/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0x95 in position 1: invalid start byte , data=0x0) at Modules/gcmodule.c:361 #1 0x00000000005bcbc5 in BaseException_traverse (self=0x7f08f390a8b0, visit=0x524b98 , arg=0x0) at Objects/exceptions.c:104 #2 0x00000000004336d9 in subtype_traverse (self= , visit=0x524b98 , arg=0x0) at Objects/typeobject.c:837 #3 0x0000000000524cba in subtract_refs (containers=0x8dcf40) at Modules/gcmodule.c:386 #4 0x0000000000525afa in collect (generation=0, n_collected=0x7fffed18be00, n_uncollectable=0x7fffed18bdf8) at Modules/gcmodule.c:891 #5 0x00000000005260b2 in collect_with_callback (generation=0) at Modules/gcmodule.c:1048 #6 0x000000000052615c in collect_generations () at Modules/gcmodule.c:1071 #7 0x000000000052707d in _PyObject_GC_Malloc (basicsize=48) at Modules/gcmodule.c:1580 [snip] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 23:27:08 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Mon, 01 Oct 2012 21:27:08 +0000 Subject: [issue16034] bz2 module appears slower in Python 3.x versus Python 2.x In-Reply-To: <1348547973.67.0.489000428853.issue16034@psf.upfronthosting.co.za> Message-ID: <1349126827.98.0.316939981955.issue16034@psf.upfronthosting.co.za> Nadeem Vawda added the comment: Ah, nice - I didn't think of that optimization. Neater and faster. I've committed this patch [e6d872b61c57], along with a minor bugfix [7252f9f95fe6], and another optimization for readline()/readlines() [6d7bf512e0c3]. [merge with default: a19f47d380d2] If you're wondering why the Roundup Robot didn't update the issue automatically, it's because I made a typo in each of the commit messages. Apparently 16304 isn't the same as 16034. Who would have thought it? :P ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 23:36:25 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Oct 2012 21:36:25 +0000 Subject: [issue16089] _elementtree causes segfault in GC In-Reply-To: <1348970862.81.0.736695242293.issue16089@psf.upfronthosting.co.za> Message-ID: <1349127385.1.0.942976258646.issue16089@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, the problem is that _elementtree.TreeBuilder expects to receive _elementtree.Element instances, but simpleTAL's element_factory instead gives _ElementInterface instances. In other words, TreeBuilder is completely broken. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 23:39:24 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Oct 2012 21:39:24 +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: <3XVxhf6T3WzQqv@mail.python.org> Roundup Robot added the comment: New changeset 484a4b9349af by Stefan Krah in branch '3.3': Issue #15599: Increase the switch interval. Several systems cannot handle http://hg.python.org/cpython/rev/484a4b9349af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 23:39:24 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Oct 2012 21:39:24 +0000 Subject: [issue16089] _elementtree causes segfault in GC In-Reply-To: <1348970862.81.0.736695242293.issue16089@psf.upfronthosting.co.za> Message-ID: <1349127564.35.0.676025413359.issue16089@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Example of this is the following code in treebuilder_handle_start: if (this != Py_None) { if (element_add_subelement((ElementObject*) this, node) < 0) goto error; (note the overly optimistic cast) but this is really a pervasive problem, since in many places TreeBuilder is hard-wired to use a Element instance and nothing else (despite the element_factory). Note that simpleTAL cannot use the _elementtree.Element class, since their subclass also inherits from an exception subclass, and the object layouts conflict with each other (yeah, crappy design). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 23:40:32 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Oct 2012 21:40:32 +0000 Subject: [issue16089] _elementtree causes segfault in GC In-Reply-To: <1348970862.81.0.736695242293.issue16089@psf.upfronthosting.co.za> Message-ID: <1349127632.16.0.343030164363.issue16089@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'll still commit my cleanup patch in the meantime :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 23:46:41 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Oct 2012 21:46:41 +0000 Subject: [issue16089] _elementtree causes segfault in GC In-Reply-To: <1348970862.81.0.736695242293.issue16089@psf.upfronthosting.co.za> Message-ID: <3XVxrB4SDgzQMr@mail.python.org> Roundup Robot added the comment: New changeset f9224f23f473 by Antoine Pitrou in branch '3.3': Sanitize and modernize some of the _elementtree code (see issue #16089). http://hg.python.org/cpython/rev/f9224f23f473 New changeset 9fb0a8fc5d79 by Antoine Pitrou in branch 'default': Sanitize and modernize some of the _elementtree code (see issue #16089). http://hg.python.org/cpython/rev/9fb0a8fc5d79 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 23:57:58 2012 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 01 Oct 2012 21:57:58 +0000 Subject: [issue16089] _elementtree causes segfault in GC In-Reply-To: <1348970862.81.0.736695242293.issue16089@psf.upfronthosting.co.za> Message-ID: <1349128678.3.0.219090917869.issue16089@psf.upfronthosting.co.za> Eli Bendersky added the comment: Thank you, Antoine, for looking into this. I wish I could participate in a meaningful way, but alas it will be days or weeks before I can recreate a suitable setup to get back hacking on Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 00:15:07 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Oct 2012 22:15:07 +0000 Subject: [issue16105] Pass read only FD to signal.set_wakeup_fd In-Reply-To: <1349125559.77.0.651840030069.issue16105@psf.upfronthosting.co.za> Message-ID: <1349129707.09.0.590225400551.issue16105@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 00:43:09 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Oct 2012 22:43:09 +0000 Subject: [issue15609] Format string: add more fast-path In-Reply-To: <1344542506.78.0.404794794491.issue15609@psf.upfronthosting.co.za> Message-ID: <3XVz6N1NQRzQXM@mail.python.org> Roundup Robot added the comment: New changeset 559a430e563c by Victor Stinner in branch 'default': Issue #15609: Optimize str%args for integer argument http://hg.python.org/cpython/rev/559a430e563c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 00:44:22 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Oct 2012 22:44:22 +0000 Subject: [issue15609] Format string: add more fast-path In-Reply-To: <1344542506.78.0.404794794491.issue15609@psf.upfronthosting.co.za> Message-ID: <1349131462.96.0.987747180104.issue15609@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 00:59:55 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Oct 2012 22:59:55 +0000 Subject: [issue15766] _imp.load_dynamic() does crash with non-ASCII path and uses the wrong encoding In-Reply-To: <1345650083.26.0.403963695134.issue15766@psf.upfronthosting.co.za> Message-ID: <3XVzTl110nzQqW@mail.python.org> Roundup Robot added the comment: New changeset f3ed5e211fcc by Victor Stinner in branch 'default': Close #15766: Catch exceptions while raising the ImportError in imp.load_dynamic() http://hg.python.org/cpython/rev/f3ed5e211fcc ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 01:01:59 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Oct 2012 23:01:59 +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: <1349132519.23.0.8769256457.issue13572@psf.upfronthosting.co.za> STINNER Victor added the comment: What is the status of this issue? Is anyone able to reproduce it? If not, I would like to close it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 01:04:29 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Oct 2012 23:04:29 +0000 Subject: [issue12069] test_signal.test_without_siginterrupt() failure on AMD64 OpenIndiana 3.x In-Reply-To: <1305241367.49.0.983669109712.issue12069@psf.upfronthosting.co.za> Message-ID: <1349132669.97.0.824602114405.issue12069@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see this issue recently, 'm unable to reproduce it, so I close this issue. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 01:16:10 2012 From: report at bugs.python.org (Brett Cannon) Date: Mon, 01 Oct 2012 23:16:10 +0000 Subject: [issue16104] Use multiprocessing in compileall script In-Reply-To: <1349124414.14.0.0730954283721.issue16104@psf.upfronthosting.co.za> Message-ID: <1349133370.22.0.751387433675.issue16104@psf.upfronthosting.co.za> Brett Cannon added the comment: This should probably use concurrent.futures instead of multiprocessing directly, but yes it would be useful. Then again, the whole module should probably be rewritten to use importlib as well. ---------- components: +Library (Lib) nosy: +brett.cannon priority: normal -> low versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 01:17:36 2012 From: report at bugs.python.org (Brett Cannon) Date: Mon, 01 Oct 2012 23:17:36 +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: <1349133456.95.0.9279620293.issue13572@psf.upfronthosting.co.za> Brett Cannon added the comment: I can't, so setting to pending so that if no one speaks up the issue will close. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 01:26:29 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Oct 2012 23:26:29 +0000 Subject: [issue16105] Pass read only FD to signal.set_wakeup_fd In-Reply-To: <1349125559.77.0.651840030069.issue16105@psf.upfronthosting.co.za> Message-ID: <1349133989.36.0.0154045253084.issue16105@psf.upfronthosting.co.za> STINNER Victor added the comment: Is it really a bug? A file descriptor is just an integer, it may be replaced later. Passed fd may be writable when set_wakeup_fd() is called, but then become read-only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 01:29:52 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Oct 2012 23:29:52 +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: <1349134192.53.0.757031221412.issue16101@psf.upfronthosting.co.za> STINNER Victor added the comment: See also issues #9548 and #14057. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 01:36:41 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Oct 2012 23:36:41 +0000 Subject: [issue16106] antigravity tests Message-ID: <1349134601.26.0.544681268044.issue16106@psf.upfronthosting.co.za> New submission from Ezio Melotti: The attached patch adds tests for antigravity. ---------- assignee: ezio.melotti components: Library (Lib) files: antigravity_tests.diff keywords: patch messages: 171762 nosy: ezio.melotti, michael.foord priority: normal severity: normal stage: patch review status: open title: antigravity tests type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27379/antigravity_tests.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 01:43:35 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Oct 2012 23:43:35 +0000 Subject: [issue16086] tp_flags: Undefined behaviour with 32 bits long In-Reply-To: <1348934655.6.0.704339106877.issue16086@psf.upfronthosting.co.za> Message-ID: <1349135015.35.0.304151048941.issue16086@psf.upfronthosting.co.za> STINNER Victor added the comment: > tp_flags type is long, not int. Oh, I misunderstood what MvL wrote, sorry. I missed PyType_Spec structure. Here is an updated and more complete patch. I changed the return code of PyType_GetFlags(), instead of changing PyType_HasFeature() macro. > OTOH, a number of the flags are not considered part of the API at all (unfortunately, they aren't explicitly excluded, either). Before we make such a change, we should really declare what flags are meant to be by an extension module, and what flags are implementation details only to be used by the object runtime itself. Can't we decide that later? (in other issue?) ---------- Added file: http://bugs.python.org/file27380/unsigned_tp_flags-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 01:56:09 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Oct 2012 23:56:09 +0000 Subject: [issue14468] Update cloning guidelines in devguide In-Reply-To: <1333296467.92.0.464102844472.issue14468@psf.upfronthosting.co.za> Message-ID: <1349135769.37.0.51878907686.issue14468@psf.upfronthosting.co.za> Ezio Melotti added the comment: FTR I now switched to hg share, and while I think it's a better option for committers that work on several branches on a daily basis, it might not be the same for contributors that usually prepare patches against default. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 02:33:02 2012 From: report at bugs.python.org (Richard Jones) Date: Tue, 02 Oct 2012 00:33:02 +0000 Subject: [issue16107] distutils2.version doesn't str() "1.0.post1" correctly Message-ID: <1349137981.25.0.324290338592.issue16107@psf.upfronthosting.co.za> New submission from Richard Jones: The attached simple patch demonstrates the problem: >>> str(NormalizedVersion('1.0.post1')) '1.0.post1.z' and includes a fix. ---------- assignee: eric.araujo components: Distutils2 files: post-fix.patch keywords: patch messages: 171765 nosy: alexis, eric.araujo, richard, tarek priority: normal severity: normal stage: patch review status: open title: distutils2.version doesn't str() "1.0.post1" correctly type: behavior Added file: http://bugs.python.org/file27381/post-fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 03:04:08 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 01:04:08 +0000 Subject: [issue15979] Improve timeit documentation In-Reply-To: <1348111607.58.0.268885940785.issue15979@psf.upfronthosting.co.za> Message-ID: <1349139848.05.0.264562420224.issue15979@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: patch review -> commit review Added file: http://bugs.python.org/file27382/issue15979-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 03:08:49 2012 From: report at bugs.python.org (Roger Serwy) Date: Tue, 02 Oct 2012 01:08:49 +0000 Subject: [issue16103] Help() fails at raw_input readline (IDLE 2.7.3, Win7, pythonw) In-Reply-To: <1349121673.49.0.0542189425732.issue16103@psf.upfronthosting.co.za> Message-ID: <1349140129.48.0.465915441241.issue16103@psf.upfronthosting.co.za> Roger Serwy added the comment: Terry, I am unable to reproduce this error under Win7 Ultimate (no SP1) with either the 32-bit or 64-bit install of 2.7.3. Calling help() produces an interactive prompt in all my test cases. I launched IDLE from the start menu shortcut, with "python.exe -m idlelib.idle", and "pythonw.exe -m idlelib.idle". Running IDLE without a subprocess doesn't trigger the bug either. IDLE 2.7.3 works as well on Arch Linux with 2.7.3 (64-bit). (Also, I get a blinking vertical bar for the cursor, not an underscore on Win7. This minor detail is likely not relevant, only provided since it is an observed difference.) Does raw_input() work from a regular python shell for you? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 03:36:37 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 02 Oct 2012 01:36:37 +0000 Subject: [issue15979] Improve timeit documentation In-Reply-To: <1348111607.58.0.268885940785.issue15979@psf.upfronthosting.co.za> Message-ID: <1349141797.93.0.213780736004.issue15979@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I copy-edited the patch just looking for minor things like punctuation, etc: +a :ref:`command-line-interface` as well as :ref:`callable ` a callable one +See also Tim Peters' introduction to the "Algorithms" chapter in the Python +Cookbook, published by O'Reilly. italicize or underline book titles (is there a reST directive for books?) +The following example shows how the :ref:`command-line-interface`, no comma +Python interface Python Interface + Create a :class:`Timer` instance with the given statement, setup code and timer + function and run its :meth:`.timeit` method with *number* executions. stars around setup and timer like there is with *number*? + Create a :class:`Timer` instance with the given statement, setup code and timer + function and run its :meth:`.repeat` method with the given *repeat* count and ditto + Define a default timer, in a platform specific manner. On Windows, platform-specific + :func:`time.clock` has microsecond granularity but :func:`time.time`'s granularity, but + granularity is 1/60th of a second; on Unix, :func:`time.clock` has 1/100th of I would just split this into two sentences since it already combines two compound sentences (i.e. it is effectively four sentences): second. On Unix, + a second granularity and :func:`time.time` is much more precise. On either granularity, and + Time *number* executions of the main statement. This executes the setup statement. This + statement once, and then returns the time it takes to execute the main statement + a number of times, measured in seconds as a float. The argument is the number *number* times + baseline overhead can be measured by invoking the program without arguments and arguments, and ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 03:38:27 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Oct 2012 01:38:27 +0000 Subject: [issue16094] Tuple extraction in a lambda isn't supported by 2to3 In-Reply-To: <1349003232.56.0.742514252911.issue16094@psf.upfronthosting.co.za> Message-ID: <1349141907.52.0.279571629626.issue16094@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'm not sure a semantically neutral automatic fix is possible: f = lambda (a, b), c: a + b + c # Py2.x f = lambda t, c: t[0] + t[1] + c # Py3.x The former will unpack any iterable, not just sequences: >>> def g(): yield 'a' yield 'b' >>> f(g(), 'c') 'abc' Also, the former will validate the number of arguments: >>> f((1,2,3), 4) Traceback (most recent call last): File "", line 1, in f((1,2,3), 4) File "", line 1, in f = lambda (a, b), c: a + b + c ValueError: too many values to unpack I don't see a way to automatically include those capabilities in an automatic 2-to-3 transformation. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 03:41:12 2012 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 02 Oct 2012 01:41:12 +0000 Subject: [issue16104] Use multiprocessing in compileall script In-Reply-To: <1349124414.14.0.0730954283721.issue16104@psf.upfronthosting.co.za> Message-ID: <1349142072.97.0.718794006276.issue16104@psf.upfronthosting.co.za> Changes by Steven D'Aprano : ---------- nosy: +stevenjd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 03:48:11 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 02 Oct 2012 01:48:11 +0000 Subject: [issue11109] socketserver.ForkingMixIn leaves zombies, also fails to reap all zombies in one pass In-Reply-To: <1296770474.15.0.807802878959.issue11109@psf.upfronthosting.co.za> Message-ID: <3XW3Ct5V04zQss@mail.python.org> Roundup Robot added the comment: New changeset 991c24b8969d by R David Murray in branch '3.3': #11109: clean up docs, add whatsnew entry, and fix Justin's last name. http://hg.python.org/cpython/rev/991c24b8969d New changeset 1234300bc056 by R David Murray in branch 'default': Merge #11109: clean up docs, add whatsnew entry, and fix Justin's last name. http://hg.python.org/cpython/rev/1234300bc056 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 04:05:10 2012 From: report at bugs.python.org (Felipe Cruz) Date: Tue, 02 Oct 2012 02:05:10 +0000 Subject: [issue16105] Pass read only FD to signal.set_wakeup_fd In-Reply-To: <1349125559.77.0.651840030069.issue16105@psf.upfronthosting.co.za> Message-ID: <1349143510.66.0.916706974518.issue16105@psf.upfronthosting.co.za> Felipe Cruz added the comment: I would not say that is a bug, but there is a write(wakeup_fd) call with ignored return code and maybe this can be improved to an output to stderr, or maybe a better solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 05:02:28 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 02 Oct 2012 03:02:28 +0000 Subject: [issue15979] Improve timeit documentation In-Reply-To: <1348111607.58.0.268885940785.issue15979@psf.upfronthosting.co.za> Message-ID: <3XW4sb6Wv5zQsH@mail.python.org> Roundup Robot added the comment: New changeset 60c831305e73 by Ezio Melotti in branch '2.7': #15979: improve timeit documentation. http://hg.python.org/cpython/rev/60c831305e73 New changeset d5a4300702c1 by Ezio Melotti in branch '3.2': #15979: improve timeit documentation. http://hg.python.org/cpython/rev/d5a4300702c1 New changeset ff32d390f897 by Ezio Melotti in branch '3.3': #15979: merge with 3.2. http://hg.python.org/cpython/rev/ff32d390f897 New changeset 85b6c1c19cb8 by Ezio Melotti in branch 'default': #15979: merge with 3.3. http://hg.python.org/cpython/rev/85b6c1c19cb8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 05:06:33 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 03:06:33 +0000 Subject: [issue15979] Improve timeit documentation In-Reply-To: <1348111607.58.0.268885940785.issue15979@psf.upfronthosting.co.za> Message-ID: <1349147193.68.0.94273893364.issue15979@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the review! ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 06:33:54 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Oct 2012 04:33:54 +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: <1349152434.26.0.980611657695.issue16049@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 06:37:03 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Oct 2012 04:37:03 +0000 Subject: [issue16098] Bisect optimization in heapq.nsmallest is never used In-Reply-To: <1349091566.51.0.299551598321.issue16098@psf.upfronthosting.co.za> Message-ID: <1349152623.69.0.424794222429.issue16098@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 06:44:43 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Oct 2012 04:44:43 +0000 Subject: [issue16098] Bisect optimization in heapq.nsmallest is never used In-Reply-To: <1349091566.51.0.299551598321.issue16098@psf.upfronthosting.co.za> Message-ID: <1349153083.95.0.58065525663.issue16098@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Since heapq uses the C version of nsmallest, this micro-optimization doesn't actually help any real code. Am marking this as low priority and will come back to it at some point and will review the pure python version. Ideally, it should parallel the C version which doesn't use bisect at all. ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 07:04:00 2012 From: report at bugs.python.org (Richard Jones) Date: Tue, 02 Oct 2012 05:04:00 +0000 Subject: [issue16108] Include maintainer information in register/upload Message-ID: <1349154240.01.0.151032575778.issue16108@psf.upfronthosting.co.za> New submission from Richard Jones: The attached patch includes the maintainer information in the data sent to PyPI in a register or upload submission. ---------- assignee: eric.araujo components: Distutils2 files: maintainer.patch keywords: patch messages: 171774 nosy: alexis, eric.araujo, richard, tarek priority: normal severity: normal stage: patch review status: open title: Include maintainer information in register/upload type: behavior Added file: http://bugs.python.org/file27383/maintainer.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 07:04:09 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Oct 2012 05:04:09 +0000 Subject: [issue16098] Bisect optimization in heapq.nsmallest is never used In-Reply-To: <1349091566.51.0.299551598321.issue16098@psf.upfronthosting.co.za> Message-ID: <1349154249.06.0.747898110185.issue16098@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- nosy: -stutzbach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 07:04:21 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Oct 2012 05:04:21 +0000 Subject: [issue16098] Bisect optimization in heapq.nsmallest is never used In-Reply-To: <1349091566.51.0.299551598321.issue16098@psf.upfronthosting.co.za> Message-ID: <1349154261.84.0.372839005971.issue16098@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- Removed message: http://bugs.python.org/msg171773 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 07:20:45 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 05:20:45 +0000 Subject: [issue14003] __self__ on built-in functions is not as documented In-Reply-To: <1329159935.3.0.264942191971.issue14003@psf.upfronthosting.co.za> Message-ID: <1349155245.9.0.847758668737.issue14003@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 07:24:29 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 05:24:29 +0000 Subject: [issue14730] Implementation of the PEP 419: Protecting cleanup statements from interruptions In-Reply-To: <1336228306.65.0.183212928475.issue14730@psf.upfronthosting.co.za> Message-ID: <1349155469.21.0.633180558052.issue14730@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +asvetlov stage: -> patch review versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 07:27:19 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 05:27:19 +0000 Subject: [issue13299] namedtuple row factory for sqlite3 In-Reply-To: <1320021145.59.0.53370875256.issue13299@psf.upfronthosting.co.za> Message-ID: <1349155639.94.0.974719222794.issue13299@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: needs patch -> patch review versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 07:28:38 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 05:28:38 +0000 Subject: [issue7686] redundant open modes 'rbb', 'wbb', 'abb' no longer work on Windows In-Reply-To: <1263342536.73.0.0502696558207.issue7686@psf.upfronthosting.co.za> Message-ID: <1349155718.2.0.323151693746.issue7686@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 07:31:38 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 05:31:38 +0000 Subject: [issue6911] Document changes in asynchat In-Reply-To: <1252942019.67.0.473669726807.issue6911@psf.upfronthosting.co.za> Message-ID: <1349155898.88.0.404939596628.issue6911@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> patch review type: -> enhancement versions: +Python 3.3, Python 3.4 -Python 2.6, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 07:34:08 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 05:34:08 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1349156048.98.0.130699075292.issue3244@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 07:44:33 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 05:44:33 +0000 Subject: [issue15104] Unclear language in __main__ description In-Reply-To: <1340092965.02.0.675870286607.issue15104@psf.upfronthosting.co.za> Message-ID: <1349156673.54.0.352839067541.issue15104@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 07:52:52 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 05:52:52 +0000 Subject: [issue4145] tabulary entries in PDF documentation In-Reply-To: <1224406019.73.0.627994354189.issue4145@psf.upfronthosting.co.za> Message-ID: <1349157172.35.0.423814744173.issue4145@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> needs patch versions: +Python 2.7, Python 3.3, Python 3.4 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 07:54:06 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 05:54:06 +0000 Subject: [issue4071] ntpath.abspath fails for long str paths In-Reply-To: <1223425635.48.0.940202056696.issue4071@psf.upfronthosting.co.za> Message-ID: <1349157246.68.0.724672030152.issue4071@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: +Python 3.2, Python 3.3, Python 3.4 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 07:55:20 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 05:55:20 +0000 Subject: [issue4643] cgitb.html fails if getattr call raises exception In-Reply-To: <1229093313.68.0.275889144486.issue4643@psf.upfronthosting.co.za> Message-ID: <1349157320.02.0.0626058219507.issue4643@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy stage: -> test needed versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 07:56:47 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 05:56:47 +0000 Subject: [issue3702] test_urllib2.test_trivial fails when run from another Windows drive In-Reply-To: <1219845702.82.0.0720973084926.issue3702@psf.upfronthosting.co.za> Message-ID: <1349157407.46.0.566904557408.issue3702@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: +Python 3.2, Python 3.3 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 08:01:47 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 06:01:47 +0000 Subject: [issue3991] urllib.request.urlopen does not handle non-ASCII characters In-Reply-To: <1222627636.82.0.587488225038.issue3991@psf.upfronthosting.co.za> Message-ID: <1349157707.41.0.890414666943.issue3991@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: +Python 3.2, Python 3.3, Python 3.4 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 08:02:48 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 06:02:48 +0000 Subject: [issue2774] ctypes documentation not effective In-Reply-To: <1210091918.21.0.990068864292.issue2774@psf.upfronthosting.co.za> Message-ID: <1349157768.14.0.856825173085.issue2774@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> needs patch type: performance -> enhancement versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 08:05:11 2012 From: report at bugs.python.org (Georg Brandl) Date: Tue, 02 Oct 2012 06:05:11 +0000 Subject: [issue16106] antigravity tests In-Reply-To: <1349134601.26.0.544681268044.issue16106@psf.upfronthosting.co.za> Message-ID: <1349157911.64.0.125454250651.issue16106@psf.upfronthosting.co.za> Georg Brandl added the comment: Are you serious? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 08:14:14 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 06:14:14 +0000 Subject: [issue5497] openssl compileerror with original source In-Reply-To: <1237272241.76.0.44185655243.issue5497@psf.upfronthosting.co.za> Message-ID: <1349158454.46.0.85340238106.issue5497@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +pitrou versions: +Python 3.2, Python 3.3, Python 3.4 -Python 2.6, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 08:18:31 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 06:18:31 +0000 Subject: [issue3849] FUD in documentation for urllib.urlopen() In-Reply-To: <1221246343.23.0.128587140594.issue3849@psf.upfronthosting.co.za> Message-ID: <1349158711.67.0.00716797580119.issue3849@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy versions: +Python 2.7 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 08:21:53 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Oct 2012 06:21:53 +0000 Subject: [issue5497] openssl compileerror with original source In-Reply-To: <1237272241.76.0.44185655243.issue5497@psf.upfronthosting.co.za> Message-ID: <1349158913.18.0.0686380011602.issue5497@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 08:22:14 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2012 06:22:14 +0000 Subject: [issue6477] Pickling of NoneType raises PicklingError In-Reply-To: <1247505641.96.0.188774248495.issue6477@psf.upfronthosting.co.za> Message-ID: <1349158934.88.0.108684278876.issue6477@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy stage: -> needs patch versions: +Python 3.3, Python 3.4 -Python 2.6, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 09:55:55 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 02 Oct 2012 07:55:55 +0000 Subject: [issue16105] Pass read only FD to signal.set_wakeup_fd In-Reply-To: <1349125559.77.0.651840030069.issue16105@psf.upfronthosting.co.za> Message-ID: <1349164555.88.0.469927545041.issue16105@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > I would not say that is a bug, but there is a write(wakeup_fd) call > with ignored return code and maybe this can be improved to an output > to stderr, or maybe a better solution. The problem is that it's called from the signal handler, so there's not much we can do here (and certainly not log a warning or raise an exception). There's a contract to respect here, and if the user doesn't follow it, trouble will follow: for example, if the passed FD isn't non-blocking, then the signal handler can deadlock if the write() blocks (pipe, socket, whatever). ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 10:58:59 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Oct 2012 08:58:59 +0000 Subject: [issue16106] antigravity tests In-Reply-To: <1349134601.26.0.544681268044.issue16106@psf.upfronthosting.co.za> Message-ID: <1349168339.34.0.0145164950247.issue16106@psf.upfronthosting.co.za> Christian Heimes added the comment: Ezio is as serious as the antigravity module. *g* ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 11:00:58 2012 From: report at bugs.python.org (Stefan Krah) Date: Tue, 02 Oct 2012 09:00:58 +0000 Subject: [issue16089] _elementtree causes segfault in GC In-Reply-To: <1348970862.81.0.736695242293.issue16089@psf.upfronthosting.co.za> Message-ID: <1349168458.31.0.765162919978.issue16089@psf.upfronthosting.co.za> Stefan Krah added the comment: Nice find. -- The Python version does this: _Element = _ElementInterface = Element So (naively) I would think the same should be done for the C version after importing Element. But then one runs into the object layouts conflict that you mentioned. On the other hand, in the original documentation direct use of _ElementInterface was discouraged: http://effbot.org/zone/pythondoc-elementtree-ElementTree.htm#elementtree.ElementTree._ElementInterface-class ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 11:06:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Oct 2012 09:06:22 +0000 Subject: [issue16094] Tuple extraction in a lambda isn't supported by 2to3 In-Reply-To: <1349003232.56.0.742514252911.issue16094@psf.upfronthosting.co.za> Message-ID: <1349168782.95.0.573335560354.issue16094@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: f = lambda t, c, *, _f=(lambda a, b, c: a + b + c): _f(*(unpack_tuple(2, t) + (c,))) def unpack_tuple(n, t): t = tuple(t) if len(t) > n: raise ValueError('too many values to unpack (expected %d)' % (n,)) if len(t) < n: raise ValueError('need more than %d values to unpack' % (len(t),)) return t ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 11:51:20 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 02 Oct 2012 09:51:20 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349171480.1.0.791715797553.issue8800@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: > You are not restricted to the context manager model. Just use selock.shared.acquire() or selock.exclusive.acquire(). The unlock operation is the same, so now you have to arbitrarily pick one of the "lockd" and chose release(). Why take a construct which is essentially a lock that can be acquired in two different ways and force people to view it as separate objects? I much prefer a simple RWLock primitve, such as is popular in other programming environments, and add your convenient pseudo-locks on top. That way, we are not forcing a certain myopic view of what an RWLock is down people's throat. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 11:58:18 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 02 Oct 2012 09:58:18 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349171898.15.0.953959406688.issue8800@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: > We've already departed from that. Our Lock is nothing like a mutex, for > example (it's more of a binary semaphore). This is not by nature of good design, but an accident. C python needed both mutex and signaling ability and decided that a single non-recursive lock were good enough for that. This is a debatable choice since all modern systems consider these two different needs and provide different primitives to satisfy them. The "Lock" was then exposed to Python and RLock grafted on top to fix the non-recursiveness problem. Then we added signaling in the form of Events, Semaphores and Condition variables. Had this ben more purposefully designed, then there would be no Lock or RLock in threading.py, only a Mutex. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 12:21:26 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 02 Oct 2012 10:21:26 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349173286.75.0.0449210418155.issue8800@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: > I have implemented the simplest possible acquisition order. > The lock acquired first will be granted first. Without that (or a more > advanced policy) in applications with concurrent threads/processes > that are heavily using the shared lock, the exclusive lock can never > be acquired, because of there is always a shared lock acquired and > before it is released the next shared lock will be acquired. I think you got that argument backwards. The simple greedy policy you implement works well provided there are not too many readers. Otherwise, the writers will be starved, since they have to wait for an oppertune moment when no readers are active to get a foot in the door, so to speak. Your approach is similar to my "SimpleSharableLock" from my second patch in that respect, and also to Microsoft's SRW Locks (http://msdn.microsoft.com/en-us/magazine/cc163405.aspx). They specifically state: " This means that if your application requires that data updates take priority over data reads, you might want to consider a different reader/writer lock that favors writers". While the test_threading.py showed ok results with the simple approach, my preliminary tests on multiprocessing show that writers need to be given priority if they are not to be starved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 12:44:19 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 02 Oct 2012 10:44:19 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349174659.73.0.190104850809.issue8800@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > I think you got that argument backwards. The simple greedy policy you > implement works well provided there are not too many readers. Otherwise, > the writers will be starved, since they have to wait for an oppertune > moment when no readers are active to get a foot in the door, so to speak. Actually, I think Sebastian's algorithm attempts to be fair to both readers and writers. If there is a writer waiting then "self._wait_count > self._granted_count". The writer cannot be prempted by a later reader because the reader would find "waitno > self._granted_count" until after writer has been granted the lock. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 12:54:15 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 02 Oct 2012 10:54:15 +0000 Subject: [issue15609] Format string: add more fast-path In-Reply-To: <1344542506.78.0.404794794491.issue15609@psf.upfronthosting.co.za> Message-ID: <3XWHKy1r8JzQry@mail.python.org> Roundup Robot added the comment: New changeset 5ddc7b3f2795 by Victor Stinner in branch 'default': Issue #15609: Fix refleak introduced by my last optimization http://hg.python.org/cpython/rev/5ddc7b3f2795 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 12:59:55 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 02 Oct 2012 10:59:55 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349175595.63.0.761929152847.issue8800@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > The unlock operation is the same, so now you have to arbitrarily pick one > of the "lockd" and chose release(). That depends on the implementation. In the three implementations on http://en.wikipedia.org/wiki/Readers-writers_problem the unlock operateration is different for readers and writers. > Why take a construct which is essentially a lock that can be acquired in two > different ways and force people to view it as separate objects? I don't see why writing lock.exclusive.acquire() really requires a different way of thinking compared to writing lock.exclusive_acquire() or lock.acquire_exclusive() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 13:29:56 2012 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 02 Oct 2012 11:29:56 +0000 Subject: [issue15776] Allow pyvenv to work in existing directory In-Reply-To: <1345799746.88.0.728928529816.issue15776@psf.upfronthosting.co.za> Message-ID: <1349177396.82.0.0433322482614.issue15776@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- hgrepos: +150 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 13:30:37 2012 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 02 Oct 2012 11:30:37 +0000 Subject: [issue15776] Allow pyvenv to work in existing directory In-Reply-To: <1345799746.88.0.728928529816.issue15776@psf.upfronthosting.co.za> Message-ID: <1349177437.09.0.146663588918.issue15776@psf.upfronthosting.co.za> Changes by Vinay Sajip : Added file: http://bugs.python.org/file27384/e14d4c28bb03.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 13:37:51 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 02 Oct 2012 11:37:51 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349177871.78.0.00583166695315.issue8800@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Here is a new patch. it is complete with: threading implementation and tests multiprocessing implementation and tests. Let's leave the naming bikeshedding a bit and focus on some practical aspects: 1) The threading version contains a RWLock and a FairRWLock. Both support recursion, although not upgrading from read to write access. This is achieved with a list of 'owning' threads. 2) the "Fair" version provides 'write' priority, blocking further first acquisitions in read mode until no writers are waiting. Multiprocessing: Because there is no way I know to share a list of owning thread ids, this version is more limited: a) The RWLock() only contains one owing thread ID. This allows recursion but some error checking present in the threading version cannot be implemented. b) the FairRWLock() again provides writer priority. But to do that, we have to allow 'recursive' read if a writer is waiting, if we allow recursion at all. And for that, we need to know what threds own the lock in read mode. Since we don't have that information, this version of the lock disallows recursion alltogether. Discussion: Recursion/No recursion? The Windows SRW locks disallow recursion. Their rationale is here: http://msdn.microsoft.com/en-us/magazine/cc163405.aspx: "First, regarding recursive acquires: if the locking policy you?ve designed for your application requires that synchronization objects be acquired recursively, this is very possibly a red flag telling you to re-examine your locking policy to eliminate the recursion. This is our opinion and results from the additional overhead of executing the lock acquisition and release code multiple times and, perhaps more importantly, because ensuring that the balance of lock releases with the lock acquisitions is often difficult to prove correct." Of course the SRWLock is a "slim" lock and thus can be forgiven for not providing such functionality. "Fair" vs "Non-fair" (Fair is not a good term, writer priority would be better). The reason I'm coming back to this being useful is tests using the multiprocessing module. The tests there show without doubt that a simple greedy locking algorithm fails miserably if there are more readers than writers. The test "test_writer_success" has been adorned with a timer, and the simple version completes in 15 seconds, while the "fair" version completes in 0.5 seconds. Good times! ---------- Added file: http://bugs.python.org/file27385/rwlock.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 13:38:46 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Tue, 02 Oct 2012 11:38:46 +0000 Subject: [issue3754] cross-compilation support for python build In-Reply-To: <1220305759.82.0.468834426074.issue3754@psf.upfronthosting.co.za> Message-ID: <1349177926.43.0.100661058346.issue3754@psf.upfronthosting.co.za> V?clav ?milauer added the comment: Being a newcomer to this issue, I would like to ask for a brief summary about which parts of the patch are checked in for 3.3.0 and which are still to be applied. Roumen mentions #15483, #15484, #15268 and the ac_cv_thread in the previous post as mandatory and #15298 and #14598 as optional; can I add those as dependencies of this issue? python-py3k-20120607-CROSS.patch does not apply to 3.3.0 cleanly, but looking quickly at .rej files suggests that rejected hunks are those which were already merged for 3.3.0 final. Can someone confirm that? ---------- nosy: +eudoxos _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 13:42:23 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 02 Oct 2012 11:42:23 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349178143.84.0.751454828595.issue8800@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Oh, I forgot to mention: Once one gets into the domain of allowing such niceties as writer priority, surely you can agree that the implementation of both locking modes belongs in the same class instance. That is just plain good coding practice, allowing for class invariants, state assertions and such things. Two class instances coupled by a bunch of common variables is IMHO neither good style nor practice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 13:53:08 2012 From: report at bugs.python.org (Sebastian Noack) Date: Tue, 02 Oct 2012 11:53:08 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349178788.73.0.862879000825.issue8800@psf.upfronthosting.co.za> Sebastian Noack added the comment: Exactly, with my implemantation "the lock acquired first will be granted first". There is no way that either shared nor exclusive locks can starve, and therefore it should satisfy all use cases. Since you can only share simple datastructures like integers across processes, I also found that this seems to be the only policy (except ignoring the acquisition order at all), that can be implemented for multiprocessing. I have also looked at the seqlock algorithm, which seems to be great for use cases where the exclusive lock is acquired rather rarely and where your "reader" code is in fact read-only and therefore can be repeated. But in any other case a seqlock would break your code. However the algorithm is ultra simple and can't be implemented as lock-like object anyway. Though you could implement it as context manager, but that would hide the fact that the "reader" code will be repeated. So if you find yourself that a seqlock is that what you need for your specific use case, you can just use the algorithm like below: lock = multiprocessing.Value(0) count = multiprocessing.Value(0) def do_read(): while True: if count.value % 2: continue data = ... if count.value % 2: continue return data def do_write(data): with lock: count.value += 1 # write data count.value += 1 I have also experimented with implementing a shared/exclusive lock on top of a pipe and UNIX file locks (https://gist.github.com/3818148). However it works only on Unix and only with processes (not threads). Also it turned out that UNIX file locks don't implement an acquisition order. So exclusive locks can starve, which renders it useless for most use cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 14:03:24 2012 From: report at bugs.python.org (Sebastian Noack) Date: Tue, 02 Oct 2012 12:03:24 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349179404.67.0.361955585403.issue8800@psf.upfronthosting.co.za> Sebastian Noack added the comment: @Kristj?n: Uhh, that is a huge amount of code, more than twice as much (don't counting tests) as my implementation, to accomplish the same. And it seems that there is not much code shared between the threading and multiprocessing implementation. And for what? Ah right, to make the API suck as much as the Windows API does. Please tell me more about good coding practice. ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 14:05:43 2012 From: report at bugs.python.org (Jean-Paul Calderone) Date: Tue, 02 Oct 2012 12:05:43 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1349179543.6.0.0155718872257.issue3982@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: Since Benjamin originally requested this feature, and then decided that he could accomplish his desired goal (ftplib porting, as far as I can tell) without it, I think that the "rejected" status is actually incorrect. I think that Benjamin just wanted to indicate that he no longer needed the feature. This doesn't mean that no one else will need the feature, and as it turns out the comments seem to reveal that other people do need the feature (also, I need the feature). So, adjusting the ticket metadata to reflect that this is a valid feature request just waiting for someone to implement it, not a rejected idea that is not welcome in Python. ---------- nosy: +exarkun resolution: rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 14:09:50 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 02 Oct 2012 12:09:50 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349179790.97.0.879267451773.issue8800@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: This amount of code provides recursion, context managers, condition variable compatibility, timeout functionality, error checking and conformance with the unit tests. The actual locking code is encapsulated in the three functions acquire_read(), acquire_write, release(). The requirements and possibilities between threading and multiprocessing are many and multiple. Sharing the implementation has the drawback of imposing the shortcomings and preformance bottlenecks of the multiprocessing implementation on the threading implementation, for no good reason. I't tell you about good programming practice, but I'm too busy trying to understand the actual locking policy in your patch. Sometimes comments in code can be helpful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 14:22:46 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 02 Oct 2012 12:22:46 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349180566.08.0.259582746426.issue8800@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Ah, you are implementing an FIFO lock. That should have been made clear. I see it now that you grant the lock in the order that the acquisition is attempted. Ok, this is fine, but with one important caveat: Explicit handoff such as that can suffer from "lock convoying". In contested situation this can result in the protected resource being much less available than it ought to be. In my dayjob, I write locking primitives for Stackless Python. We used to employ handoff until we found out that this caused performance problems. All the locking primitives now used by Eve Online and in Stacklesslib are 'greedy' and don't attempt fairness. This has resulted in much improvement in resource usage. For this reason, I explicitly did not build any such mechanism into my RWLock implementation. Any thread coming in can claim the lock, provided the policy (writer priority policy) doesn't kick in. In those rare cases where a special locking policy such as FIFO fairness is _required_ it is always possible to construct such a thing in python using e.g. a queue of condition variables. For information on this, please see the following resource: http://www.bluebytesoftware.com/blog/PermaLink,guid,e40c2675-43a3-410f-8f85-616ef7b031aa.aspx ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 14:34:44 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 02 Oct 2012 12:34:44 +0000 Subject: [issue5497] openssl compileerror with original source In-Reply-To: <1237272241.76.0.44185655243.issue5497@psf.upfronthosting.co.za> Message-ID: <1349181284.57.0.703081260349.issue5497@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think this issue is outdated. ocean-city, is this still concern for you? FWIW, I'll be removing the VC6 build process from the 3.4 (default) branch soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 14:40:11 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Oct 2012 12:40:11 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1349181611.35.0.73870739344.issue3982@psf.upfronthosting.co.za> Christian Heimes added the comment: The proposal sounds like a good idea to me. Benjamin, what needs to be done to implement the feature? ---------- nosy: +christian.heimes versions: +Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 15:08:14 2012 From: report at bugs.python.org (Brett Cannon) Date: Tue, 02 Oct 2012 13:08:14 +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: <1349183294.98.0.60952090762.issue16101@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Speedup sysconfig startup, locale can be imported at startup but relies on too many library modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 15:08:50 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Oct 2012 13:08:50 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1349183330.4.0.853288844123.issue3982@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Formatting is a very complicated part of Python (especially after Victor's optimizations). I think no one wants to maintain this code for a long time. The price of maintaining exceeds the potential very limited benefits from the use. ---------- nosy: +storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 15:10:08 2012 From: report at bugs.python.org (Brett Cannon) Date: Tue, 02 Oct 2012 13:10:08 +0000 Subject: [issue16106] antigravity tests In-Reply-To: <1349134601.26.0.544681268044.issue16106@psf.upfronthosting.co.za> Message-ID: <1349183408.3.0.0208733161613.issue16106@psf.upfronthosting.co.za> Brett Cannon added the comment: It's actually a nice example of using unittest.mock. =) ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 15:12:47 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 02 Oct 2012 13:12:47 +0000 Subject: [issue3849] FUD in documentation for urllib.urlopen() In-Reply-To: <1221246343.23.0.128587140594.issue3849@psf.upfronthosting.co.za> Message-ID: <1349183567.11.0.633747113809.issue3849@psf.upfronthosting.co.za> Chris Jerdonek added the comment: The section of the Dev Guide on "affirmative tone" should also be applied: "The documentation focuses on affirmatively stating what the language does and how to use it effectively...." http://docs.python.org/devguide/documenting.html#affirmative-tone ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 15:16:12 2012 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 02 Oct 2012 13:16:12 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1349183772.93.0.131015130184.issue3982@psf.upfronthosting.co.za> Eric V. Smith added the comment: I was just logging in to make this point, but Serhiy beat me to it. When I wrote several years ago that this was "easy", it was before the (awesome) PEP 393 work. I suspect, but have not verified, that having a bytes version of this code would now require an implementation that shared very little with the str version. So I think Martin's advice to just encode to ascii is the best course of action. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 15:18:35 2012 From: report at bugs.python.org (Jean-Paul Calderone) Date: Tue, 02 Oct 2012 13:18:35 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1349183915.26.0.931685521275.issue3982@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: > The price of maintaining exceeds the potential very limited benefits from the use. The "very limited benefits" of being able to write I/O code without roughly 3 times code bloat? Perhaps for people who don't write code that does non-trivial I/O, but for the rest of us the benefits are pretty significant. > I suspect, but have not verified, that having a bytes version of this code would now require an implementation that shared very little with the str version. The implementation may be difficult, therefore no one should attempt it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 15:22:00 2012 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 02 Oct 2012 13:22:00 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1349184120.46.0.582266772422.issue3982@psf.upfronthosting.co.za> Eric V. Smith added the comment: > The implementation may be difficult, therefore no one should attempt it? The development cost and maintenance cost is surely part of the evaluation when deciding whether to implement a feature, no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 15:31:37 2012 From: report at bugs.python.org (Michael Foord) Date: Tue, 02 Oct 2012 13:31:37 +0000 Subject: [issue16106] antigravity tests In-Reply-To: <1349134601.26.0.544681268044.issue16106@psf.upfronthosting.co.za> Message-ID: <1349184697.0.0.14818632489.issue16106@psf.upfronthosting.co.za> Michael Foord added the comment: What happens if test_geohash runs first? It looks like test_antigravity will only pass if it is run first. You could remove the order dependence by ensuring antigravity is not in sys.modules. sys.modules.pop('antigravity', None) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 15:38:48 2012 From: report at bugs.python.org (Jean-Paul Calderone) Date: Tue, 02 Oct 2012 13:38:48 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1349185128.79.0.978448421731.issue3982@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: > The development cost and maintenance cost is surely part of the evaluation when deciding whether to implement a feature, no? Sure, but in an open source project where almost all contributions are done by volunteers (ie, donated), what is the development cost? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 15:55:45 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Oct 2012 13:55:45 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1349186145.73.0.841232590156.issue3982@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I suspect, but have not verified, that having a bytes version of this code would now require an implementation that shared very little with the str version. This is not all. The usage model will be completely different too. * The default formatting should not use str(), but buffer protocol. * There is no place for floating point. * There is no place for locale. * There is no place for 'r' conversion (possible only for 'a'). * It should include the features of struct.pack(), int.to_bytes() and ctypes. * Padding should be not only by space, but also by zeros (and possibly by other values). * Alignment (padding to position divisible by some number). * In addition to padding and truncating should be the ability to raise an exception in case of discrepancy between the needed and actual lengths. * It unlikely needed attribute access and indexing. * Builtin format() should not work with this. As a result, this should be a completely separate formatting mini-language that has nothing shared with strings formatting. Not worth to introduce bytes.format(), it's just confused. Perhaps you should add features to struct module or add a new module. PyPI looks as good place for such experiments. If people will use it, it could be included in the stdlib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 15:58:07 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 02 Oct 2012 13:58:07 +0000 Subject: [issue16106] antigravity tests In-Reply-To: <1349134601.26.0.544681268044.issue16106@psf.upfronthosting.co.za> Message-ID: <1349186287.06.0.483027644684.issue16106@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Oh, this explains it. I was wondering why my browser was opening xkcd whenever I tried running doctest against all modules in the library. ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 16:52:22 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 02 Oct 2012 14:52:22 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1349189542.95.0.492114716473.issue3982@psf.upfronthosting.co.za> Benjamin Peterson added the comment: As Serhiy suggests, it would be best to collect th eusecases for a format-like method for bytes and design something which can meet them. It's definitely a PEP. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 16:56:40 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 02 Oct 2012 14:56:40 +0000 Subject: [issue15452] Improve the security model for logging listener() In-Reply-To: <1343264495.49.0.0195201203683.issue15452@psf.upfronthosting.co.za> Message-ID: <3XWNjg2pKVzQpm@mail.python.org> Roundup Robot added the comment: New changeset 26c3d170fd56 by Vinay Sajip in branch 'default': Issue #15452: Added verify option for logging configuration socket listener. http://hg.python.org/cpython/rev/26c3d170fd56 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:05:15 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Oct 2012 15:05:15 +0000 Subject: [issue14850] The inconsistency of codecs.charmap_decode In-Reply-To: <1337352396.54.0.468921009595.issue14850@psf.upfronthosting.co.za> Message-ID: <1349190315.02.0.492250325507.issue14850@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file25934/decode_charmap_fffe.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:07:47 2012 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 02 Oct 2012 15:07:47 +0000 Subject: [issue15452] Improve the security model for logging listener() In-Reply-To: <1343264495.49.0.0195201203683.issue15452@psf.upfronthosting.co.za> Message-ID: <1349190467.26.0.405110483428.issue15452@psf.upfronthosting.co.za> Vinay Sajip added the comment: I've updated logging as discussed in this issue, except for the removal of the two calls to eval() in logging.config. I propose to resolve that as follows: 1. Add the Evaluator implemented in the Gist I linked to to ast.py. 2. Expose a function 'ast.lookup_eval(source, context, allow_import)' which basically just does a return Evaluator(context, allow_import).evaluate(source, '') 3. Add docs and tests to ast.rst and test_ast.py. 4. Update logging.config to call ast.lookup_eval() instead of eval(). Please comment if you see any problems with this, otherwise I will go ahead and implement this change within the next week or so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:13:33 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 02 Oct 2012 15:13:33 +0000 Subject: [issue15776] Allow pyvenv to work in existing directory In-Reply-To: <1345799746.88.0.728928529816.issue15776@psf.upfronthosting.co.za> Message-ID: <1349190813.52.0.740647741158.issue15776@psf.upfronthosting.co.za> ?ric Araujo added the comment: LGTM. ---------- priority: critical -> normal stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:13:51 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 02 Oct 2012 15:13:51 +0000 Subject: [issue16107] distutils2.version doesn't str() "1.0.post1" correctly In-Reply-To: <1349137981.25.0.324290338592.issue16107@psf.upfronthosting.co.za> Message-ID: <1349190831.47.0.294847054359.issue16107@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks, will apply. ---------- versions: +3rd party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:15:08 2012 From: report at bugs.python.org (Christian Fertig) Date: Tue, 02 Oct 2012 15:15:08 +0000 Subject: [issue16109] urllib2.urlopen throws HTTP Error in python 2.7.2, 2.7.3, but not in python 2.7 Message-ID: <1349190908.23.0.357086619983.issue16109@psf.upfronthosting.co.za> New submission from Christian Fertig: wespe:/tmp/python2.7 # cat /etc/SuSE-release openSUSE 12.1 (x86_64) VERSION = 12.1 CODENAME = Asparagus wespe:/tmp/python2.7 # rpm -q python python-2.7.2-7.17.1.x86_64 wespe:/tmp/python2.7 # python Python 2.7.2 (default, Aug 19 2011, 20:41:43) [GCC] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import urllib2; print urllib2.urlopen('https://172.23.6.222/') # not working Traceback (most recent call last): File "", line 1, in File "urllib2.py", line 126, in urlopen return _opener.open(url, data, timeout) File "urllib2.py", line 397, in open response = meth(req, response) File "urllib2.py", line 510, in http_response 'http', request, response, code, msg, hdrs) File "urllib2.py", line 435, in error return self._call_chain(*args) File "urllib2.py", line 369, in _call_chain result = func(*args) File "urllib2.py", line 518, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 405: Method Not Allowed >>> import urllib; print urllib.urlopen('https://172.23.6.222/') # working > Other machine: hornisse:/usr/lib64 # cat /etc/SuSE-release openSUSE 11.4 (x86_64) VERSION = 11.4 CODENAME = Celadon hornisse:/usr/lib64 # rpm -q python python-2.7-9.40.1.x86_64 hornisse:/usr/lib64 # python Python 2.7 (r27:82500, Aug 07 2010, 16:54:59) [GCC] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import urllib2; print urllib2.urlopen('https://172.23.6.222/') # working > >>> import urllib; print urllib.urlopen('https://172.23.6.222/') # working > Sometimes the HTTP Error is a 400 Bad Request, but 99% of the time a 405. I've testet openSuSE 12.2 with python 2.7.3 too, not working. I don't know, what to provide more on information, please contact me, if you need more. ---------- messages: 171811 nosy: fertig priority: normal severity: normal status: open title: urllib2.urlopen throws HTTP Error in python 2.7.2, 2.7.3, but not in python 2.7 type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:27:11 2012 From: report at bugs.python.org (thbach) Date: Tue, 02 Oct 2012 15:27:11 +0000 Subject: [issue16110] Provide logging.config.configParserConfig Message-ID: <1349191631.16.0.42047016451.issue16110@psf.upfronthosting.co.za> New submission from thbach: Currently logging.config provides a fileConfig function which reads a ini-style file via configparser.ConfigParser. I would like to have a function e.g. configParserConfig which accepts a ConfigParser instance and configures logging directly from the settings found in there. The main reasons for this are: 1) I think it is rather common for an application that provides an interface to configure its logging via an ini file to use this ini file also for further application configuration. With the current implementation the file is read twice and ConfigParser is initialized two times. 2) Currently it is not idiomatic how to alter an ini-file configuration e.g. by options passed in via command-line. The new function provides a clear solution: create a ConfigParser instance, parse the ini file, alter the configuration and pass it on to logging.config.configParserConfig. In fact, the new functionality is easy to achieve by refactoring logging.config a bit (see attached patch). ---------- components: Library (Lib) files: configParserConfig.patch keywords: patch messages: 171812 nosy: thbach priority: normal severity: normal status: open title: Provide logging.config.configParserConfig Added file: http://bugs.python.org/file27386/configParserConfig.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:28:59 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 02 Oct 2012 15:28:59 +0000 Subject: [issue15888] ipaddress doctest examples have some errors In-Reply-To: <1347190349.96.0.156720503481.issue15888@psf.upfronthosting.co.za> Message-ID: <1349191739.38.0.543984625278.issue15888@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- assignee: docs at python -> chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 18:09:22 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 02 Oct 2012 16:09:22 +0000 Subject: [issue16110] Provide logging.config.configParserConfig In-Reply-To: <1349191631.16.0.42047016451.issue16110@psf.upfronthosting.co.za> Message-ID: <1349194162.51.0.0759797652835.issue16110@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +vinay.sajip type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 18:17:31 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Oct 2012 16:17:31 +0000 Subject: [issue14850] The inconsistency of codecs.charmap_decode In-Reply-To: <1349190315.05.0.52164524997.issue14850@psf.upfronthosting.co.za> Message-ID: <201210021916.57871.storchaka@gmail.com> Serhiy Storchaka added the comment: Patch updated to resolve conflict with issue15379. Added tests. Added patches for 3.2 and 2.7. ---------- Added file: http://bugs.python.org/file27387/decode_charmap_fffe-3.3.patch Added file: http://bugs.python.org/file27388/decode_charmap_fffe-3.2.patch Added file: http://bugs.python.org/file27389/decode_charmap_fffe-2.7.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r 5ddc7b3f2795 Lib/test/test_codecs.py --- a/Lib/test/test_codecs.py Tue Oct 02 12:54:07 2012 +0200 +++ b/Lib/test/test_codecs.py Tue Oct 02 19:07:20 2012 +0300 @@ -1701,6 +1701,10 @@ codecs.charmap_decode, b"\x00\x01\x02", "strict", "ab" ) + self.assertRaises(UnicodeDecodeError, + codecs.charmap_decode, b"\x00\x01\x02", "strict", "ab\ufffe" + ) + self.assertEqual( codecs.charmap_decode(b"\x00\x01\x02", "replace", "ab"), ("ab\ufffd", 3) @@ -1757,6 +1761,12 @@ {0: 'a', 1: 'b'} ) + # Issue #14850 + self.assertRaises(UnicodeDecodeError, + codecs.charmap_decode, b"\x00\x01\x02", "strict", + {0: 'a', 1: 'b', 3: '\ufffe'} + ) + self.assertEqual( codecs.charmap_decode(b"\x00\x01\x02", "replace", {0: 'a', 1: 'b'}), @@ -1769,6 +1779,13 @@ ("ab\ufffd", 3) ) + # Issue #14850 + self.assertEqual( + codecs.charmap_decode(b"\x00\x01\x02", "replace", + {0: 'a', 1: 'b', 2: '\ufffe'}), + ("ab\ufffd", 3) + ) + self.assertEqual( codecs.charmap_decode(b"\x00\x01\x02", "ignore", {0: 'a', 1: 'b'}), @@ -1781,6 +1798,13 @@ ("ab", 3) ) + # Issue #14850 + self.assertEqual( + codecs.charmap_decode(b"\x00\x01\x02", "ignore", + {0: 'a', 1: 'b', 2: '\ufffe'}), + ("ab", 3) + ) + allbytes = bytes(range(256)) self.assertEqual( codecs.charmap_decode(allbytes, "ignore", {}), @@ -1821,6 +1845,11 @@ {0: a, 1: b}, ) + self.assertRaises(UnicodeDecodeError, + codecs.charmap_decode, b"\x00\x01\x02", "strict", + {0: a, 1: b, 2: 0xFFFE}, + ) + self.assertEqual( codecs.charmap_decode(b"\x00\x01\x02", "replace", {0: a, 1: b}), @@ -1828,11 +1857,23 @@ ) self.assertEqual( + codecs.charmap_decode(b"\x00\x01\x02", "replace", + {0: a, 1: b, 2: 0xFFFE}), + ("ab\ufffd", 3) + ) + + self.assertEqual( codecs.charmap_decode(b"\x00\x01\x02", "ignore", {0: a, 1: b}), ("ab", 3) ) + self.assertEqual( + codecs.charmap_decode(b"\x00\x01\x02", "ignore", + {0: a, 1: b, 2: 0xFFFE}), + ("ab", 3) + ) + class WithStmtTest(unittest.TestCase): def test_encodedfile(self): diff -r 5ddc7b3f2795 Objects/unicodeobject.c --- a/Objects/unicodeobject.c Tue Oct 02 12:54:07 2012 +0200 +++ b/Objects/unicodeobject.c Tue Oct 02 19:07:20 2012 +0300 @@ -7516,15 +7516,18 @@ if (PyErr_ExceptionMatches(PyExc_LookupError)) { /* No mapping found means: mapping is undefined. */ PyErr_Clear(); - x = Py_None; - Py_INCREF(x); + goto Undefined; } else goto onError; } /* Apply mapping */ + if (x == Py_None) + goto Undefined; if (PyLong_Check(x)) { long value = PyLong_AS_LONG(x); + if (value == 0xFFFE) + goto Undefined; if (value < 0 || value > MAX_UNICODE) { PyErr_Format(PyExc_TypeError, "character mapping must be in range(0x%lx)", @@ -7535,21 +7538,6 @@ if (unicode_putchar(&v, &outpos, value) < 0) goto onError; } - else if (x == Py_None) { - /* undefined mapping */ - startinpos = s-starts; - endinpos = startinpos+1; - if (unicode_decode_call_errorhandler( - errors, &errorHandler, - "charmap", "character maps to ", - &starts, &e, &startinpos, &endinpos, &exc, &s, - &v, &outpos)) { - Py_DECREF(x); - goto onError; - } - Py_DECREF(x); - continue; - } else if (PyUnicode_Check(x)) { Py_ssize_t targetsize; @@ -7559,8 +7547,10 @@ if (targetsize == 1) { /* 1-1 mapping */ - if (unicode_putchar(&v, &outpos, - PyUnicode_READ_CHAR(x, 0)) < 0) + Py_UCS4 value = PyUnicode_READ_CHAR(x, 0); + if (value == 0xFFFE) + goto Undefined; + if (unicode_putchar(&v, &outpos, value) < 0) goto onError; } else if (targetsize > 1) { @@ -7595,6 +7585,19 @@ } Py_DECREF(x); ++s; + continue; +Undefined: + /* undefined mapping */ + Py_XDECREF(x); + startinpos = s-starts; + endinpos = startinpos+1; + if (unicode_decode_call_errorhandler( + errors, &errorHandler, + "charmap", "character maps to ", + &starts, &e, &startinpos, &endinpos, &exc, &s, + &v, &outpos)) { + goto onError; + } } } if (unicode_resize(&v, outpos) < 0) -------------- next part -------------- diff -r d5a4300702c1 Lib/test/test_codecs.py --- a/Lib/test/test_codecs.py Tue Oct 02 05:35:39 2012 +0300 +++ b/Lib/test/test_codecs.py Tue Oct 02 19:01:39 2012 +0300 @@ -1550,6 +1550,10 @@ codecs.charmap_decode, b"\x00\x01\x02", "strict", "ab" ) + self.assertRaises(UnicodeDecodeError, + codecs.charmap_decode, b"\x00\x01\x02", "strict", "ab\ufffe" + ) + self.assertEqual( codecs.charmap_decode(b"\x00\x01\x02", "replace", "ab"), ("ab\ufffd", 3) @@ -1606,6 +1610,12 @@ {0: 'a', 1: 'b'} ) + # Issue #14850 + self.assertRaises(UnicodeDecodeError, + codecs.charmap_decode, b"\x00\x01\x02", "strict", + {0: 'a', 1: 'b', 3: '\ufffe'} + ) + self.assertEqual( codecs.charmap_decode(b"\x00\x01\x02", "replace", {0: 'a', 1: 'b'}), @@ -1618,6 +1628,13 @@ ("ab\ufffd", 3) ) + # Issue #14850 + self.assertEqual( + codecs.charmap_decode(b"\x00\x01\x02", "replace", + {0: 'a', 1: 'b', 2: '\ufffe'}), + ("ab\ufffd", 3) + ) + self.assertEqual( codecs.charmap_decode(b"\x00\x01\x02", "ignore", {0: 'a', 1: 'b'}), @@ -1630,6 +1647,13 @@ ("ab", 3) ) + # Issue #14850 + self.assertEqual( + codecs.charmap_decode(b"\x00\x01\x02", "ignore", + {0: 'a', 1: 'b', 2: '\ufffe'}), + ("ab", 3) + ) + allbytes = bytes(range(256)) self.assertEqual( codecs.charmap_decode(allbytes, "ignore", {}), @@ -1664,6 +1688,11 @@ {0: a, 1: b}, ) + self.assertRaises(UnicodeDecodeError, + codecs.charmap_decode, b"\x00\x01\x02", "strict", + {0: a, 1: b, 2: 0xFFFE}, + ) + self.assertEqual( codecs.charmap_decode(b"\x00\x01\x02", "replace", {0: a, 1: b}), @@ -1671,11 +1700,23 @@ ) self.assertEqual( + codecs.charmap_decode(b"\x00\x01\x02", "replace", + {0: a, 1: b, 2: 0xFFFE}), + ("ab\ufffd", 3) + ) + + self.assertEqual( codecs.charmap_decode(b"\x00\x01\x02", "ignore", {0: a, 1: b}), ("ab", 3) ) + self.assertEqual( + codecs.charmap_decode(b"\x00\x01\x02", "ignore", + {0: a, 1: b, 2: 0xFFFE}), + ("ab", 3) + ) + class WithStmtTest(unittest.TestCase): def test_encodedfile(self): diff -r d5a4300702c1 Objects/unicodeobject.c --- a/Objects/unicodeobject.c Tue Oct 02 05:35:39 2012 +0300 +++ b/Objects/unicodeobject.c Tue Oct 02 19:01:39 2012 +0300 @@ -5241,15 +5241,18 @@ if (PyErr_ExceptionMatches(PyExc_LookupError)) { /* No mapping found means: mapping is undefined. */ PyErr_Clear(); - x = Py_None; - Py_INCREF(x); + goto Undefined; } else goto onError; } /* Apply mapping */ + if (x == Py_None) + goto Undefined; if (PyLong_Check(x)) { long value = PyLong_AS_LONG(x); + if (value == 0xFFFE) + goto Undefined; if (value < 0 || value > 0x10FFFF) { PyErr_SetString(PyExc_TypeError, "character mapping must be in range(0x110000)"); @@ -5282,29 +5285,16 @@ #endif *p++ = (Py_UNICODE)value; } - else if (x == Py_None) { - /* undefined mapping */ - outpos = p-PyUnicode_AS_UNICODE(v); - startinpos = s-starts; - endinpos = startinpos+1; - if (unicode_decode_call_errorhandler( - errors, &errorHandler, - "charmap", "character maps to ", - &starts, &e, &startinpos, &endinpos, &exc, &s, - &v, &outpos, &p)) { - Py_DECREF(x); - goto onError; - } - Py_DECREF(x); - continue; - } else if (PyUnicode_Check(x)) { Py_ssize_t targetsize = PyUnicode_GET_SIZE(x); - if (targetsize == 1) + if (targetsize == 1) { /* 1-1 mapping */ - *p++ = *PyUnicode_AS_UNICODE(x); - + Py_UNICODE value = *PyUnicode_AS_UNICODE(x); + if (value == 0xFFFE) + goto Undefined; + *p++ = value; + } else if (targetsize > 1) { /* 1-n mapping */ if (targetsize > extrachars) { @@ -5338,6 +5328,20 @@ } Py_DECREF(x); ++s; + continue; +Undefined: + /* undefined mapping */ + Py_XDECREF(x); + outpos = p-PyUnicode_AS_UNICODE(v); + startinpos = s-starts; + endinpos = startinpos+1; + if (unicode_decode_call_errorhandler( + errors, &errorHandler, + "charmap", "character maps to ", + &starts, &e, &startinpos, &endinpos, &exc, &s, + &v, &outpos, &p)) { + goto onError; + } } } if (p - PyUnicode_AS_UNICODE(v) < PyUnicode_GET_SIZE(v)) -------------- next part -------------- diff -r 60c831305e73 Lib/test/test_codecs.py --- a/Lib/test/test_codecs.py Tue Oct 02 05:34:38 2012 +0300 +++ b/Lib/test/test_codecs.py Tue Oct 02 19:10:22 2012 +0300 @@ -1519,6 +1519,14 @@ (u"abc", 3) ) + self.assertRaises(UnicodeDecodeError, + codecs.charmap_decode, "\x00\x01\x02", "strict", u"ab" + ) + + self.assertRaises(UnicodeDecodeError, + codecs.charmap_decode, "\x00\x01\x02", "strict", u"ab\ufffe" + ) + self.assertEqual( codecs.charmap_decode("\x00\x01\x02", "replace", u"ab"), (u"ab\ufffd", 3) @@ -1545,6 +1553,139 @@ (u"", len(allbytes)) ) + def test_decode_with_int2str_map(self): + self.assertEqual( + codecs.charmap_decode("\x00\x01\x02", "strict", + {0: u'a', 1: u'b', 2: u'c'}), + (u"abc", 3) + ) + + self.assertEqual( + codecs.charmap_decode("\x00\x01\x02", "strict", + {0: u'Aa', 1: u'Bb', 2: u'Cc'}), + (u"AaBbCc", 3) + ) + + self.assertEqual( + codecs.charmap_decode("\x00\x01\x02", "strict", + {0: u'\U0010FFFF', 1: u'b', 2: u'c'}), + (u"\U0010FFFFbc", 3) + ) + + self.assertEqual( + codecs.charmap_decode("\x00\x01\x02", "strict", + {0: u'a', 1: u'b', 2: u''}), + (u"ab", 3) + ) + + # Issue #14850 + self.assertRaises(UnicodeDecodeError, + codecs.charmap_decode, "\x00\x01\x02", "strict", + {0: u'a', 1: u'b', 3: u'\ufffe'} + ) + + self.assertEqual( + codecs.charmap_decode("\x00\x01\x02", "replace", + {0: u'a', 1: u'b'}), + (u"ab\ufffd", 3) + ) + + self.assertEqual( + codecs.charmap_decode("\x00\x01\x02", "replace", + {0: u'a', 1: u'b', 2: None}), + (u"ab\ufffd", 3) + ) + + # Issue #14850 + self.assertEqual( + codecs.charmap_decode("\x00\x01\x02", "replace", + {0: u'a', 1: u'b', 2: u'\ufffe'}), + (u"ab\ufffd", 3) + ) + + self.assertEqual( + codecs.charmap_decode("\x00\x01\x02", "ignore", + {0: u'a', 1: u'b'}), + (u"ab", 3) + ) + + self.assertEqual( + codecs.charmap_decode("\x00\x01\x02", "ignore", + {0: u'a', 1: u'b', 2: None}), + (u"ab", 3) + ) + + # Issue #14850 + self.assertEqual( + codecs.charmap_decode("\x00\x01\x02", "ignore", + {0: u'a', 1: u'b', 2: u'\ufffe'}), + (u"ab", 3) + ) + + allbytes = "".join(chr(i) for i in xrange(256)) + self.assertEqual( + codecs.charmap_decode(allbytes, "ignore", {}), + (u"", len(allbytes)) + ) + + def test_decode_with_int2int_map(self): + a = ord(u'a') + b = ord(u'b') + c = ord(u'c') + + self.assertEqual( + codecs.charmap_decode("\x00\x01\x02", "strict", + {0: a, 1: b, 2: c}), + (u"abc", 3) + ) + + # Issue #15379 + #self.assertEqual( + # codecs.charmap_decode("\x00\x01\x02", "strict", + # {0: 0x10FFFF, 1: b, 2: c}), + # (u"\U0010FFFFbc", 3) + #) + + self.assertRaises(TypeError, + codecs.charmap_decode, "\x00\x01\x02", "strict", + {0: 0x110000, 1: b, 2: c} + ) + + self.assertRaises(UnicodeDecodeError, + codecs.charmap_decode, "\x00\x01\x02", "strict", + {0: a, 1: b}, + ) + + self.assertRaises(UnicodeDecodeError, + codecs.charmap_decode, "\x00\x01\x02", "strict", + {0: a, 1: b, 2: 0xFFFE}, + ) + + self.assertEqual( + codecs.charmap_decode("\x00\x01\x02", "replace", + {0: a, 1: b}), + (u"ab\ufffd", 3) + ) + + self.assertEqual( + codecs.charmap_decode("\x00\x01\x02", "replace", + {0: a, 1: b, 2: 0xFFFE}), + (u"ab\ufffd", 3) + ) + + self.assertEqual( + codecs.charmap_decode("\x00\x01\x02", "ignore", + {0: a, 1: b}), + (u"ab", 3) + ) + + self.assertEqual( + codecs.charmap_decode("\x00\x01\x02", "ignore", + {0: a, 1: b, 2: 0xFFFE}), + (u"ab", 3) + ) + + class WithStmtTest(unittest.TestCase): def test_encodedfile(self): f = StringIO.StringIO("\xc3\xbc") diff -r 60c831305e73 Objects/unicodeobject.c --- a/Objects/unicodeobject.c Tue Oct 02 05:34:38 2012 +0300 +++ b/Objects/unicodeobject.c Tue Oct 02 19:10:22 2012 +0300 @@ -4118,15 +4118,18 @@ if (PyErr_ExceptionMatches(PyExc_LookupError)) { /* No mapping found means: mapping is undefined. */ PyErr_Clear(); - x = Py_None; - Py_INCREF(x); + goto Undefined; } else goto onError; } /* Apply mapping */ + if (x == Py_None) + goto Undefined; if (PyInt_Check(x)) { long value = PyInt_AS_LONG(x); + if (value == 0xFFFE) + goto Undefined; if (value < 0 || value > 65535) { PyErr_SetString(PyExc_TypeError, "character mapping must be in range(65536)"); @@ -4135,29 +4138,16 @@ } *p++ = (Py_UNICODE)value; } - else if (x == Py_None) { - /* undefined mapping */ - outpos = p-PyUnicode_AS_UNICODE(v); - startinpos = s-starts; - endinpos = startinpos+1; - if (unicode_decode_call_errorhandler( - errors, &errorHandler, - "charmap", "character maps to ", - starts, size, &startinpos, &endinpos, &exc, &s, - &v, &outpos, &p)) { - Py_DECREF(x); - goto onError; - } - Py_DECREF(x); - continue; - } else if (PyUnicode_Check(x)) { Py_ssize_t targetsize = PyUnicode_GET_SIZE(x); - if (targetsize == 1) + if (targetsize == 1) { /* 1-1 mapping */ - *p++ = *PyUnicode_AS_UNICODE(x); - + Py_UNICODE value = *PyUnicode_AS_UNICODE(x); + if (value == 0xFFFE) + goto Undefined; + *p++ = value; + } else if (targetsize > 1) { /* 1-n mapping */ if (targetsize > extrachars) { @@ -4191,6 +4181,20 @@ } Py_DECREF(x); ++s; + continue; +Undefined: + /* undefined mapping */ + Py_XDECREF(x); + outpos = p-PyUnicode_AS_UNICODE(v); + startinpos = s-starts; + endinpos = startinpos+1; + if (unicode_decode_call_errorhandler( + errors, &errorHandler, + "charmap", "character maps to ", + starts, size, &startinpos, &endinpos, &exc, &s, + &v, &outpos, &p)) { + goto onError; + } } } if (p - PyUnicode_AS_UNICODE(v) < PyUnicode_GET_SIZE(v)) From report at bugs.python.org Tue Oct 2 18:20:25 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Oct 2012 16:20:25 +0000 Subject: [issue14850] The inconsistency of codecs.charmap_decode In-Reply-To: <1337352396.54.0.468921009595.issue14850@psf.upfronthosting.co.za> Message-ID: <1349194825.51.0.992346289252.issue14850@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Unicode keywords: +needs review versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 18:39:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Oct 2012 16:39:26 +0000 Subject: [issue15379] Charmap decoding of no-BMP characters In-Reply-To: <1342512958.35.0.341191772548.issue15379@psf.upfronthosting.co.za> Message-ID: <1349195966.18.0.502941121255.issue15379@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: We forgot about 2.7 (because I had not thought to apply it even for a 3.2). Here is backported patch. ---------- status: closed -> open Added file: http://bugs.python.org/file27390/decode_charmap_maxchar-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 18:40:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Oct 2012 16:40:09 +0000 Subject: [issue15379] Charmap decoding of no-BMP characters In-Reply-To: <1342512958.35.0.341191772548.issue15379@psf.upfronthosting.co.za> Message-ID: <1349196009.11.0.411908422159.issue15379@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 18:45:24 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Oct 2012 16:45:24 +0000 Subject: [issue15490] Correct __sizeof__ support for StringIO In-Reply-To: <1343591617.54.0.289047671129.issue15490@psf.upfronthosting.co.za> Message-ID: <1349196323.99.0.713996743278.issue15490@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 18:47:11 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Oct 2012 16:47:11 +0000 Subject: [issue15475] Correct __sizeof__ support for itertools In-Reply-To: <1343418242.58.0.256146467281.issue15475@psf.upfronthosting.co.za> Message-ID: <1349196431.74.0.465450276365.issue15475@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 18:47:33 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Oct 2012 16:47:33 +0000 Subject: [issue15696] Correct __sizeof__ support for mmap In-Reply-To: <1345145499.47.0.489635799937.issue15696@psf.upfronthosting.co.za> Message-ID: <1349196453.77.0.48062858584.issue15696@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 18:47:54 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Oct 2012 16:47:54 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1349196474.25.0.358384445084.issue3982@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In 3.3+, somestring.encode('ascii') is a small constant-time operation. So for pure ascii *text* bytes, that seems the appropriate 3.x approach. I agree that something else should be used for binary formatting. Perhaps struct.pack could be extended to work with variable-length data the way I thought it already did. Otherwise, it already *is* the binary formatting method. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 18:48:58 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 02 Oct 2012 16:48:58 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1349196538.61.0.794344726345.issue3982@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It's not constant time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 19:00:19 2012 From: report at bugs.python.org (Ronny Pfannschmidt) Date: Tue, 02 Oct 2012 17:00:19 +0000 Subject: [issue14161] python2 file __repr__ does not escape filename In-Reply-To: <1330533810.56.0.673512322833.issue14161@psf.upfronthosting.co.za> Message-ID: <1349197219.8.0.7097504502.issue14161@psf.upfronthosting.co.za> Ronny Pfannschmidt added the comment: wtf? you made it possible to return NULL in some case ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 19:10:08 2012 From: report at bugs.python.org (Ronny Pfannschmidt) Date: Tue, 02 Oct 2012 17:10:08 +0000 Subject: [issue14161] python2 file __repr__ does not escape filename In-Reply-To: <1330533810.56.0.673512322833.issue14161@psf.upfronthosting.co.za> Message-ID: <1349197808.21.0.149258156377.issue14161@psf.upfronthosting.co.za> Ronny Pfannschmidt added the comment: sorry for the buzz, i got myself up to date on the c api now why is there still the unicode case? the PyObject_Repr variant should work fine in both cases ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 19:21:16 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 02 Oct 2012 17:21:16 +0000 Subject: [issue16109] urllib2.urlopen throws HTTP Error in python 2.7.2, 2.7.3, but not in python 2.7 In-Reply-To: <1349190908.23.0.357086619983.issue16109@psf.upfronthosting.co.za> Message-ID: <1349198476.05.0.570467762493.issue16109@psf.upfronthosting.co.za> R. David Murray added the comment: That's a non-public IP, so you'll have to provide a trace of the http traffic. It is likely the error is correct, and is reported only post 2.7.0 because a bug was fixed. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 20:16:20 2012 From: report at bugs.python.org (Ganesh R.) Date: Tue, 02 Oct 2012 18:16:20 +0000 Subject: [issue16111] Python 2.7.3 Windows MSI installer installs the VC++ 9 dlls directly to WinSxS folder Message-ID: <1349201780.49.0.563700308951.issue16111@psf.upfronthosting.co.za> New submission from Ganesh R.: Python 2.7.3 Windows MSI installer installs the VC++ 9 dlls directly to WinSxS folder. The recommended way to distribute VC++ dlls is to either install the VC++ Redistributable as a pre-requisite or just add the dll to local folder. Directly installing the VC++ dlls to the WinSxS is not a recommended practice and can lead to problems. I am not sure if it even checks if the dll is present in the WinSxS folder. The dll shipped with Python is the RTM version. SP1 and later many security fixes were released by Microsoft. But python has not upgraded the dll. Also many machines have VC++ already installed and of higher version. So there is a manifest file that redirects all requests to a newer version. So adding an older file is futile. ---------- components: Installation messages: 171820 nosy: freaksterrao priority: normal severity: normal status: open title: Python 2.7.3 Windows MSI installer installs the VC++ 9 dlls directly to WinSxS folder type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 20:31:58 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Oct 2012 18:31:58 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1349202718.42.0.158323486985.issue3982@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Sorry, I was thinking of something else. Encoding ascii-only text is merely much faster (3x?) than in 3.2- because it directly copies without using the codec. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 20:39:42 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Oct 2012 18:39:42 +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: <1349203182.71.0.0113218532994.issue16101@psf.upfronthosting.co.za> Antoine Pitrou added the comment: These are not dependencies, though. ---------- dependencies: -Speedup sysconfig startup, locale can be imported at startup but relies on too many library modules nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 20:40:42 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Oct 2012 18:40:42 +0000 Subject: [issue16106] antigravity tests In-Reply-To: <1349134601.26.0.544681268044.issue16106@psf.upfronthosting.co.za> Message-ID: <1349203242.79.0.643781946358.issue16106@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm not sure why we would test undocumented jokes... Do other Python implementations have to provide them too? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 20:49:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Oct 2012 18:49:55 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1349202718.42.0.158323486985.issue3982@psf.upfronthosting.co.za> Message-ID: <201210022149.36187.storchaka@gmail.com> Serhiy Storchaka added the comment: > Sorry, I was thinking of something else. Encoding ascii-only text is merely > much faster (3x?) than in 3.2- because it directly copies without using > the codec. In 3.3 encoding to ascii or latin1 as fast as memcpy. 12-15x on my computer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 21:15:17 2012 From: report at bugs.python.org (David Benjamin) Date: Tue, 02 Oct 2012 19:15:17 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file Message-ID: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> New submission from David Benjamin: The implementation of platform.architecture shells out to the file command. It tries to escape quotes by replacing " with \", but that's not sufficient. $ python3.2 -c 'import platform; platform.architecture("foo\\\"; echo Hi there > /tmp/Z; echo \\\"")' && cat /tmp/Z Hi there Here's a patch to make it use subprocess instead. I haven't tested it thoroughly building everything from trunk and running tests, but I verified it works by replacing the platform.py in my system Python install. ---------- components: Library (Lib) files: fix-platform-architecture.patch keywords: patch messages: 171825 nosy: David.Benjamin priority: normal severity: normal status: open title: platform.architecture does not correctly escape argument to /usr/bin/file type: security versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file27391/fix-platform-architecture.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 21:19:08 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 02 Oct 2012 19:19:08 +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: <1349205548.07.0.809731032675.issue6322@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Another example where pdb does not stop at breakpoints set at global, else and finally statements: $ nl -ba foo.py 1 x = 1 2 def main(): 3 global x 4 try: 5 if not x: 6 x = 2 7 else: 8 x = 3 9 finally: 10 x = 4 11 12 if __name__ == "__main__": 13 main() 14 print(x) 15 $ python3 -m pdb foo.py > /path_to/foo.py(1)() -> x = 1 (Pdb) break 3 Breakpoint 1 at /path_to/foo.py:3 (Pdb) break 7 Breakpoint 2 at /path_to/foo.py:7 (Pdb) break 9 Breakpoint 3 at /path_to/foo.py:9 (Pdb) break 14 Breakpoint 4 at /path_to/foo.py:14 (Pdb) continue > /path_to/foo.py(14)() -> print(x) (Pdb) ============== vim:sts=2:sw=2 ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 21:23:41 2012 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 02 Oct 2012 19:23:41 +0000 Subject: [issue16110] Provide logging.config.configParserConfig In-Reply-To: <1349191631.16.0.42047016451.issue16110@psf.upfronthosting.co.za> Message-ID: <1349205821.41.0.139007188615.issue16110@psf.upfronthosting.co.za> Vinay Sajip added the comment: Thanks for the suggestion - I'm sorry, but I'm not inclined to add this. My reasoning is as follows: 1. I want to encourage usage of the dictConfig() API, as fileConfig() does not cover as much of the logging API as dictConfig() does (for example, Filters). I'd like to minimise the maintenance I have to do for fileConfig()-related code, and would prefer not to add any auxiliary APIs around fileConfig(). 2. The file reading time and ConfigParser instantiation time are not likely to be a performance problem in practice, as logging configuration is an infrequent operation (a one-off operation in most cases). 3. You can also pass in a file-like object rather than a filename, and in that case, fileConfig() will use readfp() if available. While you might have to seek to the beginning of the file to pass it to another ConfigParser instance, that is likely to be just a pointer adjustment in a buffer rather than actual disk I/O (config files are usually pretty small). I hope you will agree. I'll leave the issue as pending for now, and close it in a day or two. ---------- assignee: -> vinay.sajip resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 21:31:48 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 02 Oct 2012 19:31:48 +0000 Subject: [issue16110] Provide logging.config.configParserConfig In-Reply-To: <1349191631.16.0.42047016451.issue16110@psf.upfronthosting.co.za> Message-ID: <1349206308.61.0.484583935745.issue16110@psf.upfronthosting.co.za> R. David Murray added the comment: Vinay, you missed one use case in his request: reading the program's configuration, *modifying it* (based on command line args), and then passing it to logging. How would you suggest he handle that use case? Is there an easy way to get from a loaded configuration file to a dictionary for use in dictConfig? ---------- nosy: +r.david.murray status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 21:53:31 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Oct 2012 19:53:31 +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: <1349207611.21.0.617660032812.issue16089@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch. It still needs some tests. ---------- title: _elementtree causes segfault in GC -> _elementtree.TreeBuilder broken with a non-C-deriving element_factory Added file: http://bugs.python.org/file27392/c_treebuilder.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 22:07:20 2012 From: report at bugs.python.org (Carsten Klein) Date: Tue, 02 Oct 2012 20:07:20 +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: <1349208440.26.0.911988493321.issue12370@psf.upfronthosting.co.za> Carsten Klein added the comment: The change was introduced in r30 (Python/symtable.c @ near where it reads /* Special-case super: it counts as a use of __class__ */) which now enforces that a class that calls super on init will have the correct class information present. I do not think that this is a bug and that it should be fixed. Instead it enforces both type safety in respect to classes deriving from a given class hierarchy being forced to report their actual class instead of some fabricated and customly induced one. If you require such behaviour then you should implement your own meta class that will then override the __class__ property. And, yes, I do think that Python < 3.0 was wrong in the assumption that one could build up class hierarchies and then break out of that class hierarchy by simply providing a __class__ property that would return a different value as what one would expected. What do the others think? ---------- nosy: +carsten.klein at axn-software.de _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 22:13:51 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Oct 2012 20:13:51 +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: <1349208831.64.0.672070662417.issue16089@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Updated patch with tests. ---------- stage: needs patch -> patch review Added file: http://bugs.python.org/file27393/c_treebuilder2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 23:23:28 2012 From: report at bugs.python.org (Mark Shannon) Date: Tue, 02 Oct 2012 21:23:28 +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: <1349213008.01.0.972418718258.issue12370@psf.upfronthosting.co.za> Mark Shannon added the comment: There seems to be an ongoing confusion about scopes on this thread. The __class__ variable used by super() is a non-local variable in the scope of any function using super(), whereas the __class__ used to define the type of an object is a class attribute like any other special attribute e.g. __add__. The cause of the bug is presumably that the (ast-to-bytecode) compiler fails to differentiate the scopes. See below for (rather ugly) code which correctly implements the example class presented by Micheal. class X(object): @property def __class__(self): return int class Y def __init__(self): super(X, self).__init__() X.__init__ = Y.__init__ del Y print (isinstance(X(), int)) >>> X.__init__.__code__.co_freevars[0] '__class__' >>> X.__dict__['__class__'] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 23:38:11 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Tue, 02 Oct 2012 21:38:11 +0000 Subject: [issue16106] antigravity tests In-Reply-To: <1349134601.26.0.544681268044.issue16106@psf.upfronthosting.co.za> Message-ID: <1349213891.47.0.934170374841.issue16106@psf.upfronthosting.co.za> Changes by Michele Orr? : ---------- nosy: +maker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 23:54:19 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 02 Oct 2012 21:54:19 +0000 Subject: [issue15897] zipimport.c doesn't check return value of fseek() In-Reply-To: <1347235718.45.0.529510656833.issue15897@psf.upfronthosting.co.za> Message-ID: <1349214859.65.0.643762813668.issue15897@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: I think this patch must be applied too to 2.7 and 3.2. Felipe, you are using "%R" modifier, but that modifier doesn't exist in Solaris, for instance. This seems to be a Linux specific option, I don't know what it does. Also, you should be sure not to overflow the 500 bytes internal buffer. You can use a size limit in the format string. ---------- versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 00:25:41 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Oct 2012 22:25:41 +0000 Subject: [issue15897] zipimport.c doesn't check return value of fseek() In-Reply-To: <1347235718.45.0.529510656833.issue15897@psf.upfronthosting.co.za> Message-ID: <1349216741.46.0.781207027758.issue15897@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Jesus, please read the PyErr_Format() documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 00:29:38 2012 From: report at bugs.python.org (Felipe Cruz) Date: Tue, 02 Oct 2012 22:29:38 +0000 Subject: [issue15897] zipimport.c doesn't check return value of fseek() In-Reply-To: <1347235718.45.0.529510656833.issue15897@psf.upfronthosting.co.za> Message-ID: <1349216978.3.0.627418540286.issue15897@psf.upfronthosting.co.za> Felipe Cruz added the comment: Should I send patches for 3.2 and 2.7? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 00:39:29 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 02 Oct 2012 22:39:29 +0000 Subject: [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <3XWZzg3BXqzQcN@mail.python.org> Roundup Robot added the comment: New changeset 3a0acdc25cca by Alexander Belopolsky in branch 'default': Issue #9650: List commonly used format codes in time.strftime and time.strptime docsttings. http://hg.python.org/cpython/rev/3a0acdc25cca ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 00:50:11 2012 From: report at bugs.python.org (Michael Foord) Date: Tue, 02 Oct 2012 22:50:11 +0000 Subject: [issue11798] Test cases not garbage collected after run In-Reply-To: <1302192957.51.0.450503345302.issue11798@psf.upfronthosting.co.za> Message-ID: <1349218211.38.0.489037540147.issue11798@psf.upfronthosting.co.za> Michael Foord added the comment: The patch looks good to me, although there probably needs to be a note in the TestSuite docs too. I'll apply this to Python 3.4, which leaves plenty of time for people to object. Note that people needing the old behaviour can subclass TestSuite and provide a dummy implementation of _removeTestAtIndex. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 00:58:57 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 02 Oct 2012 22:58:57 +0000 Subject: [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <1349218737.49.0.915744947879.issue9650@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 01:49:51 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 02 Oct 2012 23:49:51 +0000 Subject: [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <1349221791.76.0.322325846279.issue9650@psf.upfronthosting.co.za> ?ric Araujo added the comment: Christian, did you ask on python-dev about your idea? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 01:54:08 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 02 Oct 2012 23:54:08 +0000 Subject: [issue15897] zipimport.c doesn't check return value of fseek() In-Reply-To: <1347235718.45.0.529510656833.issue15897@psf.upfronthosting.co.za> Message-ID: <1349222048.53.0.477519444571.issue15897@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Antoine, I was reading the documentation of Python 2.7. It doesn't support %R. Felipe, Python 2.7 has direct access to the path. You can print it directly, in this case. I will take care of this. ---------- assignee: -> jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 02:03:52 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 03 Oct 2012 00:03:52 +0000 Subject: [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <1349222632.14.0.584918251987.issue9650@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Christian's or rather Skip's idea is covered by Issue 3173. This was discussed several times on python-dev. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 02:05:09 2012 From: report at bugs.python.org (Brian Curtin) Date: Wed, 03 Oct 2012 00:05:09 +0000 Subject: [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <1349222709.2.0.0547238548266.issue9650@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 02:05:48 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Oct 2012 00:05:48 +0000 Subject: [issue16105] Pass read only FD to signal.set_wakeup_fd In-Reply-To: <1349125559.77.0.651840030069.issue16105@psf.upfronthosting.co.za> Message-ID: <1349222748.82.0.384335795622.issue16105@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > The problem is that it's called from the signal handler, so there's not > much we can do here (and certainly not log a warning or raise an > exception). However, I think the errno could be passed via the "void *" argument to Py_AddPendingCall. Then checksignals_witharg can raise an error if the received errno is non-zero. I agree with Felipe that issues here can be difficult to diagnose. For example the fd could get mistakingly closed, but the write() EBADF would then be ignored and the expected signal wakeups would be lost. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 03:03:00 2012 From: report at bugs.python.org (suddha sourav) Date: Wed, 03 Oct 2012 01:03:00 +0000 Subject: [issue15786] IDLE code completion window does not scoll/select with mouse In-Reply-To: <1346460975.88.0.0495464503465.issue15786@psf.upfronthosting.co.za> Message-ID: suddha sourav added the comment: I would like to let you know that the issue also persists for Windows 8 Pro RTM. Has anything been decided on this bug? On Fri, Aug 31, 2012 at 5:56 PM, Terry J. Reedy wrote: > > Changes by Terry J. Reedy : > > > ---------- > nosy: +serwy, terry.reedy > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 03:04:03 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Oct 2012 01:04:03 +0000 Subject: [issue15897] zipimport.c doesn't check return value of fseek() In-Reply-To: <1347235718.45.0.529510656833.issue15897@psf.upfronthosting.co.za> Message-ID: <3XWfBV0ftBzQnp@mail.python.org> Roundup Robot added the comment: New changeset 39e608d462b6 by Jesus Cea in branch '2.7': Closes #15897: zipimport.c doesn't check return value of fseek() http://hg.python.org/cpython/rev/39e608d462b6 New changeset 4da48083aaab by Jesus Cea in branch '3.2': Closes #15897: zipimport.c doesn't check return value of fseek() http://hg.python.org/cpython/rev/4da48083aaab New changeset 0f1637c4d673 by Jesus Cea in branch '3.3': MERGE: Closes #15897: zipimport.c doesn't check return value of fseek() http://hg.python.org/cpython/rev/0f1637c4d673 New changeset ad63e5246306 by Jesus Cea in branch 'default': MERGE: Closes #15897: zipimport.c doesn't check return value of fseek() http://hg.python.org/cpython/rev/ad63e5246306 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 03:07:52 2012 From: report at bugs.python.org (Chris Rebert) Date: Wed, 03 Oct 2012 01:07:52 +0000 Subject: [issue3173] external strftime for Python? In-Reply-To: <1214189093.82.0.548435251403.issue3173@psf.upfronthosting.co.za> Message-ID: <1349226472.15.0.0891842553719.issue3173@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 03:16:00 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 03 Oct 2012 01:16:00 +0000 Subject: [issue15897] zipimport.c doesn't check return value of fseek() In-Reply-To: <1347235718.45.0.529510656833.issue15897@psf.upfronthosting.co.za> Message-ID: <1349226960.67.0.378484637971.issue15897@psf.upfronthosting.co.za> Christian Heimes added the comment: You broke the build of 3.2: ./Modules/zipimport.c: In function 'read_directory': ./Modules/zipimport.c:747:65: error: 'archive' undeclared (first use in this function) ./Modules/zipimport.c:747:65: note: each undeclared identifier is reported only once for each function it appears in make: *** [Modules/zipimport.o] Error 1 ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 03:19:11 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Oct 2012 01:19:11 +0000 Subject: [issue15897] zipimport.c doesn't check return value of fseek() In-Reply-To: <1347235718.45.0.529510656833.issue15897@psf.upfronthosting.co.za> Message-ID: <3XWfWz12c3zNbq@mail.python.org> Roundup Robot added the comment: New changeset 0f4d4f4db724 by Jesus Cea in branch '3.2': Closes #15897: zipimport.c doesn't check return value of fseek(). Typo http://hg.python.org/cpython/rev/0f4d4f4db724 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 03:37:30 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 03 Oct 2012 01:37:30 +0000 Subject: [issue16094] Tuple extraction in a lambda isn't supported by 2to3 In-Reply-To: <1349003232.56.0.742514252911.issue16094@psf.upfronthosting.co.za> Message-ID: <1349228250.77.0.382224737047.issue16094@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Not pretty :-) IMO, we're better off leaving 2-to-3 without an automated conversion for this and people will just have to stop using the feature in their 2.7 code. We could add a -3 warning in Py2.7 to flag code that needs to be changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 03:55:11 2012 From: report at bugs.python.org (Felipe Cruz) Date: Wed, 03 Oct 2012 01:55:11 +0000 Subject: [issue16105] Pass read only FD to signal.set_wakeup_fd In-Reply-To: <1349125559.77.0.651840030069.issue16105@psf.upfronthosting.co.za> Message-ID: <1349229311.2.0.102810982131.issue16105@psf.upfronthosting.co.za> Felipe Cruz added the comment: Hello, since Antonie mentioned Py_AddPendingCall I came up with a patch describing what he proposed. Let me know if this patch can be improved or discarded(if the problem requires a more sophisticated solution). In case of improvement I can also submit another patch with a test case. ---------- keywords: +patch Added file: http://bugs.python.org/file27394/issue16105_v1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 04:19:42 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 03 Oct 2012 02:19:42 +0000 Subject: [issue16106] antigravity tests In-Reply-To: <1349134601.26.0.544681268044.issue16106@psf.upfronthosting.co.za> Message-ID: <1349230782.42.0.279670633543.issue16106@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 04:34:30 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 03 Oct 2012 02:34:30 +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: <1349231670.92.0.887953838366.issue16076@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea priority: high -> normal stage: needs patch -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 04:35:07 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 03 Oct 2012 02:35:07 +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: <1349231707.41.0.5593480375.issue16076@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- priority: normal -> high stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 04:37:55 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 03 Oct 2012 02:37:55 +0000 Subject: [issue15989] Possible integer overflow of PyLong_AsLong() results In-Reply-To: <1348167705.87.0.588220983695.issue15989@psf.upfronthosting.co.za> Message-ID: <1349231875.87.0.594321556634.issue15989@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 05:10:04 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 03 Oct 2012 03:10:04 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support Message-ID: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> New submission from Christian Heimes: Today the latest crypto hash function was announced by NIST [1]. I suggest that we include the new hash algorithm in 3.4 once it lands in OpenSSL. The Keccak site also has a reference implementation in C and Assembler [2]. It may take some effort to integrate the reference implementation as it contains several optimized backends for X86, X86_64, SIMD and various ARM platforms. [1] http://www.nist.gov/itl/csd/sha-100212.cfm [2] http://keccak.noekeon.org/ ---------- components: Extension Modules messages: 171848 nosy: christian.heimes priority: normal severity: normal status: open title: Add SHA-3 (Keccak) support type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 05:16:47 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 03 Oct 2012 03:16:47 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349234207.64.0.445245710395.issue16113@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 05:19:04 2012 From: report at bugs.python.org (Roger Serwy) Date: Wed, 03 Oct 2012 03:19:04 +0000 Subject: [issue15786] IDLE code completion window does not scoll/select with mouse In-Reply-To: <1346027701.33.0.908436854594.issue15786@psf.upfronthosting.co.za> Message-ID: <1349234344.75.0.397143451917.issue15786@psf.upfronthosting.co.za> Roger Serwy added the comment: I can confirm that the existing behavior of IDLE prohibits clicking on the scroll bar on Windows (but not Linux). Clicking on an item in the window closes it without actually selecting the clicked item. This is true on both Windows and Linux. On Windows, the event is generated when selecting the completion window, causing it to close. On Linux with Gnome3.4, the scroll bar is clickable without closing the window. By removing "" from HIDE_SEQUENCES in AutoCompleteWindow.py, the completion window can now take focus. However, the completion window will need some work since key presses in the focused window doesn't change the text selection. ---------- stage: -> needs patch type: -> behavior versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 06:16:47 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 03 Oct 2012 04:16:47 +0000 Subject: [issue16114] incorrect path in subprocess.Popen() FileNotFoundError message Message-ID: <1349237807.22.0.592724343556.issue16114@psf.upfronthosting.co.za> New submission from Chris Jerdonek: The error message in the FileNotFoundError error raised by subprocess.Popen() displays the wrong path when the bad path is due to the executable argument rather than args. The message gives the path for args[0] rather than for the executable argument. For example, this-- import subprocess, sys python_path = sys.executable p = subprocess.Popen([python_path, "-c", "import sys; sys.exit(1)"]) p.wait() p = subprocess.Popen([python_path, "-c", "import sys; sys.exit(1)"], executable="foo") p.wait() gives-- Traceback (most recent call last): File "test-subprocess.py", line 6, in executable="foo") File ".../Lib/subprocess.py", line 818, in __init__ restore_signals, start_new_session) File ".../Lib/subprocess.py", line 1416, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: '.../python.exe' The path in the last line should read "foo" since '.../python.exe' is obviously found as evidenced from the previous Popen() invocation. ---------- components: Library (Lib) messages: 171850 nosy: asvetlov, chris.jerdonek priority: normal severity: normal stage: test needed status: open title: incorrect path in subprocess.Popen() FileNotFoundError message type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 06:18:55 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 03 Oct 2012 04:18:55 +0000 Subject: [issue16114] incorrect path in subprocess.Popen() FileNotFoundError message In-Reply-To: <1349237807.22.0.592724343556.issue16114@psf.upfronthosting.co.za> Message-ID: <1349237935.32.0.910171452683.issue16114@psf.upfronthosting.co.za> Chris Jerdonek added the comment: 2.7 is not affected because 2.7 makes no attempt to display the path: OSError: [Errno 2] No such file or directory ---------- versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 06:40:11 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 03 Oct 2012 04:40:11 +0000 Subject: [issue16114] incorrect path in subprocess.Popen() FileNotFoundError message In-Reply-To: <1349237807.22.0.592724343556.issue16114@psf.upfronthosting.co.za> Message-ID: <1349239211.08.0.918848165288.issue16114@psf.upfronthosting.co.za> Chris Jerdonek added the comment: It looks like the error is here: if issubclass(child_exception_type, OSError) and hex_errno: errno_num = int(hex_errno, 16) if errno_num != 0: err_msg = os.strerror(errno_num) if errno_num == errno.ENOENT: err_msg += ': ' + repr(args[0]) raise child_exception_type(errno_num, err_msg) raise child_exception_type(err_msg) http://hg.python.org/cpython/file/b40025e37bcd/Lib/subprocess.py#l1415 The "args[0]" should be "executable" when appropriate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 07:43:28 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 03 Oct 2012 05:43:28 +0000 Subject: [issue16105] Pass read only FD to signal.set_wakeup_fd In-Reply-To: <1349229311.2.0.102810982131.issue16105@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > since Antonie mentioned Py_AddPendingCall I came up with a patch describing what he proposed. > > Let me know if this patch can be improved or discarded(if the problem requires a more sophisticated solution). In case of improvement I can also submit another patch with a test case. Why limit to EBADF? You could also have EPIPE, EINVAL and many other errors. The only error you may not want to report is EAGAIN. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 07:51:51 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 03 Oct 2012 05:51:51 +0000 Subject: [issue16105] Pass read only FD to signal.set_wakeup_fd In-Reply-To: <1349222748.82.0.384335795622.issue16105@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > I agree with Felipe that issues here can be difficult to diagnose. For example the fd could get mistakingly closed, but the write() EBADF would then be ignored and the expected signal wakeups would be lost. Yeah, but it's also completely possible that the saved fd now points to another file descriptor, and you end up corrupting a file, without getting any error at all, and not getting signal wakeups. This API is really fragile and dangerous, and warrants care anyway... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 08:14:04 2012 From: report at bugs.python.org (GOGER Valentin Eugen) Date: Wed, 03 Oct 2012 06:14:04 +0000 Subject: [issue15963] Improve ./configure's support for 32/64-bit debug|release|profiled builds w/ vendor (non-gcc) compilers on proprietary UNIX systems (Solaris/HP-UX/AIX et al). In-Reply-To: <1347975635.66.0.0788814924298.issue15963@psf.upfronthosting.co.za> Message-ID: <1349244844.07.0.825034982511.issue15963@psf.upfronthosting.co.za> GOGER Valentin Eugen added the comment: Hello On AIX 64bit (see http://bugs.python.org/issue6600) you should add in CFLAGS -U__STR__ to bypass xlc(_r) define/inlining issue. ---------- nosy: +gix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 08:14:20 2012 From: report at bugs.python.org (GOGER Valentin Eugen) Date: Wed, 03 Oct 2012 06:14:20 +0000 Subject: [issue15963] Improve ./configure's support for 32/64-bit debug|release|profiled builds w/ vendor (non-gcc) compilers on proprietary UNIX systems (Solaris/HP-UX/AIX et al). In-Reply-To: <1347975635.66.0.0788814924298.issue15963@psf.upfronthosting.co.za> Message-ID: <1349244860.3.0.769443018366.issue15963@psf.upfronthosting.co.za> Changes by GOGER Valentin Eugen : ---------- versions: +Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 08:19:47 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 03 Oct 2012 06:19:47 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args[0] arg Message-ID: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> New submission from Chris Jerdonek: The executable argument to Popen() takes precedence over args[0] when the executable argument is provided. The test suite should include a test of this that runs on all systems. The test suite does not currently include such a test. This test is a precursor to more specific, platform-specific tests that will be added for issue 16114. ---------- assignee: chris.jerdonek components: Library (Lib) keywords: easy messages: 171856 nosy: asvetlov, chris.jerdonek priority: normal severity: normal stage: test needed status: open title: test that executable arg to Popen() takes precedence over args[0] arg versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 08:23:32 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 03 Oct 2012 06:23:32 +0000 Subject: [issue16114] incorrect path in subprocess.Popen() FileNotFoundError message In-Reply-To: <1349237807.22.0.592724343556.issue16114@psf.upfronthosting.co.za> Message-ID: <1349245412.17.0.00584568601207.issue16114@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Adding issue 16115 as a dependency so that the more general case can be settled and committed before dealing with the current issue's more specific (and platform-specific) case. ---------- dependencies: +test that executable arg to Popen() takes precedence over args[0] arg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 08:48:36 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Oct 2012 06:48:36 +0000 Subject: [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <3XWnr40M06zNmP@mail.python.org> Roundup Robot added the comment: New changeset 662fb4bd5f84 by Nick Coghlan in branch '2.7': Issue #12947: Add a note to doctest until the example rendering is fixed http://hg.python.org/cpython/rev/662fb4bd5f84 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 08:52:30 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Oct 2012 06:52:30 +0000 Subject: [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <3XWnwZ0gMlzNw3@mail.python.org> Roundup Robot added the comment: New changeset 679b3e3aadae by Nick Coghlan in branch '3.3': Issue #12947: Add a note to doctest until the example rendering is fixed http://hg.python.org/cpython/rev/679b3e3aadae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 08:54:31 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 03 Oct 2012 06:54:31 +0000 Subject: [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349247270.99.0.264031910818.issue12947@psf.upfronthosting.co.za> Nick Coghlan added the comment: Since the status quo is thoroughly confusing for readers, I added an explicit note before the affected examples. That note should be removed once the rendering problem is fixed. (The note is there on trunk as well, I just forgot to include the issue number in the merge commit) ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 09:04:53 2012 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Oct 2012 07:04:53 +0000 Subject: [issue16105] Pass read only FD to signal.set_wakeup_fd In-Reply-To: Message-ID: STINNER Victor added the comment: A signal handler can be called anymore, anywhere. How do you handle such exception in an application? "handle": do something better than exit the apllication. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 09:12:21 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 03 Oct 2012 07:12:21 +0000 Subject: [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349248341.77.0.520955737495.issue12947@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I thought of an easy work-around we can use after looking at the changeset Terry referenced above: > [2] https://bitbucket.org/birkenfeld/sphinx/changeset/d91bf8e465ef At the expense of pretty color highlighting, we can enable Pygments' TextLexer for the affected examples (aka "null" lexer). For example-- .. code-block:: text >>> raise CustomError('message') #doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): CustomError: message I confirmed locally that this works. I realized this might work because the Sphinx changeset referenced above has this logic: # trim doctest options if wanted if isinstance(lexer, PythonConsoleLexer) and self.trim_doctest_flags: ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 09:16:10 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Wed, 03 Oct 2012 07:16:10 +0000 Subject: [issue13290] get vars for object with __slots__ In-Reply-To: <1319871850.77.0.869546838833.issue13290@psf.upfronthosting.co.za> Message-ID: <1349248570.43.0.978067671045.issue13290@psf.upfronthosting.co.za> Michele Orr? added the comment: Patch + unittests + documentation attached. $ ./python -m test -R 3:2 test_builtin [1/1] test_builtin beginning 5 repetitions 12345 ..... 1 test OK. [158296 refs] ---------- keywords: +patch nosy: +maker Added file: http://bugs.python.org/file27395/issue13290.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 09:35:40 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 03 Oct 2012 07:35:40 +0000 Subject: [issue16114] incorrect path in subprocess.Popen() FileNotFoundError message In-Reply-To: <1349237807.22.0.592724343556.issue16114@psf.upfronthosting.co.za> Message-ID: <1349249740.33.0.356632500361.issue16114@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching proposed tests. ---------- keywords: +patch stage: test needed -> needs patch Added file: http://bugs.python.org/file27396/issue-16114-1-tests-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 09:55:01 2012 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Oct 2012 07:55:01 +0000 Subject: [issue16105] Pass read only FD to signal.set_wakeup_fd In-Reply-To: Message-ID: STINNER Victor added the comment: > A signal handler can be called anymore, anywhere. Oopos: anywhere/anytime. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:18:27 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Oct 2012 08:18:27 +0000 Subject: [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <3XWqqk5x3YzNkh@mail.python.org> Roundup Robot added the comment: New changeset 18d927fb8671 by Nick Coghlan in branch '2.7': Issue #12947: Better workaround for the problem with doctest directives being stripped from code examples that are intended to illustrate those directives http://hg.python.org/cpython/rev/18d927fb8671 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:21:02 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Oct 2012 08:21:02 +0000 Subject: [issue13290] get vars for object with __slots__ In-Reply-To: <1319871850.77.0.869546838833.issue13290@psf.upfronthosting.co.za> Message-ID: <1349252462.95.0.38962259472.issue13290@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I?added some comments in Rietveld. ReST documentation should be updated too. vars() returns modifiable dict. The patch should be much harder if we want to preserve this behavior. Otherwise, the difference must be explicitly documented. ---------- nosy: +storchaka versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:23:39 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Oct 2012 08:23:39 +0000 Subject: [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <3XWqxk2qfBzNn8@mail.python.org> Roundup Robot added the comment: New changeset d93a59a0a984 by Nick Coghlan in branch '3.3': Issue #12947: Better workaround for the problem with doctest directives being stripped from code examples that are intended to illustrate those directives http://hg.python.org/cpython/rev/d93a59a0a984 New changeset 26200f535296 by Nick Coghlan in branch 'default': Merge #12947 workaround from 3.3 http://hg.python.org/cpython/rev/26200f535296 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:25:13 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 03 Oct 2012 08:25:13 +0000 Subject: [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349252713.46.0.661702270012.issue12947@psf.upfronthosting.co.za> Nick Coghlan added the comment: Adopted Chris's workaround for now. I kept a reworded version of the preceding note (with the link to this bug), so readers know that the lack of syntax highlighting is intended-but-not-desired. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:31:17 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Oct 2012 08:31:17 +0000 Subject: [issue13290] get vars for object with __slots__ In-Reply-To: <1319871850.77.0.869546838833.issue13290@psf.upfronthosting.co.za> Message-ID: <1349253077.38.0.825517200854.issue13290@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There's another thing. __slots__ value is converted to a tuple and saved as ht_slots field in PyHeapTypeObject. You can use fast PyTuple_GET_ITEM() for item access. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:35:45 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 03 Oct 2012 08:35:45 +0000 Subject: [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349253345.6.0.953882130062.issue12947@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks, Nick. It looks like there are a few more though? I'm counting four more in default (search for "doctest:"): three IGNORE_EXCEPTION_DETAIL and one ELLIPSIS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:40:39 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 03 Oct 2012 08:40:39 +0000 Subject: [issue16105] Pass read only FD to signal.set_wakeup_fd In-Reply-To: Message-ID: Charles-Fran?ois Natali added the comment: > A signal handler can be called anymore, anywhere. How do you handle such > exception in an application? "handle": do something better than exit the > apllication. Well, chances are you won't, but failing with an explicit error message is better than silently failing to deliver signals (which may result in a deadlock, for example). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:48:31 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 03 Oct 2012 08:48: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: <1349254111.21.0.88030439089.issue12370@psf.upfronthosting.co.za> Nick Coghlan added the comment: Carsten: emulating __class__ is necessary to implement proxy types (and similar utilities like mock objects) correctly. The difference between "x.__class__" is that proxies can remap it to the type of the referent, while "type(x)" will always report the real class of "x" (which may be a proxy like weakref.proxy, or a mock object, as it is in the case Michael is interested in). Mark: correct, the problem is that the compiler is treating *all* references to __class__ inside a class body as references to the cell variable, when it should really only be doing that for references inside methods - references directly at the class body level should still be to the entry in the class locals namespace that later become attributes of the class object. Hence my idea of introducing a separate closure namespace encapsulating the class namespace to separate the two more cleanly than the current hacky override. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 11:00:04 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 03 Oct 2012 09:00:04 +0000 Subject: [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349254804.34.0.225761752718.issue12947@psf.upfronthosting.co.za> Nick Coghlan added the comment: I only changed the ones that were specifically in the section explaining doctest directives. There are probably others, but it didn't seem necessary to change them and lose the syntax highlighting at this point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 11:09:08 2012 From: report at bugs.python.org (Masami HIRATA) Date: Wed, 03 Oct 2012 09:09:08 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 Message-ID: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> New submission from Masami HIRATA: I'm trying to install C extension modules inside a venv. It works outside a venv and inside a virtualenv-1.8.2 but breaks inside the venv. OS: Windows 7 Starter Edition SP1 (32-bit) Python: 3.3.0 (python-3.3.0.msi) Compiler: Microsoft Visual C++ 2010 Express SP1 ---------- components: Library (Lib) files: Python33_with_venv.txt messages: 171875 nosy: msmhrt priority: normal severity: normal status: open title: Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file27397/Python33_with_venv.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 11:10:23 2012 From: report at bugs.python.org (Masami HIRATA) Date: Wed, 03 Oct 2012 09:10:23 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 In-Reply-To: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> Message-ID: <1349255423.99.0.190244197309.issue16116@psf.upfronthosting.co.za> Changes by Masami HIRATA : Added file: http://bugs.python.org/file27398/Python33_with_virtualenv.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 11:11:16 2012 From: report at bugs.python.org (Masami HIRATA) Date: Wed, 03 Oct 2012 09:11:16 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 In-Reply-To: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> Message-ID: <1349255476.98.0.719102650642.issue16116@psf.upfronthosting.co.za> Changes by Masami HIRATA : Added file: http://bugs.python.org/file27399/Python33_without_venv.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 11:30:39 2012 From: report at bugs.python.org (Roland Lezuo) Date: Wed, 03 Oct 2012 09:30:39 +0000 Subject: [issue16117] python2.7.3 struct misaligned when returned Message-ID: <1349256639.78.0.287581020931.issue16117@psf.upfronthosting.co.za> New submission from Roland Lezuo: class Int(ctypes.Structure): _fields_ = [ ("_i", ctypes.c_uint64), ("undef", ctypes.c_bool)] class Int { public: Int(); Int(uint64_t i); uint64_t _i; bool undef; }; extern "C" Int foo(const Int& a , const Int& b , const Int& c) { ret = ... return Int(ret); } (gdb) p ret $3 = 16 (gdb) fin Run till exit from #0 BVSignExtend (a=..., b=..., c=...) at foo.hpp:130 0x00007ffff784eea4 in ffi_call_unix64 () from /usr/lib/python2.7/lib-dynload/_ctypes.so Value returned is $4 = {_i = 18577824, undef = 16} My guess: The value 18577824 was not expected to be on the stack. The following actions "solve" the problem: 1) add another int the class Int (after bool) and adopt _fields_ accordingly. 2) in foo C++ function: Int reti = Int(ret); return reti; Because of the "above" solutions I strongly suspect a bug in ctypes. ---------- components: ctypes messages: 171876 nosy: iroli priority: normal severity: normal status: open title: python2.7.3 struct misaligned when returned versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 12:44:33 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 03 Oct 2012 10:44:33 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349261073.91.0.919055467667.issue8800@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: I admit that I kind of like Java's approach to this. First off, they define an interface, ReadWriteLock: http://docs.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/locks/ReadWriteLock.html There, they also discuss the different choices an implementation of the interface can make, regarding a) policy, b) reentrancy, c) upgrading or downgrading. A concrete implemention is then presented in the form of the ReentrantReadWriteLock, with documented behaviour for the above. The rest of threading is also, as previously pointed out, more or less a rip-off from Java. Since there is no single "correct" choice for the above, and since the implementation restrictions are different between inter-process and inter-thread locks, it would make sense to adopt a similar model, where a RWLock() function is a factory function, taking an argument specify a desired class of locks. The policies that have been seen in this thread are: a) greedy policy (no policy) b) writer preference c) 'Fair' (or in-order) preference. All have their benefits and disadvantages. We have also seen "recursive" and "nonrecursive". The restrictions appear more serious in the inter-process case since I don't know if it is possible to maintain a shared dynamic array of thread ids across processes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 12:59:37 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 03 Oct 2012 10:59:37 +0000 Subject: [issue13290] get vars for object with __slots__ In-Reply-To: <1319871850.77.0.869546838833.issue13290@psf.upfronthosting.co.za> Message-ID: <1349261977.4.0.877303904143.issue13290@psf.upfronthosting.co.za> Richard Oudkerk added the comment: The patch does not seem to walk the mro to look for slots in base classes. Also, an instance with a __dict__ attribute may also have attributes stored in slots. BTW, copyreg._slotnames(cls) properly calculates the slot names for cls and tries to cache them as cls.__slotnames__. Pickle does the equivalent of try: slotnames = cls.__slotnames__ except AttributeError: slotnames = copyreg._slotnames(cls) ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 13:22:29 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 03 Oct 2012 11:22:29 +0000 Subject: [issue16118] Implement SHA-3 Message-ID: <1349263349.35.0.658604929583.issue16118@psf.upfronthosting.co.za> New submission from Jes?s Cea Avi?n: We have a #sha3 winner!! Keccak - https://en.wikipedia.org/wiki/Keccak ---------- components: Extension Modules messages: 171879 nosy: jcea priority: normal severity: normal stage: needs patch status: open title: Implement SHA-3 type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 13:46:04 2012 From: report at bugs.python.org (suddha sourav) Date: Wed, 03 Oct 2012 11:46:04 +0000 Subject: [issue15786] IDLE code completion window does not scoll/select with mouse In-Reply-To: <1349234344.75.0.397143451917.issue15786@psf.upfronthosting.co.za> Message-ID: suddha sourav added the comment: Thank you for the hint, Roger! On my side, I have changed the HIDE_SEQUENCES tuple to ("",) and it is giving me the behaviour I desired. However, I am not sure if this is a fix of the real issue. I tried IDLE on OpenSUSE 12.2 last night and faced the problem in its other manifestation, which you describe. Thank you again tor the quick feedback! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 13:53:58 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 03 Oct 2012 11:53:58 +0000 Subject: [issue16117] python2.7.3 struct misaligned when returned In-Reply-To: <1349256639.78.0.287581020931.issue16117@psf.upfronthosting.co.za> Message-ID: <1349265238.72.0.436920680482.issue16117@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson, meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 14:30:49 2012 From: report at bugs.python.org (Brett Cannon) Date: Wed, 03 Oct 2012 12:30:49 +0000 Subject: [issue16118] Implement SHA-3 In-Reply-To: <1349263349.35.0.658604929583.issue16118@psf.upfronthosting.co.za> Message-ID: <1349267449.81.0.161015634747.issue16118@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- superseder: -> Add SHA-3 (Keccak) support _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 14:31:00 2012 From: report at bugs.python.org (Brett Cannon) Date: Wed, 03 Oct 2012 12:31:00 +0000 Subject: [issue16118] Implement SHA-3 In-Reply-To: <1349263349.35.0.658604929583.issue16118@psf.upfronthosting.co.za> Message-ID: <1349267460.84.0.222442118401.issue16118@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 14:51:03 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 03 Oct 2012 12:51:03 +0000 Subject: [issue16114] incorrect path in subprocess.Popen() FileNotFoundError message In-Reply-To: <1349237807.22.0.592724343556.issue16114@psf.upfronthosting.co.za> Message-ID: <1349268663.5.0.956265855781.issue16114@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 14:51:14 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 03 Oct 2012 12:51:14 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args[0] arg In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <1349268674.76.0.455821895726.issue16115@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 14:53:44 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 03 Oct 2012 12:53:44 +0000 Subject: [issue15535] Fix pickling efficiency of named tuples in 2.7.3 In-Reply-To: <1343915086.31.0.252328658724.issue15535@psf.upfronthosting.co.za> Message-ID: <1349268824.16.0.035413756353.issue15535@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 15:04:51 2012 From: report at bugs.python.org (koobs) Date: Wed, 03 Oct 2012 13:04:51 +0000 Subject: [issue15617] FAIL: test_create_connection (test.test_socket.NetworkConnectionNoServer) In-Reply-To: <1344603652.0.0.278766609424.issue15617@psf.upfronthosting.co.za> Message-ID: <1349269491.82.0.280430270861.issue15617@psf.upfronthosting.co.za> koobs added the comment: Incase it helps at all, I'm seeing the test failure preparing for adding python33 to the FreeBSD ports tree. On FreeBSD 9.0-RELEASE-p3 (amd64), with /etc/hosts configured as follows: ::1 localhost.domain localhost 127.0.0.1 localhost.domain localhost The following is returned: >>> socket.getaddrinfo('localhost', 80, 0, socket.SOCK_STREAM, 0, socket.AI_ADDRCONFIG) [(2, 1, 6, '', ('127.0.0.1', 80)), (28, 1, 6, '', ('::1', 80, 0, 0))] >>> ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 15:18:40 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 03 Oct 2012 13:18:40 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349270320.65.0.168849668998.issue16113@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 15:28:21 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 03 Oct 2012 13:28:21 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349270901.78.0.383298518198.issue16113@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: We have MD5, SHA1, sha256, sha512 implemented, to use when openssl is not available. Can we do the same with sha-3?. I would suggest to adopt the reference implementation without extensive optimizations, since we will have them when openssl has them. So we might implement SHA-3 now and integrate OpenSSL implementation later, when available. This is interesting, for instance, because many users of Python 3.4 will have a non "up to date" OpenSSL system library. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 15:43:26 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 03 Oct 2012 13:43:26 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349271806.14.0.0564041651206.issue8800@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > Multiprocessing: Because there is no way I know to share a list of > owning thread ids, this version is more limited Why do you need a *shared* list? I think it should be fine to use a per-process list of owning thread ids. So the current thread owns the lock if and only if it is in the current process's list of owners. (On Unix you should probably clear the list when you fork by using multiprocessing.util.register_after_fork() in the initializer.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 15:57:35 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Oct 2012 13:57:35 +0000 Subject: [issue15786] IDLE code completion window does not scroll/select with mouse In-Reply-To: <1346027701.33.0.908436854594.issue15786@psf.upfronthosting.co.za> Message-ID: <1349272655.07.0.149606775742.issue15786@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: IDLE code completion window does not scoll/select with mouse -> IDLE code completion window does not scroll/select with mouse _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 15:59:27 2012 From: report at bugs.python.org (Spiros K.) Date: Wed, 03 Oct 2012 13:59:27 +0000 Subject: [issue16119] Python 2.7 IDLE not working in WinVista Message-ID: <1349272767.13.0.710278986958.issue16119@psf.upfronthosting.co.za> New submission from Spiros K.: Hello. I intalled EPD Free 7.3-2 WIN x86 a few hours ago and idle script doesn't work. When i try to run IDLE from cmd (c:\Python27\Lib\idlelib>idle.py) i take the following output: Traceback (most recent call last): File "C:\Python27\Lib\idlelib\idle.py", line 10, in import idlelib.PyShell File "C:\Python27\Lib\idlelib\PyShell.py", line 9, in import socket File "C:\Python27\Lib\socket.py", line 47, in import _socket ImportError: DLL load failed: ??? ???? ?????? ?? ?????????? ? ??????????? ?????? . My operating system is WinVista HomePremium SP2. Is there any way to solve this problem? ---------- components: IDLE messages: 171884 nosy: sk7 priority: normal severity: normal status: open title: Python 2.7 IDLE not working in WinVista type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 15:59:32 2012 From: report at bugs.python.org (Gereon Kremer) Date: Wed, 03 Oct 2012 13:59:32 +0000 Subject: [issue11245] Implementation of IMAP IDLE in imaplib? In-Reply-To: <1298061371.03.0.0638918089315.issue11245@psf.upfronthosting.co.za> Message-ID: <1349272772.43.0.0786656838358.issue11245@psf.upfronthosting.co.za> Gereon Kremer added the comment: We have implemented this functionality according to RFC 2177. We actually implemented a synchronous idle function that blocks until a timeout occurs or the server sent some event. This is not the most flexible way, however it will provide a basic functionality that enables user to use imap idle based notifications. Besides, every other solution would require threads or regular polling. See attached patch file. ---------- keywords: +patch nosy: +nafur Added file: http://bugs.python.org/file27400/imapidle.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 16:03:19 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Oct 2012 14:03:19 +0000 Subject: [issue15989] Possible integer overflow of PyLong_AsLong() results In-Reply-To: <201209232215.15567.storchaka@gmail.com> Message-ID: <201210031702.49223.storchaka@gmail.com> Serhiy Storchaka added the comment: Added patches for 2.7 and 3.2. ---------- Added file: http://bugs.python.org/file27401/long_aslong_overflow-3.2.patch Added file: http://bugs.python.org/file27402/long_aslong_overflow-2.7.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r 0f4d4f4db724 Include/longobject.h --- a/Include/longobject.h Wed Oct 03 03:16:42 2012 +0200 +++ b/Include/longobject.h Wed Oct 03 10:12:33 2012 +0300 @@ -26,6 +26,9 @@ PyAPI_FUNC(size_t) PyLong_AsSize_t(PyObject *); PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLong(PyObject *); PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLongMask(PyObject *); +#ifndef Py_LIMITED_API +PyAPI_FUNC(int) _PyLong_AsInt(PyObject *); +#endif PyAPI_FUNC(PyObject *) PyLong_GetInfo(void); /* It may be useful in the future. I've added it in the PyInt -> PyLong diff -r 0f4d4f4db724 Modules/_ctypes/stgdict.c --- a/Modules/_ctypes/stgdict.c Wed Oct 03 03:16:42 2012 +0200 +++ b/Modules/_ctypes/stgdict.c Wed Oct 03 10:12:33 2012 +0300 @@ -335,7 +335,7 @@ isPacked = PyObject_GetAttrString(type, "_pack_"); if (isPacked) { - pack = PyLong_AsLong(isPacked); + pack = _PyLong_AsInt(isPacked); if (pack < 0 || PyErr_Occurred()) { Py_XDECREF(isPacked); PyErr_SetString(PyExc_ValueError, diff -r 0f4d4f4db724 Modules/_io/_iomodule.c --- a/Modules/_io/_iomodule.c Wed Oct 03 03:16:42 2012 +0200 +++ b/Modules/_io/_iomodule.c Wed Oct 03 10:12:33 2012 +0300 @@ -303,7 +303,8 @@ int text = 0, binary = 0, universal = 0; char rawmode[5], *m; - int line_buffering, isatty; + int line_buffering; + long isatty; PyObject *raw, *modeobj = NULL, *buffer = NULL, *wrapper = NULL; @@ -441,12 +442,12 @@ #ifdef HAVE_STRUCT_STAT_ST_BLKSIZE { struct stat st; - long fileno; + int fileno; PyObject *res = PyObject_CallMethod(raw, "fileno", NULL); if (res == NULL) goto error; - fileno = PyLong_AsLong(res); + fileno = _PyLong_AsInt(res); Py_DECREF(res); if (fileno == -1 && PyErr_Occurred()) goto error; diff -r 0f4d4f4db724 Modules/_io/fileio.c --- a/Modules/_io/fileio.c Wed Oct 03 03:16:42 2012 +0200 +++ b/Modules/_io/fileio.c Wed Oct 03 10:12:33 2012 +0300 @@ -240,7 +240,7 @@ return -1; } - fd = PyLong_AsLong(nameobj); + fd = _PyLong_AsInt(nameobj); if (fd < 0) { if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ValueError, diff -r 0f4d4f4db724 Modules/_sqlite/connection.c --- a/Modules/_sqlite/connection.c Wed Oct 03 03:16:42 2012 +0200 +++ b/Modules/_sqlite/connection.c Wed Oct 03 10:12:33 2012 +0300 @@ -861,7 +861,7 @@ rc = SQLITE_DENY; } else { if (PyLong_Check(ret)) { - rc = (int)PyLong_AsLong(ret); + rc = _PyLong_AsInt(ret); } else { rc = SQLITE_DENY; } @@ -1289,7 +1289,7 @@ goto finally; } - result = PyLong_AsLong(retval); + result = _PyLong_AsInt(retval); if (PyErr_Occurred()) { result = 0; } diff -r 0f4d4f4db724 Modules/grpmodule.c --- a/Modules/grpmodule.c Wed Oct 03 03:16:42 2012 +0200 +++ b/Modules/grpmodule.c Wed Oct 03 10:12:33 2012 +0300 @@ -85,7 +85,7 @@ grp_getgrgid(PyObject *self, PyObject *pyo_id) { PyObject *py_int_id; - unsigned int gid; + long gid; struct group *p; py_int_id = PyNumber_Long(pyo_id); @@ -93,8 +93,15 @@ return NULL; gid = PyLong_AS_LONG(py_int_id); Py_DECREF(py_int_id); + if (gid == -1 && PyErr_Occurred()) + return NULL; + if ((long)(gid_t)gid != gid) { + PyErr_SetString(PyExc_OverflowError, + "Python int too large to convert to gid_t"); + return NULL; + } - if ((p = getgrgid(gid)) == NULL) { + if ((p = getgrgid((gid_t)gid)) == NULL) { PyErr_Format(PyExc_KeyError, "getgrgid(): gid not found: %d", gid); return NULL; } diff -r 0f4d4f4db724 Modules/parsermodule.c --- a/Modules/parsermodule.c Wed Oct 03 03:16:42 2012 +0200 +++ b/Modules/parsermodule.c Wed Oct 03 10:12:33 2012 +0300 @@ -747,7 +747,7 @@ /* elem must always be a sequence, however simple */ PyObject* elem = PySequence_GetItem(tuple, i); int ok = elem != NULL; - long type = 0; + int type = 0; char *strn = 0; if (ok) @@ -758,8 +758,14 @@ ok = 0; else { ok = PyLong_Check(temp); - if (ok) - type = PyLong_AS_LONG(temp); + if (ok) { + type = _PyLong_AsInt(temp); + if (type == -1 && PyErr_Occurred()) { + Py_DECREF(temp); + Py_DECREF(elem); + return 0; + } + } Py_DECREF(temp); } } @@ -795,8 +801,16 @@ if (len == 3) { PyObject *o = PySequence_GetItem(elem, 2); if (o != NULL) { - if (PyLong_Check(o)) - *line_num = PyLong_AS_LONG(o); + if (PyLong_Check(o)) { + int num = _PyLong_AsInt(o); + if (num == -1 && PyErr_Occurred()) { + Py_DECREF(o); + Py_DECREF(temp); + Py_DECREF(elem); + return 0; + } + *line_num = num; + } else { PyErr_Format(parser_error, "third item in terminal node must be an" diff -r 0f4d4f4db724 Modules/posixmodule.c --- a/Modules/posixmodule.c Wed Oct 03 03:16:42 2012 +0200 +++ b/Modules/posixmodule.c Wed Oct 03 10:12:33 2012 +0300 @@ -6491,7 +6491,7 @@ */ struct constdef { char *name; - long value; + int value; }; static int @@ -6499,7 +6499,10 @@ size_t tablesize) { if (PyLong_Check(arg)) { - *valuep = PyLong_AS_LONG(arg); + int value = _PyLong_AsInt(arg); + if (value == -1 && PyErr_Occurred()) + return 0; + *valuep = value; return 1; } else { diff -r 0f4d4f4db724 Modules/readline.c --- a/Modules/readline.c Wed Oct 03 03:16:42 2012 +0200 +++ b/Modules/readline.c Wed Oct 03 10:12:33 2012 +0300 @@ -742,7 +742,7 @@ if (r == Py_None) result = 0; else { - result = PyLong_AsLong(r); + result = _PyLong_AsInt(r); if (result == -1 && PyErr_Occurred()) goto error; } diff -r 0f4d4f4db724 Modules/selectmodule.c --- a/Modules/selectmodule.c Wed Oct 03 03:16:42 2012 +0200 +++ b/Modules/selectmodule.c Wed Oct 03 10:12:33 2012 +0300 @@ -342,10 +342,13 @@ i = pos = 0; while (PyDict_Next(self->dict, &pos, &key, &value)) { - self->ufds[i].fd = PyLong_AsLong(key); + assert(i < self->ufd_len); + /* Never overflow */ + self->ufds[i].fd = (int)PyLong_AsLong(key); self->ufds[i].events = (short)PyLong_AsLong(value); i++; } + assert(i == self->ufd_len); self->ufd_uptodate = 1; return 1; } @@ -361,10 +364,11 @@ poll_register(pollObject *self, PyObject *args) { PyObject *o, *key, *value; - int fd, events = POLLIN | POLLPRI | POLLOUT; + int fd; + short events = POLLIN | POLLPRI | POLLOUT; int err; - if (!PyArg_ParseTuple(args, "O|i:register", &o, &events)) { + if (!PyArg_ParseTuple(args, "O|h:register", &o, &events)) { return NULL; } @@ -503,7 +507,7 @@ tout = PyNumber_Long(tout); if (!tout) return NULL; - timeout = PyLong_AsLong(tout); + timeout = _PyLong_AsInt(tout); Py_DECREF(tout); if (timeout == -1 && PyErr_Occurred()) return NULL; diff -r 0f4d4f4db724 Modules/socketmodule.c --- a/Modules/socketmodule.c Wed Oct 03 03:16:42 2012 +0200 +++ b/Modules/socketmodule.c Wed Oct 03 10:12:33 2012 +0300 @@ -1737,7 +1737,7 @@ static PyObject * sock_setblocking(PySocketSockObject *s, PyObject *arg) { - int block; + long block; block = PyLong_AsLong(arg); if (block == -1 && PyErr_Occurred()) @@ -2219,7 +2219,7 @@ int backlog; int res; - backlog = PyLong_AsLong(arg); + backlog = _PyLong_AsInt(arg); if (backlog == -1 && PyErr_Occurred()) return NULL; Py_BEGIN_ALLOW_THREADS @@ -2822,7 +2822,7 @@ int how; int res; - how = PyLong_AsLong(arg); + how = _PyLong_AsInt(arg); if (how == -1 && PyErr_Occurred()) return NULL; Py_BEGIN_ALLOW_THREADS diff -r 0f4d4f4db724 Objects/fileobject.c --- a/Objects/fileobject.c Wed Oct 03 03:16:42 2012 +0200 +++ b/Objects/fileobject.c Wed Oct 03 10:12:33 2012 +0300 @@ -200,7 +200,7 @@ PyObject *meth; if (PyLong_Check(o)) { - fd = PyLong_AsLong(o); + fd = _PyLong_AsInt(o); } else if ((meth = PyObject_GetAttrString(o, "fileno")) != NULL) { @@ -210,7 +210,7 @@ return -1; if (PyLong_Check(fno)) { - fd = PyLong_AsLong(fno); + fd = _PyLong_AsInt(fno); Py_DECREF(fno); } else { diff -r 0f4d4f4db724 Objects/longobject.c --- a/Objects/longobject.c Wed Oct 03 03:16:42 2012 +0200 +++ b/Objects/longobject.c Wed Oct 03 10:12:33 2012 +0300 @@ -424,6 +424,24 @@ return result; } +/* Get a C int from a long int object or any object that has an __int__ + method. Return -1 and set an error if overflow occurs. */ + +int +_PyLong_AsInt(PyObject *obj) +{ + int overflow; + long result = PyLong_AsLongAndOverflow(obj, &overflow); + if (overflow || result > INT_MAX || result < INT_MIN) { + /* XXX: could be cute and give a different + message for overflow == -1 */ + PyErr_SetString(PyExc_OverflowError, + "Python int too large to convert to C int"); + return -1; + } + return (int)result; +} + /* Get a Py_ssize_t from a long int object. Returns -1 and sets an error condition if overflow occurs. */ diff -r 0f4d4f4db724 Objects/structseq.c --- a/Objects/structseq.c Wed Oct 03 03:16:42 2012 +0200 +++ b/Objects/structseq.c Wed Oct 03 10:12:33 2012 +0300 @@ -13,14 +13,14 @@ char *PyStructSequence_UnnamedField = "unnamed field"; #define VISIBLE_SIZE(op) Py_SIZE(op) -#define VISIBLE_SIZE_TP(tp) PyLong_AsLong( \ +#define VISIBLE_SIZE_TP(tp) PyLong_AsSsize_t( \ PyDict_GetItemString((tp)->tp_dict, visible_length_key)) -#define REAL_SIZE_TP(tp) PyLong_AsLong( \ +#define REAL_SIZE_TP(tp) PyLong_AsSsize_t( \ PyDict_GetItemString((tp)->tp_dict, real_length_key)) #define REAL_SIZE(op) REAL_SIZE_TP(Py_TYPE(op)) -#define UNNAMED_FIELDS_TP(tp) PyLong_AsLong( \ +#define UNNAMED_FIELDS_TP(tp) PyLong_AsSsize_t( \ PyDict_GetItemString((tp)->tp_dict, unnamed_fields_key)) #define UNNAMED_FIELDS(op) UNNAMED_FIELDS_TP(Py_TYPE(op)) @@ -161,7 +161,8 @@ #define TYPE_MAXSIZE 100 PyTypeObject *typ = Py_TYPE(obj); - int i, removelast = 0; + Py_ssize_t i; + int removelast = 0; Py_ssize_t len; char buf[REPR_BUFFER_SIZE]; char *endofbuf, *pbuf = buf; @@ -233,8 +234,7 @@ PyObject* tup; PyObject* dict; PyObject* result; - Py_ssize_t n_fields, n_visible_fields, n_unnamed_fields; - int i; + Py_ssize_t n_fields, n_visible_fields, n_unnamed_fields, i; n_fields = REAL_SIZE(self); n_visible_fields = VISIBLE_SIZE(self); @@ -320,7 +320,7 @@ { PyObject *dict; PyMemberDef* members; - int n_members, n_unnamed_members, i, k; + Py_ssize_t n_members, n_unnamed_members, i, k; #ifdef Py_TRACE_REFS /* if the type object was chained, unchain it first @@ -365,18 +365,18 @@ Py_INCREF(type); dict = type->tp_dict; -#define SET_DICT_FROM_INT(key, value) \ +#define SET_DICT_FROM_SIZE(key, value) \ do { \ - PyObject *v = PyLong_FromLong((long) value); \ + PyObject *v = PyLong_FromSsize_t(value); \ if (v != NULL) { \ PyDict_SetItemString(dict, key, v); \ Py_DECREF(v); \ } \ } while (0) - SET_DICT_FROM_INT(visible_length_key, desc->n_in_sequence); - SET_DICT_FROM_INT(real_length_key, n_members); - SET_DICT_FROM_INT(unnamed_fields_key, n_unnamed_members); + SET_DICT_FROM_SIZE(visible_length_key, desc->n_in_sequence); + SET_DICT_FROM_SIZE(real_length_key, n_members); + SET_DICT_FROM_SIZE(unnamed_fields_key, n_unnamed_members); } PyTypeObject* diff -r 0f4d4f4db724 Objects/unicodeobject.c --- a/Objects/unicodeobject.c Wed Oct 03 03:16:42 2012 +0200 +++ b/Objects/unicodeobject.c Wed Oct 03 10:12:33 2012 +0300 @@ -9632,7 +9632,7 @@ "* wants int"); goto onError; } - width = PyLong_AsLong(v); + width = PyLong_AsSsize_t(v); if (width == -1 && PyErr_Occurred()) goto onError; if (width < 0) { @@ -9669,7 +9669,7 @@ "* wants int"); goto onError; } - prec = PyLong_AsLong(v); + prec = _PyLong_AsInt(v); if (prec == -1 && PyErr_Occurred()) goto onError; if (prec < 0) diff -r 0f4d4f4db724 Python/Python-ast.c --- a/Python/Python-ast.c Wed Oct 03 03:16:42 2012 +0200 +++ b/Python/Python-ast.c Wed Oct 03 10:12:33 2012 +0300 @@ -626,7 +626,7 @@ return 1; } - i = (int)PyLong_AsLong(obj); + i = _PyLong_AsInt(obj); if (i == -1 && PyErr_Occurred()) return 1; *out = i; diff -r 0f4d4f4db724 Python/compile.c --- a/Python/compile.c Wed Oct 03 03:16:42 2012 +0200 +++ b/Python/compile.c Wed Oct 03 10:12:33 2012 +0300 @@ -396,6 +396,7 @@ v = PyDict_GetItem(src, k); assert(PyLong_Check(v)); vi = PyLong_AS_LONG(v); + assert(!PyErr_Occurred()); scope = (vi >> SCOPE_OFFSET) & SCOPE_MASK; if (scope == scope_type || vi & flag) { @@ -971,6 +972,12 @@ Py_DECREF(t); return -1; } + arg = _PyLong_AsInt(v); + if (arg == -1 && PyErr_Occurred()) { + Py_DECREF(t); + Py_DECREF(v); + return -1; + } if (PyDict_SetItem(dict, t, v) < 0) { Py_DECREF(t); Py_DECREF(v); @@ -979,7 +986,7 @@ Py_DECREF(v); } else - arg = PyLong_AsLong(v); + arg = _PyLong_AsInt(v); Py_DECREF(t); return arg; } diff -r 0f4d4f4db724 Python/pythonrun.c --- a/Python/pythonrun.c Wed Oct 03 03:16:42 2012 +0200 +++ b/Python/pythonrun.c Wed Oct 03 10:12:33 2012 +0300 @@ -1334,7 +1334,7 @@ parse_syntax_error(PyObject *err, PyObject **message, const char **filename, int *lineno, int *offset, const char **text) { - long hold; + int hold; PyObject *v; /* old style errors */ @@ -1366,11 +1366,11 @@ v = PyObject_GetAttrString(err, "lineno"); if (!v) goto finally; - hold = PyLong_AsLong(v); + hold = _PyLong_AsInt(v); Py_DECREF(v); if (hold < 0 && PyErr_Occurred()) goto finally; - *lineno = (int)hold; + *lineno = hold; v = PyObject_GetAttrString(err, "offset"); if (!v) @@ -1379,11 +1379,11 @@ *offset = -1; Py_DECREF(v); } else { - hold = PyLong_AsLong(v); + hold = _PyLong_AsInt(v); Py_DECREF(v); if (hold < 0 && PyErr_Occurred()) goto finally; - *offset = (int)hold; + *offset = hold; } v = PyObject_GetAttrString(err, "text"); -------------- next part -------------- diff -r 2eaaa7b0e7a9 Include/intobject.h --- a/Include/intobject.h Wed Oct 03 02:14:14 2012 +0200 +++ b/Include/intobject.h Wed Oct 03 16:28:31 2012 +0300 @@ -40,6 +40,7 @@ PyAPI_FUNC(PyObject *) PyInt_FromSsize_t(Py_ssize_t); PyAPI_FUNC(long) PyInt_AsLong(PyObject *); PyAPI_FUNC(Py_ssize_t) PyInt_AsSsize_t(PyObject *); +PyAPI_FUNC(int) _PyInt_AsInt(PyObject *); PyAPI_FUNC(unsigned long) PyInt_AsUnsignedLongMask(PyObject *); #ifdef HAVE_LONG_LONG PyAPI_FUNC(unsigned PY_LONG_LONG) PyInt_AsUnsignedLongLongMask(PyObject *); diff -r 2eaaa7b0e7a9 Include/longobject.h --- a/Include/longobject.h Wed Oct 03 02:14:14 2012 +0200 +++ b/Include/longobject.h Wed Oct 03 16:28:31 2012 +0300 @@ -25,6 +25,7 @@ PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLong(PyObject *); PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLongMask(PyObject *); PyAPI_FUNC(Py_ssize_t) PyLong_AsSsize_t(PyObject *); +PyAPI_FUNC(int) _PyLong_AsInt(PyObject *); PyAPI_FUNC(PyObject *) PyLong_GetInfo(void); /* For use by intobject.c only */ diff -r 2eaaa7b0e7a9 Modules/_ctypes/stgdict.c --- a/Modules/_ctypes/stgdict.c Wed Oct 03 02:14:14 2012 +0200 +++ b/Modules/_ctypes/stgdict.c Wed Oct 03 16:28:31 2012 +0300 @@ -343,7 +343,7 @@ isPacked = PyObject_GetAttrString(type, "_pack_"); if (isPacked) { - pack = PyInt_AsLong(isPacked); + pack = _PyInt_AsInt(isPacked); if (pack < 0 || PyErr_Occurred()) { Py_XDECREF(isPacked); PyErr_SetString(PyExc_ValueError, diff -r 2eaaa7b0e7a9 Modules/_io/_iomodule.c --- a/Modules/_io/_iomodule.c Wed Oct 03 02:14:14 2012 +0200 +++ b/Modules/_io/_iomodule.c Wed Oct 03 16:28:31 2012 +0300 @@ -300,7 +300,8 @@ int text = 0, binary = 0, universal = 0; char rawmode[5], *m; - int line_buffering, isatty; + int line_buffering; + long isatty; PyObject *raw, *modeobj = NULL, *buffer = NULL, *wrapper = NULL; @@ -443,12 +444,12 @@ #ifdef HAVE_STRUCT_STAT_ST_BLKSIZE { struct stat st; - long fileno; + int fileno; PyObject *res = PyObject_CallMethod(raw, "fileno", NULL); if (res == NULL) goto error; - fileno = PyInt_AsLong(res); + fileno = _PyInt_AsInt(res); Py_DECREF(res); if (fileno == -1 && PyErr_Occurred()) goto error; diff -r 2eaaa7b0e7a9 Modules/_io/fileio.c --- a/Modules/_io/fileio.c Wed Oct 03 02:14:14 2012 +0200 +++ b/Modules/_io/fileio.c Wed Oct 03 16:28:31 2012 +0300 @@ -211,7 +211,7 @@ return -1; } - fd = PyLong_AsLong(nameobj); + fd = _PyLong_AsInt(nameobj); if (fd < 0) { if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ValueError, diff -r 2eaaa7b0e7a9 Modules/_sqlite/connection.c --- a/Modules/_sqlite/connection.c Wed Oct 03 02:14:14 2012 +0200 +++ b/Modules/_sqlite/connection.c Wed Oct 03 16:28:31 2012 +0300 @@ -935,7 +935,7 @@ rc = SQLITE_DENY; } else { if (PyInt_Check(ret)) { - rc = (int)PyInt_AsLong(ret); + rc = _PyInt_AsInt(ret); } else { rc = SQLITE_DENY; } @@ -1360,7 +1360,7 @@ goto finally; } - result = PyInt_AsLong(retval); + result = _PyInt_AsInt(retval); if (PyErr_Occurred()) { result = 0; } diff -r 2eaaa7b0e7a9 Modules/grpmodule.c --- a/Modules/grpmodule.c Wed Oct 03 02:14:14 2012 +0200 +++ b/Modules/grpmodule.c Wed Oct 03 16:28:31 2012 +0300 @@ -86,7 +86,7 @@ grp_getgrgid(PyObject *self, PyObject *pyo_id) { PyObject *py_int_id; - unsigned int gid; + long gid; struct group *p; py_int_id = PyNumber_Int(pyo_id); @@ -94,9 +94,16 @@ return NULL; gid = PyInt_AS_LONG(py_int_id); Py_DECREF(py_int_id); + if (gid == -1 && PyErr_Occurred()) + return NULL; + if ((long)(gid_t)gid != gid) { + PyErr_SetString(PyExc_OverflowError, + "Python int too large to convert to gid_t"); + return NULL; + } - if ((p = getgrgid(gid)) == NULL) { - PyErr_Format(PyExc_KeyError, "getgrgid(): gid not found: %d", gid); + if ((p = getgrgid((gid_t)gid)) == NULL) { + PyErr_Format(PyExc_KeyError, "getgrgid(): gid not found: %d", gid); return NULL; } return mkgrent(p); diff -r 2eaaa7b0e7a9 Modules/parsermodule.c --- a/Modules/parsermodule.c Wed Oct 03 02:14:14 2012 +0200 +++ b/Modules/parsermodule.c Wed Oct 03 16:28:31 2012 +0300 @@ -744,7 +744,7 @@ /* elem must always be a sequence, however simple */ PyObject* elem = PySequence_GetItem(tuple, i); int ok = elem != NULL; - long type = 0; + int type = 0; char *strn = 0; if (ok) @@ -755,8 +755,14 @@ ok = 0; else { ok = PyInt_Check(temp); - if (ok) - type = PyInt_AS_LONG(temp); + if (ok) { + type = _PyInt_AsInt(temp); + if (type == -1 && PyErr_Occurred()) { + Py_DECREF(temp); + Py_DECREF(elem); + return 0; + } + } Py_DECREF(temp); } } @@ -790,8 +796,16 @@ if (len == 3) { PyObject *o = PySequence_GetItem(elem, 2); if (o != NULL) { - if (PyInt_Check(o)) - *line_num = PyInt_AS_LONG(o); + if (PyInt_Check(o)) { + int num = _PyInt_AsInt(o); + if (num == -1 && PyErr_Occurred()) { + Py_DECREF(o); + Py_DECREF(temp); + Py_DECREF(elem); + return 0; + } + *line_num = num; + } else { PyErr_Format(parser_error, "third item in terminal node must be an" diff -r 2eaaa7b0e7a9 Modules/posixmodule.c --- a/Modules/posixmodule.c Wed Oct 03 02:14:14 2012 +0200 +++ b/Modules/posixmodule.c Wed Oct 03 16:28:31 2012 +0300 @@ -7465,7 +7465,7 @@ */ struct constdef { char *name; - long value; + int value; }; static int @@ -7473,7 +7473,10 @@ size_t tablesize) { if (PyInt_Check(arg)) { - *valuep = PyInt_AS_LONG(arg); + int value = _PyInt_AsInt(arg); + if (value == -1 && PyErr_Occurred()) + return 0; + *valuep = value; return 1; } if (PyString_Check(arg)) { diff -r 2eaaa7b0e7a9 Modules/readline.c --- a/Modules/readline.c Wed Oct 03 02:14:14 2012 +0200 +++ b/Modules/readline.c Wed Oct 03 16:28:31 2012 +0300 @@ -717,7 +717,7 @@ if (r == Py_None) result = 0; else { - result = PyInt_AsLong(r); + result = _PyInt_AsInt(r); if (result == -1 && PyErr_Occurred()) goto error; } diff -r 2eaaa7b0e7a9 Modules/selectmodule.c --- a/Modules/selectmodule.c Wed Oct 03 02:14:14 2012 +0200 +++ b/Modules/selectmodule.c Wed Oct 03 16:28:31 2012 +0300 @@ -346,10 +346,13 @@ i = pos = 0; while (PyDict_Next(self->dict, &pos, &key, &value)) { - self->ufds[i].fd = PyInt_AsLong(key); + assert(i < self->ufd_len); + /* Never overflow */ + self->ufds[i].fd = (int)PyInt_AsLong(key); self->ufds[i].events = (short)PyInt_AsLong(value); i++; } + assert(i == self->ufd_len); self->ufd_uptodate = 1; return 1; } @@ -365,10 +368,11 @@ poll_register(pollObject *self, PyObject *args) { PyObject *o, *key, *value; - int fd, events = POLLIN | POLLPRI | POLLOUT; + int fd; + short events = POLLIN | POLLPRI | POLLOUT; int err; - if (!PyArg_ParseTuple(args, "O|i:register", &o, &events)) { + if (!PyArg_ParseTuple(args, "O|h:register", &o, &events)) { return NULL; } @@ -506,7 +510,7 @@ tout = PyNumber_Int(tout); if (!tout) return NULL; - timeout = PyInt_AsLong(tout); + timeout = _PyInt_AsInt(tout); Py_DECREF(tout); if (timeout == -1 && PyErr_Occurred()) return NULL; diff -r 2eaaa7b0e7a9 Modules/socketmodule.c --- a/Modules/socketmodule.c Wed Oct 03 02:14:14 2012 +0200 +++ b/Modules/socketmodule.c Wed Oct 03 16:28:31 2012 +0300 @@ -1713,7 +1713,7 @@ static PyObject * sock_setblocking(PySocketSockObject *s, PyObject *arg) { - int block; + long block; block = PyInt_AsLong(arg); if (block == -1 && PyErr_Occurred()) @@ -2243,7 +2243,7 @@ int backlog; int res; - backlog = PyInt_AsLong(arg); + backlog = _PyInt_AsInt(arg); if (backlog == -1 && PyErr_Occurred()) return NULL; Py_BEGIN_ALLOW_THREADS @@ -2894,7 +2894,7 @@ int how; int res; - how = PyInt_AsLong(arg); + how = _PyInt_AsInt(arg); if (how == -1 && PyErr_Occurred()) return NULL; Py_BEGIN_ALLOW_THREADS diff -r 2eaaa7b0e7a9 Objects/fileobject.c --- a/Objects/fileobject.c Wed Oct 03 02:14:14 2012 +0200 +++ b/Objects/fileobject.c Wed Oct 03 16:28:31 2012 +0300 @@ -2657,10 +2657,10 @@ PyObject *meth; if (PyInt_Check(o)) { - fd = PyInt_AsLong(o); + fd = _PyInt_AsInt(o); } else if (PyLong_Check(o)) { - fd = PyLong_AsLong(o); + fd = _PyLong_AsInt(o); } else if ((meth = PyObject_GetAttrString(o, "fileno")) != NULL) { @@ -2670,11 +2670,11 @@ return -1; if (PyInt_Check(fno)) { - fd = PyInt_AsLong(fno); + fd = _PyInt_AsInt(fno); Py_DECREF(fno); } else if (PyLong_Check(fno)) { - fd = PyLong_AsLong(fno); + fd = _PyLong_AsInt(fno); Py_DECREF(fno); } else { diff -r 2eaaa7b0e7a9 Objects/intobject.c --- a/Objects/intobject.c Wed Oct 03 02:14:14 2012 +0200 +++ b/Objects/intobject.c Wed Oct 03 16:28:31 2012 +0300 @@ -189,6 +189,20 @@ return val; } +int +_PyInt_AsInt(PyObject *obj) +{ + long result = PyInt_AsLong(obj); + if (result == -1 && PyErr_Occurred()) + return -1; + if (result > INT_MAX || result < INT_MIN) { + PyErr_SetString(PyExc_OverflowError, + "Python int too large to convert to C int"); + return -1; + } + return (int)result; +} + Py_ssize_t PyInt_AsSsize_t(register PyObject *op) { diff -r 2eaaa7b0e7a9 Objects/longobject.c --- a/Objects/longobject.c Wed Oct 03 02:14:14 2012 +0200 +++ b/Objects/longobject.c Wed Oct 03 16:28:31 2012 +0300 @@ -339,6 +339,24 @@ return result; } +/* Get a C int from a long int object or any object that has an __int__ + method. Return -1 and set an error if overflow occurs. */ + +int +_PyLong_AsInt(PyObject *obj) +{ + int overflow; + long result = PyLong_AsLongAndOverflow(obj, &overflow); + if (overflow || result > INT_MAX || result < INT_MIN) { + /* XXX: could be cute and give a different + message for overflow == -1 */ + PyErr_SetString(PyExc_OverflowError, + "Python int too large to convert to C int"); + return -1; + } + return (int)result; +} + /* Get a Py_ssize_t from a long int object. Returns -1 and sets an error condition if overflow occurs. */ diff -r 2eaaa7b0e7a9 Objects/structseq.c --- a/Objects/structseq.c Wed Oct 03 02:14:14 2012 +0200 +++ b/Objects/structseq.c Wed Oct 03 16:28:31 2012 +0300 @@ -14,14 +14,14 @@ char *PyStructSequence_UnnamedField = "unnamed field"; #define VISIBLE_SIZE(op) Py_SIZE(op) -#define VISIBLE_SIZE_TP(tp) PyInt_AsLong( \ +#define VISIBLE_SIZE_TP(tp) PyInt_AsSsize_t( \ PyDict_GetItemString((tp)->tp_dict, visible_length_key)) -#define REAL_SIZE_TP(tp) PyInt_AsLong( \ +#define REAL_SIZE_TP(tp) PyInt_AsSsize_t( \ PyDict_GetItemString((tp)->tp_dict, real_length_key)) #define REAL_SIZE(op) REAL_SIZE_TP(Py_TYPE(op)) -#define UNNAMED_FIELDS_TP(tp) PyInt_AsLong( \ +#define UNNAMED_FIELDS_TP(tp) PyInt_AsSsize_t( \ PyDict_GetItemString((tp)->tp_dict, unnamed_fields_key)) #define UNNAMED_FIELDS(op) UNNAMED_FIELDS_TP(Py_TYPE(op)) @@ -239,7 +239,8 @@ PyObject *tup; PyTypeObject *typ = Py_TYPE(obj); - int i, removelast = 0; + Py_ssize_t i; + int removelast = 0; Py_ssize_t len; char buf[REPR_BUFFER_SIZE]; char *endofbuf, *pbuf = buf; @@ -374,8 +375,7 @@ PyObject* tup; PyObject* dict; PyObject* result; - Py_ssize_t n_fields, n_visible_fields, n_unnamed_fields; - int i; + Py_ssize_t n_fields, n_visible_fields, n_unnamed_fields, i; n_fields = REAL_SIZE(self); n_visible_fields = VISIBLE_SIZE(self); @@ -478,7 +478,7 @@ { PyObject *dict; PyMemberDef* members; - int n_members, n_unnamed_members, i, k; + Py_ssize_t n_members, n_unnamed_members, i, k; #ifdef Py_TRACE_REFS /* if the type object was chained, unchain it first @@ -525,16 +525,16 @@ Py_INCREF(type); dict = type->tp_dict; -#define SET_DICT_FROM_INT(key, value) \ +#define SET_DICT_FROM_SIZE(key, value) \ do { \ - PyObject *v = PyInt_FromLong((long) value); \ + PyObject *v = PyInt_FromSsize_t(value); \ if (v != NULL) { \ PyDict_SetItemString(dict, key, v); \ Py_DECREF(v); \ } \ } while (0) - SET_DICT_FROM_INT(visible_length_key, desc->n_in_sequence); - SET_DICT_FROM_INT(real_length_key, n_members); - SET_DICT_FROM_INT(unnamed_fields_key, n_unnamed_members); + SET_DICT_FROM_SIZE(visible_length_key, desc->n_in_sequence); + SET_DICT_FROM_SIZE(real_length_key, n_members); + SET_DICT_FROM_SIZE(unnamed_fields_key, n_unnamed_members); } diff -r 2eaaa7b0e7a9 Objects/unicodeobject.c --- a/Objects/unicodeobject.c Wed Oct 03 02:14:14 2012 +0200 +++ b/Objects/unicodeobject.c Wed Oct 03 16:28:31 2012 +0300 @@ -8380,7 +8380,9 @@ "* wants int"); goto onError; } - width = PyInt_AsLong(v); + width = PyInt_AsSsize_t(v); + if (width == -1 && PyErr_Occurred()) + goto onError; if (width < 0) { flags |= F_LJUST; width = -width; @@ -8415,7 +8417,9 @@ "* wants int"); goto onError; } - prec = PyInt_AsLong(v); + prec = _PyInt_AsInt(v); + if (prec == -1 && PyErr_Occurred()) + goto onError; if (prec < 0) prec = 0; if (--fmtcnt >= 0) diff -r 2eaaa7b0e7a9 Python/Python-ast.c --- a/Python/Python-ast.c Wed Oct 03 02:14:14 2012 +0200 +++ b/Python/Python-ast.c Wed Oct 03 16:28:31 2012 +0300 @@ -626,7 +626,7 @@ return 1; } - i = (int)PyLong_AsLong(obj); + i = _PyLong_AsInt(obj); if (i == -1 && PyErr_Occurred()) return 1; *out = i; diff -r 2eaaa7b0e7a9 Python/compile.c --- a/Python/compile.c Wed Oct 03 02:14:14 2012 +0200 +++ b/Python/compile.c Wed Oct 03 16:28:31 2012 +0300 @@ -995,6 +995,12 @@ Py_DECREF(t); return -1; } + arg = _PyInt_AsInt(v); + if (arg == -1 && PyErr_Occurred()) { + Py_DECREF(t); + Py_DECREF(v); + return -1; + } if (PyDict_SetItem(dict, t, v) < 0) { Py_DECREF(t); Py_DECREF(v); @@ -1003,7 +1009,7 @@ Py_DECREF(v); } else - arg = PyInt_AsLong(v); + arg = _PyInt_AsInt(v); Py_DECREF(t); return arg; } diff -r 2eaaa7b0e7a9 Python/pythonrun.c --- a/Python/pythonrun.c Wed Oct 03 02:14:14 2012 +0200 +++ b/Python/pythonrun.c Wed Oct 03 16:28:31 2012 +0300 @@ -981,7 +981,7 @@ parse_syntax_error(PyObject *err, PyObject **message, const char **filename, int *lineno, int *offset, const char **text) { - long hold; + int hold; PyObject *v; /* old style errors */ @@ -1013,11 +1013,11 @@ v = PyObject_GetAttrString(err, "lineno"); if (!v) goto finally; - hold = PyInt_AsLong(v); + hold = _PyInt_AsInt(v); Py_DECREF(v); if (hold < 0 && PyErr_Occurred()) goto finally; - *lineno = (int)hold; + *lineno = hold; v = PyObject_GetAttrString(err, "offset"); if (!v) @@ -1026,11 +1026,11 @@ *offset = -1; Py_DECREF(v); } else { - hold = PyInt_AsLong(v); + hold = _PyInt_AsInt(v); Py_DECREF(v); if (hold < 0 && PyErr_Occurred()) goto finally; - *offset = (int)hold; + *offset = hold; } v = PyObject_GetAttrString(err, "text"); From report at bugs.python.org Wed Oct 3 16:16:15 2012 From: report at bugs.python.org (Roger Serwy) Date: Wed, 03 Oct 2012 14:16:15 +0000 Subject: [issue16119] Python 2.7 IDLE not working in WinVista In-Reply-To: <1349272767.13.0.710278986958.issue16119@psf.upfronthosting.co.za> Message-ID: <1349273775.19.0.438397251948.issue16119@psf.upfronthosting.co.za> Roger Serwy added the comment: Does the official Python 2.7.3 installation from python.org/download/ work for you? ---------- nosy: +serwy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 16:23:17 2012 From: report at bugs.python.org (Felipe Cruz) Date: Wed, 03 Oct 2012 14:23:17 +0000 Subject: [issue16105] Pass read only FD to signal.set_wakeup_fd In-Reply-To: <1349125559.77.0.651840030069.issue16105@psf.upfronthosting.co.za> Message-ID: <1349274197.16.0.980899350684.issue16105@psf.upfronthosting.co.za> Felipe Cruz added the comment: > Why limit to EBADF? You could also have EPIPE, EINVAL and many other errors. > The only error you may not want to report is EAGAIN. Charles, You're right! If all errno cases get covered in the patch, will It looks reasonable? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 16:27:09 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 03 Oct 2012 14:27:09 +0000 Subject: [issue11245] Implementation of IMAP IDLE in imaplib? In-Reply-To: <1298061371.03.0.0638918089315.issue11245@psf.upfronthosting.co.za> Message-ID: <1349274429.09.0.95369959179.issue11245@psf.upfronthosting.co.za> R. David Murray added the comment: To fully answer the original question that opened this issue: contributions will be welcomed. While I don't currently have time to work on imaplib myself, I have an interest and will review and if appropriate commit patches. I like Shay's proposal, but absent a patch along those lines having blocking IMAP support will definitely be an improvement. An application needing to monitor more than one imap connection could do its own threading. Thanks for proposing the patch. Could you please submit a contributor agreement? I probably won't have time to fully consider the proposed patch for a bit, but I've put it on my todo list. test_imaplib does have a testing framework now, do you think you could write tests for the new feature? ---------- components: +email nosy: +barry versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 16:47:12 2012 From: report at bugs.python.org (Spiros K.) Date: Wed, 03 Oct 2012 14:47:12 +0000 Subject: [issue16119] Python 2.7 IDLE not working in WinVista In-Reply-To: <1349272767.13.0.710278986958.issue16119@psf.upfronthosting.co.za> Message-ID: <1349275632.82.0.0154161846941.issue16119@psf.upfronthosting.co.za> Spiros K. added the comment: i removed the EPD version and installed the official Python 2.7.3, but still IDLE doesn't work (neither the start menu sortcut, nor the idle.py from cmd which still gives the same dll error). The only difference is that the python (command line) works this time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 16:54:33 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 03 Oct 2012 14:54:33 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349276073.34.0.268399466026.issue8800@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Excellent point, I hadn't thought of that! Yes, it is is sufficient to test if _I_ am in the list. I'll make the necessary changes. That will make the thread/process implementation virtually identical. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 17:02:26 2012 From: report at bugs.python.org (Mike Hoy) Date: Wed, 03 Oct 2012 15:02:26 +0000 Subject: [issue15104] Unclear language in __main__ description In-Reply-To: <1340092965.02.0.675870286607.issue15104@psf.upfronthosting.co.za> Message-ID: <1349276546.01.0.65658043265.issue15104@psf.upfronthosting.co.za> Changes by Mike Hoy : ---------- nosy: +mikehoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 17:58:52 2012 From: report at bugs.python.org (Roger Serwy) Date: Wed, 03 Oct 2012 15:58:52 +0000 Subject: [issue16119] Python 2.7 _socket DLL import error on Windows Vista In-Reply-To: <1349272767.13.0.710278986958.issue16119@psf.upfronthosting.co.za> Message-ID: <1349279932.63.0.871571853171.issue16119@psf.upfronthosting.co.za> Roger Serwy added the comment: This is not a problem with IDLE, but with an error with loading the _socket DLL. I changed the title to reflect the problem. ---------- components: +Library (Lib) -IDLE title: Python 2.7 IDLE not working in WinVista -> Python 2.7 _socket DLL import error on Windows Vista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 18:07:13 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Wed, 03 Oct 2012 16:07:13 +0000 Subject: [issue13290] get vars for object with __slots__ In-Reply-To: <1319871850.77.0.869546838833.issue13290@psf.upfronthosting.co.za> Message-ID: <1349280433.96.0.0016439329626.issue13290@psf.upfronthosting.co.za> Michele Orr? added the comment: > The patch does not seem to walk the mro to look for slots in base > classes. Also, an instance with a __dict__ attribute may also have >attributes stored in slots. Well, what I am doing is more or less the equivalent of return object.__slots__ if hasattr(object, '__slots') else object.__dict__ and this is coherent with the updated documentation. The one you proposed is an alternative behavior; am I supposed to follow that one? > > BTW, copyreg._slotnames(cls) properly calculates the slot names for cls and tries to cache them as cls.__slotnames__. Pickle does the equivalent of > > try: > slotnames = cls.__slotnames__ > except AttributeError: > slotnames = copyreg._slotnames(cls) thanks! I'll take into account. -- ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 18:18:19 2012 From: report at bugs.python.org (Berker Peksag) Date: Wed, 03 Oct 2012 16:18:19 +0000 Subject: [issue16120] Use |yield from| in stdlib Message-ID: <1349281098.96.0.245155104268.issue16120@psf.upfronthosting.co.za> New submission from Berker Peksag: Related changesets: - http://hg.python.org/cpython/rev/33a221662f39 - http://hg.python.org/cpython/rev/fb90e2ff95b7 ---------- components: Library (Lib) files: yield-from_v1.diff keywords: patch messages: 171894 nosy: berker.peksag priority: normal severity: normal status: open title: Use |yield from| in stdlib versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27403/yield-from_v1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 18:25:03 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 03 Oct 2012 16:25:03 +0000 Subject: [issue16120] Use |yield from| in stdlib In-Reply-To: <1349281098.96.0.245155104268.issue16120@psf.upfronthosting.co.za> Message-ID: <1349281503.6.0.354524449246.issue16120@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: 3.3 is in bugfix mode only now. So, targeting 3.4. I am neutral to this change. Showing use of new language idioms is nice, but merging patches to 3.3 and 3.4 would be more difficult. ---------- nosy: +jcea versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 18:39:04 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 03 Oct 2012 16:39:04 +0000 Subject: [issue16120] Use |yield from| in stdlib In-Reply-To: <1349281098.96.0.245155104268.issue16120@psf.upfronthosting.co.za> Message-ID: <1349282344.01.0.119990786196.issue16120@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the patch. I think that seeing as we've already done a bunch, there's little reason not to do more. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 19:01:47 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 03 Oct 2012 17:01:47 +0000 Subject: [issue13290] get vars for object with __slots__ In-Reply-To: <1319871850.77.0.869546838833.issue13290@psf.upfronthosting.co.za> Message-ID: <1349283707.89.0.868851734938.issue13290@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > Well, what I am doing is more or less the equivalent of > > return object.__slots__ if hasattr(object, '__slots') else object.__dict__ > > and this is coherent with the updated documentation. The one you > proposed is an alternative behavior; am I supposed to follow that one? Ignoring some slots but not others would be confusing. I would be inclined to just leave vars() alone. Maybe a Python implementation could be put in inspect.py instead. A possible implementation (which can't be used to modify the object) might be: import copyreg def fullvars(obj): cls = type(obj) try: slotnames = cls.__dict__['__slotnames__'] except (KeyError, AttributeError): slotnames = copyreg._slotnames(cls) try: d = vars(obj).copy() except TypeError: d = {} for name in slotnames: try: d[name] = getattr(obj, name) except AttributeError: pass return d class A: __slots__ = 'x', 'y' class B(A): __slots__ = 'u', 'v' class C(B): pass a = A() a.x = 1 print(fullvars(a)) # {'x': 1} b = B() b.x = 2; b.u = 3 print(fullvars(b)) # {'u': 3, 'x': 2} c = C() c.y = 4; c.r = 5 print(fullvars(c)) # {'y': 4, 'r': 5} BTW, I before should have written try: slotnames = cls.__dict__['__slotnames__'] except (KeyError, AttributeError): slotnames = copyreg._slotnames(cls) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 19:06:49 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 03 Oct 2012 17:06:49 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349284009.76.0.569957108645.issue16113@psf.upfronthosting.co.za> Christian Heimes added the comment: I've done some experiments with the reference implementation and adopted code of sha1module.c for sha3: https://bitbucket.org/tiran/pykeccak So far the code just compiles (64bit only) but doesn't work properly yet. I may need to move away from the NIST interface and use the sponge interface directly. ---------- assignee: -> christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 19:13:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Oct 2012 17:13:18 +0000 Subject: [issue13290] get vars for object with __slots__ In-Reply-To: <1349261977.4.0.877303904143.issue13290@psf.upfronthosting.co.za> Message-ID: <201210032013.04523.storchaka@gmail.com> Serhiy Storchaka added the comment: > The patch does not seem to walk the mro to look for slots in base classes. > Also, an instance with a __dict__ attribute may also have attributes > stored in slots. > > BTW, copyreg._slotnames(cls) properly calculates the slot names for cls and > tries to cache them as cls.__slotnames__. This is from Python side. Did ht_slots field of PyHeapTypeObject does not contain properly calculated slot names? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 20:07:26 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 03 Oct 2012 18:07:26 +0000 Subject: [issue13290] get vars for object with __slots__ In-Reply-To: <1319871850.77.0.869546838833.issue13290@psf.upfronthosting.co.za> Message-ID: <1349287646.71.0.99140625825.issue13290@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > This is from Python side. Did ht_slots field of PyHeapTypeObject does not > contain properly calculated slot names? Looking at the code, it appears that ht_slots does *not* include inherited slots. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 20:19:19 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 03 Oct 2012 18:19:19 +0000 Subject: [issue16105] Pass read only FD to signal.set_wakeup_fd In-Reply-To: <1349274197.16.0.980899350684.issue16105@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: >> Why limit to EBADF? You could also have EPIPE, EINVAL and many other errors. >> The only error you may not want to report is EAGAIN. > > Charles, > You're right! If all errno cases get covered in the patch, will It looks reasonable? Raising an error in case the signal can't be written to the FD (because the other end didn't drain the pipe/socket) seems reasonable. You should just retry on EINTR (although any sane implementation shouldn't return EINTR on non-blocking write, I don't think it's strictly prohibited by POSIX). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 20:57:13 2012 From: report at bugs.python.org (Mike Putnam) Date: Wed, 03 Oct 2012 18:57:13 +0000 Subject: [issue14574] SocketServer doesn't handle client disconnects properly In-Reply-To: <1334358462.67.0.980544384901.issue14574@psf.upfronthosting.co.za> Message-ID: <1349290633.16.0.134018679412.issue14574@psf.upfronthosting.co.za> Changes by Mike Putnam : ---------- nosy: +mikeputnam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 21:02:16 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 03 Oct 2012 19:02:16 +0000 Subject: [issue13290] get vars for object with __slots__ In-Reply-To: <1319871850.77.0.869546838833.issue13290@psf.upfronthosting.co.za> Message-ID: <1349290936.98.0.414642498755.issue13290@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As I understand it, var(ob) is pretty much a synonym for ob.__dict__. Without knowing the internal details, I think vars should do with slots what it would do if slots were not used and normal dicts were used. In particular, if a class is changed by adding __slots__, vars(class) and vars(instances) should be as much the same as possible, at least for read-only uses. This allows iteration by keys, values, or items for introspection. That modifying the dict has no effect on the object is okay. It is the same for locals() inside a function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 21:11:39 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Oct 2012 19:11:39 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 In-Reply-To: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> Message-ID: <1349291499.85.0.703851639263.issue16116@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- components: +Windows nosy: +vinay.sajip priority: normal -> critical versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 21:12:52 2012 From: report at bugs.python.org (Adam Glenn) Date: Wed, 03 Oct 2012 19:12:52 +0000 Subject: [issue16063] HMAC trans_5C is a string, causing a TypeError In-Reply-To: <1348766473.89.0.982631739774.issue16063@psf.upfronthosting.co.za> Message-ID: <1349291572.97.0.69456878754.issue16063@psf.upfronthosting.co.za> Adam Glenn added the comment: I did some more testing and verified that this is a problem caused by the fact that trans_5C is a string and not unicode. It also happens when trans_36 is sent to key.translate(). Python 2.7.3 (default, Aug 1 2012, 05:14:39) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import hmac >>> hmac.new(u'key', u'msg') Traceback (most recent call last): File "", line 1, in File "hmac.py", line 132, in new return HMAC(key, msg, digestmod) File "hmac.py", line 72, in __init__ self.inner.update(key.translate(trans_36)) TypeError: character mapping must return integer, None or unicode >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 21:23:22 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 03 Oct 2012 19:23:22 +0000 Subject: [issue13290] get vars for object with __slots__ In-Reply-To: <1319871850.77.0.869546838833.issue13290@psf.upfronthosting.co.za> Message-ID: <1349292202.14.0.935785912197.issue13290@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > That modifying the dict has no effect on the object is okay. I have written "vars(obj).update(...)" before. I don't think it would be okay to break that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 22:10:18 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 03 Oct 2012 20:10:18 +0000 Subject: [issue16121] shlex.shlex.error_leader() reports incorrect line number Message-ID: <1349295018.27.0.805550020258.issue16121@psf.upfronthosting.co.za> New submission from Arfrever Frehtes Taifersar Arahesis: shlex.shlex.error_leader() reports incorrect line number with posix=True or when last token is not quoted. This bug occurs in all versions of Python. The attached script shows this bug: $ ./shlex_test.py ### text1 posix=False ('var1', '"None", line 1: ') ('=', '"None", line 1: ') ('"x"', '"None", line 1: ') ('var2', '"None", line 2: ') ('=', '"None", line 2: ') ('"y"', '"None", line 2: ') ('var3', '"None", line 3: ') ('=', '"None", line 3: ') ('"z"', '"None", line 3: ') ### text1 posix=True ('var1', '"None", line 1: ') ('=', '"None", line 1: ') ('x', '"None", line 2: ') ('var2', '"None", line 2: ') ('=', '"None", line 2: ') ('y', '"None", line 3: ') ('var3', '"None", line 3: ') ('=', '"None", line 3: ') ('z', '"None", line 3: ') ### text2 posix=False ('var1', '"None", line 1: ') ('=', '"None", line 1: ') ('x', '"None", line 2: ') ('var2', '"None", line 2: ') ('=', '"None", line 2: ') ('y', '"None", line 3: ') ('var3', '"None", line 3: ') ('=', '"None", line 3: ') ('z', '"None", line 3: ') ### text2 posix=True ('var1', '"None", line 1: ') ('=', '"None", line 1: ') ('x', '"None", line 2: ') ('var2', '"None", line 2: ') ('=', '"None", line 2: ') ('y', '"None", line 3: ') ('var3', '"None", line 3: ') ('=', '"None", line 3: ') ('z', '"None", line 3: ') ### text3 posix=False ('"x"', '"None", line 1: ') ('"y"', '"None", line 2: ') ('"z"', '"None", line 3: ') ### text3 posix=True ('x', '"None", line 2: ') ('y', '"None", line 3: ') ('z', '"None", line 3: ') ### text4 posix=False ('x', '"None", line 2: ') ('y', '"None", line 3: ') ('z', '"None", line 3: ') ### text4 posix=True ('x', '"None", line 2: ') ('y', '"None", line 3: ') ('z', '"None", line 3: ') Only "text1 posix=False" and "text3 posix=False" have all correct line numbers. ---------- components: Library (Lib) files: shlex_test.py messages: 171905 nosy: Arfrever, zmedico priority: normal severity: normal status: open title: shlex.shlex.error_leader() reports incorrect line number versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27404/shlex_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 22:31:37 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Oct 2012 20:31:37 +0000 Subject: [issue13290] get vars for object with __slots__ In-Reply-To: <1319871850.77.0.869546838833.issue13290@psf.upfronthosting.co.za> Message-ID: <1349296297.0.0.892112900938.issue13290@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I see a special warning in the documentation: Note: The returned dictionary should not be modified: the effects on the corresponding symbol table are undefined. [2] [2] In the current implementation, local variable bindings cannot normally be affected this way, but variables retrieved from other scopes (such as modules) can be. This may change. Therefore it's okay that modifying the returned dict has no effect on the object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 22:55:38 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 03 Oct 2012 20:55:38 +0000 Subject: [issue13290] get vars for object with __slots__ In-Reply-To: <1319871850.77.0.869546838833.issue13290@psf.upfronthosting.co.za> Message-ID: <1349297738.98.0.494217943749.issue13290@psf.upfronthosting.co.za> Richard Oudkerk added the comment: A search of googlecode shows 42 examples of "vars(...).update" compared to 3000 for ".__dict__.update". I don't know if that is enough to worry about. http://code.google.com/codesearch#search/&q=vars\%28[A-Za-z0-9_]%2B\%29\.update%20lang:^python$&type=cs ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 23:30:08 2012 From: report at bugs.python.org (samwyse) Date: Wed, 03 Oct 2012 21:30:08 +0000 Subject: [issue16122] Allow *open* to accept file-like objects Message-ID: <1349299808.15.0.576554890473.issue16122@psf.upfronthosting.co.za> New submission from samwyse: I'm once again frustrated by a third-party module that only accepts filenames, not already-opened file-like objects. This prevents me from passing in StringIO objects or any of the standard file streams. Currently, *open()* function accepts strings or (in Python 3.X) integers. I propose that *open()* accept "file-like" objects, either returning them unchanged, or by returning a wrapper object. While there are many different types of file-like objects, they all have one characteristic in common: the presence of a .close() method. A non-wrapped version of open() could be as simple as this: try: file = original_open(name, mode, buffering) except TypeError: if hasattr(name, 'close'): return name raise Returning a wrapper object would be slightly more complicated, but would allow the wrapped object to remain open even after the wrapper is closed. ---------- components: IO messages: 171908 nosy: samwyse priority: normal severity: normal status: open title: Allow *open* to accept file-like objects type: enhancement versions: Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 23:34:26 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 03 Oct 2012 21:34:26 +0000 Subject: [issue16122] Allow *open* to accept file-like objects In-Reply-To: <1349299808.15.0.576554890473.issue16122@psf.upfronthosting.co.za> Message-ID: <1349300066.75.0.56664539416.issue16122@psf.upfronthosting.co.za> Benjamin Peterson added the comment: So, this is supposed to be a kludge for 3rd-party libraries that don't support using file objects? Immediately calling open() isn't necessarily what such a library will do. It could process the path somehow. Anyway, it's not clear what the semantics of the wrapper open() would return would be. I'm going to close this. If you want to push it, you can bring it up on the python-ideas mailing list. ---------- nosy: +benjamin.peterson resolution: -> rejected status: open -> closed versions: +Python 3.4 -Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 23:40:14 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 03 Oct 2012 21:40:14 +0000 Subject: [issue16122] Allow *open* to accept file-like objects In-Reply-To: <1349299808.15.0.576554890473.issue16122@psf.upfronthosting.co.za> Message-ID: <1349300414.75.0.829081244309.issue16122@psf.upfronthosting.co.za> Christian Heimes added the comment: I've another argument against your proposal: open() always wraps a operating system resource and not some Python object. At the lowest level open() interacts with a file descriptor (aka file handler on Windows). I don't like to break the promise. Lot's of 3rd party extensions don't support file-like objects because they wrap C libraries that either need a path, a file descriptor or a FILE* pointer. ---------- nosy: +christian.heimes resolution: rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 23:40:58 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 03 Oct 2012 21:40:58 +0000 Subject: [issue16122] Allow *open* to accept file-like objects In-Reply-To: <1349299808.15.0.576554890473.issue16122@psf.upfronthosting.co.za> Message-ID: <1349300458.22.0.457786109524.issue16122@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 23:42:20 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 03 Oct 2012 21:42:20 +0000 Subject: [issue16122] Allow *open* to accept file-like objects In-Reply-To: <1349299808.15.0.576554890473.issue16122@psf.upfronthosting.co.za> Message-ID: <1349300540.51.0.55937804586.issue16122@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 00:13:49 2012 From: report at bugs.python.org (Roger Serwy) Date: Wed, 03 Oct 2012 22:13:49 +0000 Subject: [issue16123] IDLE - deprecate running without a subprocess Message-ID: <1349302429.82.0.0807471180715.issue16123@psf.upfronthosting.co.za> New submission from Roger Serwy: Removing the option of running IDLE without a subprocess would simplify the maintenance of IDLE. This should be deprecated for 3.4 and then fully removed in 3.5. Here's a link to a brief discussion on IDLE-dev: http://mail.python.org/pipermail/idle-dev/2012-June/003124.html Attached is an initial patch to issue a deprecation message. ---------- files: idle_deprecate.patch keywords: patch messages: 171911 nosy: ned.deily, serwy, terry.reedy priority: normal severity: normal status: open title: IDLE - deprecate running without a subprocess type: enhancement versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file27405/idle_deprecate.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 00:18:46 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 03 Oct 2012 22:18:46 +0000 Subject: [issue16120] Use |yield from| in stdlib In-Reply-To: <1349281098.96.0.245155104268.issue16120@psf.upfronthosting.co.za> Message-ID: <1349302726.15.0.674715782904.issue16120@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Berker, could you possibly submit a Contributor Agreement Form? Details at http://www.python.org/psf/contrib/ Does your patch take care of all "yield" in the stdlib? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 00:34:49 2012 From: report at bugs.python.org (=?utf-8?b?QmrDtnJuIEVkc3Ryw7Zt?=) Date: Wed, 03 Oct 2012 22:34:49 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349303689.5.0.567766084905.issue16113@psf.upfronthosting.co.za> Bj?rn Edstr?m added the comment: For what it's worth, I've built a working C-based sha3-module that is available here: https://github.com/bjornedstrom/python-sha3 Note that I've only tested this on Python 2, for Python 3 YMMV. Best regards Bj?rn ---------- nosy: +bjornedstrom _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 03:02:48 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Oct 2012 01:02:48 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349312568.09.0.596815132763.issue8800@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't like the API. Why should I write "rwlock.acquire_read()" instead of "rwlock.reader.acquire()"? There should be one obvious way to do it. The fact that "reader_lock" and "writer_lock" return a new object every time is a bit suboptimal, IMO. Also, RWLockBase should be private (_RWLockBase). Ah, and the patch needs docs :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 03:04:18 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Oct 2012 01:04:18 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349312658.42.0.416164171334.issue8800@psf.upfronthosting.co.za> Antoine Pitrou added the comment: By the way, the fact that acquire_read() is documented as "Acquire the lock in shared mode" and acquire_write() as "Acquire the lock in exclusive mode" hints that perhaps RWLock is not the right name ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 03:42:57 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 01:42:57 +0000 Subject: [issue13398] _cursesmodule does not build, doesn't find Python.h on Solaris In-Reply-To: <1321226216.89.0.228790993845.issue13398@psf.upfronthosting.co.za> Message-ID: <1349314977.88.0.552265261665.issue13398@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: I close this bug as "out of date". If you think this is still an issue, please, reopen. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 04:11:05 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 02:11:05 +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: <1349316665.0.0.706027294829.issue15642@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 04:14:57 2012 From: report at bugs.python.org (Felipe Cruz) Date: Thu, 04 Oct 2012 02:14:57 +0000 Subject: [issue16105] Pass read only FD to signal.set_wakeup_fd In-Reply-To: <1349125559.77.0.651840030069.issue16105@psf.upfronthosting.co.za> Message-ID: <1349316897.97.0.137147003848.issue16105@psf.upfronthosting.co.za> Felipe Cruz added the comment: > Raising an error in case the signal can't be written to the FD > (because the other end didn't drain the pipe/socket) seems reasonable. > You should just retry on EINTR (although any sane implementation > shouldn't return EINTR on non-blocking write, I don't think it's > strictly prohibited by POSIX). You mean retry one time or until success? ---------- Added file: http://bugs.python.org/file27406/issue16105_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 04:16:39 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 02:16:39 +0000 Subject: [issue15625] Support u and w codes in memoryview In-Reply-To: <1344719787.86.0.485615026169.issue15625@psf.upfronthosting.co.za> Message-ID: <1349316999.62.0.980834940528.issue15625@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 Thu Oct 4 05:46:54 2012 From: report at bugs.python.org (Garrett Cooper) Date: Thu, 04 Oct 2012 03:46:54 +0000 Subject: [issue16124] fcntl_ioctl still not 100% sane with unsigned longs Message-ID: <1349322414.95.0.371484313067.issue16124@psf.upfronthosting.co.za> New submission from Garrett Cooper: As discussed in ID # 1471, the type for request is not 100% correct on some platforms (FreeBSD, NetBSD, and OpenBSD, for instance) and the custom platform that I'm using unfortunately uses non-32-bit int ioctls. An autoconf test needs to be added for these platforms and the request parameter needs to be handled properly (I'll take charge of doing that). ---------- components: Extension Modules messages: 171918 nosy: yaneurabeya priority: normal severity: normal status: open title: fcntl_ioctl still not 100% sane with unsigned longs type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 07:09:15 2012 From: report at bugs.python.org (Kushal Das) Date: Thu, 04 Oct 2012 05:09:15 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args[0] arg In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <1349327355.4.0.247587062939.issue16115@psf.upfronthosting.co.za> Kushal Das added the comment: Attached patch which has a new test called test_executable_precedence to test precedence of executable argument over args[0]. ---------- keywords: +patch nosy: +kushaldas Added file: http://bugs.python.org/file27407/executable_precedence.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 07:42:11 2012 From: report at bugs.python.org (Kushal Das) Date: Thu, 04 Oct 2012 05:42:11 +0000 Subject: [issue16057] Subclasses of JSONEncoder should not be insturcted to call JSONEncoder.decode In-Reply-To: <1348695643.05.0.172807817425.issue16057@psf.upfronthosting.co.za> Message-ID: <1349329331.96.0.413028783192.issue16057@psf.upfronthosting.co.za> Kushal Das added the comment: Patch to update docstring and documentation with explicit saying that calling JSONEncoder.default raises a TypeError ---------- keywords: +patch Added file: http://bugs.python.org/file27408/explicit_json_doc_update_for_encoder_default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 07:43:31 2012 From: report at bugs.python.org (Kushal Das) Date: Thu, 04 Oct 2012 05:43:31 +0000 Subject: [issue16057] Subclasses of JSONEncoder should not be insturcted to call JSONEncoder.decode In-Reply-To: <1348695643.05.0.172807817425.issue16057@psf.upfronthosting.co.za> Message-ID: <1349329411.54.0.314490123881.issue16057@psf.upfronthosting.co.za> Kushal Das added the comment: The previous patch should be back committed to all 3.x and 2.7 branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 08:11:32 2012 From: report at bugs.python.org (Robert Xiao) Date: Thu, 04 Oct 2012 06:11:32 +0000 Subject: [issue16125] open accepts arbitrary mode strings as long as they contain U Message-ID: <1349331092.45.0.724908738028.issue16125@psf.upfronthosting.co.za> New submission from Robert Xiao: This issue affects Python 2.5 through 2.7, but not Python 3. open accepts basically anything for the second argument, so long as it either starts with r, w, or a, or contains U somewhere in the string. Therefore, the following are all legal in Python 2.7.3: >>> open('/tmp/a', 'wail') >>> open('/tmp/a', 'PAIL') >>> open('/tmp/a', 'rabid') >>> open('/tmp/a', 'alpha[]') >>> open('/tmp/a', 'raw') Because the mode string is literally a copy of the passed-in mode, it is not clear at all what the mode of the file actually is. For example, in the last case, I cannot write to the file even though the mode contains 'w', because the mode is actually 'r'. I think there are two ways to fix this: either fix the whole mode parsing logic in Objects/fileobject.c to resemble that in Modules/_io/fileio.c from Python 3 (which does proper validation), or just build and store the calculated mode (e.g. "rb") so it's at least possible to determine the file mode. ---------- components: IO messages: 171922 nosy: nneonneo priority: normal severity: normal status: open title: open accepts arbitrary mode strings as long as they contain U versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 08:12:47 2012 From: report at bugs.python.org (Robert Xiao) Date: Thu, 04 Oct 2012 06:12:47 +0000 Subject: [issue16125] open accepts arbitrary mode strings as long as they contain U In-Reply-To: <1349331092.45.0.724908738028.issue16125@psf.upfronthosting.co.za> Message-ID: <1349331167.12.0.934072347971.issue16125@psf.upfronthosting.co.za> Changes by Robert Xiao : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 08:41:18 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 04 Oct 2012 06:41:18 +0000 Subject: [issue16125] open accepts arbitrary mode strings as long as they contain U In-Reply-To: <1349331092.45.0.724908738028.issue16125@psf.upfronthosting.co.za> Message-ID: <1349332878.32.0.796201890173.issue16125@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, pitrou stage: -> needs patch versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 09:11:10 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Oct 2012 07:11:10 +0000 Subject: [issue16126] PyErr_Format format mismatch in _testcapimodule.c Message-ID: <1349334670.64.0.839384857123.issue16126@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: PyErr_Format in Modules/_testcapimodule.c uses illegal format specifier (%s) for Py_ssize_t argument. It causes crash: import _testcapi _testcapi.parse_tuple_and_keywords( (), {}, b'', [42]) ---------- components: Extension Modules, Tests files: testcapi_error_format_mismatch.patch keywords: 3.3regression, patch messages: 171923 nosy: storchaka priority: normal severity: normal status: open title: PyErr_Format format mismatch in _testcapimodule.c type: crash versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27409/testcapi_error_format_mismatch.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 09:17:48 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Oct 2012 07:17:48 +0000 Subject: [issue16127] Correct mentions of narrow build in documentation and comments Message-ID: <1349335068.5.0.242255338591.issue16127@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: In some places in the documentation and in the comments still left incorrect mention of the narrow build. Suggested patch fixes this. ---------- assignee: docs at python components: Documentation, Unicode files: doc_narrow_build.patch keywords: patch messages: 171924 nosy: docs at python, ezio.melotti, storchaka priority: normal severity: normal status: open title: Correct mentions of narrow build in documentation and comments type: enhancement versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27410/doc_narrow_build.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 09:36:13 2012 From: report at bugs.python.org (Kushal Das) Date: Thu, 04 Oct 2012 07:36:13 +0000 Subject: [issue16125] open accepts arbitrary mode strings as long as they contain U In-Reply-To: <1349331092.45.0.724908738028.issue16125@psf.upfronthosting.co.za> Message-ID: <1349336173.61.0.894870305273.issue16125@psf.upfronthosting.co.za> Kushal Das added the comment: I am working on patch for this. ---------- nosy: +kushaldas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 09:49:25 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 04 Oct 2012 07:49:25 +0000 Subject: [issue16098] Bisect optimization in heapq.nsmallest is never used In-Reply-To: <1349091566.51.0.299551598321.issue16098@psf.upfronthosting.co.za> Message-ID: <1349336965.98.0.767523275368.issue16098@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Just so you know, in CPython the bisect version of nsmallest() isn't called at all. Instead, the C implementation is used and it employs the heap based algorithm rather than the bisect algorithm. Instead of mucking with code that call nsmallest(), I'll likely just update nsmallest() at some point to use the same algorithm as the code for nlargest(). That with bring the C code and pure Python code fully in-sync. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 11:09:14 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Thu, 04 Oct 2012 09:09:14 +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: <1349341754.96.0.240734662957.issue16009@psf.upfronthosting.co.za> Michele Orr? added the comment: Since AFAIK json.loads runs through every simil-str object, I think that a repr() is fine here. What do you think? ---------- nosy: +maker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 11:33:05 2012 From: report at bugs.python.org (Kushal Das) Date: Thu, 04 Oct 2012 09:33:05 +0000 Subject: [issue16125] open accepts arbitrary mode strings as long as they contain U In-Reply-To: <1349331092.45.0.724908738028.issue16125@psf.upfronthosting.co.za> Message-ID: <1349343185.12.0.894002752987.issue16125@psf.upfronthosting.co.za> Kushal Das added the comment: Patch to update mode parsing of open call. All tests seem to be running ok. File changed: Objects/fileobject.c ---------- keywords: +patch Added file: http://bugs.python.org/file27411/open_mode2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 12:16:47 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 04 Oct 2012 10:16:47 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349345807.1.0.0906843993041.issue16113@psf.upfronthosting.co.za> Christian Heimes added the comment: Hello Bj?rn, thanks for the information. Your package didn't turn up on Google when I started with my experiment. Perhaps it's too new? Your code and mine have lots of similarities. I was amused when I saw that you had the same issue with the block size attribute. At first I set it to 200 (1600 / 8) but eventually I didn't implement it. My code does everything in C with a separate constructor for each flavor of SHA-3. It's compatible to Python 2.6 to 3.4 and uses the optimized code for 32 and 64bit platforms. Oh, and my code is now working properly. Feel free to review the module. I'll upload the test code later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 12:29:47 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 04 Oct 2012 10:29:47 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349346587.02.0.788599776708.issue8800@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Ok, here is a new patch. It takes into account various comments and suggestions: 1) The interface is java-like. a single RWLock instance only has attributes reader_lock and writer_lock. 2) Since the "owning" array needs only be process local, the same semantics can be used for multiprocessing. Multiprocessing version only does minimal patching of the threading classes, similarly to Barrier. There is implementation coupling between threading and multiprocessing but that is probably ok. 3) Test are there, except that the final tests in the multiprocessing, those that used to rely on data gathered in lists, are nerfed. Not sure how to gather data when multiprocessing 4) I also didn't get the "manager" tests to work. I don't know what managers are or what they are supposed to do, and why they use proxy objects. I attempted to create a proxy object in managers.py but it failed the tests. Also, I am unsure if it is sufficient to proxy only the RWLock object, or if the _ReaderLock and _WriterLock instances that are returned should be proxied too. Documentation i stole from Java. The locking policy is the same as the RecursiveReaderWiterLock from java, i.e. readers wait for writers, but otherwise no preference. Recursion is provided for readers and writers, but not upgrade/downgrade. Again, this is not intended to be final code, particularly I would like help and suggestions for the multiprocessing tests and the manager code. Also, while I strongly prefer RWLock, or ReaderWriterLock, or something similar, basically because it fits with our already java-ized threading module and the terminology from everywhere else in the field today, I'm not going to be enormously difficult about it. cheers! ---------- Added file: http://bugs.python.org/file27412/rwlock.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 12:38:44 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Oct 2012 10:38:44 +0000 Subject: [issue15488] Closed files keep their buffer alive In-Reply-To: <1343584592.55.0.343269676926.issue15488@psf.upfronthosting.co.za> Message-ID: <3XXVv71L2WzQxH@mail.python.org> Roundup Robot added the comment: New changeset 4141c36954cd by Jesus Cea in branch 'default': Closes #15488: Closed files keep their buffer alive http://hg.python.org/cpython/rev/4141c36954cd ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 12:39:22 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 10:39:22 +0000 Subject: [issue15488] Closed files keep their buffer alive In-Reply-To: <1343584592.55.0.343269676926.issue15488@psf.upfronthosting.co.za> Message-ID: <1349347162.77.0.459419752744.issue15488@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- keywords: +patch Added file: http://bugs.python.org/file27413/53aa92a70127.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 12:43:40 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 10:43:40 +0000 Subject: [issue15513] Correct __sizeof__ support for pickle In-Reply-To: <1343723739.69.0.648602242607.issue15513@psf.upfronthosting.co.za> Message-ID: <1349347420.58.0.644627550307.issue15513@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 12:46:17 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 10:46:17 +0000 Subject: [issue15475] Correct __sizeof__ support for itertools In-Reply-To: <1343418242.58.0.256146467281.issue15475@psf.upfronthosting.co.za> Message-ID: <1349347577.75.0.185061559847.issue15475@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 12:47:18 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 10:47:18 +0000 Subject: [issue15528] Better support for finalization with weakrefs In-Reply-To: <1343837927.06.0.561023898829.issue15528@psf.upfronthosting.co.za> Message-ID: <1349347638.27.0.457348066663.issue15528@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 12:48:26 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 04 Oct 2012 10:48:26 +0000 Subject: [issue14574] SocketServer doesn't handle client disconnects properly In-Reply-To: <1334358462.67.0.980544384901.issue14574@psf.upfronthosting.co.za> Message-ID: <1349347706.41.0.584030202923.issue14574@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Clearly, the finish call is intended to be called, and I think the documentation is in error. However, the finish call should also be able to cope with the connection having been reset and handle such errors as may occur. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 12:50:15 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 10:50:15 +0000 Subject: [issue15550] Trailing white spaces In-Reply-To: <1344008415.84.0.0454996292543.issue15550@psf.upfronthosting.co.za> Message-ID: <1349347815.77.0.299658953868.issue15550@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 12:51:23 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 10:51:23 +0000 Subject: [issue8912] `make patchcheck` should check the whitespace of .c/.h files In-Reply-To: <1275794679.2.0.211731721822.issue8912@psf.upfronthosting.co.za> Message-ID: <1349347883.64.0.412663883002.issue8912@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 12:57:13 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 10:57:13 +0000 Subject: [issue15464] ssl: add set_msg_callback function In-Reply-To: <1343352856.85.0.212414509347.issue15464@psf.upfronthosting.co.za> Message-ID: <1349348233.73.0.81651504644.issue15464@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 13:01:53 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 04 Oct 2012 11:01:53 +0000 Subject: [issue14574] SocketServer doesn't handle client disconnects properly In-Reply-To: <1334358462.67.0.980544384901.issue14574@psf.upfronthosting.co.za> Message-ID: <1349348513.12.0.9546949959.issue14574@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Please consider the attached patch and see if it solves the issue. ---------- keywords: +patch Added file: http://bugs.python.org/file27414/socketserver.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 13:23:31 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 11:23:31 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <1349349811.34.0.533987870248.issue16112@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: This is security risk, but I can't think about any "platform.architecture()" use that would use a untrusted parameter. Nevertheless "os.popen()" has been deprecated for ages. I take care of this. ---------- assignee: -> jcea nosy: +jcea versions: -Python 2.6, Python 3.1, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 13:37:14 2012 From: report at bugs.python.org (Max) Date: Thu, 04 Oct 2012 11:37:14 +0000 Subject: [issue16128] hashable documentation error Message-ID: <1349350634.9.0.571993653286.issue16128@psf.upfronthosting.co.za> New submission from Max: http://docs.python.org/dev/glossary.html?highlight=hashable says: Objects which are instances of user-defined classes are hashable by default; they all compare unequal, and their hash value is their id(). Since x == x returns True by default, so "they all compare unequal" isn't quite right. In addition, both the above paragraph and http://docs.python.org/dev/reference/datamodel.html?highlight=__eq__#object.__hash__ say: User-defined classes have __eq__() and __hash__() methods by default; with them, all objects compare unequal (except with themselves) and x.__hash__() returns an appropriate value such that x == y implies both that x is y and hash(x) == hash(y). This is correct, but may leave some confusion with the reader about what happens to a subclass of a built-in class (which doesn't use the default behavior, but instead simply inherits the parent's __hash__ and __eq__). ---------- assignee: docs at python components: Documentation messages: 171935 nosy: docs at python, max priority: normal severity: normal status: open title: hashable documentation error type: enhancement versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 13:58:41 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Oct 2012 11:58:41 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <3XXXgN40qgzQyp@mail.python.org> Roundup Robot added the comment: New changeset c73b90b6dadd by Jesus Cea in branch '2.7': Closes #16112: platform.architecture does not correctly escape argument to /usr/bin/file http://hg.python.org/cpython/rev/c73b90b6dadd New changeset 6c830b657900 by Jesus Cea in branch '3.2': Closes #16112: platform.architecture does not correctly escape argument to /usr/bin/file http://hg.python.org/cpython/rev/6c830b657900 New changeset 3112bf7e0ecb by Jesus Cea in branch '3.3': MERGE: Closes #16112: platform.architecture does not correctly escape argument to /usr/bin/file http://hg.python.org/cpython/rev/3112bf7e0ecb New changeset cd026866b333 by Jesus Cea in branch 'default': MERGE: Closes #16112: platform.architecture does not correctly escape argument to /usr/bin/file http://hg.python.org/cpython/rev/cd026866b333 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 14:21:19 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 12:21:19 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <1349353279.2.0.905885372018.issue16112@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: I have a bootstrap problem with python 2.7. Backout that patch, for now. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 14:58:15 2012 From: report at bugs.python.org (Campbell Barton) Date: Thu, 04 Oct 2012 12:58:15 +0000 Subject: [issue16129] No good way to set 'PYTHONIOENCODING' when embedding python. Message-ID: <1349355495.01.0.406130423626.issue16129@psf.upfronthosting.co.za> New submission from Campbell Barton: note, I was asked to report this issue, posted on the py dev mailing list: see - http://code.activestate.com/lists/python-dev/118015/ --- We've run into an issue recently with blender3d on ms-windows where we want to enforce the encoding is UTF-8 with the embedded python interpreter. (the encoding defaults to cp437). I naively thought setting the environment variable before calling Py_Initialize() would work, but the way python DLL loads, it gets its own environment variables that cant be modified directly [1]. eg, _putenv("PYTHONIOENCODING=utf-8:surrogateescape"); We had bug reports by windows users not able to export files because the stdout errors on printing paths with unsupported encoding. [2],[3] --- Of course we could distribute blender with a bat file launcher that sets env variables, or ask the user to set their env variable - but I dont think this is really a good option. I tried overriding the stderr & stdout, but this caused another bug on exiting, giving an assert in MSVCR90.DLL's write.c (called from python32_d.dll): _VALIDATE_CLEAR_OSSERR_RETURN((_osfile(fh) & FOPEN), EBADF, -1); import sys, io sys.__stdout__ = sys.stdout = io.TextIOWrapper(io.open(sys.stdout.fileno(), "wb", -1), encoding='utf-8', errors='surrogateescape', newline="\n", line_buffering=True) sys.__stderr__ = sys.stderr = io.TextIOWrapper(io.open(sys.stderr.fileno(), "wb", -1), encoding='utf-8', errors='surrogateescape', newline="\n", line_buffering=True) IMHO either of these solutions would be fine. * have a PyOS_PutEnv() function, gettext has gettext_putenv() to workaround this problem. * manage this the same as Py_GetPythonHome(), which can be defined by the embedding application to override the default. [1] http://stackoverflow.com/questions/5153547/environment-variables-are-different-for-dll-than-exe [2] http://projects.blender.org/tracker/index.php?func=detail&aid=32750 [3] http://projects.blender.org/tracker/index.php?func=detail&aid=31555 ---------- components: Windows messages: 171938 nosy: ideasman42 priority: normal severity: normal status: open title: No good way to set 'PYTHONIOENCODING' when embedding python. versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 15:15:09 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Oct 2012 13:15:09 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <3XXZMd0xl8zR1S@mail.python.org> Roundup Robot added the comment: New changeset d6d908dc11f2 by Jesus Cea in branch '2.7': Closes #16112: platform.architecture does not correctly escape argument to /usr/bin/file. Solve a 2.7 bootstrap issue http://hg.python.org/cpython/rev/d6d908dc11f2 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 15:21:26 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 13:21:26 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <1349356886.23.0.0519071137472.issue16112@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Thanks for bringing this up and for your patch. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 15:21:49 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 13:21:49 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <1349356909.59.0.327440570016.issue16112@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 15:26:27 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Oct 2012 13:26: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: <1349357187.42.0.981867069494.issue16129@psf.upfronthosting.co.za> STINNER Victor added the comment: See also issue #15216. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 15:30:58 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Oct 2012 13:30:58 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <1349357458.36.0.542211458718.issue16112@psf.upfronthosting.co.za> STINNER Victor added the comment: I did a similar commit two years ago, but I reverted it because I failed to find a solution for the bootstrap issue. changeset: 60673:7c90ac194e40 branch: legacy-trunk parent: 60664:d7d5c76545fb user: Victor Stinner date: Sun Apr 18 09:07:49 2010 +0000 files: Lib/platform.py description: platform: use subprocess.Popen() instead of os.popen() in _syscmd_file() * Popen() avoids ugly shell escape: target.replace('"', '\\"') * Use proc.communicate() instead of f.stdout.read() * Get output from stdout by splitting with ": " instead of splitting by spaces to support filename with spaces ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 15:31:40 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 04 Oct 2012 13:31:40 +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: <1349357500.39.0.840076114499.issue16009@psf.upfronthosting.co.za> R. David Murray added the comment: A repr of what? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 15:35:03 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Oct 2012 13:35:03 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <1349357703.52.0.0551082232995.issue16112@psf.upfronthosting.co.za> STINNER Victor added the comment: See also issue #9560 and the following email from Marc-Andre Lemburg. http://mail.python.org/pipermail/python-checkins/2010-April/092099.html "Viktor, before making such changes to platform.py, please coordinate with me, as I am the maintainer of that module. The subprocess change is not OK, since platform.py has to stay compatible with Python 2.3 which doesn't have subprocess. Please either revert the change or make it fallback to os.popen()." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 15:37:22 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 04 Oct 2012 13:37:22 +0000 Subject: [issue16125] open accepts arbitrary mode strings as long as they contain U In-Reply-To: <1349331092.45.0.724908738028.issue16125@psf.upfronthosting.co.za> Message-ID: <1349357842.39.0.828479967855.issue16125@psf.upfronthosting.co.za> R. David Murray added the comment: Unfortunately, this is a backward compatibility concern (currently working-even-if-buggy code could stop working), so I'm -1 on fixing it. Option [2] would be an enhancement/API change, and is thus also ruled out. A third alternative might be to add a warning. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 15:50:25 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Thu, 04 Oct 2012 13:50:25 +0000 Subject: [issue16098] Bisect optimization in heapq.nsmallest is never used In-Reply-To: <1349091566.51.0.299551598321.issue16098@psf.upfronthosting.co.za> Message-ID: <1349358625.1.0.904099521046.issue16098@psf.upfronthosting.co.za> Ramchandra Apte added the comment: > This is my first patch, so if I've done something wrong please let me know. The Python Development Guide helps you with all this and more: http://docs.python.org/devguide/ ---------- nosy: +ramchandra.apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 16:02:09 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Thu, 04 Oct 2012 14:02:09 +0000 Subject: [issue15158] Add support for multi-character delimiters in csv In-Reply-To: <1340509645.86.0.375714044709.issue15158@psf.upfronthosting.co.za> Message-ID: <1349359329.14.0.0285964414251.issue15158@psf.upfronthosting.co.za> Ramchandra Apte added the comment: > I do not see the need to cater to something as foolish and rare as using a multichar delimiter that is also within fields. I need to generate tables for Google Code wikis. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 16:04:23 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Thu, 04 Oct 2012 14:04:23 +0000 Subject: [issue16123] IDLE - deprecate running without a subprocess In-Reply-To: <1349302429.82.0.0807471180715.issue16123@psf.upfronthosting.co.za> Message-ID: <1349359463.7.0.455200953551.issue16123@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Make it pop up a dialog with the message too in the patch, please. ---------- nosy: +ramchandra.apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 16:07:19 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Oct 2012 14:07:19 +0000 Subject: [issue16126] PyErr_Format format mismatch in _testcapimodule.c In-Reply-To: <1349334670.64.0.839384857123.issue16126@psf.upfronthosting.co.za> Message-ID: <3XXbWp2g7vzR1c@mail.python.org> Roundup Robot added the comment: New changeset 0fc259ac8733 by Jesus Cea in branch '3.3': Closes #16126: PyErr_Format format mismatch in _testcapimodule.c http://hg.python.org/cpython/rev/0fc259ac8733 New changeset 366c19bb5ca2 by Jesus Cea in branch 'default': MERGE: Closes #16126: PyErr_Format format mismatch in _testcapimodule.c http://hg.python.org/cpython/rev/366c19bb5ca2 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 16:07:39 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 14:07:39 +0000 Subject: [issue16126] PyErr_Format format mismatch in _testcapimodule.c In-Reply-To: <1349334670.64.0.839384857123.issue16126@psf.upfronthosting.co.za> Message-ID: <1349359659.22.0.252593970808.issue16126@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Thanks!. ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 16:09:13 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Thu, 04 Oct 2012 14:09:13 +0000 Subject: [issue16130] "Porting to Python 3.3" needs to be fixed in "What's new In Python 3.4" Message-ID: <1349359753.54.0.0183920912001.issue16130@psf.upfronthosting.co.za> New submission from Ramchandra Apte: "Porting to Python 3.3" should be "Porting to Python 3.4" in "What's new In Python 3.4" [0] http://docs.python.org/dev/whatsnew/3.4.html#porting-to-python-3-3 ---------- assignee: docs at python components: Documentation messages: 171951 nosy: docs at python, ramchandra.apte priority: normal severity: normal status: open title: "Porting to Python 3.3" needs to be fixed in "What's new In Python 3.4" versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 16:13:16 2012 From: report at bugs.python.org (Will Haldean Brown) Date: Thu, 04 Oct 2012 14:13:16 +0000 Subject: [issue16098] Bisect optimization in heapq.nsmallest is never used In-Reply-To: <1349091566.51.0.299551598321.issue16098@psf.upfronthosting.co.za> Message-ID: <1349359996.58.0.0232374354695.issue16098@psf.upfronthosting.co.za> Will Haldean Brown added the comment: Thanks for the clarification Raymond! ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 16:23:15 2012 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 04 Oct 2012 14:23:15 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 In-Reply-To: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> Message-ID: <1349360595.94.0.229791009084.issue16116@psf.upfronthosting.co.za> Vinay Sajip added the comment: Comparing the link command which works: C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:c:\python33\Libs /LIBPATH:C:\temp\venv2\libs /LIBPATH:C:\temp\venv2\PCbuild /EXPORT:PyInit__regex build\temp.win32-3.3\Release\Python3\_regex.obj build\temp.win32-3.3\Release\Python3\_regex_unicode.obj /OUT:build\lib.win32-3.3\_regex.pyd /IMPLIB:build\temp.win32-3.3\Release\Python3\_regex.lib /MANIFESTFILE:build\temp.win32-3.3\Release\Python3\_regex.pyd.manifest with the one that fails: C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\temp\venv\libs /LIBPATH:C:\Python33 /LIBPATH:C:\temp\venv \PCbuild /EXPORT:PyInit__regex build\temp.win32-3.3\Release\Python3\_regex.obj build\temp.win32-3.3\Release\Python3\_regex_unicode.obj /OUT:build\lib.win32-3.3\ _regex.pyd /IMPLIB:build\temp.win32-3.3\Release\Python3\_regex.lib /MANIFESTFILE:build\temp.win32-3.3\Release\Python3\_regex.pyd.manifest indicates that the link error happens because the library path is incorrectly specified as c:\Python33 rather than c:\Python33\libs. I will investigate further. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 16:28:55 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 04 Oct 2012 14:28:55 +0000 Subject: [issue16120] Use |yield from| in stdlib In-Reply-To: <1349281098.96.0.245155104268.issue16120@psf.upfronthosting.co.za> Message-ID: <1349360935.95.0.39841315378.issue16120@psf.upfronthosting.co.za> Brett Cannon added the comment: How are people finding these uses? Grepping around for yield and seeing if it is in a 'for' loop? Or are people doing something more detailed like an AST walk of every module in the stdlib looking for some pattern? ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 16:30:24 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Thu, 04 Oct 2012 14:30:24 +0000 Subject: [issue16009] Json error messages could provide more information about the error In-Reply-To: <1349357500.39.0.840076114499.issue16009@psf.upfronthosting.co.za> Message-ID: Michele Orr? added the comment: > A repr of what? Of the variable "s" in Lib/json/decoder.py#l358 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 16:35:03 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Thu, 04 Oct 2012 14:35:03 +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: <1349361303.69.0.135472767656.issue16009@psf.upfronthosting.co.za> Changes by Michele Orr? : ---------- keywords: +patch Added file: http://bugs.python.org/file27415/issue16009.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 16:45:30 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 04 Oct 2012 14:45:30 +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: <1349361930.42.0.347274349282.issue16009@psf.upfronthosting.co.za> R. David Murray added the comment: So you would see a copy of the string being decoded in the error message? That string might be very long, and would be of doubtful utility. What I had in mind was at least printing the character position of the parse failure. That may also be of limited utility, though, since in many cases the parse failure will happen at the end of the string. This is a problem for all parsers, and the solution is often non-trivial, depending on the parser. Someone who wants to see this happen will need to look at the parser and see what information it has at the point of parse failure that might be useful and practical to expose. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 16:46:39 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 14:46:39 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <1349361999.3.0.395027528925.issue16112@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Thanks for the heads-up, Victor. I have added Marc-Andre Lemburg to the nosy list, so he can know about this issue and can provide feedback (or request a backout for 2.7). Marc-Andre?. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 16:51:15 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 04 Oct 2012 14:51:15 +0000 Subject: [issue16098] Bisect optimization in heapq.nsmallest is never used In-Reply-To: <1349091566.51.0.299551598321.issue16098@psf.upfronthosting.co.za> Message-ID: <1349362275.4.0.146670864939.issue16098@psf.upfronthosting.co.za> R. David Murray added the comment: Raymond said he would make a code change relevant to this at some point, so we should probably leave this issue open until he does. (Or if he doesn't want the issue open, we can let him close it). ---------- nosy: +r.david.murray resolution: invalid -> stage: patch review -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 16:53:41 2012 From: report at bugs.python.org (Piotr Dobrogost) Date: Thu, 04 Oct 2012 14:53:41 +0000 Subject: [issue16131] Pylauncher is being installed in Windows system folder Message-ID: <1349362421.53.0.33140427567.issue16131@psf.upfronthosting.co.za> New submission from Piotr Dobrogost: Pylauncher in Python 3.3 is being installed in Windows system folder instead of Program Files folder. That's against platform rules. It should be installed in the same folder Python is installed or in its own folder under Program Files folder. In the former case this folder starting from Python 3.3 is added to PATH, in the latter case there should be an option in installer to add Pylauncher's folder to PATH. See https://groups.google.com/forum/?hl=en&fromgroups=#!topic/comp.lang.python/-fCFFmpQ8aI ---------- components: Windows messages: 171959 nosy: piotr.dobrogost priority: normal severity: normal status: open title: Pylauncher is being installed in Windows system folder type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 17:07:19 2012 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 04 Oct 2012 15:07:19 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 In-Reply-To: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> Message-ID: <1349363239.09.0.772693749939.issue16116@psf.upfronthosting.co.za> Vinay Sajip added the comment: A little more investigation suggests that the disparity is due to some code in virtualenv's version of distutils.__init__.py, which adds the "\Libs" entry which allows the virtualenv version to work. Adding Carl Meyer as nosy, as I'd like his advice on what the best approach to the fix would be. ---------- nosy: +carljm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 17:08:59 2012 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 04 Oct 2012 15:08:59 +0000 Subject: [issue16131] Pylauncher is being installed in Windows system folder In-Reply-To: <1349362421.53.0.33140427567.issue16131@psf.upfronthosting.co.za> Message-ID: <1349363339.53.0.0225423512647.issue16131@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 17:14:40 2012 From: report at bugs.python.org (Jeremy Kloth) Date: Thu, 04 Oct 2012 15:14:40 +0000 Subject: [issue16131] Pylauncher is being installed in Windows system folder In-Reply-To: <1349362421.53.0.33140427567.issue16131@psf.upfronthosting.co.za> Message-ID: <1349363680.68.0.000615851355429.issue16131@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 17:20:01 2012 From: report at bugs.python.org (Carl Meyer) Date: Thu, 04 Oct 2012 15:20:01 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 In-Reply-To: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> Message-ID: <1349364001.46.0.140519247828.issue16116@psf.upfronthosting.co.za> Carl Meyer added the comment: On cursory inspection, I agree that this is precisely what the "if win32" block in `virtualenv_embedded/distutils-init.py` is intended to fix, and it seems to me the correct fix is likely to just make the equivalent fix directly in distutils: change the library_dirs-building code in `distutils.command.build_ext:finalize_options` (under the "if os.name == 'nt'" block) to build the path relative to `sys.base_exec_prefix` rather than `sys.exec_prefix`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 17:21:55 2012 From: report at bugs.python.org (Carl Meyer) Date: Thu, 04 Oct 2012 15:21:55 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 In-Reply-To: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> Message-ID: <1349364114.99.0.993075803138.issue16116@psf.upfronthosting.co.za> Carl Meyer added the comment: (Actually, to match virtualenv's fix it should add the paths based on both exec_prefix and base_exec_prefix, if they are different.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 17:25:39 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 15:25:39 +0000 Subject: [issue13405] Add DTrace probes In-Reply-To: <1321299726.66.0.343368151185.issue13405@psf.upfronthosting.co.za> Message-ID: <1349364339.55.0.526381693468.issue13405@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- hgrepos: +151 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 17:26:14 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Oct 2012 15:26:14 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349364374.36.0.574693324184.issue16113@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 17:26:20 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 15:26:20 +0000 Subject: [issue13405] Add DTrace probes In-Reply-To: <1321299726.66.0.343368151185.issue13405@psf.upfronthosting.co.za> Message-ID: <1349364380.91.0.461267153998.issue13405@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : Added file: http://bugs.python.org/file27416/775eeaf1a707.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 17:31:43 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 04 Oct 2012 15:31:43 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349364703.05.0.535583614691.issue16113@psf.upfronthosting.co.za> Christian Heimes added the comment: Release 0.1 of pysha3 [1] is out. I've tweaked the C module to make it compatible with Python 2.6 to 3.4. The module and its tests run successfully under Linux and Windows. So far I've tested Linux X84_64 (2.7, 3.2, 3.3, 3.4), Windows X86 (2.6, 2.7, 3.2, 3.3) and Windows X86_64 (2.6, 2.7, 3.2, 3.3). Please review Modules/sha3module.c and ignore all version specific #if blocks. For Python 3.4 I'm going to remove all blocks for Python < 3.3. [1] http://pypi.python.org/pypi/pysha3/0.1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 17:32:42 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Oct 2012 15:32:42 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349364762.98.0.0293830776852.issue16113@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Please review Modules/sha3module.c Can't you post a patch here? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 17:35:06 2012 From: report at bugs.python.org (David Beazley) Date: Thu, 04 Oct 2012 15:35:06 +0000 Subject: [issue16132] ctypes incorrectly encodes .format attribute of memory views Message-ID: <1349364906.03.0.586114989306.issue16132@psf.upfronthosting.co.za> New submission from David Beazley: This is somewhat related to an earlier bug report concerning memory views, but as far as I can tell, ctypes is not encoding the '.format' attribute correctly in most cases. Consider this example: First, create a ctypes array: >>> a = (ctypes.c_double * 3)(1,2,3) >>> len(a) 3 >>> a[0] 1.0 >>> a[1] 2.0 >>> Now, create a memory view for it: >>> m = memoryview(a) >>> len(m) 3 >>> m.itemsize 8 >>> m.ndim 1 >>> m.shape (3,) >>> All looks well. However, if you try to do anything with the .format or access the items, it's completely broken: >>> m.format '(3)>> m[0] Traceback (most recent call last): File "", line 1, in NotImplementedError: memoryview: unsupported format (3)>> This is quite inconsistent with the behavior observed elsewhere. For example: >>> import array >>> b = array.array('d',[1,2,3]) >>> memoryview(b).format 'd' >>> import numpy >>> c = numpy.array([1,2,3],dtype='d') >>> memoryview(c).format 'd' >>> As you can see, array libraries are using .format to encode the format of a single array item. ctypes is encoding the format of the entire array (all items). ctypes also includes endianness which presents additional difficulties. This behavior affects both Python code that wants to use memoryviews, but also C extension code that wants to use the underlying buffer protocol to work with arrays in a generic way. Essentially, it cuts the use of ctypes off entirely unless you modify the underlying buffer handling code to special case it. Suggested fix: Have ctypes only encode the format for a single item in the case of arrays. Also, for items that are encoded using the native byte ordering, don't include an endianness modifier ('<','>', etc.). Including the byte order just complicates all of the handling code because it has to be modified to a) know what the native byte ordering is and b) to check multiple cases such as for "d" and " _______________________________________ From report at bugs.python.org Thu Oct 4 17:42:32 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 15:42:32 +0000 Subject: [issue13405] Add DTrace probes In-Reply-To: <1321299726.66.0.343368151185.issue13405@psf.upfronthosting.co.za> Message-ID: <1349365352.49.0.44140153899.issue13405@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : Added file: http://bugs.python.org/file27417/9030a207c5d6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 17:44:15 2012 From: report at bugs.python.org (Ethan Furman) Date: Thu, 04 Oct 2012 15:44:15 +0000 Subject: [issue16131] Pylauncher is being installed in Windows system folder In-Reply-To: <1349362421.53.0.33140427567.issue16131@psf.upfronthosting.co.za> Message-ID: <1349365455.99.0.201846210221.issue16131@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +stoneleaf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 18:01:29 2012 From: report at bugs.python.org (Kushal Das) Date: Thu, 04 Oct 2012 16:01:29 +0000 Subject: [issue16130] "Porting to Python 3.3" needs to be fixed in "What's new In Python 3.4" In-Reply-To: <1349359753.54.0.0183920912001.issue16130@psf.upfronthosting.co.za> Message-ID: <1349366489.37.0.143480714935.issue16130@psf.upfronthosting.co.za> Kushal Das added the comment: Documentation patch to show correct Python version. ---------- keywords: +patch nosy: +kushaldas Added file: http://bugs.python.org/file27418/issue_16130.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 18:06:32 2012 From: report at bugs.python.org (Nidan) Date: Thu, 04 Oct 2012 16:06:32 +0000 Subject: [issue16133] asyncore.dispatcher.recv doesn't handle EAGAIN / EWOULDBLOCK Message-ID: <1349366792.42.0.417654527681.issue16133@psf.upfronthosting.co.za> New submission from Nidan: I recently had lots of the following exception: error: uncaptured python exception, closing channel (:[Errno 11] Resource temporarily unavailable [/usr/lib/python2.7/asynchat.py|handle_read|110] [/usr/lib/python2.7/asyncore.py|recv|384]) Error 11 is EAGAIN or EWOULDBLOCK, so asyncore/asynchat tries to read from a nonblocking socket which has no data available. Since this is a temporary error the socket shouldn't be closed. The bug can be fixed by changing asyncore.dispatcher.recv to def recv(self, buffer_size): try: data = self.socket.recv(buffer_size) if not data: # a closed connection is indicated by signaling # a read condition, and having recv() return 0. self.handle_close() return '' else: return data except socket.error, why: # winsock sometimes throws ENOTCONN if why.args[0] in _DISCONNECTED: self.handle_close() return '' elif why.args[0] in (EAGAIN, EWOULDBLOCK): return '' else: raise While looking at the source I also saw that asyncore.dispatcher.send and .connect check against EWOULDBLOCK but not against EAGAIN. Since both constants may have different values and POSIX allows to return either of them these functions should check against both error constants. ---------- components: Library (Lib) messages: 171967 nosy: Nidan priority: normal severity: normal status: open title: asyncore.dispatcher.recv doesn't handle EAGAIN / EWOULDBLOCK type: behavior versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 18:18:36 2012 From: report at bugs.python.org (Chris Rebert) Date: Thu, 04 Oct 2012 16:18:36 +0000 Subject: [issue16131] Pylauncher is being installed in Windows system folder In-Reply-To: <1349362421.53.0.33140427567.issue16131@psf.upfronthosting.co.za> Message-ID: <1349367516.57.0.273525678731.issue16131@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 18:19:43 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 04 Oct 2012 16:19:43 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349367583.44.0.03157442013.issue16113@psf.upfronthosting.co.za> Christian Heimes added the comment: How about a sandbox repos? ---------- hgrepos: +152 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 18:21:26 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 04 Oct 2012 16:21:26 +0000 Subject: [issue16131] Pylauncher is being installed in Windows system folder In-Reply-To: <1349362421.53.0.33140427567.issue16131@psf.upfronthosting.co.za> Message-ID: <1349367686.92.0.632621920632.issue16131@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is not a bug, but by design. See PEP 397 for details. ---------- nosy: +loewis resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 18:29:17 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 04 Oct 2012 16:29:17 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349368157.97.0.181257033782.issue16113@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- keywords: +patch Added file: http://bugs.python.org/file27419/4509ef9b28a0.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 18:29:40 2012 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 04 Oct 2012 16:29:40 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 In-Reply-To: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> Message-ID: <1349368180.49.0.768063876757.issue16116@psf.upfronthosting.co.za> Vinay Sajip added the comment: Since I expect it may be some time before the next Python release is out, ISTM a temporary workaround would be to add a line following line 192 of Lib\distutils\command\build_ext.py, which reads self.library_dirs.append(os.path.join(sys.exec_prefix, 'libs')) The new line should read self.library_dirs.append(os.path.join(sys.base_exec_prefix, 'libs')) Which will result in adding both directories to the library search path. This is a little untidy in the case when you're not in a venv, but it should still work. With that change, the link command now looks like C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\temp\venv\libs /LIBPATH:C:\Python33\libs /LIBPATH:C:\Python33 /LIBPATH:C:\temp\venv\PCbuild /EXPORT:PyInit__regex build\temp.win32-3.3\Release\Python3\_regex.obj build\temp.win32-3.3\Release\Python3\_regex_unicode.obj /OUT:build\lib.win32-3.3\_regex.pyd /IMPLIB:build\temp.win32-3.3\Release\Python3\_regex.lib /MANIFESTFILE:build\temp.win32-3.3\Release\Python3\_regex.pyd.manifest and the command succeeds. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 18:29:43 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Oct 2012 16:29:43 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349368183.95.0.683991199517.issue16113@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Good, you can click the "create patch" button when it's ready :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 18:33:52 2012 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 04 Oct 2012 16:33:52 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 In-Reply-To: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> Message-ID: <1349368432.44.0.678326249761.issue16116@psf.upfronthosting.co.za> Vinay Sajip added the comment: If you like, you can make the added line conditional on "if sys.base_exec_prefix != sys.prefix", which is the form the actual fix is likely to take. Thus: if sys.base_exec_prefix != sys.prefix: self.library_dirs.append(os.path.join(sys.base_exec_prefix, 'libs')) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 18:39:29 2012 From: report at bugs.python.org (Kyle Shannon) Date: Thu, 04 Oct 2012 16:39:29 +0000 Subject: [issue13477] tarfile module should have a command line In-Reply-To: <1322190665.85.0.356467902383.issue13477@psf.upfronthosting.co.za> Message-ID: <1349368769.09.0.528094410302.issue13477@psf.upfronthosting.co.za> Changes by Kyle Shannon : ---------- nosy: +kyle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 18:45:23 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Oct 2012 16:45:23 +0000 Subject: [issue16130] "Porting to Python 3.3" needs to be fixed in "What's new In Python 3.4" In-Reply-To: <1349359753.54.0.0183920912001.issue16130@psf.upfronthosting.co.za> Message-ID: <3XXg285d74zNfD@mail.python.org> Roundup Robot added the comment: New changeset b21288c1ec68 by Benjamin Peterson in branch 'default': 3.3 -> 3.4 (closes #16130) http://hg.python.org/cpython/rev/b21288c1ec68 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 18:48:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Oct 2012 16:48:55 +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: <1349369335.58.0.423983985065.issue16009@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch that makes error message more informative. I also changed message "Expecting object" to "Expecting value" as more conformed to JSON terminology. ---------- nosy: +storchaka Added file: http://bugs.python.org/file27420/json_errmsg.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 18:55:59 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 04 Oct 2012 16:55:59 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349369759.38.0.440142405873.issue8800@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Attached is a new version of Kristjan's patch with support for managers. (A threading._RWLockCore object is proxied and wrapped in a local instance of a subclass of threading.RWLock.) Also I made multiprocessing.RWLock.__init__() use multiprocessing.util.register_after_fork() to clear self._owners. Otherwise on Unix you can run into trouble if a forked processes starts a new thread whose id was in self._owners at the time of the fork. I found that test_many_readers() and test_recursion() tended to fail when run with processes (on Windows). This is because starting a process on Windows is slow, particularly with a debug build. (Some of the buildbots running Windows in a VM can be crazily slow.) Each reader only held the lock for 0.02 secs which is much less than the time to start a process on Windows. This meant that it was easy to never have overlapping ownership, causing the tests to fail. I fixed this by starting the readers while holding an exclusive, waiting for period, and then releasing the exclusive lock. This makes it possible to change self.assertTrue(max(nlocked) > 1) to self.assertEqual(max(nlocked), N) Choosing timeouts to keep the buildbots happy can be a pain:-( ---------- Added file: http://bugs.python.org/file27421/rwlock-sbt.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 19:08:52 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Oct 2012 17:08:52 +0000 Subject: [issue16120] Use |yield from| in stdlib In-Reply-To: <1349281098.96.0.245155104268.issue16120@psf.upfronthosting.co.za> Message-ID: <1349370532.62.0.301156369701.issue16120@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Personally I ran the following command: find -type f -name '*.py' -exec egrep -n -A1 '\bfor\b.*\bin\b' '{}' + | egrep -v 'yield +from' | egrep -B1 'yield +\w+(, *\w+)* *(#|$)' I deliberately missed tests and lib2to3, because that's where the changes required more attention. Berker Peksag found a few missed, these changes LGTM. ---------- nosy: +storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 19:16:29 2012 From: report at bugs.python.org (Piotr Dobrogost) Date: Thu, 04 Oct 2012 17:16:29 +0000 Subject: [issue16131] Pylauncher is being installed in Windows system folder In-Reply-To: <1349362421.53.0.33140427567.issue16131@psf.upfronthosting.co.za> Message-ID: <1349370989.0.0.798989123716.issue16131@psf.upfronthosting.co.za> Piotr Dobrogost added the comment: I read this pep. It doesn't tell why installing in Program Files and adding install folder to PATH wasn't chosen. Please take a look at the link I gave ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 19:21:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Oct 2012 17:21:26 +0000 Subject: [issue15513] Correct __sizeof__ support for pickle In-Reply-To: <1343723739.69.0.648602242607.issue15513@psf.upfronthosting.co.za> Message-ID: <1349371286.21.0.968304274284.issue15513@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patches will be more complex and will depend on functions added in the patches for issue15490. So I'm waiting for the final adoption of the patches for issue15490. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 19:24:23 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 04 Oct 2012 17:24:23 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349371463.75.0.931568309715.issue8800@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Fixed patch because I didn't test on Unix... ---------- Added file: http://bugs.python.org/file27422/rwlock-sbt.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 19:24:26 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 04 Oct 2012 17:24:26 +0000 Subject: [issue16131] Pylauncher is being installed in Windows system folder In-Reply-To: <1349362421.53.0.33140427567.issue16131@psf.upfronthosting.co.za> Message-ID: <1349371466.97.0.0130369152189.issue16131@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I read the discussion, but couldn't see anything relevant in it. Please be explicit. As for the reading the PEP, consider this paragraph in particular: It may be surprising that the launcher is installed into the Windows directory, and not the System32 directory. The reason is that the System32 directory is not on the Path of a 32-bit process running on a 64-bit system. However, the Windows directory is always on the path. I think this is quite an explicit rationale. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 19:24:34 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 04 Oct 2012 17:24:34 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349371474.64.0.356156058485.issue8800@psf.upfronthosting.co.za> Changes by Richard Oudkerk : Removed file: http://bugs.python.org/file27421/rwlock-sbt.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 19:48:14 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Oct 2012 17:48:14 +0000 Subject: [issue16133] asyncore.dispatcher.recv doesn't handle EAGAIN / EWOULDBLOCK In-Reply-To: <1349366792.42.0.417654527681.issue16133@psf.upfronthosting.co.za> Message-ID: <1349372894.85.0.783525470877.issue16133@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +giampaolo.rodola, josiahcarlson, stutzbach versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 19:56:16 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Oct 2012 17:56:16 +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: <3XXhc00jJ3zR26@mail.python.org> Roundup Robot added the comment: New changeset 7bd9626d8b4f by Antoine Pitrou in branch '3.3': Issue #16089: Allow ElementTree.TreeBuilder to work again with a non-Element element_factory (fixes a regression in SimpleTAL). http://hg.python.org/cpython/rev/7bd9626d8b4f New changeset a8c044188731 by Antoine Pitrou in branch 'default': Issue #16089: Allow ElementTree.TreeBuilder to work again with a non-Element element_factory (fixes a regression in SimpleTAL). http://hg.python.org/cpython/rev/a8c044188731 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 19:59:30 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Oct 2012 17:59:30 +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: <1349373570.06.0.0486320293724.issue16089@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 19:59:52 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 04 Oct 2012 17:59:52 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349373592.2.0.856331997368.issue16113@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file27419/4509ef9b28a0.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 20:00:19 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Oct 2012 18:00:19 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <1349373619.96.0.357172137367.issue16112@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This change broke test_platform for me: ====================================================================== ERROR: test_architecture (test.test_platform.PlatformTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/cpython/32/Lib/test/test_platform.py", line 11, in test_architecture res = platform.architecture() File "/home/antoine/cpython/32/Lib/platform.py", line 1072, in architecture if 'executable' not in fileout: TypeError: Type str doesn't support the buffer API ---------- nosy: +pitrou status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 20:05:38 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 04 Oct 2012 18:05:38 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349373938.72.0.438308170212.issue16113@psf.upfronthosting.co.za> Christian Heimes added the comment: Antoine pointed out that the code contains C++ comments and exports a lot of functions. The latest patch has all // comments replaced, marks all functions and globals as static and #includes the C files directly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 20:05:59 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 04 Oct 2012 18:05:59 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349373959.48.0.589817874936.issue16113@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: http://bugs.python.org/file27423/79e3fb1838ce.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 20:14:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Oct 2012 18:14: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: <1349374484.58.0.344856674681.issue16009@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27420/json_errmsg.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 20:18:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Oct 2012 18:18:12 +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: <1349374692.87.0.926420755945.issue16009@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file27424/json_errmsg.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 20:39:21 2012 From: report at bugs.python.org (Jorge Gomes) Date: Thu, 04 Oct 2012 18:39:21 +0000 Subject: [issue16134] Add support for RTMP schemes to urlparse Message-ID: <1349375961.84.0.319840553089.issue16134@psf.upfronthosting.co.za> New submission from Jorge Gomes: Please add support in urlparse for the family of RTMP schemes: rtmp rtmpe rtmps rtmpt I believe these schemes should be added to the following module variables: uses_relative uses_netloc uses_params uses_query [essentially, the one where rtsp already is] The RTMP spec is hosted at http://www.adobe.com/devnet/rtmp.html which describes the format as "protocol://servername:port/" The example provided there is rtmp://localhost:1935/test An example YouTube RTMP *service* URL looks like: rtmp://a.rtmp.youtube.com/videolive?ns=yt-live&id=123456&itag=35&signature=blahblahblah Please let me know if further information is required. Thanks! ======================================== Footnote: A full YouTube RTMP stream URL may look like this: rtmp://a.rtmp.youtube.com/videolive?ns=yt-live&id=123456&itag=35&signature=blahblahblah/yt-live.123456.35 i.e. it is the stream service url suffixed with '/' + the_stream_name. When one uses urlparse (extended with the 'rtmp' scheme), the stream name part gets lumped in with the last query value. I think it's reasonable to expect the user of the urlparse library to strip the stream name off, thus returning just the service URL, which can be parsed normally. However, if urlparse could handle this sort use-case generically, then that would be great. ---------- messages: 171984 nosy: Jorge.Gomes priority: normal severity: normal status: open title: Add support for RTMP schemes to urlparse 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 Thu Oct 4 20:43:06 2012 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 04 Oct 2012 18:43:06 +0000 Subject: [issue16134] Add support for RTMP schemes to urlparse In-Reply-To: <1349375961.84.0.319840553089.issue16134@psf.upfronthosting.co.za> Message-ID: <1349376186.7.0.403287925232.issue16134@psf.upfronthosting.co.za> Eric V. Smith added the comment: As this is a feature request, it can only be applied to 3.4. I've modified the versions. ---------- components: +Library (Lib) nosy: +eric.smith versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 20:49:09 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Oct 2012 18:49:09 +0000 Subject: [issue15417] Add support for csh and fish in venv activation scripts In-Reply-To: <1342915589.34.0.636198771973.issue15417@psf.upfronthosting.co.za> Message-ID: <3XXjn03R4zzR68@mail.python.org> Roundup Robot added the comment: New changeset c519b490f4e4 by Andrew Svetlov in branch 'default': Issue #15417: Add support for csh and fish in venv activation scripts. http://hg.python.org/cpython/rev/c519b490f4e4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 20:50:27 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 04 Oct 2012 18:50:27 +0000 Subject: [issue15417] Add support for csh and fish in venv activation scripts In-Reply-To: <1342915589.34.0.636198771973.issue15417@psf.upfronthosting.co.za> Message-ID: <1349376627.58.0.633059493092.issue15417@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- assignee: -> asvetlov resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 21:10:19 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Oct 2012 19:10:19 +0000 Subject: [issue14446] Remove deprecated tkinter functions In-Reply-To: <1333051070.39.0.337099775152.issue14446@psf.upfronthosting.co.za> Message-ID: <3XXkFQ4Z37zR72@mail.python.org> Roundup Robot added the comment: New changeset 83da5729e362 by Andrew Svetlov in branch 'default': Issue #14446: Remove deprecated tkinter functions http://hg.python.org/cpython/rev/83da5729e362 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 21:13:28 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 04 Oct 2012 19:13:28 +0000 Subject: [issue14446] Remove deprecated tkinter functions In-Reply-To: <1333051070.39.0.337099775152.issue14446@psf.upfronthosting.co.za> Message-ID: <1349378008.06.0.632391057144.issue14446@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Thanks to Michael Driscoll. BTW you have forgotten to remove C functions from module definition in your patch. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 21:28:34 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Oct 2012 19:28:34 +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: <1349378914.48.0.256402692966.issue16009@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated. Conformed other error messages. Now expected exceptions raised for all of the following strings: '' '[' '[42' '[42,' '{' '{"' '{"spam' '{"spam"' '{"spam":' '{"spam":42' '{"spam":42,' ---------- Added file: http://bugs.python.org/file27425/json_errmsg_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 21:49:09 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Oct 2012 19:49:09 +0000 Subject: [issue14997] IDLE tries to run shell window if line is completed with F5 rather than Enter In-Reply-To: <1338773408.15.0.466172747854.issue14997@psf.upfronthosting.co.za> Message-ID: <3XXl6D29VrzR7m@mail.python.org> Roundup Robot added the comment: New changeset f6aaac839d83 by Andrew Svetlov in branch '3.2': Issue #14997: disable in idle shell window. http://hg.python.org/cpython/rev/f6aaac839d83 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 21:52:39 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Oct 2012 19:52:39 +0000 Subject: [issue14997] IDLE tries to run shell window if line is completed with F5 rather than Enter In-Reply-To: <1338773408.15.0.466172747854.issue14997@psf.upfronthosting.co.za> Message-ID: <3XXlBG5YwFzMgy@mail.python.org> Roundup Robot added the comment: New changeset 52ef53398096 by Andrew Svetlov in branch '3.3': Merge: Issue #14997: disable in idle shell window. http://hg.python.org/cpython/rev/52ef53398096 New changeset a40981be184d by Andrew Svetlov in branch 'default': Merge: Issue #14997: disable in idle shell window. http://hg.python.org/cpython/rev/a40981be184d New changeset 06772ba3d001 by Andrew Svetlov in branch '2.7': Issue #14997: disable in idle shell window. http://hg.python.org/cpython/rev/06772ba3d001 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 21:53:42 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 04 Oct 2012 19:53:42 +0000 Subject: [issue14997] IDLE tries to run shell window if line is completed with F5 rather than Enter In-Reply-To: <1338773408.15.0.466172747854.issue14997@psf.upfronthosting.co.za> Message-ID: <1349380422.88.0.239001725277.issue14997@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks to Roger Serwy. ---------- nosy: +asvetlov resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 22:04:16 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 04 Oct 2012 20:04:16 +0000 Subject: [issue16096] Get rid of dangerous integer overflow tricks In-Reply-To: <1349030051.26.0.323672452753.issue16096@psf.upfronthosting.co.za> Message-ID: <1349381056.79.0.256493655222.issue16096@psf.upfronthosting.co.za> Andrew Svetlov added the comment: The patches looks good for me, but I like to double check before commit. Let's wait for a week for other reviewers. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 22:13:43 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Oct 2012 20:13:43 +0000 Subject: [issue16096] Get rid of dangerous integer overflow tricks In-Reply-To: <1349030051.26.0.323672452753.issue16096@psf.upfronthosting.co.za> Message-ID: <1349381623.42.0.817942381151.issue16096@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 22:19:18 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Oct 2012 20:19:18 +0000 Subject: [issue16096] Get rid of dangerous integer overflow tricks In-Reply-To: <1349030051.26.0.323672452753.issue16096@psf.upfronthosting.co.za> Message-ID: <1349381958.91.0.207831473494.issue16096@psf.upfronthosting.co.za> STINNER Victor added the comment: It's maybe safer (and simpler) to not touch such code in Python older than 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 22:57:27 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 04 Oct 2012 20:57:27 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349384247.38.0.56166188585.issue16113@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file27423/79e3fb1838ce.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 22:59:03 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 04 Oct 2012 20:59:03 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349384343.47.0.422572363578.issue16113@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: http://bugs.python.org/file27426/44920b1d9db1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 23:02:25 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 04 Oct 2012 21:02:25 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349384545.88.0.699421359321.issue16113@psf.upfronthosting.co.za> Christian Heimes added the comment: Please review the latest patch. I've included Gregory as he is the creator of hashlib. ---------- nosy: +gregory.p.smith stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 23:11:12 2012 From: report at bugs.python.org (thbach) Date: Thu, 04 Oct 2012 21:11:12 +0000 Subject: [issue16110] Provide logging.config.configParserConfig In-Reply-To: <1349191631.16.0.42047016451.issue16110@psf.upfronthosting.co.za> Message-ID: <1349385072.3.0.471151358609.issue16110@psf.upfronthosting.co.za> thbach added the comment: vinay: I understand your preference of dictConfig over fileConfig as maintainer. But as an application developer I want to provide my user an easy way to adjust logging herself. In the end of the day she is the one knowing what has to be logged in which place. Therefor, having something like fileConfig is essential. david: The modified configuration can be passed to fileConfig via a StringIO instance. The downside is that ConfigParser instances with e.g. 'allow_no_value' set to True are currently difficult to handle ? e.g.: >>> sys.version '3.2.3 (default, Jun 25 2012, 23:10:56) \n[GCC 4.7.1]' >>> cp = configparser.ConfigParser(allow_no_value=True) >>> cp.read_string('[foo]\nbar') >>> buf = io.StringIO() >>> cp.write(buf) >>> buf.seek(0) 0 >>> logging.config.fileConfig(buf) --------------------------------------------------------------------------- ParsingError Traceback (most recent call last) in () ----> 1 logging.config.fileConfig(buf) /usr/lib/python3.2/logging/config.py in fileConfig(fname, defaults, disable_existing_loggers) 64 cp = configparser.ConfigParser(defaults) 65 if hasattr(fname, 'readline'): ---> 66 cp.read_file(fname) 67 else: 68 cp.read(fname) /usr/lib/python3.2/configparser.py in read_file(self, f, source) 706 except AttributeError: 707 source = '' --> 708 self._read(f, source) 709 710 def read_string(self, string, source=''): /usr/lib/python3.2/configparser.py in _read(self, fp, fpname) 1079 # if any parsing errors occurred, raise an exception 1080 if e: -> 1081 raise e 1082 self._join_multiline_values() 1083 ParsingError: Source contains parsing errors: [line 2]: 'bar\n' Hence, logging.config.fileConfig should at least provide a way to pass in arguments for the ConfigParser initialization. Anyways, I think it is much cleaner to provide a function which gets the configuration directly from the ConfigParser instance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 23:25:35 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 04 Oct 2012 21:25:35 +0000 Subject: [issue4821] Patches for thread-support in built-in SHA modules In-Reply-To: <1231002504.32.0.171592356443.issue4821@psf.upfronthosting.co.za> Message-ID: <1349385935.93.0.426603214915.issue4821@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 23:34:57 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Thu, 04 Oct 2012 21:34:57 +0000 Subject: [issue16105] Pass read only FD to signal.set_wakeup_fd In-Reply-To: <1349316897.97.0.137147003848.issue16105@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > You mean retry one time or until success? Until success. It should also come with a test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 23:40:37 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Thu, 04 Oct 2012 21:40:37 +0000 Subject: [issue14574] SocketServer doesn't handle client disconnects properly In-Reply-To: <1349348513.12.0.9546949959.issue14574@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Please consider the attached patch and see if it solves the issue. The patch looks OK (although I'd prefer a BSD errno example, such as ECONNRESET, instead of a winsock one). We should also update the documentation that states that in finish() won't be called if handle() raises an exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:11:28 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Oct 2012 22:11:28 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <1349388688.83.0.665781446907.issue16112@psf.upfronthosting.co.za> STINNER Victor added the comment: Reopen: test_platform is failing. Attached patch should fix the issue. It fixes a theoric "deadlock" issue in _syscmd_file: use proc.communicate() instead of proc.stdout.read(). ---------- resolution: fixed -> Added file: http://bugs.python.org/file27427/platform.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:20:07 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 22:20:07 +0000 Subject: [issue16135] Removal of OS/2 support Message-ID: <1349389207.71.0.143036356134.issue16135@psf.upfronthosting.co.za> New submission from Jes?s Cea Avi?n: According to PEP-11, We have to remove OS/2 support for 3.4. ---------- messages: 172000 nosy: jcea priority: normal severity: normal status: open title: Removal of OS/2 support versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:21:03 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 22:21:03 +0000 Subject: [issue16136] Removal of VMS support Message-ID: <1349389263.57.0.925729224322.issue16136@psf.upfronthosting.co.za> New submission from Jes?s Cea Avi?n: According to PEP-11, we have to remove VMS support. ---------- messages: 172001 nosy: jcea priority: normal severity: normal status: open title: Removal of VMS support versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:29:17 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Oct 2012 22:29:17 +0000 Subject: [issue16136] Removal of VMS support In-Reply-To: <1349389263.57.0.925729224322.issue16136@psf.upfronthosting.co.za> Message-ID: <1349389757.38.0.00117420368528.issue16136@psf.upfronthosting.co.za> STINNER Victor added the comment: Python on VMS is maybe not completly dead: http://www.vmspython.org/History ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:35:09 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 22:35:09 +0000 Subject: [issue16135] Removal of OS/2 support In-Reply-To: <1349389207.71.0.143036356134.issue16135@psf.upfronthosting.co.za> Message-ID: <1349390109.95.0.291749600387.issue16135@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- assignee: -> jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:35:19 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Oct 2012 22:35:19 +0000 Subject: [issue16135] Removal of OS/2 support In-Reply-To: <1349389207.71.0.143036356134.issue16135@psf.upfronthosting.co.za> Message-ID: <1349390119.41.0.991558661835.issue16135@psf.upfronthosting.co.za> STINNER Victor added the comment: I first proposed to drop OS/2 support in 2010. Andrew MacIntyre ported Python 2 to OS/2, he answered me: "The 3.x branch needs quite a bit of work on OS/2 to deal with Unicode, as OS/2 was one of the earlier OSes with full multiple language support and IBM developed a unique API. I'm still struggling to come to terms with this, partly because I myself don't "need" it." Full answer: http://mail.python.org/pipermail/python-dev/2010-April/099477.html Thread in 2010: http://mail.python.org/pipermail/python-dev/2010-April/099471.html Thread in 2011: http://mail.python.org/pipermail/python-dev/2011-April/110872.html ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:35:43 2012 From: report at bugs.python.org (Viktor Chynarov) Date: Thu, 04 Oct 2012 22:35:43 +0000 Subject: [issue16137] Using time.asctime() with an array with negative tm_hour causes Python Crash. Message-ID: <1349390143.92.0.685174043431.issue16137@psf.upfronthosting.co.za> New submission from Viktor Chynarov: If a that has a negative tm_hour is passed as an argument to time.asctime(), Python crashes. >>> initial_struct_time = [tm for tm in time.localtime()] >>> initial_struct_time[3] = -1 >>> faulty_time = time.asctime(initial_struct_time) ---------- components: Library (Lib) messages: 172005 nosy: Viktor.Chynarov priority: normal severity: normal status: open title: Using time.asctime() with an array with negative tm_hour causes Python Crash. type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:36:34 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Oct 2012 22:36:34 +0000 Subject: [issue16135] Removal of OS/2 support In-Reply-To: <1349389207.71.0.143036356134.issue16135@psf.upfronthosting.co.za> Message-ID: <1349390194.36.0.696951425507.issue16135@psf.upfronthosting.co.za> STINNER Victor added the comment: See also: http://blog.python.org/2011/05/python-33-to-drop-support-for-os2.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:36:38 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Oct 2012 22:36:38 +0000 Subject: [issue16136] Removal of VMS support In-Reply-To: <1349389263.57.0.925729224322.issue16136@psf.upfronthosting.co.za> Message-ID: <1349390198.83.0.133930831615.issue16136@psf.upfronthosting.co.za> STINNER Victor added the comment: See also: http://blog.python.org/2011/05/python-33-to-drop-support-for-os2.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:36:51 2012 From: report at bugs.python.org (Viktor Chynarov) Date: Thu, 04 Oct 2012 22:36:51 +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: <1349390211.11.0.117838581657.issue16137@psf.upfronthosting.co.za> Viktor Chynarov added the comment: If an array created from a struct_time that has a negative tm_hour is passed as an argument to time.asctime(), Python crashes. >>> initial_struct_time = [tm for tm in time.localtime()] >>> initial_struct_time[3] = -1 >>> faulty_time = time.asctime(initial_struct_time) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:37:30 2012 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 04 Oct 2012 22:37:30 +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: <1349390250.7.0.260012333319.issue16089@psf.upfronthosting.co.za> Eli Bendersky added the comment: Antoine, Thanks! You said : > the coding style there is quite old It would be great if you could elaborate, however briefly, if there's anything else besides your fixes that is old and should be modernized. I will admit to writing some of that code very recently, but that's mostly because I was trying to follow the existing coding style of the module, which was written a long time ago. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:38:00 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Oct 2012 22:38:00 +0000 Subject: [issue16136] Removal of VMS support In-Reply-To: <1349389263.57.0.925729224322.issue16136@psf.upfronthosting.co.za> Message-ID: <1349390280.21.0.808692106143.issue16136@psf.upfronthosting.co.za> STINNER Victor added the comment: After the blog post, Mathew, Sandeep from HP asked how to help: http://mail.python.org/pipermail/python-dev/2011-May/111367.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:38:32 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Oct 2012 22:38:32 +0000 Subject: [issue16136] Removal of VMS support In-Reply-To: <1349389263.57.0.925729224322.issue16136@psf.upfronthosting.co.za> Message-ID: <1349390312.05.0.496803006432.issue16136@psf.upfronthosting.co.za> STINNER Victor added the comment: Another email from Mathew, Sandeep: http://mail.python.org/pipermail/python-dev/2011-May/111382.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:40:51 2012 From: report at bugs.python.org (Trent Nelson) Date: Thu, 04 Oct 2012 22:40:51 +0000 Subject: [issue16136] Removal of VMS support In-Reply-To: <1349389263.57.0.925729224322.issue16136@psf.upfronthosting.co.za> Message-ID: <1349390451.09.0.633948583025.issue16136@psf.upfronthosting.co.za> Trent Nelson added the comment: FWIW, I have another Itanium box that I've earmarked for OpenVMS. I don't believe the installation media is readily available for free, though, so I'd need to ping HP to try arrange a copy. ---------- nosy: +trent _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:46:19 2012 From: report at bugs.python.org (py.user) Date: Thu, 04 Oct 2012 22:46:19 +0000 Subject: [issue16138] In the glossary there is a small typo about __len__() in the sequence definition Message-ID: <1349390779.55.0.0497820141471.issue16138@psf.upfronthosting.co.za> New submission from py.user: http://docs.python.org/py3k/glossary.html#term-sequence "and defines a len() method that returns the length of the sequence" change to "and defines a __len__() special method that returns the length of the sequence" ---------- assignee: docs at python components: Documentation messages: 172013 nosy: docs at python, py.user priority: normal severity: normal status: open title: In the glossary there is a small typo about __len__() in the sequence definition versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:46:59 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Oct 2012 22:46:59 +0000 Subject: [issue16089] _elementtree.TreeBuilder broken with a non-C-deriving element_factory In-Reply-To: <1349390250.7.0.260012333319.issue16089@psf.upfronthosting.co.za> Message-ID: <1349390740.3353.3.camel@localhost.localdomain> Antoine Pitrou added the comment: > > the coding style there is quite old > > It would be great if you could elaborate, however briefly, if there's > anything else besides your fixes that is old and should be modernized. > I will admit to writing some of that code very recently, but that's > mostly because I was trying to follow the existing coding style of the > module, which was written a long time ago. I don't think that's you. I was talking about some of the cruft I removed (such as list_join() which was going through complicated hoops instead of calling PyUnicode_Join(), or manual filling of tuples instead of calling PyTuple_Pack()). There are still issues with internal functions stealing references and such. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:50:24 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Oct 2012 22:50:24 +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: <1349391024.84.0.674848761161.issue16129@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +lemburg, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:50:42 2012 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 04 Oct 2012 22:50:42 +0000 Subject: [issue16110] Provide logging.config.configParserConfig In-Reply-To: <1349191631.16.0.42047016451.issue16110@psf.upfronthosting.co.za> Message-ID: <1349391042.73.0.224003498489.issue16110@psf.upfronthosting.co.za> Vinay Sajip added the comment: I could consider relaxing the parameters on fileConfig such that instead of accepting just a string or a file-like object, it additionally accepts a ConfigParser instance. More specifically: def fileConfig(file_or_fname_or_cp, defaults=None): if isinstance(file_or_fname_or_cp, RawConfigParser): cp = file_or_filename_or_cp else: cp = ConfigParser.ConfigParser(defaults) if hasattr(cp, 'readfp') and\ hasattr(file_or_fname_or_cp, 'readline'): cp.readfp(file_or_fname_or_cp) else: cp.read(file_or_fname_or_cp) formatters = _create_formatters(cp) This will only require (in addition to the above) small tweaks to docs and tests. It would appear to fit the bill for your use case. Do you agree? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:52:39 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 04 Oct 2012 22:52:39 +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: <1349391159.62.0.0594655664425.issue16137@psf.upfronthosting.co.za> R. David Murray added the comment: I can't reproduce this. What version of 2.7? (This might have been fixed by the issue 8013 fix). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:53:04 2012 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 04 Oct 2012 22:53:04 +0000 Subject: [issue16110] Provide logging.config.configParserConfig In-Reply-To: <1349191631.16.0.42047016451.issue16110@psf.upfronthosting.co.za> Message-ID: <1349391184.14.0.415117633491.issue16110@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- resolution: wont fix -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 01:00:33 2012 From: report at bugs.python.org (David Benjamin) Date: Thu, 04 Oct 2012 23:00:33 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <1349391633.38.0.464745635747.issue16112@psf.upfronthosting.co.za> David Benjamin added the comment: Well, the theoretical deadlock's just if stdin is also a pipe, right? I think there isn't be a difference between communicate and stdout.read if only stdout is a pipe. Though it might be worth passing DEVNULL to stdin instead of inheriting, just to be tidy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 01:05:49 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Oct 2012 23:05:49 +0000 Subject: [issue16135] Removal of OS/2 support In-Reply-To: <1349389207.71.0.143036356134.issue16135@psf.upfronthosting.co.za> Message-ID: <3XXqT8716QzNxV@mail.python.org> Roundup Robot added the comment: New changeset ffc6e6b00949 by Jesus Cea in branch 'default': #16135: Removal of OS/2 support (I) http://hg.python.org/cpython/rev/ffc6e6b00949 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 01:07:07 2012 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 04 Oct 2012 23:07:07 +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: <1349392027.18.0.545708386682.issue16089@psf.upfronthosting.co.za> Eli Bendersky added the comment: Ah, OK. I was actually putting off refactorings in that code to after refactoring the test suite. The latter is in progress, it was paused by my vacation but I do plan to resume it eventually. Once the test suite is sufficiently humane (esp. moves off doctest to enable normal testing of multiple modules with the same set of tests) the refactoring should become easier. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 01:11:23 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Oct 2012 23:11:23 +0000 Subject: [issue16135] Removal of OS/2 support In-Reply-To: <1349389207.71.0.143036356134.issue16135@psf.upfronthosting.co.za> Message-ID: <3XXqbZ3y3NzLyL@mail.python.org> Roundup Robot added the comment: New changeset b08416a31d15 by Jesus Cea in branch 'default': #16135: Removal of OS/2 support (Docs) http://hg.python.org/cpython/rev/b08416a31d15 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 01:19:43 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Oct 2012 23:19:43 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349391633.38.0.464745635747.issue16112@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > Well, the theoretical deadlock's just if stdin is also a pipe, right? If I remember correctly, the parent process (Python) and the child process (file) can be blocked if the child is blocked in a blocking write into a pipe (ex: stderr), whereas the pipe buffer is full (the size of the buffer is usually 4096 bytes) and the parent is reading all content of another pipe (ex: stdout). So it occurs if the process uses more than 1 pipe for standard input/output streams. In the case of platform, it looks like the issue cannot occur. I always prefer communicate() because I consider it safer :-) > Though it might be worth passing DEVNULL to stdin instead of inheriting, just to be tidy. Yeah, maybe. As you want. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 01:19:47 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Oct 2012 23:19:47 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <1349392787.78.0.234863681351.issue16112@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Victor: your patch doesn't apply on 3.2, but it works for me on 3.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 01:21:01 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Oct 2012 23:21:01 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <1349392861.05.0.0269479289485.issue16112@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Victor is right, communicate() is usually the right way to do it. No need to use unsafe idioms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 01:21:16 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Oct 2012 23:21:16 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <1349392876.18.0.94032803594.issue16112@psf.upfronthosting.co.za> STINNER Victor added the comment: > Victor: your patch doesn't apply on 3.2, but it works for me on 3.3. I wrote it for Python 3.4. I'm too lazy for adapt it to other branches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 01:22:50 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Oct 2012 23:22:50 +0000 Subject: [issue16135] Removal of OS/2 support In-Reply-To: <1349389207.71.0.143036356134.issue16135@psf.upfronthosting.co.za> Message-ID: <1349392970.64.0.994349811995.issue16135@psf.upfronthosting.co.za> STINNER Victor added the comment: Most of the OS/2 specific code in the C part: search PYOS_OS2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 01:37:29 2012 From: report at bugs.python.org (David Benjamin) Date: Thu, 04 Oct 2012 23:37:29 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <1349393849.82.0.646584628804.issue16112@psf.upfronthosting.co.za> David Benjamin added the comment: Yes, communicate is needed if you have multiple pipes and need to be careful about both ends doing a blocking reads/writes on different ones. There's only one pipe here. Eh, whatever. If you guys really want to use communicate, I don't really care. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 01:48:21 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Oct 2012 23:48:21 +0000 Subject: [issue16135] Removal of OS/2 support In-Reply-To: <1349389207.71.0.143036356134.issue16135@psf.upfronthosting.co.za> Message-ID: <3XXrQF0nB2zNCv@mail.python.org> Roundup Robot added the comment: New changeset 29155fa21a41 by Jesus Cea in branch 'default': #16135: Removal of OS/2 support (posixmodule y platform dependent files) http://hg.python.org/cpython/rev/29155fa21a41 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 01:50:43 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Oct 2012 23:50:43 +0000 Subject: [issue16135] Removal of OS/2 support In-Reply-To: <1349389207.71.0.143036356134.issue16135@psf.upfronthosting.co.za> Message-ID: <1349394643.59.0.246158748895.issue16135@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Victor, I am removing the support step by step, because I am monitoring the buildbots. Thanks for taking an eye on this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 01:53:00 2012 From: report at bugs.python.org (Andrew Gallagher) Date: Thu, 04 Oct 2012 23:53:00 +0000 Subject: [issue16139] Python 3.3 fails when starting from read-only FS Message-ID: <1349394780.28.0.923022645672.issue16139@psf.upfronthosting.co.za> New submission from Andrew Gallagher: This occurs when python is installed on a read-only mount AND all the .pyc files are out-of-date. Therefore, when python starts and attempts to write a new .pyc file, _write_atomic in "Lib/importlib/_bootstrap.py" throws an OSError with an errno of EROFS, which is not handled (and ignored) and kills the interpreter. $ python Fatal Python error: Py_Initialize: Unable to get the locale encoding Traceback (most recent call last): File "", line 1558, in _find_and_load File "", line 1525, in _find_and_load_unlocked File "", line 586, in _check_name_wrapper File "", line 1023, in load_module File "", line 1004, in load_module File "", line 562, in module_for_loader_wrapper File "", line 854, in _load_module File "", line 990, in get_code File "", line 1051, in _cache_bytecode File "", line 1074, in set_data File "", line 128, in _write_atomic OSError: [Errno 30] Read-only file system: '/lib/python3.3/encodings/__pycache__/__init__.cpython-33.pyc.139872939267056' Aborted (core dumped) The following (hacky) patch fixes the issue for me: --- a/Python-3.3.0/Lib/importlib/_bootstrap.py +++ b/Python-3.3.0/Lib/importlib/_bootstrap.py @@ -1070,6 +1070,10 @@ class SourceFileLoader(FileLoader, SourceLoader): # If can't get proper access, then just forget about writing # the data. return + except OSError as e: + if e.errno != 30: # ignore EROFS + raise + return try: _write_atomic(path, data, _mode) _verbose_message('created {!r}', path) @@ -1077,6 +1081,9 @@ class SourceFileLoader(FileLoader, SourceLoader): # Don't worry if you can't write bytecode or someone is writing # it at the same time. pass + except OSError as e: + if e.errno != 30: # ignore EROFS + raise ---------- components: Library (Lib) messages: 172029 nosy: andrewjcg priority: normal severity: normal status: open title: Python 3.3 fails when starting from read-only FS type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 01:55:36 2012 From: report at bugs.python.org (Felipe Cruz) Date: Thu, 04 Oct 2012 23:55:36 +0000 Subject: [issue16105] Pass read only FD to signal.set_wakeup_fd In-Reply-To: <1349125559.77.0.651840030069.issue16105@psf.upfronthosting.co.za> Message-ID: <1349394936.75.0.52792414677.issue16105@psf.upfronthosting.co.za> Felipe Cruz added the comment: This patch retries write() until success if errno == EINTR. There is also a test. ---------- Added file: http://bugs.python.org/file27428/issue16105_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 01:57:37 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 04 Oct 2012 23:57:37 +0000 Subject: [issue16139] Python 3.3 fails when starting from read-only FS In-Reply-To: <1349394780.28.0.923022645672.issue16139@psf.upfronthosting.co.za> Message-ID: <1349395057.18.0.582282257428.issue16139@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +brett.cannon type: behavior -> crash versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 02:11:49 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Oct 2012 00:11:49 +0000 Subject: [issue16135] Removal of OS/2 support In-Reply-To: <1349389207.71.0.143036356134.issue16135@psf.upfronthosting.co.za> Message-ID: <3XXrxJ38CyzNCJ@mail.python.org> Roundup Robot added the comment: New changeset dea15868963f by Jesus Cea in branch 'default': #16135: Removal of OS/2 support (Modules/*) http://hg.python.org/cpython/rev/dea15868963f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 02:16:30 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Oct 2012 00:16:30 +0000 Subject: [issue16139] Python 3.3 fails when starting from read-only FS In-Reply-To: <1349394780.28.0.923022645672.issue16139@psf.upfronthosting.co.za> Message-ID: <1349396190.31.0.984210608868.issue16139@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 3.2 logs an error to stderr (if Python is started in verbose mode) if the directory and/or the pyc file cannot be created, and continue. #ifdef MS_WINDOWS if (_mkdir(cpathname) < 0 && errno != EEXIST) { #else if (mkdir(cpathname, dirmode) < 0 && errno != EEXIST) { #endif *dirpath = saved; if (Py_VerboseFlag) PySys_WriteStderr( "# cannot create cache dir %s\n", cpathname); return; } *dirpath = saved; fp = open_exclusive(cpathname, mode); if (fp == NULL) { if (Py_VerboseFlag) PySys_WriteStderr( "# can't create %s\n", cpathname); return; } ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 02:21:34 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Oct 2012 00:21:34 +0000 Subject: [issue16139] Python 3.3 fails when starting from read-only FS In-Reply-To: <1349394780.28.0.923022645672.issue16139@psf.upfronthosting.co.za> Message-ID: <1349396494.84.0.994090705293.issue16139@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hmm... I guess maybe we should trap all OSErrors after all (and print the error when in verbose mode). ---------- nosy: +neologix, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 02:27:53 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Oct 2012 00:27:53 +0000 Subject: [issue16135] Removal of OS/2 support In-Reply-To: <1349389207.71.0.143036356134.issue16135@psf.upfronthosting.co.za> Message-ID: <3XXsHq2g83zP4Q@mail.python.org> Roundup Robot added the comment: New changeset 42c063b3821f by Jesus Cea in branch 'default': #16135: Removal of OS/2 support (C code and Docs) http://hg.python.org/cpython/rev/42c063b3821f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 02:34:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Oct 2012 00:34:14 +0000 Subject: [issue16127] Correct mentions of narrow build in documentation and comments In-Reply-To: <1349335068.5.0.242255338591.issue16127@psf.upfronthosting.co.za> Message-ID: <3XXsR96vMZzM4S@mail.python.org> Roundup Robot added the comment: New changeset a1aa13ef00c5 by Ezio Melotti in branch '3.3': #16127: remove outdated references to narrow builds. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/a1aa13ef00c5 New changeset 89ee959a9b54 by Ezio Melotti in branch 'default': #16127: merge with 3.3. http://hg.python.org/cpython/rev/89ee959a9b54 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 02:34:51 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 05 Oct 2012 00:34:51 +0000 Subject: [issue16127] Correct mentions of narrow build in documentation and comments In-Reply-To: <1349335068.5.0.242255338591.issue16127@psf.upfronthosting.co.za> Message-ID: <1349397291.16.0.852828886551.issue16127@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 02:38:10 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 05 Oct 2012 00:38:10 +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: <1349397490.31.0.0889986766737.issue16009@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: needs patch -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 03:16:00 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Oct 2012 01:16:00 +0000 Subject: [issue16135] Removal of OS/2 support In-Reply-To: <1349389207.71.0.143036356134.issue16135@psf.upfronthosting.co.za> Message-ID: <3XXtMM49FqzNtX@mail.python.org> Roundup Robot added the comment: New changeset d853354e1470 by Jesus Cea in branch 'default': #16135: Removal of OS/2 support (Remove OS2 and OS/2 references) http://hg.python.org/cpython/rev/d853354e1470 New changeset 15949f34e08f by Jesus Cea in branch 'default': #16135: Removal of OS/2 support (Python code partial cleanup) http://hg.python.org/cpython/rev/15949f34e08f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 03:38:41 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Oct 2012 01:38:41 +0000 Subject: [issue16135] Removal of OS/2 support In-Reply-To: <1349389207.71.0.143036356134.issue16135@psf.upfronthosting.co.za> Message-ID: <3XXtsX2bwhzQq5@mail.python.org> Roundup Robot added the comment: New changeset 9ba1f113c3ec by Jesus Cea in branch 'default': Closes #16135: Removal of OS/2 support http://hg.python.org/cpython/rev/9ba1f113c3ec ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 03:39:37 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 05 Oct 2012 01:39:37 +0000 Subject: [issue16135] Removal of OS/2 support In-Reply-To: <1349389207.71.0.143036356134.issue16135@psf.upfronthosting.co.za> Message-ID: <1349401177.54.0.467508656813.issue16135@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: I am leaving alone "distutils", "zlib" and "libffi", because I think they are external projects. is that OK?. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 03:55:50 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 05 Oct 2012 01:55:50 +0000 Subject: [issue14446] Remove deprecated tkinter functions In-Reply-To: <1333051070.39.0.337099775152.issue14446@psf.upfronthosting.co.za> Message-ID: <1349402150.96.0.699784298428.issue14446@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: I am getting a warning about a statically defined function not being used: Static functions not called inside the module can be safely deleted. In this case, "Merge". ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 03:58:09 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Oct 2012 01:58:09 +0000 Subject: [issue14446] Remove deprecated tkinter functions In-Reply-To: <1333051070.39.0.337099775152.issue14446@psf.upfronthosting.co.za> Message-ID: <3XXvJ05Yk9zQGK@mail.python.org> Roundup Robot added the comment: New changeset f4f45d8ff785 by Jesus Cea in branch 'default': Issue #14446: Remove deprecated tkinter functions: Delete an unused function to avoid a warning http://hg.python.org/cpython/rev/f4f45d8ff785 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 04:03:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Oct 2012 02:03:14 +0000 Subject: [issue14446] Remove deprecated tkinter functions In-Reply-To: <1333051070.39.0.337099775152.issue14446@psf.upfronthosting.co.za> Message-ID: <3XXvPt1KdbzQqT@mail.python.org> Roundup Robot added the comment: New changeset e278f3ab0190 by Jesus Cea in branch 'default': Issue #14446: Remove deprecated tkinter functions: Delete an unused function to avoid a warning http://hg.python.org/cpython/rev/e278f3ab0190 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 04:25:10 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 05 Oct 2012 02:25:10 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za> Message-ID: <1349403910.75.0.690568222045.issue10142@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 04:50:43 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Oct 2012 02:50:43 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <3XXwSZ4jV6zQX0@mail.python.org> Roundup Robot added the comment: New changeset b94a9ff13199 by Jesus Cea in branch '2.7': #16112: platform.architecture does not correctly escape argument to /usr/bin/file. Use 'communicate()' http://hg.python.org/cpython/rev/b94a9ff13199 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 04:53:26 2012 From: report at bugs.python.org (Meador Inge) Date: Fri, 05 Oct 2012 02:53:26 +0000 Subject: [issue16132] ctypes incorrectly encodes .format attribute of memory views In-Reply-To: <1349364906.03.0.586114989306.issue16132@psf.upfronthosting.co.za> Message-ID: <1349405606.69.0.412533008819.issue16132@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 05:19:04 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Oct 2012 03:19:04 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <3XXx5J4R9MzP7v@mail.python.org> Roundup Robot added the comment: New changeset 04f39958aea9 by Jesus Cea in branch '3.2': #16112: platform.architecture does not correctly escape argument to /usr/bin/file. Use 'communicate()' and decode the bytes http://hg.python.org/cpython/rev/04f39958aea9 New changeset 19d37c8d1882 by Jesus Cea in branch '2.7': #16112: platform.architecture does not correctly escape argument to /usr/bin/file. Fix original patch http://hg.python.org/cpython/rev/19d37c8d1882 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 05:37:18 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Oct 2012 03:37:18 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <3XXxVN1scZzNk8@mail.python.org> Roundup Robot added the comment: New changeset 9838ae397a19 by Jesus Cea in branch '3.2': #16112: platform.architecture does not correctly escape argument to /usr/bin/file. Fix original patch http://hg.python.org/cpython/rev/9838ae397a19 New changeset 64a0caf49429 by Jesus Cea in branch '3.3': MERGE: #16112: platform.architecture does not correctly escape argument to /usr/bin/file. Fix original patch http://hg.python.org/cpython/rev/64a0caf49429 New changeset b9ac3c44a4eb by Jesus Cea in branch 'default': MERGE: #16112: platform.architecture does not correctly escape argument to /usr/bin/file. Fix original patch http://hg.python.org/cpython/rev/b9ac3c44a4eb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 05:38:18 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 05 Oct 2012 03:38:18 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <1349408298.55.0.0334774702305.issue16112@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: David, after so many patches, can you confirm that we have solved the original issue? :) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 05:39:28 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 05 Oct 2012 03:39:28 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <1349408368.15.0.552718452878.issue16112@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Why I was not seeing "test_platform.py" failing in the buildbots? :-? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 06:43:10 2012 From: report at bugs.python.org (Kushal Das) Date: Fri, 05 Oct 2012 04:43:10 +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: <1349412190.87.0.874255496362.issue16137@psf.upfronthosting.co.za> Kushal Das added the comment: Can not reproduce this on 2.7.3 on Fedora 17, x86_64. ---------- nosy: +kushaldas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 07:52:07 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 05 Oct 2012 05:52:07 +0000 Subject: [issue16139] Python 3.3 fails when starting from read-only FS In-Reply-To: <1349396494.84.0.994090705293.issue16139@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Hmm... I guess maybe we should trap all OSErrors after all (and print the error when in verbose mode). Yes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 08:33:53 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 05 Oct 2012 06:33:53 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349361999.3.0.395027528925.issue16112@psf.upfronthosting.co.za> Message-ID: <506E7F47.1050806@egenix.com> Marc-Andre Lemburg added the comment: Jes?s Cea Avi?n wrote: > > Jes?s Cea Avi?n added the comment: > > Thanks for the heads-up, Victor. > > I have added Marc-Andre Lemburg to the nosy list, so he can know about this issue and can provide feedback (or request a backout for 2.7). > > Marc-Andre?. The comment that Viktor posted still stands for Python 2.7. You can use subprocess in platform for Python 2.7, but only if it's available. Otherwise the module must fall back to the portable popen() that comes with the platform module. It may be worth adding that selection process to the popen() function in platform itself. For Python 3.x, you can use subprocess. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Oct 05 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-09-27: Released eGenix PyRun 1.1.0 ... http://egenix.com/go35 2012-09-26: Released mxODBC.Connect 2.0.1 ... http://egenix.com/go34 2012-09-25: Released mxODBC 3.2.1 ... http://egenix.com/go33 2012-10-23: Python Meeting Duesseldorf ... 18 days to go 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 Oct 5 08:39:03 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 05 Oct 2012 06:39:03 +0000 Subject: [issue11678] Add support for Arch Linux to platform.linux_distributions() In-Reply-To: <1340568893.13.0.0123856554095.issue11678@psf.upfronthosting.co.za> Message-ID: <506E807F.2020404@egenix.com> Marc-Andre Lemburg added the comment: ?ric Araujo wrote: > > ?ric Araujo added the comment: > > Feature freeze just came by; sorry we missed this. > > Given our recent-ish discussion about additions to mimetypes (and the consensus (IIRC) that matching the IANA database can be considered a bug fix), I wonder if detecting more OSes in platform should be considered a new feature. On one end we have mimetypes when there is just a dictionary update with no risk, on the other end we have ports to new OSes which clearly are new features; I think platform is on the fence, maybe just a bit on the new feature side. I'm fine with adding new OS support to platform in bugfix releases. The idea is to support as many platforms as possible and if a popular one is missing, that's a bug. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Oct 05 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-09-27: Released eGenix PyRun 1.1.0 ... http://egenix.com/go35 2012-09-26: Released mxODBC.Connect 2.0.1 ... http://egenix.com/go34 2012-09-25: Released mxODBC 3.2.1 ... http://egenix.com/go33 2012-10-23: Python Meeting Duesseldorf ... 18 days to go 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 Oct 5 08:50:30 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 05 Oct 2012 06:50:30 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <506E7F47.1050806@egenix.com> Message-ID: <506E832D.6050804@egenix.com> Marc-Andre Lemburg added the comment: > The implementation of platform.architecture shells out to the file command. It tries to escape quotes by replacing " with \", but that's not sufficient. > > $ python3.2 -c 'import platform; platform.architecture("foo\\\"; echo Hi there > /tmp/Z; echo \\\"")' && cat /tmp/Z > Hi there > > Here's a patch to make it use subprocess instead. I haven't tested it thoroughly building everything from trunk and running tests, but I verified it works by replacing the platform.py in my system Python install. I think a much better patch would be to test for existence of the file in question. File names rarely use any of the mentioned quoting and most certainly not for an executable, so if the check fails, that's a good indication that something is not right. Perhaps such a check could be added in addition to the other things in the patch ? BTW: It's probably better to discuss such patches on the tracker first, before applying them to the code base. It becomes difficult discussing patches that have already been partially applied to the code. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Oct 05 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-09-27: Released eGenix PyRun 1.1.0 ... http://egenix.com/go35 2012-09-26: Released mxODBC.Connect 2.0.1 ... http://egenix.com/go34 2012-09-25: Released mxODBC 3.2.1 ... http://egenix.com/go33 2012-10-23: Python Meeting Duesseldorf ... 18 days to go 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 Oct 5 08:59:21 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 05 Oct 2012 06:59:21 +0000 Subject: [issue16140] subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception Message-ID: <1349420361.8.0.0219880030745.issue16140@psf.upfronthosting.co.za> New submission from Gregory P. Smith: Ben Leslie writes this on python-dev: Hi all, I have a Python program where I have many threads each calling Popen, and I was hitting some trouble. I've been seeing this on 3.2.3, however I believe the same issue is still potentially a problem on head. The error manifests itself when a call to os.close(errpipe_read) fails with EBADF (http://hg.python.org/releasing/3.2.3/file/86d1421a552c/Lib/subprocess.py#l1314) I believe the root cause of this problem is due to a double close() on a different file descriptor (which is then reused as errpipe_read). The file descriptors: p2cwrite, c2pread and errread are all closed at the end of the _execute_child method: http://hg.python.org/releasing/3.2.3/file/86d1421a552c/Lib/subprocess.py#l1351 However, these filedescriptors are wrapped up into file objects during __init__ (see: http://hg.python.org/releasing/3.2.3/file/86d1421a552c/Lib/subprocess.py#l725) As far as I can tell at the point where the garbage collector kicks in Popen.{stdin,stdout,stderr} all go out of scope, and will be deallocated, and the underlying filedescriptor closed. However because the filedescriptor is already closed, and by this time is actually reused, this deallocation closes what ends up being an incorrect file-descriptor. Since closing a file object where the underlying fd is already closed is silenced (http://hg.python.org/releasing/3.2.3/file/86d1421a552c/Modules/_io/iobase.c#l235) this would not normally be very apparent. This race between a new filedescriptor being allocated and the garbage collector deallocating the file descriptors certainly hits when using a few threads, but I guess depending on the exact behaviour of the garbage collector it could potentially also occur in a single threaded case as well. I think a fix would be to remove the explicit close of these file descriptors at the end of _execute_child, and let the garbage collector close them. Of course that may leak file descriptors, if the GC doesn't kick in for a while, so the other option would be to close the file object, rather than just the file descriptor. Hopefully someone more intimately familiar with the module can point me in the right direction to verify this, and provide a fix. Thanks, Benno ---------- assignee: gregory.p.smith messages: 172053 nosy: gregory.p.smith priority: high severity: normal stage: test needed status: open title: subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception type: behavior versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 09:00:25 2012 From: report at bugs.python.org (Ross Lagerwall) Date: Fri, 05 Oct 2012 07:00:25 +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: <1349420425.94.0.82667424117.issue16140@psf.upfronthosting.co.za> Changes by Ross Lagerwall : ---------- nosy: +rosslagerwall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 09:02:42 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 05 Oct 2012 07:02:42 +0000 Subject: [issue16129] No good way to set 'PYTHONIOENCODING' when embedding python. In-Reply-To: <1349391024.84.0.674848761161.issue16129@psf.upfronthosting.co.za> Message-ID: <506E8609.3050009@egenix.com> Marc-Andre Lemburg added the comment: > IMHO either of these solutions would be fine. > > * have a PyOS_PutEnv() function, gettext has gettext_putenv() to > workaround this problem. This solution would help in many other cases as well, so adding such an API would certainly help more than specialized interfaces. > * manage this the same as Py_GetPythonHome(), which can be defined by > the embedding application to override the default. I think you meant Py_SetPythonHome(). Given that the IO encoding is very important for Python 3.x, a special API just for setting the encoding may be useful to have as well. Care must be taken, though, that the encoding cannot be set after Py_Initialize() has been called. It may overall be easier to go with the PyOS_PutEnv() solution to not run into the problems with having to check for an initialized interpreter first. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Oct 05 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-09-27: Released eGenix PyRun 1.1.0 ... http://egenix.com/go35 2012-09-26: Released mxODBC.Connect 2.0.1 ... http://egenix.com/go34 2012-09-25: Released mxODBC 3.2.1 ... http://egenix.com/go33 2012-10-23: Python Meeting Duesseldorf ... 18 days to go 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 Oct 5 09:14:51 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Oct 2012 07:14:51 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <506E832D.6050804@egenix.com> Message-ID: STINNER Victor added the comment: 1.7 - with open(DEV_NULL) as dev_null: 1.8 - proc = subprocess.Popen(['file', '-b', '--', target], 1.9 - stdout=subprocess.PIPE, stderr=dev_null) 1.9 + proc = subprocess.Popen(['file', target], 1.10 + stdout=subprocess.PIPE, stderr=subprocess.STDOUT) Errors should be ignored, not written into stderr. subprocess.DEVNULL was added to Python 3.3, in older version you have to manually call open the DEV_NULL file. (Oh by the way, it should be opened in write mode for stderr, not in read mode!?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 09:17:19 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 05 Oct 2012 07:17:19 +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: <1349421439.3.0.325952447162.issue16140@psf.upfronthosting.co.za> Gregory P. Smith added the comment: What you've described makes sense. The file descriptors are indeed conditionally wrapped in file objects using io.open which could lead to a double close in the error case in a threaded application. yuck. 1) The code needs to check if the fd was wrapped before calling os.close() on it. It could do this by checking the sys.stdin, sys.stdout and sys.stderr attributes respectively for each fd. 2) another option that is a little more clear code wise as it doesn't try to use an implied connection between the stdin/stdout/strerr attributes would be to _always_ wrap the fd's that this can happen to in an io object (regardless of if they've been assigned to the stdin/stdout/stderr attributes) and pass those to _execute_child. Their .fileno() method can be used for the value to pass to _posixsubprocess.fork_exec(). And the os.close on those would turn into a close method call which won't allow double close EBADF errors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 09:18:03 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Oct 2012 07:18:03 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: Message-ID: STINNER Victor added the comment: > You can use subprocess in platform for Python 2.7, but only if > it's available. Otherwise the module must fall back to the > portable popen() that comes with the platform module. Marc-Andre: I still don't understand why you want to run platform.py of Python 2.7 on older Python version? How does it happen? I expected Python 2.3 to use its own version of platform.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 09:18:33 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Oct 2012 07:18:33 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <1349421513.05.0.0413939776884.issue16112@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 09:53:43 2012 From: report at bugs.python.org (Christian Fertig) Date: Fri, 05 Oct 2012 07:53:43 +0000 Subject: [issue16109] urllib2.urlopen throws HTTP Error in python 2.7.2, 2.7.3, but not in python 2.7 In-Reply-To: <1349190908.23.0.357086619983.issue16109@psf.upfronthosting.co.za> Message-ID: <1349423623.33.0.242726324882.issue16109@psf.upfronthosting.co.za> Christian Fertig added the comment: ok, here's a run with debuglevel for the headers: python 2.7 on openSuSE 11.4: fertig at hornisse:/home/fertig > python Python 2.7 (r27:82500, Aug 07 2010, 16:54:59) [GCC] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import urllib2 >>> request = urllib2.Request('https://172.23.6.222') >>> opener = urllib2.build_opener(urllib2.HTTPSHandler(debuglevel=111)) >>> feeddata = opener.open(request).read() send: 'GET / HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: 172.23.6.222\r\nConnection: close\r\nUser-Agent: Python-urllib/2.7\r\n\r\n' reply: 'HTTP/1.1 200 OK\r\n' header: Date: Fri, 05 Oct 2012 09:46:33 GMT header: Server: Virata-EmWeb/R6_2_0 header: Connection: close header: Transfer-Encoding: chunked header: Content-Type: text/html header: Expires: Fri, 05 Oct 2012 09:46:33 GMT header: Last-Modified: Fri, 05 Oct 2012 09:46:33 GMT header: Cache-Control: no-cache >>> python 2.7.2 on openSuSE 12.1: fertig at wespe:/home/fertig > python Python 2.7.2 (default, Aug 19 2011, 20:41:43) [GCC] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import urllib2 >>> request = urllib2.Request('https://172.23.6.222') >>> opener = urllib2.build_opener(urllib2.HTTPSHandler(debuglevel=111)) >>> feeddata = opener.open(request).read() send: 'GET / HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: 172.23.6.222\r\nConnection: close\r\nUser-Agent: Python-urllib/2.7\r\n\r\n' reply: 'HTTP/1.1 405 Method Not Allowed\r\n' header: Date: Fri, 05 Oct 2012 09:44:11 GMT header: Server: Virata-EmWeb/R6_2_0 header: Connection: close Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python2.7/urllib2.py", line 401, in open response = meth(req, response) File "/usr/lib64/python2.7/urllib2.py", line 514, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib64/python2.7/urllib2.py", line 439, in error return self._call_chain(*args) File "/usr/lib64/python2.7/urllib2.py", line 372, in _call_chain result = func(*args) File "/usr/lib64/python2.7/urllib2.py", line 522, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 405: Method Not Allowed >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 09:57:52 2012 From: report at bugs.python.org (Christian Fertig) Date: Fri, 05 Oct 2012 07:57:52 +0000 Subject: [issue16109] urllib2.urlopen throws HTTP Error in python 2.7.2, 2.7.3, but not in python 2.7 In-Reply-To: <1349190908.23.0.357086619983.issue16109@psf.upfronthosting.co.za> Message-ID: <1349423872.72.0.155880297342.issue16109@psf.upfronthosting.co.za> Christian Fertig added the comment: the IP is private and even for testing I can't put it in a public IP range, as the device is an IP Phone with a custom firmware (Siemens optiPoint 420). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 10:02:04 2012 From: report at bugs.python.org (Ned Deily) Date: Fri, 05 Oct 2012 08:02:04 +0000 Subject: [issue16123] IDLE - deprecate running without a subprocess In-Reply-To: <1349302429.82.0.0807471180715.issue16123@psf.upfronthosting.co.za> Message-ID: <1349424124.5.0.372411895437.issue16123@psf.upfronthosting.co.za> Ned Deily added the comment: A popup menu on every invocation of IDLE would be a very user-unfriendly thing to do. If it's possible that a print to stderr might not be visible to a user, another solution might be to use the approach in Lib/idlelib/macosxSupport.py tkVersionWarning which causes the warning message to show up in the PyShell window. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 10:08:01 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 05 Oct 2012 08:08:01 +0000 Subject: [issue16136] Removal of VMS support In-Reply-To: <1349389263.57.0.925729224322.issue16136@psf.upfronthosting.co.za> Message-ID: <1349424481.03.0.72325127825.issue16136@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > After the blog post, Mathew, Sandeep from HP asked how to help: It was more than a year ago. Has something actually be done? ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 11:09:32 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Fri, 05 Oct 2012 09:09:32 +0000 Subject: [issue16139] Python 3.3 fails when starting from read-only FS In-Reply-To: <1349394780.28.0.923022645672.issue16139@psf.upfronthosting.co.za> Message-ID: <1349428172.16.0.993845524888.issue16139@psf.upfronthosting.co.za> Richard Oudkerk added the comment: This is more or less a duplicate of #15833 (although the errno mentioned there is EIO instead of the more sensible EROFS). ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 11:34:45 2012 From: report at bugs.python.org (Masami HIRATA) Date: Fri, 05 Oct 2012 09:34:45 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 In-Reply-To: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> Message-ID: <1349429685.53.0.102069049002.issue16116@psf.upfronthosting.co.za> Masami HIRATA added the comment: I have tested the workaround and it works correctly. Please see attached log file. ---------- Added file: http://bugs.python.org/file27429/Python33_with_venv_2.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 11:51:43 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 05 Oct 2012 09:51:43 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349430703.03.0.621193317288.issue8800@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Thanks Richard. I wonder if the issues with the multiprocessing tests can be fixed by making use of Barriers? One of the reasons I introduced Barriers into the lib originally was my alarm at seeing the various springklings of different _wait() calls in the unittests, particularly in the threading module (there are Condition variable tests there still that have race conditions, that are cunnrently hidden by liberal use of _wait()) Then I started to wonder if it were appropriate to use a Barrier in the Condition variable tests, particularly given that the former is implemented by way of the latter :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:23:54 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 05 Oct 2012 10:23:54 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349432634.23.0.828754060713.issue8800@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: > although I'd prefer a BSD errno example, such as ECONNRESET, instead of a winsock one Are you referring to the comment where I mention ECONNABORTED? That is a regular unix error (windows version is WSAECONNABORTED). This error occurs when the local stack decides to kill the connection, as opposed to ECONNRESET which occurs on account of receiving a RST packet. New patch includes documentation change. If 2.7 is still in bugfix mode, then this patch could probably be accepted. ---------- Added file: http://bugs.python.org/file27430/socketserver.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:27:15 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Oct 2012 10:27:15 +0000 Subject: [issue16138] In the glossary there is a small typo about __len__() in the sequence definition In-Reply-To: <1349390779.55.0.0497820141471.issue16138@psf.upfronthosting.co.za> Message-ID: <3XY6bN4CMFzPkn@mail.python.org> Roundup Robot added the comment: New changeset 7cf0d8b2744b by Andrew Svetlov in branch '3.2': Issue #16138: fix typo. http://hg.python.org/cpython/rev/7cf0d8b2744b New changeset a093d39fdda4 by Andrew Svetlov in branch '3.3': Merge issue #16138: fix typo. http://hg.python.org/cpython/rev/a093d39fdda4 New changeset cbb9b5dcb88a by Andrew Svetlov in branch 'default': Merge issue #16138: fix typo. http://hg.python.org/cpython/rev/cbb9b5dcb88a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:28:19 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 05 Oct 2012 10:28:19 +0000 Subject: [issue16138] In the glossary there is a small typo about __len__() in the sequence definition In-Reply-To: <1349390779.55.0.0497820141471.issue16138@psf.upfronthosting.co.za> Message-ID: <1349432899.35.0.604222821177.issue16138@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks to py.user ---------- nosy: +asvetlov resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:28:19 2012 From: report at bugs.python.org (Masami HIRATA) Date: Fri, 05 Oct 2012 10:28:19 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 In-Reply-To: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> Message-ID: <1349432899.78.0.105259600439.issue16116@psf.upfronthosting.co.za> Masami HIRATA added the comment: btw, it seems to me that "-IC:\Python33\include -IC:\Python33\include" should be "-IC:\Users\msmhrt\mypython\3.3.0\include -IC:\Python33\include". What do you think about it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:28:44 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Oct 2012 10:28:44 +0000 Subject: [issue4821] Patches for thread-support in built-in SHA modules In-Reply-To: <1231002504.32.0.171592356443.issue4821@psf.upfronthosting.co.za> Message-ID: <1349432924.18.0.944462979063.issue4821@psf.upfronthosting.co.za> Christian Heimes added the comment: I'll integrate your patch once I'm done with my SHA-3 patch #16113. I'm using parts of your patch in my new sha3 code to release the GIL. I'll also check if I can share more code between the SHA family modules. ---------- assignee: -> christian.heimes components: +Extension Modules nosy: +christian.heimes stage: -> patch review type: -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:45:06 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Oct 2012 10:45:06 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349433906.73.0.583713275106.issue16113@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: http://bugs.python.org/file27431/49a949116245.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:47:49 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Oct 2012 10:47:49 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349434069.8.0.774515371965.issue16113@psf.upfronthosting.co.za> Christian Heimes added the comment: The hightlights of the next patch are * release the GIL * more test vectors * remove bgr_endian.h * move typedef UINT64 to sha3module * declare more globals as static ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:50:00 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Fri, 05 Oct 2012 10:50:00 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349434200.83.0.278748834688.issue8800@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Kristjan: you seem to have attached socketserver.patch to the wrong issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:53:43 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 05 Oct 2012 10:53:43 +0000 Subject: [issue14574] SocketServer doesn't handle client disconnects properly In-Reply-To: <1334358462.67.0.980544384901.issue14574@psf.upfronthosting.co.za> Message-ID: <1349434423.81.0.0572549405128.issue14574@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: > although I'd prefer a BSD errno example, such as ECONNRESET, instead of a winsock one Are you referring to the comment where I mention ECONNABORTED? That is a regular unix error (windows version is WSAECONNABORTED). This error occurs when the local stack decides to kill the connection, as opposed to ECONNRESET which occurs on account of receiving a RST packet. New patch includes documentation change. If 2.7 is still in bugfix mode, then this patch could probably be accepted. ---------- Added file: http://bugs.python.org/file27432/socketserver.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:53:59 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 05 Oct 2012 10:53:59 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349434439.24.0.661231634368.issue8800@psf.upfronthosting.co.za> Changes by Kristj?n Valur J?nsson : Removed file: http://bugs.python.org/file27430/socketserver.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:54:33 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 05 Oct 2012 10:54:33 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> Message-ID: <1349434473.91.0.529692474691.issue8800@psf.upfronthosting.co.za> Changes by Kristj?n Valur J?nsson : ---------- Removed message: http://bugs.python.org/msg172065 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 13:17:06 2012 From: report at bugs.python.org (Campbell Barton) Date: Fri, 05 Oct 2012 11:17:06 +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: <1349435826.82.0.427284578276.issue16129@psf.upfronthosting.co.za> Campbell Barton added the comment: Agree PyOS_PutEnv would be good since its not restricted to string encoding and resolves the problem of not being able to control env vars for an embedded interpreter in general. Having ways to change encoding is good too but a bit outside the scope of this report and possibly not the best solution either since its possible (through unlikely), that you need to set the encoding at the very start of python initialization- rather than site & builtin modules loads. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 13:52:45 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Oct 2012 11:52:45 +0000 Subject: [issue8800] add threading.RWLock In-Reply-To: <1349430703.03.0.621193317288.issue8800@psf.upfronthosting.co.za> Message-ID: <1349437885.3364.0.camel@localhost.localdomain> Antoine Pitrou added the comment: Le vendredi 05 octobre 2012 ? 09:51 +0000, Kristj?n Valur J?nsson a ?crit : > Then I started to wonder if it were appropriate to use a Barrier in > the Condition variable tests, particularly given that the former is > implemented by way of the latter :) Indeed, the reason I wrote the lock tests that way is that I want the tests to be independent of the primitives under test. Otherwise things become very messy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:05:28 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Oct 2012 12:05:28 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <1349438728.77.0.502915285296.issue16112@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > BTW: It's probably better to discuss such patches on the tracker first, > before applying them to the code base. It becomes difficult discussing > patches that have already been partially applied to the code. Agreed with Marc-Andr?. Jesus, please understand that by committing bogus code, you are annoying every other core developer. Be careful and run the test suite before pushing any new code. And waiting for reviews doesn't hurt. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:17:30 2012 From: report at bugs.python.org (Benno Leslie) Date: Fri, 05 Oct 2012 12:17:30 +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: <1349439450.6.0.656153240571.issue16140@psf.upfronthosting.co.za> Changes by Benno Leslie : ---------- nosy: +bennoleslie _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:28:15 2012 From: report at bugs.python.org (Benno Leslie) Date: Fri, 05 Oct 2012 12:28:15 +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: <1349440095.99.0.00742911567349.issue16140@psf.upfronthosting.co.za> Benno Leslie added the comment: Regarding #2 my understanding is that the FDs are already always wrapped. E.g: at line http://hg.python.org/cpython/file/b9ac3c44a4eb/Lib/subprocess.py#l798 it shows these always being wrapped (assuming the file descriptor is not -1). For my test case on 3.2.3, replacing the os.close loop with: if p2cwrite != -1: self.stdin.close() if c2pread != -1: self.stdout.close() if errread != -1: self.stderr.close() This fixed all my stability problems and races, and can't (as far as I can tell) cause any other problems; however this is a very subtle module, so I'm eager to understand if this would cause any undesirable side-effects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:48:29 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Oct 2012 12:48:29 +0000 Subject: [issue16134] Add support for RTMP schemes to urlparse In-Reply-To: <1349375961.84.0.319840553089.issue16134@psf.upfronthosting.co.za> Message-ID: <1349441309.82.0.490191047204.issue16134@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 15:03:11 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Oct 2012 13:03:11 +0000 Subject: [issue15528] Better support for finalization with weakrefs In-Reply-To: <1343837927.06.0.561023898829.issue15528@psf.upfronthosting.co.za> Message-ID: <1349442191.77.0.617143853223.issue15528@psf.upfronthosting.co.za> Antoine Pitrou added the comment: In: + except: + sys.excepthook(*sys.exc_info()) I would write "except Exception" instead. You don't want to trap e.g. KeyboardInterrupt. For clarity, I would also add "_dirty = False" at the finalize top-level. Otherwise, looks fine to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 15:03:59 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Oct 2012 13:03:59 +0000 Subject: [issue16109] urllib2.urlopen throws HTTP Error in python 2.7.2, 2.7.3, but not in python 2.7 In-Reply-To: <1349190908.23.0.357086619983.issue16109@psf.upfronthosting.co.za> Message-ID: <1349442239.08.0.73219826494.issue16109@psf.upfronthosting.co.za> R. David Murray added the comment: It looks like the data input is the same in both cases. (Although why does your second example show ''? Does urllib2 really output that as part of the debug output?) It is hard to see what could be causing the divergence in response here. Is it possible for there to be something in the SSL setup that triggers a different response from your server? Any chance you could try Python 3.2 or 3.3 just to see if there is a difference there? ---------- nosy: +orsenthil, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 15:12:17 2012 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 05 Oct 2012 13:12:17 +0000 Subject: [issue15111] Wrong ImportError message with importlib In-Reply-To: <1340151446.59.0.121813331775.issue15111@psf.upfronthosting.co.za> Message-ID: <1349442737.28.0.399241305029.issue15111@psf.upfronthosting.co.za> Yury Selivanov added the comment: I don't know why, but it seems that the bug reappeared in 3.3. Examples: 1. --------------- (python 3.4 from repo) yury at sxair ~/dev/py/python (master) $ ./python.exe Python 3.4.0a0 (default, Oct 5 2012, 15:08:35) [GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.65))] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from distutils import msvc9compiler Traceback (most recent call last): File "", line 1, in ImportError: cannot import name msvc9compiler 2. --------------- (python 3.3.0 from macports) yury at sxair ~/dev/py/python (master) $ python3.3 Python 3.3.0 (default, Oct 5 2012, 13:41:24) [GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.65))] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from distutils import msvc9compiler Traceback (most recent call last): File "", line 1, in ImportError: cannot import name msvc9compiler 3. ----------- (python 3.2 from macports) yury at sxair ~/dev/py/python (master) $ python3.2 Python 3.2.2 (default, Sep 27 2012, 13:31:01) [GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.65))] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from distutils import msvc9compiler Traceback (most recent call last): File "", line 1, in File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/msvc9compiler.py", line 27, in import winreg ImportError: No module named winreg Platform: macos x 10.8 Please reopen the issue. ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 15:13:54 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Oct 2012 13:13:54 +0000 Subject: [issue16109] urllib2.urlopen throws HTTP Error in python 2.7.2, 2.7.3, but not in python 2.7 In-Reply-To: <1349190908.23.0.357086619983.issue16109@psf.upfronthosting.co.za> Message-ID: <1349442834.58.0.718431569193.issue16109@psf.upfronthosting.co.za> Antoine Pitrou added the comment: By using "openssl s_client -connect 172.23.6.222:443" you can open a telnet-like session (but using SSL) to your server, and try to type/paste an HTTP request there. That would help check whether it's a Python problem, or something else due to OpenSSL changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 15:18:24 2012 From: report at bugs.python.org (Christian Fertig) Date: Fri, 05 Oct 2012 13:18:24 +0000 Subject: [issue16109] urllib2.urlopen throws HTTP Error in python 2.7.2, 2.7.3, but not in python 2.7 In-Reply-To: <1349190908.23.0.357086619983.issue16109@psf.upfronthosting.co.za> Message-ID: <1349443104.4.0.165927375982.issue16109@psf.upfronthosting.co.za> Christian Fertig added the comment: python3 example, not working on both machines (3.2.1 on openSuSE 12.1 and 3.1.3 on openSuSE 11.4) fertig at wespe:/home/fertig > python3 Error in sitecustomize; set PYTHONVERBOSE for traceback: SyntaxError: invalid syntax (sitecustomize.py, line 89) Python 3.2.1 (default, Jul 18 2011, 16:24:40) [GCC] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import http.client >>> import urllib.request >>> http.client.HTTPConnection.debuglevel = 1 >>> request = urllib.request.urlopen('https://172.23.6.222') send: b'GET / HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: 172.23.6.222\r\nConnection: close\r\nUser-Agent: Python-urllib/3.2\r\n\r\n' reply: 'HTTP/1.1 400 Bad Request\r\n' header: Date header: Server Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.2/urllib/request.py", line 138, in urlopen return opener.open(url, data, timeout) File "/usr/lib64/python3.2/urllib/request.py", line 375, in open response = meth(req, response) File "/usr/lib64/python3.2/urllib/request.py", line 487, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib64/python3.2/urllib/request.py", line 413, in error return self._call_chain(*args) File "/usr/lib64/python3.2/urllib/request.py", line 347, in _call_chain result = func(*args) File "/usr/lib64/python3.2/urllib/request.py", line 495, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 400: Bad Request >>> request = urllib.request.urlopen('https://172.23.6.222') send: b'GET / HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: 172.23.6.222\r\nConnection: close\r\nUser-Agent: Python-urllib/3.2\r\n\r\n' reply: 'HTTP/1.1 405 Method Not Allowed\r\n' header: Date header: Server header: Connection Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.2/urllib/request.py", line 138, in urlopen return opener.open(url, data, timeout) File "/usr/lib64/python3.2/urllib/request.py", line 375, in open response = meth(req, response) File "/usr/lib64/python3.2/urllib/request.py", line 487, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib64/python3.2/urllib/request.py", line 413, in error return self._call_chain(*args) File "/usr/lib64/python3.2/urllib/request.py", line 347, in _call_chain result = func(*args) File "/usr/lib64/python3.2/urllib/request.py", line 495, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 405: Method Not Allowed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 15:20:21 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 05 Oct 2012 13:20:21 +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: <1349443221.6.0.867547221489.issue16140@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 15:23:33 2012 From: report at bugs.python.org (Christian Fertig) Date: Fri, 05 Oct 2012 13:23:33 +0000 Subject: [issue16109] urllib2.urlopen throws HTTP Error in python 2.7.2, 2.7.3, but not in python 2.7 In-Reply-To: <1349190908.23.0.357086619983.issue16109@psf.upfronthosting.co.za> Message-ID: <1349443413.16.0.627262092402.issue16109@psf.upfronthosting.co.za> Christian Fertig added the comment: ok actually it isn't working either with curl or wget. So probably this is not a python problem, it seems more something in the underlying libs: Output from curl on the machine, where python 2.7 is working: fertig at hornisse:/home/fertig > curl --insecure 'https://172.23.6.222/' --verbose * About to connect() to 172.23.6.222 port 443 (#0) * Trying 172.23.6.222... connected * Connected to 172.23.6.222 (172.23.6.222) port 443 (#0) * successfully set certificate verify locations: * CAfile: none CApath: /etc/ssl/certs/ * SSLv3, TLS handshake, Client hello (1): * SSLv3, TLS handshake, Server hello (2): * SSLv3, TLS handshake, CERT (11): * SSLv3, TLS handshake, Server finished (14): * SSLv3, TLS handshake, Client key exchange (16): * SSLv3, TLS change cipher, Client hello (1): * SSLv3, TLS handshake, Finished (20): * SSLv3, TLS change cipher, Client hello (1): * SSLv3, TLS handshake, Finished (20): * SSL connection using AES256-SHA * Server certificate: * subject: C=DE; L=Munich; O=Siemens Enterprise Communications; OU=Enterprise Systems; CN=optiPoint - WBM * start date: 2007-04-11 12:26:43 GMT * expire date: 2022-04-10 12:26:43 GMT * common name: optiPoint - WBM (does not match '172.23.6.222') * issuer: C=DE; L=Munich; O=Siemens AG; OU=Com Enterprise Systems; CN=Siemens Com ESY HD Security Office; emailAddress=hipath_security_office at siemens.com * SSL certificate verify result: self signed certificate in certificate chain (19), continuing anyway. > GET / HTTP/1.1 > User-Agent: curl/7.21.2 (x86_64-unknown-linux-gnu) libcurl/7.21.2 OpenSSL/1.0.0c zlib/1.2.5 libidn/1.15 libssh2/1.2.7 > Host: 172.23.6.222 > Accept: */* > < HTTP/1.1 405 Method Not Allowed < Date: Fri, 05 Oct 2012 11:03:02 GMT < Server: Virata-EmWeb/R6_2_0 < Connection: close < 405 Method Not Allowed * Closing connection #0 * SSLv3, TLS alert, Client hello (1): fertig at hornisse:/home/fertig > No idea anymore :/ But I fear you can close this ticket... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 15:28:30 2012 From: report at bugs.python.org (Christian Fertig) Date: Fri, 05 Oct 2012 13:28:30 +0000 Subject: [issue16109] urllib2.urlopen throws HTTP Error in python 2.7.2, 2.7.3, but not in python 2.7 In-Reply-To: <1349190908.23.0.357086619983.issue16109@psf.upfronthosting.co.za> Message-ID: <1349443710.45.0.507734269979.issue16109@psf.upfronthosting.co.za> Christian Fertig added the comment: for completeness: the openssl output from the machine, where python 2.7 is working: fertig at hornisse:/home/fertig > openssl s_client -connect 172.23.6.222:443 CONNECTED(00000003) depth=1 C = DE, L = Munich, O = Siemens AG, OU = Com Enterprise Systems, CN = Siemens Com ESY HD Security Office, emailAddress = hipath_security_office at siemens.com verify error:num=19:self signed certificate in certificate chain verify return:0 --- Certificate chain 0 s:/C=DE/L=Munich/O=Siemens Enterprise Communications/OU=Enterprise Systems/CN=optiPoint - WBM i:/C=DE/L=Munich/O=Siemens AG/OU=Com Enterprise Systems/CN=Siemens Com ESY HD Security Office/emailAddress=hipath_security_office at siemens.com 1 s:/C=DE/L=Munich/O=Siemens AG/OU=Com Enterprise Systems/CN=Siemens Com ESY HD Security Office/emailAddress=hipath_security_office at siemens.com i:/C=DE/L=Munich/O=Siemens AG/OU=Com Enterprise Systems/CN=Siemens Com ESY HD Security Office/emailAddress=hipath_security_office at siemens.com --- Server certificate -----BEGIN CERTIFICATE----- MIIEwDCCA6igAwIBAgIBFjANBgkqhkiG9w0BAQUFADCBtDELMAkGA1UEBhMCREUx [..] dEYuDjj21U+xronZ0FYVieIP1jk= -----END CERTIFICATE----- subject=/C=DE/L=Munich/O=Siemens Enterprise Communications/OU=Enterprise Systems/CN=optiPoint - WBM issuer=/C=DE/L=Munich/O=Siemens AG/OU=Com Enterprise Systems/CN=Siemens Com ESY HD Security Office/emailAddress=hipath_security_office at siemens.com --- No client certificate CA names sent --- SSL handshake has read 2748 bytes and written 407 bytes --- New, TLSv1/SSLv3, Cipher is AES256-SHA Server public key is 1024 bit Secure Renegotiation IS NOT supported Compression: NONE Expansion: NONE SSL-Session: Protocol : TLSv1 Cipher : AES256-SHA Session-ID: 506EDFB9B197A00F67A43F34B3313B660DBC64FF7353112836F813723B30071C Session-ID-ctx: Master-Key: 6928F9EF19DB7DBEEEA6D09392EF2F848613E40C1B6CE6226C342AB3D211AA1A8E04EF27BDEE4CD03AB4F6AD7317EBB3 Key-Arg : None PSK identity: None PSK identity hint: None Start Time: 1349443513 Timeout : 300 (sec) Verify return code: 19 (self signed certificate in certificate chain) --- GET / HTTP/1.1 HTTP/1.1 400 Bad Request Date: Fri, 05 Oct 2012 15:25:21 GMT Server: Virata-EmWeb/R6_2_0 Connection: close 400 Bad Request ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 15:31:22 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Oct 2012 13:31:22 +0000 Subject: [issue16109] urllib2.urlopen throws HTTP Error in python 2.7.2, 2.7.3, but not in python 2.7 In-Reply-To: <1349190908.23.0.357086619983.issue16109@psf.upfronthosting.co.za> Message-ID: <1349443882.58.0.700915593251.issue16109@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, closing then. Thanks for the debugging, and good luck :) ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 16:11:47 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 05 Oct 2012 14:11:47 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <1349446307.22.0.554438748505.issue16112@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Antoine, I agree. I beg your pardon. This patch was suppose to be quite trivial, and "test_platform" passes just fine on my Linux and Solaris computers. And the four buildbots I was monitoring, the testsuite passed. The suggestion of Marc-Andre of simply adding an "os.access()" to check for file existence first is quite sensible and would be enough and compatible in all platforms and python releases. I am for backing out my patches so far and push a simple "os.access()" check. What do you think?. Marc-Andre, I was wondering if you could elaborate a bit why 2.7 platform.py file should be able to run fine in 2.3 :-? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 16:15:15 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2012 14:15:15 +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: <1349446515.85.0.440337991512.issue16009@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated. Tests added. One discrepancy between Python an C versions fixed. In fact, we can get rid of StopIteration and directly raise ValueError. I don't know what are the functions of StopIteration here, so preserve it. Perhaps the author could explain the details. ---------- keywords: +needs review nosy: +bob.ippolito stage: test needed -> patch review Added file: http://bugs.python.org/file27433/json_errmsg_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 16:46:26 2012 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 05 Oct 2012 14:46:26 +0000 Subject: [issue16141] Possible simplification for logging.StreamHandler exception handling Message-ID: <1349448386.51.0.852233729423.issue16141@psf.upfronthosting.co.za> New submission from Guido van Rossum: I just noticed that StreamHandler contains the following fragment in its emit() method: try: except (KeyboardInterrupt, SystemExit): #pragma: no cover raise except: self.handleError(record) Couldn't this be simplified to the following? try: except Exception: self.handleError(record) I.e. instead of manually catching and re-raising a few BaseExceptions, just don't catch anything that derives from BaseException but not from Exception? (I noticed because we have an internal clone of this class that occasionally gets augmented with yet another base exception that shouldn't be handled. ---------- components: Library (Lib) messages: 172087 nosy: gvanrossum priority: normal severity: normal status: open title: Possible simplification for logging.StreamHandler exception handling type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 16:53:21 2012 From: report at bugs.python.org (Idan Kamara) Date: Fri, 05 Oct 2012 14:53:21 +0000 Subject: [issue16142] ArgumentParser inconsistent with parse_known_args Message-ID: <1349448801.58.0.783623579173.issue16142@psf.upfronthosting.co.za> New submission from Idan Kamara: When known and unknown options are given together in the same option string (e.g. -xy) then ArgumentParser behaves in a strange way: - if the known option is given first (so -k is known and the parser is fed with ['-ku']) then the parsing aborts with "error: argument -k/--known: ignored explicit argument 'u'" - if the unknown option is given first then both options are treated as unknown and returned in the list of remaining arguments. This makes it impossible to use parse_known_args for its intended purpose because every single letter option might be interleaved with other unknown options. I attached a test script that demonstrates this. ---------- components: Library (Lib) files: aparse.py messages: 172088 nosy: idank priority: normal severity: normal status: open title: ArgumentParser inconsistent with parse_known_args type: behavior versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file27434/aparse.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 17:03:02 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Oct 2012 15:03:02 +0000 Subject: [issue16142] ArgumentParser inconsistent with parse_known_args In-Reply-To: <1349448801.58.0.783623579173.issue16142@psf.upfronthosting.co.za> Message-ID: <1349449382.27.0.957197529824.issue16142@psf.upfronthosting.co.za> R. David Murray added the comment: Looks like parse_known_args needs to be taught to not treat unknown text following an option as an argument if the option does not take an argument. That would be in keeping with its mission, I think :) There will still probably be ambiguous cases that will trip you up, but that should help. ---------- keywords: +easy nosy: +bethard, r.david.murray stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 17:05:09 2012 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 05 Oct 2012 15:05:09 +0000 Subject: [issue8492] Addition to readline module to get dictionary of keystrokes and commands In-Reply-To: <1271880127.18.0.454462638892.issue8492@psf.upfronthosting.co.za> Message-ID: <1349449509.79.0.115813603166.issue8492@psf.upfronthosting.co.za> Steven D'Aprano added the comment: A question came up on Python-ideas about readline apparently missing a standard function. See: http://mail.python.org/pipermail/python-ideas/2012-October/016329.html For debugging issues with readline, it would be be very useful to be able to query the current set of bindings. This would also help people avoid accidentally over-writing existing bindings. I suggest emulating the three bash commands: bind -p # List functions and bindings in a form that can be reused as input. bind -v # As above for variable names and values. bind -s # As above for macros and values. ---------- nosy: +stevenjd versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 17:07:27 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Oct 2012 15:07:27 +0000 Subject: [issue15111] Wrong ImportError message with importlib In-Reply-To: <1340151446.59.0.121813331775.issue15111@psf.upfronthosting.co.za> Message-ID: <1349449647.75.0.91467091308.issue15111@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- keywords: +3.2regression resolution: fixed -> status: closed -> open versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 17:19:21 2012 From: report at bugs.python.org (Idan Kamara) Date: Fri, 05 Oct 2012 15:19:21 +0000 Subject: [issue16142] ArgumentParser inconsistent with parse_known_args In-Reply-To: <1349448801.58.0.783623579173.issue16142@psf.upfronthosting.co.za> Message-ID: <1349450361.93.0.627579407986.issue16142@psf.upfronthosting.co.za> Idan Kamara added the comment: Yes that'd fix the known option before unknown but not the other way around. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 17:43:36 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Oct 2012 15:43:36 +0000 Subject: [issue16142] ArgumentParser inconsistent with parse_known_args In-Reply-To: <1349448801.58.0.783623579173.issue16142@psf.upfronthosting.co.za> Message-ID: <1349451816.46.0.722615755775.issue16142@psf.upfronthosting.co.za> R. David Murray added the comment: Right. I didn't read what you wrote carefully enough. Clearly parse_known_args is buggy here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 17:43:57 2012 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 05 Oct 2012 15:43:57 +0000 Subject: [issue5845] rlcompleter should be enabled automatically In-Reply-To: <1240702039.68.0.55843541961.issue5845@psf.upfronthosting.co.za> Message-ID: <1349451837.73.0.488974969114.issue5845@psf.upfronthosting.co.za> Changes by Steven D'Aprano : ---------- nosy: +stevenjd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 17:50:39 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 05 Oct 2012 15:50:39 +0000 Subject: [issue15111] Wrong ImportError message with importlib In-Reply-To: <1340151446.59.0.121813331775.issue15111@psf.upfronthosting.co.za> Message-ID: <1349452239.77.0.49503743487.issue15111@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I don't know why, but it seems that the bug reappeared in 3.3. Part of it could be that the original fix added no tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 18:00:07 2012 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 05 Oct 2012 16:00:07 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 In-Reply-To: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> Message-ID: <1349452807.81.0.364524170579.issue16116@psf.upfronthosting.co.za> Vinay Sajip added the comment: > I have tested the workaround and it works correctly. > Please see attached log file. Thanks for the update. > btw, it seems to me that "-IC:\Python33\include -IC:\Python33\include" > should be "-IC:\Users\msmhrt\mypython\3.3.0\include -IC:\Python33\include". Could well be a similar problem; I'll look into it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 18:16:21 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 05 Oct 2012 16:16:21 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 In-Reply-To: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> Message-ID: <1349453781.34.0.920295762191.issue16116@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 18:20:37 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 05 Oct 2012 16:20:37 +0000 Subject: [issue16123] IDLE - deprecate running without a subprocess In-Reply-To: <1349302429.82.0.0807471180715.issue16123@psf.upfronthosting.co.za> Message-ID: <1349454037.14.0.0609891367672.issue16123@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 18:41:45 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Oct 2012 16:41:45 +0000 Subject: [issue15111] Wrong ImportError message with importlib In-Reply-To: <1340151446.59.0.121813331775.issue15111@psf.upfronthosting.co.za> Message-ID: <1349455305.65.0.302927958754.issue15111@psf.upfronthosting.co.za> Brett Cannon added the comment: http://hg.python.org/cpython/rev/dc18a2a66d16 did add a test, just not the right one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 18:42:35 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Oct 2012 16:42:35 +0000 Subject: [issue15111] Wrong ImportError message with importlib In-Reply-To: <1340151446.59.0.121813331775.issue15111@psf.upfronthosting.co.za> Message-ID: <1349455355.34.0.248582285392.issue15111@psf.upfronthosting.co.za> Brett Cannon added the comment: Actually, I take it back, it removed a test without adding a new one. Obviously that's my bad. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 18:45:16 2012 From: report at bugs.python.org (Gregory Andersen) Date: Fri, 05 Oct 2012 16:45:16 +0000 Subject: [issue16143] Building with configure option "--without-doc-strings" crashes first time through PyUnicode_DecodeUTF8Stateful Message-ID: <1349455516.0.0.465126799391.issue16143@psf.upfronthosting.co.za> New submission from Gregory Andersen: Seems unicode_empty is still NULL at this point. A gdb backtrace from an x86_64 build. Reproduced on i686 and mips build as well. Program received signal SIGSEGV, Segmentation fault. 0x000000000044f61e in PyUnicode_DecodeUTF8Stateful (s=0x59a767 "", size=0, errors=0x0, consumed=0x0) at Objects/unicodeobject.c:4726 4726 Py_INCREF(unicode_empty); (gdb) bt #0 0x000000000044f61e in PyUnicode_DecodeUTF8Stateful (s=0x59a767 "", size=0, errors=0x0, consumed=0x0) at Objects/unicodeobject.c:4726 #1 0x0000000000433087 in PyType_Ready (type=0x7d5340) at Objects/typeobject.c:4235 #2 0x00000000004332ae in PyType_Ready (type=) at Objects/typeobject.c:4116 #3 PyType_Ready (type=0x7d54e0) at Objects/typeobject.c:4146 #4 0x000000000041bbfe in _Py_ReadyTypes () at Objects/object.c:1576 #5 0x00000000004a6eb0 in _Py_InitializeEx_Private (install_sigs=, install_importlib=) at Python/pythonrun.c:301 #6 Py_InitializeEx (install_sigs=) at Python/pythonrun.c:401 #7 Py_Initialize () at Python/pythonrun.c:407 #8 0x00000000004bb9fc in Py_Main (argc=1, argv=0x82f010) at Modules/main.c:646 #9 0x000000000041949e in main (argc=1, argv=0x7fffffffe658) at ./Modules/python.c:66 ---------- components: Interpreter Core messages: 172097 nosy: Gregory.Andersen priority: normal severity: normal status: open title: Building with configure option "--without-doc-strings" crashes first time through PyUnicode_DecodeUTF8Stateful type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 18:48:34 2012 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 05 Oct 2012 16:48:34 +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: <1349455714.11.0.0639038432176.issue16137@psf.upfronthosting.co.za> Mark Lawrence added the comment: I can reproduce this on Windows Vista running 2.7.3. With 3.3.0 I get >>> faulty_time = time.asctime(initial_struct_time) Traceback (most recent call last): File "", line 1, in TypeError: Tuple or struct_time argument required >>> ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 18:57:07 2012 From: report at bugs.python.org (Stefan Friesel) Date: Fri, 05 Oct 2012 16:57:07 +0000 Subject: [issue812369] module shutdown procedure based on GC Message-ID: <1349456227.82.0.493200329121.issue812369@psf.upfronthosting.co.za> Stefan Friesel added the comment: What is the status of this? Does the patch need more reviewing? ---------- nosy: +Stefan.Friesel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 18:59:22 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Oct 2012 16:59:22 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349456362.32.0.096361751848.issue16113@psf.upfronthosting.co.za> Christian Heimes added the comment: I've documented the optimization options of Keccak. The block also contains a summarization of my modifications of the reference code. http://hg.python.org/sandbox/cheimes/file/57948df78dbd/Modules/_sha3/sha3module.c#l22 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 19:06:08 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 05 Oct 2012 17:06:08 +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: <1349456768.52.0.589669200865.issue16143@psf.upfronthosting.co.za> Stefan Krah added the comment: This seems related to #9242: _Py_InitializeEx_Private() calls _Py_ReadyTypes(), which uses the Unicode API, well before actually calling _PyUnicode_Init(). ---------- nosy: +georg.brandl, skrah priority: normal -> release blocker stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 19:15:34 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 05 Oct 2012 17:15:34 +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: <1349457334.66.0.757831607579.issue16143@psf.upfronthosting.co.za> Stefan Krah added the comment: Sorry, wrong issue number: Related to #10156. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 19:24:52 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 05 Oct 2012 17:24:52 +0000 Subject: [issue10156] Initialization of globals in unicodeobject.c In-Reply-To: <1287595627.82.0.548953621137.issue10156@psf.upfronthosting.co.za> Message-ID: <1349457892.07.0.53677711074.issue10156@psf.upfronthosting.co.za> Stefan Krah added the comment: See also #16143. ---------- versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 19:41:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2012 17:41:40 +0000 Subject: [issue16141] Possible simplification for logging.StreamHandler exception handling In-Reply-To: <1349448386.51.0.852233729423.issue16141@psf.upfronthosting.co.za> Message-ID: <1349458900.3.0.965227051923.issue16141@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Couldn't this be simplified to the following? I think this is idiomatic now (since 2.5). There are some places where similar outdated code used. See the attached patch. There are more dubious places in Lib/multiprocessing/managers.py and Lib/asyncore.py. ---------- keywords: +patch nosy: +serhiy.storchaka Added file: http://bugs.python.org/file27435/reraise_keyboard_interrupt.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 19:51:00 2012 From: report at bugs.python.org (=?utf-8?q?Manuel_P=C3=A9gouri=C3=A9-Gonnard?=) Date: Fri, 05 Oct 2012 17:51:00 +0000 Subject: [issue16144] misleading sentence in reference/import Message-ID: <1349459459.97.0.290795741864.issue16144@psf.upfronthosting.co.za> New submission from Manuel P?gouri?-Gonnard: I find the following sentences, from import.rst, section "Finders and loaders", misleading: "Python includes a number of default finders and importers. One knows how to locate frozen modules, and another knows how to locate built-in modules." in that one may think frozen comes before built-in, while the converse is true. Attached is a patch with a hopefully clearer version. While at it, the patch also turns into links the references to PEPs in the introduction. ---------- assignee: docs at python components: Documentation files: import-doc-fixes.patch keywords: patch messages: 172105 nosy: docs at python, mpg priority: normal severity: normal status: open title: misleading sentence in reference/import versions: Python 3.4 Added file: http://bugs.python.org/file27436/import-doc-fixes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 20:13:30 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Oct 2012 18:13:30 +0000 Subject: [issue16141] Possible simplification for logging.StreamHandler exception handling In-Reply-To: <1349448386.51.0.852233729423.issue16141@psf.upfronthosting.co.za> Message-ID: <1349460810.98.0.84447511413.issue16141@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +vinay.sajip stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 20:23:20 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 05 Oct 2012 18:23:20 +0000 Subject: [issue812369] module shutdown procedure based on GC Message-ID: <1349461400.14.0.367121915863.issue812369@psf.upfronthosting.co.za> Martin v. L?wis added the comment: At the moment, it's like that the status of the patch needs to be reestablished. Does it apply? Does it work? Does the test suite still pass? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 20:25:13 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 05 Oct 2012 18:25:13 +0000 Subject: [issue16144] misleading sentence in reference/import In-Reply-To: <1349459459.97.0.290795741864.issue16144@psf.upfronthosting.co.za> Message-ID: <1349461513.84.0.559788704929.issue16144@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +brett.cannon, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 20:29:40 2012 From: report at bugs.python.org (=?utf-8?q?Francisco_Mart=C3=ADn_Brugu=C3=A9?=) Date: Fri, 05 Oct 2012 18:29:40 +0000 Subject: [issue16098] Bisect optimization in heapq.nsmallest is never used In-Reply-To: <1349091566.51.0.299551598321.issue16098@psf.upfronthosting.co.za> Message-ID: <1349461780.37.0.180587518793.issue16098@psf.upfronthosting.co.za> Francisco Mart?n Brugu? added the comment: I've to say that I also ran into that by following coverage numbers and as a newbie is not so easy to see what Raymond told. IMHO that information could be put as a comment. Regards francis ---------- nosy: +francismb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 20:34:36 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Oct 2012 18:34:36 +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: <1349462076.64.0.672670201063.issue16129@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 20:47:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2012 18:47:03 +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: <1349462823.78.0.349457744865.issue16137@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Viktor, what happen when a large positive number (>=100) used as tm_hour? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 20:47:40 2012 From: report at bugs.python.org (Roger Serwy) Date: Fri, 05 Oct 2012 18:47:40 +0000 Subject: [issue16123] IDLE - deprecate running without a subprocess In-Reply-To: <1349302429.82.0.0807471180715.issue16123@psf.upfronthosting.co.za> Message-ID: <1349462860.96.0.963602185345.issue16123@psf.upfronthosting.co.za> Roger Serwy added the comment: I agree that a message within the shell would be more informative to the user. The _rev1 patch also adds a message to the shell. ---------- Added file: http://bugs.python.org/file27437/idle_deprecate_rev1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 20:48:17 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 05 Oct 2012 18:48:17 +0000 Subject: [issue16145] Abort in _csv module Message-ID: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> New submission from Arfrever Frehtes Taifersar Arahesis: Commit f2adbb1065eb introduced abort in _csv module in debug builds in Python 3.3, when using APSW shell. (You need to have SQLite >=3.7.14 installed.) $ cd /tmp $ wget http://apsw.googlecode.com/files/apsw-3.7.14-r2.zip $ unzip apsw-3.7.14-r2.zip $ cd apsw-3.7.14-r2 $ python3.3dm setup.py build ... $ PYTHONPATH="$(ls -d build/lib*)" python3.3dm tools/shell.py SQLite version 3.7.14.1 (APSW 3.7.14-r2) Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> .output output_file sqlite> .mode csv sqlite> select "a"; python3.3dm: /tmp/cpython/Modules/_csv.c:1111: join_append: Assertion `(((PyASCIIObject*)field)->state.ready)' failed. Aborted $ In bash shell: $ PYTHONPATH="$(ls -d build/lib*)" python3.3dm tools/shell.py <<< $'.output output_file\n.mode csv\nselect "a";' python3.3dm: /tmp/cpython/Modules/_csv.c:1111: join_append: Assertion `(((PyASCIIObject*)field)->state.ready)' failed. Aborted $ ---------- keywords: 3.3regression messages: 172110 nosy: Arfrever, pitrou, rogerbinns priority: normal severity: normal status: open title: Abort in _csv module versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 20:54:47 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 05 Oct 2012 18:54:47 +0000 Subject: [issue16058] ConfigParser no longer deepcopy compatible in 2.7 In-Reply-To: <1348705133.3.0.138375656992.issue16058@psf.upfronthosting.co.za> Message-ID: <1349463287.25.0.357571740801.issue16058@psf.upfronthosting.co.za> Andrew Svetlov added the comment: ConfigParser is not intended to be deep copy-able, at least documentation says nothing about it. ---------- nosy: +asvetlov, lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 20:56:11 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 05 Oct 2012 18:56:11 +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: <1349463371.51.0.667862898902.issue16124@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Is it affected for 3.3 and 3.4 also? ---------- nosy: +asvetlov versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 20:57:42 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 05 Oct 2012 18:57:42 +0000 Subject: [issue16128] hashable documentation error In-Reply-To: <1349350634.9.0.571993653286.issue16128@psf.upfronthosting.co.za> Message-ID: <1349463462.02.0.137465793593.issue16128@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Please write what exact text you want to see in documentation. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 20:58:16 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Oct 2012 18:58:16 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349463496.7.0.525536992271.issue16113@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: http://bugs.python.org/file27438/622009fb6192.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 21:00:12 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Oct 2012 19:00:12 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1349463612.92.0.294247948649.issue16145@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, can you try to enable core dumps and get a complete stack trace? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 21:07:53 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 05 Oct 2012 19:07:53 +0000 Subject: [issue16123] IDLE - deprecate running without a subprocess In-Reply-To: <1349302429.82.0.0807471180715.issue16123@psf.upfronthosting.co.za> Message-ID: <1349464073.22.0.900893956674.issue16123@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Looks good for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 21:16:10 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 05 Oct 2012 19:16:10 +0000 Subject: [issue14574] SocketServer doesn't handle client disconnects properly In-Reply-To: <1349434423.81.0.0572549405128.issue14574@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Are you referring to the comment where I mention ECONNABORTED? That is a regular unix error (windows version is WSAECONNABORTED). > This error occurs when the local stack decides to kill the connection, as opposed to ECONNRESET which occurs on account of receiving a RST packet. Oops, I misread. ECONNABORTED is fine. > New patch includes documentation change. LGTM. > If 2.7 is still in bugfix mode, then this patch could probably be accepted. I guess so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 21:17:05 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Oct 2012 19:17:05 +0000 Subject: [issue16123] IDLE - deprecate running without a subprocess In-Reply-To: <1349302429.82.0.0807471180715.issue16123@psf.upfronthosting.co.za> Message-ID: <3XYLLm31bszNZF@mail.python.org> Roundup Robot added the comment: New changeset 0430986a8c03 by Andrew Svetlov in branch 'default': Issue #16123: IDLE - deprecate running without a subprocess. http://hg.python.org/cpython/rev/0430986a8c03 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 21:18:37 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 05 Oct 2012 19:18:37 +0000 Subject: [issue16139] Python 3.3 fails when starting from read-only FS In-Reply-To: <1349394780.28.0.923022645672.issue16139@psf.upfronthosting.co.za> Message-ID: <1349464717.01.0.200905343297.issue16139@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > This is more or less a duplicate of #15833 Indeed, closing as duplicate. ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> most failures to write byte-compiled file no longer suppressed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 21:18:43 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 05 Oct 2012 19:18:43 +0000 Subject: [issue16123] IDLE - deprecate running without a subprocess In-Reply-To: <1349302429.82.0.0807471180715.issue16123@psf.upfronthosting.co.za> Message-ID: <1349464723.14.0.392322669658.issue16123@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Change priority to deferred blocker for reminding to remove no-subprocess mode in 3.5. Thanks, Roger. ---------- priority: normal -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 21:22:35 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 05 Oct 2012 19:22:35 +0000 Subject: [issue15833] most failures to write byte-compiled file no longer suppressed In-Reply-To: <1346432246.49.0.876284426658.issue15833@psf.upfronthosting.co.za> Message-ID: <1349464955.9.0.20896015285.issue15833@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: We should probably catch all OSErrors, and log a warning in verbose mode, as suggested by Antoine. Catching individual errnos is tedious and error-prone. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 21:24:09 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Oct 2012 19:24:09 +0000 Subject: [issue15833] most failures to write byte-compiled file no longer suppressed In-Reply-To: <1346432246.49.0.876284426658.issue15833@psf.upfronthosting.co.za> Message-ID: <1349465049.38.0.688824333246.issue15833@psf.upfronthosting.co.za> STINNER Victor added the comment: Issue #16139 has been marked as a duplicate of this issue. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 21:39:09 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 05 Oct 2012 19:39:09 +0000 Subject: [issue13896] Make shelf instances work with 'with' as context managers In-Reply-To: <1327749150.13.0.147725255938.issue13896@psf.upfronthosting.co.za> Message-ID: <1349465949.13.0.484404451935.issue13896@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Filip, please describe why you prevent closing if writeback attribute is not present. I see comment for __del__ related to #1339007, but at __exit__ call __enter__ has called already and __init__ has finished definitely with success. Also I would to see reference to http://bugs.python.org/issue1339007 in __del__ comment to cleaner description of issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 21:40:03 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 05 Oct 2012 19:40:03 +0000 Subject: [issue13896] Make shelf instances work with 'with' as context managers In-Reply-To: <1327749150.13.0.147725255938.issue13896@psf.upfronthosting.co.za> Message-ID: <1349466003.06.0.662236400142.issue13896@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- assignee: -> asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 21:53:23 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Oct 2012 19:53:23 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args[0] arg In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <3XYM8f1CVXzNCJ@mail.python.org> Roundup Robot added the comment: New changeset 0df5aeab229f by Andrew Svetlov in branch '3.3': Issue #16115: Add test for check that executable arg to Popen() takes precedence over args[0] arg\n \n Patch by Kushal Das http://hg.python.org/cpython/rev/0df5aeab229f New changeset 0fcfb6066e17 by Andrew Svetlov in branch 'default': Merge issue #16115: Add test for check that executable arg to Popen() takes precedence over args[0] arg\n \n Patch by Kushal Das http://hg.python.org/cpython/rev/0fcfb6066e17 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:01:18 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 05 Oct 2012 20:01:18 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args[0] arg In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <1349467278.69.0.314979500498.issue16115@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Committed. Thank you, Kushal Das. BTW, please fill http://www.python.org/psf/contrib/ as contributor of Python project. We would to get that agreement from everybody who has pushed any patch. Thanks again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:01:38 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 05 Oct 2012 20:01:38 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args[0] arg In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <1349467298.78.0.872182473769.issue16115@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:07:26 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 05 Oct 2012 20:07:26 +0000 Subject: [issue16114] incorrect path in subprocess.Popen() FileNotFoundError message In-Reply-To: <1349237807.22.0.592724343556.issue16114@psf.upfronthosting.co.za> Message-ID: <1349467646.07.0.760402591296.issue16114@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Maybe better to fix Windows behavior for unifying FileNotFoundError? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:10:49 2012 From: report at bugs.python.org (yinian1992) Date: Fri, 05 Oct 2012 20:10:49 +0000 Subject: [issue16146] MIMEApplication cannot access Message-ID: <1349467849.56.0.764914408405.issue16146@psf.upfronthosting.co.za> New submission from yinian1992: I have a python 2.7.3 installation both on Debian 6 and Windows 7. And under both environment email.mime.application cannot access. >>> email.mime.application Traceback (most recent call last): File "", line 1, in AttributeError: 'module' object has no attribute 'application' It seems that the import list of email module's __init__.py doesn't include it. ---------- components: Library (Lib) files: __init__.patch keywords: patch messages: 172126 nosy: yinian1992 priority: normal severity: normal status: open title: MIMEApplication cannot access versions: Python 2.7 Added file: http://bugs.python.org/file27439/__init__.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:11:11 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 05 Oct 2012 20:11:11 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args[0] arg In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <1349467871.94.0.396175735437.issue16115@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Actually, I was still working on this. I had assigned it to myself. + p = subprocess.Popen(["nonexistent","-c",'import sys; sys.exit(42)'], + executable=sys.executable, cwd=python_dir) The test for the executable argument should really test the executable argument independent of the cwd argument. Also, it would be better if the test uses a valid args[0] to demonstrate precedence. I had prepared a test but did not upload it yet, because I also wanted to add an accompanying clarification to the docs which I am still preparing. Reopening. ---------- resolution: fixed -> stage: committed/rejected -> test needed status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:15:16 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 05 Oct 2012 20:15: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: <1349468116.85.0.162427578223.issue16114@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I will be opening a separate issue to have the same behavior in a future version after this issue is closed. For existing releases, we don't want to break working code that could be relying on the difference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:18:33 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 05 Oct 2012 20:18:33 +0000 Subject: [issue16114] incorrect path in subprocess.Popen() FileNotFoundError message In-Reply-To: <1349237807.22.0.592724343556.issue16114@psf.upfronthosting.co.za> Message-ID: <1349468313.8.0.667354483407.issue16114@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Sorry, I was confusing this issue with issue 15533. Yes, I support adding the file path to the error message in the Windows implementation, though my preference would be for that to be addressed as part of a separate issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:20:54 2012 From: report at bugs.python.org (Roger Binns) Date: Fri, 05 Oct 2012 20:20:54 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1349468454.23.0.720444025123.issue16145@psf.upfronthosting.co.za> Roger Binns added the comment: I'm the APSW author. You do not need SQLite installed - APSW's setup can fetch the current SQLite and use it privately not affecting the rest of the system. An easier way of testing is: python3 setup.py fetch --sqlite --version 3.7.14 build_ext --inplace --force Create test.sql with these contents .output output_file .mode csv select 3, '4'; Then run: env PYTHONPATH=. python3 tools/shell.py .read test.sql The actual code where the problem happens does the following: - Create a StringIO - Initialize csv.writer using the StringIO - Write one row with two values (this is when the crash happens in Python 3.3 on the first write) - Copy the current contents of the StringIO to the actual output file changing encoding as needed - Truncate StringIO and seek back to offset zero ready for the next line The relevant code is in tools/shell.py in the output_csv function. Writing just that sequence of code above doesn't result in the assertion. valgrind doesn't show any problems either (using pydebug, without pymalloc and all the freelists set to zero). A stack trace is here: https://code.google.com/p/apsw/issues/detail?id=132#c4 If not using a debug/nopymalloc build then you get a crash happening later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:24:38 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Oct 2012 20:24:38 +0000 Subject: [issue16146] MIMEApplication cannot access In-Reply-To: <1349467849.56.0.764914408405.issue16146@psf.upfronthosting.co.za> Message-ID: <1349468678.29.0.413331162457.issue16146@psf.upfronthosting.co.za> R. David Murray added the comment: This is by design. If you want to load the application module, you have to do so explicitly: import email.mime.application This is similar to the way many other packages are organized. An __init__ file importing a submodule is the (relatively) exceptional case rather than the common case. This is so that applications that do not need particular submodules do not incur the performance and memory hit of importing those submodules implicitly. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:32:52 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 05 Oct 2012 20:32:52 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args[0] arg In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <1349469172.34.0.247885793501.issue16115@psf.upfronthosting.co.za> Andrew Svetlov added the comment: ok, it will be better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:35:29 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 05 Oct 2012 20:35:29 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args[0] arg In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <1349469329.1.0.334142334459.issue16115@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks, Andrew. I'm hoping to finish preparing the patch sometime this weekend. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:39:01 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 05 Oct 2012 20:39:01 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1349469541.44.0.515339179545.issue16145@psf.upfronthosting.co.za> Stefan Krah added the comment: In general APSW does not look ready for the Python 3.3 Unicode implementation. Example: src/statementcache.c:217 Py_UNICODE *out; PyObject *res=PyUnicode_FromUnicode(NULL, size); Python 3.3 docs: "If the buffer is NULL, PyUnicode_READY() must be called once the string content has been filled before using any of the access macros such as PyUnicode_KIND()." The abort() in the traceback occurs precisely because PyUnicode_READY() hasn't been called, so I'm closing this as invalid. ---------- nosy: +skrah resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:40:05 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 05 Oct 2012 20:40:05 +0000 Subject: [issue16114] incorrect path in subprocess.Popen() FileNotFoundError message In-Reply-To: <1349237807.22.0.592724343556.issue16114@psf.upfronthosting.co.za> Message-ID: <1349469605.82.0.255824721394.issue16114@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I'm ok with your patch if it will be applied to 3.2 etc and after that new issue will fix Windows problem. BTW, the patch fails for 3.2 and 3.3 but works for 3.4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:40:29 2012 From: report at bugs.python.org (Spiros K.) Date: Fri, 05 Oct 2012 20:40:29 +0000 Subject: [issue16119] Python 2.7 _socket DLL import error on Windows Vista In-Reply-To: <1349272767.13.0.710278986958.issue16119@psf.upfronthosting.co.za> Message-ID: <1349469629.47.0.592576664854.issue16119@psf.upfronthosting.co.za> Changes by Spiros K. : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:41:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2012 20:41:01 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1349469661.53.0.262017386281.issue16145@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: How do you get values to write? Most likely, the problem has nothing to do with csv module, but written values are broken. Possible error in sqlite module, or in any conversion function, or in you APSW C-code. Can you dump this values before sending to writerow? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:43:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2012 20:43:03 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1349469783.87.0.260786996886.issue16145@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oh, I see the issue has already been solved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:44:20 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Oct 2012 20:44:20 +0000 Subject: [issue16147] Rewrite PyUnicode_FromFormatV() to use the _PyUnicodeWriter API Message-ID: <1349469859.85.0.180138981213.issue16147@psf.upfronthosting.co.za> New submission from STINNER Victor: Attached patch rewrites PyUnicode_FromFormatV(): * simplify the code: replace 4 steps with one unique step. PyUnicode_Format() has the same design. It avoids to store intermediate results which require to allocate an array of pointers in the heap. * use the _PyUnicodeWriter API for speed (and its convinient API): overallocate the buffer to reduce the number of "realloc()" * Implement "width" and "precision" in Python, don't rely on sprintf(). It avoids to need of a temporary buffer allocated on the heap: only use a small buffer allocated in the stack. * Detect integer overflow when parsing width and precision, as done in PyUnicode_Format() * Add _PyUnicodeWriter_WriteCstr() function * Split PyUnicode_FromFormatV() into smaller functions: add unicode_fromformat_arg(). It requires to copy vargs using Py_VA_COPY: without Py_VA_COPY, the function does crash. I don't understand why. * Inline parse_format_flags(): the format of an argument is now only parsed once, it's no more needed to have a subfunction. * Optimize PyUnicode_FromFormatV() for characters between two arguments: search the next "%" and copy the substring in one chunk, instead of copying character per character. * Replace "prec too big" with "precision too big" in error messages _tescapi.test_string_from_format() is 20% faster with the patch according to timeit. I don't know how to write better benchmarks because PyUnicode_FromV() is not exposed in Python. I wrote a benchmark using ctypes to call the function, but it looks like the ctypes overhead is too high. I wrote the patch to simplify the code, but it may be faster thanks to the _PyUnicodeWriter API and some optimizations implemented in the patch. ---------- files: unicode_fromformat.patch keywords: patch messages: 172138 nosy: haypo priority: normal severity: normal status: open title: Rewrite PyUnicode_FromFormatV() to use the _PyUnicodeWriter API type: performance versions: Python 3.4 Added file: http://bugs.python.org/file27440/unicode_fromformat.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:45:57 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Oct 2012 20:45:57 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1349469957.27.0.3601455737.issue16145@psf.upfronthosting.co.za> R. David Murray added the comment: My understanding was that code that calls the public APIs should continue to work. Is this a new requirement in 3.3, or is it that it has always been a requirement but code could get away without the ready before? Either way we need to add an note to the Porting section of What's New. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:48:33 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 05 Oct 2012 20:48:33 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1349470113.55.0.0161314650634.issue16145@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: Apparently http://docs.python.org/py3k/whatsnew/3.3.html#pep-393-flexible-string-representation says: "On the C API side, PEP 393 is fully backward compatible." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:56:40 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Oct 2012 20:56:40 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1349470600.09.0.82285196053.issue16145@psf.upfronthosting.co.za> R. David Murray added the comment: I'm going to reopen this at least until we have more information. ---------- resolution: invalid -> stage: committed/rejected -> needs patch status: closed -> open type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:58:01 2012 From: report at bugs.python.org (Viktor Chynarov) Date: Fri, 05 Oct 2012 20:58:01 +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: <1349470681.27.0.357850317286.issue16137@psf.upfronthosting.co.za> Viktor Chynarov added the comment: Serhiy, when I use a large number, Python also crashes. >>> initial_struct_time = [tm for tm in time.localtime()] >>> initial_struct_time[3] = 101 >>> faulty_time = time.asctime(initial_struct_time) The above code leads to crash. My Python version information and computer architecture are shown below: Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win32 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:59:21 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 05 Oct 2012 20:59:21 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349469957.27.0.3601455737.issue16145@psf.upfronthosting.co.za> Message-ID: <20121005205921.GA18037@sleipnir.bytereef.org> Stefan Krah added the comment: R. David Murray wrote: > My understanding was that code that calls the public APIs should continue to > work. Is this a new requirement in 3.3, or is it that it has always been a > requirement but code could get away without the ready before? It's a new requirement. > Either way we need to add an note to the Porting section of What's New. Good point. The main hint I find is here: http://docs.python.org/py3k/whatsnew/3.3.html#deprecated-functions-and-types-of-the-c-api But you have to click through to: http://docs.python.org/py3k/c-api/unicode.html#PyUnicode_FromUnicode PEP 393 on the other hand has this paragraph: "Extension modules using the legacy API may inadvertently call PyUnicode_READY, by calling some API that requires that the object is ready, and then continue accessing the (now invalid) Py_UNICODE pointer. Such code will break with this PEP. The code was already flawed in 3.2, as there is was no explicit guarantee that the PyUnicode_AS_UNICODE result would stay valid after an API call (due to the possibility of string resizing). Modules that face this issue need to re-fetch the Py_UNICODE pointer after API calls; doing so will continue to work correctly in earlier Python versions." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 23:06:16 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Oct 2012 21:06:16 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349471176.11.0.00797404686912.issue16113@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file27426/44920b1d9db1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 23:06:27 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Oct 2012 21:06:27 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349471187.37.0.183081551299.issue16113@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file27431/49a949116245.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 23:06:34 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Oct 2012 21:06:34 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349471194.49.0.287692336019.issue16113@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file27438/622009fb6192.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 23:07:24 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Oct 2012 21:07:24 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349471244.42.0.522222259358.issue16113@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: http://bugs.python.org/file27441/521e85a613bf.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 23:10:06 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Oct 2012 21:10:06 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349471406.26.0.384718146971.issue16113@psf.upfronthosting.co.za> Christian Heimes added the comment: New patch. I've removed the dependency on uint64 types. On platforms without a uint64 type the module is using the 32bit implementation with interleave tables. By the way the SSE / SIMD instructions aren't useful. They are two to four times slower. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 23:10:15 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2012 21:10:15 +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: <1349471415.34.0.547535321105.issue16137@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, it looks as issue8013. Fix was not applied to 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 23:10:55 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Oct 2012 21:10:55 +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: <1349471455.45.0.845485522003.issue16137@psf.upfronthosting.co.za> R. David Murray added the comment: This sounds like Issue 10814, but that was supposedly fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 23:12:00 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Oct 2012 21:12:00 +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: <1349471520.84.0.801794492448.issue16137@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, looks like Serhiy found the correct issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 23:20:52 2012 From: report at bugs.python.org (Mike Hoy) Date: Fri, 05 Oct 2012 21:20:52 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1349472052.45.0.393821534854.issue12067@psf.upfronthosting.co.za> Mike Hoy added the comment: Changed patch to include suggestions by Chris Jerdonek. http://bugs.python.org/issue12067#msg170953 ---------- hgrepos: +153 Added file: http://bugs.python.org/file27442/issue12067-expressions_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 23:22:50 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Oct 2012 21:22:50 +0000 Subject: [issue16147] Rewrite PyUnicode_FromFormatV() to use the _PyUnicodeWriter API In-Reply-To: <1349469859.85.0.180138981213.issue16147@psf.upfronthosting.co.za> Message-ID: <1349472170.57.0.313181592157.issue16147@psf.upfronthosting.co.za> STINNER Victor added the comment: "Split PyUnicode_FromFormatV() into smaller functions: add unicode_fromformat_arg(). It requires to copy vargs using Py_VA_COPY: without Py_VA_COPY, the function does crash. I don't understand why." Ok, here is the answer. http://stackoverflow.com/questions/8047362/is-gcc-mishandling-a-pointer-to-a-va-list-passed-to-a-function In short: va_list can be an array (of 1 element) on some platforms (ex: AMD64). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 23:26:51 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2012 21:26:51 +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: <1349472411.92.0.0507918043712.issue16137@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: No, it's you found (msg172016) the correct issue. ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 23:27:54 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 05 Oct 2012 21:27:54 +0000 Subject: [issue16134] Add support for RTMP schemes to urlparse In-Reply-To: <1349375961.84.0.319840553089.issue16134@psf.upfronthosting.co.za> Message-ID: <1349472474.01.0.887559262023.issue16134@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 Fri Oct 5 23:31:44 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 05 Oct 2012 21:31:44 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1349472704.72.0.326918877249.issue16145@psf.upfronthosting.co.za> Stefan Krah added the comment: David is right, the existing (APSW) code should continue to work. I think we need to add a couple of PyUnicode_READY() to some functions in Modules/_csv.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 23:40:14 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 05 Oct 2012 21:40:14 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349473214.46.0.148154413245.issue16113@psf.upfronthosting.co.za> Gregory P. Smith added the comment: don't worry about optimization settings in python itself for now. the canonical optimized version will be in a future openssl version. now that it has been declared the standard it will get a *lot* more attention in the next few years. as it is, we _may_ want to replace this reference implementation with one from libtomcrypt in the future when it gets around to implementing it just so that the code for all of our bundled hash functions comes from the same place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 00:26:58 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Oct 2012 22:26:58 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1349476018.73.0.219708333384.issue16145@psf.upfronthosting.co.za> STINNER Victor added the comment: "I think we need to add a couple of PyUnicode_READY() to some functions in Modules/_csv.c." Oh yes, the _csv module was in my TODO list. I forgot to fix it :-/ ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 00:30:57 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Oct 2012 22:30:57 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1349476257.47.0.441080710161.issue16145@psf.upfronthosting.co.za> STINNER Victor added the comment: "In general APSW does not look ready for the Python 3.3 Unicode implementation." I bet that most Python modules implemented in C use the "legacy" (old) Unicode API (Py_UNICODE*). Python 3.3 must call PyUnicode_READY() everywhere (where the new API is used to get attribute of a string, ex: PyUnicode_GET_LENGTH). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 00:47:05 2012 From: report at bugs.python.org (Mike Hoy) Date: Fri, 05 Oct 2012 22:47:05 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1349477225.15.0.533236772637.issue12067@psf.upfronthosting.co.za> Changes by Mike Hoy : ---------- hgrepos: -153 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 02:00:13 2012 From: report at bugs.python.org (Roumen Petrov) Date: Sat, 06 Oct 2012 00:00:13 +0000 Subject: [issue15833] most failures to write byte-compiled file no longer suppressed In-Reply-To: <1346432246.49.0.876284426658.issue15833@psf.upfronthosting.co.za> Message-ID: <1349481613.6.0.930710563237.issue15833@psf.upfronthosting.co.za> Roumen Petrov added the comment: Did 0016-CROSS-reload-may-fail-with-operation-on-closed-file-.patch fix issue ? ---------- keywords: +patch nosy: +rpetrov Added file: http://bugs.python.org/file27443/0016-CROSS-reload-may-fail-with-operation-on-closed-file-.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 02:13:06 2012 From: report at bugs.python.org (Roumen Petrov) Date: Sat, 06 Oct 2012 00:13:06 +0000 Subject: [issue3754] cross-compilation support for python build In-Reply-To: <1220305759.82.0.468834426074.issue3754@psf.upfronthosting.co.za> Message-ID: <1349482386.73.0.50020030941.issue3754@psf.upfronthosting.co.za> Roumen Petrov added the comment: Hi V?clav, uploaded file py3k-20121004-CROSS.tgz contain current status of patch extracted as is from my repository, i.e. on small chunks. I have no idea what is in 3.3.0 . ---------- Added file: http://bugs.python.org/file27444/py3k-20121004-CROSS.tgz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 02:36:25 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Oct 2012 00:36:25 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <3XYTR640NfzP2T@mail.python.org> Roundup Robot added the comment: New changeset 11c9a894680e by Christian Heimes in branch 'default': Issue #16113: integrade SHA-3 (Keccak) patch from http://hg.python.org/sandbox/cheimes http://hg.python.org/cpython/rev/11c9a894680e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 02:37:34 2012 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Oct 2012 00:37:34 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349483854.0.0.140052482041.issue16113@psf.upfronthosting.co.za> Christian Heimes added the comment: The code has landed in default. Let's see how the build bots like my patch and the reference implementation. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 03:04:27 2012 From: report at bugs.python.org (=?utf-8?q?Filip_Gruszczy=C5=84ski?=) Date: Sat, 06 Oct 2012 01:04:27 +0000 Subject: [issue13896] Make shelf instances work with 'with' as context managers In-Reply-To: <1327749150.13.0.147725255938.issue13896@psf.upfronthosting.co.za> Message-ID: <1349485467.77.0.936488056476.issue13896@psf.upfronthosting.co.za> Filip Gruszczy?ski added the comment: Crap, it was so long ago, that I honestly don't remember why I added this if. It made sense back then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 03:16:26 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Oct 2012 01:16:26 +0000 Subject: [issue16133] asyncore.dispatcher.recv doesn't handle EAGAIN / EWOULDBLOCK In-Reply-To: <1349366792.42.0.417654527681.issue16133@psf.upfronthosting.co.za> Message-ID: <3XYVKL3G2yzNkN@mail.python.org> Roundup Robot added the comment: New changeset 6a1d8e78b23d by Christian Heimes in branch 'default': Issue #16133: add Windows project file for _sha3 module. I choose to build _sha3 as a sparat module as it's rather large (190k for AMD64). http://hg.python.org/cpython/rev/6a1d8e78b23d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 04:18:24 2012 From: report at bugs.python.org (Roger Binns) Date: Sat, 06 Oct 2012 02:18:24 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1349489904.32.0.815283645059.issue16145@psf.upfronthosting.co.za> Roger Binns added the comment: (APSW author here). I haven't ported to the new Python 3.3 Unicode handling yet but it is on my todo list. The PEPs and doc said the C API would remain backwards compatible. The APSW code supports Python 2.3 onwards. SQLite APIs support both UTF-8 and UTF-16. Py_UNICODE_SIZE is used to select between two code paths - if 2 then the UTF-16 APIs are used and if 4 then a UTF-8 conversion is made and those APIs used. Python 3.3 makes Py_UNICODE_SIZE meaningless and will be quite a bit of work to integrate as a third branch. It should be noted that at no point is there any dependence of the underlying bytes/pointer living a long time. They are only used at the point which data needs to be transferred between Python types and SQLite APIs (both ways) and not held outside of that period. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 04:27:58 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 06 Oct 2012 02:27:58 +0000 Subject: [issue16136] Removal of VMS support In-Reply-To: <1349389263.57.0.925729224322.issue16136@psf.upfronthosting.co.za> Message-ID: <1349490478.59.0.345633121299.issue16136@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: I am sending an email to Mathew Sandeep. Lets see... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 04:50:08 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 06 Oct 2012 02:50:08 +0000 Subject: [issue16136] Removal of VMS support In-Reply-To: <1349389263.57.0.925729224322.issue16136@psf.upfronthosting.co.za> Message-ID: <1349491808.57.0.910927149302.issue16136@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: : host smtp.hp.com[15.193.32.72] said: 550 5.1.1 : Recipient address rejected: User unknown in virtual alias table (in reply to RCPT TO command) Looks like he is not in HP anymore. Searching in linkedin I think I have found him. Lets try that route. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 05:01:02 2012 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 06 Oct 2012 03:01:02 +0000 Subject: [issue15631] Python 3.3/3.4 installation issue on OpenSUSE lib/lib64 folders In-Reply-To: <1344794304.26.0.478120841355.issue15631@psf.upfronthosting.co.za> Message-ID: <1349492462.93.0.830782145679.issue15631@psf.upfronthosting.co.za> Skip Montanaro added the comment: I applied the OpenSUSE patch to the current cpython tip (3.4a0), rebuilt, then reinstalled. I verified that sys.path contains directories which contain "lib64". I can import the time module now, which failed before applying the patch. The patch didn't apply perfectly (two chunks were slightly offset), so I generated a new patch, which is attached. It's been awhile since I did anything with bug reports. I tweaked a few fields. Let me know if I muffed anything. ---------- keywords: +patch nosy: +skip.montanaro stage: -> patch review title: Python 3.3 beta 1 installation issue lib/lib64 folders -> Python 3.3/3.4 installation issue on OpenSUSE lib/lib64 folders versions: +Python 3.4 Added file: http://bugs.python.org/file27445/opensuse.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 05:18:32 2012 From: report at bugs.python.org (Neil Schemenauer) Date: Sat, 06 Oct 2012 03:18:32 +0000 Subject: [issue812369] module shutdown procedure based on GC Message-ID: <1349493512.37.0.0550766763867.issue812369@psf.upfronthosting.co.za> Neil Schemenauer added the comment: It's been quite a long time since I played with this patch so my memory might be a bit fuzzy. As I recall, it sounds good in theory but in practice it doesn't really work. One of the core problems is that many extension modules keep references to Python objects in global or static variables. These references keep pretty much everything alive and prevent GC cleanup of modules. So, a necessary condition to this working is to get rid of those references and use the new module struct facility introduced by Martin. That would be a huge amount of work but I think should be the long term goal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 05:35:48 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 06 Oct 2012 03:35:48 +0000 Subject: [issue8912] `make patchcheck` should check the whitespace of .c/.h files In-Reply-To: <1275794679.2.0.211731721822.issue8912@psf.upfronthosting.co.za> Message-ID: <1349494548.9.0.561695027419.issue8912@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 05:38:58 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 06 Oct 2012 03:38:58 +0000 Subject: [issue13633] Handling of hex character references in HTMLParser.handle_charref In-Reply-To: <1324277757.56.0.0733657691883.issue13633@psf.upfronthosting.co.za> Message-ID: <1349494738.89.0.726350806385.issue13633@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: +Python 3.4 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 05:43:42 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 06 Oct 2012 03:43:42 +0000 Subject: [issue2091] file accepts 'rU+' as a mode In-Reply-To: <1202856909.89.0.801927341292.issue2091@psf.upfronthosting.co.za> Message-ID: <1349495022.37.0.927208291504.issue2091@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 Sat Oct 6 06:10:48 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 06 Oct 2012 04:10:48 +0000 Subject: [issue16098] Bisect optimization in heapq.nsmallest is never used In-Reply-To: <1349091566.51.0.299551598321.issue16098@psf.upfronthosting.co.za> Message-ID: <1349496648.34.0.396675373378.issue16098@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 06:26:21 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 06 Oct 2012 04:26:21 +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: <1349497581.22.0.368572479976.issue15837@psf.upfronthosting.co.za> Ezio Melotti added the comment: I left a review on rietveld. FWIW these are the results of the tests using timeit: # with int=int $ ./python -m timeit -s 'from random import random, shuffle; lst = list(range(100000))' 'shuffle(lst, random)' 10 loops, best of 3: 507 msec per loop # without int=int $ ./python -m timeit -s 'from random import random, shuffle; lst = list(range(100000))' 'shuffle(lst, random)' 10 loops, best of 3: 539 msec per loop ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 06:30:16 2012 From: report at bugs.python.org (danblack) Date: Sat, 06 Oct 2012 04:30:16 +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: <1349497816.43.0.0928564927336.issue8109@psf.upfronthosting.co.za> danblack added the comment: happy with this? I'm not sure what i've done to make s._set_context(newctx) work but s.context = newctx fail. I though the code here http://bugs.python.org/review/8109/diff2/5815:5989/Lib/ssl.py effectively maps them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 06:36:41 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 06 Oct 2012 04:36:41 +0000 Subject: [issue14668] Document the path option in the Windows installer In-Reply-To: <1335360311.11.0.51507359107.issue14668@psf.upfronthosting.co.za> Message-ID: <1349498201.78.0.818922699827.issue14668@psf.upfronthosting.co.za> Ezio Melotti added the comment: Brian, can this be closed? ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 07:02:40 2012 From: report at bugs.python.org (Yinian Sun) Date: Sat, 06 Oct 2012 05:02:40 +0000 Subject: [issue16146] MIMEApplication cannot access In-Reply-To: <1349467849.56.0.764914408405.issue16146@psf.upfronthosting.co.za> Message-ID: <1349499760.67.0.910198588813.issue16146@psf.upfronthosting.co.za> Yinian Sun added the comment: These MIME except MIMEApplication can be directly accessed. >>> import email >>> email.mime.Text >>> email.mime.Application Traceback (most recent call last): File "", line 1, in AttributeError: 'module' object has no attribute 'Application' According to Lib\email\__init__.py, it uses LazyImporter to deal with name mapping from new-style names to old-style name, and the _MIMENAMES list just doesn't include 'Application'. This causes the behavior inconformity. As issue1424065, the MIMEApplication added after other MIME class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 07:38:19 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 06 Oct 2012 05:38:19 +0000 Subject: [issue16146] MIMEApplication cannot access In-Reply-To: <1349467849.56.0.764914408405.issue16146@psf.upfronthosting.co.za> Message-ID: <1349501899.5.0.0813354288159.issue16146@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, I'd forgotten python2 email used the lazy importer. We dropped that in python3. I don't think that I want to fix this, since you have to do the import in python3 anyway. ---------- components: +email nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 08:49:04 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sat, 06 Oct 2012 06:49:04 +0000 Subject: [issue13290] get vars for object with __slots__ In-Reply-To: <1319871850.77.0.869546838833.issue13290@psf.upfronthosting.co.za> Message-ID: <1349506144.97.0.117447487997.issue13290@psf.upfronthosting.co.za> Michele Orr? added the comment: As a reference, linking the discussion on python-dev. http://mail.python.org/pipermail/python-dev/2012-October/122011.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 09:24:54 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 06 Oct 2012 07:24:54 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349446307.22.0.554438748505.issue16112@psf.upfronthosting.co.za> Message-ID: <506FDCBB.2070209@egenix.com> Marc-Andre Lemburg added the comment: Jes?s Cea Avi?n wrote: > > Antoine, I agree. I beg your pardon. This patch was suppose to be quite trivial, and "test_platform" passes just fine on my Linux and Solaris computers. And the four buildbots I was monitoring, the testsuite passed. > > The suggestion of Marc-Andre of simply adding an "os.access()" to check for file existence first is quite sensible and would be enough and compatible in all platforms and python releases. > > I am for backing out my patches so far and push a simple "os.access()" check. What do you think?. At least for Python 2.7, I think that would be a nice and simple solution. > Marc-Andre, I was wondering if you could elaborate a bit why 2.7 platform.py file should be able to run fine in 2.3 :-? That only applies to the version in Python 2.x. Python 2.3 is perhaps a bit extreme and I'd be fine with bumping it to 2.4. The main reason for keeping the compatibility is that the module is also being used outside the stdlib for Python versions starting from 2.4 and later. I don't want to maintain two separate versions. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Oct 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/ ________________________________________________________________________ 2012-09-27: Released eGenix PyRun 1.1.0 ... http://egenix.com/go35 2012-09-26: Released mxODBC.Connect 2.0.1 ... http://egenix.com/go34 2012-09-25: Released mxODBC 3.2.1 ... http://egenix.com/go33 2012-10-23: Python Meeting Duesseldorf ... 17 days to go 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 Sat Oct 6 10:48:14 2012 From: report at bugs.python.org (Mike Hoy) Date: Sat, 06 Oct 2012 08:48:14 +0000 Subject: [issue11643] Use |version| instead of X.Y in the doc In-Reply-To: <1300838111.66.0.617899175478.issue11643@psf.upfronthosting.co.za> Message-ID: <1349513294.26.0.943820365312.issue11643@psf.upfronthosting.co.za> Mike Hoy added the comment: Here is a patch after talking with Ezio on irc tonight. The rules I (attempted) to follow are: Within a :file: you should have {X.Y} In a text/paragraph area you can use |version| Within anything else just leave it as X.Y As stated by ?ric I ignored install and distutils. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 10:48:49 2012 From: report at bugs.python.org (Mike Hoy) Date: Sat, 06 Oct 2012 08:48:49 +0000 Subject: [issue11643] Use |version| instead of X.Y in the doc In-Reply-To: <1300838111.66.0.617899175478.issue11643@psf.upfronthosting.co.za> Message-ID: <1349513329.98.0.0274429811016.issue11643@psf.upfronthosting.co.za> Changes by Mike Hoy : ---------- keywords: +patch Added file: http://bugs.python.org/file27446/issue11643-xy_v1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 11:46:33 2012 From: report at bugs.python.org (G2P) Date: Sat, 06 Oct 2012 09:46:33 +0000 Subject: [issue1520818] fcntl.ioctl fails to copy back exactly-1024 buffer Message-ID: <1349516793.14.0.410389230635.issue1520818@psf.upfronthosting.co.za> G2P added the comment: The bug still exists in Python 2.6 (2.6.7-4ubuntu2). Python 2.7 (2.7.3-5ubuntu4) works correctly. I don't have Python 2.5 on hand to check. Here is a very simple test case: import array, fcntl buf = array.array('B', [0]*1024) fcntl.ioctl(0, termios.TIOCGPGRP, buf, 1) assert any(by != 0 for by in buf) ---------- nosy: +G2P _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 11:55:37 2012 From: report at bugs.python.org (G2P) Date: Sat, 06 Oct 2012 09:55:37 +0000 Subject: [issue1520818] fcntl.ioctl fails to copy back exactly-1024 buffer Message-ID: <1349517337.84.0.482048063773.issue1520818@psf.upfronthosting.co.za> G2P added the comment: Also happens in 2.5.2-2ubuntu6 and 2.4.5-1ubuntu4.2, FWIW. ---------- versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 12:27:42 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sat, 06 Oct 2012 10:27:42 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1349519262.01.0.401009060338.issue15767@psf.upfronthosting.co.za> Changes by Michele Orr? : ---------- nosy: +maker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 12:46:13 2012 From: report at bugs.python.org (Alex Gaynor) Date: Sat, 06 Oct 2012 10:46:13 +0000 Subject: [issue16148] Implement PEP 424 Message-ID: <1349520373.44.0.657178870535.issue16148@psf.upfronthosting.co.za> New submission from Alex Gaynor: The attached patch implements PEP 424. The implementation of this demonstrated a need for a few small modifications to the PEP, they will follow shortly. ---------- components: Interpreter Core files: length_hint.diff keywords: patch messages: 172176 nosy: alex priority: normal severity: normal status: open title: Implement PEP 424 type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27447/length_hint.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 12:52:39 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Oct 2012 10:52:39 +0000 Subject: [issue13896] Make shelf instances work with 'with' as context managers In-Reply-To: <1327749150.13.0.147725255938.issue13896@psf.upfronthosting.co.za> Message-ID: <3XYl6D5FYDzM87@mail.python.org> Roundup Robot added the comment: New changeset 3c1df1ede882 by Andrew Svetlov in branch 'default': Issue #13896: Make shelf instances work with 'with' as context managers. http://hg.python.org/cpython/rev/3c1df1ede882 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 12:54:40 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 06 Oct 2012 10:54:40 +0000 Subject: [issue13896] Make shelf instances work with 'with' as context managers In-Reply-To: <1327749150.13.0.147725255938.issue13896@psf.upfronthosting.co.za> Message-ID: <1349520880.81.0.291643366753.issue13896@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Committed. Thanks. Please fill Python Contributor Agreement: http://www.python.org/psf/contrib/ ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:03:09 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 06 Oct 2012 11:03:09 +0000 Subject: [issue15641] Clean up importlib for Python 3.4 In-Reply-To: <1344888035.57.0.935580041455.issue15641@psf.upfronthosting.co.za> Message-ID: <1349521389.06.0.553095777553.issue15641@psf.upfronthosting.co.za> Andrew Svetlov added the comment: What's about Finder? Do you want to remove it also? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:05:53 2012 From: report at bugs.python.org (Matthias Klose) Date: Sat, 06 Oct 2012 11:05:53 +0000 Subject: [issue15631] Python 3.3/3.4 installation issue on OpenSUSE lib/lib64 folders In-Reply-To: <1344794304.26.0.478120841355.issue15631@psf.upfronthosting.co.za> Message-ID: <1349521553.52.0.936136241323.issue15631@psf.upfronthosting.co.za> Matthias Klose added the comment: the proposed patch has still some issues: - it breaks the installation on 64bit platforms on Debian and Ubuntu. Please test the patch on one of these platforms too. - it hardcodes more platform information in the sys modules, which makes it difficult to overwrite for cross builds. If these macros are needed then they should be taken from the sysconfig module, using the _sysconfigdata module. - use the host macros in the configure instead of uname - LIB shouldn't be necessary when configuring --with-libdir ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:12:16 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 06 Oct 2012 11:12:16 +0000 Subject: [issue3636] Managing dual 2.x and 3.0 installations on Windows In-Reply-To: <1219350265.84.0.067322027975.issue3636@psf.upfronthosting.co.za> Message-ID: <1349521936.54.0.213369311063.issue3636@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: georg.brandl -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:15:04 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 06 Oct 2012 11:15:04 +0000 Subject: [issue8416] python 2.6.5 documentation can't search In-Reply-To: <1271397834.22.0.547082855086.issue8416@psf.upfronthosting.co.za> Message-ID: <1349522104.44.0.636013783299.issue8416@psf.upfronthosting.co.za> Georg Brandl added the comment: searchindex.js is now present in 2.6.5 too. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:15:52 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 06 Oct 2012 11:15:52 +0000 Subject: [issue8525] Display exception's subclasses in help() In-Reply-To: <1272150602.3.0.323796636819.issue8525@psf.upfronthosting.co.za> Message-ID: <1349522152.41.0.0647768237592.issue8525@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: georg.brandl -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:18:49 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sat, 06 Oct 2012 11:18:49 +0000 Subject: [issue16149] "Decimal(2) != float(2)" documentation bug Message-ID: <1349522329.87.0.691698812157.issue16149@psf.upfronthosting.co.za> New submission from Michele Orr?: Follows from the discussion on python-dev: http://mail.python.org/pipermail/python-dev/2012-September/121871.html ---------- assignee: docs at python components: Documentation messages: 172182 nosy: docs at python, maker, terry.reedy priority: normal severity: normal status: open title: "Decimal(2) != float(2)" documentation bug versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:20:23 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 06 Oct 2012 11:20:23 +0000 Subject: [issue7336] traceback module not properly printing exceptions on interpreter shutdown In-Reply-To: <1258413839.38.0.430585773151.issue7336@psf.upfronthosting.co.za> Message-ID: <1349522423.34.0.125951002159.issue7336@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: georg.brandl -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:20:51 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 06 Oct 2012 11:20:51 +0000 Subject: [issue3022] mailbox module, two small fixes In-Reply-To: <1212355773.67.0.369854949727.issue3022@psf.upfronthosting.co.za> Message-ID: <1349522451.32.0.672881442329.issue3022@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: georg.brandl -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:20:56 2012 From: report at bugs.python.org (Alex Gaynor) Date: Sat, 06 Oct 2012 11:20:56 +0000 Subject: [issue16148] Implement PEP 424 In-Reply-To: <1349520373.44.0.657178870535.issue16148@psf.upfronthosting.co.za> Message-ID: <1349522456.34.0.678612747191.issue16148@psf.upfronthosting.co.za> Alex Gaynor added the comment: patch updated fully with respect to the updates georg pushed to the PEP ---------- Added file: http://bugs.python.org/file27448/length_hint.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:21:23 2012 From: report at bugs.python.org (Alex Gaynor) Date: Sat, 06 Oct 2012 11:21:23 +0000 Subject: [issue16148] Implement PEP 424 In-Reply-To: <1349520373.44.0.657178870535.issue16148@psf.upfronthosting.co.za> Message-ID: <1349522483.61.0.387593999386.issue16148@psf.upfronthosting.co.za> Changes by Alex Gaynor : Removed file: http://bugs.python.org/file27447/length_hint.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:32:55 2012 From: report at bugs.python.org (Alex Gaynor) Date: Sat, 06 Oct 2012 11:32:55 +0000 Subject: [issue16148] Implement PEP 424 In-Reply-To: <1349520373.44.0.657178870535.issue16148@psf.upfronthosting.co.za> Message-ID: <1349523175.98.0.788356382425.issue16148@psf.upfronthosting.co.za> Alex Gaynor added the comment: Updated version of the patch with fewer memory leaks. ---------- Added file: http://bugs.python.org/file27449/length_hint.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:33:04 2012 From: report at bugs.python.org (Alex Gaynor) Date: Sat, 06 Oct 2012 11:33:04 +0000 Subject: [issue16148] Implement PEP 424 In-Reply-To: <1349520373.44.0.657178870535.issue16148@psf.upfronthosting.co.za> Message-ID: <1349523184.01.0.212803390105.issue16148@psf.upfronthosting.co.za> Changes by Alex Gaynor : Removed file: http://bugs.python.org/file27448/length_hint.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:35:11 2012 From: report at bugs.python.org (Alex Gaynor) Date: Sat, 06 Oct 2012 11:35:11 +0000 Subject: [issue16148] Implement PEP 424 In-Reply-To: <1349520373.44.0.657178870535.issue16148@psf.upfronthosting.co.za> Message-ID: <1349523311.29.0.670594306392.issue16148@psf.upfronthosting.co.za> Alex Gaynor added the comment: All memory leaks resolved, yay! ---------- Added file: http://bugs.python.org/file27450/length_hint.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:35:18 2012 From: report at bugs.python.org (Alex Gaynor) Date: Sat, 06 Oct 2012 11:35:18 +0000 Subject: [issue16148] Implement PEP 424 In-Reply-To: <1349520373.44.0.657178870535.issue16148@psf.upfronthosting.co.za> Message-ID: <1349523318.05.0.64525245908.issue16148@psf.upfronthosting.co.za> Changes by Alex Gaynor : Removed file: http://bugs.python.org/file27449/length_hint.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:49:29 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Oct 2012 11:49:29 +0000 Subject: [issue11710] Landing pages in docs for standard library packages In-Reply-To: <1301401907.02.0.216152132906.issue11710@psf.upfronthosting.co.za> Message-ID: <3XYmMq4LCTzM88@mail.python.org> Roundup Robot added the comment: New changeset 1141648fa655 by Georg Brandl in branch '3.3': Closes #11710: create "landing pages" (/library/package.html) for those packages that have no documented content themselves, e.g. "urllib" or "http". http://hg.python.org/cpython/rev/1141648fa655 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:49:29 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Oct 2012 11:49:29 +0000 Subject: [issue16149] "Decimal(2) != float(2)" documentation bug In-Reply-To: <1349522329.87.0.691698812157.issue16149@psf.upfronthosting.co.za> Message-ID: <3XYmMr2jhpzM88@mail.python.org> Roundup Robot added the comment: New changeset ee71d8023f1b by Georg Brandl in branch '3.3': Closes #16149: remove now-false statement about the inability to compare Decimal and float objects. http://hg.python.org/cpython/rev/ee71d8023f1b ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:51:25 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 06 Oct 2012 11:51:25 +0000 Subject: [issue1598083] Top-level exception handler writes to stdout unsafely Message-ID: <1349524285.28.0.728409288798.issue1598083@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: georg.brandl -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:54:05 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 06 Oct 2012 11:54:05 +0000 Subject: [issue8401] Strange behavior of bytearray slice assignment In-Reply-To: <1271259710.42.0.373058487219.issue8401@psf.upfronthosting.co.za> Message-ID: <1349524445.47.0.401313322981.issue8401@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: georg.brandl -> ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:54:37 2012 From: report at bugs.python.org (Alex Gaynor) Date: Sat, 06 Oct 2012 11:54:37 +0000 Subject: [issue16148] Implement PEP 424 In-Reply-To: <1349520373.44.0.657178870535.issue16148@psf.upfronthosting.co.za> Message-ID: <1349524477.72.0.461629576934.issue16148@psf.upfronthosting.co.za> Alex Gaynor added the comment: Added documentation. ---------- Added file: http://bugs.python.org/file27451/length_hint.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:54:46 2012 From: report at bugs.python.org (Alex Gaynor) Date: Sat, 06 Oct 2012 11:54:46 +0000 Subject: [issue16148] Implement PEP 424 In-Reply-To: <1349520373.44.0.657178870535.issue16148@psf.upfronthosting.co.za> Message-ID: <1349524486.54.0.861659929116.issue16148@psf.upfronthosting.co.za> Changes by Alex Gaynor : Removed file: http://bugs.python.org/file27450/length_hint.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 14:12:36 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Oct 2012 12:12:36 +0000 Subject: [issue16148] Implement PEP 424 In-Reply-To: <1349520373.44.0.657178870535.issue16148@psf.upfronthosting.co.za> Message-ID: <3XYmtV5c25zM7Q@mail.python.org> Roundup Robot added the comment: New changeset a7ec0a1b0f7c by Armin Ronacher in branch 'default': Issue #16148: implemented PEP 424 http://hg.python.org/cpython/rev/a7ec0a1b0f7c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 14:13:14 2012 From: report at bugs.python.org (Armin Ronacher) Date: Sat, 06 Oct 2012 12:13:14 +0000 Subject: [issue16148] Implement PEP 424 In-Reply-To: <1349520373.44.0.657178870535.issue16148@psf.upfronthosting.co.za> Message-ID: <1349525594.69.0.897043023594.issue16148@psf.upfronthosting.co.za> Armin Ronacher added the comment: Reviewed and applied. Looks good. ---------- nosy: +aronacher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 14:14:02 2012 From: report at bugs.python.org (Armin Ronacher) Date: Sat, 06 Oct 2012 12:14:02 +0000 Subject: [issue16148] Implement PEP 424 In-Reply-To: <1349520373.44.0.657178870535.issue16148@psf.upfronthosting.co.za> Message-ID: <1349525642.27.0.202643967862.issue16148@psf.upfronthosting.co.za> Changes by Armin Ronacher : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 14:51:33 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 06 Oct 2012 12:51:33 +0000 Subject: [issue8478] tokenize.untokenize first token missing failure case In-Reply-To: <1271816312.19.0.485614247328.issue8478@psf.upfronthosting.co.za> Message-ID: <1349527893.62.0.420642482816.issue8478@psf.upfronthosting.co.za> Georg Brandl added the comment: Attaching patch. Actually both versions of untokenize() were broken; the version used for "full input" (5-tuples) had a flipped inequality sign in an assert. Other changes in the patch: * Docs fixed to describe both modes * Tests fixed to exercise both modes ---------- keywords: +patch Added file: http://bugs.python.org/file27452/untokenize.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 14:52:54 2012 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 06 Oct 2012 12:52:54 +0000 Subject: [issue15631] Python 3.3/3.4 installation issue on OpenSUSE lib/lib64 folders In-Reply-To: <1349521553.52.0.936136241323.issue15631@psf.upfronthosting.co.za> Message-ID: Skip Montanaro added the comment: > the proposed patch has still some issues: > > - it breaks the installation on 64bit platforms on Debian and Ubuntu. > Please test the patch on one of these platforms too. > > - it hardcodes more platform information in the sys modules, which > makes it difficult to overwrite for cross builds. If these macros > are needed then they should be taken from the sysconfig module, > using the _sysconfigdata module. > > - use the host macros in the configure instead of uname > > - LIB shouldn't be necessary when configuring --with-libdir Sorry, I don't have access to anything but the OpenSUSE systems at work. I was just verifying that it solved my installation problems. I'll see if I can nudge some of the other things forward. ---------- title: Python 3.3/3.4 installation issue on OpenSUSE lib/lib64 folders -> Python 3.3/3.4 installation issue on OpenSUSE lib/lib64 folders _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 14:56:05 2012 From: report at bugs.python.org (Thomas Bach) Date: Sat, 06 Oct 2012 12:56:05 +0000 Subject: [issue16110] Provide logging.config.configParserConfig In-Reply-To: <1349191631.16.0.42047016451.issue16110@psf.upfronthosting.co.za> Message-ID: <1349528165.74.0.782592204973.issue16110@psf.upfronthosting.co.za> Thomas Bach added the comment: Yeah, the change you suggest sounds reasonable. Thanks for reconsidering the case! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 14:58:39 2012 From: report at bugs.python.org (Kushal Das) Date: Sat, 06 Oct 2012 12:58:39 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args In-Reply-To: <1349467278.69.0.314979500498.issue16115@psf.upfronthosting.co.za> Message-ID: Kushal Das added the comment: On Saturday, October 6, 2012, Andrew Svetlov wrote: > > Andrew Svetlov added the comment: > > Committed. Thank you, Kushal Das. > BTW, please fill http://www.python.org/psf/contrib/ as contributor of > Python project. > We would to get that agreement from everybody who has pushed any patch. > Thanks again. Hi, I already filled and sent it. Thanks for the commit. Kushal ---------- title: test that executable arg to Popen() takes precedence over args[0] arg -> test that executable arg to Popen() takes precedence over args _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 15:10:49 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 06 Oct 2012 13:10:49 +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: <1349529049.28.0.274121998408.issue8109@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Daniel, I'll take a look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 15:41:02 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 06 Oct 2012 13:41:02 +0000 Subject: [issue15422] Get rid of PyCFunction_New macro In-Reply-To: <1342967583.47.0.436061975286.issue15422@psf.upfronthosting.co.za> Message-ID: <1349530862.17.0.884627178089.issue15422@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Attached patch for the issue. BTW PyCFunction_New/PyCFunction_NewEx are part of Stable ABI but never mentioned in the documentation. ---------- keywords: +patch Added file: http://bugs.python.org/file27453/issue15422.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 15:41:16 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 06 Oct 2012 13:41:16 +0000 Subject: [issue15422] Get rid of PyCFunction_New macro In-Reply-To: <1342967583.47.0.436061975286.issue15422@psf.upfronthosting.co.za> Message-ID: <1349530876.82.0.18575410426.issue15422@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 16:11:56 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Oct 2012 14:11:56 +0000 Subject: [issue16120] Use |yield from| in stdlib In-Reply-To: <1349281098.96.0.245155104268.issue16120@psf.upfronthosting.co.za> Message-ID: <3XYqXC5KzBzNZF@mail.python.org> Roundup Robot added the comment: New changeset 7d8868c13b95 by Andrew Svetlov in branch 'default': Issue #16120: Use |yield from| in stdlib. http://hg.python.org/cpython/rev/7d8868c13b95 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 16:17:57 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 06 Oct 2012 14:17:57 +0000 Subject: [issue16120] Use |yield from| in stdlib In-Reply-To: <1349281098.96.0.245155104268.issue16120@psf.upfronthosting.co.za> Message-ID: <1349533077.42.0.940701667517.issue16120@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Thanks, Berker. ---------- assignee: -> nobody nosy: +asvetlov, nobody resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 16:24:49 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sat, 06 Oct 2012 14:24:49 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349533489.0.0.721607562873.issue16113@psf.upfronthosting.co.za> Changes by Michele Orr? : ---------- nosy: +maker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 16:29:57 2012 From: report at bugs.python.org (Stefan Krah) Date: Sat, 06 Oct 2012 14:29:57 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1349533797.96.0.791279842543.issue16145@psf.upfronthosting.co.za> Stefan Krah added the comment: Here's a patch. Victor, I guess I have a feature request for fusil: It would be nice if fusil also generated legacy strings (or does it already do so?). ---------- keywords: +patch Added file: http://bugs.python.org/file27454/issue16145.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 16:34:34 2012 From: report at bugs.python.org (Stefan Krah) Date: Sat, 06 Oct 2012 14:34:34 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1349534074.19.0.549417507833.issue16145@psf.upfronthosting.co.za> Stefan Krah added the comment: > The PEPs and doc said the C API would remain backwards compatible. Roger: Yes, you don't need to change anything. I was misled by the PyUnicode_AsUnicode() docs, thinking that the responsibility to call PyUnicode_READY() also applies if the generated Unicode Object is passed to the C-API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 16:39:25 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2012 14:39:25 +0000 Subject: [issue16149] "Decimal(2) != float(2)" documentation bug In-Reply-To: <1349522329.87.0.691698812157.issue16149@psf.upfronthosting.co.za> Message-ID: <1349534365.2.0.484474988364.issue16149@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think the fix should be applied to 2.7 and 3.2 too. See issue2531 which allowed comparing decimals and floats. ---------- nosy: +mark.dickinson, serhiy.storchaka status: closed -> open versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 16:46:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2012 14:46:55 +0000 Subject: [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> Message-ID: <1349534815.79.0.968608512457.issue16025@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: +needs review versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 16:48:44 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 06 Oct 2012 14:48:44 +0000 Subject: [issue16149] "Decimal(2) != float(2)" documentation bug In-Reply-To: <1349522329.87.0.691698812157.issue16149@psf.upfronthosting.co.za> Message-ID: <1349534924.28.0.953609341653.issue16149@psf.upfronthosting.co.za> Georg Brandl added the comment: Ah, sorry, I thought this was a 3.3 thing. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 16:50:32 2012 From: report at bugs.python.org (Stefan Krah) Date: Sat, 06 Oct 2012 14:50:32 +0000 Subject: [issue16148] Implement PEP 424 In-Reply-To: <1349520373.44.0.657178870535.issue16148@psf.upfronthosting.co.za> Message-ID: <1349535032.33.0.764768896884.issue16148@psf.upfronthosting.co.za> Stefan Krah added the comment: a7ec0a1b0f7c broke the Windows buildbots: In Visual Studio variables can only be declared at the top of a block. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 16:52:28 2012 From: report at bugs.python.org (pyos) Date: Sat, 06 Oct 2012 14:52:28 +0000 Subject: [issue16150] Implement generator interface in itertools.chain. Message-ID: <1349535148.95.0.484121382755.issue16150@psf.upfronthosting.co.za> New submission from pyos: Since "yield from" made it into Python 3.3, I think it would be useful to chain multiple generators and still get a generator, not an iterator. That is, the following code: def f(): yield from itertools.chain(A, B, C) should be (at least roughly) equivalent to def f(): yield from A yield from B yield from C while still allowing to send() values to whichever subgenerator is currently running or throw() exceptions inside them. The attached patch adds this functionality to itertools.chain objects. ---------- components: Extension Modules files: itertools-chain-send-throw-and-close.diff keywords: patch messages: 172204 nosy: pyos, rhettinger priority: normal severity: normal status: open title: Implement generator interface in itertools.chain. versions: Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file27455/itertools-chain-send-throw-and-close.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 16:53:28 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 06 Oct 2012 14:53:28 +0000 Subject: [issue16150] Implement generator interface in itertools.chain. In-Reply-To: <1349535148.95.0.484121382755.issue16150@psf.upfronthosting.co.za> Message-ID: <1349535208.51.0.763397820647.issue16150@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +ncoghlan stage: -> patch review type: -> enhancement versions: -Python 3.3, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 16:55:48 2012 From: report at bugs.python.org (pyos) Date: Sat, 06 Oct 2012 14:55:48 +0000 Subject: [issue16150] Implement generator interface in itertools.chain. In-Reply-To: <1349535148.95.0.484121382755.issue16150@psf.upfronthosting.co.za> Message-ID: <1349535348.16.0.294906585357.issue16150@psf.upfronthosting.co.za> Changes by pyos : ---------- versions: +Python 3.3, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 16:56:08 2012 From: report at bugs.python.org (pyos) Date: Sat, 06 Oct 2012 14:56:08 +0000 Subject: [issue16150] Implement generator interface in itertools.chain. In-Reply-To: <1349535148.95.0.484121382755.issue16150@psf.upfronthosting.co.za> Message-ID: <1349535368.93.0.785878479988.issue16150@psf.upfronthosting.co.za> Changes by pyos : ---------- versions: -Python 3.3, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 17:00:58 2012 From: report at bugs.python.org (pyos) Date: Sat, 06 Oct 2012 15:00:58 +0000 Subject: [issue16150] Implement generator interface in itertools.chain. In-Reply-To: <1349535148.95.0.484121382755.issue16150@psf.upfronthosting.co.za> Message-ID: <1349535658.71.0.443623366795.issue16150@psf.upfronthosting.co.za> Changes by pyos : Added file: http://bugs.python.org/file27456/itertools-chain-doc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 17:10:51 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2012 15:10:51 +0000 Subject: [issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16) Message-ID: <1349536251.41.0.535639688046.issue1470548@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 17:11:12 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Oct 2012 15:11:12 +0000 Subject: [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> Message-ID: <3XYrrb56V3zNtr@mail.python.org> Roundup Robot added the comment: New changeset 2c398a78dba8 by Andrew Svetlov in branch '2.7': Issue #16025: Minor corrections to the zipfile documentation. http://hg.python.org/cpython/rev/2c398a78dba8 New changeset 3d54d17a637b by Andrew Svetlov in branch '3.2': Issue #16025: Minor corrections to the zipfile documentation. http://hg.python.org/cpython/rev/3d54d17a637b New changeset 2e7a57cdd961 by Andrew Svetlov in branch '3.3': Issue #16025: Minor corrections to the zipfile documentation. http://hg.python.org/cpython/rev/2e7a57cdd961 New changeset 7fd068d4ded8 by Andrew Svetlov in branch 'default': Issue #16025: Minor corrections to the zipfile documentation. http://hg.python.org/cpython/rev/7fd068d4ded8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 17:12:10 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 06 Oct 2012 15:12:10 +0000 Subject: [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> Message-ID: <1349536330.19.0.514300150175.issue16025@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Committed. Please close the issue if all work done. Thanks. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 17:15:36 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2012 15:15:36 +0000 Subject: [issue5815] locale.getdefaultlocale() missing corner case In-Reply-To: <1240424446.58.0.284100987299.issue5815@psf.upfronthosting.co.za> Message-ID: <1349536536.76.0.381255617885.issue5815@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 17:18:47 2012 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Oct 2012 15:18:47 +0000 Subject: [issue16148] Implement PEP 424 In-Reply-To: <1349520373.44.0.657178870535.issue16148@psf.upfronthosting.co.za> Message-ID: <1349536727.15.0.55478028164.issue16148@psf.upfronthosting.co.za> Christian Heimes added the comment: I've taken care of the issue in f56a49e74178 and 895f9fddb8e3. ---------- nosy: +christian.heimes resolution: -> fixed stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 17:23:14 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Oct 2012 15:23:14 +0000 Subject: [issue11643] Use |version| instead of X.Y in the doc In-Reply-To: <1300838111.66.0.617899175478.issue11643@psf.upfronthosting.co.za> Message-ID: <1349536994.13.0.0466408810708.issue11643@psf.upfronthosting.co.za> ?ric Araujo added the comment: After reviewing the patch I think that this change would not actually improve things. What do you think? (Thanks for the patch nonetheless :)* ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 17:27:35 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 06 Oct 2012 15:27:35 +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: <1349537255.82.0.707571219699.issue15721@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Update patch conforming to current _tkinter code. ---------- Added file: http://bugs.python.org/file27457/_tkinter_pep3121-384_v1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 17:29:13 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 06 Oct 2012 15:29:13 +0000 Subject: [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> Message-ID: <1349537353.71.0.0455965323594.issue16025@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Andrew, please revert the test_subprocess changes. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 17:48:09 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 06 Oct 2012 15:48:09 +0000 Subject: [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> Message-ID: <1349538489.09.0.434659824244.issue16025@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Done in 674fa8d211f2, 5665806908c4 and c9695a0b0923. Sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 17:51:41 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 06 Oct 2012 15:51:41 +0000 Subject: [issue3022] mailbox module, two small fixes In-Reply-To: <1212355773.67.0.369854949727.issue3022@psf.upfronthosting.co.za> Message-ID: <1349538701.08.0.0422720234897.issue3022@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- components: +email nosy: +barry, petri.lehtinen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 17:55:16 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 06 Oct 2012 15:55:16 +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: <1349538916.68.0.412692275521.issue15721@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I would to have all module state inside _tkinterstate structure. static variables like tcl_lock, tcl_state, quitMainLoop, errorInCmd etc should be moved into _tkinterstate also. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 18:11:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2012 16:11:18 +0000 Subject: [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> Message-ID: <1349539878.94.0.901571589738.issue16025@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you, Andrew. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 18:11:47 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2012 16:11:47 +0000 Subject: [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> Message-ID: <1349539906.99.0.0225818273539.issue16025@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: patch review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 18:14:41 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 06 Oct 2012 16:14:41 +0000 Subject: [issue16096] Get rid of dangerous integer overflow tricks In-Reply-To: <1349030051.26.0.323672452753.issue16096@psf.upfronthosting.co.za> Message-ID: <1349540081.6.0.263354486479.issue16096@psf.upfronthosting.co.za> Mark Dickinson added the comment: > It's maybe safer (and simpler) to not touch such code in Python > older than 3.4. So far, I've been fixing these overflow bugs only in the development branches, unless they can be shown to cause actual bugs. That said, I think it's probably okay to apply these for 3.3 as well as 3.4, especially since the 3.3 patch is smaller than the others. I'll review and apply. ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 18:28:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2012 16:28:22 +0000 Subject: [issue12986] Using getrandbits() in uuid.uuid4() is faster and more readable In-Reply-To: <1316104217.68.0.381815581788.issue12986@psf.upfronthosting.co.za> Message-ID: <1349540902.81.0.98141473667.issue12986@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I suggest to reject this proposal because of a deterioration in security. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 18:30:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2012 16:30:55 +0000 Subject: [issue15186] Support os.walk(dir_fd=) In-Reply-To: <1340667585.2.0.886069096281.issue15186@psf.upfronthosting.co.za> Message-ID: <1349541055.03.0.963806974111.issue15186@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Should this issue be closed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 18:33:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2012 16:33:18 +0000 Subject: [issue16096] Get rid of dangerous integer overflow tricks In-Reply-To: <1349540081.6.0.263354486479.issue16096@psf.upfronthosting.co.za> Message-ID: <201210061933.02916.storchaka@gmail.com> Serhiy Storchaka added the comment: > especially since the 3.3 patch is smaller than the others. It's becouse 3.3 already contains some fixes which was not be backported to older versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 18:39:37 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 06 Oct 2012 16:39:37 +0000 Subject: [issue16096] Get rid of dangerous integer overflow tricks In-Reply-To: <1349030051.26.0.323672452753.issue16096@psf.upfronthosting.co.za> Message-ID: <1349541577.75.0.275661687411.issue16096@psf.upfronthosting.co.za> Mark Dickinson added the comment: > It's becouse 3.3 already contains some fixes which was not be backported > to older versions. Yes, exactly! That's what I meant when I said: "So far, I've been fixing these overflow bugs only in the development branches" There were lots of integer overflow occurrences like these found by John Regehr in issue 9530. I chose to fix those only in the current development branch, which was 3.3 at the time. Since we've made an effort to clean up 3.3 in that respect, I think it's worth finishing that job off by applying your patch both to 3.3 and 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 18:42:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2012 16:42:13 +0000 Subject: [issue16096] Get rid of dangerous integer overflow tricks In-Reply-To: <1349540081.6.0.263354486479.issue16096@psf.upfronthosting.co.za> Message-ID: <201210061941.59086.storchaka@gmail.com> Serhiy Storchaka added the comment: > unless they can be shown to cause actual bugs. See issue14700. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 18:52:38 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Oct 2012 16:52:38 +0000 Subject: [issue16106] antigravity tests In-Reply-To: <1349134601.26.0.544681268044.issue16106@psf.upfronthosting.co.za> Message-ID: <1349542358.61.0.187504546064.issue16106@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 18:54:14 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 06 Oct 2012 16:54:14 +0000 Subject: [issue16096] Get rid of dangerous integer overflow tricks In-Reply-To: <1349030051.26.0.323672452753.issue16096@psf.upfronthosting.co.za> Message-ID: <1349542454.19.0.917572123902.issue16096@psf.upfronthosting.co.za> Mark Dickinson added the comment: Serhiy, I don't understand what you're getting at. Can you explain? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 19:04:09 2012 From: report at bugs.python.org (Robin Schreiber) Date: Sat, 06 Oct 2012 17:04:09 +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: <1349543049.33.0.965980508236.issue15721@psf.upfronthosting.co.za> Robin Schreiber added the comment: Before I submitted this patch, I used to have these variables inside the modulestate, which caused severe problems. I do not know the exact reason, but my guess is that these variables have to be globally available for every thread (tcl variables are used for thread synchronization arent they?). As the modulestate may change depending on the thread, one can no longer guarantee that every thread within the process is operating on the same variable. This might not be nessecary, however as I mentioned, the naive approach of putting the variables inside the modulestate did not work out for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 19:04:11 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2012 17:04:11 +0000 Subject: [issue16150] Implement generator interface in itertools.chain. In-Reply-To: <1349535148.95.0.484121382755.issue16150@psf.upfronthosting.co.za> Message-ID: <1349543051.09.0.12842077428.issue16150@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 19:05:31 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Oct 2012 17:05:31 +0000 Subject: [issue16096] Get rid of dangerous integer overflow tricks In-Reply-To: <1349030051.26.0.323672452753.issue16096@psf.upfronthosting.co.za> Message-ID: <3XYvNV0lrzzLy3@mail.python.org> Roundup Robot added the comment: New changeset 152d85b2da3a by Mark Dickinson in branch '3.3': Issue #16096: Fix several occurrences of potential signed integer overflow. Thanks Serhiy Storchaka. http://hg.python.org/cpython/rev/152d85b2da3a New changeset faae99459b43 by Mark Dickinson in branch 'default': Issue #16096: Merge fixes from 3.3. http://hg.python.org/cpython/rev/faae99459b43 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 19:07:22 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 06 Oct 2012 17:07:22 +0000 Subject: [issue16096] Get rid of dangerous integer overflow tricks In-Reply-To: <1349030051.26.0.323672452753.issue16096@psf.upfronthosting.co.za> Message-ID: <1349543242.02.0.840070438361.issue16096@psf.upfronthosting.co.za> Mark Dickinson added the comment: Applied the 3.3 patch to 3.3 and default, with some minor changes: - revert the Objects/longobject.c changes, since they don't depend on signed overflow - fix the second change in Objects/tupleobject.c so that the overflow check happens before the multiplication rather than after. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 19:21:50 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Oct 2012 17:21:50 +0000 Subject: [issue16149] "Decimal(2) != float(2)" documentation bug In-Reply-To: <1349522329.87.0.691698812157.issue16149@psf.upfronthosting.co.za> Message-ID: <3XYvlK2408zLwP@mail.python.org> Roundup Robot added the comment: New changeset 1dc66e654806 by Georg Brandl in branch '3.2': Closes #16149: remove now-false statement about the inability to compare Decimal and float objects. http://hg.python.org/cpython/rev/1dc66e654806 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 19:22:16 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 06 Oct 2012 17:22:16 +0000 Subject: [issue16149] "Decimal(2) != float(2)" documentation bug In-Reply-To: <1349522329.87.0.691698812157.issue16149@psf.upfronthosting.co.za> Message-ID: <1349544136.71.0.375583935078.issue16149@psf.upfronthosting.co.za> Georg Brandl added the comment: Planted to 3.2 in 1dc66e654806. Turns out the offending paragraph wasn't in 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 19:32:14 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 06 Oct 2012 17:32:14 +0000 Subject: [issue16096] Get rid of dangerous integer overflow tricks In-Reply-To: <1349030051.26.0.323672452753.issue16096@psf.upfronthosting.co.za> Message-ID: <1349544734.82.0.678844993087.issue16096@psf.upfronthosting.co.za> Mark Dickinson added the comment: Whoops. I take it back about the Objects/longobject.c bit. Fixing ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 19:50:33 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Oct 2012 17:50:33 +0000 Subject: [issue16096] Get rid of dangerous integer overflow tricks In-Reply-To: <1349030051.26.0.323672452753.issue16096@psf.upfronthosting.co.za> Message-ID: <3XYwNT08jZzNvB@mail.python.org> Roundup Robot added the comment: New changeset 906ae6485cb8 by Mark Dickinson in branch '3.3': Issue #16096: Fix signed overflow in Objects/longobject.c. Thanks Serhiy Storchaka. http://hg.python.org/cpython/rev/906ae6485cb8 New changeset b728aac3bdb3 by Mark Dickinson in branch 'default': Issue #16096: port fix from 3.3 http://hg.python.org/cpython/rev/b728aac3bdb3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 19:56:51 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 06 Oct 2012 17:56:51 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349546211.46.0.187139545035.issue16113@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 19:58:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2012 17:58:44 +0000 Subject: [issue16096] Get rid of dangerous integer overflow tricks In-Reply-To: <1349542454.19.0.917572123902.issue16096@psf.upfronthosting.co.za> Message-ID: <201210062058.32388.storchaka@gmail.com> Serhiy Storchaka added the comment: In issue14700 were fixed two actual bugs. The fix was not be backported to older versions (and this changes included in patches for this issue). I think it is better to reopen issue14700 for backporting fixes to 2.7 and 3.2? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 20:03:11 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 06 Oct 2012 18:03:11 +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: <1349546591.92.0.916123504974.issue15721@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I'm trying to make patch following myself recommendations. Looks good but not finished yet. Will publish it after all work done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 20:03:17 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 06 Oct 2012 18:03: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: <1349546597.02.0.250231078902.issue8478@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 20:13:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2012 18:13:26 +0000 Subject: [issue16149] "Decimal(2) != float(2)" documentation bug In-Reply-To: <1349522329.87.0.691698812157.issue16149@psf.upfronthosting.co.za> Message-ID: <1349547206.98.0.700238316262.issue16149@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 20:23:18 2012 From: report at bugs.python.org (Roger Binns) Date: Sat, 06 Oct 2012 18:23:18 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1349547798.3.0.602622886837.issue16145@psf.upfronthosting.co.za> Roger Binns added the comment: Roughly how long will it be before Python 3.3.1 comes out? This issue means my users will get garbage or crashes, so I'll need to work around it if it will be quite a while till 3.3.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 20:27:06 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 06 Oct 2012 18:27:06 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1349548026.87.0.401196937433.issue16145@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- components: +Extension Modules priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 20:29:28 2012 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 06 Oct 2012 18:29:28 +0000 Subject: [issue14174] argparse.REMAINDER fails to parse remainder correctly In-Reply-To: <1330690090.15.0.511487898244.issue14174@psf.upfronthosting.co.za> Message-ID: <1349548168.81.0.590993217708.issue14174@psf.upfronthosting.co.za> Jason R. Coombs added the comment: I also ran into this problem. I put together this script to reproduce the issue: import argparse parser = argparse.ArgumentParser() parser.add_argument('app') parser.add_argument('--config') parser.add_argument('app_args', nargs=argparse.REMAINDER) args = parser.parse_args(['app', '--config', 'bar']) print vars(args) # actual: {'app': 'app', 'app_args': ['--config', 'bar'], 'config': None} # expected: {'app': 'app', 'app_args': [], 'config': 'bar'} I'll try using parse_known_args instead. ---------- nosy: +jason.coombs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 20:30:07 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 06 Oct 2012 18:30:07 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1349548207.62.0.4887571299.issue16145@psf.upfronthosting.co.za> Georg Brandl added the comment: 3.3.1 will not be too long: maybe 4 weeks from now. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 20:32:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2012 18:32:03 +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: <1349548323.03.0.857418493035.issue15837@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I am not sure that None as default should be documented. It's implementation details (as third "int" argument) and can be silently changed in future versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 20:32:25 2012 From: report at bugs.python.org (Brian Curtin) Date: Sat, 06 Oct 2012 18:32:25 +0000 Subject: [issue14668] Document the path option in the Windows installer In-Reply-To: <1335360311.11.0.51507359107.issue14668@psf.upfronthosting.co.za> Message-ID: <1349548345.67.0.212122317849.issue14668@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 20:32:29 2012 From: report at bugs.python.org (Idan Kamara) Date: Sat, 06 Oct 2012 18:32:29 +0000 Subject: [issue14174] argparse.REMAINDER fails to parse remainder correctly In-Reply-To: <1330690090.15.0.511487898244.issue14174@psf.upfronthosting.co.za> Message-ID: <1349548349.14.0.752808140562.issue14174@psf.upfronthosting.co.za> Idan Kamara added the comment: Unfortunately parse_known_args is buggy too: http://bugs.python.org/issue16142 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 20:38:29 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Oct 2012 18:38:29 +0000 Subject: [issue10968] threading.Timer should be a class so that it can be derived In-Reply-To: <1295574501.95.0.0935688829986.issue10968@psf.upfronthosting.co.za> Message-ID: <3XYxRm4gxrzNCJ@mail.python.org> Roundup Robot added the comment: New changeset 98499371ca53 by R David Murray in branch '3.3': #10968: commit threading doc changes and corresponding whatsnew entry. http://hg.python.org/cpython/rev/98499371ca53 New changeset ad435964fc9c by R David Murray in branch 'default': merge #10968: commit threading doc changes and corresponding whatsnew entry. http://hg.python.org/cpython/rev/ad435964fc9c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 20:43:13 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 06 Oct 2012 18:43:13 +0000 Subject: [issue10968] threading.Timer should be a class so that it can be derived In-Reply-To: <1295574501.95.0.0935688829986.issue10968@psf.upfronthosting.co.za> Message-ID: <1349548993.83.0.734301101387.issue10968@psf.upfronthosting.co.za> R. David Murray added the comment: I have now committed (a revised version of) the doc changes. Like I said in the commit message, it is unfortunate that the underscore names were not kept as aliases and that RLock wasn't also converted to a class, but it is too late to fix that in 3.3. If someone wants to do RLock in 3.4 they should open a new issue. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 20:56:29 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Oct 2012 18:56:29 +0000 Subject: [issue16144] misleading sentence in reference/import In-Reply-To: <1349459459.97.0.290795741864.issue16144@psf.upfronthosting.co.za> Message-ID: <1349549789.11.0.552364201546.issue16144@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 21:32:42 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2012 19:32:42 +0000 Subject: [issue16151] Deferred KeyboardInterrupt in interactive mode Message-ID: <1349551962.43.0.949416732292.issue16151@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here are some strange behavior I see (on Linux). Run Python in interactive mode. Press . Message "Display all XXX possibilities? (y or n)" showed. Press , then . Prompt showed. Enter any text (or none) and press . KeyboardInterrupt exception raised. In Python 2.7: Traceback (most recent call last): File "/usr/lib/python2.7/encodings/utf_8.py", line 15, in decode def decode(input, errors='strict'): KeyboardInterrupt In Python 3.x: Traceback (most recent call last): File "", line 1, in KeyboardInterrupt In Python 2.6 exception not raised. It does not lead to any detrimental consequences (entered text saved in history and can be restored), but it looks very strange. Possibly for this must be some bug. ---------- components: Interpreter Core messages: 172238 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Deferred KeyboardInterrupt in interactive mode type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 21:54:37 2012 From: report at bugs.python.org (Alex Gaynor) Date: Sat, 06 Oct 2012 19:54:37 +0000 Subject: [issue16148] Implement PEP 424 In-Reply-To: <1349520373.44.0.657178870535.issue16148@psf.upfronthosting.co.za> Message-ID: <1349553277.47.0.711615007513.issue16148@psf.upfronthosting.co.za> Alex Gaynor added the comment: Ah, thank you very much, sorry about that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 22:08:27 2012 From: report at bugs.python.org (STINNER Victor) Date: Sat, 06 Oct 2012 20:08:27 +0000 Subject: [issue16136] Removal of VMS support In-Reply-To: <1349491808.57.0.910927149302.issue16136@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: I'm in contact with Sysgroup, a french company which ported Python 2 on VMS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 22:16:48 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 06 Oct 2012 20:16:48 +0000 Subject: [issue16136] Removal of VMS support In-Reply-To: <1349389263.57.0.925729224322.issue16136@psf.upfronthosting.co.za> Message-ID: <1349554608.96.0.595405192213.issue16136@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If they ported Python 2 on VMS, even though Python 2 is already supposed to work on Python 2, it means our compatibility code is broken. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 22:17:13 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 06 Oct 2012 20:17:13 +0000 Subject: [issue16136] Removal of VMS support In-Reply-To: <1349389263.57.0.925729224322.issue16136@psf.upfronthosting.co.za> Message-ID: <1349554633.24.0.918654355715.issue16136@psf.upfronthosting.co.za> Antoine Pitrou added the comment: (correction: Python 2 is already supposed to work on VMS) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 22:26:06 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 06 Oct 2012 20:26:06 +0000 Subject: [issue16147] Rewrite PyUnicode_FromFormatV() to use the _PyUnicodeWriter API In-Reply-To: <1349469859.85.0.180138981213.issue16147@psf.upfronthosting.co.za> Message-ID: <1349555166.99.0.0418143131124.issue16147@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 22:27:01 2012 From: report at bugs.python.org (James Lu) Date: Sat, 06 Oct 2012 20:27:01 +0000 Subject: [issue14667] No IDLE In-Reply-To: <1335313762.17.0.753940415621.issue14667@psf.upfronthosting.co.za> Message-ID: <1349555221.64.0.409204892575.issue14667@psf.upfronthosting.co.za> Changes by James Lu : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 22:27:32 2012 From: report at bugs.python.org (James Lu) Date: Sat, 06 Oct 2012 20:27:32 +0000 Subject: [issue14667] No IDLE In-Reply-To: <1335313762.17.0.753940415621.issue14667@psf.upfronthosting.co.za> Message-ID: <1349555252.29.0.829100938077.issue14667@psf.upfronthosting.co.za> Changes by James Lu : ---------- resolution: -> works for me _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 22:28:15 2012 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 06 Oct 2012 20:28:15 +0000 Subject: [issue15111] Wrong ImportError message with importlib In-Reply-To: <1340151446.59.0.121813331775.issue15111@psf.upfronthosting.co.za> Message-ID: <1349555295.25.0.477483635245.issue15111@psf.upfronthosting.co.za> Yury Selivanov added the comment: Brett, can we patch 3.3 too? (in 3.3.1 version?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 23:09:21 2012 From: report at bugs.python.org (Ned Batchelder) Date: Sat, 06 Oct 2012 21:09:21 +0000 Subject: [issue16152] Trailing whitespace makes tokenize.generate_tokens pathological Message-ID: <1349557761.41.0.537472367724.issue16152@psf.upfronthosting.co.za> New submission from Ned Batchelder: When tokenizing with tokenize.generate_tokens, if the code ends with whitespace (no newline), the tokenizer produces an ERRORTOKEN for each space. Additionally, the regex that fails to find tokens in those spaces is linear in the number of spaces, so the overall performance is O(n**2). I found this while tokenizing code samples uploaded to a public web site. One sample for some reason ended with 40,000 spaces, which was taking two hours to tokenize. Demonstration: {{{ import token import tokenize try: from cStringIO import StringIO except: from io import StringIO code = "@"+" "*10000 code_reader = StringIO(code).readline for num, (ttyp, ttok, _, _, _) in enumerate(tokenize.generate_tokens(code_reader)): print("%5d %15s %r" % (num, token.tok_name[ttyp], ttok)) }}} ---------- components: Library (Lib) messages: 172244 nosy: nedbat priority: normal severity: normal stage: patch review status: open title: Trailing whitespace makes tokenize.generate_tokens pathological versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 23:12:12 2012 From: report at bugs.python.org (STINNER Victor) Date: Sat, 06 Oct 2012 21:12:12 +0000 Subject: [issue16152] Trailing whitespace makes tokenize.generate_tokens pathological In-Reply-To: <1349557761.41.0.537472367724.issue16152@psf.upfronthosting.co.za> Message-ID: <1349557932.91.0.425253776842.issue16152@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 23:12:40 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 06 Oct 2012 21:12:40 +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: <1349557960.14.0.201217475221.issue15721@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Submit patch which store own state into module state. Still not finished yet: need to add checks for "ready state" in every access to fields of module state structure. ---------- assignee: -> asvetlov Added file: http://bugs.python.org/file27458/_tkinter_pep3121-384_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 23:15:50 2012 From: report at bugs.python.org (Ned Batchelder) Date: Sat, 06 Oct 2012 21:15:50 +0000 Subject: [issue16152] Trailing whitespace makes tokenize.generate_tokens pathological In-Reply-To: <1349557761.41.0.537472367724.issue16152@psf.upfronthosting.co.za> Message-ID: <1349558150.2.0.0497029232186.issue16152@psf.upfronthosting.co.za> Ned Batchelder added the comment: Here's a patch for 3.3. I would like to also fix 2.7... ---------- keywords: +patch Added file: http://bugs.python.org/file27459/bug16152.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 23:18:31 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Oct 2012 21:18:31 +0000 Subject: [issue16147] Rewrite PyUnicode_FromFormatV() to use the _PyUnicodeWriter API In-Reply-To: <1349469859.85.0.180138981213.issue16147@psf.upfronthosting.co.za> Message-ID: <3XZ10N4d1KzNYF@mail.python.org> Roundup Robot added the comment: New changeset b4bee17625e1 by Victor Stinner in branch 'default': Issue #16147: Rewrite PyUnicode_FromFormatV() to use _PyUnicodeWriter API http://hg.python.org/cpython/rev/b4bee17625e1 New changeset d1369daeb9ec by Victor Stinner in branch 'default': Issue #16147: PyUnicode_FromFormatV() now detects integer overflow when parsing http://hg.python.org/cpython/rev/d1369daeb9ec New changeset 5e319fdab563 by Victor Stinner in branch 'default': Issue #16147: PyUnicode_FromFormatV() now raises an error if the argument of http://hg.python.org/cpython/rev/5e319fdab563 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 23:24:02 2012 From: report at bugs.python.org (STINNER Victor) Date: Sat, 06 Oct 2012 21:24:02 +0000 Subject: [issue16147] Rewrite PyUnicode_FromFormatV() to use the _PyUnicodeWriter API In-Reply-To: <1349469859.85.0.180138981213.issue16147@psf.upfronthosting.co.za> Message-ID: <1349558642.88.0.560339993532.issue16147@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 23:24:32 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 06 Oct 2012 21:24:32 +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: <1349558672.92.0.669089078742.issue15721@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 23:36:39 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 06 Oct 2012 21:36:39 +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: <1349559399.76.0.973768758573.issue15721@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Update patch to support TKINTER_PROTECT_LOADTK option. ---------- Added file: http://bugs.python.org/file27460/_tkinter_pep3121-384_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 23:45:23 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 06 Oct 2012 21:45:23 +0000 Subject: [issue16135] Removal of OS/2 support In-Reply-To: <1349389207.71.0.143036356134.issue16135@psf.upfronthosting.co.za> Message-ID: <1349559923.36.0.817623099778.issue16135@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: distutils is not an external project. ---------- nosy: +Arfrever resolution: fixed -> stage: committed/rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 23:56:21 2012 From: report at bugs.python.org (STINNER Victor) Date: Sat, 06 Oct 2012 21:56:21 +0000 Subject: [issue16153] PyUnicode_FromFormatV() must fail if the format string is invalid Message-ID: <1349560581.01.0.621984773801.issue16153@psf.upfronthosting.co.za> New submission from STINNER Victor: If the format string is invalid, PyUnicode_FromFormatV() formats the valid arguments and then copies the raw format string. Errors are silently ignored. I propose to raise a ValueError if the format string is invalid. This change may "break" existing applications, but I hope that nobody relies on this "bug" :-) Attached patch implements my proposition. ---------- files: invalid_format.patch keywords: patch messages: 172250 nosy: haypo priority: normal severity: normal status: open title: PyUnicode_FromFormatV() must fail if the format string is invalid versions: Python 3.4 Added file: http://bugs.python.org/file27461/invalid_format.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 23:57:55 2012 From: report at bugs.python.org (STINNER Victor) Date: Sat, 06 Oct 2012 21:57:55 +0000 Subject: [issue16153] PyUnicode_FromFormatV() must fail if the format string is invalid In-Reply-To: <1349560581.01.0.621984773801.issue16153@psf.upfronthosting.co.za> Message-ID: <1349560675.89.0.953708603693.issue16153@psf.upfronthosting.co.za> STINNER Victor added the comment: The full test suite pass with the patch, so hopefully, CPython doesn't rely on this bug :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 23:59:36 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Oct 2012 21:59:36 +0000 Subject: [issue16147] Rewrite PyUnicode_FromFormatV() to use the _PyUnicodeWriter API In-Reply-To: <1349469859.85.0.180138981213.issue16147@psf.upfronthosting.co.za> Message-ID: <3XZ1vp0M6CzNYF@mail.python.org> Roundup Robot added the comment: New changeset e16ec3b468d1 by Victor Stinner in branch 'default': Issue #16147: PyUnicode_FromFormatV() doesn't need anymore to allocate a buffer http://hg.python.org/cpython/rev/e16ec3b468d1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 00:25:25 2012 From: report at bugs.python.org (Ravi Sinha) Date: Sat, 06 Oct 2012 22:25:25 +0000 Subject: [issue16154] Some minor doc fixes in Doc/library Message-ID: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> New submission from Ravi Sinha: - Doc/library/math.rst - fsum will pass if 'from math import fsum' is done before it, but I've left such issues for now since there seems to be a debate about how to go about that - some seem unfixable too - e.g. Doc/library/filecmp.rst - 'dir1' and 'dir2' do not exist, and so the print_diff_files() fails, but there seems to be no reason to fix this; the same for Doc/library/imghdr.rst - there is no /tmp/bass.gif, so it fails - some fail for inexplicable reasons - Doc/library/string.rst - the table of numbers does not match, though it is exactly the same. No idea why. ---------- assignee: docs at python components: Documentation files: doc_lib.patch keywords: patch messages: 172253 nosy: Ravi.Sinha, chris.jerdonek, docs at python, r.david.murray, terry.reedy priority: normal severity: normal status: open title: Some minor doc fixes in Doc/library type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27462/doc_lib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 00:29:12 2012 From: report at bugs.python.org (Ravi Sinha) Date: Sat, 06 Oct 2012 22:29:12 +0000 Subject: [issue16155] Some minor doc fixes in Doc/faq Message-ID: <1349562552.07.0.641735051076.issue16155@psf.upfronthosting.co.za> New submission from Ravi Sinha: - help(fn) which in the REPL leads to a new pager/ display - seems to be difficult to test with doctest - it does not seem to pick the whitespace in the docs and does not match - Doc/faq/general.rst - os.path.isdir returns True or False, not 0 or 1 as in the docs, but I didn't know if I should change that - Doc/faq/windows.rst ---------- assignee: docs at python components: Documentation files: doc_faq.patch keywords: patch messages: 172254 nosy: Ravi.Sinha, chris.jerdonek, docs at python, r.david.murray, terry.reedy priority: normal severity: normal status: open title: Some minor doc fixes in Doc/faq type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27463/doc_faq.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 00:33:30 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Oct 2012 22:33:30 +0000 Subject: [issue9957] SpooledTemporayFile.truncate should take size parameter In-Reply-To: <1285552951.71.0.864499786785.issue9957@psf.upfronthosting.co.za> Message-ID: <3XZ2fv1K8CzNvG@mail.python.org> Roundup Robot added the comment: New changeset 63c3a3f28b42 by R David Murray in branch '2.7': #9957: document that SpooledTemporaryFile.truncate does not take size arg http://hg.python.org/cpython/rev/63c3a3f28b42 New changeset 145480af0d78 by R David Murray in branch '3.2': #9957: document that SpooledTemporaryFile.truncate does not take size arg http://hg.python.org/cpython/rev/145480af0d78 New changeset 76feae02f48f by R David Murray in branch '3.3': #9957: document that SpooledTemporaryFile.truncate now accepts a size arg http://hg.python.org/cpython/rev/76feae02f48f New changeset c7840999b65d by R David Murray in branch 'default': merge #9957: document that SpooledTemporaryFile.truncate now accepts a size arg http://hg.python.org/cpython/rev/c7840999b65d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 00:34:04 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 06 Oct 2012 22:34:04 +0000 Subject: [issue9957] SpooledTemporayFile.truncate should take size parameter In-Reply-To: <1285552951.71.0.864499786785.issue9957@psf.upfronthosting.co.za> Message-ID: <1349562844.01.0.672596949488.issue9957@psf.upfronthosting.co.za> R. David Murray added the comment: I have made the doc changes. ---------- nosy: +r.david.murray resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 00:49:19 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 06 Oct 2012 22:49:19 +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: <1349563759.04.0.169055876062.issue15721@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Upload version which check if _tkinter module was destroyed (for example, if it was call from daemon thread runing Tk app when main thread is exiting with interpreter finalization). ---------- Added file: http://bugs.python.org/file27464/_tkinter_pep3121-384_v4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 00:53:44 2012 From: report at bugs.python.org (STINNER Victor) Date: Sat, 06 Oct 2012 22:53:44 +0000 Subject: [issue7330] PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A In-Reply-To: <1258314153.95.0.978747695294.issue7330@psf.upfronthosting.co.za> Message-ID: <1349564024.1.0.292603455862.issue7330@psf.upfronthosting.co.za> STINNER Victor added the comment: I rewrote PyUnicode_FromFormatV() to use a single step instead of four: see issue #16147. So it's now simpler to fix this issue. Here is a new patch to implement width and precision modifiers for %s, %A, %R, %S and %U formats. ---------- Added file: http://bugs.python.org/file27465/unicode_fromformat_precision.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 00:59:00 2012 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Oct 2012 22:59:00 +0000 Subject: [issue12986] Using getrandbits() in uuid.uuid4() is faster and more readable In-Reply-To: <1316104217.68.0.381815581788.issue12986@psf.upfronthosting.co.za> Message-ID: <1349564340.16.0.505131757641.issue12986@psf.upfronthosting.co.za> Christian Heimes added the comment: If somebody is going to implement uuid based on the random module that somebody must take care of fork. Currently the PRGN in random isn't reseeded during fork(). This would lead to 100% collisions. The tempfile module contains a workaround for the issue. I'm -1, see #15206. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 01:00:22 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 06 Oct 2012 23:00:22 +0000 Subject: [issue12986] Using getrandbits() in uuid.uuid4() is faster and more readable In-Reply-To: <1316104217.68.0.381815581788.issue12986@psf.upfronthosting.co.za> Message-ID: <1349564422.73.0.654430243373.issue12986@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, let's reject the issue then. ---------- resolution: -> rejected stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 01:01:43 2012 From: report at bugs.python.org (STINNER Victor) Date: Sat, 06 Oct 2012 23:01:43 +0000 Subject: [issue16153] PyUnicode_FromFormatV() must fail if the format string is invalid In-Reply-To: <1349560581.01.0.621984773801.issue16153@psf.upfronthosting.co.za> Message-ID: <1349564503.96.0.914836461895.issue16153@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum, my patch is incomplete: "%.s" is not seen as an invalid format. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 01:09:17 2012 From: report at bugs.python.org (STINNER Victor) Date: Sat, 06 Oct 2012 23:09:17 +0000 Subject: [issue7330] PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A In-Reply-To: <1258314153.95.0.978747695294.issue7330@psf.upfronthosting.co.za> Message-ID: <1349564957.7.0.635597387827.issue7330@psf.upfronthosting.co.za> STINNER Victor added the comment: I read again this old issue. I still think that it would be better to truncate to a number of *bytes* for "%s" format (and %V format when the first argument is NULL) to mimic printf(). The "replace" error handler of the UTF-8 decoder handles truncated string correctly. So I should update my patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 01:30:51 2012 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Oct 2012 23:30:51 +0000 Subject: [issue16063] HMAC trans_5C is a string, causing a TypeError In-Reply-To: <1348766473.89.0.982631739774.issue16063@psf.upfronthosting.co.za> Message-ID: <1349566251.57.0.0372783377388.issue16063@psf.upfronthosting.co.za> Christian Heimes added the comment: That's to be expected. HMAC and all cryptographic hashing algorithms work with bytes only. Text (unicode) is neither specified by the standards nor supported. You have to convert your text to bytes with some encoding (e.g. ASCII or UTF-8). ---------- components: +Library (Lib) -None nosy: +christian.heimes resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 01:34:12 2012 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Oct 2012 23:34:12 +0000 Subject: [issue14955] hmac.secure_compare() is not time-independent for unicode strings In-Reply-To: <1338309411.99.0.502749568919.issue14955@psf.upfronthosting.co.za> Message-ID: <1349566452.9.0.142719983601.issue14955@psf.upfronthosting.co.za> Christian Heimes added the comment: Python 3.3 contains a secure and working implementation for bytes. unicode isn't supported unless both sides contains ASCII text only. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 01:36:45 2012 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Oct 2012 23:36:45 +0000 Subject: [issue8998] add crypto routines to stdlib In-Reply-To: <1276551598.69.0.32913607148.issue8998@psf.upfronthosting.co.za> Message-ID: <1349566605.44.0.248870940646.issue8998@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 01:38:37 2012 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Oct 2012 23:38:37 +0000 Subject: [issue14322] More test coverage for hmac In-Reply-To: <1331831609.33.0.520236800519.issue14322@psf.upfronthosting.co.za> Message-ID: <1349566717.1.0.849039101447.issue14322@psf.upfronthosting.co.za> Christian Heimes added the comment: IIRC we also need a signed contributor agreement in order to commit your patch. ---------- nosy: +christian.heimes versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 01:41:53 2012 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Oct 2012 23:41:53 +0000 Subject: [issue8489] Support UTF8SMTP as part of RFC 5336 In-Reply-To: <1271877469.99.0.897777864709.issue8489@psf.upfronthosting.co.za> Message-ID: <1349566913.82.0.122559111405.issue8489@psf.upfronthosting.co.za> Christian Heimes added the comment: I've changed the topic and set the version to 3.4. ---------- components: +Library (Lib) keywords: +easy nosy: +christian.heimes, ezio.melotti title: smtplib.SMTP.login() breaks with unicode input -> Support UTF8SMTP as part of RFC 5336 type: crash -> enhancement versions: +Python 3.4 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 01:44:01 2012 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Oct 2012 23:44:01 +0000 Subject: [issue4818] Patch for thread-support in md5module.c In-Reply-To: <1230981840.09.0.761060151323.issue4818@psf.upfronthosting.co.za> Message-ID: <1349567041.4.0.973066281397.issue4818@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- components: +Extension Modules nosy: +christian.heimes stage: -> patch review type: -> performance versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 01:45:18 2012 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Oct 2012 23:45:18 +0000 Subject: [issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib" In-Reply-To: <1278097810.42.0.823869291087.issue9146@psf.upfronthosting.co.za> Message-ID: <1349567118.36.0.216442838603.issue9146@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 01:45:42 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 06 Oct 2012 23:45:42 +0000 Subject: [issue8489] Support UTF8SMTP as part of RFC 5336 In-Reply-To: <1271877469.99.0.897777864709.issue8489@psf.upfronthosting.co.za> Message-ID: <1349567142.54.0.223539552226.issue8489@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +barry, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 01:49:16 2012 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Oct 2012 23:49:16 +0000 Subject: [issue9216] FIPS support for hashlib In-Reply-To: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> Message-ID: <1349567356.67.0.789153590391.issue9216@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 01:57:53 2012 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Oct 2012 23:57:53 +0000 Subject: [issue16059] Serialize MD5 computation-state and resume later In-Reply-To: <1348720627.28.0.14858065839.issue16059@psf.upfronthosting.co.za> Message-ID: <1349567873.78.0.299643179087.issue16059@psf.upfronthosting.co.za> Christian Heimes added the comment: I don't think it's possible to serialize an crypto hash object like MD5. The internal states of those objects are opaque data structures. There is no way official way to access the data structures in a platform independent way. It *might* be possible to hack something for our own implementation of md5 but definitely not for OpenSSL's implementation. ---------- nosy: +christian.heimes, gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 02:00:48 2012 From: report at bugs.python.org (Raymond Costantini) Date: Sun, 07 Oct 2012 00:00:48 +0000 Subject: [issue16156] Crash every time I copy or paste any code in IDLE Message-ID: <1349568047.3.0.403538451245.issue16156@psf.upfronthosting.co.za> New submission from Raymond Costantini: Process: Python [20738] Path: /Applications/Python 3.2/IDLE.app/Contents/MacOS/Python Identifier: org.python.IDLE Version: 3.2.3 (3.2.3) Code Type: X86-64 (Native) Parent Process: launchd [239] User ID: 501 Date/Time: 2012-10-06 16:56:07.254 -0700 OS Version: Mac OS X 10.8.2 (12C60) Report Version: 10 Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: EXC_I386_GPFLT Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 Tk 0x000000010138a12a TkpMakeWindow + 306 1 Tk 0x000000010130482f Tk_MakeWindowExist + 130 2 Tk 0x00000001012e2ed9 TkClipInit + 129 3 Tk 0x00000001012e2f77 Tk_ClipboardClear + 43 4 Tk 0x00000001012e35fe Tk_ClipboardObjCmd + 996 5 Tcl 0x00000001011dd8ad TclEvalObjvInternal + 782 6 Tcl 0x0000000101216e51 TclExecuteByteCode + 4488 7 Tcl 0x0000000101250c16 TclObjInterpProcCore + 1001 8 Tcl 0x00000001011dd8ad TclEvalObjvInternal + 782 9 Tcl 0x00000001011de4bf TclEvalEx + 2183 10 Tcl 0x00000001011de88f Tcl_EvalEx + 26 11 Tk 0x00000001012e1c7d Tk_BindEvent + 4994 12 Tk 0x00000001012e4eac TkBindEventProc + 342 13 Tk 0x00000001012eb7bb Tk_HandleEvent + 1431 14 Tk 0x00000001012e01b8 Tk_EventObjCmd + 4666 15 Tcl 0x00000001011dd8ad TclEvalObjvInternal + 782 16 Tcl 0x00000001011dea9f Tcl_EvalObjv + 66 17 _tkinter.so 0x00000001011c268e Tkapp_Call + 190 18 org.python.python 0x00000001000b4034 PyEval_EvalFrameEx + 29204 19 org.python.python 0x00000001000b4ffa PyEval_EvalCodeEx + 1770 20 org.python.python 0x00000001000b4167 PyEval_EvalFrameEx + 29511 21 org.python.python 0x00000001000b4321 PyEval_EvalFrameEx + 29953 22 org.python.python 0x00000001000b4ffa PyEval_EvalCodeEx + 1770 23 org.python.python 0x0000000100039d0a function_call + 186 24 org.python.python 0x000000010000c828 PyObject_Call + 104 25 org.python.python 0x00000001000af2ae PyEval_EvalFrameEx + 9358 26 org.python.python 0x00000001000b4ffa PyEval_EvalCodeEx + 1770 27 org.python.python 0x0000000100039d0a function_call + 186 28 org.python.python 0x000000010000c828 PyObject_Call + 104 29 org.python.python 0x00000001000261aa method_call + 138 30 org.python.python 0x000000010000c828 PyObject_Call + 104 31 org.python.python 0x00000001000ab5e7 PyEval_CallObjectWithKeywords + 87 32 _tkinter.so 0x00000001011c09c8 PythonCmd + 456 33 Tcl 0x00000001011da53b TclInvokeStringCommand + 105 34 Tcl 0x00000001011dd8ad TclEvalObjvInternal + 782 35 Tcl 0x0000000101216e51 TclExecuteByteCode + 4488 36 Tcl 0x000000010121de3b Tcl_ExprObj + 705 37 Tcl 0x00000001011da159 Tcl_ExprBooleanObj + 35 38 Tcl 0x00000001011ea61f Tcl_IfObjCmd + 123 39 Tcl 0x00000001011dd8ad TclEvalObjvInternal + 782 40 Tcl 0x00000001011de4bf TclEvalEx + 2183 41 Tcl 0x00000001011de88f Tcl_EvalEx + 26 42 Tk 0x00000001012e1c7d Tk_BindEvent + 4994 43 Tk 0x00000001012e4eac TkBindEventProc + 342 44 Tk 0x00000001012eb7bb Tk_HandleEvent + 1431 45 Tk 0x00000001012eb88c WindowEventProc + 92 46 Tcl 0x000000010124312f Tcl_ServiceEvent + 147 47 Tcl 0x000000010124329f Tcl_ServiceAll + 163 48 Tcl 0x0000000101276ace UpdateWaitingListAndServiceEvents + 255 49 com.apple.CoreFoundation 0x00007fff8f0b89b7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23 50 com.apple.CoreFoundation 0x00007fff8f0b8921 __CFRunLoopDoObservers + 369 51 com.apple.CoreFoundation 0x00007fff8f093e51 __CFRunLoopRun + 929 52 com.apple.CoreFoundation 0x00007fff8f0936b2 CFRunLoopRunSpecific + 290 53 com.apple.AppKit 0x00007fff98e9d32c -[NSCarbonMenuImpl performMenuAction:withTarget:] + 269 54 com.apple.AppKit 0x00007fff98e2120d -[NSMenu _performKeyEquivalentWithDelegate:] + 634 55 com.apple.AppKit 0x00007fff98e21190 -[NSMenu _performKeyEquivalentWithDelegate:] + 509 56 com.apple.AppKit 0x00007fff98e20cf7 -[NSMenu performKeyEquivalent:] + 70 57 com.apple.AppKit 0x00007fff98e20283 -[NSApplication _handleKeyEquivalent:] + 829 58 com.apple.AppKit 0x00007fff98cdd243 -[NSApplication sendEvent:] + 4480 59 Tk 0x000000010139567f -[TKApplication(TKNotify) sendEvent:] + 122 60 Tk 0x0000000101395a12 TkMacOSXEventsCheckProc + 411 61 Tcl 0x0000000101243412 Tcl_DoOneEvent + 297 62 _tkinter.so 0x00000001011bff71 Tkapp_MainLoop + 177 63 org.python.python 0x00000001000b4034 PyEval_EvalFrameEx + 29204 64 org.python.python 0x00000001000b4ffa PyEval_EvalCodeEx + 1770 65 org.python.python 0x00000001000b4167 PyEval_EvalFrameEx + 29511 66 org.python.python 0x00000001000b4321 PyEval_EvalFrameEx + 29953 67 org.python.python 0x00000001000b4ffa PyEval_EvalCodeEx + 1770 68 org.python.python 0x00000001000b530f PyEval_EvalCode + 63 69 org.python.python 0x00000001000dc6ab PyRun_FileExFlags + 187 70 org.python.python 0x00000001000dc979 PyRun_SimpleFileExFlags + 521 71 org.python.python 0x00000001000f1e65 Py_Main + 3237 72 Python 0x0000000100000e0b 0x100000000 + 3595 73 Python 0x0000000100000c94 0x100000000 + 3220 Thread 1:: Dispatch queue: com.apple.libdispatch-manager 0 libsystem_kernel.dylib 0x00007fff90883d16 kevent + 10 1 libdispatch.dylib 0x00007fff8f755dea _dispatch_mgr_invoke + 883 2 libdispatch.dylib 0x00007fff8f7559ee _dispatch_mgr_thread + 54 Thread 2: 0 libsystem_kernel.dylib 0x00007fff908836d6 __workq_kernreturn + 10 1 libsystem_c.dylib 0x00007fff8fb1feec _pthread_workq_return + 25 2 libsystem_c.dylib 0x00007fff8fb1fcb3 _pthread_wqthread + 412 3 libsystem_c.dylib 0x00007fff8fb0a171 start_wqthread + 13 Thread 3: 0 libsystem_kernel.dylib 0x00007fff90883322 __select + 10 1 Tcl 0x0000000101276d1e NotifierThreadProc + 558 2 libsystem_c.dylib 0x00007fff8fb1d742 _pthread_start + 327 3 libsystem_c.dylib 0x00007fff8fb0a181 thread_start + 13 Thread 4: 0 libsystem_kernel.dylib 0x00007fff908836d6 __workq_kernreturn + 10 1 libsystem_c.dylib 0x00007fff8fb1feec _pthread_workq_return + 25 2 libsystem_c.dylib 0x00007fff8fb1fcb3 _pthread_wqthread + 412 3 libsystem_c.dylib 0x00007fff8fb0a171 start_wqthread + 13 Thread 5: 0 libsystem_kernel.dylib 0x00007fff908836d6 __workq_kernreturn + 10 1 libsystem_c.dylib 0x00007fff8fb1feec _pthread_workq_return + 25 2 libsystem_c.dylib 0x00007fff8fb1fcb3 _pthread_wqthread + 412 3 libsystem_c.dylib 0x00007fff8fb0a171 start_wqthread + 13 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0072006f005f0074 rbx: 0x0000000101ba5e10 rcx: 0x0000000101ba5e00 rdx: 0x0000000000000000 rdi: 0x0000000000000000 rsi: 0x0000000101ba5e18 rbp: 0x00007fff5fbf9650 rsp: 0x00007fff5fbf9630 r8: 0x0000000000002060 r9: 0x00007fff5fbf9680 r10: 0x0000000000000004 r11: 0x0000000000001000 r12: 0x0000000101ba6a10 r13: 0x0000000101ba5e10 r14: 0xffffffffffffffff r15: 0x00000001018a2410 rip: 0x000000010138a12a rfl: 0x0000000000010246 cr2: 0x0000000100c1c490 Logical CPU: 1 Binary Images: 0x100000000 - 0x100000ff7 +Python (???) <1768148D-C54D-CDEA-E308-66DD6F981E49> /Applications/Python 3.2/IDLE.app/Contents/MacOS/Python 0x100003000 - 0x100184ff7 +org.python.python (3.2.3, [c] 2004-2012 Python Software Foundation. - 3.2.3) /Library/Frameworks/Python.framework/Versions/3.2/Python 0x100570000 - 0x100570fff +_bisect.so (???) <78CC2A47-24FF-F895-B747-95A8E082C933> /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/lib-dynload/_bisect.so 0x1005a1000 - 0x1005a2ff7 +_heapq.so (???) <9E377F57-15D4-FA5A-C33F-79EE16CEFFAE> /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/lib-dynload/_heapq.so 0x1005e6000 - 0x1005eefff +_socket.so (???) <139F676E-9155-AFC9-1AD3-A782BEAC8C6B> /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/lib-dynload/_socket.so 0x1005f8000 - 0x1005fafff +time.so (???) /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/lib-dynload/time.so 0x1007c0000 - 0x1007c3fff +select.so (???) /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/lib-dynload/select.so 0x1007c9000 - 0x1007caff7 +fcntl.so (???) <56137A5B-9D40-321A-EA04-BA3BC276F687> /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/lib-dynload/fcntl.so 0x1007cd000 - 0x1007d1fff +_struct.so (???) <4146D1DF-404C-17A5-91BD-4D0EA49CA1A9> /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/lib-dynload/_struct.so 0x1007d8000 - 0x1007e7fff +_pickle.so (???) <201C5209-AB7F-A512-307F-8D2F0B5BA7A9> /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/lib-dynload/_pickle.so 0x1007f1000 - 0x1007f2ff7 +_posixsubprocess.so (???) /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/lib-dynload/_posixsubprocess.so 0x1007f9000 - 0x1007fbff7 +_hashlib.so (???) /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/lib-dynload/_hashlib.so 0x1011bd000 - 0x1011c4ff7 +_tkinter.so (???) <885013A0-8BE8-E15A-1150-94172642D585> /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/lib-dynload/_tkinter.so 0x1011cd000 - 0x1012aafe7 +Tcl (8.5.12 - 8.5.12) /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl 0x1012d6000 - 0x1013e4fef +Tk (8.5.12 - 8.5.12) /Library/Frameworks/Tk.framework/Versions/8.5/Tk 0x1014fc000 - 0x1014fdff7 +_random.so (???) /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/lib-dynload/_random.so 0x1017c3000 - 0x1017c8fe7 +math.so (???) <5EE93FAE-A0BF-5D9D-7B68-F1BA2D893EAC> /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/lib-dynload/math.so 0x1020c3000 - 0x1020c9fe7 +array.so (???) <93D44AE8-82E4-1541-2172-0ECB419847E6> /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/lib-dynload/array.so 0x1020ec000 - 0x1020f5fe7 libcldcpuengine.dylib (2.1.19) <50800DA2-7233-32E5-9553-A02171B68399> /System/Library/Frameworks/OpenCL.framework/Libraries/libcldcpuengine.dylib 0x1020fd000 - 0x1020fdff3 +cl_kernels (???) cl_kernels 0x1025f2000 - 0x1025f5ff7 libCoreFSCache.dylib (24.4) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreFSCache.dylib 0x104efa000 - 0x104f95fef +unicodedata.so (???) <001D04E6-0D6B-34D3-1DD9-A33C55E86885> /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/lib-dynload/unicodedata.so 0x106900000 - 0x10699bff7 unorm8_bgra.dylib (2.1.19) <904EA51D-225A-38AF-B66C-84493C55C065> /System/Library/Frameworks/OpenCL.framework/Libraries/ImageFormats/unorm8_bgra.dylib 0x7fff6e242000 - 0x7fff6e27693f dyld (210.2.3) /usr/lib/dyld 0x7fff8dfd7000 - 0x7fff8dfeefff com.apple.GenerationalStorage (1.1 - 132.2) <3F5C87BD-D866-3732-8CB9-D23ED9784D6E> /System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage 0x7fff8dfef000 - 0x7fff8dff3fff com.apple.IOSurface (86.0.3 - 86.0.3) /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface 0x7fff8dff4000 - 0x7fff8e014fff libPng.dylib (845) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x7fff8e015000 - 0x7fff8e0daff7 com.apple.coreui (2.0 - 181.1) <83D2C92D-6842-3C9D-9289-39D5B4554C3A> /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x7fff8e123000 - 0x7fff8e358ff7 com.apple.CoreData (106.1 - 407.7) <24E0A6B4-9ECA-3D12-B26A-72B9DCF09768> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x7fff8e359000 - 0x7fff8e35aff7 libsystem_sandbox.dylib (220) <3C3B03CF-C525-3CB3-8557-62E91B93AC95> /usr/lib/system/libsystem_sandbox.dylib 0x7fff8e35b000 - 0x7fff8e35bffd com.apple.audio.units.AudioUnit (1.8 - 1.8) <29E2C990-3617-3FA2-BDD7-DB7DF493E443> /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x7fff8e43b000 - 0x7fff8e442fff libcopyfile.dylib (89) <876573D0-E907-3566-A108-577EAD1B6182> /usr/lib/system/libcopyfile.dylib 0x7fff8e443000 - 0x7fff8e443fff com.apple.Cocoa (6.7 - 19) <1F77945C-F37A-3171-B22E-F7AB0FCBB4D4> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x7fff8e444000 - 0x7fff8e47afff com.apple.DebugSymbols (98 - 98) <14E788B1-4EB2-3FD7-934B-849534DFC198> /System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols 0x7fff8e4bf000 - 0x7fff8e4c3fff libCoreVMClient.dylib (24.4) <55F71158-ADEE-3863-92E9-4772DCEA8E31> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib 0x7fff8e506000 - 0x7fff8e56eff7 libc++.1.dylib (65.1) <20E31B90-19B9-3C2A-A9EB-474E08F9FE05> /usr/lib/libc++.1.dylib 0x7fff8e56f000 - 0x7fff8e671fff libcrypto.0.9.8.dylib (47) <74F165AD-4572-3B26-B0E2-A97477FE59D0> /usr/lib/libcrypto.0.9.8.dylib 0x7fff8e672000 - 0x7fff8e677fff com.apple.OpenDirectory (10.8 - 151.10) /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory 0x7fff8e678000 - 0x7fff8e699ff7 libCRFSuite.dylib (33) <736ABE58-8DED-3289-A042-C25AF7AE5B23> /usr/lib/libCRFSuite.dylib 0x7fff8e69d000 - 0x7fff8e6d4ff7 libssl.0.9.8.dylib (47) <923945E6-C489-3406-903B-A362410753F8> /usr/lib/libssl.0.9.8.dylib 0x7fff8e6d5000 - 0x7fff8e7ed92f libobjc.A.dylib (532.2) <90D31928-F48D-3E37-874F-220A51FD9E37> /usr/lib/libobjc.A.dylib 0x7fff8e7ee000 - 0x7fff8e83fff7 com.apple.SystemConfiguration (1.12.2 - 1.12.2) /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration 0x7fff8e840000 - 0x7fff8e84eff7 libsystem_network.dylib (77.10) <0D99F24E-56FE-380F-B81B-4A4C630EE587> /usr/lib/system/libsystem_network.dylib 0x7fff8e84f000 - 0x7fff8e85dff7 libkxld.dylib (2050.18.24) <7027CE49-007D-3553-8FFA-3E3B428B2316> /usr/lib/system/libkxld.dylib 0x7fff8e85e000 - 0x7fff8e91bff7 com.apple.ColorSync (4.8.0 - 4.8.0) <6CE333AE-EDDB-3768-9598-9DB38041DC55> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync 0x7fff8e91c000 - 0x7fff8e91fff7 libdyld.dylib (210.2.3) /usr/lib/system/libdyld.dylib 0x7fff8e93e000 - 0x7fff8eab2fff com.apple.CFNetwork (596.2.3 - 596.2.3) <6A16C2BD-1035-30F9-AE96-D9E3BB54A976> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork 0x7fff8eab3000 - 0x7fff8eb1cfff libstdc++.6.dylib (56) /usr/lib/libstdc++.6.dylib 0x7fff8eb1d000 - 0x7fff8eb9ffff com.apple.Heimdal (3.0 - 2.0) <660A6C64-4912-32C8-A332-B64164032A2D> /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal 0x7fff8eba2000 - 0x7fff8ec53fff com.apple.LaunchServices (539.7 - 539.7) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices 0x7fff8ec54000 - 0x7fff8ec5ffff libsystem_notify.dylib (98.5) /usr/lib/system/libsystem_notify.dylib 0x7fff8ec60000 - 0x7fff8ec64ff7 com.apple.TCC (1.0 - 1) /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC 0x7fff8ec65000 - 0x7fff8ec65fff com.apple.Accelerate.vecLib (3.8 - vecLib 3.8) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff8ec66000 - 0x7fff8ec68fff libquarantine.dylib (52) <4BE2E642-A14F-340A-B482-5BD2AEFD9C24> /usr/lib/system/libquarantine.dylib 0x7fff8ec69000 - 0x7fff8ec6bfff com.apple.TrustEvaluationAgent (2.0 - 23) /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/TrustEvaluationAgent 0x7fff8ec6c000 - 0x7fff8ee07fef com.apple.vImage (6.0 - 6.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage 0x7fff8ee08000 - 0x7fff8ee1efff com.apple.MultitouchSupport.framework (235.28 - 235.28) /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport 0x7fff8ee88000 - 0x7fff8ee8bfff com.apple.help (1.3.2 - 42) <343904FE-3022-3573-97D6-5FE17F8643BA> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help 0x7fff8eec4000 - 0x7fff8eed8fff libGL.dylib (8.6.1) <2E00615F-97F5-34EB-BE07-75A24F3C18D7> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x7fff8efa4000 - 0x7fff8efb1fff com.apple.AppleFSCompression (49 - 1.0) <5508344A-2A7E-3122-9562-6F363910A80E> /System/Library/PrivateFrameworks/AppleFSCompression.framework/Versions/A/AppleFSCompression 0x7fff8efbc000 - 0x7fff8f013ff7 com.apple.ScalableUserInterface (1.0 - 1) /System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/ScalableUserInterface.framework/Versions/A/ScalableUserInterface 0x7fff8f014000 - 0x7fff8f04efff com.apple.GSS (3.0 - 2.0) <0BDF8090-5EF4-3759-94DE-8521D74188AA> /System/Library/Frameworks/GSS.framework/Versions/A/GSS 0x7fff8f04f000 - 0x7fff8f05eff7 com.apple.opengl (1.8.6 - 1.8.6) <720CC06C-0D01-37AE-BB3D-D7F0242B262A> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x7fff8f05f000 - 0x7fff8f248fff com.apple.CoreFoundation (6.8 - 744.12) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x7fff8f249000 - 0x7fff8f27ffff libsystem_info.dylib (406.17) <4FFCA242-7F04-365F-87A6-D4EFB89503C1> /usr/lib/system/libsystem_info.dylib 0x7fff8f280000 - 0x7fff8f370ff7 com.apple.DiskImagesFramework (10.8 - 344) <3A30B9B5-5099-35E2-9DCD-C96764FA2D26> /System/Library/PrivateFrameworks/DiskImages.framework/Versions/A/DiskImages 0x7fff8f371000 - 0x7fff8f372ff7 libremovefile.dylib (23.1) /usr/lib/system/libremovefile.dylib 0x7fff8f49c000 - 0x7fff8f4a7fff com.apple.CommonAuth (3.0 - 2.0) <74A86DDD-57D0-3178-AB74-E1F31DBFFC39> /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth 0x7fff8f4a8000 - 0x7fff8f4acfff libGIF.dylib (845) <2690CE83-E934-3EF8-A30A-996EDADCE3E4> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x7fff8f4ad000 - 0x7fff8f4c4fff com.apple.CFOpenDirectory (10.8 - 151.10) /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory 0x7fff8f721000 - 0x7fff8f721fff com.apple.ApplicationServices (45 - 45) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices 0x7fff8f722000 - 0x7fff8f750fff com.apple.CoreServicesInternal (154.2 - 154.2) <3E6196E6-F3B4-316F-9E1F-13B6B9694C7E> /System/Library/PrivateFrameworks/CoreServicesInternal.framework/Versions/A/CoreServicesInternal 0x7fff8f751000 - 0x7fff8f766ff7 libdispatch.dylib (228.23) /usr/lib/system/libdispatch.dylib 0x7fff8f7a4000 - 0x7fff8f7e8fff libcups.2.dylib (327) <9B3F3321-D2BC-3195-BF20-4008FC52A390> /usr/lib/libcups.2.dylib 0x7fff8f7e9000 - 0x7fff8f7eefff libcompiler_rt.dylib (30) <08F8731D-5961-39F1-AD00-4590321D24A9> /usr/lib/system/libcompiler_rt.dylib 0x7fff8f80d000 - 0x7fff8f859ff7 libauto.dylib (185.1) <73CDC482-16E3-3FC7-9BB4-FBA2DA44DBC2> /usr/lib/libauto.dylib 0x7fff8f85a000 - 0x7fff8f877fff com.apple.openscripting (1.3.6 - 148.2) <33B87CFB-CACC-3EBC-893D-38AECB94FB8A> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting 0x7fff8fafb000 - 0x7fff8fb08ff7 com.apple.NetAuth (4.0 - 4.0) /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth 0x7fff8fb09000 - 0x7fff8fbd5fe7 libsystem_c.dylib (825.25) <8CBCF9B9-EBB7-365E-A3FF-2F3850763C6B> /usr/lib/system/libsystem_c.dylib 0x7fff8fbd6000 - 0x7fff90566c67 com.apple.CoreGraphics (1.600.0 - 324.6) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics 0x7fff905ae000 - 0x7fff9064cff7 com.apple.ink.framework (10.8.2 - 150) <84B9825C-3822-375F-BE58-A753444FBDE2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink 0x7fff9064d000 - 0x7fff90654fff com.apple.NetFS (5.0 - 4.0) <82E24B9A-7742-3DA3-9E99-ED267D98C05E> /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS 0x7fff90655000 - 0x7fff9065dff7 libsystem_dnssd.dylib (379.32.1) <62AA0B84-188A-348B-8F9E-3E2DB08DB93C> /usr/lib/system/libsystem_dnssd.dylib 0x7fff9065e000 - 0x7fff9065ffff libsystem_blocks.dylib (59) /usr/lib/system/libsystem_blocks.dylib 0x7fff906bb000 - 0x7fff906e5ff7 com.apple.CoreVideo (1.8 - 99.3) /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x7fff90871000 - 0x7fff9088cff7 libsystem_kernel.dylib (2050.18.24) /usr/lib/system/libsystem_kernel.dylib 0x7fff9088d000 - 0x7fff9090efff com.apple.Metadata (10.7.0 - 707.3) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata 0x7fff90911000 - 0x7fff90915fff libpam.2.dylib (20) /usr/lib/libpam.2.dylib 0x7fff909a1000 - 0x7fff90a1fff7 com.apple.securityfoundation (6.0 - 55115.4) /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation 0x7fff90a20000 - 0x7fff90a22fff libCVMSPluginSupport.dylib (8.6.1) <7EFDA31E-E463-3897-A8DC-7FD266EB713E> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib 0x7fff90a6b000 - 0x7fff90ac1fff com.apple.HIServices (1.20 - 417) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices 0x7fff90aea000 - 0x7fff90aeeff7 com.apple.CommonPanels (1.2.5 - 94) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels 0x7fff90aef000 - 0x7fff90af0fff liblangid.dylib (116) <864C409D-D56B-383E-9B44-A435A47F2346> /usr/lib/liblangid.dylib 0x7fff91e80000 - 0x7fff91e89fff com.apple.CommerceCore (1.0 - 26) <997CD214-BC78-3C61-A1B8-813EA1CB9997> /System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/Frameworks/CommerceCore.framework/Versions/A/CommerceCore 0x7fff91e8a000 - 0x7fff91eb1ff7 com.apple.PerformanceAnalysis (1.16 - 16) /System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/PerformanceAnalysis 0x7fff91eb2000 - 0x7fff91f84ff7 com.apple.CoreText (260.0 - 275.16) <5BFC1D67-6A6F-38BC-9D90-9C712684EDAC> /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText 0x7fff91f85000 - 0x7fff91fb3ff7 libsystem_m.dylib (3022.6) /usr/lib/system/libsystem_m.dylib 0x7fff91fb4000 - 0x7fff9213afff libBLAS.dylib (1073.4) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 0x7fff9213b000 - 0x7fff9213bfff com.apple.Carbon (154 - 155) <372716D2-6FA1-3611-8501-3DD1D4A6E8C8> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x7fff92163000 - 0x7fff921b2ff7 libcorecrypto.dylib (106.2) /usr/lib/system/libcorecrypto.dylib 0x7fff921b3000 - 0x7fff921d8ff7 libc++abi.dylib (24.4) /usr/lib/libc++abi.dylib 0x7fff9244e000 - 0x7fff92489fff com.apple.LDAPFramework (2.4.28 - 194.5) <0190B746-F684-3F43-B4D0-148EFE386CA4> /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP 0x7fff9248a000 - 0x7fff924f2fff libvDSP.dylib (380.6) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib 0x7fff92553000 - 0x7fff92553fff libOpenScriptingUtil.dylib (148.2) /usr/lib/libOpenScriptingUtil.dylib 0x7fff92554000 - 0x7fff92561ff7 com.apple.HelpData (2.1.4 - 85) /System/Library/PrivateFrameworks/HelpData.framework/Versions/A/HelpData 0x7fff92d23000 - 0x7fff92dc9ff7 com.apple.CoreServices.OSServices (557.4 - 557.4) <841878A8-6F3E-300D-8F01-444B3CC1F41D> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices 0x7fff92dd6000 - 0x7fff92dd6fff libkeymgr.dylib (25) /usr/lib/system/libkeymgr.dylib 0x7fff92dd7000 - 0x7fff92dd8ff7 libSystem.B.dylib (169.3) <365477AB-D641-389D-B8F4-A1FAE9657EEE> /usr/lib/libSystem.B.dylib 0x7fff92e06000 - 0x7fff92e60fff com.apple.print.framework.PrintCore (8.1 - 387.1) <1FA17B75-33E6-35BD-9198-35F92E37B248> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore 0x7fff92e61000 - 0x7fff92e74ff7 libbsm.0.dylib (32) /usr/lib/libbsm.0.dylib 0x7fff92e83000 - 0x7fff92ea5ff7 com.apple.Kerberos (2.0 - 1) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x7fff92f7d000 - 0x7fff92f8bfff com.apple.Librarian (1.1 - 1) <1635162F-239A-341E-83C7-710C55E254AF> /System/Library/PrivateFrameworks/Librarian.framework/Versions/A/Librarian 0x7fff92f8c000 - 0x7fff92fe1ff7 libTIFF.dylib (845) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x7fff92fe2000 - 0x7fff93031ff7 libFontRegistry.dylib (100) <2E03D7DA-9B8F-31BB-8FB5-3D3B6272127F> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib 0x7fff93032000 - 0x7fff9303efff libCSync.A.dylib (324.6) <2033247A-CABC-3E20-8498-7367A8F44A08> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x7fff93096000 - 0x7fff93116ff7 com.apple.ApplicationServices.ATS (332 - 341.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS 0x7fff93117000 - 0x7fff93121fff com.apple.speech.recognition.framework (4.1.5 - 4.1.5) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition 0x7fff93122000 - 0x7fff93141ff7 com.apple.ChunkingLibrary (2.0 - 133.2) /System/Library/PrivateFrameworks/ChunkingLibrary.framework/Versions/A/ChunkingLibrary 0x7fff93145000 - 0x7fff931dffff libvMisc.dylib (380.6) <714336EA-1C0E-3735-B31C-19DFDAAF6221> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib 0x7fff932df000 - 0x7fff93314ff7 libTrueTypeScaler.dylib (84.5) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libTrueTypeScaler.dylib 0x7fff93315000 - 0x7fff9334dfff libtidy.A.dylib (15.10) <9009156B-84F5-3781-BFCB-B409B538CD18> /usr/lib/libtidy.A.dylib 0x7fff93350000 - 0x7fff93363ff7 com.apple.LangAnalysis (1.7.0 - 1.7.0) <2F2694E9-A7BC-33C7-B4CF-8EC907DF0FEB> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis 0x7fff93364000 - 0x7fff9336afff libCGXCoreImage.A.dylib (324.6) <45864BEA-B2EA-3F5F-9D04-F9832AB67A00> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGXCoreImage.A.dylib 0x7fff9336b000 - 0x7fff93468fff libsqlite3.dylib (138.1) /usr/lib/libsqlite3.dylib 0x7fff93469000 - 0x7fff93574fff libFontParser.dylib (84.5) <617A7D30-C7BC-39FC-A1FE-59367B4A5719> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib 0x7fff93575000 - 0x7fff9359cfff com.apple.framework.familycontrols (4.1 - 410) /System/Library/PrivateFrameworks/FamilyControls.framework/Versions/A/FamilyControls 0x7fff9359d000 - 0x7fff938cdff7 com.apple.HIToolbox (2.0 - 625) <317F75F7-4B0F-35F5-89A7-F20BA60AC944> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox 0x7fff938db000 - 0x7fff939d8ff7 libxml2.2.dylib (22.3) <47B09CB2-C636-3024-8B55-6040F7829B4C> /usr/lib/libxml2.2.dylib 0x7fff93acb000 - 0x7fff93acdff7 libunc.dylib (25) <92805328-CD36-34FF-9436-571AB0485072> /usr/lib/system/libunc.dylib 0x7fff93ace000 - 0x7fff93eebfff FaceCoreLight (2.4.1) /System/Library/PrivateFrameworks/FaceCoreLight.framework/Versions/A/FaceCoreLight 0x7fff93eec000 - 0x7fff93f59fff com.apple.datadetectorscore (4.0 - 269.1) /System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore 0x7fff94bb7000 - 0x7fff94cb9fff libJP2.dylib (845) <405CAF25-0AA5-3C6B-A4A6-94471A1EDD2F> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib 0x7fff95046000 - 0x7fff95166fff com.apple.desktopservices (1.7.2 - 1.7.2) /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv 0x7fff95b70000 - 0x7fff95b72ff7 com.apple.print.framework.Print (8.0 - 258) <34666CC2-B86D-3313-B3B6-A9977AD593DA> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print 0x7fff95b84000 - 0x7fff95c79fff libiconv.2.dylib (34) /usr/lib/libiconv.2.dylib 0x7fff95caa000 - 0x7fff95dc3ff7 com.apple.ImageIO.framework (3.2.0 - 845) <553B9828-A7D9-3AE4-A214-1C33417545FD> /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO 0x7fff96088000 - 0x7fff960aaff7 libxpc.dylib (140.41) /usr/lib/system/libxpc.dylib 0x7fff960ab000 - 0x7fff960d9fff com.apple.shortcut (2.2 - 2.2) /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut 0x7fff96883000 - 0x7fff96889fff libmacho.dylib (829) /usr/lib/system/libmacho.dylib 0x7fff96ad2000 - 0x7fff96b2ffff com.apple.audio.CoreAudio (4.1.0 - 4.1.0) /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x7fff96b30000 - 0x7fff96bcafff com.apple.CoreSymbolication (3.0 - 87) <75F2C0DD-549A-36F6-BD9E-FB40A924344F> /System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication 0x7fff96bcb000 - 0x7fff96e9bfff com.apple.security (7.0 - 55179.1) <639641EF-8156-3190-890C-1053658E044A> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fff96e9c000 - 0x7fff96ea1fff libcache.dylib (57) <65187C6E-3FBF-3EB8-A1AA-389445E2984D> /usr/lib/system/libcache.dylib 0x7fff96ea2000 - 0x7fff96eaafff liblaunch.dylib (442.26.2) <2F71CAF8-6524-329E-AC56-C506658B4C0C> /usr/lib/system/liblaunch.dylib 0x7fff96ef1000 - 0x7fff96f00ff7 libxar.1.dylib (105) <370ED355-E516-311E-BAFD-D80633A84BE1> /usr/lib/libxar.1.dylib 0x7fff96f01000 - 0x7fff96f03fff com.apple.securityhi (4.0 - 55002) <34E45C60-DC7E-3FCC-A1ED-EBF48B77C559> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI 0x7fff971a1000 - 0x7fff971ccfff libxslt.1.dylib (11.3) <441776B8-9130-3893-956F-39C85FFA644F> /usr/lib/libxslt.1.dylib 0x7fff971cd000 - 0x7fff97450fff com.apple.RawCamera.bundle (4.00 - 658) <6786E9E0-3197-30A3-A0F4-22A6064B3EF2> /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera 0x7fff97451000 - 0x7fff975a2fff com.apple.audio.toolbox.AudioToolbox (1.8 - 1.8) <833DA682-A3C1-39E7-AEC3-9EDC734DE2A9> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x7fff976cd000 - 0x7fff978cdfff libicucore.A.dylib (491.11.1) /usr/lib/libicucore.A.dylib 0x7fff97953000 - 0x7fff97c6aff7 com.apple.CoreServices.CarbonCore (1037.3 - 1037.3) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore 0x7fff97cfb000 - 0x7fff97d23fff libJPEG.dylib (845) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x7fff97d24000 - 0x7fff97d2aff7 libunwind.dylib (35.1) <21703D36-2DAB-3D8B-8442-EAAB23C060D3> /usr/lib/system/libunwind.dylib 0x7fff97e0f000 - 0x7fff97e0ffff com.apple.vecLib (3.8 - vecLib 3.8) <794317C7-4E38-338A-A874-5E18001C8503> /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff97e10000 - 0x7fff97e6cff7 com.apple.Symbolication (1.3 - 93) /System/Library/PrivateFrameworks/Symbolication.framework/Versions/A/Symbolication 0x7fff97e6d000 - 0x7fff97eb0ff7 com.apple.bom (12.0 - 192) <0BF1F2D2-3648-36B7-BE4B-551A0173209B> /System/Library/PrivateFrameworks/Bom.framework/Versions/A/Bom 0x7fff97eb1000 - 0x7fff97ebdfff com.apple.CrashReporterSupport (10.8.2 - 415) <55783BF9-125E-3F9C-A412-6A095ECD9353> /System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/CrashReporterSupport 0x7fff97ee7000 - 0x7fff97ee7fff com.apple.CoreServices (57 - 57) <9DD44CB0-C644-35C3-8F57-0B41B3EC147D> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x7fff97f88000 - 0x7fff97fc7ff7 com.apple.QD (3.42 - 285) <8DF36FCA-C06B-30F4-A631-7BE2FF7E56D1> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD 0x7fff97fc8000 - 0x7fff98324fff com.apple.Foundation (6.8 - 945.11) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x7fff985d4000 - 0x7fff986a7ff7 com.apple.DiscRecording (7.0 - 7000.2.4) <49FD2D2F-4F2C-39B6-877B-6E3172577D18> /System/Library/Frameworks/DiscRecording.framework/Versions/A/DiscRecording 0x7fff986a8000 - 0x7fff986b9ff7 libsasl2.2.dylib (166) <649CAE0E-8FFE-3C60-A849-BE6300E4B726> /usr/lib/libsasl2.2.dylib 0x7fff986ba000 - 0x7fff986c0fff com.apple.DiskArbitration (2.5.1 - 2.5.1) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration 0x7fff986c1000 - 0x7fff986c2fff libDiagnosticMessagesClient.dylib (8) <8548E0DC-0D2F-30B6-B045-FE8A038E76D8> /usr/lib/libDiagnosticMessagesClient.dylib 0x7fff987a4000 - 0x7fff987d0ff7 libRIP.A.dylib (324.6) <5A7EB5C2-BA60-36D7-BF41-9853F37837AA> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x7fff989cc000 - 0x7fff98aa6ff7 com.apple.backup.framework (1.4.1 - 1.4.1) /System/Library/PrivateFrameworks/Backup.framework/Versions/A/Backup 0x7fff98aa7000 - 0x7fff996d4ff7 com.apple.AppKit (6.8 - 1187.34) <1FF64844-EB62-3F96-AED7-6525B7CCEC23> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x7fff996d5000 - 0x7fff996e7ff7 libz.1.dylib (43) <2A1551E8-A272-3DE5-B692-955974FE1416> /usr/lib/libz.1.dylib 0x7fff996e8000 - 0x7fff99730fff libcurl.4.dylib (69.2) /usr/lib/libcurl.4.dylib 0x7fff99731000 - 0x7fff99732ff7 libdnsinfo.dylib (453.18) /usr/lib/system/libdnsinfo.dylib 0x7fff99733000 - 0x7fff997a0ff7 com.apple.framework.IOKit (2.0 - 755.18.10) <142E19DD-1C8D-3D61-ABC8-83994A73279F> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff997ed000 - 0x7fff9981eff7 com.apple.DictionaryServices (1.2 - 184.4) <054F2D6F-9CFF-3EF1-9778-25C551B616C1> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices 0x7fff99c52000 - 0x7fff99ca8ff7 com.apple.opencl (2.1.20 - 2.1.20) /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL 0x7fff9a0f1000 - 0x7fff9a0fcff7 com.apple.bsd.ServiceManagement (2.0 - 2.0) /System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement 0x7fff9a0fd000 - 0x7fff9a0fdfff com.apple.Accelerate (1.8 - Accelerate 1.8) <6AD48543-0864-3D40-80CE-01F184F24B45> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x7fff9a0fe000 - 0x7fff9a102fff libCGXType.A.dylib (324.6) <2FC25246-A69F-3F81-9AC6-0A1753E1C6A8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGXType.A.dylib 0x7fff9a103000 - 0x7fff9a140fe7 libGLImage.dylib (8.6.1) <7F31DD61-3110-3541-A9BB-035CD1262E50> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib 0x7fff9a141000 - 0x7fff9a162fff com.apple.Ubiquity (1.2 - 243.10) /System/Library/PrivateFrameworks/Ubiquity.framework/Versions/A/Ubiquity 0x7fff9a1f6000 - 0x7fff9a203fff libbz2.1.0.dylib (29) /usr/lib/libbz2.1.0.dylib 0x7fff9a204000 - 0x7fff9a24eff7 libGLU.dylib (8.6.1) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib 0x7fff9a24f000 - 0x7fff9a3fdfff com.apple.QuartzCore (1.8 - 304.0) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x7fff9a3fe000 - 0x7fff9a441fff com.apple.RemoteViewServices (2.0 - 80.5) /System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/RemoteViewServices 0x7fff9a442000 - 0x7fff9a4cfff7 com.apple.SearchKit (1.4.0 - 1.4.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit 0x7fff9a4d3000 - 0x7fff9a4e1fff libcommonCrypto.dylib (60026) <2D6537F5-1B5E-305C-A1CF-D1FA80CA3939> /usr/lib/system/libcommonCrypto.dylib 0x7fff9a4e2000 - 0x7fff9a8d9fff libLAPACK.dylib (1073.4) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib 0x7fff9a8f6000 - 0x7fff9a915ff7 libresolv.9.dylib (51) <0882DC2D-A892-31FF-AD8C-0BB518C48B23> /usr/lib/libresolv.9.dylib 0x7fff9a916000 - 0x7fff9a91cfff libGFXShared.dylib (8.6.1) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib 0x7fff9a91d000 - 0x7fff9abc1fff com.apple.CoreImage (8.2.2 - 1.0.1) <930B0B23-DD84-3B0C-B5A9-C09B7068A6F0> /System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/CoreImage.framework/Versions/A/CoreImage 0x7fff9abde000 - 0x7fff9abf2fff com.apple.speech.synthesis.framework (4.1.12 - 4.1.12) <94EDF2AB-809C-3D15-BED5-7AD45B2A7C16> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x7fff9abf3000 - 0x7fff9ac33fff com.apple.MediaKit (13 - 659) <0C56D7FF-0430-3199-9952-CF8577519449> /System/Library/PrivateFrameworks/MediaKit.framework/Versions/A/MediaKit 0x7fff9ac38000 - 0x7fff9ac95ff7 com.apple.AE (645.3 - 645.3) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE 0x7fff9ac96000 - 0x7fff9ac99fff libRadiance.dylib (845) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x7fff9ac9a000 - 0x7fff9acaffff com.apple.ImageCapture (8.0 - 8.0) <17A45CE6-7DA3-36A5-B7EF-72BC136981AE> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 2 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 42677 thread_create: 1 thread_set_state: 0 VM Region Summary: ReadOnly portion of Libraries: Total=157.0M resident=117.4M(75%) swapped_out_or_unallocated=39.6M(25%) Writable regions: Total=66.8M written=17.9M(27%) resident=43.7M(65%) swapped_out=0K(0%) unallocated=23.1M(35%) REGION TYPE VIRTUAL =========== ======= CG backing stores 2960K CG image 572K CG shared images 1248K CoreImage 4K CoreServices 2048K MALLOC 34.9M MALLOC guard page 48K MALLOC_LARGE (reserved) 384K reserved VM address space (unallocated) Memory tag=240 4K Memory tag=242 12K Memory tag=251 8K OpenCL 8K STACK GUARD 56.0M Stack 10.1M VM_ALLOCATE 16.1M __DATA 11.9M __IMAGE 528K __LINKEDIT 54.4M __TEXT 102.6M __UNICODE 544K mapped file 42.2M shared memory 308K =========== ======= TOTAL 336.6M TOTAL, minus reserved VM space 336.3M Model: iMac8,1, BootROM IM81.00C1.B00, 2 processors, Intel Core 2 Duo, 2.8 GHz, 4 GB, SMC 1.30f1 Graphics: ATI Radeon HD 2600 Pro, ATI Radeon HD 2600 Pro, PCIe, 256 MB Memory Module: BANK 0/DIMM0, 2 GB, DDR2 SDRAM, 800 MHz, 0x7F7F7F7F7F9B0000, 0x4354323536363441433830302E4B31364600 Memory Module: BANK 1/DIMM1, 2 GB, DDR2 SDRAM, 800 MHz, 0x7F7F7F7F7F9B0000, 0x4354323536363441433830302E4B31364600 AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8C), Broadcom BCM43xx 1.0 (5.10.131.36.16) Bluetooth: Version 4.0.9f33 10885, 2 service, 18 devices, 1 incoming serial ports Network Service: Ethernet, Ethernet, en0 Network Service: AirPort, AirPort, en1 Serial ATA Device: Hitachi HDP725032GLA380, 320.07 GB Parallel ATA Device: MATSHITADVD-R UJ-875 USB Device: iPod, apple_vendor_id, 0x1302, 0xfa400000 / 3 USB Device: FreeAgent, 0x0bc2 (Seagate LLC), 0x3008, 0xfa200000 / 2 USB Device: Built-in iSight, apple_vendor_id, 0x8502, 0xfd400000 / 3 USB Device: USB2.0 Hub, 0x05e3 (Genesys Logic, Inc.), 0x0608, 0xfd100000 / 2 USB Device: USB2.0 Hub, 0x05e3 (Genesys Logic, Inc.), 0x0608, 0xfd140000 / 5 USB Device: iPhone, apple_vendor_id, 0x1294, 0xfd144000 / 10 USB Device: USB2.0 Hub, 0x05e3 (Genesys Logic, Inc.), 0x0608, 0xfd142000 / 7 USB Device: Flash Disk, 0x058f (Alcor Micro, Corp.), 0x6387, 0xfd142100 / 8 USB Device: Keyboard Hub, apple_vendor_id, 0x1006, 0xfd141000 / 6 USB Device: Apple Keyboard, apple_vendor_id, 0x0220, 0xfd141200 / 9 USB Device: My Book 1110, 0x1058 (Western Digital Technologies, Inc.), 0x1110, 0xfd130000 / 4 USB Device: BRCM2046 Hub, 0x0a5c (Broadcom Corp.), 0x4500, 0x1a100000 / 2 USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x820f, 0x1a110000 / 5 USB Device: IR Receiver, apple_vendor_id, 0x8242, 0x5d100000 / 2 ---------- components: IDLE messages: 172268 nosy: Raymond.Costantini priority: normal severity: normal status: open title: Crash every time I copy or paste any code in IDLE type: crash versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 02:04:52 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Oct 2012 00:04:52 +0000 Subject: [issue16156] Crash every time I copy or paste any code in IDLE In-Reply-To: <1349568047.3.0.403538451245.issue16156@psf.upfronthosting.co.za> Message-ID: <1349568292.36.0.552868674144.issue16156@psf.upfronthosting.co.za> Christian Heimes added the comment: There are known issues with TCL on Mac. Does http://www.python.org/download/mac/tcltk/ help with your issue? ---------- nosy: +christian.heimes versions: +Python 3.2 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 02:06:01 2012 From: report at bugs.python.org (Raymond Costantini) Date: Sun, 07 Oct 2012 00:06:01 +0000 Subject: [issue16156] Crash every time I copy or paste any code in IDLE In-Reply-To: <1349568292.36.0.552868674144.issue16156@psf.upfronthosting.co.za> Message-ID: <67484381-C756-4EBD-9AE2-0069CEDBB5F4@gmail.com> Raymond Costantini added the comment: Downloaded and installed this twice, with no help on the issue. Still crashes every time. On Oct 6, 2012, at 5:04 PM, Christian Heimes wrote: > > Christian Heimes added the comment: > > There are known issues with TCL on Mac. Does http://www.python.org/download/mac/tcltk/ help with your issue? > > ---------- > nosy: +christian.heimes > versions: +Python 3.2 -Python 3.5 > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 02:07:48 2012 From: report at bugs.python.org (Raymond Costantini) Date: Sun, 07 Oct 2012 00:07:48 +0000 Subject: [issue16156] Crash every time I copy or paste any code in IDLE In-Reply-To: <1349568047.3.0.403538451245.issue16156@psf.upfronthosting.co.za> Message-ID: <1E698BC9-562D-4474-A877-8132A59D243C@gmail.com> Raymond Costantini added the comment: Also crashes every time I try and access preferences in IDLE as well. Begin forwarded message: > From: "Costantini, MD, MBA Raymond" > Subject: Re: [issue16156] Crash every time I copy or paste any code in IDLE > Date: October 6, 2012 5:05:55 PM PDT > To: Python tracker > > Downloaded and installed this twice, with no help on the issue. Still crashes every time. > > > On Oct 6, 2012, at 5:04 PM, Christian Heimes wrote: > >> >> Christian Heimes added the comment: >> >> There are known issues with TCL on Mac. Does http://www.python.org/download/mac/tcltk/ help with your issue? >> >> ---------- >> nosy: +christian.heimes >> versions: +Python 3.2 -Python 3.5 >> >> _______________________________________ >> Python tracker >> >> _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 02:36:23 2012 From: report at bugs.python.org (Roger Serwy) Date: Sun, 07 Oct 2012 00:36:23 +0000 Subject: [issue16156] Crash every time I copy or paste any code in IDLE In-Reply-To: <1349568047.3.0.403538451245.issue16156@psf.upfronthosting.co.za> Message-ID: <1349570183.57.0.30583688639.issue16156@psf.upfronthosting.co.za> Roger Serwy added the comment: > Also crashes every time I try and access preferences in IDLE as well. See issue15853. ---------- nosy: +ned.deily, serwy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 02:40:18 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Oct 2012 00:40:18 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1346632042.85.0.745944196118.issue15853@psf.upfronthosting.co.za> Message-ID: <1349570418.18.0.177749244587.issue15853@psf.upfronthosting.co.za> Christian Heimes added the comment: Ned, do you have any new information on this crasher? More people are having issues with TCL on Mac, e.g. #16156. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 02:42:31 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Oct 2012 00:42:31 +0000 Subject: [issue16156] Crash every time I copy or paste any code in IDLE In-Reply-To: <1349568047.3.0.403538451245.issue16156@psf.upfronthosting.co.za> Message-ID: <1349570551.52.0.624421750904.issue16156@psf.upfronthosting.co.za> Christian Heimes added the comment: Raymond, I'm closing this bug as duplicate of #15853. Please follow the other ticket to get new information. ---------- resolution: -> duplicate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 02:42:56 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Oct 2012 00:42:56 +0000 Subject: [issue16156] Crash every time I copy or paste any code in IDLE In-Reply-To: <1349568047.3.0.403538451245.issue16156@psf.upfronthosting.co.za> Message-ID: <1349570576.22.0.422419090662.issue16156@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 02:44:39 2012 From: report at bugs.python.org (Ned Batchelder) Date: Sun, 07 Oct 2012 00:44:39 +0000 Subject: [issue16152] Trailing whitespace makes tokenize.generate_tokens pathological In-Reply-To: <1349557761.41.0.537472367724.issue16152@psf.upfronthosting.co.za> Message-ID: <1349570679.14.0.164088398705.issue16152@psf.upfronthosting.co.za> Changes by Ned Batchelder : Removed file: http://bugs.python.org/file27459/bug16152.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 02:47:40 2012 From: report at bugs.python.org (Ned Batchelder) Date: Sun, 07 Oct 2012 00:47:40 +0000 Subject: [issue16152] Trailing whitespace makes tokenize.generate_tokens pathological In-Reply-To: <1349557761.41.0.537472367724.issue16152@psf.upfronthosting.co.za> Message-ID: <1349570860.72.0.143681265626.issue16152@psf.upfronthosting.co.za> Changes by Ned Batchelder : Added file: http://bugs.python.org/file27466/bug16152_v33.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 02:48:04 2012 From: report at bugs.python.org (Ned Batchelder) Date: Sun, 07 Oct 2012 00:48:04 +0000 Subject: [issue16152] Trailing whitespace makes tokenize.generate_tokens pathological In-Reply-To: <1349557761.41.0.537472367724.issue16152@psf.upfronthosting.co.za> Message-ID: <1349570884.2.0.850516426971.issue16152@psf.upfronthosting.co.za> Changes by Ned Batchelder : Added file: http://bugs.python.org/file27467/bug16152_v27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 02:49:02 2012 From: report at bugs.python.org (Ned Batchelder) Date: Sun, 07 Oct 2012 00:49:02 +0000 Subject: [issue16152] Trailing whitespace makes tokenize.generate_tokens pathological In-Reply-To: <1349557761.41.0.537472367724.issue16152@psf.upfronthosting.co.za> Message-ID: <1349570942.84.0.0542652821675.issue16152@psf.upfronthosting.co.za> Ned Batchelder added the comment: Updated with new (better) patch, for v2.7 and v3.3. They are the same except for the test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 02:52:43 2012 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Oct 2012 00:52:43 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1346632042.85.0.745944196118.issue15853@psf.upfronthosting.co.za> Message-ID: <1349571163.01.0.482597340854.issue15853@psf.upfronthosting.co.za> Ned Deily added the comment: While there isn't a fix available for Tk yet, there is now a viable workaround. It turns out that ActiveState does make the last couple of their Community Edition ActiveTcl releases available if you know where to look for them. So I've updated the information on http://www.python.org/getit/mac/tcltk/ to provide a link to the older 8.5.11.1 release (currently available at http://downloads.activestate.com/ActiveTcl/releases/8.5.11.1/) which does not have this problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 03:07:35 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 07 Oct 2012 01:07:35 +0000 Subject: [issue8489] Support UTF8SMTP as part of RFC 5336 In-Reply-To: <1271877469.99.0.897777864709.issue8489@psf.upfronthosting.co.za> Message-ID: <1349572055.34.0.615169934294.issue8489@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- components: +email stage: -> needs patch status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 03:18:33 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 07 Oct 2012 01:18:33 +0000 Subject: [issue8489] Support UTF8SMTP as part of RFC 5336 in smtlib In-Reply-To: <1271877469.99.0.897777864709.issue8489@psf.upfronthosting.co.za> Message-ID: <1349572713.52.0.549466384887.issue8489@psf.upfronthosting.co.za> R. David Murray added the comment: Woops, did not mean to close the issue. ---------- status: closed -> open title: Support UTF8SMTP as part of RFC 5336 -> Support UTF8SMTP as part of RFC 5336 in smtlib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 04:50:38 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 07 Oct 2012 02:50:38 +0000 Subject: [issue16059] Serialize MD5 computation-state and resume later In-Reply-To: <1348720627.28.0.14858065839.issue16059@psf.upfronthosting.co.za> Message-ID: <1349578237.94.0.0780565462682.issue16059@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Unless someone supplies a patch that works inter-operably across all platforms using public APIs in openssl and with the internals of all of python's builtin non-openssl hash functions including unitests for all of the above... This isn't going to be implemented in the stdlib. ---------- assignee: -> gregory.p.smith resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 04:53:57 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 07 Oct 2012 02:53:57 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <1349578437.32.0.306105639847.issue16112@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 04:55:45 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 07 Oct 2012 02:55:45 +0000 Subject: [issue16096] Get rid of dangerous integer overflow tricks In-Reply-To: <1349030051.26.0.323672452753.issue16096@psf.upfronthosting.co.za> Message-ID: <1349578545.94.0.636723310256.issue16096@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 09:48:53 2012 From: report at bugs.python.org (pyos) Date: Sun, 07 Oct 2012 07:48:53 +0000 Subject: [issue16150] Implement generator interface in itertools.chain. In-Reply-To: <1349535148.95.0.484121382755.issue16150@psf.upfronthosting.co.za> Message-ID: <1349596133.65.0.978016817993.issue16150@psf.upfronthosting.co.za> pyos added the comment: Updated the patch. Thanks Serhiy Storchaka for comments on the previous one. ---------- Added file: http://bugs.python.org/file27468/itertools-chain-send-throw-and-close-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 09:49:01 2012 From: report at bugs.python.org (pyos) Date: Sun, 07 Oct 2012 07:49:01 +0000 Subject: [issue16150] Implement generator interface in itertools.chain. In-Reply-To: <1349535148.95.0.484121382755.issue16150@psf.upfronthosting.co.za> Message-ID: <1349596141.41.0.887884788404.issue16150@psf.upfronthosting.co.za> Changes by pyos : Removed file: http://bugs.python.org/file27455/itertools-chain-send-throw-and-close.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 10:29:40 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Oct 2012 08:29:40 +0000 Subject: [issue16148] Implement PEP 424 In-Reply-To: <1349520373.44.0.657178870535.issue16148@psf.upfronthosting.co.za> Message-ID: <3XZHtq6VT7zPHq@mail.python.org> Roundup Robot added the comment: New changeset b9dedf845a0f by Armin Ronacher in branch 'default': Issue #16148: Small improvements and cleanup. Added version information http://hg.python.org/cpython/rev/b9dedf845a0f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 11:27:52 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Sun, 07 Oct 2012 09:27:52 +0000 Subject: [issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior In-Reply-To: <1322574123.12.0.756700598965.issue13498@psf.upfronthosting.co.za> Message-ID: <1349602072.64.0.122758758343.issue13498@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Let's get this rolling again. First let's fix the docs for 3.2+ first. My current suggestion would be the following: ~~~ .. function:: makedirs(path, mode=0o777, exist_ok=False) .. index:: single: directory; creating single: UNC paths; and os.makedirs() Recursive directory creation function. Like :func:`mkdir`, but makes all intermediate-level directories needed to contain the leaf directory. The default *mode* is ``0o777`` (octal). On some systems, *mode* is ignored. Where it is used, the current umask value is first masked out. If *exists_ok* is ``False`` (the default), an :exc:`OSError` is raised if the target directory already exists. If *exists_ok* is ``True`` an :exc:`OSError` is still raised if the umask-masked *mode* is different from the existing mode, on systems where the mode is used. :exc:`OSError` will also be raised if the directory creation fails. .. note:: :func:`makedirs` will become confused if the path elements to create include :data:`pardir` (eg. ".." on UNIX systems). This function handles UNC paths correctly. .. versionadded:: 3.2 The *exist_ok* parameter. ~~~ Opinions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 11:41:21 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Oct 2012 09:41:21 +0000 Subject: [issue16096] Get rid of dangerous integer overflow tricks In-Reply-To: <1349030051.26.0.323672452753.issue16096@psf.upfronthosting.co.za> Message-ID: <1349602881.82.0.717242732017.issue16096@psf.upfronthosting.co.za> Mark Dickinson added the comment: Yes, reopening issue 14700 sounds good to me. I'm not against fixing these issues in the bugfix branches, but we need to do it carefully (which unfortunately probably also means slowly). I think that for the bugfix branches, each fix should be accompanied by a test that exercises the original bug. I'd also suggest having a separate issue for each bug, for ease of review. I'd probably also prioritise those bugs that can be triggered without having huge structures in memory: e.g., the issue 14700 bug seems more important to fix than the PyTuple_New bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 11:42:01 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Oct 2012 09:42:01 +0000 Subject: [issue14700] Integer overflow in classic string formatting In-Reply-To: <1335804926.58.0.135059540144.issue14700@psf.upfronthosting.co.za> Message-ID: <1349602921.61.0.751291857504.issue14700@psf.upfronthosting.co.za> Mark Dickinson added the comment: Re-opening: this should probably also be fixed in 2.7 and 3.2. See issue 16096 for discussion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 11:42:26 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Oct 2012 09:42:26 +0000 Subject: [issue14700] Integer overflow in classic string formatting In-Reply-To: <1335804926.58.0.135059540144.issue14700@psf.upfronthosting.co.za> Message-ID: <1349602946.67.0.94803811669.issue14700@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- resolution: fixed -> status: closed -> open versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 11:51:51 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 07 Oct 2012 09:51:51 +0000 Subject: [issue15833] most failures to write byte-compiled file no longer suppressed In-Reply-To: <1346432246.49.0.876284426658.issue15833@psf.upfronthosting.co.za> Message-ID: <1349603511.21.0.811553062593.issue15833@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Here's a patch. ---------- Added file: http://bugs.python.org/file27469/import_error.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 11:53:26 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 07 Oct 2012 09:53:26 +0000 Subject: [issue15833] most failures to write byte-compiled file no longer suppressed In-Reply-To: <1346432246.49.0.876284426658.issue15833@psf.upfronthosting.co.za> Message-ID: <1349603606.43.0.751240072708.issue15833@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Roumen, are you sure you submitted your patch to the right issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 11:58:53 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 07 Oct 2012 09:58:53 +0000 Subject: [issue16153] PyUnicode_FromFormatV() must fail if the format string is invalid In-Reply-To: <1349560581.01.0.621984773801.issue16153@psf.upfronthosting.co.za> Message-ID: <1349603933.6.0.451688422514.issue16153@psf.upfronthosting.co.za> Stefan Krah added the comment: I don't know the reason for the previous behavior, but it's documented: http://docs.python.org/dev/c-api/unicode.html?highlight=pyunicode_fromformatv#PyUnicode_FromFormat "An unrecognized format character causes all the rest of the format string to be copied as-is to the result string, and any extra arguments discarded." ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 11:59:56 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Oct 2012 09:59:56 +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: <1349603996.58.0.468521994471.issue15721@psf.upfronthosting.co.za> Andrew Svetlov added the comment: The patch for current default branch. ---------- Added file: http://bugs.python.org/file27470/_tkinter_pep3121-384_v7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 12:47:39 2012 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 07 Oct 2012 10:47:39 +0000 Subject: [issue15833] most failures to write byte-compiled file no longer suppressed In-Reply-To: <1346432246.49.0.876284426658.issue15833@psf.upfronthosting.co.za> Message-ID: <1349606859.53.0.699931115322.issue15833@psf.upfronthosting.co.za> Roumen Petrov added the comment: Yes . Charles, lest assume that all other issues with build system, are resolved and source tree is ready for use. So in this situation I could run python , I could build all and I could run tests with an additional patch TEMPDIR is relative to build tree (patch 0014-* from recent archive uploaded to issue #3754) . Note without you patch. In my build environment test_imp fail on test_source. So what is result with you patch on this test ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 12:53:26 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Oct 2012 10:53:26 +0000 Subject: [issue1492704] distinct error type if shutil.copyfile() fails because of src and dst are the same file Message-ID: <3XZM4k0YLKzPHP@mail.python.org> Roundup Robot added the comment: New changeset e11642068f85 by Hynek Schlawack in branch 'default': Closes #1492704: Make shutil.copyfile() raise a distinct SameFileError http://hg.python.org/cpython/rev/e11642068f85 ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 13:05:26 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Sun, 07 Oct 2012 11:05:26 +0000 Subject: [issue16040] nntplib: unlimited readline() from connection In-Reply-To: <1348569525.38.0.219080768405.issue16040@psf.upfronthosting.co.za> Message-ID: <1349607926.35.0.93566071355.issue16040@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Any suggestions on the value for _MAXLINE or just steal the 64k from httplib? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 13:09:22 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Sun, 07 Oct 2012 11:09:22 +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: <1349608162.74.0.938530055068.issue13837@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Pong? I understand we have to close #15411 & #9949 first? Can't help here out due to lack of Windows. ---------- dependencies: +os.chmod() does not follow symlinks on Windows, os.path.realpath on Windows does not follow symbolic links _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 13:10:01 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Sun, 07 Oct 2012 11:10:01 +0000 Subject: [issue15411] os.chmod() does not follow symlinks on Windows In-Reply-To: <1342859484.11.0.980886642738.issue15411@psf.upfronthosting.co.za> Message-ID: <1349608201.8.0.0599436313244.issue15411@psf.upfronthosting.co.za> Changes by Hynek Schlawack : ---------- nosy: +brian.curtin, tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 13:16:40 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Oct 2012 11:16:40 +0000 Subject: [issue14700] Integer overflow in classic string formatting In-Reply-To: <1335804926.58.0.135059540144.issue14700@psf.upfronthosting.co.za> Message-ID: <1349608600.46.0.231261168713.issue14700@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch for 2.7. ---------- Added file: http://bugs.python.org/file27471/formatting-overflow-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 13:16:58 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Oct 2012 11:16:58 +0000 Subject: [issue16096] Get rid of dangerous integer overflow tricks In-Reply-To: <1349030051.26.0.323672452753.issue16096@psf.upfronthosting.co.za> Message-ID: <1349608618.21.0.687365761153.issue16096@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 13:44:37 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Oct 2012 11:44:37 +0000 Subject: [issue14700] Integer overflow in classic string formatting In-Reply-To: <1335804926.58.0.135059540144.issue14700@psf.upfronthosting.co.za> Message-ID: <1349610277.82.0.0965547876148.issue14700@psf.upfronthosting.co.za> Mark Dickinson added the comment: And for 3.2 ---------- Added file: http://bugs.python.org/file27472/formatting-overflow-3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 13:57:29 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Oct 2012 11:57:29 +0000 Subject: [issue14700] Integer overflow in classic string formatting In-Reply-To: <1335804926.58.0.135059540144.issue14700@psf.upfronthosting.co.za> Message-ID: <1349611049.18.0.385587009508.issue14700@psf.upfronthosting.co.za> Changes by Mark Dickinson : Added file: http://bugs.python.org/file27473/formatting-overflow-3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 13:57:40 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Oct 2012 11:57:40 +0000 Subject: [issue14700] Integer overflow in classic string formatting In-Reply-To: <1335804926.58.0.135059540144.issue14700@psf.upfronthosting.co.za> Message-ID: <1349611060.23.0.348474341681.issue14700@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file27472/formatting-overflow-3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 14:12:44 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 07 Oct 2012 12:12:44 +0000 Subject: [issue8489] Support UTF8SMTP as part of RFC 5336 in smptlib In-Reply-To: <1271877469.99.0.897777864709.issue8489@psf.upfronthosting.co.za> Message-ID: <1349611964.88.0.765640718528.issue8489@psf.upfronthosting.co.za> Changes by Ramchandra Apte : ---------- components: -Unicode, email title: Support UTF8SMTP as part of RFC 5336 in smtlib -> Support UTF8SMTP as part of RFC 5336 in smptlib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 14:24:23 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Oct 2012 12:24:23 +0000 Subject: [issue16136] Removal of VMS support In-Reply-To: <1349389263.57.0.925729224322.issue16136@psf.upfronthosting.co.za> Message-ID: <1349612663.15.0.222219664405.issue16136@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 14:28:10 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Oct 2012 12:28:10 +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: <1349612890.36.0.806170723104.issue6322@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 14:30:30 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Oct 2012 12:30:30 +0000 Subject: [issue16050] ctypes: callback from C++ to Python fails with Illegal Instruction call In-Reply-To: <1348618955.55.0.49066087682.issue16050@psf.upfronthosting.co.za> Message-ID: <1349613030.33.0.463678462274.issue16050@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 14:35:05 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 07 Oct 2012 12:35:05 +0000 Subject: [issue16155] Some minor doc fixes in Doc/faq In-Reply-To: <1349562552.07.0.641735051076.issue16155@psf.upfronthosting.co.za> Message-ID: <1349613305.25.0.309217074735.issue16155@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > it does not seem to pick the whitespace in the docs and does not match - Doc/faq/general.rst Can you provide a link to the line (or one of the lines) in question so it's easier to see what you are referring to? > os.path.isdir returns True or False, not 0 or 1 as in the docs I think there is a doctest directive to make 1 acceptable for True and vice versa, but it's generally better if the docs match what Python actually returns (for that version of Python). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 14:45:17 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 07 Oct 2012 12:45:17 +0000 Subject: [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1349613917.62.0.574737011641.issue16154@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > fsum will pass if 'from math import fsum' is done before it, but I've left such issues for now since there seems to be a debate about how to go about that For now, you can at least use the "testsetup" directive which will simultaneously allow the doctests to pass but cause the subsequent lines to be hidden in the rendered HTML. We can always remove the directive at a later date to cause it to display. See here for an example: http://bugs.python.org/review/15888/diff/6011/Doc/howto/ipaddress.rst > - some seem unfixable too Can you include links to the questionable areas for examples like these (e.g. using the "browse source" page http://hg.python.org/cpython/file/default/ )? This will make it easier to reference and discuss. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 15:19:26 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 07 Oct 2012 13:19:26 +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: <1349615966.63.0.795136165828.issue16076@psf.upfronthosting.co.za> Eli Bendersky added the comment: Will look into it, thanks for the report. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 15:21:35 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 07 Oct 2012 13:21:35 +0000 Subject: [issue12322] ElementPath 1.3 expressions documentation In-Reply-To: <1307959369.7.0.162667287307.issue12322@psf.upfronthosting.co.za> Message-ID: <1349616095.12.0.00863372066435.issue12322@psf.upfronthosting.co.za> Eli Bendersky added the comment: Thanks for the report, Patrick. Yes, documenting this limitation would make sense. Have you tested to see how it behaves? Anyhow, a patch would be welcome ;-) ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 15:22:56 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 07 Oct 2012 13:22:56 +0000 Subject: [issue16082] xml.etree.ElementTree.tostringlist does not conform to its documentation In-Reply-To: <1348829487.02.0.837389148596.issue16082@psf.upfronthosting.co.za> Message-ID: <1349616176.1.0.313640589071.issue16082@psf.upfronthosting.co.za> Eli Bendersky added the comment: Thanks for the report. I'll take a look. Patches always welcome :) ---------- stage: -> patch review title: xml.etree.ElementTree.tostringlist does conform to it's documentation -> xml.etree.ElementTree.tostringlist does not conform to its documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 15:26:58 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 07 Oct 2012 13:26:58 +0000 Subject: [issue15888] ipaddress doctest examples have some errors In-Reply-To: <1347190349.96.0.156720503481.issue15888@psf.upfronthosting.co.za> Message-ID: <1349616418.55.0.714454424806.issue15888@psf.upfronthosting.co.za> Eli Bendersky added the comment: Thanks, Chris. I'll take a look ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 15:49:40 2012 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 07 Oct 2012 13:49:40 +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: <1349617780.55.0.142084116051.issue3871@psf.upfronthosting.co.za> Roumen Petrov added the comment: Extract of 2012-10-04 is after patch set py3k-20121004-CROSS.tgz from issue #3754 . ---------- title: cross and native build of python for mingw32 with packaging -> cross and native build of python for mingw* hosts Added file: http://bugs.python.org/file27474/py3k-20121004-MINGW.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 15:55:43 2012 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 07 Oct 2012 13:55:43 +0000 Subject: [issue9216] FIPS support for hashlib In-Reply-To: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> Message-ID: <1349618143.13.0.750120291044.issue9216@psf.upfronthosting.co.za> Roumen Petrov added the comment: Everything in this issue posted until now has to be managed as vendor patch. ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 16:24:32 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Oct 2012 14:24:32 +0000 Subject: [issue15888] ipaddress doctest examples have some errors In-Reply-To: <1347190349.96.0.156720503481.issue15888@psf.upfronthosting.co.za> Message-ID: <3XZRmJ1DvszQlJ@mail.python.org> Roundup Robot added the comment: New changeset 81ad910d75a9 by Eli Bendersky in branch '3.3': Issue #15888: fixing problems in ipaddress doctests. Patch by Chris Jerdonek http://hg.python.org/cpython/rev/81ad910d75a9 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 16:25:02 2012 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 07 Oct 2012 14:25:02 +0000 Subject: [issue15631] Python 3.3/3.4 installation issue on OpenSUSE lib/lib64 folders In-Reply-To: <1344794304.26.0.478120841355.issue15631@psf.upfronthosting.co.za> Message-ID: <1349619902.6.0.965246776916.issue15631@psf.upfronthosting.co.za> Roumen Petrov added the comment: Skip, You mix two technologies one is --libdir that could be specified at configure time and another one is sub-directory name for libraries as path suffix to some prefixes. You could just adjust python to use user specified path (--libdir) and this is more flexible instead you hard coded stuff in configure script. ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 16:25:33 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 07 Oct 2012 14:25:33 +0000 Subject: [issue15888] ipaddress doctest examples have some errors In-Reply-To: <1347190349.96.0.156720503481.issue15888@psf.upfronthosting.co.za> Message-ID: <1349619932.99.0.369681171765.issue15888@psf.upfronthosting.co.za> Eli Bendersky added the comment: Pushed to 3.3 and 3.4 Thanks for the report and patch ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 16:26:46 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Oct 2012 14:26:46 +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: <1349620006.36.0.168337031851.issue15721@psf.upfronthosting.co.za> Andrew Svetlov added the comment: The patch is huge, then I like to apply it in two steps: first implement pep 384 than 3121. Attached first patch. ---------- Added file: http://bugs.python.org/file27475/_tkinter_pep384_v1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 16:33:58 2012 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 07 Oct 2012 14:33:58 +0000 Subject: [issue15631] Python 3.3/3.4 installation issue on OpenSUSE lib/lib64 folders In-Reply-To: <1344794304.26.0.478120841355.issue15631@psf.upfronthosting.co.za> Message-ID: <1349620438.23.0.613732542858.issue15631@psf.upfronthosting.co.za> Roumen Petrov added the comment: Also I could not understand why is opened new issue. Just search for libdir and one is Issue 1294959 - 7 years old with the same idea. Later mean that solution is not acceptable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 16:38:15 2012 From: report at bugs.python.org (Skip Montanaro) Date: Sun, 07 Oct 2012 14:38:15 +0000 Subject: [issue15631] Python 3.3/3.4 installation issue on OpenSUSE lib/lib64 folders In-Reply-To: <1344794304.26.0.478120841355.issue15631@psf.upfronthosting.co.za> Message-ID: <1349620695.38.0.684324705515.issue15631@psf.upfronthosting.co.za> Skip Montanaro added the comment: Before this goes any farther, let me make this clear - I *did not* develop this patch. It was developed by the OpenSUSE folks. I had trouble installing Python from source on the OpenSUSE system under my desk at work. I asked about the problem on python-list at python.org. Someone directed me to this open bug report. I saw the reference to the patch, applied it, and installed. I verified that the installed Python executable now works as I expected, and reported that. That is all I did. Various responses seem to suggest that people think I wrote the patch. I did not. I didn't even look at the contents of the patch before applying it. I regenerated it relative to the current hg trunk simply because when I first applied it, a couple chunks were applied with offsets. If my feedback is not sufficient to help move this bug report forward, my apologies. I know next to nothing about writing configure scripts, let alone the right way to do that. I don't mess around at this level of things any more. Haven't in at least a decade. I don't know what a host macro is. I have never used --libdir. If people are looking to me to correct the flaws in this patch, they are likely going to wait for awhile. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 17:32:33 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 07 Oct 2012 15:32:33 +0000 Subject: [issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior In-Reply-To: <1322574123.12.0.756700598965.issue13498@psf.upfronthosting.co.za> Message-ID: <1349623952.99.0.319669697624.issue13498@psf.upfronthosting.co.za> R. David Murray added the comment: Looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 17:33:43 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 07 Oct 2012 15:33:43 +0000 Subject: [issue8489] Support UTF8SMTP as part of RFC 5336 in smptlib In-Reply-To: <1271877469.99.0.897777864709.issue8489@psf.upfronthosting.co.za> Message-ID: <1349624023.46.0.415880853389.issue8489@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- components: +email _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 17:36:15 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Oct 2012 15:36:15 +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: <1349624175.24.0.33207140938.issue15650@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Robin, why do you increment refcounter for type object on every construction of dbm instance? Also I would to see macros in uppercase if possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 17:59:39 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Oct 2012 15:59:39 +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: <3XZTt23SFszNtj@mail.python.org> Roundup Robot added the comment: New changeset cc3e27b7da41 by Andrew Svetlov in branch '2.7': Issue #14900: Distuguish call count and primitive call count in pstat output. http://hg.python.org/cpython/rev/cc3e27b7da41 New changeset 410e92589164 by Andrew Svetlov in branch '3.2': Issue #14900: Distuguish call count and primitive call count in pstat output. http://hg.python.org/cpython/rev/410e92589164 New changeset fb216fee32db by Andrew Svetlov in branch '3.3': Merge issue #14900: Distuguish call count and primitive call count in pstat output. http://hg.python.org/cpython/rev/fb216fee32db New changeset bc658b6a1d4e by Andrew Svetlov in branch 'default': Issue #14900: Distuguish call count and primitive call count in pstat output. http://hg.python.org/cpython/rev/bc658b6a1d4e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 18:02:38 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Oct 2012 16:02:38 +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: <1349625758.98.0.051963450143.issue14900@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I definitely agree with renaming "call count" to "primitive call count". Thank you for patch. BTW please fill Python Contributor Agreement: http://www.python.org/psf/contrib/ ---------- assignee: -> asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 18:15:16 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 07 Oct 2012 16:15:16 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349626516.39.0.990783478882.issue16113@psf.upfronthosting.co.za> Richard Oudkerk added the comment: _sha3 is not being built on Windows, so importing hashlib fails >>> import hashlib ERROR:root:code for hash sha3_224 was not found. Traceback (most recent call last): File "C:\Repos\cpython-dirty\lib\hashlib.py", line 109, in __get_openssl_constructor f = getattr(_hashlib, 'openssl_' + name) AttributeError: 'module' object has no attribute 'openssl_sha3_224' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Repos\cpython-dirty\lib\hashlib.py", line 154, in globals()[__func_name] = __get_hash(__func_name) File "C:\Repos\cpython-dirty\lib\hashlib.py", line 116, in __get_openssl_constructor return __get_builtin_constructor(name) File "C:\Repos\cpython-dirty\lib\hashlib.py", line 104, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha3_224 ... ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 18:16:55 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Oct 2012 16:16:55 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349626615.52.0.216238809355.issue16113@psf.upfronthosting.co.za> Christian Heimes added the comment: I've pushed a fix about 5 minutes ago. The module wasn't compiled in debug builds due to an error in the project file. Please update your copy and try again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 18:23:03 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Oct 2012 16:23:03 +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: <3XZVP25WGCzP7v@mail.python.org> Roundup Robot added the comment: New changeset 69b310f7acfa by Andrew Svetlov in branch '2.7': Issue #14900: Add aliases for sorting params for pstat to follow column names from pstat output. http://hg.python.org/cpython/rev/69b310f7acfa New changeset 511a3c51731e by Andrew Svetlov in branch '3.2': Issue #14900: Add aliases for sorting params for pstat to follow column names from pstat output. http://hg.python.org/cpython/rev/511a3c51731e New changeset 29d4ac311627 by Andrew Svetlov in branch '3.3': Merge issue #14900: Add aliases for sorting params for pstat to follow column names from pstat output. http://hg.python.org/cpython/rev/29d4ac311627 New changeset 7b8b1b30e5f8 by Andrew Svetlov in branch 'default': Merge issue #14900: Add aliases for sorting params for pstat to follow column names from pstat output. http://hg.python.org/cpython/rev/7b8b1b30e5f8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 18:24:40 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Oct 2012 16:24:40 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349627080.54.0.864445624119.issue16113@psf.upfronthosting.co.za> Christian Heimes added the comment: 6cf6b8265e57 and 8172cc8bfa6d have fixed the issue on my VM. I didn't noticed the issue as I only tested hashlib with the release builds, not the debug builds. Sorry for that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 18:24:50 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Oct 2012 16:24:50 +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: <1349627090.21.0.485310380113.issue14900@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I'm ok with aliases also. Issue with percall can be fixed only in 3.4 via renaming one of the column. Thanks again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 18:28:29 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Oct 2012 16:28:29 +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: <1349627309.88.0.274574202944.issue14900@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Documentation also need to be updated to reflect changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 18:43:30 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Oct 2012 16:43:30 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349628210.24.0.372719806403.issue16113@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 18:43:58 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 07 Oct 2012 16:43:58 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349628238.1.0.315654950718.issue16113@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > 6cf6b8265e57 and 8172cc8bfa6d have fixed the issue on my VM. I didn't > noticed the issue as I only tested hashlib with the release builds, not > the debug builds. Sorry for that. Ah. I did not even notice there was _sha3.vcxproj. Is there any particular reason for not making it part of python3.dll like _sha1, _sha256, _sha512 are? (I thought it was only modules with special link requirements that became separate DLLs.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 18:47:07 2012 From: report at bugs.python.org (Robin Schreiber) Date: Sun, 07 Oct 2012 16:47:07 +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: <1349628427.86.0.422773629318.issue15650@psf.upfronthosting.co.za> Robin Schreiber added the comment: PEP384 demands, among other things, that the TypeObjects themselves are transformed to Heaptypes. This means that the Typeobjects, that are created from this new stable ABI, reside within the heap and therefore have to be managed by the Python GC. This is of course done by appropriately incref- and decrefing of the specific Heaptype. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 18:54:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Oct 2012 16:54:12 +0000 Subject: [issue16157] Irrelevant references to Misc/News Message-ID: <1349628852.45.0.324394497616.issue16157@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Older versions (3.2 for 3.3, 3.2 and 3.3 for 3.4) whatsnew refers to Misc/News which contains changes only for currect version ("For full details, see the :source:`Misc/NEWS ` file."). http://docs.python.org/3.3/whatsnew/3.2.html http://docs.python.org/3.4/whatsnew/3.2.html http://docs.python.org/3.4/whatsnew/3.3.html ---------- assignee: docs at python components: Documentation messages: 172321 nosy: docs at python, serhiy.storchaka priority: normal severity: normal status: open title: Irrelevant references to Misc/News type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 19:00:40 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 07 Oct 2012 17:00:40 +0000 Subject: [issue16157] Irrelevant references to Misc/News In-Reply-To: <1349628852.45.0.324394497616.issue16157@psf.upfronthosting.co.za> Message-ID: <1349629240.52.0.00633688810599.issue16157@psf.upfronthosting.co.za> R. David Murray added the comment: The problem is that the source directive (from pyspecific in Sphinx) uses the 'current branch' for which the docs are being built. Probably we will have to hardcode the links rather than using the source directive. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 19:08:59 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Oct 2012 17:08:59 +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: <1349629739.35.0.714169644832.issue15650@psf.upfronthosting.co.za> Andrew Svetlov added the comment: >From my perspective type object is referenced by module state. While module is present it's state hold all types exposed by module. After module has deleted it's state has cleaned up and types has gone away ? thats look good to me. Instances of python classes (not extensions) hold ownership for it's class. I guess it done because python class can be constructed inside function and instance of this class should work after exit from that function like closure does. In case of extension modules enough to hold type reference into module state itself. Thoughts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 19:14:33 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Oct 2012 17:14:33 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1349630073.46.0.818681571301.issue16113@psf.upfronthosting.co.za> Christian Heimes added the comment: The module is rather large (about 190 KB) because the optimized SHA-3 implementation isn't optimized for size. For this reason I like to keep the module out of the main binary for now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 19:55:36 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 07 Oct 2012 17:55:36 +0000 Subject: [issue16158] sporadic test_multiprocessing failure Message-ID: <1349632536.58.0.00638810333077.issue16158@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Seen on a buildbot: ====================================================================== FAIL: test_mymanager_context_prestarted (test.test_multiprocessing.WithManagerTestMyManager) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Volumes/bay2/buildslave/cpython/3.3.snakebite-mountainlion-amd64/build/Lib/test/test_multiprocessing.py", line 1911, in test_mymanager_context_prestarted self.assertEqual(manager._process.exitcode, 0) AssertionError: None != 0 http://buildbot.python.org/all/builders/AMD64%20Mountain%20Lion%20%5BSB%5D%203.3/builds/35/steps/test/logs/stdio ---------- components: Library (Lib), Tests messages: 172325 nosy: pitrou, sbt, trent priority: normal severity: normal status: open title: sporadic test_multiprocessing failure type: behavior versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 19:56:36 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Oct 2012 17:56:36 +0000 Subject: [issue16155] Some minor doc fixes in Doc/faq In-Reply-To: <1349562552.07.0.641735051076.issue16155@psf.upfronthosting.co.za> Message-ID: <1349632596.68.0.753369284354.issue16155@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Doc corrections (can) go in all current docs. 1.2 - 1.0: same change "Hello" * 3: same change dir([]): shouldn't output be line-wrapped 3.3: same 3.2: delete __dir__, clear, copy, giving ['__add__', '__class__', '__contains__', '__delattr__', '__delitem__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__iadd__', '__imul__', '__init__', '__iter__', '__le__', '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__rmul__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', 'append', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort'] 2.7: same deletions, add __delslice__, __getslice__, __setslice__, giving ['__add__', '__class__', '__contains__', '__delattr__', '__delitem__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__iadd__', '__imul__', '__init__', '__iter__', '__le__', '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__rmul__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', 'append', 'clear', 'copy', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort'] # for 2.7, 3.2, delete clear, copy for >>> [d for d in dir([]) if '__' not in d] ['append', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort'] Change Boolean 0,1 outputs to False,True. This was done in most places when behavior was changed after booleans were added in 2.2, or you would see many more errors. This holdover in the faq is an oversight. In 3.3 and before, help() does not lead to a new pager/display on Windows, so I am not sure what you mean. I presume you are referring to the following. >>> help(L.append) Help on built-in function append: append(...) L.append(object) -> None -- append object to end >>> The above from 3.3, and same before, has a blank line that is not in the faq, so add it. It otherwise looks the same to me. ---------- versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 20:20:34 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 07 Oct 2012 18:20:34 +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: <1349634034.49.0.750902320299.issue15650@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 20:20:53 2012 From: report at bugs.python.org (Nikolay Bogoychev) Date: Sun, 07 Oct 2012 18:20:53 +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: <1349634053.48.0.224082556554.issue16099@psf.upfronthosting.co.za> Nikolay Bogoychev added the comment: Okay, here's a proper patch with documentation entry and test cases. Please review and comment ---------- Added file: http://bugs.python.org/file27476/robotparser.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 20:33:43 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Oct 2012 18:33:43 +0000 Subject: [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1349634823.63.0.424472829647.issue16154@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I consider some items to be errors. In any case, all current docs can be fixed. First, your questions as to what you did not fix. fsum: I personally would add the import visibly, but at least add it hidden, as Chris suggested. 171 >>> from filecmp import dircmp 172 >>> def print_diff_files(dcmp): 173 ... for name in dcmp.diff_files: 174 ... print("diff_file %s found in %s and %s" % (name, dcmp.left, 175 ... dcmp.right)) 176 ... for sub_dcmp in dcmp.subdirs.values(): 177 ... print_diff_files(sub_dcmp) 178 ... 179 >>> dcmp = dircmp('dir1', 'dir2') 180 >>> print_diff_files(dcmp) (copying from the repository view deletes whitespace) The import and def should run and should be tested. The last 2 lines should not be tested: add #doctest: SKIP to both. (I gather that Sphinx will strip this.) >>> width = 5 >>> for num in range(5,12): ... for base in 'dXob': ... print('{0:{width}{base}}'.format(num, base=base, width=width), end=' ') ... print() ... 5 5 5 101 6 6 6 110 7 7 7 111 8 8 10 1000 9 9 11 1001 10 A 12 1010 11 B 13 1011 I believe the problem here is the "end = ''" part. It puts a blank space at the end of each line, which got deleted when I pasted the above, which was cut from my local repository. Trailing blanks are *really* a problem and code that produces them is not a good example. I suggest changing width to 6, end to '', and adding '' to the beginning of each output line. It should then pass. ---------- type: enhancement -> behavior versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 20:44:50 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 07 Oct 2012 18:44:50 +0000 Subject: [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1349635490.64.0.970394412651.issue16154@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Trailing blanks are *really* a problem The NORMALIZE_WHITESPACE doctest directive is another option to deal with cases like these. It ignores whitespace-only differences between the actual and expected outputs. Does it pass with that directive? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 20:48:50 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Oct 2012 18:48:50 +0000 Subject: [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1349635730.07.0.230594142334.issue16154@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Now your patch: colorsys: same change all versions fractions: ditto Template: ditto I believe the changes I suggested for filecmp and the numbers should also be the same in all versions. ACKS: your name should be inserted in alpha order ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 20:58:05 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Oct 2012 18:58:05 +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: <1349636285.22.0.242721214234.issue16009@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 21:04:58 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Oct 2012 19:04:58 +0000 Subject: [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1349636698.63.0.884926974079.issue16154@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I considered the directive, but I mildly prefer the code change. end = ' ') guarantees a blank between fields even if one formats a too-large number end = '') does not add a blank to the end. end = '' if base == 'b' else ' ') does both (but depends on having a 'last field' condition. I actual practice, I might use the third option. However, if you do the commit, it is your choice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 21:07:50 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 07 Oct 2012 19:07:50 +0000 Subject: [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1349636870.6.0.092134954974.issue14783@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Any comments on the latest patch, in particular on the int() docstring? Especially you, Terry, as you created the issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 21:10:36 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 07 Oct 2012 19:10:36 +0000 Subject: [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1349637036.12.0.267200702039.issue16154@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I considered the directive, but I mildly prefer the code change. I just wanted to point the directive out as an available option (especially for Ravi if he does further patches like this). Either way is fine with me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 21:19:24 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Oct 2012 19:19:24 +0000 Subject: [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1349637564.6.0.654177445689.issue14783@psf.upfronthosting.co.za> Andrew Svetlov added the comment: LGTM ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 21:21:35 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Oct 2012 19:21:35 +0000 Subject: [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1349637695.33.0.0804582121446.issue14783@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I checked pretty carefully and it looks good to me. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 21:38:03 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Oct 2012 19:38:03 +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: <1349638683.53.0.154833349409.issue16129@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 21:42:59 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Oct 2012 19:42:59 +0000 Subject: [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349638979.42.0.976249277413.issue12947@psf.upfronthosting.co.za> Terry J. Reedy added the comment: http://docs.python.org/py3k/library/doctest.html#option-flags-and-directives has the improved version. Thanks. Here, the complete example text is more important than the hi-lites. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 21:43:41 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Oct 2012 19:43:41 +0000 Subject: [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1349639021.79.0.226840986789.issue16154@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Apparently, I should have suggested "# doctest: +SKIP". The #12947 fix to example directives being deleted from the directive examples came after the 3.3.0 release. Fixed examples are at http://docs.python.org/py3k/library/doctest.html#option-flags-and-directives ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 21:56:11 2012 From: report at bugs.python.org (Nikolay Bogoychev) Date: Sun, 07 Oct 2012 19:56:11 +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: <1349639771.29.0.293309541865.issue16099@psf.upfronthosting.co.za> Nikolay Bogoychev added the comment: Reformatted patch ---------- Added file: http://bugs.python.org/file27477/robotparser_reformatted.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 22:03:39 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Oct 2012 20:03:39 +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: <1349640219.21.0.829329418019.issue16099@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- keywords: +needs review stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 22:12:05 2012 From: report at bugs.python.org (Berker Peksag) Date: Sun, 07 Oct 2012 20:12:05 +0000 Subject: [issue16120] Use |yield from| in stdlib In-Reply-To: <1349281098.96.0.245155104268.issue16120@psf.upfronthosting.co.za> Message-ID: <1349640725.74.0.778696163144.issue16120@psf.upfronthosting.co.za> Berker Peksag added the comment: > Berker, could you possibly submit a Contributor Agreement Form? > Details at http://www.python.org/psf/contrib/ Jes?s, I just emailed the contributor agreement. > Does your patch take care of all "yield" in the stdlib? I found another one -- thanks to Serhiy's command. Patch attached. ---------- Added file: http://bugs.python.org/file27478/more-yield-from.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 22:21:25 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Oct 2012 20:21:25 +0000 Subject: [issue16120] Use |yield from| in stdlib In-Reply-To: <1349281098.96.0.245155104268.issue16120@psf.upfronthosting.co.za> Message-ID: <3XZbh446h3zP39@mail.python.org> Roundup Robot added the comment: New changeset 70d49694786c by Andrew Svetlov in branch 'default': Issue #16120: Use |yield from| in stdlib. http://hg.python.org/cpython/rev/70d49694786c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 22:26:27 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Oct 2012 20:26:27 +0000 Subject: [issue16120] Use |yield from| in stdlib In-Reply-To: <1349281098.96.0.245155104268.issue16120@psf.upfronthosting.co.za> Message-ID: <1349641587.54.0.239821461495.issue16120@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed, thanks. Interesting, I didn't thought ?yield from? can be applied to just list, not generator. But it works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 22:27:56 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Oct 2012 20:27:56 +0000 Subject: [issue14700] Integer overflow in classic string formatting In-Reply-To: <1335804926.58.0.135059540144.issue14700@psf.upfronthosting.co.za> Message-ID: <1349641676.45.0.678480522353.issue14700@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Only one comment. test_formatting_huge_precision should use not sys.maxsize, but _testcapi.INT_MAX. Other tests can use _testcapi.PY_SSIZE_T_MAX. I think this tests are worth to add for 3.3 and 3.4. Your old test for this bug (064c2d0483f8) actually does not test the bug on all plathforms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 22:31:25 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Oct 2012 20:31:25 +0000 Subject: [issue16120] Use |yield from| in stdlib In-Reply-To: <1349281098.96.0.245155104268.issue16120@psf.upfronthosting.co.za> Message-ID: <1349641885.39.0.74530740582.issue16120@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 22:35:40 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Oct 2012 20:35:40 +0000 Subject: [issue7330] PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A In-Reply-To: <1258314153.95.0.978747695294.issue7330@psf.upfronthosting.co.za> Message-ID: <1349642140.27.0.406538553329.issue7330@psf.upfronthosting.co.za> STINNER Victor added the comment: Updated patch: precision for "%s" and "%V" (if the first PyObject* argument is NULL) formats is now a number of bytes, rather than a number of characters. width is still always a number of character. The reason is that "%.100s" can be used for avoid a crash if the argument is not terminated by a null character (see issue #10833). ---------- Added file: http://bugs.python.org/file27479/unicode_fromformat_precision-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 22:40:31 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Oct 2012 20:40:31 +0000 Subject: [issue14700] Integer overflow in classic string formatting In-Reply-To: <1335804926.58.0.135059540144.issue14700@psf.upfronthosting.co.za> Message-ID: <1349642431.71.0.273976600248.issue14700@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks for reviewing. I was being lazy with the checks; I'll fix that. Agreed that it's worth forward porting the tests to 3.3 and 3.4; I'll do that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 23:06:37 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Oct 2012 21:06:37 +0000 Subject: [issue16153] PyUnicode_FromFormatV() must fail if the format string is invalid In-Reply-To: <1349560581.01.0.621984773801.issue16153@psf.upfronthosting.co.za> Message-ID: <1349643997.59.0.842005431398.issue16153@psf.upfronthosting.co.za> STINNER Victor added the comment: Updated patch: detect also invalid "%.s" format and update the documentation. > I don't know the reason for the previous behavior, but it's documented: Oh, I missed the doc. Fixed in the new patch. ---------- Added file: http://bugs.python.org/file27480/invalid_format-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 23:21:04 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Oct 2012 21:21:04 +0000 Subject: [issue14700] Integer overflow in classic string formatting In-Reply-To: <1335804926.58.0.135059540144.issue14700@psf.upfronthosting.co.za> Message-ID: <1349644864.59.0.89713603045.issue14700@psf.upfronthosting.co.za> STINNER Victor added the comment: For your information, I fixed recently PyUnicode_FromFormatV() to detect overflows on width and precision: changeset: 79543:d1369daeb9ec user: Victor Stinner date: Sat Oct 06 23:05:00 2012 +0200 files: Objects/unicodeobject.c description: Issue #16147: PyUnicode_FromFormatV() now detects integer overflow when parsing width and precision ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 23:37:06 2012 From: report at bugs.python.org (Arne Babenhauserheide) Date: Sun, 07 Oct 2012 21:37:06 +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: <1349645826.85.0.214019372518.issue14900@psf.upfronthosting.co.za> Arne Babenhauserheide added the comment: Copyright-assignment signed and sent. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 23:41:58 2012 From: report at bugs.python.org (Aditya Kedia) Date: Sun, 07 Oct 2012 21:41:58 +0000 Subject: [issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior In-Reply-To: <1322574123.12.0.756700598965.issue13498@psf.upfronthosting.co.za> Message-ID: <1349646117.99.0.0989974999537.issue13498@psf.upfronthosting.co.za> Aditya Kedia added the comment: Right.. Looks good. ---------- nosy: +TheAdityaKedia _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 00:05:29 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Oct 2012 22:05:29 +0000 Subject: [issue16036] simplify int() signature docs In-Reply-To: <1348568310.1.0.968219969881.issue16036@psf.upfronthosting.co.za> Message-ID: <3XZf090cGXzPFD@mail.python.org> Roundup Robot added the comment: New changeset e4598364ea29 by Chris Jerdonek in branch '3.2': Issue #14783: Improve int() docstring and also str(), range(), and slice(). http://hg.python.org/cpython/rev/e4598364ea29 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 00:05:30 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Oct 2012 22:05:30 +0000 Subject: [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <3XZf0969BszPFD@mail.python.org> Roundup Robot added the comment: New changeset e4598364ea29 by Chris Jerdonek in branch '3.2': Issue #14783: Improve int() docstring and also str(), range(), and slice(). http://hg.python.org/cpython/rev/e4598364ea29 New changeset 365da47a6dc1 by Chris Jerdonek in branch '3.3': Issue #14783: Merge changes from 3.2. http://hg.python.org/cpython/rev/365da47a6dc1 New changeset 3773c98d9da8 by Chris Jerdonek in branch 'default': Issue #14783: Merge changes from 3.3. http://hg.python.org/cpython/rev/3773c98d9da8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 00:09:56 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 07 Oct 2012 22:09:56 +0000 Subject: [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1349647796.51.0.34668579837.issue14783@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Leaving open to backport applicable portions to 2.7. I should get to that later today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 01:19:18 2012 From: report at bugs.python.org (jimbo1qaz) Date: Sun, 07 Oct 2012 23:19:18 +0000 Subject: [issue16159] Closing Debugger freezes IDLE shell Message-ID: <1349651958.95.0.104247306241.issue16159@psf.upfronthosting.co.za> New submission from jimbo1qaz: Open a Python file with IDLE and F5 it. Turn on debugger ([DEBUG ON]), F5 again ([DEBUG ON]), and close the debugger ([DEBUG OFF]). The shell is now completely locked and must be closed (with a 'The program is still running, want to kill it?' message). ---------- components: IDLE messages: 172352 nosy: jimbo1qaz priority: normal severity: normal status: open title: Closing Debugger freezes IDLE shell versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 01:21:07 2012 From: report at bugs.python.org (jimbo1qaz) Date: Sun, 07 Oct 2012 23:21:07 +0000 Subject: [issue16159] Closing Debugger freezes IDLE shell In-Reply-To: <1349651958.95.0.104247306241.issue16159@psf.upfronthosting.co.za> Message-ID: <1349652067.56.0.81939618482.issue16159@psf.upfronthosting.co.za> jimbo1qaz added the comment: I have confirmed that this happens on both 3.2 and .3, and it also happens when you close any active debug window. ---------- versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 02:14:19 2012 From: report at bugs.python.org (Roger Serwy) Date: Mon, 08 Oct 2012 00:14:19 +0000 Subject: [issue16159] Closing Debugger freezes IDLE shell In-Reply-To: <1349651958.95.0.104247306241.issue16159@psf.upfronthosting.co.za> Message-ID: <1349655259.12.0.177551529169.issue16159@psf.upfronthosting.co.za> Roger Serwy added the comment: Hi Jimbo, Clicking "quit" first avoids this problem, but I do agree that it does need to be fixed. This is also a duplicate of issue15348. I am closing this issue in favor of that one. Please feel free to add yourself to the nosy list on that issue. ---------- nosy: +serwy resolution: -> duplicate status: open -> closed superseder: -> IDLE - shell becomes unresponsive if debugger windows is closed while active. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 02:16:28 2012 From: report at bugs.python.org (jimbo1qaz) Date: Mon, 08 Oct 2012 00:16:28 +0000 Subject: [issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active. In-Reply-To: <1342208290.25.0.778184843655.issue15348@psf.upfronthosting.co.za> Message-ID: <1349655388.34.0.675613535687.issue15348@psf.upfronthosting.co.za> Changes by jimbo1qaz : ---------- nosy: +jimbo1qaz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 03:10:07 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Oct 2012 01:10:07 +0000 Subject: [issue16160] subclassing types.SimpleNamespace does not work Message-ID: <1349658607.29.0.0643105543226.issue16160@psf.upfronthosting.co.za> New submission from R. David Murray: Python 3.3.0+ (3.3:152d85b2da3a, Oct 6 2012, 13:17:54) [GCC 4.6.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from types import SimpleNamespace >>> class Foo(SimpleNamespace): ... pass ... >>> y = Foo(bar=8, foo=9) >>> y namespace() It doesn't work to define an __init__ method, either, which is what I really wanted to do. (I was subclassing to get the nice repr). ---------- messages: 172355 nosy: eric.snow, r.david.murray priority: normal severity: normal stage: needs patch status: open title: subclassing types.SimpleNamespace does not work type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 03:30:04 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 08 Oct 2012 01:30:04 +0000 Subject: [issue16160] subclassing types.SimpleNamespace does not work In-Reply-To: <1349658607.29.0.0643105543226.issue16160@psf.upfronthosting.co.za> Message-ID: <1349659804.56.0.14238314895.issue16160@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 03:30:38 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 08 Oct 2012 01:30:38 +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: <1349659838.32.0.822169987735.issue16129@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 03:36:04 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 08 Oct 2012 01:36:04 +0000 Subject: [issue15111] Wrong ImportError message with importlib In-Reply-To: <1340151446.59.0.121813331775.issue15111@psf.upfronthosting.co.za> Message-ID: <1349660164.64.0.659851635512.issue15111@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 04:13:07 2012 From: report at bugs.python.org (Mike Hoy) Date: Mon, 08 Oct 2012 02:13:07 +0000 Subject: [issue13691] pydoc help (or help('help')) should show the doc for help In-Reply-To: <1325406152.03.0.315132806833.issue13691@psf.upfronthosting.co.za> Message-ID: <1349662387.87.0.189601359601.issue13691@psf.upfronthosting.co.za> Changes by Mike Hoy : ---------- nosy: +mikehoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 04:21:45 2012 From: report at bugs.python.org (Mike Hoy) Date: Mon, 08 Oct 2012 02:21:45 +0000 Subject: [issue13691] pydoc help (or help('help')) should show the doc for help In-Reply-To: <1325406152.03.0.315132806833.issue13691@psf.upfronthosting.co.za> Message-ID: <1349662905.48.0.70435807429.issue13691@psf.upfronthosting.co.za> Mike Hoy added the comment: I imported this patch on 3.4 and it worked as expected on my system. help('help') brings up info about help() help(object) prints the docstring help() invokes the help ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 04:26:14 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Oct 2012 02:26:14 +0000 Subject: [issue16160] subclassing types.SimpleNamespace does not work In-Reply-To: <1349658607.29.0.0643105543226.issue16160@psf.upfronthosting.co.za> Message-ID: <1349663174.54.0.0309527766137.issue16160@psf.upfronthosting.co.za> Christian Heimes added the comment: I have verified that the __init__ function isn't executed when SimpleNamespace is subclasses. I guess that's happening: http://docs.python.org/py3k/c-api/typeobj.html?highlight=tp_init#PyTypeObject.tp_init "If the tp_new function returns an instance of some other type that is not a subtype of the original type, no tp_init function is called; if tp_new returns an instance of a subtype of the original type, the subtype?s tp_init is called." namespace_new always returns a namespace object no matter what. As namespace is not a subclass of the Foo (the other way around), the type check in type_call() fails and __init__ isn't called. The tp_new method needs a fix. That looks all wrong to me: >>> import types >>> class SubNS(types.SimpleNamespace): ... pass ... >>> SubNS.__new__(SubNS) namespace() That's about right: >>> class SubStr(str): ... pass ... >>> type(SubStr.__new__(SubStr)) ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 04:35:34 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Oct 2012 02:35:34 +0000 Subject: [issue13691] pydoc help (or help('help')) should show the doc for help In-Reply-To: <1325406152.03.0.315132806833.issue13691@psf.upfronthosting.co.za> Message-ID: <1349663734.79.0.243402186373.issue13691@psf.upfronthosting.co.za> ?ric Araujo added the comment: What about "pydoc help"? ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 05:29:47 2012 From: report at bugs.python.org (Mike Hoy) Date: Mon, 08 Oct 2012 03:29:47 +0000 Subject: [issue13691] pydoc help (or help('help')) should show the doc for help In-Reply-To: <1325406152.03.0.315132806833.issue13691@psf.upfronthosting.co.za> Message-ID: <1349666987.86.0.495357061921.issue13691@psf.upfronthosting.co.za> Mike Hoy added the comment: >> What about "pydoc help"? $ ./python -m pydoc help Help on built-in function help: help(...) Invoke the built-in help system. help() The interactive help system starts on the interpreter console. help(string) The string is looked up as the name of a module, function, class, method, keyword, or documentation topic, and a help page is printed on the console. help(object) Generates a help page on the given object. Or did you mean inside the interpreter? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 05:40:40 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Oct 2012 03:40:40 +0000 Subject: [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <3XZnQv0GnXzP6M@mail.python.org> Roundup Robot added the comment: New changeset 3b484f53f91b by Chris Jerdonek in branch '2.7': Issue #14783: Backport changes from 3.2. http://hg.python.org/cpython/rev/3b484f53f91b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 05:42:07 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 08 Oct 2012 03:42:07 +0000 Subject: [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1349667727.8.0.828638276454.issue14783@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 07:25:45 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 08 Oct 2012 05:25:45 +0000 Subject: [issue16155] Some minor doc fixes in Doc/faq In-Reply-To: <1349562552.07.0.641735051076.issue16155@psf.upfronthosting.co.za> Message-ID: <1349673945.69.0.643425071055.issue16155@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 07:48:38 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Oct 2012 05:48:38 +0000 Subject: [issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior In-Reply-To: <1322574123.12.0.756700598965.issue13498@psf.upfronthosting.co.za> Message-ID: <3XZrGZ1JrWzPHq@mail.python.org> Roundup Robot added the comment: New changeset 88a7b9c3b6c0 by Hynek Schlawack in branch '3.2': #13498: Clarify docs of os.makedirs()'s exist_ok argument. http://hg.python.org/cpython/rev/88a7b9c3b6c0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 08:14:58 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 08 Oct 2012 06:14:58 +0000 Subject: [issue13451] sched.py: speedup cancel() method In-Reply-To: <1321923822.73.0.49972384361.issue13451@psf.upfronthosting.co.za> Message-ID: <1349676898.83.0.0881072044152.issue13451@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 08:43:39 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Mon, 08 Oct 2012 06:43:39 +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: <1349678619.13.0.867631528524.issue16099@psf.upfronthosting.co.za> Changes by Hynek Schlawack : ---------- nosy: +hynek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 08:49:11 2012 From: report at bugs.python.org (Mike Hoy) Date: Mon, 08 Oct 2012 06:49:11 +0000 Subject: [issue12322] ElementPath 1.3 expressions documentation In-Reply-To: <1307959369.7.0.162667287307.issue12322@psf.upfronthosting.co.za> Message-ID: <1349678951.93.0.0724395657162.issue12322@psf.upfronthosting.co.za> Mike Hoy added the comment: It doesn't look like there are any errors to document. I'm attaching a patch that Patrick suggested. ---------- keywords: +patch Added file: http://bugs.python.org/file27481/issue12322_v1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 09:09:05 2012 From: report at bugs.python.org (Roger Serwy) Date: Mon, 08 Oct 2012 07:09:05 +0000 Subject: [issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active. In-Reply-To: <1342208290.25.0.778184843655.issue15348@psf.upfronthosting.co.za> Message-ID: <1349680145.73.0.596524654573.issue15348@psf.upfronthosting.co.za> Roger Serwy added the comment: Attached is a patch against 3.4 to solve the issue. The debugger was originally written for running IDLE without a subprocess. As a result, calls to idb.run() from Debugger.py would block until completed. If .interacting == 1 then clicking "X" would not close the debugger window. Once the debugger finishes, the .interacting flag would reset to 0, which then allows for the Debugger.close() method to destroy the debugger window. Clicking "Quit" is one way to have the debugger finish. When running *with* a subprocess, the idb.run() returns immediately, since it is using the IdbProxy object instead. As a consequence, the .interacting flag is also reset to 0 immediately despite the debugger still being active. Thus, clicking "X" would allow the debugger to close without properly stopping the debugger via clicking "Quit". A useful side-effect of the interactive debugger being active is that the PyShell.executing flag is set to true. When the debugger stops, the call to PyShell.endexecuting() from poll_subprocess() resets the .executing flag. The patch checks if PyShell's executing is true in order to prevent the Debugger Window from being closed by clicking "X". This makes the behavior is consistent with running the IDLE debugger without a subprocess. When running IDLE without a subprocess is fully removed (see issue16123), then maintaining the Debugger code will become simpler. Until then, testing against both code paths is necessary. ---------- keywords: +patch nosy: +asvetlov, terry.reedy Added file: http://bugs.python.org/file27482/issue15348.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 09:51:58 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 08 Oct 2012 07:51:58 +0000 Subject: [issue15833] most failures to write byte-compiled file no longer suppressed In-Reply-To: <1349606859.53.0.699931115322.issue15833@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Yes . > Charles, lest assume that all other issues with build system, are resolved and source tree is ready for use. So in this situation I could run python , I could build all and I could run tests with an additional patch TEMPDIR is relative to build tree (patch 0014-* from recent archive uploaded to issue #3754) . Note without you patch. > > In my build environment test_imp fail on test_source. > So what is result with you patch on this test ? Sorry, I'm not a native English speaker, and I don't understand what you're talking about. The issue at hand is that bytecode creation only catches EPERM and EEXIST, but other errors can be raised on a read-only filesystem (EROFS, EIO in some strange cases). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 10:25:59 2012 From: report at bugs.python.org (Gereon Kremer) Date: Mon, 08 Oct 2012 08:25:59 +0000 Subject: [issue11245] Implementation of IMAP IDLE in imaplib? In-Reply-To: <1298061371.03.0.0638918089315.issue11245@psf.upfronthosting.co.za> Message-ID: <1349684759.03.0.811008363656.issue11245@psf.upfronthosting.co.za> Gereon Kremer added the comment: I got the confirmation for my agreement. I'm not quite sure about the tests, as I'm not really familiar with the way this is done in cpython. The test_imaplib.py seems to cover all ways to connect to some server, but none of the actual imap commands. The patch only implements another commands (whose behaviour is highly/only dependent of other events on the server). Hence, I don't see a way to create a meaningfull test case other than just calling the command... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 10:27:40 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 08 Oct 2012 08:27:40 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <1349684860.36.0.14229318694.issue16115@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Proposed patch attached. I verified that the tests included in the patch pass on 2.7, 3.2, 3.3, and default (replacing FileNotFoundError with OSError as necessary). I also verified that the tests pass on Windows for default. The patch also includes improvements to the parts of Popen()'s documentation that relate to the added tests. The improvements simplify the documentation by more clearly separating the argument-specific documentation from the default/general behavior. Previously, certain general information was under various argument-specific paragraphs which made the documentation less clear. ---------- versions: +Python 2.7, Python 3.2 Added file: http://bugs.python.org/file27483/issue-16115-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 10:44:50 2012 From: report at bugs.python.org (Arne Babenhauserheide) Date: Mon, 08 Oct 2012 08:44:50 +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: <1349685890.35.0.244942565085.issue14900@psf.upfronthosting.co.za> Changes by Arne Babenhauserheide : Added file: http://bugs.python.org/file27484/profile-docs-3.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 10:45:07 2012 From: report at bugs.python.org (Arne Babenhauserheide) Date: Mon, 08 Oct 2012 08:45:07 +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: <1349685907.83.0.0323616875821.issue14900@psf.upfronthosting.co.za> Changes by Arne Babenhauserheide : Added file: http://bugs.python.org/file27485/profile-docs-2.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 11:06:24 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 08 Oct 2012 09:06:24 +0000 Subject: [issue16161] broken link to Visual Studio 2008 in devguide Message-ID: <1349687184.47.0.215855262473.issue16161@psf.upfronthosting.co.za> New submission from Chris Jerdonek: The link to Visual Studio 2008 in the devguide doesn't seem to work: http://docs.python.org/devguide/setup.html#windows https://www.microsoft.com/visualstudio/en-us/products/2008-editions/express This seems to be a better link: http://www.microsoft.com/en-us/download/details.aspx?id=14597 ---------- components: Devguide keywords: easy messages: 172367 nosy: chris.jerdonek, ezio.melotti priority: normal severity: normal stage: needs patch status: open title: broken link to Visual Studio 2008 in devguide type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 11:20:22 2012 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 08 Oct 2012 09:20:22 +0000 Subject: [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349688022.12.0.954761197777.issue12947@psf.upfronthosting.co.za> Nick Coghlan added the comment: Ah, I see the other examples Chris is talking about now. Yes, the workaround should be applied in those cases as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 11:35:37 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 08 Oct 2012 09:35:37 +0000 Subject: [issue16161] broken link to Visual Studio 2008 in devguide In-Reply-To: <1349687184.47.0.215855262473.issue16161@psf.upfronthosting.co.za> Message-ID: <1349688937.76.0.908265303839.issue16161@psf.upfronthosting.co.za> Chris Jerdonek added the comment: It might also be good to say that "vcsetup.exe" is the file you're supposed to download (as opposed to, say, "vcssetup.exe"). Strangely, the files aren't labeled, and they're listed in a different order from the text below. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 11:44:09 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 08 Oct 2012 09:44:09 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <1349689449.24.0.993556902336.issue16115@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I also checked the tests in the patch on Windows for 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 12:51:27 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 08 Oct 2012 10:51:27 +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: <1349693487.52.0.989821014022.issue14900@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Looks like you missed *sort* parameter for ".. function:: run(command, filename=None, sort=-1)" Also it will be nice to insert link to Stats.sort_stats in doc text for run functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 13:19:25 2012 From: report at bugs.python.org (=?utf-8?q?Marcus_Gr=C3=B6ber?=) Date: Mon, 08 Oct 2012 11:19:25 +0000 Subject: [issue15278] UnicodeDecodeError when readline in codecs.py In-Reply-To: <1341674319.29.0.269195397783.issue15278@psf.upfronthosting.co.za> Message-ID: <1349695165.83.0.945675667383.issue15278@psf.upfronthosting.co.za> Marcus Gr?ber added the comment: I came across this today as well. A short way of summarizing this error seems to be: Reading a file using readline (or "for line in file") fails, if the following two conditions are true: ? A codec (e.g. UTF-8) for a multi-byte encoding is used, and ? The first line of the file is at least 73 bytes long, and contains a multi-byte-sequence that starts before offset 72, and ends after offset 72 At least for UTF-8 input files, it may be possible to work around this by opening the input file without a codec, and then applying decode("utf-8") to each line. ---------- nosy: +Marcus.Gr?ber _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 13:53:07 2012 From: report at bugs.python.org (Michael Vogt) Date: Mon, 08 Oct 2012 11:53:07 +0000 Subject: [issue16162] Py_FileSystemDefaultEncoding should be updated on locale.setlocale() Message-ID: <1349697187.89.0.133420695321.issue16162@psf.upfronthosting.co.za> New submission from Michael Vogt: The Py_FileSystemDefaultEncoding is very static right now and only set on interpreter statup AFAICT. There appears to be no way to switch that later. I think that Py_FileSystemDefaultEncoding should get updated when locale.setlocale() is run automatically and attach a proof-of-concept patch for this. The reason is that if a python application is started without a environment (dbus activation will do that for example) its impossible to work with utf8 encoded filenames. The only workaround is to setup a environment and then os.execv() which seems not ideal. ---------- components: Unicode files: alllow-chaning-of-Py_FileSystemDefaultEncoding.diff keywords: patch messages: 172373 nosy: ezio.melotti, mvo priority: normal severity: normal status: open title: Py_FileSystemDefaultEncoding should be updated on locale.setlocale() versions: Python 3.2 Added file: http://bugs.python.org/file27486/alllow-chaning-of-Py_FileSystemDefaultEncoding.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 13:54:06 2012 From: report at bugs.python.org (Berker Peksag) Date: Mon, 08 Oct 2012 11:54:06 +0000 Subject: [issue16163] Wrong name in Lib/pkgutil.py:iter_importers Message-ID: <1349697246.97.0.772309039282.issue16163@psf.upfronthosting.co.za> New submission from Berker Peksag: Name "pkg" is not defined. Related changeset: http://hg.python.org/cpython/rev/3987667bf98f#l2.89 ---------- components: Library (Lib) files: pkgutil-name.diff keywords: patch messages: 172374 nosy: berker.peksag priority: normal severity: normal status: open title: Wrong name in Lib/pkgutil.py:iter_importers versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27487/pkgutil-name.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 13:58:20 2012 From: report at bugs.python.org (Alexander Belchenko) Date: Mon, 08 Oct 2012 11:58:20 +0000 Subject: [issue16164] there is no easy way to force unittest.main to use stdout rather than stderr Message-ID: <1349697500.62.0.333745951917.issue16164@psf.upfronthosting.co.za> New submission from Alexander Belchenko: Why by default unittest.main (which uses unittest.TextTestRunner) prints everything to stderr. What the reason behind this behavior? It makes very inconvenient to run big test suite with less, i.e. python test.py | less or python test.py > test.log does not show me failed tests. They all go to stderr. Why? Another thing: there is no easy way to override this. I have to subclass either TestProgram or TextTestRunner and force sys.stdout rather than sys.stderr. E.g. class TestProgram(unittest.TestProgram): def runTests(self): if self.testRunner is None: self.testRunner = unittest.TextTestRunner(stream=sys.stdout, verbosity=self.verbosity) result = self.testRunner.run(self.test) sys.exit(not result.wasSuccessful()) if __name__ == '__main__': TestProgram() Although it works for me I feel there is something wrong. Am I the only person who needs test output on stdout? ---------- components: Library (Lib) messages: 172375 nosy: bialix priority: normal severity: normal status: open title: there is no easy way to force unittest.main to use stdout rather than stderr type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 14:05:24 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Oct 2012 12:05:24 +0000 Subject: [issue16165] sched.scheduler.run() blocks scheduler Message-ID: <1349697924.22.0.927523590696.issue16165@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: sched.scheduler.run() blocks scheduler and prevents the addition of new events until all events added before start will not be processed. Canceling does not work too. Here is test script which reproduces the behavior differences. Output in Python 3.2: Adding adding 0 added 0 adding 1 added 1 adding 2 added 2 event 0 event 1 start event event 2 Canceling Output in Python 3.3: Adding adding 0 start event added 0 adding 1 added 1 adding 2 added 2 Canceling event 0 event 1 event 2 Traceback (most recent call last): File "schedtest.py", line 20, in s.cancel(e) File "/home/serhiy/py/cpython/Lib/sched.py", line 93, in cancel self._queue.remove(event) ValueError: list.remove(x): x not in list ---------- components: Library (Lib) files: schedtest.py keywords: 3.3regression messages: 172376 nosy: giampaolo.rodola, pitrou, serhiy.storchaka priority: normal severity: normal status: open title: sched.scheduler.run() blocks scheduler type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27488/schedtest.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 14:08:29 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Oct 2012 12:08:29 +0000 Subject: [issue13451] sched.py: speedup cancel() method In-Reply-To: <1321923822.73.0.49972384361.issue13451@psf.upfronthosting.co.za> Message-ID: <1349698109.13.0.196254933409.issue13451@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In principle this is the right approach. But the time of enter() is increased by 20%. Here is updated and slightly optimized patch that restores enter() performance (but a little slow down cancel()). Because enter() is executed for each event and cancel() is not, and enter's gain greater cancel's loss, I think it is a very profitable exchange. ---------- nosy: +serhiy.storchaka Added file: http://bugs.python.org/file27489/cancel_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 14:47:33 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Oct 2012 12:47:33 +0000 Subject: [issue16161] broken link to Visual Studio 2008 in devguide In-Reply-To: <1349687184.47.0.215855262473.issue16161@psf.upfronthosting.co.za> Message-ID: <1349700453.2.0.582652246971.issue16161@psf.upfronthosting.co.za> Christian Heimes added the comment: Meh, MS likes to invalidate or alter the meaning of an URL. Have you verified that vcsetup.exe is the right thing? I *guess* that vcsetup stands for "Visual C++ setup" and vcssetup for "Visual C Sharp Setup" but I'm not sure about it. ---------- assignee: -> docs at python nosy: +christian.heimes, docs at python versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 15:08:20 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Oct 2012 13:08:20 +0000 Subject: [issue16165] sched.scheduler.run() blocks scheduler In-Reply-To: <1349697924.22.0.927523590696.issue16165@psf.upfronthosting.co.za> Message-ID: <1349701700.43.0.616931167575.issue16165@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch that releases lock for other threads. ---------- keywords: +patch Added file: http://bugs.python.org/file27490/sched_unblock.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 15:39:52 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 08 Oct 2012 13:39:52 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <1349703592.3.0.594010052441.issue16115@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Hmm, I dislike "Normally, *args* should be a sequence." >From my perspective better to say something like: *args* should be a sequence if *shell* is *False* or string of *shell* is *True* or something like this. I would to directly recommend reader to follow that schema, see also http://bugs.python.org/issue7839 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 16:33:27 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Oct 2012 14:33:27 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform Message-ID: <1349706807.82.0.556520783402.issue16166@psf.upfronthosting.co.za> New submission from Christian Heimes: I propose the addition of three new macros in pyport.h #define PY_LITTLE_ENDIAN 1234 #define PY_BIG_ENDIAN 4321 #define PY_BYTE_ORDER that are either set by a configure test or implemented like brg_endian.h. pyconfig.h has WORDS_BIGENDIAN which just checks for __BIG_ENDIAN__. The sysmodule has its own C code that checks the first byte of a long to detect the endianess. http://hg.python.org/cpython/file/dd5e98ddcd39/Modules/_sha3/keccak/brg_endian.h I'd like to remove Keccak's brg_endian.h (#16113 SHA-3 module) for something more official and useful to other code. I had to re-add the file because the tests were failing on a big endian Solaris (Sparc) machine. ---------- components: Build messages: 172381 nosy: christian.heimes priority: normal severity: normal stage: needs patch status: open title: Add PY_BYTE_ORDER macro to get endianess of platform type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 16:33:55 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Oct 2012 14:33:55 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349706807.82.0.556520783402.issue16166@psf.upfronthosting.co.za> Message-ID: <1349706835.75.0.412782794319.issue16166@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- dependencies: +Add SHA-3 (Keccak) support nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 16:37:22 2012 From: report at bugs.python.org (Arne Babenhauserheide) Date: Mon, 08 Oct 2012 14:37:22 +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: <1349707042.04.0.781065034873.issue14900@psf.upfronthosting.co.za> Changes by Arne Babenhauserheide : Added file: http://bugs.python.org/file27491/sort-argument-2.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 16:37:53 2012 From: report at bugs.python.org (Arne Babenhauserheide) Date: Mon, 08 Oct 2012 14:37:53 +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: <1349707073.25.0.406063331677.issue14900@psf.upfronthosting.co.za> Changes by Arne Babenhauserheide : Added file: http://bugs.python.org/file27492/sort-argument-3.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 16:42:39 2012 From: report at bugs.python.org (Arne Babenhauserheide) Date: Mon, 08 Oct 2012 14:42:39 +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: <1349707359.09.0.876518128812.issue14900@psf.upfronthosting.co.za> Arne Babenhauserheide added the comment: Jepp, I missed that. I hope the added patches clear that up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 16:42:58 2012 From: report at bugs.python.org (Arne Babenhauserheide) Date: Mon, 08 Oct 2012 14:42:58 +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: <1349707378.34.0.44281875656.issue14900@psf.upfronthosting.co.za> Changes by Arne Babenhauserheide : Removed file: http://bugs.python.org/file27492/sort-argument-3.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 16:47:47 2012 From: report at bugs.python.org (Arne Babenhauserheide) Date: Mon, 08 Oct 2012 14:47:47 +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: <1349707667.72.0.141333139678.issue14900@psf.upfronthosting.co.za> Changes by Arne Babenhauserheide : Added file: http://bugs.python.org/file27493/sort-argument-3.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 16:50:40 2012 From: report at bugs.python.org (Arne Babenhauserheide) Date: Mon, 08 Oct 2012 14:50:40 +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: <1349707840.48.0.828697018032.issue14900@psf.upfronthosting.co.za> Changes by Arne Babenhauserheide : Removed file: http://bugs.python.org/file27491/sort-argument-2.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 16:50:49 2012 From: report at bugs.python.org (Arne Babenhauserheide) Date: Mon, 08 Oct 2012 14:50:49 +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: <1349707849.67.0.0120080599932.issue14900@psf.upfronthosting.co.za> Changes by Arne Babenhauserheide : Added file: http://bugs.python.org/file27494/sort-argument-2.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 17:07:51 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Oct 2012 15:07:51 +0000 Subject: [issue11245] Implementation of IMAP IDLE in imaplib? In-Reply-To: <1298061371.03.0.0638918089315.issue11245@psf.upfronthosting.co.za> Message-ID: <1349708871.44.0.320415633736.issue11245@psf.upfronthosting.co.za> R. David Murray added the comment: Yeah writing a good test case for this is a bit tricky, since we'll need some infrastructure (an Event?) so we can prove that the call has blocked without delaying the test for very long. I'm not sure when I'll be able to get to this...I'm not going to check it in without a test, so I'll have to find enough time to be able to write the tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 17:10:47 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Oct 2012 15:10:47 +0000 Subject: [issue16162] Py_FileSystemDefaultEncoding should be updated on locale.setlocale() In-Reply-To: <1349697187.89.0.133420695321.issue16162@psf.upfronthosting.co.za> Message-ID: <1349709047.81.0.560816652367.issue16162@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +haypo, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 17:12:20 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Oct 2012 15:12:20 +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: <1349709140.44.0.254851352577.issue16163@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 17:20:02 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Oct 2012 15:20:02 +0000 Subject: [issue16164] there is no easy way to force unittest.main to use stdout rather than stderr In-Reply-To: <1349697500.62.0.333745951917.issue16164@psf.upfronthosting.co.za> Message-ID: <1349709602.66.0.743961167115.issue16164@psf.upfronthosting.co.za> R. David Murray added the comment: I think the reason is that this enables you to easily see if the tests generate any output to stdout. This was important when unittest was introduced into python, because some of our tests at that time were still written to check the stdout output against "known good" output, and in the process of converting them we would make sure that stdout was empty after the unittest run. Those tests have all been converted a fairly long time ago now. It is an interesting question whether this decision could be revisited. The problem is that there may well be other people depending on the current behavior, which many people may view as the correct behavior. I myself am neutral on the question, though I have experienced the annoyance of having to run unittest twice when I forget that the output goes to stderr...the second time to do the equivalent of 'python test.py 2>&1 | less'. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 17:20:20 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 08 Oct 2012 15:20: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: <1349709620.77.0.355736189997.issue14900@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Sorry, I cannot figure out what hg repo version should I use to apply sort-argument* patches. Can you prepare 2 cumulative patches for 2.7 and 3.2 which can be applied to current repo state? It's CPython team policy to send patches which can be applied to pure repo if no other rule explicitly specified. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 17:20:47 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Oct 2012 15:20:47 +0000 Subject: [issue16164] there is no easy way to force unittest.main to use stdout rather than stderr In-Reply-To: <1349697500.62.0.333745951917.issue16164@psf.upfronthosting.co.za> Message-ID: <1349709647.01.0.705634953151.issue16164@psf.upfronthosting.co.za> R. David Murray added the comment: I'm pretty sure this should be closed as "won't fix" or "invalid", but I'll leave that to Michael, who is the current maintainer of unittest. ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 17:25:16 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 08 Oct 2012 15:25:16 +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: <1349709916.27.0.0968275432465.issue16163@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks for the report and patch. Can you also provide a test that fails using the current code (and that passes with the patch applied)? ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 17:40:45 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 08 Oct 2012 15:40:45 +0000 Subject: [issue16161] broken link to Visual Studio 2008 in devguide In-Reply-To: <1349687184.47.0.215855262473.issue16161@psf.upfronthosting.co.za> Message-ID: <1349710845.35.0.528332947611.issue16161@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Have you verified that vcsetup.exe is the right thing? I *guess* that vcsetup stands for "Visual C++ setup" and vcssetup for "Visual C Sharp Setup" but I'm not sure about it. Yes, after choosing wrong the first time (based partly on the ordering relative to the accompanying text). And yes, your guess is correct. Incidentally, it was also odd that the VS executable wasn't obvious to locate. After installing, only the "VS 2008 Remote Debugger" showed up in the Start menu. The VS executable I found only in "Microsoft Visual Studio 9.0\Common7\IDE\VCExpress.exe" and not in the "Microsoft Visual Studio 9.0\Microsoft Visual C++ 2008 Express Edition..." folder. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 17:43:22 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 08 Oct 2012 15:43:22 +0000 Subject: [issue16162] Py_FileSystemDefaultEncoding should be updated on locale.setlocale() In-Reply-To: <1349697187.89.0.133420695321.issue16162@psf.upfronthosting.co.za> Message-ID: <1349711002.3.0.960636128072.issue16162@psf.upfronthosting.co.za> Martin v. L?wis added the comment: It actually *is* possible to work with UTF-8-encoded file names even in an ASCII locale. It should work automatically, using the PEP 383 mechanism. I'm -0 on allowing changes to the file system encoding. It may lead to mojibake, if some file names were read from the file system before the locale was changed, and then accessed later. I don't understand why you think that it is, in some cases, impossible to pass environment variables. In case of dbus activiation, it is surely possible to pass environment variables somehow. The easiest solution should be to put #!/bin/sh s='''' LANG=en_US.UTF-8 exec /usr/bin/python $0 "$@" ''' into the beginning of the script. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 17:46:36 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Oct 2012 15:46:36 +0000 Subject: [issue16162] Py_FileSystemDefaultEncoding should be updated on locale.setlocale() In-Reply-To: <1349709047.85.0.0352630701705.issue16162@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > I think that Py_FileSystemDefaultEncoding should get updated when locale.setlocale() is run automatically This is not a good idea. The two following expressions must be True on UNIX: os.fsencode(os.fsdecode(name)) == name os.fsdecode(os.fsencode(name)) == name Said differently: if you change the filesystem encoding, you cannot encode or decode (depending on the type, str or bytes) back the filename. For example, sys.path is a list of filenames filled in an early stage of Python initialization. If you change the filesystem encoding after this list is filled, you may fail to import modules. See also this thread: http://mail.python.org/pipermail/python-dev/2010-October/104509.html -- If you want to change the locale encoding, please do it outside Python (before running Python), and then don't change it again! Example on Ubuntu: $ LC_CTYPE=fr_FR.iso885915 at euro python -c 'import sys; print(sys.getfilesystemencoding())' ISO-8859-15 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 18:07:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Oct 2012 16:07:16 +0000 Subject: [issue15278] UnicodeDecodeError when readline in codecs.py In-Reply-To: <1341674319.29.0.269195397783.issue15278@psf.upfronthosting.co.za> Message-ID: <1349712436.61.0.128882855492.issue15278@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This error happens due to the fact that utf16* decoders do not properly partial decode truncated data. Exception raised if input data truncated on the second surrogate in the surrogate pair. For example codecs.utf_16_le_decode(b'\x00\xd8\x00') should return ('', 0), but raises UnicodeDecodeError. ---------- components: +Unicode -Library (Lib) nosy: +ezio.melotti, serhiy.storchaka versions: +Python 3.3, Python 3.4 -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 18:10:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Oct 2012 16:10:09 +0000 Subject: [issue15278] UnicodeDecodeError when readline in codecs.py In-Reply-To: <1349712436.61.0.128882855492.issue15278@psf.upfronthosting.co.za> Message-ID: <201210081909.42332.storchaka@gmail.com> Serhiy Storchaka added the comment: Here are the patches. ---------- keywords: +patch Added file: http://bugs.python.org/file27495/utf16_partial_decode-3.3.patch Added file: http://bugs.python.org/file27496/utf16_partial_decode-3.2.patch Added file: http://bugs.python.org/file27497/utf16_partial_decode-2.7.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r 0d41a1b4c4fe Lib/test/test_codecs.py --- a/Lib/test/test_codecs.py Mon Oct 08 07:46:11 2012 +0200 +++ b/Lib/test/test_codecs.py Mon Oct 08 18:26:34 2012 +0300 @@ -330,7 +330,7 @@ def test_partial(self): self.check_partial( - "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", [ "", # first byte of BOM read "", # second byte of BOM read @@ -352,6 +352,10 @@ "\x00\xff\u0100", "\x00\xff\u0100", "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", ] ) @@ -386,7 +390,7 @@ def test_partial(self): self.check_partial( - "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", [ "", "", @@ -404,6 +408,10 @@ "\x00\xff\u0100", "\x00\xff\u0100", "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", ] ) @@ -426,7 +434,7 @@ def test_partial(self): self.check_partial( - "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", [ "", "", @@ -444,6 +452,10 @@ "\x00\xff\u0100", "\x00\xff\u0100", "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", ] ) @@ -494,7 +506,7 @@ def test_partial(self): self.check_partial( - "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", [ "", # first byte of BOM read "", # second byte of BOM read => byteorder known @@ -506,6 +518,10 @@ "\x00\xff\u0100", "\x00\xff\u0100", "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", ] ) @@ -543,7 +559,7 @@ def test_partial(self): self.check_partial( - "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", [ "", "\x00", @@ -553,6 +569,10 @@ "\x00\xff\u0100", "\x00\xff\u0100", "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", ] ) @@ -582,7 +602,7 @@ def test_partial(self): self.check_partial( - "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", [ "", "\x00", @@ -592,6 +612,10 @@ "\x00\xff\u0100", "\x00\xff\u0100", "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", ] ) @@ -621,7 +645,7 @@ def test_partial(self): self.check_partial( - "\x00\xff\u07ff\u0800\uffff", + "\x00\xff\u07ff\u0800\uffff\U00010000", [ "\x00", "\x00", @@ -634,6 +658,10 @@ "\x00\xff\u07ff\u0800", "\x00\xff\u07ff\u0800", "\x00\xff\u07ff\u0800\uffff", + "\x00\xff\u07ff\u0800\uffff", + "\x00\xff\u07ff\u0800\uffff", + "\x00\xff\u07ff\u0800\uffff", + "\x00\xff\u07ff\u0800\uffff\U00010000", ] ) @@ -812,7 +840,7 @@ def test_partial(self): self.check_partial( - "\ufeff\x00\xff\u07ff\u0800\uffff", + "\ufeff\x00\xff\u07ff\u0800\uffff\U00010000", [ "", "", @@ -831,6 +859,10 @@ "\ufeff\x00\xff\u07ff\u0800", "\ufeff\x00\xff\u07ff\u0800", "\ufeff\x00\xff\u07ff\u0800\uffff", + "\ufeff\x00\xff\u07ff\u0800\uffff", + "\ufeff\x00\xff\u07ff\u0800\uffff", + "\ufeff\x00\xff\u07ff\u0800\uffff", + "\ufeff\x00\xff\u07ff\u0800\uffff\U00010000", ] ) diff -r 0d41a1b4c4fe Objects/unicodeobject.c --- a/Objects/unicodeobject.c Mon Oct 08 07:46:11 2012 +0200 +++ b/Objects/unicodeobject.c Mon Oct 08 18:26:34 2012 +0300 @@ -5143,8 +5143,11 @@ /* The remaining input chars are ignored if the callback chooses to skip the input */ case 1: + q -= 2; + if (consumed) + goto End; errmsg = "unexpected end of data"; - startinpos = ((const char *)q) - 2 - starts; + startinpos = ((const char *)q) - starts; endinpos = ((const char *)e) - starts; break; case 2: -------------- next part -------------- diff -r 88a7b9c3b6c0 Lib/test/test_codecs.py --- a/Lib/test/test_codecs.py Sun Oct 07 18:04:38 2012 +0200 +++ b/Lib/test/test_codecs.py Mon Oct 08 18:32:00 2012 +0300 @@ -313,7 +313,7 @@ def test_partial(self): self.check_partial( - "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", [ "", # first byte of BOM read "", # second byte of BOM read @@ -335,6 +335,10 @@ "\x00\xff\u0100", "\x00\xff\u0100", "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", ] ) @@ -369,7 +373,7 @@ def test_partial(self): self.check_partial( - "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", [ "", "", @@ -387,6 +391,10 @@ "\x00\xff\u0100", "\x00\xff\u0100", "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", ] ) @@ -409,7 +417,7 @@ def test_partial(self): self.check_partial( - "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", [ "", "", @@ -427,6 +435,10 @@ "\x00\xff\u0100", "\x00\xff\u0100", "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", ] ) @@ -477,7 +489,7 @@ def test_partial(self): self.check_partial( - "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", [ "", # first byte of BOM read "", # second byte of BOM read => byteorder known @@ -489,6 +501,10 @@ "\x00\xff\u0100", "\x00\xff\u0100", "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", ] ) @@ -526,7 +542,7 @@ def test_partial(self): self.check_partial( - "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", [ "", "\x00", @@ -536,6 +552,10 @@ "\x00\xff\u0100", "\x00\xff\u0100", "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", ] ) @@ -565,7 +585,7 @@ def test_partial(self): self.check_partial( - "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", [ "", "\x00", @@ -575,6 +595,10 @@ "\x00\xff\u0100", "\x00\xff\u0100", "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff", + "\x00\xff\u0100\uffff\U00010000", ] ) @@ -604,7 +628,7 @@ def test_partial(self): self.check_partial( - "\x00\xff\u07ff\u0800\uffff", + "\x00\xff\u07ff\u0800\uffff\U00010000", [ "\x00", "\x00", @@ -617,6 +641,10 @@ "\x00\xff\u07ff\u0800", "\x00\xff\u07ff\u0800", "\x00\xff\u07ff\u0800\uffff", + "\x00\xff\u07ff\u0800\uffff", + "\x00\xff\u07ff\u0800\uffff", + "\x00\xff\u07ff\u0800\uffff", + "\x00\xff\u07ff\u0800\uffff\U00010000", ] ) @@ -690,7 +718,7 @@ def test_partial(self): self.check_partial( - "\ufeff\x00\xff\u07ff\u0800\uffff", + "\ufeff\x00\xff\u07ff\u0800\uffff\U00010000", [ "", "", @@ -709,6 +737,10 @@ "\ufeff\x00\xff\u07ff\u0800", "\ufeff\x00\xff\u07ff\u0800", "\ufeff\x00\xff\u07ff\u0800\uffff", + "\ufeff\x00\xff\u07ff\u0800\uffff", + "\ufeff\x00\xff\u07ff\u0800\uffff", + "\ufeff\x00\xff\u07ff\u0800\uffff", + "\ufeff\x00\xff\u07ff\u0800\uffff\U00010000", ] ) diff -r 88a7b9c3b6c0 Objects/unicodeobject.c --- a/Objects/unicodeobject.c Sun Oct 07 18:04:38 2012 +0200 +++ b/Objects/unicodeobject.c Mon Oct 08 18:32:00 2012 +0300 @@ -3572,8 +3572,11 @@ /* UTF-16 code pair: */ if (e - q < 2) { + q -= 2; + if (consumed) + break; errmsg = "unexpected end of data"; - startinpos = (((const char *)q) - 2) - starts; + startinpos = ((const char *)q) - starts; endinpos = ((const char *)e) - starts; goto utf16Error; } -------------- next part -------------- diff -r 3b484f53f91b Lib/test/test_codecs.py --- a/Lib/test/test_codecs.py Sun Oct 07 20:37:54 2012 -0700 +++ b/Lib/test/test_codecs.py Mon Oct 08 18:46:38 2012 +0300 @@ -281,7 +281,7 @@ def test_partial(self): self.check_partial( - u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff\U00010000", [ u"", # first byte of BOM read u"", # second byte of BOM read @@ -303,6 +303,10 @@ u"\x00\xff\u0100", u"\x00\xff\u0100", u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff\U00010000", ] ) @@ -331,7 +335,7 @@ def test_partial(self): self.check_partial( - u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff\U00010000", [ u"", u"", @@ -349,6 +353,10 @@ u"\x00\xff\u0100", u"\x00\xff\u0100", u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff\U00010000", ] ) @@ -371,7 +379,7 @@ def test_partial(self): self.check_partial( - u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff\U00010000", [ u"", u"", @@ -389,6 +397,10 @@ u"\x00\xff\u0100", u"\x00\xff\u0100", u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff\U00010000", ] ) @@ -439,7 +451,7 @@ def test_partial(self): self.check_partial( - u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff\U00010000", [ u"", # first byte of BOM read u"", # second byte of BOM read => byteorder known @@ -451,6 +463,10 @@ u"\x00\xff\u0100", u"\x00\xff\u0100", u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff\U00010000", ] ) @@ -481,7 +497,7 @@ def test_partial(self): self.check_partial( - u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff\U00010000", [ u"", u"\x00", @@ -491,6 +507,10 @@ u"\x00\xff\u0100", u"\x00\xff\u0100", u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff\U00010000", ] ) @@ -514,7 +534,7 @@ def test_partial(self): self.check_partial( - u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff\U00010000", [ u"", u"\x00", @@ -524,6 +544,10 @@ u"\x00\xff\u0100", u"\x00\xff\u0100", u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff", + u"\x00\xff\u0100\uffff\U00010000", ] ) @@ -547,7 +571,7 @@ def test_partial(self): self.check_partial( - u"\x00\xff\u07ff\u0800\uffff", + u"\x00\xff\u07ff\u0800\uffff\U00010000", [ u"\x00", u"\x00", @@ -560,6 +584,10 @@ u"\x00\xff\u07ff\u0800", u"\x00\xff\u07ff\u0800", u"\x00\xff\u07ff\u0800\uffff", + u"\x00\xff\u07ff\u0800\uffff", + u"\x00\xff\u07ff\u0800\uffff", + u"\x00\xff\u07ff\u0800\uffff", + u"\x00\xff\u07ff\u0800\uffff\U00010000", ] ) @@ -619,7 +647,7 @@ def test_partial(self): self.check_partial( - u"\ufeff\x00\xff\u07ff\u0800\uffff", + u"\ufeff\x00\xff\u07ff\u0800\uffff\U00010000", [ u"", u"", @@ -638,6 +666,10 @@ u"\ufeff\x00\xff\u07ff\u0800", u"\ufeff\x00\xff\u07ff\u0800", u"\ufeff\x00\xff\u07ff\u0800\uffff", + u"\ufeff\x00\xff\u07ff\u0800\uffff", + u"\ufeff\x00\xff\u07ff\u0800\uffff", + u"\ufeff\x00\xff\u07ff\u0800\uffff", + u"\ufeff\x00\xff\u07ff\u0800\uffff\U00010000", ] ) diff -r 3b484f53f91b Objects/unicodeobject.c --- a/Objects/unicodeobject.c Sun Oct 07 20:37:54 2012 -0700 +++ b/Objects/unicodeobject.c Mon Oct 08 18:46:38 2012 +0300 @@ -2565,8 +2565,11 @@ /* UTF-16 code pair: */ if (e - q < 2) { + q -= 2; + if (consumed) + break; errmsg = "unexpected end of data"; - startinpos = (((const char *)q)-2)-starts; + startinpos = ((const char *)q)-starts; endinpos = ((const char *)e)-starts; goto utf16Error; } From report at bugs.python.org Mon Oct 8 18:13:16 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 08 Oct 2012 16:13:16 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <1349712796.63.0.508511729142.issue16115@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks for the good suggestion and pointer to the relevant discussion, Andrew. I agree re: the sentence beginning with "normally." Incidentally, that was existing language that I had preserved. I'm attaching an updated patch that incorporates your suggestion. ---------- stage: test needed -> patch review Added file: http://bugs.python.org/file27498/issue-16115-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 18:22:15 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 08 Oct 2012 16:22:15 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <1349713335.55.0.193291750354.issue16115@psf.upfronthosting.co.za> Andrew Svetlov added the comment: LGTM. Thanks, Chris. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 18:45:36 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Oct 2012 16:45:36 +0000 Subject: [issue16162] Py_FileSystemDefaultEncoding should be updated on locale.setlocale() In-Reply-To: <1349697187.89.0.133420695321.issue16162@psf.upfronthosting.co.za> Message-ID: <1349714736.06.0.963338905731.issue16162@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 18:48:31 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Oct 2012 16:48:31 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349706807.82.0.556520783402.issue16166@psf.upfronthosting.co.za> Message-ID: <1349714911.58.0.736450407844.issue16166@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I agree, it is worth bring order to work with endianess. We can get rod of BYTEORDER_IS_BIG_ENDIAN and BYTEORDER_IS_LITTLE_ENDIAN in Objects/unicodeobject.c, IS_LITTLE_ENDIAN in Objects/longobject.c, tests in other modules. I don't see the necessity in new macros. WORDS_BIGENDIAN is enough. If something failing on a big endian Solaris, build script should just define WORDS_BIGENDIAN. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 18:58:20 2012 From: report at bugs.python.org (Radu Dan) Date: Mon, 08 Oct 2012 16:58:20 +0000 Subject: [issue16167] Allow printing of str-derived classes Message-ID: <1349715500.68.0.716080336788.issue16167@psf.upfronthosting.co.za> New submission from Radu Dan: Classes that extend the builtin 'str' cannot be printed as is, and are automatically converted to string. #!/bin/env python class newstring(str): def __str__(self): return self a = newstring("hello world") print a Running this returns: Traceback (most recent call last): File "./test.py", line 7, in print a RuntimeError: print recursion Given that instances of 'str' are immutable, I see no reason why this should not work. ---------- components: Library (Lib) messages: 172396 nosy: Radu.Dan priority: normal severity: normal status: open title: Allow printing of str-derived classes type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 19:22:52 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Oct 2012 17:22:52 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349706807.82.0.556520783402.issue16166@psf.upfronthosting.co.za> Message-ID: <1349716972.71.0.0849108404713.issue16166@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which removes some unnecessary defines and tests. ---------- keywords: +patch Added file: http://bugs.python.org/file27499/endianess_cleanup.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 20:30:41 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 08 Oct 2012 18:30:41 +0000 Subject: [issue16161] broken link to Visual Studio 2008 in devguide In-Reply-To: <1349687184.47.0.215855262473.issue16161@psf.upfronthosting.co.za> Message-ID: <1349721041.69.0.388355239413.issue16161@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Incidentally, it was also odd that the VS executable wasn't obvious to locate. Scratch this last comment. A "Visual C++ 2008 Express Edition" folder was created under the Start menu. It just wasn't highlighted as having been newly added, as was a separate "Visual Studio 2008" folder (which contained just the Remote Debugger application). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 20:30:46 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Oct 2012 18:30:46 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349706807.82.0.556520783402.issue16166@psf.upfronthosting.co.za> Message-ID: <1349721046.43.0.388463243679.issue16166@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This doesn't depend on #16113 (quite the contrary). ---------- dependencies: -Add SHA-3 (Keccak) support _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 20:32:11 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Oct 2012 18:32:11 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349706807.82.0.556520783402.issue16166@psf.upfronthosting.co.za> Message-ID: <1349721131.22.0.838179650467.issue16166@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > #define PY_LITTLE_ENDIAN 1234 > #define PY_BIG_ENDIAN 4321 > #define PY_BYTE_ORDER Ouch, sounds confusing. I would rather have PY_LITTLE_ENDIAN defined only on little-endian machines and PY_BIG_ENDIAN only on big-endian machines. (and PY_BYTE_ORDER isn't necessary) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 20:50:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Oct 2012 18:50:16 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349721131.22.0.838179650467.issue16166@psf.upfronthosting.co.za> Message-ID: <201210082150.01041.storchaka@gmail.com> Serhiy Storchaka added the comment: > Ouch, sounds confusing. I would rather have PY_LITTLE_ENDIAN defined only > on little-endian machines and PY_BIG_ENDIAN only on big-endian machines. > (and PY_BYTE_ORDER isn't necessary) Why use two complementary boolean variables for a single boolean value (Python does not support mixed endian in any case)? There is WORDS_BIGENDIAN already. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 21:00:04 2012 From: report at bugs.python.org (Mikhail Afanasyev) Date: Mon, 08 Oct 2012 19:00:04 +0000 Subject: [issue15991] BaseHTTPServer with ThreadingMixIn serving wrong data sometimes In-Reply-To: <1348171381.08.0.748825821227.issue15991@psf.upfronthosting.co.za> Message-ID: <1349722804.2.0.428278046906.issue15991@psf.upfronthosting.co.za> Mikhail Afanasyev added the comment: The bug is not only wget-specific. It was discovered while making APT proxy, so at least Debian APT fetcher has the same problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 21:02:21 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Oct 2012 19:02:21 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <201210082150.01041.storchaka@gmail.com> Message-ID: <1349722852.3361.1.camel@localhost.localdomain> Antoine Pitrou added the comment: > > Ouch, sounds confusing. I would rather have PY_LITTLE_ENDIAN defined only > > on little-endian machines and PY_BIG_ENDIAN only on big-endian machines. > > (and PY_BYTE_ORDER isn't necessary) > > Why use two complementary boolean variables for a single boolean value (Python > does not support mixed endian in any case)? Because it's simply more practical than having to remember which one exists :-) > There is WORDS_BIGENDIAN already. A rather unfortunate IMHO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 21:04:31 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Oct 2012 19:04:31 +0000 Subject: [issue15991] BaseHTTPServer with ThreadingMixIn serving wrong data sometimes In-Reply-To: <1348171381.08.0.748825821227.issue15991@psf.upfronthosting.co.za> Message-ID: <1349723071.91.0.278090655327.issue15991@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > The bug is not only wget-specific. It was discovered while making APT > proxy, so at least Debian APT fetcher has the same problem. Well, perhaps it uses wget too? If you really think this is a bug in Python, you have to diagnose it further (for example by using Wireshark and analyzing the bytes exchanged between server and client). I've done all the debugging I can. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 21:13:15 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Oct 2012 19:13:15 +0000 Subject: [issue15833] most failures to write byte-compiled file no longer suppressed In-Reply-To: <1346432246.49.0.876284426658.issue15833@psf.upfronthosting.co.za> Message-ID: <1349723595.46.0.729789216832.issue15833@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Charles-Fran?ois's patch looks ok to me. I don't know if this warrants adding a test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 21:59:33 2012 From: report at bugs.python.org (David Pietz) Date: Mon, 08 Oct 2012 19:59:33 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1349571163.01.0.482597340854.issue15853@psf.upfronthosting.co.za> Message-ID: <7CD9906F-0169-4928-B6D7-FF7856647260@sbcglobal.net> David Pietz added the comment: It wasn't right on that page anymore but I poked around and fount the 8.5.11.1 and IDLE is no longer crashing when I go to preferences or when I cut and paste in the edit window (I didn't tell you about that did I ?- well it fixed that, too)!! thanks solo much, Ned ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 22:01:22 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 08 Oct 2012 20:01:22 +0000 Subject: [issue16167] Allow printing of str-derived classes In-Reply-To: <1349715500.68.0.716080336788.issue16167@psf.upfronthosting.co.za> Message-ID: <1349726482.98.0.245202018891.issue16167@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Python 3.4.0a0 (default:8f048c8c855e, Oct 8 2012, 13:46:48) [GCC 4.5.4] on linux Type "help", "copyright", "credits" or "license" for more information. >>> class newstring(str): ... def __str__(self): ... return self ... >>> type(str(newstring())) ---------- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 22:02:55 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 08 Oct 2012 20:02:55 +0000 Subject: [issue16167] Allow printing of str-derived classes In-Reply-To: <1349715500.68.0.716080336788.issue16167@psf.upfronthosting.co.za> Message-ID: <1349726575.44.0.276540911602.issue16167@psf.upfronthosting.co.za> Benjamin Peterson added the comment: And indeed >>> print(a) hello world ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 22:15:21 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 08 Oct 2012 20:15:21 +0000 Subject: [issue16167] Allow printing of str-derived classes In-Reply-To: <1349715500.68.0.716080336788.issue16167@psf.upfronthosting.co.za> Message-ID: <1349727321.91.0.248451022809.issue16167@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: Radu Dan: Printing of str-derived classes works in Python >=3.0, so you should just upgrade to newer version of Python. New features will not be backported to Python 2. ---------- nosy: +Arfrever resolution: invalid -> works for me _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 22:25:13 2012 From: report at bugs.python.org (patrick vrijlandt) Date: Mon, 08 Oct 2012 20:25:13 +0000 Subject: [issue12322] ElementPath 1.3 expressions documentation In-Reply-To: <1307959369.7.0.162667287307.issue12322@psf.upfronthosting.co.za> Message-ID: <1349727913.38.0.906399492975.issue12322@psf.upfronthosting.co.za> patrick vrijlandt added the comment: To be complete: an xpath 'above' the start element returns None Thanks for the patch! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 22:33:48 2012 From: report at bugs.python.org (Kevin Barry) Date: Mon, 08 Oct 2012 20:33:48 +0000 Subject: [issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout In-Reply-To: <1337960558.56.0.442179213708.issue14916@psf.upfronthosting.co.za> Message-ID: <1349728428.54.0.908620023725.issue14916@psf.upfronthosting.co.za> Kevin Barry added the comment: I still see the potential cause addressed by my patch in the 2.7, 3.3, and "default" branches, so I'm assuming that all versions from 2.6 on have this problem. I also see that I can elect to change the "Status" and "Resolution" of this report. Does that mean I need to do something besides wait for someone involved in the project to look at my patch? Kevin Barry ---------- versions: +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 Mon Oct 8 22:40:28 2012 From: report at bugs.python.org (Arne Babenhauserheide) Date: Mon, 08 Oct 2012 20:40:28 +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: <1349728828.12.0.335998128814.issue14900@psf.upfronthosting.co.za> Arne Babenhauserheide added the comment: I?ll create them as soon as I get the time. It?s not as if that?s really hard - but I still have to do it (need to diff against current tip - I already merged, so that should work without problems). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 22:44:31 2012 From: report at bugs.python.org (Mike Hoy) Date: Mon, 08 Oct 2012 20:44:31 +0000 Subject: [issue12322] ElementPath 1.3 expressions documentation In-Reply-To: <1307959369.7.0.162667287307.issue12322@psf.upfronthosting.co.za> Message-ID: <1349729071.88.0.188736802088.issue12322@psf.upfronthosting.co.za> Mike Hoy added the comment: In response to patrick vrijlandt last comment here's a patch. I also found a few None keywords that didn't have `` around them. ---------- Added file: http://bugs.python.org/file27500/issue12322_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 22:58:07 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 08 Oct 2012 20:58:07 +0000 Subject: [issue15991] BaseHTTPServer with ThreadingMixIn serving wrong data sometimes In-Reply-To: <1349722804.2.0.428278046906.issue15991@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > The bug is not only wget-specific. It was discovered while making APT proxy, so at least Debian APT fetcher has the same problem. Debian uses wget. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 22:58:34 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 08 Oct 2012 20:58:34 +0000 Subject: [issue15991] BaseHTTPServer with ThreadingMixIn serving wrong data sometimes In-Reply-To: Message-ID: Charles-Fran?ois Natali added the comment: >> The bug is not only wget-specific. It was discovered while making APT proxy, so at least Debian APT fetcher has the same problem. > > Debian uses wget. I meant apt-get uses wget. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 23:00:19 2012 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Oct 2012 21:00:19 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349706807.82.0.556520783402.issue16166@psf.upfronthosting.co.za> Message-ID: <1349730019.17.0.759820591229.issue16166@psf.upfronthosting.co.za> Ned Deily added the comment: Just a reminder that we support configurations where there are both big-endian and little-endinan binaries in the *same* executable file: for example, Mac OS X 32-bit-only universal binaries (.so, .dylib, .exe) contain both i386 and ppc code in the same file. So any -endian differences must remain isolated to C code or be dynamically tested at execution time in Python code. And ./configure time tests can be problematic. (The proposed patch doesn't have that problem but it might be an issue later in tests.) ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 23:07:22 2012 From: report at bugs.python.org (Berker Peksag) Date: Mon, 08 Oct 2012 21:07:22 +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: <1349730442.86.0.381091890886.issue16163@psf.upfronthosting.co.za> Berker Peksag added the comment: > Can you also provide a test that fails using the current code (and > that passes with the patch applied)? New patch attached with a test. ---------- Added file: http://bugs.python.org/file27501/pkgutil-name-with-test.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 23:13:48 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Oct 2012 21:13:48 +0000 Subject: [issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout In-Reply-To: <1337960558.56.0.442179213708.issue14916@psf.upfronthosting.co.za> Message-ID: <1349730828.38.0.557558126436.issue14916@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 23:15:22 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Oct 2012 21:15:22 +0000 Subject: [issue15278] UnicodeDecodeError when readline in codecs.py In-Reply-To: <1341674319.29.0.269195397783.issue15278@psf.upfronthosting.co.za> Message-ID: <1349730922.72.0.391305502937.issue15278@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 00:03:03 2012 From: report at bugs.python.org (Vitaly) Date: Mon, 08 Oct 2012 22:03:03 +0000 Subject: [issue16168] SysLogHandler constructor ignores socktype arg when address refers to a Unix Domain Socket Message-ID: <1349733783.87.0.737164149869.issue16168@psf.upfronthosting.co.za> New submission from Vitaly: _connect_unixsocket() (see below) does not use socktype value that was passed into SysLogHandler.__init__(): def _connect_unixsocket(self, address): self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) # syslog may require either DGRAM or STREAM sockets try: self.socket.connect(address) except socket.error: self.socket.close() self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) self.socket.connect(address) ---------- components: Library (Lib) messages: 172418 nosy: vitaly priority: normal severity: normal status: open title: SysLogHandler constructor ignores socktype arg when address refers to a Unix Domain Socket versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 00:08:17 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 08 Oct 2012 22:08:17 +0000 Subject: [issue16169] ctypes.WinError() confuses errno with winerror Message-ID: <1349734097.4.0.108959559992.issue16169@psf.upfronthosting.co.za> New submission from Richard Oudkerk: ctypes.WinError() is defined as def WinError(code=None, descr=None): if code is None: code = GetLastError() if descr is None: descr = FormatError(code).strip() return WindowsError(code, descr) Since WindowsError became an alias for OSError, this means that if e is the exception raised, e.errno == GetLastError() and e.winerror == None. I think the last line should be return WindowsError(None, descr, None, code) ---------- messages: 172419 nosy: sbt priority: normal severity: normal stage: needs patch status: open title: ctypes.WinError() confuses errno with winerror type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 00:09:13 2012 From: report at bugs.python.org (Vitaly) Date: Mon, 08 Oct 2012 22:09:13 +0000 Subject: [issue16168] SysLogHandler constructor ignores socktype arg when address refers to a Unix Domain Socket In-Reply-To: <1349733783.87.0.737164149869.issue16168@psf.upfronthosting.co.za> Message-ID: <1349734153.29.0.505405223555.issue16168@psf.upfronthosting.co.za> Vitaly added the comment: SOCK_DGRAM causes log messages larger than about 2000 bytes to be dropped altogether on MacOS X 10.7.5 and to be truncated to 2081 bytes on Linux (tested with Amazon's linux, which is based on centos). This is quite unfortunate, since many exception tracebacks for production apps are larger than 2000 bytes, and it's paramount to capture the entire traceback in order to debug the issue. This limitation can be overcome if _connect_unixsocket() used the socktype arg value that was passed to SysLogHandler constructor. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 00:10:35 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Oct 2012 22:10:35 +0000 Subject: [issue16168] SysLogHandler constructor ignores socktype arg when address refers to a Unix Domain Socket In-Reply-To: <1349733783.87.0.737164149869.issue16168@psf.upfronthosting.co.za> Message-ID: <1349734235.92.0.234807544523.issue16168@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 00:18:33 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Mon, 08 Oct 2012 22:18:33 +0000 Subject: [issue16034] bz2 module appears slower in Python 3.x versus Python 2.x In-Reply-To: <1348547973.67.0.489000428853.issue16034@psf.upfronthosting.co.za> Message-ID: <1349734713.16.0.15750463897.issue16034@psf.upfronthosting.co.za> Nadeem Vawda added the comment: I've released v0.95 of bz2file, which incorporates all the optimizations discussed here. The performance should be similar to 2.x's bz2 in most cases. It is still a lot slower when calling read(10) or read(1), but I hope no-one is doing that anywhere where performance is important ;-) One other note: bz2file's readline() is faster when running on 3.x than on 2.x (and in some cases faster than the 2.x stdlib version). This is probably due to improvements made to io.BufferedIOBase.readline() since 2.7, but I haven't had a chance to investigate this. Let me know if you have any issues with the new release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 00:28:59 2012 From: report at bugs.python.org (Berker Peksag) Date: Mon, 08 Oct 2012 22:28:59 +0000 Subject: [issue13477] tarfile module should have a command line In-Reply-To: <1322190665.85.0.356467902383.issue13477@psf.upfronthosting.co.za> Message-ID: <1349735339.72.0.509468731691.issue13477@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 00:42:00 2012 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Oct 2012 22:42:00 +0000 Subject: [issue16150] Implement generator interface in itertools.chain. In-Reply-To: <1349535148.95.0.484121382755.issue16150@psf.upfronthosting.co.za> Message-ID: <1349736120.62.0.872511263541.issue16150@psf.upfronthosting.co.za> Guido van Rossum added the comment: TBH I don't think that using "yield from" in the docs makes things clearer at all -- it just requires readers to understand a rather esoteric feature. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 00:43:21 2012 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Oct 2012 22:43:21 +0000 Subject: [issue16150] Implement generator interface in itertools.chain. In-Reply-To: <1349535148.95.0.484121382755.issue16150@psf.upfronthosting.co.za> Message-ID: <1349736201.95.0.0380312676471.issue16150@psf.upfronthosting.co.za> Guido van Rossum added the comment: I also don't think that this is a desirable feature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 01:02:16 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Oct 2012 23:02:16 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <3XbHCD0SxMzQqD@mail.python.org> Roundup Robot added the comment: New changeset 862430c68fec by Chris Jerdonek in branch '3.3': Issue #16115: Improve testing of the executable argument to subprocess.Popen(). http://hg.python.org/cpython/rev/862430c68fec New changeset 1b37fc50dc1b by Chris Jerdonek in branch 'default': Issue #16115: Merge test improvements from 3.3. http://hg.python.org/cpython/rev/1b37fc50dc1b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 01:03:52 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 08 Oct 2012 23:03:52 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <1349737432.75.0.693808914559.issue16115@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I am pushing the documentation changes separately (which will include 2.7 and 3.2). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 01:12:47 2012 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 08 Oct 2012 23:12:47 +0000 Subject: [issue16168] SysLogHandler constructor ignores socktype arg when address refers to a Unix Domain Socket In-Reply-To: <1349733783.87.0.737164149869.issue16168@psf.upfronthosting.co.za> Message-ID: <1349737967.18.0.0238814568042.issue16168@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- assignee: -> vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 01:13:19 2012 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 08 Oct 2012 23:13:19 +0000 Subject: [issue16141] Possible simplification for logging.StreamHandler exception handling In-Reply-To: <1349448386.51.0.852233729423.issue16141@psf.upfronthosting.co.za> Message-ID: <1349737999.13.0.142666645006.issue16141@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- assignee: -> vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 01:19:22 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 08 Oct 2012 23:19:22 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <1349738362.28.0.823154266946.issue16115@psf.upfronthosting.co.za> Chris Jerdonek added the comment: The test_executable test fails on AMD64 Ubuntu LTS. For example: http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.3/builds/38/steps/test/logs/stdio FAIL: test_executable (test.test_subprocess.ProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_subprocess.py", line 205, in test_executable self._assert_python(["doesnotexist", "-c"], executable=sys.executable) File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_subprocess.py", line 201, in _assert_python self.assertEqual(47, p.returncode) AssertionError: 47 != -6 ====================================================================== FAIL: test_executable (test.test_subprocess.ProcessTestCaseNoPoll) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_subprocess.py", line 205, in test_executable self._assert_python(["doesnotexist", "-c"], executable=sys.executable) File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_subprocess.py", line 201, in _assert_python self.assertEqual(47, p.returncode) AssertionError: 47 != -6 This test passed locally (at least for me) on Mac OS X and Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 02:45:49 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Oct 2012 00:45:49 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349706807.82.0.556520783402.issue16166@psf.upfronthosting.co.za> Message-ID: <1349743549.57.0.654530295366.issue16166@psf.upfronthosting.co.za> Christian Heimes added the comment: My proposal mimics the API of endian.h. It defines a BYTE_ORDER macro that is either equal to LITTLE_ENDIAN, BIG_ENDIAN or PDB_ENDIAN (aka mixed endian). I need it that way for Keccak but I can roll my own definitions if you prefer just two macros. If you prefer two macros instead of three then we should name them PY_IS_LITTLE_ENDIAN and PY_IS_BIG_ENDIAN. Ned: If I understand you correctly than we can't have a configure definition and need macro magic like brg_endian.h. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 02:49:05 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Oct 2012 00:49:05 +0000 Subject: [issue16161] broken link to Visual Studio 2008 in devguide In-Reply-To: <1349687184.47.0.215855262473.issue16161@psf.upfronthosting.co.za> Message-ID: <1349743745.67.0.0280229290016.issue16161@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks for your tests, Chris. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 02:55:12 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Oct 2012 00:55:12 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <3XbKjW5VqszQtn@mail.python.org> Roundup Robot added the comment: New changeset ef90c5e482f4 by Chris Jerdonek in branch '3.3': Issue #16115: Skip a newly added subprocess.Popen() test on Linux. http://hg.python.org/cpython/rev/ef90c5e482f4 New changeset 96b8eb3d3208 by Chris Jerdonek in branch 'default': Issue #16115: Merge test skip from 3.3. http://hg.python.org/cpython/rev/96b8eb3d3208 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 03:03:26 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 09 Oct 2012 01:03:26 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <1349744606.7.0.80949126754.issue16115@psf.upfronthosting.co.za> Chris Jerdonek added the comment: More information on the failure above (from the same buildbot link): test_executable (test.test_subprocess.ProcessTestCase) ... Could not find platform independent libraries Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] Fatal Python error: Py_Initialize: Unable to get the locale encoding ImportError: No module named 'encodings' FAIL ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 03:38:59 2012 From: report at bugs.python.org (Ned Deily) Date: Tue, 09 Oct 2012 01:38:59 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349706807.82.0.556520783402.issue16166@psf.upfronthosting.co.za> Message-ID: <1349746739.63.0.267317721571.issue16166@psf.upfronthosting.co.za> Ned Deily added the comment: Christian: That's right because there is only one configure execution in the OS X universal builds and only compiler call per module just like a normal single-architecture unix build. Under the covers, the Apple compiler driver transparently makes multiple compiler calls, one for each architecture, and then use lipo to combine the binaries into one .o file etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 03:41:15 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 09 Oct 2012 01:41:15 +0000 Subject: [issue16170] remove Linux skip from test_subprocess's test_executable() test Message-ID: <1349746875.36.0.803736287299.issue16170@psf.upfronthosting.co.za> New submission from Chris Jerdonek: This issue is to make whatever changes are necessary to remove the skip from test_subprocess's test_executable() test (currently skipping machines that are neither Windows nor Mac): http://hg.python.org/cpython/file/ef90c5e482f4/Lib/test/test_subprocess.py#l203 The test currently fails on several Linux buildbots, but the test succeeds on Mac and Windows. Perhaps this points to a different, underlying issue that needs to be fixed. Either way, we should be able to test Popen()'s executable argument on Linux machines. This issue seems closely related to closed issue #7774. Below is more information from a buildbot about the failure (the AMD64 Ubuntu LTS buildbot): http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.3/builds/38/steps/test/logs/stdio FAIL: test_executable (test.test_subprocess.ProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_subprocess.py", line 205, in test_executable self._assert_python(["doesnotexist", "-c"], executable=sys.executable) File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_subprocess.py", line 201, in _assert_python self.assertEqual(47, p.returncode) AssertionError: 47 != -6 ====================================================================== FAIL: test_executable (test.test_subprocess.ProcessTestCaseNoPoll) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_subprocess.py", line 205, in test_executable self._assert_python(["doesnotexist", "-c"], executable=sys.executable) File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_subprocess.py", line 201, in _assert_python self.assertEqual(47, p.returncode) AssertionError: 47 != -6 test_executable (test.test_subprocess.ProcessTestCase) ... Could not find platform independent libraries Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] Fatal Python error: Py_Initialize: Unable to get the locale encoding ImportError: No module named 'encodings' FAIL ---------- components: Library (Lib), Tests keywords: buildbot messages: 172432 nosy: chris.jerdonek priority: normal severity: normal status: open title: remove Linux skip from test_subprocess's test_executable() test type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 03:43:31 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 09 Oct 2012 01:43:31 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <1349747011.58.0.27321781118.issue16115@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I created issue 16170 to track fixing the Linux-skip for the test_executable() test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 03:47:04 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 09 Oct 2012 01:47:04 +0000 Subject: [issue7774] sys.executable: wrong location if zeroth command argument is modified. In-Reply-To: <1264375402.09.0.657503917056.issue7774@psf.upfronthosting.co.za> Message-ID: <1349747224.23.0.0683894280838.issue7774@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I just created issue 16170 about a newly-added subprocess.Popen() test that succeeds on Windows and Mac but fails on Linux. It seems closely related to the issue discussed here. Perhaps it signals an underlying issue that needs to be fixed. ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 03:48:49 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 09 Oct 2012 01:48:49 +0000 Subject: [issue16170] remove Linux skip from test_subprocess's test_executable() test In-Reply-To: <1349746875.36.0.803736287299.issue16170@psf.upfronthosting.co.za> Message-ID: <1349747329.4.0.284871505619.issue16170@psf.upfronthosting.co.za> Chris Jerdonek added the comment: For future reference, this issue resulted from the tests committed for issue 16115. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 04:48:31 2012 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 09 Oct 2012 02:48:31 +0000 Subject: [issue16150] Implement generator interface in itertools.chain. In-Reply-To: <1349535148.95.0.484121382755.issue16150@psf.upfronthosting.co.za> Message-ID: <1349750911.3.0.512934100583.issue16150@psf.upfronthosting.co.za> Guido van Rossum added the comment: I am going to reject this unless at least one other core developer supports it. Extensive discussion on python-ideas has found very few supporters besides Serhiy Storchaka. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 05:01:10 2012 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 09 Oct 2012 03:01:10 +0000 Subject: [issue16150] Implement generator interface in itertools.chain. In-Reply-To: <1349535148.95.0.484121382755.issue16150@psf.upfronthosting.co.za> Message-ID: <1349751670.03.0.472540603395.issue16150@psf.upfronthosting.co.za> Nick Coghlan added the comment: As discussed on python-ideas: the iterator interface is narrower than the generator interface. Tools for working with iterators are *expected* to lose the generator specific details, just as for loops do, especially when they deal with multiple iterators. When Greg Ewing's PEP 3152 about cofunctions was discussed in the past, the possibility of a C level API to allow other objects to behave like generators was brought up - if such an API is ever adopted, then it *may* make sense to use it in itertools. In the meantime, it's simpler if itertools is consistent about ignoring the .send(), .throw() and return value semantics of generators-as-coroutines. ---------- resolution: -> rejected stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 05:08:20 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Oct 2012 03:08:20 +0000 Subject: [issue16150] Implement generator interface in itertools.chain. In-Reply-To: <1349535148.95.0.484121382755.issue16150@psf.upfronthosting.co.za> Message-ID: <1349752100.83.0.248555840903.issue16150@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In the python-ideas thread, "Propagating StopIteration value", Guido further elaborated "But that just seems to perpetuate the idea that you have, which IMO is wrongheaded. Itertools is for iterators, and all the extra generator features make no sense for it." I agree with this completely. Given Raymond's consistent rejection of attempts to complexify itertools, I am 90% sure he would reject this also. (If he disagrees, it is easy to re-open.) You and Serhiy seem to miss that the simplicity of the iterator interface as a lowest common denominator is a feature. It works for its intended purpose. It was fixed in 2.2 and so far not subject to change. And it can effectively be mixed in to other classes to produce iterator + whatever classes. Files are one example -- they are iterators, context managers, and io method objects. Generators, with its additions, are another example of augmented iterator. "I think it would be useful to chain multiple generators and still get a generator, not an iterator." A generator is an instance of the generator class. As I understand the patch, chain would still produce chain objects, not generator objects, and hence would fail isinstance tests. I suggested on the thread above that gentools should be a separate module, initially released on pypi. Unless it is easier than I think to produce generator instances in C, it should be coded in Python. That would be good anyway while developing the interface and behavior. Start with your generator chain function. Perhaps it would help you to understand my viewpoint by considering the analogous statement "I think it would be useful to chain multiple files and still get a file, not an iterator.". Or substitute any other augmented iterator class for 'file'. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 05:21:28 2012 From: report at bugs.python.org (Roger Serwy) Date: Tue, 09 Oct 2012 03:21:28 +0000 Subject: [issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active. In-Reply-To: <1342208290.25.0.778184843655.issue15348@psf.upfronthosting.co.za> Message-ID: <1349752888.14.0.439375487223.issue15348@psf.upfronthosting.co.za> Roger Serwy added the comment: While trying to address #15347, I discovered one too many corner cases where the debugger breaks IDLE. The stable_idle_debugger.diff against 3.4 contains necessary changes to make IDLE more reliable while debugging. Since the IDLE debugger is not documented these changes should not be controversial. Here are all the cases the patch fixes: 1) Closing the debugger while debugging causes the shell to not respond to new commands when using a subprocess. 2) Pressing F5 in an editor several times with an active debugger causes IDLE to become unresponsive. 2.1) When not using the subprocess, the patch fixes an AttributeError in runcode in PyShell.py, since .interp is not an attribute of the interpreter. 3) Closing the shell window while the debugger is debugging prevents IDLE from terminating if no editors are open. #15347 4) Closing the shell with an idle debugger causes a traceback in the shell (with no subprocess). The patch creates the following behavior: 1) The debugger cannot be closed by clicking "X" while it is debugging. Instead, the "Quit" button gets flashed as a reminder to stop the debugger before closing. 2) Pressing F5 in the editor window while the debugger is debugging brings focus to the debugger window. 3) Closing the shell will close the debugger properly. The .close() method of Debugger.py quits the nested eventloop in .interaction() if needed. I tested these issues and solutions on Linux. Can someone review the patch for Windows and Mac? ---------- stage: -> patch review Added file: http://bugs.python.org/file27502/stable_idle_debugger.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 05:23:53 2012 From: report at bugs.python.org (jimbo1qaz) Date: Tue, 09 Oct 2012 03:23:53 +0000 Subject: [issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active. In-Reply-To: <1342208290.25.0.778184843655.issue15348@psf.upfronthosting.co.za> Message-ID: <1349753033.52.0.650957427401.issue15348@psf.upfronthosting.co.za> jimbo1qaz added the comment: Is it possible to make the X button quit the debugger if enabled? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 05:26:42 2012 From: report at bugs.python.org (Roger Serwy) Date: Tue, 09 Oct 2012 03:26:42 +0000 Subject: [issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active. In-Reply-To: <1342208290.25.0.778184843655.issue15348@psf.upfronthosting.co.za> Message-ID: <1349753202.76.0.138951809236.issue15348@psf.upfronthosting.co.za> Roger Serwy added the comment: Clicking "X" while the debugger is enabled, but not actively debugging a program, will close the debugger window. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 05:28:28 2012 From: report at bugs.python.org (jimbo1qaz) Date: Tue, 09 Oct 2012 03:28:28 +0000 Subject: [issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active. In-Reply-To: <1342208290.25.0.778184843655.issue15348@psf.upfronthosting.co.za> Message-ID: <1349753308.16.0.73951975368.issue15348@psf.upfronthosting.co.za> jimbo1qaz added the comment: What's the intended behavior? stop debugging and quit the program? stop debugging and continue freerunning? I'm using 3.3, can you make the patch stop debugging the active running program when you click the X? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 05:34:59 2012 From: report at bugs.python.org (Roger Serwy) Date: Tue, 09 Oct 2012 03:34:59 +0000 Subject: [issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active. In-Reply-To: <1342208290.25.0.778184843655.issue15348@psf.upfronthosting.co.za> Message-ID: <1349753699.47.0.844656683813.issue15348@psf.upfronthosting.co.za> Roger Serwy added the comment: If the debugger is active, then clicking "X" will flash the "Quit" button. You must click the quit button first before closing the debugger window. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 05:35:20 2012 From: report at bugs.python.org (jimbo1qaz) Date: Tue, 09 Oct 2012 03:35:20 +0000 Subject: [issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active. In-Reply-To: <1342208290.25.0.778184843655.issue15348@psf.upfronthosting.co.za> Message-ID: <1349753720.57.0.895784072967.issue15348@psf.upfronthosting.co.za> jimbo1qaz added the comment: Then frigging change it! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 05:38:57 2012 From: report at bugs.python.org (Roger Serwy) Date: Tue, 09 Oct 2012 03:38:57 +0000 Subject: [issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active. In-Reply-To: <1342208290.25.0.778184843655.issue15348@psf.upfronthosting.co.za> Message-ID: <1349753937.11.0.00553421510428.issue15348@psf.upfronthosting.co.za> Roger Serwy added the comment: Closing the active debugger with "X" creates a problem with references and callbacks. I encountered too many corner cases where I could not implement that behavior simply. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 05:43:54 2012 From: report at bugs.python.org (Roger Serwy) Date: Tue, 09 Oct 2012 03:43:54 +0000 Subject: [issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active. In-Reply-To: <1342208290.25.0.778184843655.issue15348@psf.upfronthosting.co.za> Message-ID: <1349754234.08.0.263649104178.issue15348@psf.upfronthosting.co.za> Roger Serwy added the comment: But of course, you are more than welcomed to try to submit a patch yourself. Just make sure that those corner cases I described earlier are handled reasonable when running IDLE with and without a subprocess. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 06:15:28 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Oct 2012 04:15:28 +0000 Subject: [issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active. In-Reply-To: <1342208290.25.0.778184843655.issue15348@psf.upfronthosting.co.za> Message-ID: <1349756128.0.0.322260866157.issue15348@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I have never used the debugger, but I verified the bug. While something was 'hung', the debugger would not restart because something was 'busy'. I also verified that clicking [quit] first and then [x] works. I will try to test the second patch sometime. Jimbo, the first priority is to fix crashes and hangs. We control the response to buttons we add, but the [x] close button involves the gui and operating system. So working with it can be trickier than it seems it ought to be. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 07:30:38 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 09 Oct 2012 05:30:38 +0000 Subject: [issue16134] Add support for RTMP schemes to urlparse In-Reply-To: <1349375961.84.0.319840553089.issue16134@psf.upfronthosting.co.za> Message-ID: <1349760638.73.0.0503880262008.issue16134@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Personally, I want to do away with all those scheme specific stuff, if we can. I have tried previously, but failed due to some backwards incompatibility. 3.4 gives a good chance/time to make those changes to get rid of those scheme specific stuff (again). So, instead of adding the rmtp* modules to the various categories, I would like to see if can find a way out. issue9374 - another related one which. Also, Jorge Gomes: If you care about 2.7 version only, then the way I have seen this issue being handled in production is you extend the uses_relative list with the protocols that you want to support. Like >>> from urlparse import uses_netloc >>> uses_netloc.extend(['rtmp','rtmpe']) 2.7.x is in bugfix mode and this change may not be considered a bug-fix to find it's place in 2.7.x ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 07:33:08 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 09 Oct 2012 05:33:08 +0000 Subject: [issue16134] Add support for RTMP schemes to urlparse In-Reply-To: <1349375961.84.0.319840553089.issue16134@psf.upfronthosting.co.za> Message-ID: <1349760788.12.0.127117335209.issue16134@psf.upfronthosting.co.za> Senthil Kumaran added the comment: issue9374 - another related one which should be taken care. Which is simply reverting this: http://hg.python.org/cpython/diff/a0b3cb52816e/Lib/urllib/parse.py and informing in the DOCs that those globals are not available anymore. (But this should also be discussed in python-dev before making the change). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 07:58:39 2012 From: report at bugs.python.org (Kushal Das) Date: Tue, 09 Oct 2012 05:58:39 +0000 Subject: [issue15880] os.path.split() and long UNC names In-Reply-To: <1347036015.89.0.836232949292.issue15880@psf.upfronthosting.co.za> Message-ID: <1349762319.82.0.718878724441.issue15880@psf.upfronthosting.co.za> Kushal Das added the comment: splitunc is deprecated since 3.1. It is also written in the code that "Paths containing drive letters never have an UNC part" ---------- nosy: +kushaldas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 08:19:48 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Oct 2012 06:19:48 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <3XbSw32FnTzQt6@mail.python.org> Roundup Robot added the comment: New changeset 3dd012397b11 by Chris Jerdonek in branch '3.2': Issue #16115: Improve subprocess.Popen() documentation around args, shell, and executable arguments. http://hg.python.org/cpython/rev/3dd012397b11 New changeset 0ef3b801ccbc by Chris Jerdonek in branch '3.3': Issue #16115: Merge subprocess.Popen() documentation improvements from 3.2. http://hg.python.org/cpython/rev/0ef3b801ccbc New changeset 91d4593ac974 by Chris Jerdonek in branch 'default': Issue #16115: Merge subprocess.Popen() documentation improvements from 3.3. http://hg.python.org/cpython/rev/91d4593ac974 New changeset 11171bf6a6bd by Chris Jerdonek in branch '2.7': Issue #16115: Backport subprocess.Popen() documentation improvements from 3.2. http://hg.python.org/cpython/rev/11171bf6a6bd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 08:22:28 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 09 Oct 2012 06:22:28 +0000 Subject: [issue16115] test that executable arg to Popen() takes precedence over args In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <1349763748.25.0.850844979084.issue16115@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 Tue Oct 9 09:06:25 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Oct 2012 07:06:25 +0000 Subject: [issue16141] Possible simplification for logging.StreamHandler exception handling In-Reply-To: <1349448386.51.0.852233729423.issue16141@psf.upfronthosting.co.za> Message-ID: <3XbTxs1M3zzQx3@mail.python.org> Roundup Robot added the comment: New changeset 46889b772442 by Vinay Sajip in branch 'default': Issue #16141: replaced old-style exception handling code in logging with the modern idiom. http://hg.python.org/cpython/rev/46889b772442 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 09:06:42 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Oct 2012 07:06:42 +0000 Subject: [issue16161] broken link to Visual Studio 2008 in devguide In-Reply-To: <1349687184.47.0.215855262473.issue16161@psf.upfronthosting.co.za> Message-ID: <3XbTy93PZrzQtn@mail.python.org> Roundup Robot added the comment: New changeset 6f3e48838a2d by Chris Jerdonek in branch 'default': Issue #16161: Update link for downloading Microsoft Visual Studio 2008. http://hg.python.org/devguide/rev/6f3e48838a2d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 09:07:56 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 09 Oct 2012 07:07:56 +0000 Subject: [issue16161] broken link to Visual Studio 2008 in devguide In-Reply-To: <1349687184.47.0.215855262473.issue16161@psf.upfronthosting.co.za> Message-ID: <1349766476.69.0.248972627356.issue16161@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 Tue Oct 9 09:08:59 2012 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 09 Oct 2012 07:08:59 +0000 Subject: [issue16141] Possible simplification for old-style exception handling code in stdlib In-Reply-To: <1349448386.51.0.852233729423.issue16141@psf.upfronthosting.co.za> Message-ID: <1349766539.76.0.782695790264.issue16141@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- assignee: vinay.sajip -> title: Possible simplification for logging.StreamHandler exception handling -> Possible simplification for old-style exception handling code in stdlib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 09:23:22 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Oct 2012 07:23:22 +0000 Subject: [issue16168] SysLogHandler constructor ignores socktype arg when address refers to a Unix Domain Socket In-Reply-To: <1349733783.87.0.737164149869.issue16168@psf.upfronthosting.co.za> Message-ID: <3XbVKP0jNnzLyL@mail.python.org> Roundup Robot added the comment: New changeset 6e31832f8275 by Vinay Sajip in branch '2.7': Issue #16168: Use specified socket type for domain sockets in SysLogHandler. http://hg.python.org/cpython/rev/6e31832f8275 New changeset f41e6ef3392a by Vinay Sajip in branch '3.2': Issue #16168: Use specified socket type for domain sockets in SysLogHandler. http://hg.python.org/cpython/rev/f41e6ef3392a New changeset e4212f81d633 by Vinay Sajip in branch '3.3': Issue #16168: Merged SysLogHandler update from 3.2. http://hg.python.org/cpython/rev/e4212f81d633 New changeset d7d3e1a03fe0 by Vinay Sajip in branch 'default': Closes #16168: Merged SysLogHandler update from 3.3. http://hg.python.org/cpython/rev/d7d3e1a03fe0 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 09:41:05 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Oct 2012 07:41:05 +0000 Subject: [issue15922] make howto/urllib2.rst doctests pass In-Reply-To: <1347370103.61.0.784697754485.issue15922@psf.upfronthosting.co.za> Message-ID: <3XbVjr3LxZzQts@mail.python.org> Roundup Robot added the comment: New changeset a6f37d503878 by Senthil Kumaran in branch '3.2': Fix Issue 15922: make howto/urllib2.rst doctests pass. http://hg.python.org/cpython/rev/a6f37d503878 New changeset a24d3e2124b6 by Senthil Kumaran in branch '3.3': Fix Issue 15922: make howto/urllib2.rst doctests pass. http://hg.python.org/cpython/rev/a24d3e2124b6 New changeset 8f699eac0908 by Senthil Kumaran in branch 'default': Fix Issue 15922: make howto/urllib2.rst doctests pass. http://hg.python.org/cpython/rev/8f699eac0908 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 09:54:00 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 09 Oct 2012 07:54:00 +0000 Subject: [issue16114] incorrect path in subprocess.Popen() FileNotFoundError message In-Reply-To: <1349237807.22.0.592724343556.issue16114@psf.upfronthosting.co.za> Message-ID: <1349769240.12.0.472085843057.issue16114@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > BTW, the patch fails for 3.2 and 3.3 but works for 3.4 By "patch" do you mean "test"? And by "works", do you mean fails or succeeds? :) I haven't prepared a patch yet, but I just started working on it. On my machine, I found that the test fails as is on 3.3 and 3.4, but on 3.2 it fails for a different reason: the FileNotFoundError needs to be switched to OSError (which was to be expected). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 09:55:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 09 Oct 2012 07:55:19 +0000 Subject: [issue15922] make howto/urllib2.rst doctests pass In-Reply-To: <1347370103.61.0.784697754485.issue15922@psf.upfronthosting.co.za> Message-ID: <1349769319.55.0.650996250062.issue15922@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks, Senthil! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 09:56:01 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 09 Oct 2012 07:56:01 +0000 Subject: [issue16114] incorrect path in subprocess.Popen() FileNotFoundError message In-Reply-To: <1349237807.22.0.592724343556.issue16114@psf.upfronthosting.co.za> Message-ID: <1349769360.99.0.972194039988.issue16114@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- assignee: -> chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:03:52 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Oct 2012 08:03:52 +0000 Subject: [issue15922] make howto/urllib2.rst doctests pass In-Reply-To: <1347370103.61.0.784697754485.issue15922@psf.upfronthosting.co.za> Message-ID: <3XbWD74yqxzQsm@mail.python.org> Roundup Robot added the comment: New changeset b2f282991973 by Senthil Kumaran in branch '2.7': Fix Issue 15922: make howto/urllib2.rst doctests pass. http://hg.python.org/cpython/rev/b2f282991973 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:04:42 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 09 Oct 2012 08:04:42 +0000 Subject: [issue15922] make howto/urllib2.rst doctests pass In-Reply-To: <1347370103.61.0.784697754485.issue15922@psf.upfronthosting.co.za> Message-ID: <1349769882.83.0.315610515866.issue15922@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:06:08 2012 From: report at bugs.python.org (Kushal Das) Date: Tue, 09 Oct 2012 08:06:08 +0000 Subject: [issue14039] Add "metavar" argument to add_subparsers() in argparse In-Reply-To: <1329436304.54.0.709137632289.issue14039@psf.upfronthosting.co.za> Message-ID: <1349769968.67.0.511127125177.issue14039@psf.upfronthosting.co.za> Changes by Kushal Das : ---------- nosy: +kushaldas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:06:43 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Oct 2012 08:06:43 +0000 Subject: [issue16110] Provide logging.config.configParserConfig In-Reply-To: <1349191631.16.0.42047016451.issue16110@psf.upfronthosting.co.za> Message-ID: <3XbWHQ6yJNzQsy@mail.python.org> Roundup Robot added the comment: New changeset ce0d0d052494 by Vinay Sajip in branch 'default': Closes #16110: fileConfig now accepts a pre-initialised ConfigParser instance. http://hg.python.org/cpython/rev/ce0d0d052494 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:23:55 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Oct 2012 08:23:55 +0000 Subject: [issue16171] "do nothing" load_tests could be improved Message-ID: <1349771035.38.0.947966701241.issue16171@psf.upfronthosting.co.za> New submission from Antoine Pitrou: unittest docs suggest the following "load_tests" for a __main__.py: def load_tests(loader, standard_tests, pattern): # top level directory cached on loader instance this_dir = os.path.dirname(__file__) package_tests = loader.discover(start_dir=this_dir, pattern=pattern) standard_tests.addTests(package_tests) return standard_tests This function fails with a weird error message when no pattern is given on the command line. A better alternative would be: def load_tests(loader, standard_tests, pattern): # top level directory cached on loader instance this_dir = os.path.dirname(__file__) pattern = pattern or "test_*.py" package_tests = loader.discover(start_dir=this_dir, pattern=pattern) standard_tests.addTests(package_tests) return standard_tests ---------- assignee: docs at python components: Documentation messages: 172460 nosy: docs at python, ezio.melotti, michael.foord, pitrou priority: low severity: normal status: open title: "do nothing" load_tests could be improved versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:46:22 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 09 Oct 2012 08:46:22 +0000 Subject: [issue16119] Python 2.7 _socket DLL import error on Windows Vista In-Reply-To: <1349272767.13.0.710278986958.issue16119@psf.upfronthosting.co.za> Message-ID: <1349772382.0.0.83144535615.issue16119@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Note: the error message above is mojibake (cp1253-encoded message written to a cp737 console) for: "??? ???? ?????? ?? ?????????? ? ??????????? ??????" (The specified module could not be found) Spiros, you closed the issue. How did you fix it exactly? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 11:16:24 2012 From: report at bugs.python.org (Kushal Das) Date: Tue, 09 Oct 2012 09:16:24 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <1348761787.62.0.977797373088.issue16061@psf.upfronthosting.co.za> Message-ID: <1349774184.57.0.0594249155833.issue16061@psf.upfronthosting.co.za> Changes by Kushal Das : ---------- nosy: +kushaldas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 11:18:46 2012 From: report at bugs.python.org (Michael Foord) Date: Tue, 09 Oct 2012 09:18:46 +0000 Subject: [issue16171] "do nothing" load_tests could be improved In-Reply-To: <1349771035.38.0.947966701241.issue16171@psf.upfronthosting.co.za> Message-ID: <1349774326.62.0.384059551735.issue16171@psf.upfronthosting.co.za> Michael Foord added the comment: Yes the version of load_tests you show is better. However there is an outstanding issue to fix the load_tests protocol to work with pattern=None which is a better fix. (I think this is a bug in load_tests rather than a doc issue really.) Issue 11218. ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> pattern=None when following documentation for load_tests and unittest.main() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 11:20:54 2012 From: report at bugs.python.org (Michael Foord) Date: Tue, 09 Oct 2012 09:20:54 +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: <1349774454.26.0.695956635392.issue11218@psf.upfronthosting.co.za> Michael Foord added the comment: Changing the docs to the following fixes the original reported issue: def load_tests(loader, standard_tests, pattern): # top level directory cached on loader instance this_dir = os.path.dirname(__file__) pattern = pattern or "test_*.py" package_tests = loader.discover(start_dir=this_dir, pattern=pattern) standard_tests.addTests(package_tests) return standard_tests (Suggested by Antoine in issue 16171.) I think that load_tests not working as documented is a bug and calling discover with pattern=None should work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 11:22:12 2012 From: report at bugs.python.org (Kushal Das) Date: Tue, 09 Oct 2012 09:22:12 +0000 Subject: [issue16125] open accepts arbitrary mode strings as long as they contain U In-Reply-To: <1349331092.45.0.724908738028.issue16125@psf.upfronthosting.co.za> Message-ID: <1349774531.99.0.379341350856.issue16125@psf.upfronthosting.co.za> Kushal Das added the comment: So, should I submit a new patch which will just put a warning ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 11:42:08 2012 From: report at bugs.python.org (Ned Deily) Date: Tue, 09 Oct 2012 09:42:08 +0000 Subject: [issue15574] IDLE crashes using clipboard copy command on OS X with ActiveTcl 8.5.12 In-Reply-To: <1344358098.04.0.570334143116.issue15574@psf.upfronthosting.co.za> Message-ID: <1349775728.56.0.523306704181.issue15574@psf.upfronthosting.co.za> Ned Deily added the comment: I've been able to isolate the problem to a particular Tk checkin and have opened an Tk issue with details here: https://sourceforge.net/tracker/?func=detail&aid=3575681&group_id=12997&atid=112997 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 11:46:24 2012 From: report at bugs.python.org (Ned Deily) Date: Tue, 09 Oct 2012 09:46:24 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1346632042.85.0.745944196118.issue15853@psf.upfronthosting.co.za> Message-ID: <1349775984.2.0.896348185729.issue15853@psf.upfronthosting.co.za> Ned Deily added the comment: I've been able to build Cocoa Tk and isolate the crash regression to a particular Tk checkin. This Tk issue contains the details: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=3575664&group_id=12997 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 11:54:54 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Oct 2012 09:54:54 +0000 Subject: [issue16172] Fix is/== misuse Message-ID: <1349776494.9.0.428146020554.issue16172@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here are two patches written on the discussion in Python-Ideas [1]. The first patch fixes incorrect use of "x is 0" or "x is 'foo'". Result of this operations is implementation details. The second patch changes non-idiomatic use of "x == None" or "x == True". [1] http://comments.gmane.org/gmane.comp.python.ideas/16547 ---------- files: is_int_or_str.patch keywords: patch messages: 172467 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Fix is/== misuse type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27503/is_int_or_str.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 11:55:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Oct 2012 09:55:40 +0000 Subject: [issue16172] Fix is/== misuse In-Reply-To: <1349776494.9.0.428146020554.issue16172@psf.upfronthosting.co.za> Message-ID: <1349776540.13.0.621351717151.issue16172@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file27504/equals_none_or_bool.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 11:56:55 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 09 Oct 2012 09:56:55 +0000 Subject: [issue16172] Fix is/== misuse In-Reply-To: <1349776494.9.0.428146020554.issue16172@psf.upfronthosting.co.za> Message-ID: <1349776615.43.0.754190548678.issue16172@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- components: +Tests nosy: +ezio.melotti stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 12:15:44 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Oct 2012 10:15:44 +0000 Subject: [issue16170] remove Linux skip from test_subprocess's test_executable() test In-Reply-To: <1349746875.36.0.803736287299.issue16170@psf.upfronthosting.co.za> Message-ID: <1349777744.97.0.575088079752.issue16170@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Try prefixing "doesnotexist" with the same dirname as sys.executable (i.e. `os.path.join(os.path.dirname(sys.executable), "doesnotexist")`). Python under Unix uses its own path to determine where the standard library is, and it does so by inspecting argv[0]. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 12:17:10 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Oct 2012 10:17:10 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349706807.82.0.556520783402.issue16166@psf.upfronthosting.co.za> Message-ID: <1349777830.17.0.483258728907.issue16166@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > If you prefer two macros instead of three then we should name them > PY_IS_LITTLE_ENDIAN and PY_IS_BIG_ENDIAN. Fine with me. Having three macros is pointless complication. > If I understand you correctly than we can't have a configure definition > and need macro magic like brg_endian.h. Replicating the current WORDS_BIGENDIAN logic should be enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 12:23:53 2012 From: report at bugs.python.org (Baptiste Mispelon) Date: Tue, 09 Oct 2012 10:23:53 +0000 Subject: [issue16173] Wrong offset on SyntaxError when identifier contains non-ascii characters Message-ID: <1349778233.78.0.111302090144.issue16173@psf.upfronthosting.co.za> New submission from Baptiste Mispelon: When a syntax error happens, the exception that gets printed has an extra line with a caret that helps locate the error. If the line also contains an identifier with non-ascii characters, then this caret is misaligned (too far on the right). I've investigated briefly and it seems that the offset attribute on the SyntaxError has a wrong value: for varname in ['a', '?', '?']: # 1, 2 and 3 bytes try: exec("%s$" % varname) # SyntaxError except SyntaxError as e: print(e.offset) # should be 2 The example above prints 2, 3, and 4 when it should be printing 2 every time. It seems that the calculation of the offset takes into account the size in bytes instead of the size in characters. I've tested and reproduced the issue on 3.2.2 and on a recent clone of the mercurial repository (dd5e98ddcd39). ---------- components: Interpreter Core messages: 172470 nosy: bmispelon priority: normal severity: normal status: open title: Wrong offset on SyntaxError when identifier contains non-ascii characters type: behavior versions: Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 12:25:19 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 09 Oct 2012 10:25:19 +0000 Subject: [issue16173] Wrong offset on SyntaxError when identifier contains non-ascii characters In-Reply-To: <1349778233.78.0.111302090144.issue16173@psf.upfronthosting.co.za> Message-ID: <1349778319.76.0.0568613818708.issue16173@psf.upfronthosting.co.za> Ezio Melotti added the comment: See #2382. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 12:32:30 2012 From: report at bugs.python.org (Berker Peksag) Date: Tue, 09 Oct 2012 10:32:30 +0000 Subject: [issue16174] Fix suggested usage of dummy_threading module Message-ID: <1349778750.52.0.861421391329.issue16174@psf.upfronthosting.co.za> New submission from Berker Peksag: The suggested usage should be like this: try: import threading except ImportError: import dummy_threading as threading See: - http://hg.python.org/cpython/file/ce0d0d052494/Lib/queue.py#l3 - http://hg.python.org/cpython/file/ce0d0d052494/Lib/sched.py#l34 - http://hg.python.org/cpython/file/ce0d0d052494/Lib/socketserver.py#l137 ---------- assignee: docs at python components: Documentation files: fix-dummy-threading-usage.diff keywords: patch messages: 172472 nosy: berker.peksag, docs at python priority: normal severity: normal status: open title: Fix suggested usage of dummy_threading module versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27505/fix-dummy-threading-usage.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 12:45:20 2012 From: report at bugs.python.org (Michael Foord) Date: Tue, 09 Oct 2012 10:45:20 +0000 Subject: [issue16164] there is no easy way to force unittest.main to use stdout rather than stderr In-Reply-To: <1349697500.62.0.333745951917.issue16164@psf.upfronthosting.co.za> Message-ID: <1349779520.54.0.366714423467.issue16164@psf.upfronthosting.co.za> Michael Foord added the comment: Unfortunately subclassing core components is the *intended* mechanism for customising unittest behaviour. Changing this is possible, but is a big job with very extensive changes. I don't think this request is *invalid* per-se, but it isn't something that we're about to change and there are much higher priorities for providing customization points for unittest. Closing as wont fix, but eventually hopefully it will be possible to do without requiring changes in unittest. (And it *can't* be fixed in Python 2.6 or 2.7 as it isn't a bug and no new features are being added to these versions - so I've changed the tags even though I'm closing it.) ---------- assignee: -> michael.foord resolution: -> wont fix stage: -> committed/rejected status: open -> closed versions: +Python 3.4 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 12:45:20 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Oct 2012 10:45:20 +0000 Subject: [issue16174] Fix suggested usage of dummy_threading module In-Reply-To: <1349778750.52.0.861421391329.issue16174@psf.upfronthosting.co.za> Message-ID: <3XbZpS1g9rzLwN@mail.python.org> Roundup Robot added the comment: New changeset 7de9c620716e by Andrew Svetlov in branch '3.2': Issue #16174: Fix suggested usage of dummy_threading module. http://hg.python.org/cpython/rev/7de9c620716e New changeset f02974773a71 by Andrew Svetlov in branch '3.3': Merge issue #16174: Fix suggested usage of dummy_threading module. http://hg.python.org/cpython/rev/f02974773a71 New changeset a93efd445982 by Andrew Svetlov in branch 'default': Merge issue #16174: Fix suggested usage of dummy_threading module. http://hg.python.org/cpython/rev/a93efd445982 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 12:46:09 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 09 Oct 2012 10:46:09 +0000 Subject: [issue16174] Fix suggested usage of dummy_threading module In-Reply-To: <1349778750.52.0.861421391329.issue16174@psf.upfronthosting.co.za> Message-ID: <1349779569.59.0.17105471253.issue16174@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks, Berker. ---------- nosy: +asvetlov resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 14:02:16 2012 From: report at bugs.python.org (Michael Vogt) Date: Tue, 09 Oct 2012 12:02:16 +0000 Subject: [issue16162] Py_FileSystemDefaultEncoding should be updated on locale.setlocale() In-Reply-To: <1349697187.89.0.133420695321.issue16162@psf.upfronthosting.co.za> Message-ID: <1349784136.18.0.613721497876.issue16162@psf.upfronthosting.co.za> Michael Vogt added the comment: Thanks for this detailed explaination! I will workaround this outside of python (that is easy ;) - I just thought that it would be a good idea to be able to change the fsencoding (and therefore send the patch), but in the light of e.g. sys.path it seems to be indeed a pretty bad idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 14:55:27 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Oct 2012 12:55:27 +0000 Subject: [issue16169] ctypes.WinError() confuses errno with winerror In-Reply-To: <1349734097.4.0.108959559992.issue16169@psf.upfronthosting.co.za> Message-ID: <3XbdhZ4VGmzR0Y@mail.python.org> Roundup Robot added the comment: New changeset a3d65edc3b04 by Richard Oudkerk in branch '3.3': Issue #16169: Fix ctypes.WinError()'s confusion between errno and winerror http://hg.python.org/cpython/rev/a3d65edc3b04 New changeset d3c4dcd9a048 by Richard Oudkerk in branch 'default': Issue #16169: Merge http://hg.python.org/cpython/rev/d3c4dcd9a048 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 15:08:02 2012 From: report at bugs.python.org (Brett Cannon) Date: Tue, 09 Oct 2012 13:08:02 +0000 Subject: [issue15641] Clean up importlib for Python 3.4 In-Reply-To: <1344888035.57.0.935580041455.issue15641@psf.upfronthosting.co.za> Message-ID: <1349788082.27.0.770321305291.issue15641@psf.upfronthosting.co.za> Brett Cannon added the comment: Finder is only documented as deprecated; actually making it work with a reasonable warning is too much of a pain for such little gain. So it can just stay in as there is no maintenance burden. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 15:12:07 2012 From: report at bugs.python.org (Brett Cannon) Date: Tue, 09 Oct 2012 13:12:07 +0000 Subject: [issue15111] Wrong ImportError message with importlib In-Reply-To: <1340151446.59.0.121813331775.issue15111@psf.upfronthosting.co.za> Message-ID: <1349788327.08.0.779293750567.issue15111@psf.upfronthosting.co.za> Brett Cannon added the comment: This can get fixed in 3.3.1, which is why I left Python 3.3 as an affected version. Hopefully I can get to a fix this week. I need to write a test showing that a module that doesn't exist as specified in a fromlist is silently ignored, but if a module in a fromlist does exist *but* triggers an ImportError itself while being imported that exception propagates. Then I need to come up with a fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 15:47:30 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Oct 2012 13:47:30 +0000 Subject: [issue12322] ElementPath 1.3 expressions documentation In-Reply-To: <1307959369.7.0.162667287307.issue12322@psf.upfronthosting.co.za> Message-ID: <3Xbfrd6YsCzQyZ@mail.python.org> Roundup Robot added the comment: New changeset 79231a12567a by Eli Bendersky in branch '3.3': Issue #12322: clarify xpath reference for cases where the path reaches ancestors of the start element. Also add missing markup for a None. Thanks to patrick vrijlandt and Mike Hoy for the report and initial patches. http://hg.python.org/cpython/rev/79231a12567a New changeset 5cb3c08997e6 by Eli Bendersky in branch 'default': Merge 3.3 http://hg.python.org/cpython/rev/5cb3c08997e6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 15:48:43 2012 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 09 Oct 2012 13:48:43 +0000 Subject: [issue12322] ElementPath 1.3 expressions documentation In-Reply-To: <1307959369.7.0.162667287307.issue12322@psf.upfronthosting.co.za> Message-ID: <1349790523.05.0.529854153153.issue12322@psf.upfronthosting.co.za> Eli Bendersky added the comment: Changes pushed. Thanks for the report and patches. Mike - a note for the future: when you create an updated patch, create it anew vs. a clean repo. Don't "compound" patches. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 16:06:27 2012 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 09 Oct 2012 14:06:27 +0000 Subject: [issue16082] xml.etree.ElementTree.tostringlist does not conform to its documentation In-Reply-To: <1348829487.02.0.837389148596.issue16082@psf.upfronthosting.co.za> Message-ID: <1349791587.16.0.271523639465.issue16082@psf.upfronthosting.co.za> Eli Bendersky added the comment: Einar, TypeError is raised because tostring/tostringlist return bytes with the default encoding, and you can't join bytes on "" (which is unicode). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 16:09:59 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 09 Oct 2012 14:09:59 +0000 Subject: [issue16169] ctypes.WinError() confuses errno with winerror In-Reply-To: <1349734097.4.0.108959559992.issue16169@psf.upfronthosting.co.za> Message-ID: <1349791799.17.0.295263698339.issue16169@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 16:19:21 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Oct 2012 14:19:21 +0000 Subject: [issue16082] xml.etree.ElementTree.tostringlist does not conform to its documentation In-Reply-To: <1348829487.02.0.837389148596.issue16082@psf.upfronthosting.co.za> Message-ID: <3XbgYN5JkyzR1J@mail.python.org> Roundup Robot added the comment: New changeset ff925e135e60 by Eli Bendersky in branch '3.3': Issue #16082: clarify the documentation of tostring[list] saying that it may generate a bytestring, depending on the given encoding. http://hg.python.org/cpython/rev/ff925e135e60 New changeset 6e407fcf7380 by Eli Bendersky in branch 'default': Merge 3.3 http://hg.python.org/cpython/rev/6e407fcf7380 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 17:07:42 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Oct 2012 15:07:42 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349706807.82.0.556520783402.issue16166@psf.upfronthosting.co.za> Message-ID: <1349795262.04.0.757051467156.issue16166@psf.upfronthosting.co.za> Christian Heimes added the comment: I think it's not enough as some platforms prefix/suffix the macros with dashes. The values must be compared to BYTE_ORDER iff the macro is defined. too. I've checked some machines of the Snakebite network and came up with this macro cascade: /* * The endianess (byte order) can be defined in several ways. Some platforms * define either LITTLE_ENDIAN or BIG_ENDIAN while other platforms define * both and require comparison to BYTE_ORDER. Sometimes the macros are * prefixed or suffixed with one or two dashes, too. SPAM seems to be an * alias of __SPAM an all platforms that have SPAM. * The endian check can't be handled in a configure step as it would break * Apple's universal builds. */ #if defined(__BYTE_ORDER) # if defined(__BIG_ENDIAN) && __BYTE_ORDER == __BIG_ENDIAN # define PY_IS_BIG_ENDIAN 1 # elif defined(__LITTLE_ENDIAN) && __BYTE_ORDER == __LITTLE_ENDIAN # define PY_IS_LITTLE_ENDIAN 1 # else # error "__BYTE_ORDER not in (__BIG_ENDIAN, __LITTLE_ENDIAN)" # endif #elif defined(__BIG_ENDIAN) && !defined(__LITTLE_ENDIAN) # define PY_IS_BIG_ENDIAN 1 #elif defined(__LITTLE_ENDIAN) && !defined(__BIG_ENDIAN) # define PY_IS_LITTLE_ENDIAN 1 /* and know the same block with just one dash as prefix */ #elif defined(_BYTE_ORDER) # if defined(_BIG_ENDIAN) && _BYTE_ORDER == _BIG_ENDIAN # define PY_IS_BIG_ENDIAN 1 # elif defined(_LITTLE_ENDIAN) && _BYTE_ORDER == _LITTLE_ENDIAN # define PY_IS_LITTLE_ENDIAN 1 # else # error "_BYTE_ORDER not in (_BIG_ENDIAN, _LITTLE_ENDIAN)" # endif #elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) # define PY_IS_BIG_ENDIAN 1 #elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) # define PY_IS_LITTLE_ENDIAN 1 /* extra apple */ #elif defined(__APPLE__) # if defined(__BIG_ENDIAN__) # define PY_IS_BIG_ENDIAN 1 # elif defined(__LITTLE_ENDIAN__) # define PY_IS_LITTLE_ENDIAN 1 # else # error "__APPLE__ but neither __BIG_ENDIAN__ nor __LITTLE_ENDIAN__" # endif /* Windows */ #elif defined(WIN32) # define PY_IS_LITTLE_ENDIAN 1 #else # error "Unable to detect endianess" #endif ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 17:16:41 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Oct 2012 15:16:41 +0000 Subject: [issue16172] Fix is/== misuse In-Reply-To: <1349776494.9.0.428146020554.issue16172@psf.upfronthosting.co.za> Message-ID: <3XbhqX2G7wzR2x@mail.python.org> Roundup Robot added the comment: New changeset 842276ae4a3f by Benjamin Peterson in branch '3.3': compare with equality not identity (issue #16172) http://hg.python.org/cpython/rev/842276ae4a3f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 17:17:48 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 09 Oct 2012 15:17:48 +0000 Subject: [issue16172] Fix is/== misuse In-Reply-To: <1349776494.9.0.428146020554.issue16172@psf.upfronthosting.co.za> Message-ID: <1349795868.25.0.583196133488.issue16172@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Also http://hg.python.org/cpython/rev/332b93ce7bf9 ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 17:22:23 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Oct 2012 15:22:23 +0000 Subject: [issue16125] open accepts arbitrary mode strings as long as they contain U In-Reply-To: <1349331092.45.0.724908738028.issue16125@psf.upfronthosting.co.za> Message-ID: <1349796143.39.0.754853699244.issue16125@psf.upfronthosting.co.za> R. David Murray added the comment: I think we'd probably better find out if there is support for applying it before you go to the trouble of writing it. It might be appropriate as a -3 warning, since the behavior changes in python3. I would be +1 for applying it as a -3 warning, and -0 as a not-silenced-by-default warning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 17:30:01 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Oct 2012 15:30:01 +0000 Subject: [issue16173] Wrong offset on SyntaxError when identifier contains non-ascii characters In-Reply-To: <1349778233.78.0.111302090144.issue16173@psf.upfronthosting.co.za> Message-ID: <1349796601.71.0.963883225779.issue16173@psf.upfronthosting.co.za> R. David Murray added the comment: Ezio, is there a reason you didn't close this as a duplicate? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 17:30:05 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 09 Oct 2012 15:30:05 +0000 Subject: [issue16125] open accepts arbitrary mode strings as long as they contain U In-Reply-To: <1349331092.45.0.724908738028.issue16125@psf.upfronthosting.co.za> Message-ID: <1349796605.53.0.372149176526.issue16125@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 17:30:14 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 09 Oct 2012 15:30:14 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349706807.82.0.556520783402.issue16166@psf.upfronthosting.co.za> Message-ID: <1349796614.19.0.390119869826.issue16166@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 17:31:31 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 09 Oct 2012 15:31:31 +0000 Subject: [issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line. In-Reply-To: <1205817752.04.0.892564898323.issue2382@psf.upfronthosting.co.za> Message-ID: <1349796691.88.0.337131370688.issue2382@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 18:09:14 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Oct 2012 16:09:14 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper Message-ID: <1349798954.84.0.328560890888.issue16175@psf.upfronthosting.co.za> New submission from Christian Heimes: Guido has expressed [1] that he like to see IOCP support in the stdlib for the grant unified asyncore interface. Quote from MSDN [2]: --- I/O completion ports provide an efficient threading model for processing multiple asynchronous I/O requests on a multiprocessor system. When a process creates an I/O completion port, the system creates an associated queue object for requests whose sole purpose is to service these requests. Processes that handle many concurrent asynchronous I/O requests can do so more quickly and efficiently by using I/O completion ports in conjunction with a pre-allocated a thread pool than by creating threads at the time they receive an I/O request. --- I've found a couple of interfaces to IOCP in Python projects. Twisted [3] has a Cython based interface to the IOCP API, Cogen [4] uses ctypes wrapper. I couldn't find IOCP support in Tornado. I favor a C implementation over ctypes. What's our attitude to Cython? Personally I like Cython and use it in several projects but I'm not sure if we shall use it in core development. Christian [1] http://mail.python.org/pipermail/python-ideas/2012-October/016539.html [2] http://msdn.microsoft.com/en-us/library/aa365198%28VS.85%29.aspx [3] http://twistedmatrix.com/trac/browser/trunk/twisted/internet/iocpreactor/iocpsupport/ [4] http://code.google.com/p/cogen/source/browse/trunk/cogen/core/proactors ---------- components: Extension Modules, Windows messages: 172489 nosy: christian.heimes, exarkun, gvanrossum priority: normal severity: normal status: open title: Add I/O Completion Ports wrapper type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 18:12:22 2012 From: report at bugs.python.org (Brian Curtin) Date: Tue, 09 Oct 2012 16:12:22 +0000 Subject: [issue16176] platform.platform() identifies Windows 8 as post2008Server Message-ID: <1349799142.95.0.909627211255.issue16176@psf.upfronthosting.co.za> New submission from Brian Curtin: >>> platform.platform() 'Windows-post2008Server-6.2.9200' The change is trivial, just accounting for a point release of 2 (from the major release 6). --- a/Lib/platform.py +++ b/Lib/platform.py @@ -595,8 +595,13 @@ release = '7' else: release = '2008ServerR2' + elif min == 2: + if product_type == VER_NT_WORKSTATION: + release = '8' + else: + release = '2012Server' else: - release = 'post2008Server' + release = 'post2012Server' ---------- assignee: brian.curtin components: Library (Lib), Windows messages: 172490 nosy: brian.curtin priority: normal severity: normal status: open title: platform.platform() identifies Windows 8 as post2008Server type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 18:18:35 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Oct 2012 16:18:35 +0000 Subject: [issue9514] platform.linux_distribution() under Ubuntu returns ('debian', 'squeeze/sid', '') In-Reply-To: <1280944069.64.0.760525549047.issue9514@psf.upfronthosting.co.za> Message-ID: <1349799515.53.0.22569314354.issue9514@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes stage: -> needs patch versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 18:32:25 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Oct 2012 16:32:25 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349777830.17.0.483258728907.issue16166@psf.upfronthosting.co.za> Message-ID: <201210091932.08849.storchaka@gmail.com> Serhiy Storchaka added the comment: > Fine with me. Having three macros is pointless complication. Don't having two macros for one boolean value pointless complication too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 18:37:26 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 09 Oct 2012 16:37:26 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper In-Reply-To: <1349798954.84.0.328560890888.issue16175@psf.upfronthosting.co.za> Message-ID: <1349800646.28.0.128442808939.issue16175@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > Cogen [4] uses ctypes wrapper. In the code for the IOCP reactor only ctypes.FormatError() is used from ctypes. It uses pywin32 instead. ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 18:42:59 2012 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 09 Oct 2012 16:42:59 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper In-Reply-To: <1349798954.84.0.328560890888.issue16175@psf.upfronthosting.co.za> Message-ID: <1349800979.03.0.94771417834.issue16175@psf.upfronthosting.co.za> Guido van Rossum added the comment: Tough choice. I'm not in favor of using either ctypes or Cython for this purpose -- ctypes because it's brittle, and Cython because it is a huge complicated system of its own that I would rather not depend on. Cython already depends on CPython, so CPython depending on Cython would essentially marry the two systems. How hard could it be to write a C++ extension wrapping IOCP? From reading the docs there are only a handful API methods (of which the main one stands out as a nadir of API design -- it's like the designers were told they could only add one function... :-). However a bigger problem probably is that it only makes sense if you also wrap the rest of the handle-based I/O functionality on Windows. The docs talk about "overlapping" I/O which I presume is a form of async I/O. Most likely we'll have to look at Mark Hammond's venerable win32 package for that. Maybe it makes most sense to have IOCP integrated there? (For all I know it's already supported...) The main think I want to be sure of is to design the abstract I/O loop (aka reactor) general enough that it will be easy to hook in IOCP-based event-generating and -handling components. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 18:43:25 2012 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 09 Oct 2012 16:43:25 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper In-Reply-To: <1349798954.84.0.328560890888.issue16175@psf.upfronthosting.co.za> Message-ID: <1349801005.0.0.508362176922.issue16175@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: +mhammond _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 18:53:35 2012 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 09 Oct 2012 16:53:35 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper In-Reply-To: <1349798954.84.0.328560890888.issue16175@psf.upfronthosting.co.za> Message-ID: <1349801615.86.0.218028756028.issue16175@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 18:58:35 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Oct 2012 16:58:35 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper In-Reply-To: <1349798954.84.0.328560890888.issue16175@psf.upfronthosting.co.za> Message-ID: <1349801915.58.0.575584369153.issue16175@psf.upfronthosting.co.za> Christian Heimes added the comment: Guido, Richard pointed out that pywin32 already wraps the necessary bits of IOCP. The functions are in the win32file package. Cogen's reactor uses pywin32 instead of ctypes, too. The library has an *additional* ctypes based interface in the directory ctypes_iocp_impl. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 19:07:10 2012 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 09 Oct 2012 17:07:10 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper In-Reply-To: <1349798954.84.0.328560890888.issue16175@psf.upfronthosting.co.za> Message-ID: <1349802430.89.0.568380759895.issue16175@psf.upfronthosting.co.za> Guido van Rossum added the comment: So do we need this ticket at all? It seems there's no code to write -- all we need to do is make sure we can integrate IOCP in the future standard reactor interface. That hardly seems a reason to keep a ticket open. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 19:13:10 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Oct 2012 17:13:10 +0000 Subject: [issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line. In-Reply-To: <1205817752.04.0.892564898323.issue2382@psf.upfronthosting.co.za> Message-ID: <1349802790.43.0.0378256211587.issue2382@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 19:15:54 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 09 Oct 2012 17:15:54 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper In-Reply-To: <1349798954.84.0.328560890888.issue16175@psf.upfronthosting.co.za> Message-ID: <1349802954.01.0.777482350469.issue16175@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Note that since Python 3.3, multiprocessing and _winapi make some use of overlapped IO. One can use _winapi.ReadFile() and _winapi.WriteFile() to do overlapped IO on normal socket handles created using socket.socket(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 19:32:20 2012 From: report at bugs.python.org (Matthias Klose) Date: Tue, 09 Oct 2012 17:32:20 +0000 Subject: [issue9514] platform.linux_distribution() under Ubuntu returns ('debian', 'squeeze/sid', '') In-Reply-To: <1280944069.64.0.760525549047.issue9514@psf.upfronthosting.co.za> Message-ID: <1349803940.29.0.295277210547.issue9514@psf.upfronthosting.co.za> Matthias Klose added the comment: http://www.freedesktop.org/software/systemd/man/os-release.html is the next step, with the advantage of the definition of the file format for /etc/os-release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 19:45:21 2012 From: report at bugs.python.org (Brian Curtin) Date: Tue, 09 Oct 2012 17:45:21 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper In-Reply-To: <1349798954.84.0.328560890888.issue16175@psf.upfronthosting.co.za> Message-ID: <1349804721.41.0.0550362279959.issue16175@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 20:37:45 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Oct 2012 18:37:45 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <201210091932.08849.storchaka@gmail.com> Message-ID: <1349807775.3334.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > > Fine with me. Having three macros is pointless complication. > > Don't having two macros for one boolean value pointless complication too? No, since you need only one to get going. Either: #ifdef PY_LITTLE_ENDIAN ... or: #ifdef PY_BIG_ENDIAN ... So this is really a simplification compared to the awkward: #ifdef PY_ENDIAN == BIG_ENDIAN ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 18:38:57 2012 From: report at bugs.python.org (Brian Keegan) Date: Tue, 09 Oct 2012 16:38:57 +0000 Subject: [issue16177] IDLE Crash on Open Parens Message-ID: <1349800735.66.0.856769538072.issue16177@psf.upfronthosting.co.za> New submission from Brian Keegan: I am running IDLE on Mac OS X 10.8.2. Since a recent XCode update, every time I type an open parentheses into either the IDLE shell or an IDLE script, the program hangs and crashes. Uninstalling and re-installing Python 2.7.3 and IDLE have not solved the problem. Thank you for your help. Here is the stack trace: === Process: Python [939] Path: /Applications/Python 2.7/IDLE.app/Contents/MacOS/Python Identifier: org.python.IDLE Version: 2.7.3 (2.7.3) Code Type: X86 (Native) Parent Process: launchd [244] User ID: 501 Date/Time: 2012-10-09 12:35:26.330 -0400 OS Version: Mac OS X 10.8.2 (12C60) Report Version: 10 Interval Since Last Report: 3854 sec Crashes Since Last Report: 2 Per-App Interval Since Last Report: 414 sec Per-App Crashes Since Last Report: 2 Anonymous UUID: D6AA1A7A-720D-AF63-8D8A-D288BC5CC1FC Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000002, 0x0000000000000000 Application Specific Information: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error (1000) creating window shape' Application Specific Backtrace 1: 0 CoreFoundation 0x94d6012b __raiseError + 219 1 libobjc.A.dylib 0x9a3c652e objc_exception_throw + 230 2 CoreFoundation 0x94cbfbbb +[NSException raise:format:] + 139 3 AppKit 0x91f4a68c _NXCreateWindowWithStyleMask + 302 4 AppKit 0x91fe11f5 _NSCreateWindow + 57 5 AppKit 0x91e5f033 -[NSWindow _commonAwake] + 2066 6 AppKit 0x91f0a4c0 -[NSWindow _makeKeyRegardlessOfVisibility] + 104 7 AppKit 0x91f0a416 -[NSWindow makeKeyAndOrderFront:] + 35 8 Tk 0x00643e0c XMapWindow + 149 9 Tk 0x0064aaac TkWmMapWindow + 289 10 Tk 0x005a37c3 Tk_MapWindow + 89 11 Tk 0x005ad80e MapFrame + 72 12 Tcl 0x00513858 TclServiceIdle + 61 13 Tcl 0x004f5b6b Tcl_DoOneEvent + 342 14 Tk 0x0057f536 Tk_UpdateObjCmd + 190 15 Tcl 0x004868a3 TclEvalObjvInternal + 763 16 Tcl 0x004878c6 Tcl_EvalObjv + 72 17 _tkinter.so 0x002d1a62 Tkapp_Call + 210 18 Python 0x000c20d0 PyEval_EvalFrameEx + 26112 19 Python 0x000c334b PyEval_EvalFrameEx + 30843 20 Python 0x000c334b PyEval_EvalFrameEx + 30843 21 Python 0x000c442c PyEval_EvalCodeEx + 1996 22 Python 0x0003efbb function_call + 139 23 Python 0x0000d855 PyObject_Call + 85 24 Python 0x000bf937 PyEval_EvalFrameEx + 15975 25 Python 0x000c442c PyEval_EvalCodeEx + 1996 26 Python 0x0003efbb function_call + 139 27 Python 0x0000d855 PyObject_Call + 85 28 Python 0x000bf937 PyEval_EvalFrameEx + 15975 29 Python 0x000c442c PyEval_EvalCodeEx + 1996 30 Python 0x0003efbb function_call + 139 31 Python 0x0000d855 PyObject_Call + 85 32 Python 0x0001fda5 instancemethod_call + 389 33 Python 0x0000d855 PyObject_Call + 85 34 Python 0x000ba85e PyEval_CallObjectWithKeywords + 78 35 _tkinter.so 0x002cfa24 PythonCmd + 340 36 Tcl 0x004830c1 TclInvokeStringCommand + 96 37 Tcl 0x004868a3 TclEvalObjvInternal + 763 38 Tcl 0x004c35a7 TclExecuteByteCode + 4691 39 Tcl 0x004cc82c TclCompEvalObj + 448 40 Tcl 0x00487cd0 TclEvalObjEx + 877 41 Tcl 0x00487dd1 Tcl_EvalObjEx + 47 42 Tcl 0x00513b22 AfterProc + 83 43 Tcl 0x005139fc TimerHandlerEventProc + 87 44 Tcl 0x004f5867 Tcl_ServiceEvent + 160 45 Tcl 0x004f5b5a Tcl_DoOneEvent + 325 46 _tkinter.so 0x002cf5e2 Tkapp_MainLoop + 450 47 Python 0x000c20d0 PyEval_EvalFrameEx + 26112 48 Python 0x000c442c PyEval_EvalCodeEx + 1996 49 Python 0x000c1ddb PyEval_EvalFrameEx + 25355 50 Python 0x000c334b PyEval_EvalFrameEx + 30843 51 Python 0x000c442c PyEval_EvalCodeEx + 1996 52 Python 0x000c4577 PyEval_EvalCode + 87 53 Python 0x000e8b2c PyRun_FileExFlags + 172 54 Python 0x000e8e94 PyRun_SimpleFileExFlags + 596 55 Python 0x00100efc Py_Main + 3404 56 Python 0x00001f65 start + 53 Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 com.apple.CoreFoundation 0x94d60947 ___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___ + 7 1 libobjc.A.dylib 0x9a3c652e objc_exception_throw + 230 2 com.apple.CoreFoundation 0x94cbfbbb +[NSException raise:format:] + 139 3 com.apple.AppKit 0x91f4a68c _NXCreateWindowWithStyleMask + 302 4 com.apple.AppKit 0x91fe11f5 _NSCreateWindow + 57 5 com.apple.AppKit 0x91e5f033 -[NSWindow _commonAwake] + 2066 6 com.apple.AppKit 0x91f0a4c0 -[NSWindow _makeKeyRegardlessOfVisibility] + 104 7 com.apple.AppKit 0x91f0a416 -[NSWindow makeKeyAndOrderFront:] + 35 8 Tk 0x00643e0c XMapWindow + 149 9 Tk 0x0064aaac TkWmMapWindow + 289 10 Tk 0x005a37c3 Tk_MapWindow + 89 11 Tk 0x005ad80e MapFrame + 72 12 Tcl 0x00513858 TclServiceIdle + 61 13 Tcl 0x004f5b6b Tcl_DoOneEvent + 342 14 Tk 0x0057f536 Tk_UpdateObjCmd + 190 15 Tcl 0x004868a3 TclEvalObjvInternal + 763 16 Tcl 0x004878c6 Tcl_EvalObjv + 72 17 _tkinter.so 0x002d1a62 Tkapp_Call + 210 18 org.python.python 0x000c20d0 PyEval_EvalFrameEx + 26112 19 org.python.python 0x000c334b PyEval_EvalFrameEx + 30843 20 org.python.python 0x000c334b PyEval_EvalFrameEx + 30843 21 org.python.python 0x000c442c PyEval_EvalCodeEx + 1996 22 org.python.python 0x0003efbb function_call + 139 23 org.python.python 0x0000d855 PyObject_Call + 85 24 org.python.python 0x000bf937 PyEval_EvalFrameEx + 15975 25 org.python.python 0x000c442c PyEval_EvalCodeEx + 1996 26 org.python.python 0x0003efbb function_call + 139 27 org.python.python 0x0000d855 PyObject_Call + 85 28 org.python.python 0x000bf937 PyEval_EvalFrameEx + 15975 29 org.python.python 0x000c442c PyEval_EvalCodeEx + 1996 30 org.python.python 0x0003efbb function_call + 139 31 org.python.python 0x0000d855 PyObject_Call + 85 32 org.python.python 0x0001fda5 instancemethod_call + 389 33 org.python.python 0x0000d855 PyObject_Call + 85 34 org.python.python 0x000ba85e PyEval_CallObjectWithKeywords + 78 35 _tkinter.so 0x002cfa24 PythonCmd + 340 36 Tcl 0x004830c1 TclInvokeStringCommand + 96 37 Tcl 0x004868a3 TclEvalObjvInternal + 763 38 Tcl 0x004c35a7 TclExecuteByteCode + 4691 39 Tcl 0x004cc82c TclCompEvalObj + 448 40 Tcl 0x00487cd0 TclEvalObjEx + 877 41 Tcl 0x00487dd1 Tcl_EvalObjEx + 47 42 Tcl 0x00513b22 AfterProc + 83 43 Tcl 0x005139fc TimerHandlerEventProc + 87 44 Tcl 0x004f5867 Tcl_ServiceEvent + 160 45 Tcl 0x004f5b5a Tcl_DoOneEvent + 325 46 _tkinter.so 0x002cf5e2 Tkapp_MainLoop + 450 47 org.python.python 0x000c20d0 PyEval_EvalFrameEx + 26112 48 org.python.python 0x000c442c PyEval_EvalCodeEx + 1996 49 org.python.python 0x000c1ddb PyEval_EvalFrameEx + 25355 50 org.python.python 0x000c334b PyEval_EvalFrameEx + 30843 51 org.python.python 0x000c442c PyEval_EvalCodeEx + 1996 52 org.python.python 0x000c4577 PyEval_EvalCode + 87 53 org.python.python 0x000e8b2c PyRun_FileExFlags + 172 54 org.python.python 0x000e8e94 PyRun_SimpleFileExFlags + 596 55 org.python.python 0x00100efc Py_Main + 3404 56 Python 0x00001f65 start + 53 Thread 1:: Dispatch queue: com.apple.libdispatch-manager 0 libsystem_kernel.dylib 0x92c879ae kevent + 10 1 libdispatch.dylib 0x9874bc71 _dispatch_mgr_invoke + 993 2 libdispatch.dylib 0x9874b7a9 _dispatch_mgr_thread + 53 Thread 2: 0 libsystem_kernel.dylib 0x92c86be6 __select + 10 1 Tcl 0x0052dddc NotifierThreadProc + 628 2 libsystem_c.dylib 0x90024557 _pthread_start + 344 3 libsystem_c.dylib 0x9000ecee thread_start + 34 Thread 3: 0 libsystem_kernel.dylib 0x92c870ee __workq_kernreturn + 10 1 libsystem_c.dylib 0x9002704c _pthread_workq_return + 45 2 libsystem_c.dylib 0x90026e19 _pthread_wqthread + 448 3 libsystem_c.dylib 0x9000ecca start_wqthread + 30 Thread 4: 0 libsystem_kernel.dylib 0x92c870ee __workq_kernreturn + 10 1 libsystem_c.dylib 0x9002704c _pthread_workq_return + 45 2 libsystem_c.dylib 0x90026e19 _pthread_wqthread + 448 3 libsystem_c.dylib 0x9000ecca start_wqthread + 30 Thread 0 crashed with X86 Thread State (32-bit): eax: 0x00000001 ebx: 0x91f4a56c ecx: 0x00000000 edx: 0x00000000 edi: 0x9a3c6459 esi: 0x01344420 ebp: 0xbfffc778 esp: 0xbfffc770 ss: 0x00000023 efl: 0x00000282 eip: 0x94d60947 cs: 0x0000001b ds: 0x00000023 es: 0x00000023 fs: 0x00000000 gs: 0x0000000f cr2: 0x03e28000 Logical CPU: 0 Binary Images: 0x1000 - 0x1ff7 +Python (???) <29B5B804-F1D9-9479-C323-93A3CDC57AFB> /Applications/Python 2.7/IDLE.app/Contents/MacOS/Python 0x4000 - 0x143fef +org.python.python (2.7.3, [c] 2004-2012 Python Software Foundation. - 2.7.3) /Library/Frameworks/Python.framework/Versions/2.7/Python 0x2cb000 - 0x2d2ff7 +_tkinter.so (???) <2203E5FF-8BB5-890A-AADE-D6A2DD3660C8> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_tkinter.so 0x2f9000 - 0x2faff7 +_functools.so (???) <16121BC9-08BF-E95C-B0B5-0658E1C35A6E> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_functools.so 0x2fd000 - 0x2fdff7 +_bisect.so (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_bisect.so 0x476000 - 0x547ff7 +Tcl (8.5.12 - 8.5.12) <00EBD0B6-82ED-061A-624C-5B6CF37404A7> /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl 0x571000 - 0x66fff7 +Tk (8.5.12 - 8.5.12) /Library/Frameworks/Tk.framework/Versions/8.5/Tk 0x71c000 - 0x71fff7 +strop.so (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/strop.so 0x724000 - 0x72bff7 +_socket.so (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_socket.so 0x733000 - 0x737ff7 +_ssl.so (???) <4D9F69F6-22BE-925B-0DE2-4543AC97670B> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ssl.so 0x73c000 - 0x73dff7 +cStringIO.so (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cStringIO.so 0x741000 - 0x742ff7 +time.so (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/time.so 0x787000 - 0x78aff7 +_collections.so (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_collections.so 0x78f000 - 0x792ff7 +operator.so (???) <500ED0D7-8256-9177-FFBE-A062C8D4B5B1> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/operator.so 0x798000 - 0x79dff7 +itertools.so (???) <0AF90C35-D9B1-ED5D-D858-1EE69365C494> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/itertools.so 0x7a5000 - 0x7a6ff7 +_heapq.so (???) <5EADF056-B563-A561-7233-80BA83EB32FD> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_heapq.so 0x7aa000 - 0x7acff7 +select.so (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/select.so 0x7b1000 - 0x7b2ff7 +fcntl.so (???) <7088363F-1775-BA36-C287-17FD8AF19CA3> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/fcntl.so 0x7f5000 - 0x7f8ff7 +_struct.so (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_struct.so 0x1760000 - 0x1762fe7 +binascii.so (???) <0D4871C8-B6E6-CC90-A85F-69C3237D20A8> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/binascii.so 0x17e6000 - 0x17eaff7 +math.so (???) <8D0974C4-045D-7BAA-49A3-9F0EEEA93FF1> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/math.so 0x17ef000 - 0x17f0ff7 +_hashlib.so (???) <77A9F87D-DD81-778A-2F30-103E258B42C0> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_hashlib.so 0x17f4000 - 0x17f5ff7 +_random.so (???) <9AED8CAA-DAB6-4C13-4C48-5D6D19D84976> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_random.so 0x17f8000 - 0x17f9ff7 +_locale.so (???) <1E2000E4-CA1B-1FE1-4196-10CDBA41FEDE> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so 0x2240000 - 0x224eff7 +cPickle.so (???) <42F1F3CA-20AA-D04F-62ED-833137B12B6D> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cPickle.so 0x22ba000 - 0x22c7ff3 com.apple.Librarian (1.1 - 1) <88A55A5E-40FF-3234-8394-2317120B79AB> /System/Library/PrivateFrameworks/Librarian.framework/Versions/A/Librarian 0x22f2000 - 0x22f4fff libCoreFSCache.dylib (24.4) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreFSCache.dylib 0x22fb000 - 0x22fbff7 +cl_kernels (???) <73336EEE-EACC-468C-887B-2CE5E1754497> cl_kernels 0x3e15000 - 0x3e1dffc libcldcpuengine.dylib (2.1.19) /System/Library/Frameworks/OpenCL.framework/Libraries/libcldcpuengine.dylib 0x57fa000 - 0x57fbff5 +cl_kernels (???) <463016D5-EB14-4B36-8313-A61656D10AE2> cl_kernels 0x68f2000 - 0x68f3ff1 +cl_kernels (???) <0795B9F8-EECA-4C88-83D3-2D44F9092462> cl_kernels 0x7c0f000 - 0x7ca1ff7 unorm8_bgra.dylib (2.1.19) /System/Library/Frameworks/OpenCL.framework/Libraries/ImageFormats/unorm8_bgra.dylib 0x7ff9000 - 0x7ffaffd +cl_kernels (???) <9C926F47-0EC5-49C9-83F6-516C4A596F6E> cl_kernels 0xa000000 - 0xa092ff7 unorm8_argb.dylib (2.1.19) <1B67DB26-5B5D-3600-8049-D744F133BEB1> /System/Library/Frameworks/OpenCL.framework/Libraries/ImageFormats/unorm8_argb.dylib 0x8fefb000 - 0x8ff2de57 dyld (210.2.3) <23516BE4-29BE-350C-91C9-F36E7999F0F1> /usr/lib/dyld 0x90007000 - 0x9000dfff com.apple.phonenumbers (1.1 - 47) /System/Library/PrivateFrameworks/PhoneNumbers.framework/Versions/A/PhoneNumbers 0x9000e000 - 0x900cbfeb libsystem_c.dylib (825.25) /usr/lib/system/libsystem_c.dylib 0x900cc000 - 0x90130ff3 libstdc++.6.dylib (56) /usr/lib/libstdc++.6.dylib 0x90131000 - 0x90137fff libGFXShared.dylib (8.6.1) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib 0x90138000 - 0x90162ff9 com.apple.framework.Apple80211 (8.0.1 - 801.17) <8A8BBBFD-496B-35A6-A26E-ADF8D672D908> /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211 0x90163000 - 0x902dbff5 com.apple.QuartzCore (1.8 - 304.0) <0B0EC55A-9084-3E28-9A84-1813CE3FAA9B> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x902dc000 - 0x90333ff3 com.apple.Suggestions (2.0 - 102.1) /System/Library/PrivateFrameworks/Suggestions.framework/Versions/A/Suggestions 0x90334000 - 0x90350ff7 libPng.dylib (845) <14C43094-C670-3575-BF9B-3A967E05EAC0> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x90351000 - 0x90656ff7 com.apple.CoreServices.CarbonCore (1037.3 - 1037.3) <4571EDDC-704A-3FB1-B9A6-59870AA6165F> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore 0x90657000 - 0x9070bfff com.apple.coreui (2.0 - 181.1) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x9070c000 - 0x90767ff7 com.apple.AppleVAFramework (5.0.18 - 5.0.18) <4BA2AAEA-4936-375C-B4D8-4BBE2EDC7FF5> /System/Library/PrivateFrameworks/AppleVA.framework/Versions/A/AppleVA 0x90768000 - 0x907c2fff com.apple.Symbolication (1.3 - 93) <684ECF0D-D416-3DF8-8B5B-3902953853A8> /System/Library/PrivateFrameworks/Symbolication.framework/Versions/A/Symbolication 0x907c3000 - 0x9080aff3 com.apple.CoreMedia (1.0 - 926.62) <69B3835E-C02F-3935-AD39-83F8E81FB780> /System/Library/Frameworks/CoreMedia.framework/Versions/A/CoreMedia 0x9080b000 - 0x9080cffd com.apple.TrustEvaluationAgent (2.0 - 23) /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/TrustEvaluationAgent 0x9080d000 - 0x90851fff libGLU.dylib (8.6.1) <06BAFDCA-800C-35E3-B1A3-F05E105B86AB> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib 0x90852000 - 0x90c35ff3 com.apple.HIToolbox (2.0 - 625) <5A312E41-9940-363E-B891-90C4672E6850> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox 0x90c36000 - 0x90cbefff com.apple.PDFKit (2.7.2 - 2.7.2) <7AE7BAE9-4C21-3BFB-919E-5C6EEBBDFF75> /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/PDFKit.framework/Versions/A/PDFKit 0x90ce5000 - 0x90cfcff4 com.apple.CoreMediaAuthoring (2.1 - 914) <37C0A2C7-73B3-39BC-8DE1-4A6B75F115FC> /System/Library/PrivateFrameworks/CoreMediaAuthoring.framework/Versions/A/CoreMediaAuthoring 0x91405000 - 0x91406fff libdnsinfo.dylib (453.18) <41C7B8E2-2A81-31DE-BD8B-F0C29E169D4F> /usr/lib/system/libdnsinfo.dylib 0x91407000 - 0x914a7ff7 com.apple.QD (3.42 - 285) <1B8307C6-AFA8-312E-BA5B-679070EF2CA1> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD 0x914a8000 - 0x914b4ffa com.apple.CrashReporterSupport (10.8.2 - 415) /System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/CrashReporterSupport 0x914b5000 - 0x914b5fff libkeymgr.dylib (25) /usr/lib/system/libkeymgr.dylib 0x914b6000 - 0x914bcfff com.apple.print.framework.Print (8.0 - 258) <12AEAD24-6924-3923-9E4A-C5D21231E639> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print 0x914cb000 - 0x914ccfff libremovefile.dylib (23.1) <98622D14-DAAB-3AD8-A5D9-C322BF572A98> /usr/lib/system/libremovefile.dylib 0x914d3000 - 0x914deffb com.apple.DirectoryService.Framework (10.8 - 151.10) <234F4A14-60ED-300B-93B2-D5052878558F> /System/Library/Frameworks/DirectoryService.framework/Versions/A/DirectoryService 0x914df000 - 0x914edfff com.apple.opengl (1.8.6 - 1.8.6) <1AD1AE7B-B57B-35B5-B571-32A34F0DA737> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x914ee000 - 0x914fbff7 com.apple.AppleFSCompression (49 - 1.0) <166AA1F8-E50A-3533-A3B5-8737C5118CC3> /System/Library/PrivateFrameworks/AppleFSCompression.framework/Versions/A/AppleFSCompression 0x914fc000 - 0x914fdfff libsystem_sandbox.dylib (220) <4E42390B-25EC-3530-AF01-337E430C16EB> /usr/lib/system/libsystem_sandbox.dylib 0x914fe000 - 0x91505fff liblaunch.dylib (442.26.2) <310C99F8-0811-314D-9BB9-D0ED6DFA024B> /usr/lib/system/liblaunch.dylib 0x91506000 - 0x91508fff libdyld.dylib (210.2.3) <05D6FF2A-F09B-309D-95F7-7AF10259C707> /usr/lib/system/libdyld.dylib 0x91509000 - 0x9150afff libDiagnosticMessagesClient.dylib (8) <39B3D25A-148A-3936-B800-0D393A00E64F> /usr/lib/libDiagnosticMessagesClient.dylib 0x9150b000 - 0x91515fff libCSync.A.dylib (324.6) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x91516000 - 0x9188eff3 com.apple.FinderKit (1.1.1 - 1.1.1) <5868FEF0-E512-3E22-91FF-7AFE4F7580A1> /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit 0x91899000 - 0x91913ff7 com.apple.securityfoundation (6.0 - 55115.4) /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation 0x91914000 - 0x91962ffb libFontRegistry.dylib (100) <3B8350C2-4D8F-38C4-A22E-2F855D7E83D1> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib 0x91963000 - 0x91988ff7 com.apple.CoreVideo (1.8 - 99.3) <5B872AC0-E82D-3475-A3F9-FD95F380560D> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x91989000 - 0x9198cff7 libcompiler_rt.dylib (30) /usr/lib/system/libcompiler_rt.dylib 0x91991000 - 0x91accff7 libBLAS.dylib (1073.4) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 0x91acd000 - 0x91b0cff7 com.apple.bom (12.0 - 192) <0637E52C-D151-37B3-904F-8656B2FD44DD> /System/Library/PrivateFrameworks/Bom.framework/Versions/A/Bom 0x91b0d000 - 0x91be1fff com.apple.backup.framework (1.4.1 - 1.4.1) <55F2A679-9B21-3F43-A580-4C2ECF6A5FC5> /System/Library/PrivateFrameworks/Backup.framework/Versions/A/Backup 0x91be2000 - 0x91be2ffe com.apple.AOSMigrate (1.0 - 1) <4EA0829E-6AE5-3877-A5B6-032AFDF28D39> /System/Library/PrivateFrameworks/AOSMigrate.framework/Versions/A/AOSMigrate 0x91bf2000 - 0x91c1fffe libsystem_m.dylib (3022.6) <9975D9C3-3B71-38E3-AA21-C5C5F9D9C431> /usr/lib/system/libsystem_m.dylib 0x91c20000 - 0x91c88fe7 libvDSP.dylib (380.6) <55780308-4DCA-3B10-9703-EAFC3E13A3FA> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib 0x91cb8000 - 0x91ce7ff7 com.apple.securityinterface (6.0 - 55024.4) <7C5E28DC-F8BE-3238-883F-E1646A2AF895> /System/Library/Frameworks/SecurityInterface.framework/Versions/A/SecurityInterface 0x91ce8000 - 0x91cf2fff com.apple.speech.recognition.framework (4.1.5 - 4.1.5) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition 0x91cf3000 - 0x928afffb com.apple.AppKit (6.8 - 1187.34) <06EDB1D1-3B8A-3699-8E3A-D8F50A27AB7C> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x928b0000 - 0x928b7fff libsystem_dnssd.dylib (379.32.1) <6A505284-2382-3F27-B96F-15FFDACF004E> /usr/lib/system/libsystem_dnssd.dylib 0x928ba000 - 0x928d9ff3 com.apple.Ubiquity (1.2 - 243.10) /System/Library/PrivateFrameworks/Ubiquity.framework/Versions/A/Ubiquity 0x928da000 - 0x928dcffb libRadiance.dylib (845) <3F87840F-217D-3074-A29D-919BAAED2F4A> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x928dd000 - 0x928ddfff com.apple.ApplicationServices (45 - 45) <677C4ACC-9D12-366F-8A87-B898AC806DD9> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices 0x928de000 - 0x92c71ffb com.apple.MediaToolbox (1.0 - 926.62) <7290B07B-4D03-3B46-809C-64C8FB97B40C> /System/Library/Frameworks/MediaToolbox.framework/Versions/A/MediaToolbox 0x92c72000 - 0x92c8cffc libsystem_kernel.dylib (2050.18.24) /usr/lib/system/libsystem_kernel.dylib 0x92c8d000 - 0x92c9ffff libbsm.0.dylib (32) /usr/lib/libbsm.0.dylib 0x92ca0000 - 0x92d06ffc com.apple.ISSupport (1.9.8 - 56) /System/Library/PrivateFrameworks/ISSupport.framework/Versions/A/ISSupport 0x92d07000 - 0x92d8cff7 com.apple.SearchKit (1.4.0 - 1.4.0) <454E950F-291C-3E95-8F35-05CA0AD6B327> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit 0x92d8d000 - 0x92d90ff7 com.apple.TCC (1.0 - 1) <437D76CD-6437-3B55-BE2C-A53508858256> /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC 0x92d91000 - 0x92de0ff6 libTIFF.dylib (845) <989A2EB9-3A49-3157-8E9C-B16E6005BC64> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x92e0d000 - 0x92e0dffd libOpenScriptingUtil.dylib (148.2) <907E25B1-4F50-3461-B8D5-733C687EB534> /usr/lib/libOpenScriptingUtil.dylib 0x92e0e000 - 0x92e5cff3 com.apple.SystemConfiguration (1.12.2 - 1.12.2) <7BA6C58B-0357-356F-BB69-17ACB5E35988> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration 0x92e5d000 - 0x92e90ff5 libssl.0.9.8.dylib (47) <3224FBB3-3074-3022-AD9A-187703680C03> /usr/lib/libssl.0.9.8.dylib 0x92edd000 - 0x92ee9ff7 com.apple.NetAuth (4.0 - 4.0) <4983C4B8-9D95-3C4D-897E-07743326487E> /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth 0x92eea000 - 0x92f63ff0 com.apple.CorePDF (2.0 - 2) <6B5BF755-F336-359C-9A99-F006F61442CF> /System/Library/PrivateFrameworks/CorePDF.framework/Versions/A/CorePDF 0x92f64000 - 0x92f81fff libCRFSuite.dylib (33) /usr/lib/libCRFSuite.dylib 0x92f82000 - 0x9309aff7 com.apple.coreavchd (5.6.0 - 5600.4.16) /System/Library/PrivateFrameworks/CoreAVCHD.framework/Versions/A/CoreAVCHD 0x9309b000 - 0x930c4fff libxslt.1.dylib (11.3) <0DE17DAA-66FF-3195-AADB-347BEB5E2EFA> /usr/lib/libxslt.1.dylib 0x930c5000 - 0x930f8ff3 com.apple.GSS (3.0 - 2.0) /System/Library/Frameworks/GSS.framework/Versions/A/GSS 0x93136000 - 0x93366fff com.apple.QuartzComposer (5.1 - 284) <4E8682B7-EBAE-3C40-ABDB-8705EC7952BD> /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzComposer.framework/Versions/A/QuartzComposer 0x93367000 - 0x9336aff3 com.apple.AppleSystemInfo (2.0 - 2) <4639D755-8A68-31C9-95C4-7E7F70C233FA> /System/Library/PrivateFrameworks/AppleSystemInfo.framework/Versions/A/AppleSystemInfo 0x9336b000 - 0x9336bfff com.apple.Cocoa (6.7 - 19) <354094F0-F36B-36F9-BF5F-FD60590FBEB9> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x9339d000 - 0x933a6ffd com.apple.audio.SoundManager (4.0 - 4.0) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound 0x933a7000 - 0x933d3ff7 libsystem_info.dylib (406.17) /usr/lib/system/libsystem_info.dylib 0x933d4000 - 0x9362cff1 com.apple.JavaScriptCore (8536 - 8536.26.7) <75629E05-65FE-3699-8CDC-80C95015CF42> /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore 0x9362d000 - 0x9368afff com.apple.audio.CoreAudio (4.1.0 - 4.1.0) <9549B81F-4425-34EE-802B-F462068DC0C5> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x93697000 - 0x936d9ff7 libauto.dylib (185.1) /usr/lib/libauto.dylib 0x93778000 - 0x937a5ffb com.apple.CoreServicesInternal (154.2 - 154.2) /System/Library/PrivateFrameworks/CoreServicesInternal.framework/Versions/A/CoreServicesInternal 0x937a6000 - 0x937cbffb com.apple.framework.familycontrols (4.1 - 410) <5A8504E7-D95D-3101-8E20-38EADE8DEAE1> /System/Library/PrivateFrameworks/FamilyControls.framework/Versions/A/FamilyControls 0x937cc000 - 0x937d6fff libsystem_notify.dylib (98.5) <7EEE9475-18F8-3099-B0ED-23A3E528ABE0> /usr/lib/system/libsystem_notify.dylib 0x937d7000 - 0x938cbff3 com.apple.QuickLookUIFramework (4.0 - 555.4) /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuickLookUI.framework/Versions/A/QuickLookUI 0x938cc000 - 0x93f58feb com.apple.CoreAUC (6.16.00 - 6.16.00) <654A0AB8-F24F-3489-8F70-F0A22414FE08> /System/Library/PrivateFrameworks/CoreAUC.framework/Versions/A/CoreAUC 0x93f59000 - 0x93f79ffd com.apple.ChunkingLibrary (2.0 - 133.2) /System/Library/PrivateFrameworks/ChunkingLibrary.framework/Versions/A/ChunkingLibrary 0x93f7a000 - 0x93f7dfff com.apple.help (1.3.2 - 42) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help 0x93faf000 - 0x93fbdff7 libz.1.dylib (43) <245F1B61-2276-3BBB-9891-99934116D833> /usr/lib/libz.1.dylib 0x93fbe000 - 0x93fe3ff7 com.apple.quartzfilters (1.8.0 - 1.7.0) /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzFilters.framework/Versions/A/QuartzFilters 0x93fe4000 - 0x93febff3 com.apple.NetFS (5.0 - 4.0) <1F7041F2-4E97-368C-8F5D-24153D81BBDB> /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS 0x93fec000 - 0x94015ff7 libRIP.A.dylib (324.6) <7976E6A2-A489-33F5-A727-7634DDE3B761> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x94016000 - 0x94023fff libGL.dylib (8.6.1) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x94024000 - 0x940a0ff3 com.apple.Metadata (10.7.0 - 707.3) <6B6A6216-23D0-34CE-8099-BEE9BA42501E> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata 0x940a1000 - 0x940acfff libcommonCrypto.dylib (60026) /usr/lib/system/libcommonCrypto.dylib 0x940ad000 - 0x94104ff7 com.apple.ScalableUserInterface (1.0 - 1) <2B5E454B-BC49-3E85-B54D-1950397C448C> /System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/ScalableUserInterface.framework/Versions/A/ScalableUserInterface 0x94105000 - 0x9410fffe com.apple.bsd.ServiceManagement (2.0 - 2.0) <9732BA61-D6F6-3644-82DA-FF0D6FEEFC69> /System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement 0x94110000 - 0x941e6fff com.apple.DiscRecording (7.0 - 7000.2.4) /System/Library/Frameworks/DiscRecording.framework/Versions/A/DiscRecording 0x941e7000 - 0x945e3feb com.apple.VideoToolbox (1.0 - 926.62) /System/Library/Frameworks/VideoToolbox.framework/Versions/A/VideoToolbox 0x945e4000 - 0x946dcff9 libsqlite3.dylib (138.1) /usr/lib/libsqlite3.dylib 0x9475a000 - 0x9475effe libcache.dylib (57) <834FDCA7-FE3B-33CC-A12A-E11E202477EC> /usr/lib/system/libcache.dylib 0x9475f000 - 0x94761fff libCVMSPluginSupport.dylib (8.6.1) <8A174BD9-992E-351D-8F9A-DF6991723ABE> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib 0x94762000 - 0x949deff7 com.apple.QuickTime (7.7.1 - 2599.13) /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime 0x949df000 - 0x949e2ffd libCoreVMClient.dylib (24.4) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib 0x949e3000 - 0x94b9fffd libicucore.A.dylib (491.11.1) /usr/lib/libicucore.A.dylib 0x94ba0000 - 0x94bc4fff com.apple.PerformanceAnalysis (1.16 - 16) <18DE0F9F-1264-394D-AC56-6B2A1771DFBE> /System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/PerformanceAnalysis 0x94bd3000 - 0x94c23ff7 com.apple.CoreMediaIO (301.0 - 4147) /System/Library/Frameworks/CoreMediaIO.framework/Versions/A/CoreMediaIO 0x94c24000 - 0x94e0cff3 com.apple.CoreFoundation (6.8 - 744.12) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x94e0d000 - 0x9522afff FaceCoreLight (2.4.1) <571DE3F8-CA8A-3E71-9AF4-F06FFE721CE6> /System/Library/PrivateFrameworks/FaceCoreLight.framework/Versions/A/FaceCoreLight 0x95232000 - 0x9554fff3 com.apple.Foundation (6.8 - 945.11) <03B242AC-519C-3683-AA52-E73536B3D55F> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x95550000 - 0x956adffb com.apple.QTKit (7.7.1 - 2599.13) <2DC9E2BB-9895-3D02-A318-88431052E70B> /System/Library/Frameworks/QTKit.framework/Versions/A/QTKit 0x956ae000 - 0x95806ffb com.apple.audio.toolbox.AudioToolbox (1.8 - 1.8) <9205DFC2-8DAE-354E-AD87-46E229B5F2F1> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x95807000 - 0x9582bfff libJPEG.dylib (845) <547FA9A5-0BBB-3E39-BACA-F3E2DAE57DB0> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x9582e000 - 0x958c5ff7 com.apple.ink.framework (10.8.2 - 150) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink 0x958c6000 - 0x958caffc libGIF.dylib (845) <714E9F0D-D7A3-3F58-B46E-FCBE0F144B23> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x958cb000 - 0x958cffff com.apple.IOSurface (86.0.3 - 86.0.3) /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface 0x958d0000 - 0x958e6fff com.apple.CFOpenDirectory (10.8 - 151.10) <56C3F276-BD1F-3031-8CF9-8F4F481A534E> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory 0x958e7000 - 0x958ebfff com.apple.CommonPanels (1.2.5 - 94) <6B3E7E53-7708-3DA2-8C50-59C2B4735DE1> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels 0x958ec000 - 0x9594efff libc++.1.dylib (65.1) /usr/lib/libc++.1.dylib 0x9594f000 - 0x95991fff libcurl.4.dylib (69.2) <8CC566A0-0B25-37E8-A6EC-30074C3CDB8C> /usr/lib/libcurl.4.dylib 0x959e9000 - 0x95a83fff com.apple.CoreSymbolication (3.0 - 87) <6A27BBE5-6EF0-3D5D-A485-2145826B9796> /System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication 0x95a84000 - 0x95a8cfff com.apple.DiskArbitration (2.5.1 - 2.5.1) <25A7232F-9B6A-3746-A3A8-12479D086B1E> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration 0x95a8d000 - 0x95d18ff3 com.apple.RawCamera.bundle (4.00 - 658) <53F1DB23-B58B-3EAF-9D1E-95C34E669DDB> /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera 0x95d19000 - 0x95d62ff7 com.apple.framework.CoreWLAN (3.0.1 - 301.11) /System/Library/Frameworks/CoreWLAN.framework/Versions/A/CoreWLAN 0x95d63000 - 0x95da8ff5 com.apple.opencl (2.1.20 - 2.1.20) <41C4AE6E-67B6-33E2-A9B6-BF6F01580B16> /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL 0x95da9000 - 0x96069fff com.apple.security (7.0 - 55179.1) /System/Library/Frameworks/Security.framework/Versions/A/Security 0x9606a000 - 0x96102fff com.apple.CoreServices.OSServices (557.4 - 557.4) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices 0x96103000 - 0x96221ff7 com.apple.MediaControlSender (1.4.5 - 145.3) /System/Library/PrivateFrameworks/MediaControlSender.framework/Versions/A/MediaControlSender 0x96222000 - 0x96320ff7 libFontParser.dylib (84.5) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib 0x96321000 - 0x9632fff3 libsystem_network.dylib (77.10) <7FBF5A15-97BA-3721-943E-E77F0C40DBE1> /usr/lib/system/libsystem_network.dylib 0x96330000 - 0x96343ff9 com.apple.MultitouchSupport.framework (235.28 - 235.28) <5C8CFA21-D4FC-32E8-B199-0F7155E6ED9A> /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport 0x96344000 - 0x9639dff7 com.apple.ImageCaptureCore (5.0.1 - 5.0.1) <541529F7-063E-370B-9EB2-DF5BE39073E6> /System/Library/Frameworks/ImageCaptureCore.framework/Versions/A/ImageCaptureCore 0x9639e000 - 0x9639efff com.apple.quartzframework (1.5 - 1.5) <9018BE5B-4070-320E-8091-6584CC17F798> /System/Library/Frameworks/Quartz.framework/Versions/A/Quartz 0x963a2000 - 0x963a2fff libsystem_blocks.dylib (59) <3A743C5D-CFA5-37D8-80A8-B6795A9DB04F> /usr/lib/system/libsystem_blocks.dylib 0x963a3000 - 0x96418ff7 com.apple.ApplicationServices.ATS (332 - 341.1) <95206704-F9C9-33C4-AF25-FE9890E160B2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS 0x96419000 - 0x96502ff7 libxml2.2.dylib (22.3) <015A4FA6-5BB9-3F95-AFB8-B9281E22685B> /usr/lib/libxml2.2.dylib 0x96503000 - 0x96534fff com.apple.DictionaryServices (1.2 - 184.4) <0D5BE86F-F40A-3E39-8569-19FCA5EDF9D3> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices 0x96535000 - 0x96626ffc libiconv.2.dylib (34) /usr/lib/libiconv.2.dylib 0x96627000 - 0x96668ff7 libcups.2.dylib (327) /usr/lib/libcups.2.dylib 0x96669000 - 0x96669fff com.apple.CoreServices (57 - 57) <956C6C6D-A5DD-314F-9C57-4A61D41F30CE> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x9666a000 - 0x96aacfff com.apple.CoreGraphics (1.600.0 - 324.6) <66556166-F9A7-3EEC-A562-46061C7A79E4> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics 0x96aad000 - 0x96b13fff com.apple.print.framework.PrintCore (8.1 - 387.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore 0x96b14000 - 0x96b55ff7 com.apple.framework.CoreWiFi (1.0 - 100.10) <944B3FAE-F901-3276-A676-9D52295DA817> /System/Library/Frameworks/CoreWiFi.framework/Versions/A/CoreWiFi 0x96b56000 - 0x96b5fff3 com.apple.DisplayServicesFW (2.6.1 - 353) <50D0BBF0-F911-380F-B470-E59B5E48E520> /System/Library/PrivateFrameworks/DisplayServices.framework/Versions/A/DisplayServices 0x97899000 - 0x97b84ff7 com.apple.AOSKit (1.05 - 151) /System/Library/PrivateFrameworks/AOSKit.framework/Versions/A/AOSKit 0x97b85000 - 0x97b9afff com.apple.ImageCapture (8.0 - 8.0) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture 0x97b9b000 - 0x97bb8fff libxpc.dylib (140.41) <1BFE3149-C242-3A77-9729-B00DEDC8CCF2> /usr/lib/system/libxpc.dylib 0x97bb9000 - 0x97beeff7 com.apple.framework.internetaccounts (2.1 - 210) <8F2D0EB8-C997-3833-AA80-95AF7AA377BE> /System/Library/PrivateFrameworks/InternetAccounts.framework/Versions/A/InternetAccounts 0x97bef000 - 0x97c34ff7 com.apple.NavigationServices (3.7 - 200) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationServices.framework/Versions/A/NavigationServices 0x984b2000 - 0x984cbfff com.apple.Kerberos (2.0 - 1) <9BDE8F4D-DBC3-34D1-852C-898D3655A611> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x984cc000 - 0x984d5ffe com.apple.aps.framework (3.0 - 3.0) <09D5F4F3-03FD-3077-A51D-B368F18ED1D4> /System/Library/PrivateFrameworks/ApplePushService.framework/Versions/A/ApplePushService 0x984d6000 - 0x98516fff com.apple.MediaKit (13 - 659) <37B8C1E3-B67D-3FE6-8A14-7FFD9F31C556> /System/Library/PrivateFrameworks/MediaKit.framework/Versions/A/MediaKit 0x9855a000 - 0x98573ffb com.apple.frameworks.preferencepanes (15.0 - 15.0) <802C922C-CF94-357F-B1AE-4244AA025C04> /System/Library/Frameworks/PreferencePanes.framework/Versions/A/PreferencePanes 0x98574000 - 0x985affe7 libGLImage.dylib (8.6.1) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib 0x985b2000 - 0x9861aff7 com.apple.framework.IOKit (2.0 - 755.18.10) <9A80E97E-544F-3A45-916D-6DB7ED217E33> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x9861b000 - 0x98630fff com.apple.speech.synthesis.framework (4.1.12 - 4.1.12) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x98631000 - 0x9868afff com.apple.AE (645.3 - 645.3) <6745659F-006D-3F25-94D6-DF944E9A01FD> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE 0x9868d000 - 0x9873cff7 com.apple.CoreText (260.0 - 275.16) <873ADCD9-D361-3753-A220-CDD289196AD8> /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText 0x9873d000 - 0x98746ff9 com.apple.CommonAuth (3.0 - 2.0) /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth 0x98747000 - 0x98759ff7 libdispatch.dylib (228.23) <86EF7D45-2D97-3465-A449-95038AE5DABA> /usr/lib/system/libdispatch.dylib 0x9875a000 - 0x9875afff com.apple.Carbon (154 - 155) <604ADD9D-5835-3294-842E-3A4AEBCCB548> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x9875b000 - 0x98972fff com.apple.CoreData (106.1 - 407.7) <17FD06D6-AD7C-345A-8FA4-1F0FBFF4DAE1> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x98973000 - 0x98c0cff3 com.apple.AddressBook.framework (7.1 - 1167) /System/Library/Frameworks/AddressBook.framework/Versions/A/AddressBook 0x98c0d000 - 0x98c1dff7 libsasl2.2.dylib (166) /usr/lib/libsasl2.2.dylib 0x98c1e000 - 0x98c35fff com.apple.GenerationalStorage (1.1 - 132.2) <93694E0D-35D3-3633-976E-F354CBD92F54> /System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage 0x98c36000 - 0x98cc8ffb libvMisc.dylib (380.6) <6DA3A03F-20BE-300D-A664-B50A7B4E4B1A> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib 0x98cc9000 - 0x98ccaffd libunc.dylib (25) <58599CBF-E262-3CEA-AFE1-35560E0177DC> /usr/lib/system/libunc.dylib 0x98cd0000 - 0x98cd0fff com.apple.Accelerate (1.8 - Accelerate 1.8) <4EC0548E-3A3F-310D-A366-47B51D5B6398> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x98cd1000 - 0x98ceeff7 libresolv.9.dylib (51) /usr/lib/libresolv.9.dylib 0x98cef000 - 0x98cf0fff libquarantine.dylib (52) /usr/lib/system/libquarantine.dylib 0x98eba000 - 0x9915dffb com.apple.CoreImage (8.2.2 - 1.0.1) <85BFFB09-D765-3F5F-AF65-FB136DDCAEF3> /System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/CoreImage.framework/Versions/A/CoreImage 0x9915e000 - 0x9927aff7 com.apple.desktopservices (1.7.2 - 1.7.2) <8E74D101-8398-34F1-A463-B4950680A597> /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv 0x9927b000 - 0x99404ff7 com.apple.vImage (6.0 - 6.0) <1D1F67FE-4F75-3689-BEF6-4A46C8039E70> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage 0x99405000 - 0x99460fff com.apple.htmlrendering (77 - 1.1.4) <5C0C669F-AE07-3983-B38F-EB829B5CE609> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering 0x99461000 - 0x9947fff3 com.apple.openscripting (1.3.6 - 148.2) <55738D66-CC15-3F43-9265-00C3322D39C4> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting 0x99484000 - 0x99487ff9 libCGXType.A.dylib (324.6) <3004616B-51F6-3B9D-8B85-DCCA3DF9BC10> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGXType.A.dylib 0x99488000 - 0x99569fff libcrypto.0.9.8.dylib (47) /usr/lib/libcrypto.0.9.8.dylib 0x9956a000 - 0x995cefff com.apple.datadetectorscore (4.0 - 269.1) <4D155F09-1A60-325A-BCAC-1B858C2C051B> /System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore 0x995cf000 - 0x995d6ffb libunwind.dylib (35.1) /usr/lib/system/libunwind.dylib 0x995d7000 - 0x99681fff com.apple.LaunchServices (539.7 - 539.7) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices 0x99682000 - 0x996f1ffb com.apple.Heimdal (3.0 - 2.0) <1ABF438B-30E6-3165-968C-E2EA1A9DF1FD> /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal 0x996fa000 - 0x996fcfff com.apple.securityhi (4.0 - 55002) <62E3AE75-61CB-341E-B2A0-CFC985A2BF7F> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI 0x996fd000 - 0x99732fff libTrueTypeScaler.dylib (84.5) <2598F930-5E6B-37D7-B1E6-18181A972C6E> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libTrueTypeScaler.dylib 0x99733000 - 0x99755fff libc++abi.dylib (24.4) <06479DA4-BC23-34B6-BAFC-A885814261D0> /usr/lib/libc++abi.dylib 0x99756000 - 0x99757fff liblangid.dylib (116) /usr/lib/liblangid.dylib 0x99758000 - 0x9978effb com.apple.DebugSymbols (98 - 98) <9A9ADA0A-E487-3C8F-9998-286EE04C235A> /System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols 0x99827000 - 0x9982bff7 libmacho.dylib (829) <5280A013-4F74-3F74-BE0C-7F612C49F1DC> /usr/lib/system/libmacho.dylib 0x9982c000 - 0x9982fffc libpam.2.dylib (20) /usr/lib/libpam.2.dylib 0x99830000 - 0x9993bff7 libJP2.dylib (845) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib 0x9993c000 - 0x99948ff8 libbz2.1.0.dylib (29) <7031A4C0-784A-3EAA-93DF-EA1F26CC9264> /usr/lib/libbz2.1.0.dylib 0x99949000 - 0x99a45ff3 com.apple.DiskImagesFramework (10.8 - 344) <98C16F91-9D3E-3FD0-A30B-BD49EE4ED9A4> /System/Library/PrivateFrameworks/DiskImages.framework/Versions/A/DiskImages 0x99a46000 - 0x99a4efff com.apple.CommerceCore (1.0 - 26) /System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/Frameworks/CommerceCore.framework/Versions/A/CommerceCore 0x99a4f000 - 0x99aa6ff3 com.apple.HIServices (1.20 - 417) <561A770B-8523-3D09-A763-11F872779A4C> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices 0x99aa7000 - 0x99aabfff com.apple.OpenDirectory (10.8 - 151.10) /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory 0x99aac000 - 0x99aacffd com.apple.audio.units.AudioUnit (1.8 - 1.8) <4C13DEA2-1EB0-3D06-901A-DB93184C06F0> /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x99aad000 - 0x99aadfff com.apple.vecLib (3.8 - vecLib 3.8) <83160DD1-5614-3E34-80EB-97041016EF1F> /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x99aae000 - 0x99afafff libcorecrypto.dylib (106.2) <20EBADBA-D6D6-36F0-AE80-168E9AF13DB6> /usr/lib/system/libcorecrypto.dylib 0x99afb000 - 0x99b07ffe libkxld.dylib (2050.18.24) <48A75AF6-9D5A-3552-948E-30A1682D3664> /usr/lib/system/libkxld.dylib 0x99b08000 - 0x99b08fff libSystem.B.dylib (169.3) <81C58EAB-0E76-3EAB-BDFD-C5A6FE95536F> /usr/lib/libSystem.B.dylib 0x99b09000 - 0x99ec1ffa libLAPACK.dylib (1073.4) <9A6E5EAD-F2F2-3D5C-B655-2B536DB477F2> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib 0x99ec2000 - 0x99f80ff3 com.apple.ColorSync (4.8.0 - 4.8.0) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync 0x99f83000 - 0x99fdcfff com.apple.QuickLookFramework (4.0 - 555.4) <96911441-FDD4-3B68-9E0C-51BA11A97C2E> /System/Library/Frameworks/QuickLook.framework/Versions/A/QuickLook 0x99fdd000 - 0x9a0eaff3 com.apple.ImageIO.framework (3.2.0 - 845) /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO 0x9a0eb000 - 0x9a358fff com.apple.imageKit (2.2 - 667) <3F5F92DB-C0C0-3C5F-98C6-B84AB9E28B55> /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/ImageKit 0x9a359000 - 0x9a390ffa com.apple.LDAPFramework (2.4.28 - 194.5) <8368FAE7-2B89-3A7D-B6EE-7184B522CB66> /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP 0x9a391000 - 0x9a39ffff libxar.1.dylib (105) <343E4A3B-1D04-34A3-94C2-8C7C9A8F736B> /usr/lib/libxar.1.dylib 0x9a3a3000 - 0x9a3a3fff com.apple.Accelerate.vecLib (3.8 - vecLib 3.8) <908B8D40-3FB5-3047-B482-3DF95025ECFC> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib 0x9a3a4000 - 0x9a3b4ff2 com.apple.LangAnalysis (1.7.0 - 1.7.0) <875363E7-6D02-3229-A9DD-E5A5568A7D61> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis 0x9a3b5000 - 0x9a4c2057 libobjc.A.dylib (532.2) /usr/lib/libobjc.A.dylib 0x9a4c3000 - 0x9a610ffb com.apple.CFNetwork (596.2.3 - 596.2.3) <1221EF86-659B-3136-AB57-0CC6B130CDA2> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork 0x9a651000 - 0x9a659fff libcopyfile.dylib (89) <4963541B-0254-371B-B29A-B6806888949B> /usr/lib/system/libcopyfile.dylib 0x9a65a000 - 0x9a69cffb com.apple.RemoteViewServices (2.0 - 80.5) <60E04F2F-AFD8-3B1F-BF07-8A3A7EABB8E9> /System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/RemoteViewServices External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 12 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 1299 thread_create: 1 thread_set_state: 0 VM Region Summary: ReadOnly portion of Libraries: Total=168.7M resident=90.6M(54%) swapped_out_or_unallocated=78.2M(46%) Writable regions: Total=122.9M written=11.4M(9%) resident=41.1M(33%) swapped_out=0K(0%) unallocated=81.8M(67%) REGION TYPE VIRTUAL =========== ======= CG backing stores 6624K CG image 92K CG shared images 1184K CoreServices 3180K MALLOC 89.0M MALLOC guard page 48K Memory tag=240 4K Memory tag=242 12K Memory tag=35 3404K OpenCL 44K Stack 65.6M VM_ALLOCATE 16.2M __DATA 8164K __DATA/__OBJC 176K __IMAGE 528K __LINKEDIT 32.2M __OBJC 3060K __OBJC/__DATA 64K __PAGEZERO 4K __TEXT 136.5M __UNICODE 544K mapped file 79.2M shared memory 5928K =========== ======= TOTAL 451.0M Model: MacBookPro9,1, BootROM MBP91.00D3.B08, 4 processors, Intel Core i7, 2.6 GHz, 8 GB, SMC 2.1f170 Graphics: Intel HD Graphics 4000, Intel HD Graphics 4000, Built-In, 512 MB Graphics: NVIDIA GeForce GT 650M, NVIDIA GeForce GT 650M, PCIe, 1024 MB Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54333531533643465238432D50422020 Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54333531533643465238432D50422020 AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xF5), Broadcom BCM43xx 1.0 (5.106.98.81.22) Bluetooth: Version 4.0.9f33 10885, 2 service, 11 devices, 1 incoming serial ports Network Service: Ethernet, Ethernet, en0 Network Service: Wi-Fi, AirPort, en1 Serial ATA Device: APPLE SSD SM256E, 251 GB Serial ATA Device: MATSHITADVD-R UJ-8A8 USB Device: hub_device, 0x8087 (Intel Corporation), 0x0024, 0x1a100000 / 2 USB Device: hub_device, 0x0424 (SMSC), 0x2514, 0x1a120000 / 4 USB Device: hub_device, 0x0424 (SMSC), 0x2640, 0x1a121000 / 5 USB Device: Dell KM632 Wireless Keyboard and Mouse, 0x413c (Dell Inc.), 0x2501, 0x1a121300 / 7 USB Device: Ultra Fast Media Reader, 0x0424 (SMSC), 0x4060, 0x1a121100 / 6 USB Device: FaceTime HD Camera (Built-in), apple_vendor_id, 0x8509, 0x1a110000 / 3 USB Device: hub_device, 0x8087 (Intel Corporation), 0x0024, 0x1d100000 / 2 USB Device: hub_device, 0x0424 (SMSC), 0x2513, 0x1d180000 / 3 USB Device: BRCM20702 Hub, 0x0a5c (Broadcom Corp.), 0x4500, 0x1d181000 / 6 USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x821d, 0x1d181300 / 8 USB Device: Apple Internal Keyboard / Trackpad, apple_vendor_id, 0x0252, 0x1d183000 / 5 USB Device: IR Receiver, apple_vendor_id, 0x8242, 0x1d182000 / 4 ---------- components: IDLE messages: 172493 nosy: brianckeegan priority: normal severity: normal status: open title: IDLE Crash on Open Parens type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 20:40:10 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Oct 2012 18:40:10 +0000 Subject: [issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line. In-Reply-To: <1205817752.04.0.892564898323.issue2382@psf.upfronthosting.co.za> Message-ID: <1349808010.36.0.971928780619.issue2382@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch upgraded to Python 3.3. It uses a little different approach and works with invalid encoded data. unicode_utf8size.patch is not needed. This patch fixes a half of the issue - working with non-ascii non-wide characters. It's enough for many people. Let's commit it and go further. ---------- Added file: http://bugs.python.org/file27506/adjust_offset-3.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 20:40:31 2012 From: report at bugs.python.org (Ned Deily) Date: Tue, 09 Oct 2012 18:40:31 +0000 Subject: [issue16177] IDLE Crash on Open Parens In-Reply-To: <1349800735.66.0.856769538072.issue16177@psf.upfronthosting.co.za> Message-ID: <1349808031.19.0.2298415773.issue16177@psf.upfronthosting.co.za> Ned Deily added the comment: I've not seen any reports of this behavior before. Can you try two things? One, try temporarily disabling your current IDLE preferences. Quit IDLE, then from a terminal shell, type something like: mv ~/.idlerc ~/.idlerc-disabled then launch IDLE and try the paren again. If that doesn't help, try temporarily disabling the ActiveState Tk. Again, quit IDLE. Then, from a terminal shell: cd /Library/Frameworks sudo mv Tcl.framework Tcl-disabled sudo mv Tk.framework Tk-disabled Then try IDLE again. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 20:41:53 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Oct 2012 18:41:53 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper In-Reply-To: <1349798954.84.0.328560890888.issue16175@psf.upfronthosting.co.za> Message-ID: <1349808113.89.0.445110128557.issue16175@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm not sure why we would have "no code to write" unless you're thinking of integrating pywin32 into the stdlib. As Richard said, overlapped I/O is already more or less supported as part of the _winapi private module. But IOCP itself isn't exposed. We could have a public module exposing IOCP as a nice API :-) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 20:51:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Oct 2012 18:51:07 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349807775.3334.0.camel@localhost.localdomain> Message-ID: <201210092150.49337.storchaka@gmail.com> Serhiy Storchaka added the comment: Usually you need code for both alternatives. #ifdef WORDS_BIGENDIAN ... #else ... #endif What can be simpler? Of cause, using *two* macros is complicated. You need only one and second macros is unnecessary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 20:55:21 2012 From: report at bugs.python.org (Brian Keegan) Date: Tue, 09 Oct 2012 18:55:21 +0000 Subject: [issue16177] IDLE Crash on Open Parens In-Reply-To: <1349808031.19.0.2298415773.issue16177@psf.upfronthosting.co.za> Message-ID: Brian Keegan added the comment: I moved the idlerc to the disabled folder like you recommended and I haven't been able to reproduce the error again. I'll cautiously take this as an indication of a fix, but will update if it changes. Thank you! On Tue, Oct 9, 2012 at 2:40 PM, Ned Deily wrote: > > Ned Deily added the comment: > > I've not seen any reports of this behavior before. Can you try two > things? One, try temporarily disabling your current IDLE preferences. Quit > IDLE, then from a terminal shell, type something like: > > mv ~/.idlerc ~/.idlerc-disabled > > then launch IDLE and try the paren again. If that doesn't help, try > temporarily disabling the ActiveState Tk. Again, quit IDLE. Then, from a > terminal shell: > > cd /Library/Frameworks > sudo mv Tcl.framework Tcl-disabled > sudo mv Tk.framework Tk-disabled > > Then try IDLE again. > > ---------- > nosy: +ned.deily > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 21:02:52 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 09 Oct 2012 19:02:52 +0000 Subject: [issue16178] atexit._run_exitfuncs should be a public API Message-ID: <1349809372.69.0.332686923103.issue16178@psf.upfronthosting.co.za> New submission from Gregory P. Smith: The atexit module's _run_exitfuncs() function needs to be a public API. In Python 2.x it was exposed through a disgusting hack as "sys.exitfunc()" that the atexit module monkeypatched into place at import time. This monkeypatching was cleaned up in Python 3. But it is still useful to expose this to users who need to write their own program shutdown code that ultimately calls os._exit or similar (avoiding atexit hooks that way) but also need to make sure the atexit exit functions get called. ---------- messages: 172505 nosy: gregory.p.smith priority: normal severity: normal stage: needs patch status: open title: atexit._run_exitfuncs should be a public API type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 21:11:24 2012 From: report at bugs.python.org (=?utf-8?b?Um9iaW4gw4Vzw6lu?=) Date: Tue, 09 Oct 2012 19:11:24 +0000 Subject: [issue16179] hashlib.md5 / json inconsistency Message-ID: <1349809883.96.0.199738834001.issue16179@psf.upfronthosting.co.za> New submission from Robin ?s?n: I am getting inconsistent behavior when getting an md5 hexdigest on a json structure that's converted to a string. Am I doing something wrong here? import json import hashlib data = '''{"key1":"value1","key2":"value2"}''' print(hashlib.md5(data.encode()).hexdigest()) jsonData = json.loads(data) print(hashlib.md5(str(jsonData).encode()).hexdigest()) print(hashlib.md5(str(jsonData).encode()).hexdigest()) When I run this code everything seems just fine at a first glance. However, when it is run again I get different md5 checksums. The first md5 checksum on the data string seems consistent every time. The two last md5 checksums never seems to contradict each other during the same run, but between each run I often get different values. Here are some outputs I'm getting: ff45cc3835165307ef414c23ca2c6f67 423b2b4d92c0947e3d99d207c7c06175 423b2b4d92c0947e3d99d207c7c06175 ff45cc3835165307ef414c23ca2c6f67 101d66cd2878eacf47c618cea6862125 101d66cd2878eacf47c618cea6862125 ff45cc3835165307ef414c23ca2c6f67 423b2b4d92c0947e3d99d207c7c06175 423b2b4d92c0947e3d99d207c7c06175 ff45cc3835165307ef414c23ca2c6f67 101d66cd2878eacf47c618cea6862125 101d66cd2878eacf47c618cea6862125 (If it makes any difference, I'm running on Windows XP SP3) ---------- components: Interpreter Core messages: 172506 nosy: poppe1219 priority: normal severity: normal status: open title: hashlib.md5 / json inconsistency type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 21:16:58 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 09 Oct 2012 19:16:58 +0000 Subject: [issue16176] platform.platform() identifies Windows 8 as post2008Server In-Reply-To: <1349799142.95.0.909627211255.issue16176@psf.upfronthosting.co.za> Message-ID: <50747823.4070907@egenix.com> Marc-Andre Lemburg added the comment: Brian Curtin wrote: > > New submission from Brian Curtin: > >>>> platform.platform() > 'Windows-post2008Server-6.2.9200' > > The change is trivial, just accounting for a point release of 2 (from the major release 6). Looks good. Please also backport this to Python 2.7. Thanks. > --- a/Lib/platform.py > +++ b/Lib/platform.py > @@ -595,8 +595,13 @@ > release = '7' > else: > release = '2008ServerR2' > + elif min == 2: > + if product_type == VER_NT_WORKSTATION: > + release = '8' > + else: > + release = '2012Server' > else: > - release = 'post2008Server' > + release = 'post2012Server' > > ---------- > assignee: brian.curtin > components: Library (Lib), Windows > messages: 172490 > nosy: brian.curtin > priority: normal > severity: normal > status: open > title: platform.platform() identifies Windows 8 as post2008Server > type: behavior > versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > Python-bugs-list mailing list > Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/mal%40egenix.com > -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.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 Tue Oct 9 21:33:24 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 09 Oct 2012 19:33:24 +0000 Subject: [issue16180] cannot quit pdb when there is a syntax error in the debuggee (must kill it) Message-ID: <1349811204.12.0.797224741983.issue16180@psf.upfronthosting.co.za> New submission from Xavier de Gaye: $ tmp=`mktemp /tmp/foo.XXXXXXXXXX`; echo 'def foo: pass' > $tmp; python3 -m pdb $tmp; rm $tmp Traceback (most recent call last): File "/usr/local/lib/python3.2/pdb.py", line 1556, in main pdb._runscript(mainpyfile) File "/usr/local/lib/python3.2/pdb.py", line 1437, in _runscript self.run(statement) File "/usr/local/lib/python3.2/bdb.py", line 392, in run exec(cmd, globals, locals) File "", line 1, in File "/tmp/foo.iLhPYHBZrF", line 1 def foo: pass ^ SyntaxError: invalid syntax Uncaught exception. Entering post mortem debugging Running 'cont' or 'step' will restart the program > (1)() (Pdb) quit Post mortem debugger finished. The /tmp/foo.iLhPYHBZrF will be restarted Traceback (most recent call last): File "/usr/local/lib/python3.2/pdb.py", line 1556, in main pdb._runscript(mainpyfile) File "/usr/local/lib/python3.2/pdb.py", line 1437, in _runscript self.run(statement) File "/usr/local/lib/python3.2/bdb.py", line 392, in run exec(cmd, globals, locals) File "", line 1, in File "/tmp/foo.iLhPYHBZrF", line 1 def foo: pass ^ SyntaxError: invalid syntax Uncaught exception. Entering post mortem debugging Running 'cont' or 'step' will restart the program > (1)() (Pdb) --KeyboardInterrupt-- (Pdb) ---------- components: Library (Lib) messages: 172508 nosy: xdegaye priority: normal severity: normal status: open title: cannot quit pdb when there is a syntax error in the debuggee (must kill it) type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 21:39:30 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Oct 2012 19:39:30 +0000 Subject: [issue16179] hashlib.md5 / json inconsistency In-Reply-To: <1349809883.96.0.199738834001.issue16179@psf.upfronthosting.co.za> Message-ID: <1349811570.72.0.453514230908.issue16179@psf.upfronthosting.co.za> R. David Murray added the comment: The order in which elements are produced when iterating a dictionary is not fixed. In python3.3 it is intentionally perturbed by a randomized seed at interpreter startup by default. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 21:44:40 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 09 Oct 2012 19:44:40 +0000 Subject: [issue16160] subclassing types.SimpleNamespace does not work In-Reply-To: <1349658607.29.0.0643105543226.issue16160@psf.upfronthosting.co.za> Message-ID: <1349811880.29.0.208864061769.issue16160@psf.upfronthosting.co.za> Eric Snow added the comment: Yikes. I'll get a patch up tonight. ---------- assignee: -> eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 22:01:31 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 09 Oct 2012 20:01:31 +0000 Subject: [issue16170] remove Linux skip from test_subprocess's test_executable() test In-Reply-To: <1349746875.36.0.803736287299.issue16170@psf.upfronthosting.co.za> Message-ID: <1349812891.38.0.0582533001374.issue16170@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks for the explanation and suggestion, Antoine. I'm attaching a patch that incorporates the suggestion, but I haven't checked that it works yet (I would need to use snakebite). ---------- keywords: +patch Added file: http://bugs.python.org/file27507/issue-16170-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 22:01:51 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 09 Oct 2012 20:01:51 +0000 Subject: [issue16170] remove Linux skip from test_subprocess's test_executable() test In-Reply-To: <1349746875.36.0.803736287299.issue16170@psf.upfronthosting.co.za> Message-ID: <1349812911.16.0.979571498297.issue16170@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 22:03:11 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Oct 2012 20:03:11 +0000 Subject: [issue16170] remove Linux skip from test_subprocess's test_executable() test In-Reply-To: <1349746875.36.0.803736287299.issue16170@psf.upfronthosting.co.za> Message-ID: <1349812991.39.0.40860365068.issue16170@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Chris, you can also push a custom repo to a custom builder: http://docs.python.org/devguide/buildbots.html#custom-builders ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 22:05:35 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Oct 2012 20:05:35 +0000 Subject: [issue16170] remove Linux skip from test_subprocess's test_executable() test In-Reply-To: <1349746875.36.0.803736287299.issue16170@psf.upfronthosting.co.za> Message-ID: <1349813135.86.0.46544114069.issue16170@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Actually, I've just checked that your patch works under Linux. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 22:06:25 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 09 Oct 2012 20:06:25 +0000 Subject: [issue16170] remove Linux skip from test_subprocess's test_executable() test In-Reply-To: <1349746875.36.0.803736287299.issue16170@psf.upfronthosting.co.za> Message-ID: <1349813185.77.0.827314463229.issue16170@psf.upfronthosting.co.za> Chris Jerdonek added the comment: That's great, thanks for the pointer, Antoine. I will try that out later today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 22:06:52 2012 From: report at bugs.python.org (Charles Jones) Date: Tue, 09 Oct 2012 20:06:52 +0000 Subject: [issue16181] cookielib.http2time raises ValueError for invalid date. Message-ID: <1349813212.28.0.59101014442.issue16181@psf.upfronthosting.co.za> New submission from Charles Jones: The docs for http2time state that "None is returned if [...] the time is outside the representable range". However, it is raising a ValueError when a year larger than datetime.MAXYEAR is provided (actually raised downstream by calendar.date()). To reproduce: import cookielib print cookielib.http2time("08-Oct-3697739") Expected Result: Should return None Actual Result: Raises ValueError: year is out of range ---------- components: Library (Lib) messages: 172515 nosy: Charles.Jones priority: normal severity: normal status: open title: cookielib.http2time raises ValueError for invalid date. type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 22:07:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 09 Oct 2012 20:07:19 +0000 Subject: [issue16170] remove Linux skip from test_subprocess's test_executable() test In-Reply-To: <1349746875.36.0.803736287299.issue16170@psf.upfronthosting.co.za> Message-ID: <1349813239.68.0.305780865479.issue16170@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Okay, even better. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 22:09:44 2012 From: report at bugs.python.org (Kaarle Ritvanen) Date: Tue, 09 Oct 2012 20:09:44 +0000 Subject: [issue16182] readline: Wrong tab completion scope indices in Unicode terminals Message-ID: <1349813384.06.0.615857426211.issue16182@psf.upfronthosting.co.za> New submission from Kaarle Ritvanen: Tab completion in the readline module does not seem to work well with Unicode terminals. The get_line_buffer function converts the line buffer to the str type (which are Unicode strings in Python 3), but the indices returned by get_begidx and get_endidx are not adjusted with respect to possible wide characters in the buffer, and hence are not very useful. The documentation is a bit vague on the index functions, but I think they should be relative to code points, regardless of the encoding used by the C library. The suggested correction is attached. My second point of complaint is related to the use of PyUnicode_FromString in the module. The strings returned by the readline library use the current locale encoding, which is not necessarily UTF-8. I wonder if PyUnicode_DecodeLocale should be used instead for more portable code. ---------- components: Library (Lib) files: readline-wide-char-index.patch keywords: patch messages: 172517 nosy: kunkku priority: normal severity: normal status: open title: readline: Wrong tab completion scope indices in Unicode terminals type: behavior versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file27508/readline-wide-char-index.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 22:18:27 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Oct 2012 20:18:27 +0000 Subject: [issue16182] readline: Wrong tab completion scope indices in Unicode terminals In-Reply-To: <1349813384.06.0.615857426211.issue16182@psf.upfronthosting.co.za> Message-ID: <1349813907.85.0.363751315618.issue16182@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo stage: -> patch review versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 22:21:20 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Oct 2012 20:21:20 +0000 Subject: [issue16170] remove Linux skip from test_subprocess's test_executable() test In-Reply-To: <1349746875.36.0.803736287299.issue16170@psf.upfronthosting.co.za> Message-ID: <3Xbqb41NKWzMSD@mail.python.org> Roundup Robot added the comment: New changeset 9451908da615 by Chris Jerdonek in branch '3.3': Issue #16170: Remove Linux skip from test_subprocess's test_executable test. http://hg.python.org/cpython/rev/9451908da615 New changeset 0ee03c9b098f by Chris Jerdonek in branch 'default': Issue #16170: Merge subprocess test unskip from 3.3. http://hg.python.org/cpython/rev/0ee03c9b098f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 22:23:43 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 09 Oct 2012 20:23:43 +0000 Subject: [issue16170] remove Linux skip from test_subprocess's test_executable() test In-Reply-To: <1349746875.36.0.803736287299.issue16170@psf.upfronthosting.co.za> Message-ID: <1349814223.01.0.991312371995.issue16170@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 Tue Oct 9 22:27:09 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 09 Oct 2012 20:27:09 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper In-Reply-To: <1349798954.84.0.328560890888.issue16175@psf.upfronthosting.co.za> Message-ID: <1349814429.7.0.737970921088.issue16175@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > We could have a public module exposing IOCP as a nice API :-) What about select module? ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 22:35:02 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 09 Oct 2012 20:35:02 +0000 Subject: [issue16088] http.server's send_error could set the content-length of the error body In-Reply-To: <1348959751.44.0.331357335713.issue16088@psf.upfronthosting.co.za> Message-ID: <1349814902.72.0.0655796545824.issue16088@psf.upfronthosting.co.za> Senthil Kumaran added the comment: +1 to this change. It may be helpful in the cases like issue15991. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 22:40:25 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Oct 2012 20:40:25 +0000 Subject: [issue16178] atexit._run_exitfuncs should be a public API In-Reply-To: <1349809372.69.0.332686923103.issue16178@psf.upfronthosting.co.za> Message-ID: <1349815225.56.0.21388709171.issue16178@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 22:41:52 2012 From: report at bugs.python.org (Maciej Szulik) Date: Tue, 09 Oct 2012 20:41:52 +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: <1349815312.89.0.570453771894.issue15927@psf.upfronthosting.co.za> Maciej Szulik added the comment: I've confirmed that bug in the latest repo version, still exists. I attach patch for py3k. I'll try to have a look at it in the current version, as soon as it will be fixed I'll port it to 2.7. ---------- nosy: +maciej.szulik versions: +Python 3.4 Added file: http://bugs.python.org/file27509/test_csv_py3k.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 22:42:49 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Oct 2012 20:42:49 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349706807.82.0.556520783402.issue16166@psf.upfronthosting.co.za> Message-ID: <1349815369.31.0.242977512167.issue16166@psf.upfronthosting.co.za> STINNER Victor added the comment: AC_C_BIGENDIAN ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 22:45:31 2012 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 09 Oct 2012 20:45:31 +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: <1349815531.05.0.126356591446.issue15927@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- assignee: -> lukasz.langa nosy: +lukasz.langa versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 22:45:51 2012 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 09 Oct 2012 20:45:51 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper In-Reply-To: <1349798954.84.0.328560890888.issue16175@psf.upfronthosting.co.za> Message-ID: <1349815551.41.0.119866080256.issue16175@psf.upfronthosting.co.za> Guido van Rossum added the comment: I would be happy with requiring that the user use pywin32 if they want to use this. Have you all read the docs for IOCP? It is not for the faint of heart. E.g. it integrates with the thread scheduler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 22:59:26 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Oct 2012 20:59:26 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper In-Reply-To: <1349815551.41.0.119866080256.issue16175@psf.upfronthosting.co.za> Message-ID: <1349816276.3334.6.camel@localhost.localdomain> Antoine Pitrou added the comment: > Have you all read the docs for IOCP? It is not for the faint of > heart. E.g. it integrates with the thread scheduler. Yes, IOCP (or overlapped I/O) may use threads under the hood, but IIUC this can be ignored by the programmer, and GetQueuedCompletionStatus() acts as the select()-like function (this is assuming you create a single I/O cooperation port and register all your socket handles to this single object). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 23:02:11 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Oct 2012 21:02:11 +0000 Subject: [issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line. In-Reply-To: <1205817752.04.0.892564898323.issue2382@psf.upfronthosting.co.za> Message-ID: <1349816531.09.0.0121498748046.issue2382@psf.upfronthosting.co.za> STINNER Victor added the comment: > This patch fixes a half of the issue - working with non-ascii > non-wide characters. The purpose of this issue is to handle CJK characters taking 2 columns instead of 1 in a terminal, or did I misunderstand it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 23:09:40 2012 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 09 Oct 2012 21:09:40 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper In-Reply-To: <1349798954.84.0.328560890888.issue16175@psf.upfronthosting.co.za> Message-ID: <1349816980.27.0.461143358461.issue16175@psf.upfronthosting.co.za> Guido van Rossum added the comment: According to http://msdn.microsoft.com/en-us/library/aa365198%28VS.85%29.aspx once you call GetQueuedCompletionStatus() your thread is managed by the IOCP and only up to a given parameter of those threads are allowed to run. They recommend setting that parameter to the number of CPUs. This feels scary (doubly so in the light of the GIL). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 23:11:47 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Oct 2012 21:11:47 +0000 Subject: [issue15278] UnicodeDecodeError when readline in codecs.py In-Reply-To: <1341674319.29.0.269195397783.issue15278@psf.upfronthosting.co.za> Message-ID: <1349817107.41.0.67874158048.issue15278@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue may be related or a duplicate of #11461. > For example codecs.utf_16_le_decode(b'\x00\xd8\x00') should return ('', 0), but raises UnicodeDecodeError. Only incremental decoder should return partial results. Other decoders are strict and (usually) stateless. $ ./python >>> import codecs >>> decoder = codecs.getdecoder('utf8') >>> decoder('\u20ac'.encode('utf8'), 'strict') ('?', 3) >>> decoder('\u20ac'.encode('utf8')[:2], 'strict') UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 0-1: unexpected end of data ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 23:16:12 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Oct 2012 21:16:12 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper In-Reply-To: <1349816980.27.0.461143358461.issue16175@psf.upfronthosting.co.za> Message-ID: <1349817281.3334.11.camel@localhost.localdomain> Antoine Pitrou added the comment: > According to http://msdn.microsoft.com/en-us/library/aa365198%28VS.85% > 29.aspx once you call GetQueuedCompletionStatus() your thread is > managed by the IOCP and only up to a given parameter of those threads > are allowed to run. They recommend setting that parameter to the > number of CPUs. This feels scary (doubly so in the light of the GIL). I think this mostly means that you should always call GetQueuedCompletionStatus() from the same thread for a given IO completion port. Which, in the context of a single-threaded event loop, shouldn't be a problem (also, this can be enforced by our stdlib wrapper). AFAIU, the MSDN docs have this complicated language about threads mostly because they suggest you to use as many threads as there are CPUs on the machines (in order to max out the I/O processing bandwidth). By the way, I've just checked: the Twisted IOCP reactor uses a single I/O completion port to which it registers all socket handles, and its event loop calls GetQueuedCompletionStatus() in a loop. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 23:17:31 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Oct 2012 21:17:31 +0000 Subject: [issue15278] UnicodeDecodeError when readline in codecs.py In-Reply-To: <1341674319.29.0.269195397783.issue15278@psf.upfronthosting.co.za> Message-ID: <1349817451.5.0.448433583768.issue15278@psf.upfronthosting.co.za> STINNER Victor added the comment: > with codecs.open('test.txt', 'wb', 'utf-16-le') as fp: Since Python 2.6+, you can use io.open() which uses the new io library. The io library uses TextIOWrapper which uses incremental encoder and decoder and so handles multibyte encodings correctly (as UTF-16). Said differently, this issue is already fixed in the io library. It remembers me that I should propose again my PEP 400 :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 23:19:47 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Oct 2012 21:19:47 +0000 Subject: [issue15278] UnicodeDecodeError when readline in codecs.py In-Reply-To: <1341674319.29.0.269195397783.issue15278@psf.upfronthosting.co.za> Message-ID: <1349817587.67.0.0585011107054.issue15278@psf.upfronthosting.co.za> STINNER Victor added the comment: > This issue may be related or a duplicate of #11461. Hum no. The bug is an issue in the design of codecs.Stream* classes: incremental decoders and encoders should be used instead of classic decoders/encoders. I don't want to fix this issue: it's better to move to the io library for the reasons listed in the PEP 400. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 23:21:43 2012 From: report at bugs.python.org (Ben Hoyt) Date: Tue, 09 Oct 2012 21:21:43 +0000 Subject: [issue10551] mimetypes read from the registry should not overwrite standard mime mappings In-Reply-To: <1290885326.33.0.141249546234.issue10551@psf.upfronthosting.co.za> Message-ID: <1349817703.21.0.333083622378.issue10551@psf.upfronthosting.co.za> Ben Hoyt added the comment: This is definitely a real issue, and makes mimetypes.guess_type() useless out of the box on Windows. However, I believe the reason it's broken is that the fix for Issue4969 doesn't actually work, and I'm not sure this is possible with the Windows registry. You see, "MIME\Database\Content Type" in the Windows registry is a mime type -> file extension mapping, *not the other way around*. But read_windows_registry() tries to use it as a file extension -> mime type mapping, and bad things happen, because there are multiple mime types for certain file extensions. As far as I can tell, there's nothing in the Windows registry that says which is the "canonical" mime type for a given extension. Again, this is because Microsoft intends it (and uses it) as a mime type -> extension mapping. See more here: http://msdn.microsoft.com/en-us/library/ms775148(v=vs.85).aspx For example, in my "MIME\Database\Content Type" we have: image/jpeg -> .jpg image/jpg -> .jpg image/pjpeg -> .jpg And read_windows_registry() picks the last one for .jpg, which in this case is image/pjpeg -- NOT what users expect. In short, I think the fix for Issue4969 is broken as is, and that you can't actually use the mime types database in the Windows registry in this way. I suggest reverting the fix for Issue4969. Or, we could get clever and only use the Windows registry value if there's a single mime type -> extension mapping for a given extension, and if there's more than one (meaning it'd be ambiguous), use the mimetypes default from types_map / common_types. ---------- nosy: +benhoyt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 23:34:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Oct 2012 21:34:22 +0000 Subject: [issue15278] UnicodeDecodeError when readline in codecs.py In-Reply-To: <1341674319.29.0.269195397783.issue15278@psf.upfronthosting.co.za> Message-ID: <1349818462.74.0.210386023018.issue15278@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > This issue may be related or a duplicate of #11461. Oh, yes, it is a duplicate. I totally forgot about it and made the work again. > Only incremental decoder should return partial results. Other decoders are > strict and (usually) stateless. Yes, there is a incremental decoder. > >>> decoder('\u20ac'.encode('utf8')[:2], 'strict') > > UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 0-1: > unexpected end of data >>> codecs.utf_8_decode('\u20ac'.encode('utf8')[:2]) ('', 0) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 23:34:52 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Oct 2012 21:34:52 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349205316.95.0.274773533894.issue16112@psf.upfronthosting.co.za> Message-ID: <1349818492.6.0.718153686867.issue16112@psf.upfronthosting.co.za> STINNER Victor added the comment: > The main reason for keeping the compatibility is that the module is > also being used outside the stdlib for Python versions starting from > 2.4 and later. I don't want to maintain two separate versions. Which projects use their own copy of platform.py? Where does this file come from? Using subprocess sounds safer than adding a (theorical) TOCTTOU issue: http://en.wikipedia.org/wiki/Time_of_check_to_time_of_use If you are concerned about compatibility with Python 2.4, you should maintain platform outside the stdlib. The stdlib is regulary updated to the most recent syntax/modules. For example, "yield from" is now used in the stdlib of Python 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 23:38:44 2012 From: report at bugs.python.org (Roumen Petrov) Date: Tue, 09 Oct 2012 21:38:44 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349706807.82.0.556520783402.issue16166@psf.upfronthosting.co.za> Message-ID: <1349818724.5.0.440119551778.issue16166@psf.upfronthosting.co.za> Roumen Petrov added the comment: As Victor point configure script already check for endian (macro AC_C_BIGENDIAN) but you should ask python OS X guru to review . Macro is not adjusted to python needs as action for universal build is not defined yet. The default is to define AC_APPLE_UNIVERSAL_BUILD . Otherwise WORDS_BIGENDIAN is defined for bigendian . ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 23:39:20 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Oct 2012 21:39:20 +0000 Subject: [issue15278] UnicodeDecodeError when readline in codecs.py In-Reply-To: <1341674319.29.0.269195397783.issue15278@psf.upfronthosting.co.za> Message-ID: <1349818760.55.0.20247791939.issue15278@psf.upfronthosting.co.za> STINNER Victor added the comment: >>> codecs.utf_8_decode('\u20ac'.encode('utf8')[:2]) ('', 0) Oh... codecs.CODEC_decode are incremental decoders? I misunderstood completly this. "The bug is an issue in the design of codecs.Stream* classes: incremental decoders and encoders should be used instead of classic decoders/encoders." Hum, I suppose that the issue cannot be reproduded with TextIOWrapper, just because io.TextIOWrapper and codecs.StreamReader use different buffer sizes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 23:43:56 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Oct 2012 21:43:56 +0000 Subject: [issue15278] UnicodeDecodeError when readline in codecs.py In-Reply-To: <1341674319.29.0.269195397783.issue15278@psf.upfronthosting.co.za> Message-ID: <1349819036.04.0.183023786277.issue15278@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Hum no. The bug is an issue in the design of codecs.Stream* classes: incremental decoders and encoders should be used instead of classic decoders/encoders. I don't understand you. StreamReader and IncrementalDecoder both use the same decoder. class IncrementalDecoder(codecs.BufferedIncrementalDecoder): _buffer_decode = codecs.utf_16_le_decode class StreamReader(codecs.StreamReader): decode = codecs.utf_16_le_decode > I don't want to fix this issue: it's better to move to the io library for the reasons listed in the PEP 400. The bug in utf-16 decoder, not in codecs.StreamReader. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 23:46:17 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Oct 2012 21:46:17 +0000 Subject: [issue15278] UnicodeDecodeError when readline in codecs.py In-Reply-To: <1349819036.04.0.183023786277.issue15278@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > I don't understand you. Read my last message, I was wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 23:56:15 2012 From: report at bugs.python.org (Roger Serwy) Date: Tue, 09 Oct 2012 21:56:15 +0000 Subject: [issue16177] IDLE Crash on Open Parens In-Reply-To: <1349800735.66.0.856769538072.issue16177@psf.upfronthosting.co.za> Message-ID: <1349819775.15.0.907636655492.issue16177@psf.upfronthosting.co.za> Roger Serwy added the comment: Brian, can you post the files from your .idlerc-disabled directory? The directory contains configuration text files. I want to find out what configuration caused the bug. (You may want to omit the recent-files.lst if you don't want to disclose that.) ---------- nosy: +serwy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 00:11:16 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 09 Oct 2012 22:11:16 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper In-Reply-To: <1349798954.84.0.328560890888.issue16175@psf.upfronthosting.co.za> Message-ID: <1349820676.69.0.739863056193.issue16175@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 00:12:21 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 09 Oct 2012 22:12:21 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper In-Reply-To: <1349798954.84.0.328560890888.issue16175@psf.upfronthosting.co.za> Message-ID: <1349820741.61.0.42705041033.issue16175@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: If this is going to be available for Windows, I would like to help to integrate too the "Event Completion Framework" of Solaris 10 and up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 00:13:52 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 09 Oct 2012 22:13:52 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper In-Reply-To: <1349798954.84.0.328560890888.issue16175@psf.upfronthosting.co.za> Message-ID: <1349820832.3.0.223619599105.issue16175@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Some old documentation: http://web.archive.org/web/20110719052845/http://developers.sun.com/solaris/articles/event_completion.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 00:33:37 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 09 Oct 2012 22:33:37 +0000 Subject: [issue16170] remove Linux skip from test_subprocess's test_executable() test In-Reply-To: <1349746875.36.0.803736287299.issue16170@psf.upfronthosting.co.za> Message-ID: <1349822017.86.0.974237342574.issue16170@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Python under Unix uses its own path to determine where the standard library is, and it does so by inspecting argv[0]. Actually, how is the above able to work if sys.argv[0] is set to "-c" when Python is invoked using the "-c" option (as it is in the test). http://docs.python.org/dev/library/sys.html#sys.argv ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 00:36:47 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Oct 2012 22:36:47 +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: <1349822207.21.0.12729993517.issue15927@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 00:54:40 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 09 Oct 2012 22:54:40 +0000 Subject: [issue15991] BaseHTTPServer with ThreadingMixIn serving wrong data sometimes In-Reply-To: Message-ID: Charles-Fran?ois Natali added the comment: wget trace: Here a 404 is treated correctly: """ socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 5 connect(5, {sa_family=AF_INET, sin_port=htons(4242), sin_addr=inet_addr("127.0.0.1")}, 16) = 0 select(6, NULL, [5], NULL, {900, 0}) = 1 (out [5], left {900, 0}) write(5, "GET /MISSING-8276 HTTP/1.1\r\nUser"..., 126) = 126 select(6, [5], NULL, NULL, {900, 0}) = 1 (in [5], left {899, 999000}) recvfrom(5, "HTTP/1.0 404 Not Found\r\n", 511, MSG_PEEK, NULL, NULL) = 24 read(5, "HTTP/1.0 404 Not Found\r\n", 24) = 24 select(6, [5], NULL, NULL, {900, 0}) = 1 (in [5], left {900, 0}) recvfrom(5, "Server: BaseHTTP/0.3 Python/2.4."..., 487, MSG_PEEK, NULL, NULL) = 35 read(5, "Server: BaseHTTP/0.3 Python/2.4."..., 35) = 35 select(6, [5], NULL, NULL, {900, 0}) = 1 (in [5], left {900, 0}) recvfrom(5, "Date: Tue, 09 Oct 2012 22:09:59 "..., 452, MSG_PEEK, NULL, NULL) = 37 read(5, "Date: Tue, 09 Oct 2012 22:09:59 "..., 37) = 37 select(6, [5], NULL, NULL, {900, 0}) = 1 (in [5], left {900, 0}) recvfrom(5, "Content-Type: text/html\r\n", 415, MSG_PEEK, NULL, NULL) = 25 read(5, "Content-Type: text/html\r\n", 25) = 25 select(6, [5], NULL, NULL, {900, 0}) = 1 (in [5], left {900, 0}) recvfrom(5, "Connection: close\r\n", 390, MSG_PEEK, NULL, NULL) = 19 read(5, "Connection: close\r\n", 19) = 19 select(6, [5], NULL, NULL, {900, 0}) = 1 (in [5], left {900, 0}) recvfrom(5, "\r\n", 371, MSG_PEEK, NULL, NULL) = 2 read(5, "\r\n", 2) = 2 select(6, [5], NULL, NULL, {0, 1}) = 1 (in [5], left {0, 1}) close(5) = 0 """ And here a 404 is treated incorrectly: """ socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 5 connect(5, {sa_family=AF_INET, sin_port=htons(4242), sin_addr=inet_addr("127.0.0.1")}, 16) = 0 select(6, NULL, [5], NULL, {900, 0}) = 1 (out [5], left {900, 0}) write(5, "GET /MISSING-8153 HTTP/1.1\r\nUser"..., 126) = 126 select(6, [5], NULL, NULL, {900, 0}) = 1 (in [5], left {899, 998000}) recvfrom(5, "HTTP/1.0 404 Not Found\r\n", 511, MSG_PEEK, NULL, NULL) = 24 read(5, "HTTP/1.0 404 Not Found\r\n", 24) = 24 select(6, [5], NULL, NULL, {900, 0}) = 1 (in [5], left {900, 0}) recvfrom(5, "Server: BaseHTTP/0.3 Python/2.4."..., 487, MSG_PEEK, NULL, NULL) = 35 read(5, "Server: BaseHTTP/0.3 Python/2.4."..., 35) = 35 select(6, [5], NULL, NULL, {900, 0}) = 1 (in [5], left {900, 0}) recvfrom(5, "Date: Tue, 09 Oct 2012 22:10:01 "..., 452, MSG_PEEK, NULL, NULL) = 37 read(5, "Date: Tue, 09 Oct 2012 22:10:01 "..., 37) = 37 select(6, [5], NULL, NULL, {900, 0}) = 1 (in [5], left {900, 0}) recvfrom(5, "Content-Type: text/html\r\n", 415, MSG_PEEK, NULL, NULL) = 25 read(5, "Content-Type: text/html\r\n", 25) = 25 select(6, [5], NULL, NULL, {900, 0}) = 1 (in [5], left {900, 0}) recvfrom(5, "Connection: close\r\n", 390, MSG_PEEK, NULL, NULL) = 19 read(5, "Connection: close\r\n", 19) = 19 select(6, [5], NULL, NULL, {900, 0}) = 1 (in [5], left {900, 0}) recvfrom(5, "\r\n", 371, MSG_PEEK, NULL, NULL) = 2 read(5, "\r\n", 2) = 2 HERE=> select(6, [5], NULL, NULL, {0, 1}) = 0 (Timeout) select(6, NULL, [5], NULL, {900, 0}) = 1 (out [5], left {900, 0}) write(5, "GET /FOUND-8154 HTTP/1.1\r\nUser-A"..., 124) = 124 select(6, [5], NULL, NULL, {900, 0}) = 1 (in [5], left {900, 0}) recvfrom(5, "\nError response</ti"..., 511, MSG_PEEK, NULL, NULL) = 190 stat("FOUND-8154", 0x7fffcc530d60) = -1 ENOENT (No such file or directory) open("FOUND-8154", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 7 clock_gettime(CLOCK_MONOTONIC, {130079, 24215187}) = 0 select(6, [5], NULL, NULL, {900, 0}) = 1 (in [5], left {900, 0}) read(5, "<head>\n<title>Error response</ti"..., 8192) = 190 clock_gettime(CLOCK_MONOTONIC, {130079, 24258187}) = 0 fstat(7, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b0004bbc000 write(7, "<head>\n<title>Error response</ti"..., 190) = 190 write(4, "\n 0K "..., 777) = 777 select(6, [5], NULL, NULL, {900, 0}) = 1 (in [5], left {900, 0}) read(5, 0x1becc8f0, 8192) = -1 ECONNRESET (Connection reset by peer) close(5) = 0 """ You can se that after 404 and "Connection: close" is returned, wget calls select() with a 1us timeout, to check if the socket has been closed by the other end. That's /src/connect.c:test_socket_open() in wget source code. This is used by persistent_available_p() in src/http.c, with this comment: """ Finally, check whether the connection is still open. This is important because most servers implement liberal (short) timeout on persistent connections. Wget can of course always reconnect if the connection doesn't work out, but it's nicer to know in advance. """ So it deliberately reuses the same connection (so-called persistent connection) if the http server doesn't close it right away. This explains probably why you see this mainly when many threads are in use. I'm not an http expert, so I'm not sure whether it's legal... ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15991> _______________________________________ From report at bugs.python.org Wed Oct 10 01:43:08 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 09 Oct 2012 23:43:08 +0000 Subject: [issue16170] remove Linux skip from test_subprocess's test_executable() test In-Reply-To: <1349746875.36.0.803736287299.issue16170@psf.upfronthosting.co.za> Message-ID: <1349826188.41.0.591517087358.issue16170@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Never mind on the above question. Those are different argv's. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16170> _______________________________________ From report at bugs.python.org Wed Oct 10 02:00:03 2012 From: report at bugs.python.org (Brian Keegan) Date: Wed, 10 Oct 2012 00:00:03 +0000 Subject: [issue16177] IDLE Crash on Open Parens In-Reply-To: <1349819775.15.0.907636655492.issue16177@psf.upfronthosting.co.za> Message-ID: <CALrYNy97v0JJny=9F1Qp4PvT0uAffLepx3kqCirbFoEi1PA0Ew@mail.gmail.com> Brian Keegan added the comment: Directory contents attached. I can provide the scripts listed there if you believe they could somehow be a culprit as well. However, IDLE would still crash with a vanilla shell on an open parens. On Tue, Oct 9, 2012 at 5:56 PM, Roger Serwy <report at bugs.python.org> wrote: > > Roger Serwy added the comment: > > Brian, can you post the files from your .idlerc-disabled directory? The > directory contains configuration text files. I want to find out what > configuration caused the bug. (You may want to omit the recent-files.lst if > you don't want to disclose that.) > > ---------- > nosy: +serwy > > _______________________________________ > Python tracker <report at bugs.python.org> > <http://bugs.python.org/issue16177> > _______________________________________ > ---------- Added file: http://bugs.python.org/file27510/.idlerc-disabled.zip _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16177> _______________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: .idlerc-disabled.zip Type: application/zip Size: 1070 bytes Desc: not available URL: <http://mail.python.org/pipermail/python-bugs-list/attachments/20121010/e037ef97/attachment.zip> From report at bugs.python.org Wed Oct 10 02:24:47 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 10 Oct 2012 00:24:47 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349706807.82.0.556520783402.issue16166@psf.upfronthosting.co.za> Message-ID: <1349828687.29.0.78430534215.issue16166@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16166> _______________________________________ From report at bugs.python.org Wed Oct 10 02:38:10 2012 From: report at bugs.python.org (Stephen McInerney) Date: Wed, 10 Oct 2012 00:38:10 +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: <1349829490.33.0.231069115089.issue14313@psf.upfronthosting.co.za> Stephen McInerney added the comment: The patch is great, can you approve it urgently please? It is seriously buggy to silently return a bad filestream, and not just throw the exception. I just wasted over a day's productivity due to this. I'm not alone. I would argue for raising priority to High. This is a bad bug with a simple but urgent fix. ---------- nosy: +spmcinerney _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14313> _______________________________________ From report at bugs.python.org Wed Oct 10 03:04:02 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 10 Oct 2012 01:04:02 +0000 Subject: [issue16152] Trailing whitespace makes tokenize.generate_tokens pathological In-Reply-To: <1349557761.41.0.537472367724.issue16152@psf.upfronthosting.co.za> Message-ID: <1349831042.28.0.636862531013.issue16152@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Ned, could you possibly send a Contributor Form Agreement? http://www.python.org/psf/contrib/ ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16152> _______________________________________ From report at bugs.python.org Wed Oct 10 03:07:46 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 10 Oct 2012 01:07:46 +0000 Subject: [issue16152] Trailing whitespace makes tokenize.generate_tokens pathological In-Reply-To: <1349557761.41.0.537472367724.issue16152@psf.upfronthosting.co.za> Message-ID: <1349831266.57.0.0449893952161.issue16152@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16152> _______________________________________ From report at bugs.python.org Wed Oct 10 03:12:38 2012 From: report at bugs.python.org (Roger Serwy) Date: Wed, 10 Oct 2012 01:12:38 +0000 Subject: [issue16177] IDLE Crash on Open Parens In-Reply-To: <CALrYNy97v0JJny=9F1Qp4PvT0uAffLepx3kqCirbFoEi1PA0Ew@mail.gmail.com> Message-ID: <5074CB88.40200@gmail.com> Roger Serwy added the comment: Thanks for the directory contents. The only difference I see is the "encoding = locale" which could only be set manually since the configuration editor in IDLE does not offer a way of setting it. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16177> _______________________________________ From report at bugs.python.org Wed Oct 10 04:05:40 2012 From: report at bugs.python.org (Ned Batchelder) Date: Wed, 10 Oct 2012 02:05:40 +0000 Subject: [issue16152] Trailing whitespace makes tokenize.generate_tokens pathological In-Reply-To: <1349557761.41.0.537472367724.issue16152@psf.upfronthosting.co.za> Message-ID: <1349834740.75.0.399859202009.issue16152@psf.upfronthosting.co.za> Ned Batchelder added the comment: Jes?s, done! ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16152> _______________________________________ From report at bugs.python.org Wed Oct 10 04:32:35 2012 From: report at bugs.python.org (Mike Hoy) Date: Wed, 10 Oct 2012 02:32:35 +0000 Subject: [issue12322] ElementPath 1.3 expressions documentation In-Reply-To: <1307959369.7.0.162667287307.issue12322@psf.upfronthosting.co.za> Message-ID: <1349836355.04.0.942214694044.issue12322@psf.upfronthosting.co.za> Mike Hoy added the comment: >> Mike - a note for the future: when you create an updated patch, create it anew vs. a clean repo. Don't "compound" patches. No problem, thanks for committing the patch. Wasn't aware that compounding patches caused a problem. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12322> _______________________________________ From report at bugs.python.org Wed Oct 10 05:26:15 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 10 Oct 2012 03:26:15 +0000 Subject: [issue16115] test the executable arg to Popen() and improve related docs In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <1349839575.53.0.625356141961.issue16115@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I would like to make a few more miscellaneous improvements to the Popen() docs, including a clarification resulting from issue #16170, which stemmed from this issue. The proposed patch is attached. ---------- resolution: fixed -> stage: committed/rejected -> status: closed -> open title: test that executable arg to Popen() takes precedence over args -> test the executable arg to Popen() and improve related docs Added file: http://bugs.python.org/file27511/issue-16115-3.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16115> _______________________________________ From report at bugs.python.org Wed Oct 10 06:05:00 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 10 Oct 2012 04:05:00 +0000 Subject: [issue16173] Wrong offset on SyntaxError when identifier contains non-ascii characters In-Reply-To: <1349778233.78.0.111302090144.issue16173@psf.upfronthosting.co.za> Message-ID: <1349841900.64.0.440989401161.issue16173@psf.upfronthosting.co.za> Ezio Melotti added the comment: I was just in a hurry and didn't have time to check if they were indeed the same issue. Looks like they are, so I'm closing this as duplicate. ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> [Py3k] SyntaxError cursor shifted if multibyte character is in line. versions: +Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16173> _______________________________________ From report at bugs.python.org Wed Oct 10 06:10:21 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 10 Oct 2012 04:10:21 +0000 Subject: [issue13598] string.Formatter doesn't support empty curly braces "{}" In-Reply-To: <1323835162.4.0.792542335688.issue13598@psf.upfronthosting.co.za> Message-ID: <1349842221.37.0.534507360246.issue13598@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +ezio.melotti versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13598> _______________________________________ From report at bugs.python.org Wed Oct 10 07:04:32 2012 From: report at bugs.python.org (Eric Snow) Date: Wed, 10 Oct 2012 05:04:32 +0000 Subject: [issue16160] subclassing types.SimpleNamespace does not work In-Reply-To: <1349658607.29.0.0643105543226.issue16160@psf.upfronthosting.co.za> Message-ID: <1349845472.19.0.526443411426.issue16160@psf.upfronthosting.co.za> Eric Snow added the comment: Here's a patch that fixes subclass support. It was supposed to work in the first place. Guess I had tunnel vision at the time. The fix is essentially a copy of the code in dict_new() in Objects/dictobject.c. I left out the part about releasing GC if the type is not a subclass. Note: see #15022, #15004, and #15003 for other things SimpleNamespace is missing. I can get those done if it would be meaningful to you. ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file27512/issue16160.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16160> _______________________________________ From report at bugs.python.org Wed Oct 10 09:12:07 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 10 Oct 2012 07:12:07 +0000 Subject: [issue15991] BaseHTTPServer with ThreadingMixIn serving wrong data sometimes In-Reply-To: <CAH_1eM2y+8k8TwoCBQB_FdcHr1WFPhfOA8zSUzkJ6K=Z91BvCg@mail.gmail.com> Message-ID: <CAH_1eM0CLYg+M1Ne+OJ-auA0sZRoPZ9amM1HrdBNxHP0TSTasA@mail.gmail.com> Charles-Fran?ois Natali added the comment: According to http://tools.ietf.org/html/rfc2616#section-8.1, persistent connections are default in HTTP 1.1. However, here's what's said about the persistence negotiation: """ An HTTP/1.1 server MAY assume that a HTTP/1.1 client intends to maintain a persistent connection unless a Connection header including the connection-token "close" was sent in the request. If the server chooses to close the connection immediately after sending the response, it SHOULD send a Connection header including the connection-token close. An HTTP/1.1 client MAY expect a connection to remain open, but would decide to keep it open based on whether the response from a server contains a Connection header with the connection-token close. In case the client does not want to maintain a connection for more than that request, it SHOULD send a Connection header including the connection-token close. If either the client or the server sends the close token in the Connection header, that request becomes the last one for the connection. """ And if you have a look at the strace output (or a tcpdump capture), you see that httpserver indeeds sends a "Connection: close" header, which wget ignores: """ select(6, [5], NULL, NULL, {900, 0}) = 1 (in [5], left {900, 0}) recvfrom(5, "Connection: close\r\n", 390, MSG_PEEK, NULL, NULL) = 19 read(5, "Connection: close\r\n", 19) = 19 select(6, [5], NULL, NULL, {900, 0}) = 1 (in [5], left {900, 0}) recvfrom(5, "\r\n", 371, MSG_PEEK, NULL, NULL) = 2 read(5, "\r\n", 2) = 2 select(6, [5], NULL, NULL, {0, 1}) = 0 (Timeout) select(6, NULL, [5], NULL, {900, 0}) = 1 (out [5], left {900, 0}) write(5, "GET /FOUND-8154 HTTP/1.1\r\nUser-A"..., 124) = 124 select(6, [5], NULL, NULL, {900, 0}) = 1 (in [5], left {900, 0}) recvfrom(5, "<head>\n<title>Error response</ti"..., 511, MSG_PEEK, NULL, NULL) = 190 stat("FOUND-8154", 0x7fffcc530d60) = -1 ENOENT (No such file or directory) open("FOUND-8154", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 7 clock_gettime(CLOCK_MONOTONIC, {130079, 24215187}) = 0 select(6, [5], NULL, NULL, {900, 0}) = 1 (in [5], left {900, 0}) read(5, "<head>\n<title>Error response</ti"..., 8192) = 190 clock_gettime(CLOCK_MONOTONIC, {130079, 24258187}) = 0 fstat(7, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b0004bbc000 write(7, "<head>\n<title>Error response</ti"..., 190) = 190 write(4, "\n 0K "..., 777) = 777 select(6, [5], NULL, NULL, {900, 0}) = 1 (in [5], left {900, 0}) read(5, 0x1becc8f0, 8192) = -1 ECONNRESET (Connection reset by peer) close(5) = 0 """ So it really looks like a wget bug. I'd suggest closing as invalid, and reporting this to wget developers. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15991> _______________________________________ From report at bugs.python.org Wed Oct 10 10:47:02 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 10 Oct 2012 08:47:02 +0000 Subject: [issue15991] BaseHTTPServer with ThreadingMixIn serving wrong data sometimes In-Reply-To: <1348171381.08.0.748825821227.issue15991@psf.upfronthosting.co.za> Message-ID: <1349858822.08.0.0954438044672.issue15991@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Furthermore, BaseHTTPServer responds with a HTTP/1.0 status line (not HTTP/1.1), meaning persistent connections are not the default. Therefore, I'm closing as invalid. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15991> _______________________________________ From report at bugs.python.org Wed Oct 10 10:59:12 2012 From: report at bugs.python.org (V.E.O) Date: Wed, 10 Oct 2012 08:59:12 +0000 Subject: [issue16183] ZipExtFile object close without file handle closed Message-ID: <1349859552.28.0.331403312725.issue16183@psf.upfronthosting.co.za> New submission from V.E.O: Hi, I tried to open file-like object ZipExtFile in one zip file, after operations, I close it and after all, close ZipFile. But I still can not remove the zip file immediately. This problem happens on Windows, error msg: WindowsError: [Error 32] The process cannot access the file because it is being used by another process: ...... Sample code as below: z = ZipFile('D:\\1', 'r') zlist = z.infolist() for zi in zlist: zf = z.open(zi) zf.close() z.close() os.remove(attach) ---------- components: Library (Lib) messages: 172555 nosy: V.E.O priority: normal severity: normal status: open title: ZipExtFile object close without file handle closed versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16183> _______________________________________ From report at bugs.python.org Wed Oct 10 10:59:29 2012 From: report at bugs.python.org (V.E.O) Date: Wed, 10 Oct 2012 08:59:29 +0000 Subject: [issue16183] ZipExtFile object close without file handle closed In-Reply-To: <1349859552.28.0.331403312725.issue16183@psf.upfronthosting.co.za> Message-ID: <1349859569.39.0.137671227372.issue16183@psf.upfronthosting.co.za> Changes by V.E.O <V.E.O at TOM.COM>: ---------- type: -> behavior _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16183> _______________________________________ From report at bugs.python.org Wed Oct 10 11:32:43 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 10 Oct 2012 09:32:43 +0000 Subject: [issue16114] incorrect path in subprocess.Popen() FileNotFoundError message In-Reply-To: <1349237807.22.0.592724343556.issue16114@psf.upfronthosting.co.za> Message-ID: <1349861563.57.0.147982887146.issue16114@psf.upfronthosting.co.za> Gregory P. Smith added the comment: replacing repr(args[0]) with repr(executable) in the identified python should be sufficient for this bug as originally reported. BUT it goes deeper: I just ran into this error in a different case. It also happens when cwd is passed and the chdir(cwd) fails in the child process. args[0] is reported as not found rather than cwd in the error message. I have a test and fix for that. I'll take care of both. ---------- assignee: chris.jerdonek -> gregory.p.smith nosy: +gregory.p.smith _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16114> _______________________________________ From report at bugs.python.org Wed Oct 10 11:42:51 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 10 Oct 2012 09:42:51 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349706807.82.0.556520783402.issue16166@psf.upfronthosting.co.za> Message-ID: <1349862171.67.0.245028470423.issue16166@psf.upfronthosting.co.za> Christian Heimes added the comment: The patch defines either PY_IS_BIG_ENDIAN or PY_IS_LITTLE_ENDIAN and sets PY_LITTLE_ENDIAN_FLAG to either 0 or 1 for some modules that require a boolean flag. ---------- Added file: http://bugs.python.org/file27513/endian.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16166> _______________________________________ From report at bugs.python.org Wed Oct 10 11:49:29 2012 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Wed, 10 Oct 2012 09:49:29 +0000 Subject: [issue15278] UnicodeDecodeError when readline in codecs.py In-Reply-To: <1341674319.29.0.269195397783.issue15278@psf.upfronthosting.co.za> Message-ID: <1349862569.84.0.138655370126.issue15278@psf.upfronthosting.co.za> Walter D?rwald added the comment: > >>> codecs.utf_8_decode('\u20ac'.encode('utf8')[:2]) > ('', 0) > > Oh... codecs.CODEC_decode are incremental decoders? I misunderstood completly this. No, those function are not decoders, they're just helper functions used to implement the real incremental decoders. That's why they're undocumented. Whether codecs.utf_8_decode() returns partial results or raises an exception depends on the final argument:: >>> s = '\u20ac'.encode('utf8')[:2] >>> codecs.utf_8_decode(s, 'strict') ('', 0) >>> codecs.utf_8_decode(s, 'strict', False) ('', 0) >>> codecs.utf_8_decode(s, 'strict', True) Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 0-1: unexpected end of data If you look at encodings/utf_8.py you see that the stateless decoder call codecs.utf_8_decode() with final==True:: def decode(input, errors='strict'): return codecs.utf_8_decode(input, errors, True) so the stateless decoder *will* raise exceptions for partial results. The incremental decoder simply passed on the final argument given to its encode() method. ---------- nosy: +doerwalter _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15278> _______________________________________ From report at bugs.python.org Wed Oct 10 11:58:43 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Wed, 10 Oct 2012 09:58:43 +0000 Subject: [issue16179] hashlib.md5 / json inconsistency In-Reply-To: <1349809883.96.0.199738834001.issue16179@psf.upfronthosting.co.za> Message-ID: <1349863123.04.0.411043009953.issue16179@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Actually, that?s not the point here, the code has a deeper flaw. You?re computing hashlib.md5() on `data.encode()` and `str(jsonData).encode()`. Did you have a look how they look like? >>> data.encode() b'{"key1":"value1","key2":"value2"}' [71875 refs] >>> str(jsonData).encode() b"{'key1': 'value1', 'key2': 'value2'}" `str(jsonData)` doesn?t return JSON because it?s a simple dict(): >>> type(jsonData) <class 'dict'> If you wanted to have JSON again, you?d have to use `json.dumps()`: >>> json.dumps(jsonData) '{"key1": "value1", "key2": "value2"}' HOWEVER: This string _also_ differs from yours due to additional whitespace, ie. the sum would differ again. Additionally, as David pointed out, you can?t rely on the order of the dict. json.dump() could just as well return `'{"key2": "value2", "key1": "value1"}'`. ---------- nosy: +hynek _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16179> _______________________________________ From report at bugs.python.org Wed Oct 10 12:13:26 2012 From: report at bugs.python.org (=?utf-8?b?Um9iaW4gw4Vzw6lu?=) Date: Wed, 10 Oct 2012 10:13:26 +0000 Subject: [issue16179] hashlib.md5 / json inconsistency In-Reply-To: <1349809883.96.0.199738834001.issue16179@psf.upfronthosting.co.za> Message-ID: <1349864006.86.0.832748313138.issue16179@psf.upfronthosting.co.za> Robin ?s?n added the comment: Yes, you are quite right. Somewhere in the back of my head I had a feeling I should understand what was happening, hence my comment "Am I doing something wrong here?". I just couldn't see it. Thank you. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16179> _______________________________________ From report at bugs.python.org Wed Oct 10 12:18:17 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 Oct 2012 10:18:17 +0000 Subject: [issue16183] ZipExtFile object close without file handle closed In-Reply-To: <1349859552.28.0.331403312725.issue16183@psf.upfronthosting.co.za> Message-ID: <1349864297.45.0.702550749642.issue16183@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- components: +Windows nosy: +alanmcintyre, loewis _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16183> _______________________________________ From report at bugs.python.org Wed Oct 10 12:48:25 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 10 Oct 2012 10:48:25 +0000 Subject: [issue16114] incorrect path in subprocess.Popen() FileNotFoundError message In-Reply-To: <1349237807.22.0.592724343556.issue16114@psf.upfronthosting.co.za> Message-ID: <1349866105.1.0.709480726026.issue16114@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > replacing repr(args[0]) with repr(executable) in the identified python should be sufficient for this bug as originally reported. Yes, almost. The executable variable is a bytes object so it needs to be fsdecoded first. > I have a test and fix for that. I'll take care of both. Let me at least upload what I already prepared. You can add to it or modify it as you see fit. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16114> _______________________________________ From report at bugs.python.org Wed Oct 10 12:52:44 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Oct 2012 10:52:44 +0000 Subject: [issue16114] incorrect path in subprocess.Popen() FileNotFoundError message In-Reply-To: <1349237807.22.0.592724343556.issue16114@psf.upfronthosting.co.za> Message-ID: <3XcBwW171ZzP7m@mail.python.org> Roundup Robot added the comment: New changeset e938fa6be509 by Gregory P. Smith in branch '3.2': Fixes Issue #16114: The subprocess module no longer provides a http://hg.python.org/cpython/rev/e938fa6be509 New changeset ee30d7ef70be by Gregory P. Smith in branch '3.3': Fixes Issue #16114: The subprocess module no longer provides a http://hg.python.org/cpython/rev/ee30d7ef70be ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16114> _______________________________________ From report at bugs.python.org Wed Oct 10 12:53:22 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Oct 2012 10:53:22 +0000 Subject: [issue16114] incorrect path in subprocess.Popen() FileNotFoundError message In-Reply-To: <1349237807.22.0.592724343556.issue16114@psf.upfronthosting.co.za> Message-ID: <3XcBxG2nYgzP7m@mail.python.org> Roundup Robot added the comment: New changeset 543bb0e0afb9 by Gregory P. Smith in branch 'default': Fixes Issue #16114: The subprocess module no longer provides a http://hg.python.org/cpython/rev/543bb0e0afb9 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16114> _______________________________________ From report at bugs.python.org Wed Oct 10 12:54:48 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 10 Oct 2012 10:54:48 +0000 Subject: [issue16114] incorrect path in subprocess.Popen() FileNotFoundError message In-Reply-To: <1349237807.22.0.592724343556.issue16114@psf.upfronthosting.co.za> Message-ID: <1349866488.26.0.488859894452.issue16114@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I'm keeping this open until I backport this to subprocess32 for use on Python 2. ---------- stage: needs patch -> commit review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16114> _______________________________________ From report at bugs.python.org Wed Oct 10 13:09:42 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Oct 2012 11:09:42 +0000 Subject: [issue16160] subclassing types.SimpleNamespace does not work In-Reply-To: <1349658607.29.0.0643105543226.issue16160@psf.upfronthosting.co.za> Message-ID: <1349867382.21.0.279824739738.issue16160@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks. I don't have a need for those in my current application at the current time. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16160> _______________________________________ From report at bugs.python.org Wed Oct 10 13:18:48 2012 From: report at bugs.python.org (Yury) Date: Wed, 10 Oct 2012 11:18:48 +0000 Subject: [issue16184] Attack against the pseudorandom number generator Message-ID: <1349867928.2.0.793137893285.issue16184@psf.upfronthosting.co.za> New submission from Yury: ---[ Vulnerability description] Positive Research experts have detected a vulnerability "Predictable pseudorandom numbers in Python" caused by random.random() output in Python. By default, Mersenne Twister initialization is done during random module import and then after 312 random.random() calls that allows attackers to predict 313 random number with 2^8 accuracy based on 1, 2, 199, 200, 511, 625 random numbers. --[Solution] We recommend you to initialize random.seed() after every 312 calls that guarantees enough entropy of Mersenne Twister element statuses. ---[Credits] Vulnerability was detected by Timur Yunusov, Positive Research Center (Positive Technologies Company) --- 1. In spite of the fact that MT states are initialized correctly, there is a practical method to exploit the vulnerability because of Python web framework peculiarities. 2. The possibility that a random number is among described 256 variants is 12,5% because there are two methods to round off numbers to the certain accuracy. This provides 8 possible variants of existing state_1[2], state_1[397], state_2[397]. You can find the code necessary to demonstrate the vulnerability (vuln.py) and exploit it (brute.py) attached. ---------- components: None files: POC.zip messages: 172566 nosy: ymaryshev priority: normal severity: normal status: open title: Attack against the pseudorandom number generator type: security versions: Python 3.3 Added file: http://bugs.python.org/file27514/POC.zip _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16184> _______________________________________ From report at bugs.python.org Wed Oct 10 13:25:39 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 10 Oct 2012 11:25:39 +0000 Subject: [issue16114] incorrect path in subprocess.Popen() FileNotFoundError message In-Reply-To: <1349237807.22.0.592724343556.issue16114@psf.upfronthosting.co.za> Message-ID: <1349868339.07.0.559242208637.issue16114@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I made some comments on the changes as committed here: http://mail.python.org/pipermail/python-dev/2012-October/122125.html """ It would be cleaner to use the self.assertRaises() pattern here and also probably better to share code across the three test methods which are nearly identical to one another (there is a fourth scenario I would also add of shell=True). I would also check for FileNotFoundError instead of OSError in the 3.3 and later versions. """ ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16114> _______________________________________ From report at bugs.python.org Wed Oct 10 13:39:28 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 10 Oct 2012 11:39:28 +0000 Subject: [issue16184] Attack against the pseudorandom number generator In-Reply-To: <1349867928.2.0.793137893285.issue16184@psf.upfronthosting.co.za> Message-ID: <1349869168.62.0.485759742567.issue16184@psf.upfronthosting.co.za> Christian Heimes added the comment: I don't see a problem here. It's a well known and documented fact that a PRNG like a Mersenne-Twister must not be used for any cryptographic purpose. The most of the random module is designed to be deterministic. The global instance even keeps its state after fork(). It's really not a security issue but a feature. http://docs.python.org/library/random.html --- The Mersenne Twister is one of the most extensively tested random number generators in existence. However, being completely deterministic, it is not suitable for all purposes, and is completely unsuitable for cryptographic purposes. --- The os.urandom() function and random.SystemRandom class are desigend to create cryptographically strong random data that can be for most purposes except for long lived crypto keys like SSL certs. ---------- components: +Library (Lib) -None nosy: +christian.heimes _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16184> _______________________________________ From report at bugs.python.org Wed Oct 10 14:21:22 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 10 Oct 2012 12:21:22 +0000 Subject: [issue16185] include path in subprocess.Popen() file not found error messages on Windows Message-ID: <1349871682.42.0.803066776149.issue16185@psf.upfronthosting.co.za> New submission from Chris Jerdonek: Currently, when subprocess.Popen() raises a FileNotFoundError on POSIX systems, the error message helpfully includes the path not found. But it does not do so on Windows. This issue is to include the path also in the messages of the corresponding errors on Windows. See also the related issue 16114. ---------- components: Library (Lib) messages: 172569 nosy: asvetlov, chris.jerdonek, gregory.p.smith priority: normal severity: normal status: open title: include path in subprocess.Popen() file not found error messages on Windows type: enhancement versions: Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16185> _______________________________________ From report at bugs.python.org Wed Oct 10 14:23:55 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 10 Oct 2012 12:23:55 +0000 Subject: [issue16114] incorrect path in subprocess.Popen() FileNotFoundError message In-Reply-To: <1349237807.22.0.592724343556.issue16114@psf.upfronthosting.co.za> Message-ID: <1349871835.51.0.81634678217.issue16114@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Maybe better to fix Windows behavior for unifying FileNotFoundError? I created issue 16185 to include the path in the messages of the corresponding errors on Windows. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16114> _______________________________________ From report at bugs.python.org Wed Oct 10 15:13:35 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 10 Oct 2012 13:13:35 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper In-Reply-To: <1349798954.84.0.328560890888.issue16175@psf.upfronthosting.co.za> Message-ID: <1349874815.57.0.251898984609.issue16175@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Adding the IOCP functions to _winapi is straightforward -- see patch. Note that there seems to be no way to unregister a handle from an IOCP. Creating overlapped equivalents of socket.accept() and socket.connect() looks more complicated. Perhaps that should be added to the socket module or left to pywin32. ---------- keywords: +patch Added file: http://bugs.python.org/file27515/iocp.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16175> _______________________________________ From report at bugs.python.org Wed Oct 10 15:14:48 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 10 Oct 2012 13:14:48 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper In-Reply-To: <1349798954.84.0.328560890888.issue16175@psf.upfronthosting.co.za> Message-ID: <1349874888.3.0.134449659101.issue16175@psf.upfronthosting.co.za> Changes by Richard Oudkerk <shibturn at gmail.com>: Added file: http://bugs.python.org/file27516/iocp_example.py _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16175> _______________________________________ From report at bugs.python.org Wed Oct 10 15:28:04 2012 From: report at bugs.python.org (Brett Cannon) Date: Wed, 10 Oct 2012 13:28:04 +0000 Subject: [issue15111] Wrong ImportError message with importlib In-Reply-To: <1340151446.59.0.121813331775.issue15111@psf.upfronthosting.co.za> Message-ID: <1349875684.9.0.378961978558.issue15111@psf.upfronthosting.co.za> Brett Cannon added the comment: Here are two possible tests. 1) __import__('distutils', fromlist=['_i_do_not_exist']) should return distutils 2) Use a fake loader which executes some code which does nothing more than tries to import a non-existent module. The trick with this test is that the submodule must be found but a module that the submodule needs cannot be found by import itself (and simply not faked with an ImportError thanks to the _not_found hack and needing that attribute to propagate up to the submodule search). And I think the failure stems from the lack of check against exc.name equaling the name of the module being imported (e.g. exc.name == distutils.msvc9compiler) since the winreg import is a failed module search as well. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15111> _______________________________________ From report at bugs.python.org Wed Oct 10 15:47:04 2012 From: report at bugs.python.org (jamesf) Date: Wed, 10 Oct 2012 13:47:04 +0000 Subject: [issue16186] shlex bug? Message-ID: <1349876824.59.0.894274371181.issue16186@psf.upfronthosting.co.za> New submission from jamesf: In [112]: def test_ws(s): .....: sl = shlex.shlex(s) .....: sl.whitespace = "|" .....: sl.whitespace_split = True .....: print list(sl) In [114]: test_ws("h w") # works fine ['h w'] In [115]: test_ws("'h' w") # i expected ["'h' w"] here, but why? ["'h'", ' w'] ---------- messages: 172573 nosy: jwfang priority: normal severity: normal status: open title: shlex bug? type: behavior versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16186> _______________________________________ From report at bugs.python.org Wed Oct 10 15:51:02 2012 From: report at bugs.python.org (jamesf) Date: Wed, 10 Oct 2012 13:51:02 +0000 Subject: [issue16186] shlex bug? In-Reply-To: <1349876824.59.0.894274371181.issue16186@psf.upfronthosting.co.za> Message-ID: <1349877062.29.0.447942929445.issue16186@psf.upfronthosting.co.za> jamesf added the comment: but if i did this, it works again: In [121]: test_ws(" 'h' w") # prepend a whitespace at the beginning [" 'h' w"] ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16186> _______________________________________ From report at bugs.python.org Wed Oct 10 16:21:23 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Oct 2012 14:21:23 +0000 Subject: [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <3XcHYG5jyvzQx0@mail.python.org> Roundup Robot added the comment: New changeset 00555659253d by Chris Jerdonek in branch '3.3': Issue #12947: Divide doctest "Option Flags and Directives" section into two. http://hg.python.org/cpython/rev/00555659253d New changeset 467c9f663b77 by Chris Jerdonek in branch 'default': Issue #12947: Merge doctest documentation improvements from 3.3. http://hg.python.org/cpython/rev/467c9f663b77 New changeset 15bfa778ec21 by Chris Jerdonek in branch '2.7': Issue #12947: Backport doctest documentation improvements from 3.3. http://hg.python.org/cpython/rev/15bfa778ec21 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12947> _______________________________________ From report at bugs.python.org Wed Oct 10 16:28:40 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 10 Oct 2012 14:28:40 +0000 Subject: [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349879320.61.0.0526927186037.issue12947@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Yes, the workaround should be applied in those cases as well. I added the workaround to the last remaining example. Nick was right before in that three of the four examples I mentioned above were in the part about "option flags" rather than in the part about "directives". I made those two parts into their own sections for added clarity. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12947> _______________________________________ From report at bugs.python.org Wed Oct 10 16:46:32 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 10 Oct 2012 14:46:32 +0000 Subject: [issue16187] incoming.irker hook raised an exception: [Errno 111] Connection refused Message-ID: <1349880392.26.0.557812672186.issue16187@psf.upfronthosting.co.za> New submission from Chris Jerdonek: I got the following irker-related errors when committing about 20 minutes ago: remote: added 3 changesets with 2 changes to 1 files remote: buildbot: change(s) sent successfully remote: sent email to roundup at report at bugs.python.org remote: notified python-checkins at python.org of incoming changeset 00555659253d remote: error: incoming.irker hook raised an exception: [Errno 111] Connection refused remote: notified python-checkins at python.org of incoming changeset 467c9f663b77 remote: error: incoming.irker hook raised an exception: [Errno 111] Connection refused remote: notified python-checkins at python.org of incoming changeset 15bfa778ec21 remote: error: incoming.irker hook raised an exception: [Errno 111] Connection refused ---------- components: None messages: 172577 nosy: chris.jerdonek, ezio.melotti, georg.brandl priority: normal severity: normal status: open title: incoming.irker hook raised an exception: [Errno 111] Connection refused type: behavior _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16187> _______________________________________ From report at bugs.python.org Wed Oct 10 16:50:44 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Oct 2012 14:50:44 +0000 Subject: [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <3XcJC80BDvzQsB@mail.python.org> Roundup Robot added the comment: New changeset 9057da41cf0b by Georg Brandl in branch '3.2': Issue #12947: revert earlier workaround and use a monkey-patch to enable showing doctest directives only in the doctest docs. http://hg.python.org/cpython/rev/9057da41cf0b New changeset 1202c1449d83 by Georg Brandl in branch '3.3': Issue #12947: revert earlier workaround and use a monkey-patch to enable showing doctest directives only in the doctest docs. http://hg.python.org/cpython/rev/1202c1449d83 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12947> _______________________________________ From report at bugs.python.org Wed Oct 10 16:51:46 2012 From: report at bugs.python.org (Georg Brandl) Date: Wed, 10 Oct 2012 14:51:46 +0000 Subject: [issue16187] incoming.irker hook raised an exception: [Errno 111] Connection refused In-Reply-To: <1349880392.26.0.557812672186.issue16187@psf.upfronthosting.co.za> Message-ID: <1349880706.35.0.601731803745.issue16187@psf.upfronthosting.co.za> Georg Brandl added the comment: Restarted. Let's see if this is reproducible. ---------- resolution: -> fixed status: open -> pending _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16187> _______________________________________ From report at bugs.python.org Wed Oct 10 16:53:05 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Oct 2012 14:53:05 +0000 Subject: [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <3XcJFr3c0VzQsB@mail.python.org> Roundup Robot added the comment: New changeset ffe9f644d5af by Georg Brandl in branch '2.7': Issue #12947: revert earlier workaround and use a monkey-patch to enable showing doctest directives only in the doctest docs. http://hg.python.org/cpython/rev/ffe9f644d5af ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12947> _______________________________________ From report at bugs.python.org Wed Oct 10 17:01:44 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 10 Oct 2012 15:01:44 +0000 Subject: [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349881304.27.0.837280089447.issue12947@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks, Georg. Can this new directive be applied to individual code blocks though (or be modified to do so)? After a closer review (as mentioned in my comment above), it seems that the doctest directives should only be displayed in the code snippets that are illustrating the use of doctest directives (as opposed to, say, the snippets that are illustrating doctest options without using directives). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12947> _______________________________________ From report at bugs.python.org Wed Oct 10 17:03:09 2012 From: report at bugs.python.org (Georg Brandl) Date: Wed, 10 Oct 2012 15:03:09 +0000 Subject: [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349881389.75.0.573723479263.issue12947@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't see any blocks in doctest.rst where the directives should be stripped, so it's enough to do it per-file. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12947> _______________________________________ From report at bugs.python.org Wed Oct 10 17:04:41 2012 From: report at bugs.python.org (Georg Brandl) Date: Wed, 10 Oct 2012 15:04:41 +0000 Subject: [issue16184] Attack against the pseudorandom number generator In-Reply-To: <1349867928.2.0.793137893285.issue16184@psf.upfronthosting.co.za> Message-ID: <1349881481.96.0.0640242680224.issue16184@psf.upfronthosting.co.za> Georg Brandl added the comment: > 1. In spite of the fact that MT states are initialized correctly, > there is a practical method to exploit the vulnerability because of > Python web framework peculiarities. What does this mean exactly? If it means that this predictability can be used for attacks on web frameworks because they assume cryptographic strength of random numbers, please report it to those frameworks' security channels, e.g. security at djangoproject.com. ---------- nosy: +georg.brandl _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16184> _______________________________________ From report at bugs.python.org Wed Oct 10 17:06:31 2012 From: report at bugs.python.org (rlinscheer) Date: Wed, 10 Oct 2012 15:06:31 +0000 Subject: [issue16188] Windows C Runtime Library Mismatch Message-ID: <1349881591.31.0.873714475408.issue16188@psf.upfronthosting.co.za> New submission from rlinscheer: When installing python-2.7.3.amd64.msi or python-2.7.3.msi and selecting for single-user (as opposed to for all users), an incorrect version of the microsoft C runtime library (msvcr90.dll) seems to be placed into the top-level directory along side the python executable. This results in the message: The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail. The event log shows the error too: Activation context generation failed for "C:\python_rob_32\pythonw.exe".Error in manifest or policy file "C:\python_rob_32\Microsoft.VC90.CRT.MANIFEST" on line 4. Component identity found in manifest does not match the identity of the component requested. Reference is Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8". Definition is Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.30729.1". Please use sxstrace.exe for detailed diagnosis. Running the sxstrace tool shows the following: INFO: Parsing Manifest File C:\python_rob_32\Microsoft.VC90.CRT.MANIFEST. INFO: Manifest Definition Identity is Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.30729.1". ERROR: Component identity found in manifest does not match the identity of the component requested. Reference is Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8". Definition is Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.30729.1". ERROR: Activation Context generation failed. This would seem to be the relevant section of the trace, though I have attached the full output of the sxstrace if desired. This leads me to the conclusion that a newer version of the C runtime library is being shipped with the python executable that was built with an older version. This problem was mentioned with less detail in issue 14608, but closed without resolution as far as I can tell. ---------- components: Installation files: rob_32.txt messages: 172584 nosy: rlinscheer priority: normal severity: normal status: open title: Windows C Runtime Library Mismatch type: crash versions: Python 2.7 Added file: http://bugs.python.org/file27517/rob_32.txt _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16188> _______________________________________ From report at bugs.python.org Wed Oct 10 17:07:48 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 10 Oct 2012 15:07:48 +0000 Subject: [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349881668.68.0.369106241235.issue12947@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Like these that discuss the behavior of the doctest.IGNORE_EXCEPTION_DETAIL option (but before doctest directives have been introduced): http://hg.python.org/cpython/file/0d6910bef979/Doc/library/doctest.rst#l543 The key is that you can have options take effect without using directives, so it would be good if people can see examples like that. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12947> _______________________________________ From report at bugs.python.org Wed Oct 10 17:20:25 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 10 Oct 2012 15:20:25 +0000 Subject: [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349882425.0.0.243701916694.issue12947@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Georg suggested removing the doctest directives from the examples I mentioned. As currently written, they don't help them pass if doctest were run on the .rst file. That sounds fine to me for now. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12947> _______________________________________ From report at bugs.python.org Wed Oct 10 17:37:11 2012 From: report at bugs.python.org (Evan Jones) Date: Wed, 10 Oct 2012 15:37:11 +0000 Subject: [issue1043134] Add preferred extensions for MIME types Message-ID: <1349883431.7.0.997953964515.issue1043134@psf.upfronthosting.co.za> Changes by Evan Jones <ej at evanjones.ca>: ---------- nosy: +evanj _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1043134> _______________________________________ From report at bugs.python.org Wed Oct 10 17:40:16 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Oct 2012 15:40:16 +0000 Subject: [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <3XcKJH6fHczPB8@mail.python.org> Roundup Robot added the comment: New changeset 705a70b0fff4 by Chris Jerdonek in branch '3.3': Issue #12947: Remove doctest directives from the doctest examples in the "Option Flag" section. http://hg.python.org/cpython/rev/705a70b0fff4 New changeset 9475fc82768e by Chris Jerdonek in branch 'default': Issue #12947: Merge doctest documentation change from 3.3. http://hg.python.org/cpython/rev/9475fc82768e New changeset 8704f9e7ad7c by Chris Jerdonek in branch '2.7': Issue #12947: Backport doctest documentation change from 3.3. http://hg.python.org/cpython/rev/8704f9e7ad7c ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12947> _______________________________________ From report at bugs.python.org Wed Oct 10 17:52:40 2012 From: report at bugs.python.org (Rainer Schaaf) Date: Wed, 10 Oct 2012 15:52:40 +0000 Subject: [issue16189] ld_so_aix not found Message-ID: <1349884360.41.0.476274191409.issue16189@psf.upfronthosting.co.za> New submission from Rainer Schaaf: When building an extension on AIX with distutils the build fails like this: /usr/local/lib/python3.3/config/ld_so_aix xlc_r -bI:/usr/local/lib/python3.3/config/python.exp build/temp.aix-5.3-3.3/pdflib_py.o -L../../../libs/pdflib/.libs -L../../../libs/icu/lib -ls_libpdf -lC -o build/lib.aix-5.3-3.3/pdflib_py.so unable to execute /usr/local/lib/python3.3/config/ld_so_aix: No such file or directory error: command '/usr/local/lib/python3.3/config/ld_so_aix' failed with exit status 1 The problem can easily be fixed by: ln -s /usr/local/lib/python3.3/config-3.3m /usr/local/lib/python3.3/config ---------- assignee: eric.araujo components: Distutils messages: 172588 nosy: eric.araujo, rjs, tarek priority: normal severity: normal status: open title: ld_so_aix not found type: compile error versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16189> _______________________________________ From report at bugs.python.org Wed Oct 10 18:13:10 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 10 Oct 2012 16:13:10 +0000 Subject: [issue16190] Misleading warning in random module docs Message-ID: <1349885590.41.0.193272073786.issue16190@psf.upfronthosting.co.za> New submission from Christian Heimes: The documentation [1] of the random module contains a misleading warning --- Warning: The generators of the random module should not be used for security purposes. Use ssl.RAND_bytes() if you require a cryptographically secure pseudorandom number generator. --- The warning should point users to os.urandom() and random.SystemRandom rather than ssl.RAND_bytes(). On Linux os.urandom() wraps /dev/urandom [2], on Windows it uses CryptGenRandom() [3]. Both are suitable for most cryptographic purposes except for long-lived keys (SSL, SSH, GPG certs etc.). ssl.RAND_bytes() should only be used for such long-lived data and not for salts, session ids and similar. I like to see the warning box in Python 2.7, too. It's still the default for docs.python.org. My inquiry is motivated by #16184. [1] http://docs.python.org/py3k/library/random.html [2] http://linux.die.net/man/4/urandom [3] http://msdn.microsoft.com/en-us/library/windows/desktop/aa379942%28v=vs.85%29.aspx ---------- assignee: docs at python messages: 172589 nosy: christian.heimes, docs at python priority: normal severity: normal status: open title: Misleading warning in random module docs type: security versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16190> _______________________________________ From report at bugs.python.org Wed Oct 10 18:13:37 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 10 Oct 2012 16:13:37 +0000 Subject: [issue16189] ld_so_aix not found In-Reply-To: <1349884360.41.0.476274191409.issue16189@psf.upfronthosting.co.za> Message-ID: <1349885617.01.0.448894477423.issue16189@psf.upfronthosting.co.za> ?ric Araujo added the comment: This probably happens in 3.2 too, where the ABI suffixes were added. I think Barry edited the sysconfig module to let it find config-$suffixes but not distutils.sysconfig. ---------- nosy: +barry versions: +Python 3.2 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16189> _______________________________________ From report at bugs.python.org Wed Oct 10 18:18:58 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 10 Oct 2012 16:18:58 +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: <1349885938.2.0.920637852727.issue14313@psf.upfronthosting.co.za> ?ric Araujo added the comment: Raising priority won?t give more free time to the module maintainer, or change the planned date for the next release. Thanks for reviewing the patch however, it is helpful. Did you apply it and run the test suite? ---------- versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14313> _______________________________________ From report at bugs.python.org Wed Oct 10 18:21:00 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Wed, 10 Oct 2012 16:21:00 +0000 Subject: [issue16184] Attack against the pseudorandom number generator In-Reply-To: <1349867928.2.0.793137893285.issue16184@psf.upfronthosting.co.za> Message-ID: <1349886060.2.0.978839472654.issue16184@psf.upfronthosting.co.za> Changes by Michele Orr? <maker.py at gmail.com>: ---------- nosy: +maker _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16184> _______________________________________ From report at bugs.python.org Wed Oct 10 18:22:35 2012 From: report at bugs.python.org (Georg Brandl) Date: Wed, 10 Oct 2012 16:22:35 +0000 Subject: [issue16190] Misleading warning in random module docs In-Reply-To: <1349885590.41.0.193272073786.issue16190@psf.upfronthosting.co.za> Message-ID: <1349886155.42.0.938610052374.issue16190@psf.upfronthosting.co.za> Georg Brandl added the comment: Sure, I'd propose a rewording that mentions both alternatives and when they should be used. ---------- nosy: +georg.brandl _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16190> _______________________________________ From report at bugs.python.org Wed Oct 10 18:25:09 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 10 Oct 2012 16:25:09 +0000 Subject: [issue13691] pydoc help (or help('help')) should show the doc for help In-Reply-To: <1325406152.03.0.315132806833.issue13691@psf.upfronthosting.co.za> Message-ID: <1349886309.62.0.462813256412.issue13691@psf.upfronthosting.co.za> ?ric Araujo added the comment: Cool! Can you add tests? ---------- stage: needs patch -> test needed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13691> _______________________________________ From report at bugs.python.org Wed Oct 10 18:43:09 2012 From: report at bugs.python.org (Roger Serwy) Date: Wed, 10 Oct 2012 16:43:09 +0000 Subject: [issue16186] shlex bug? In-Reply-To: <1349876824.59.0.894274371181.issue16186@psf.upfronthosting.co.za> Message-ID: <1349887389.45.0.174689510319.issue16186@psf.upfronthosting.co.za> Roger Serwy added the comment: I verified that the problem also occurs with 3.3 and 3.4 as well. Adding "sl.posix = True" causes the "h w" test to enter an infinite loop. ---------- nosy: +serwy versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16186> _______________________________________ From report at bugs.python.org Wed Oct 10 19:00:19 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 Oct 2012 17:00:19 +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: <1349888419.17.0.532666629808.issue9290@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The proposed patches make the behavior of sys.std* files in IDLE more similar to the behavior of sys.std* files in standard interpreter. Now sys.stdin have read() and readlines() methods. The source code is simplified. ---------- nosy: +kbk, loewis, serhiy.storchaka versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9290> _______________________________________ From report at bugs.python.org Wed Oct 10 19:01:06 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 Oct 2012 17:01:06 +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: <1349888466.06.0.993902545192.issue9290@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- keywords: +patch Added file: http://bugs.python.org/file27518/idle_stdstreams-3.3.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9290> _______________________________________ From report at bugs.python.org Wed Oct 10 19:02:29 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 Oct 2012 17:02:29 +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: <1349888549.56.0.938504629028.issue9290@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: Added file: http://bugs.python.org/file27519/idle_stdstreams-3.2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9290> _______________________________________ From report at bugs.python.org Wed Oct 10 19:03:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 Oct 2012 17:03:16 +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: <1349888596.75.0.375480302466.issue9290@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: Added file: http://bugs.python.org/file27520/idle_stdstreams-2.7.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9290> _______________________________________ From report at bugs.python.org Wed Oct 10 19:33:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 Oct 2012 17:33:49 +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: <1349890429.53.0.953974333474.issue12967@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If this issue only about 'errors' attribute of IDLE RPC Proxy for standard IO streams, then it should be closed as outdated. If this issue about 'errors' attribute of IDLE standard IO streams (even when running IDLE without a subprocess), then the patches for issue9290 will solve this issue. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12967> _______________________________________ From report at bugs.python.org Wed Oct 10 19:59:32 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 10 Oct 2012 17:59:32 +0000 Subject: [issue15833] most failures to write byte-compiled file no longer suppressed In-Reply-To: <1349723595.46.0.729789216832.issue15833@psf.upfronthosting.co.za> Message-ID: <CAH_1eM2k+Xq0KmJPXOe+=-PEBSuP2ZGgTXtwDK8rM6+qtve6Gg@mail.gmail.com> Charles-Fran?ois Natali added the comment: > Charles-Fran?ois's patch looks ok to me. I don't know if this warrants adding a test. Yes, and triggering a failure other than a permission error (which is probably already tested) can be difficult. I'm abroad and won't be able to commit it until at least a week, so if someone's willing to commit it before go ahead :-) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15833> _______________________________________ From report at bugs.python.org Wed Oct 10 20:00:40 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 10 Oct 2012 18:00:40 +0000 Subject: [issue16189] ld_so_aix not found In-Reply-To: <1349885617.01.0.448894477423.issue16189@psf.upfronthosting.co.za> Message-ID: <20121010140036.276d5db8@resist.wooz.org> Barry A. Warsaw added the comment: On Oct 10, 2012, at 04:13 PM, ?ric Araujo wrote: >This probably happens in 3.2 too, where the ABI suffixes were added. I think >Barry edited the sysconfig module to let it find config-$suffixes but not >distutils.sysconfig. This sure smells familiar, like I've fixed this some place before. But I can't find it, in either the py32 news or in the Ubuntu package changelogs. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16189> _______________________________________ From report at bugs.python.org Wed Oct 10 20:39:26 2012 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Oct 2012 18:39:26 +0000 Subject: [issue10551] mimetypes read from the registry should not overwrite standard mime mappings In-Reply-To: <1290885326.33.0.141249546234.issue10551@psf.upfronthosting.co.za> Message-ID: <1349894366.86.0.519001353356.issue10551@psf.upfronthosting.co.za> Changes by Ned Deily <nad at acm.org>: ---------- nosy: -ned.deily _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10551> _______________________________________ From report at bugs.python.org Wed Oct 10 20:46:43 2012 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Oct 2012 18:46:43 +0000 Subject: [issue16188] Windows C Runtime Library Mismatch In-Reply-To: <1349881591.31.0.873714475408.issue16188@psf.upfronthosting.co.za> Message-ID: <1349894803.84.0.265264276863.issue16188@psf.upfronthosting.co.za> Changes by Ned Deily <nad at acm.org>: ---------- components: +Windows nosy: +brian.curtin, loewis, tim.golden _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16188> _______________________________________ From report at bugs.python.org Wed Oct 10 21:10:01 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 10 Oct 2012 19:10:01 +0000 Subject: [issue16189] ld_so_aix not found In-Reply-To: <1349884360.41.0.476274191409.issue16189@psf.upfronthosting.co.za> Message-ID: <1349896201.97.0.171318128663.issue16189@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: ---------- nosy: +trent _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16189> _______________________________________ From report at bugs.python.org Wed Oct 10 21:31:11 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 10 Oct 2012 19:31:11 +0000 Subject: [issue15233] atexit: guarantee order of execution of registered functions? In-Reply-To: <1341129521.95.0.805489135584.issue15233@psf.upfronthosting.co.za> Message-ID: <1349897471.54.0.21994878835.issue15233@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Ping. Like Raymond, I think there's no reason to leave ambiguity in 2.7 and 3.2, so this doc patch is probably worth backporting. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15233> _______________________________________ From report at bugs.python.org Wed Oct 10 21:55:51 2012 From: report at bugs.python.org (Spiros K.) Date: Wed, 10 Oct 2012 19:55:51 +0000 Subject: [issue16119] Python 2.7 _socket DLL import error on Windows Vista In-Reply-To: <1349272767.13.0.710278986958.issue16119@psf.upfronthosting.co.za> Message-ID: <1349898951.18.0.330812918867.issue16119@psf.upfronthosting.co.za> Spiros K. added the comment: I found out that I had intalled an other program which used an obsolete version of python that generated a "conflict" with the current version. By removing this program everything worked fine. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16119> _______________________________________ From report at bugs.python.org Wed Oct 10 22:27:10 2012 From: report at bugs.python.org (Stephen McInerney) Date: Wed, 10 Oct 2012 20:27:10 +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: <1349900830.24.0.531215178453.issue14313@psf.upfronthosting.co.za> Stephen McInerney added the comment: I visually reviewed the patch, it's fine by me. (Am not set up to compile it.) When is 2.7.3.x release planned? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14313> _______________________________________ From report at bugs.python.org Wed Oct 10 22:38:40 2012 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Oct 2012 20:38:40 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <1348761787.62.0.977797373088.issue16061@psf.upfronthosting.co.za> Message-ID: <1349901520.73.0.991489146519.issue16061@psf.upfronthosting.co.za> STINNER Victor added the comment: > The code is now using the heavily optimized findchar() function. I compared performances of the two methods: dummy loop vs find. Results with a string of 100,000 characters: * Replace 100% (rewrite all characters): find is 12.5x slower than a loop * Replace 50%: find is 3.3x slower * Replace only 2 characters (0.001%): find is 10.4x faster In practice, I bet that the most common case is to replace only a few characters. Replace all characters is a rare usecase. Use attached "unicode.patch" on Python 3.4 with the following commands to reproduce my benchmark: python -m timeit -s "a='a'; b='b'; text=a*100000" "text.replace(a, b)" python -m timeit -s "a='a'; b='b'; text=(a+' ')*(100000//2)" "text.replace(a, b)" python -m timeit -s "a='a'; b='b'; text=a+' '*100000+a" "text.replace(a, b)" -- An option is to use the find method, and then switch to the dummy loop method if there are too much characters to replace. I don't know if it's necessary to develop such complex algorithm. It would be better to have a benchmark extracted from a real world application like a template engine. ---------- keywords: +patch Added file: http://bugs.python.org/file27521/unicode.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16061> _______________________________________ From report at bugs.python.org Wed Oct 10 22:42:48 2012 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Oct 2012 20:42:48 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <1348761787.62.0.977797373088.issue16061@psf.upfronthosting.co.za> Message-ID: <1349901768.24.0.431254024737.issue16061@psf.upfronthosting.co.za> Changes by STINNER Victor <victor.stinner at gmail.com>: ---------- nosy: +loewis _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16061> _______________________________________ From report at bugs.python.org Wed Oct 10 23:24:48 2012 From: report at bugs.python.org (Mike Hoy) Date: Wed, 10 Oct 2012 21:24:48 +0000 Subject: [issue13691] pydoc help (or help('help')) should show the doc for help In-Reply-To: <1325406152.03.0.315132806833.issue13691@psf.upfronthosting.co.za> Message-ID: <1349904288.4.0.31669388886.issue13691@psf.upfronthosting.co.za> Mike Hoy added the comment: >>> Cool! Can you add tests? Nope, I can't add tests. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13691> _______________________________________ From report at bugs.python.org Wed Oct 10 23:29:02 2012 From: report at bugs.python.org (Evan Jones) Date: Wed, 10 Oct 2012 21:29:02 +0000 Subject: [issue4696] email module does not unfold headers In-Reply-To: <1229633967.92.0.395336973724.issue4696@psf.upfronthosting.co.za> Message-ID: <1349904542.43.0.969056998684.issue4696@psf.upfronthosting.co.za> Changes by Evan Jones <ej at evanjones.ca>: ---------- nosy: +evanj _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue4696> _______________________________________ From report at bugs.python.org Wed Oct 10 23:51:32 2012 From: report at bugs.python.org (Piotr Dobrogost) Date: Wed, 10 Oct 2012 21:51:32 +0000 Subject: [issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data In-Reply-To: <1307875633.83.0.874379254828.issue12319@psf.upfronthosting.co.za> Message-ID: <1349905892.05.0.0774486606046.issue12319@psf.upfronthosting.co.za> Changes by Piotr Dobrogost <pd at bugs.python.dobrogost.net>: ---------- nosy: +piotr.dobrogost _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12319> _______________________________________ From report at bugs.python.org Wed Oct 10 23:55:07 2012 From: report at bugs.python.org (Mike Hoy) Date: Wed, 10 Oct 2012 21:55:07 +0000 Subject: [issue13440] Explain the "status quo wins a stalemate" principle in the devguide In-Reply-To: <1321833284.75.0.438515825131.issue13440@psf.upfronthosting.co.za> Message-ID: <1349906107.21.0.12415691727.issue13440@psf.upfronthosting.co.za> Mike Hoy added the comment: Would this be the appropriate place for the links to the two essays: http://docs.python.org/devguide/#proposing-changes-to-python-itself ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13440> _______________________________________ From report at bugs.python.org Wed Oct 10 23:57:37 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 10 Oct 2012 21:57:37 +0000 Subject: [issue13691] pydoc help (or help('help')) should show the doc for help In-Reply-To: <1325406152.03.0.315132806833.issue13691@psf.upfronthosting.co.za> Message-ID: <1349906257.39.0.962267383239.issue13691@psf.upfronthosting.co.za> ?ric Araujo added the comment: I was addressing the author of the patch :) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13691> _______________________________________ From report at bugs.python.org Thu Oct 11 00:43:33 2012 From: report at bugs.python.org (Jeremy Kloth) Date: Wed, 10 Oct 2012 22:43:33 +0000 Subject: [issue16188] Windows C Runtime Library Mismatch In-Reply-To: <1349881591.31.0.873714475408.issue16188@psf.upfronthosting.co.za> Message-ID: <1349909013.64.0.65371725451.issue16188@psf.upfronthosting.co.za> Changes by Jeremy Kloth <jeremy.kloth+python-tracker at gmail.com>: ---------- nosy: +jkloth _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16188> _______________________________________ From report at bugs.python.org Thu Oct 11 01:18:49 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Oct 2012 23:18:49 +0000 Subject: [issue15111] Wrong ImportError message with importlib In-Reply-To: <1340151446.59.0.121813331775.issue15111@psf.upfronthosting.co.za> Message-ID: <3XcWTN356vzQLs@mail.python.org> Roundup Robot added the comment: New changeset 09b5158d5284 by Brett Cannon in branch '3.3': Closes issue #15111: Calling __import__ with a module specified in http://hg.python.org/cpython/rev/09b5158d5284 New changeset 31db8e3272f1 by Brett Cannon in branch 'default': Merge fix for issue #15111. http://hg.python.org/cpython/rev/31db8e3272f1 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15111> _______________________________________ From report at bugs.python.org Thu Oct 11 01:19:14 2012 From: report at bugs.python.org (Brett Cannon) Date: Wed, 10 Oct 2012 23:19:14 +0000 Subject: [issue15111] Wrong ImportError message with importlib In-Reply-To: <1340151446.59.0.121813331775.issue15111@psf.upfronthosting.co.za> Message-ID: <1349911154.49.0.340387302803.issue15111@psf.upfronthosting.co.za> Changes by Brett Cannon <brett at python.org>: ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15111> _______________________________________ From report at bugs.python.org Thu Oct 11 01:24:46 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Oct 2012 23:24:46 +0000 Subject: [issue16135] Removal of OS/2 support In-Reply-To: <1349389207.71.0.143036356134.issue16135@psf.upfronthosting.co.za> Message-ID: <3XcWcG1kBkzQLs@mail.python.org> Roundup Robot added the comment: New changeset 147b9d530dd0 by Jesus Cea in branch 'default': Closes #16135: Removal of OS/2 support (distutils) http://hg.python.org/cpython/rev/147b9d530dd0 ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16135> _______________________________________ From report at bugs.python.org Thu Oct 11 01:26:23 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 10 Oct 2012 23:26:23 +0000 Subject: [issue16135] Removal of OS/2 support In-Reply-To: <1349389207.71.0.143036356134.issue16135@psf.upfronthosting.co.za> Message-ID: <1349911583.22.0.558237845616.issue16135@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Arfrever, thanks for telling me about "distutils". Leaving "zlib" and "libffi" alone. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16135> _______________________________________ From report at bugs.python.org Thu Oct 11 01:56:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Oct 2012 23:56:14 +0000 Subject: [issue16135] Removal of OS/2 support In-Reply-To: <1349389207.71.0.143036356134.issue16135@psf.upfronthosting.co.za> Message-ID: <3XcXJX2PclzQLs@mail.python.org> Roundup Robot added the comment: New changeset e3e43287ad48 by Jesus Cea in branch 'default': Closes #16135: Removal of OS/2 support (distutils) (II) http://hg.python.org/cpython/rev/e3e43287ad48 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16135> _______________________________________ From report at bugs.python.org Thu Oct 11 02:04:55 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 11 Oct 2012 00:04:55 +0000 Subject: [issue16191] ceval cleanup Message-ID: <1349913895.1.0.124857708978.issue16191@psf.upfronthosting.co.za> New submission from Benjamin Peterson: The attached patch - Puts every opcode in its own block - Removes the infamous one variable names "x, v, w, u" and replaces them with local variables. - forces every opcode to end in DISPATCH() or "goto error" - cleans up a few minor other things ---------- files: ceval-better.patch keywords: patch messages: 172610 nosy: benjamin.peterson priority: normal severity: normal status: open title: ceval cleanup type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27522/ceval-better.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16191> _______________________________________ From report at bugs.python.org Thu Oct 11 02:58:20 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Oct 2012 00:58:20 +0000 Subject: [issue16115] test the executable arg to Popen() and improve related docs In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <3XcYhB1VVRzQxp@mail.python.org> Roundup Robot added the comment: New changeset 41ffed580eef by Chris Jerdonek in branch '3.2': Issue #16115: Make further improvements to subprocess.Popen() documentation. http://hg.python.org/cpython/rev/41ffed580eef New changeset bae644e46556 by Chris Jerdonek in branch '3.3': Issue #16115: Merge subprocess.Popen() documentation improvements from 3.2. http://hg.python.org/cpython/rev/bae644e46556 New changeset 178ba363af1c by Chris Jerdonek in branch 'default': Issue #16115: Merge subprocess.Popen() documentation improvements from 3.3. http://hg.python.org/cpython/rev/178ba363af1c New changeset f051e37ac11d by Chris Jerdonek in branch '2.7': Issue #16115: Backport subprocess.Popen() documentation improvements from 3.2. http://hg.python.org/cpython/rev/f051e37ac11d ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16115> _______________________________________ From report at bugs.python.org Thu Oct 11 02:59:13 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 11 Oct 2012 00:59:13 +0000 Subject: [issue16115] test the executable arg to Popen() and improve related docs In-Reply-To: <1349245187.63.0.540491490276.issue16115@psf.upfronthosting.co.za> Message-ID: <1349917153.39.0.0142752932975.issue16115@psf.upfronthosting.co.za> Changes by Chris Jerdonek <chris.jerdonek at gmail.com>: ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16115> _______________________________________ From report at bugs.python.org Thu Oct 11 03:08:27 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 11 Oct 2012 01:08:27 +0000 Subject: [issue16088] http.server's send_error could set the content-length of the error body In-Reply-To: <1348959751.44.0.331357335713.issue16088@psf.upfronthosting.co.za> Message-ID: <1349917707.12.0.798622400362.issue16088@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Looks good. ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16088> _______________________________________ From report at bugs.python.org Thu Oct 11 03:37:46 2012 From: report at bugs.python.org (Santoso Wijaya) Date: Thu, 11 Oct 2012 01:37:46 +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: <1349919466.79.0.96714409446.issue16076@psf.upfronthosting.co.za> Santoso Wijaya added the comment: This is because, in Python 3.3, xml.etree.ElementTree.Element is overridden by the C accelerator version, _elementtree.Element. If you remove the statement, 1708 from _elementtree import * the behavior from Python 3.2 comes back. ---------- nosy: +santa4nt _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16076> _______________________________________ From report at bugs.python.org Thu Oct 11 04:07:16 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 11 Oct 2012 02:07:16 +0000 Subject: [issue16187] incoming.irker hook raised an exception: [Errno 111] Connection refused In-Reply-To: <1349880392.26.0.557812672186.issue16187@psf.upfronthosting.co.za> Message-ID: <1349921236.5.0.224343629361.issue16187@psf.upfronthosting.co.za> Chris Jerdonek added the comment: It's working now, thanks. ---------- status: pending -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16187> _______________________________________ From report at bugs.python.org Thu Oct 11 04:15:17 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 11 Oct 2012 02:15:17 +0000 Subject: [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349921717.24.0.719046806407.issue12947@psf.upfronthosting.co.za> Chris Jerdonek added the comment: This seems to look good now. Can this be closed, or is there something else that needed to be done as well? ---------- resolution: -> fixed stage: needs patch -> commit review status: open -> pending _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12947> _______________________________________ From report at bugs.python.org Thu Oct 11 04:42:49 2012 From: report at bugs.python.org (Brian Thorne) Date: Thu, 11 Oct 2012 02:42:49 +0000 Subject: [issue16192] ctypes - documentation example Message-ID: <1349923369.86.0.516068156992.issue16192@psf.upfronthosting.co.za> New submission from Brian Thorne: The Python docs for ctypes have embedded examples including: >>> c_int() c_long(0) But on my machine I get the (more expected?): >>> c_int() c_int(0) Perhaps if some machines expect otherwise that should be documented, otherwise might we change them. ---------- components: ctypes files: ctypes_doc.diff keywords: patch messages: 172616 nosy: Thorney, eric.araujo, ezio.melotti, georg.brandl priority: normal severity: normal status: open title: ctypes - documentation example type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file27523/ctypes_doc.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16192> _______________________________________ From report at bugs.python.org Thu Oct 11 06:23:15 2012 From: report at bugs.python.org (Eric Snow) Date: Thu, 11 Oct 2012 04:23:15 +0000 Subject: [issue16160] subclassing types.SimpleNamespace does not work In-Reply-To: <1349658607.29.0.0643105543226.issue16160@psf.upfronthosting.co.za> Message-ID: <1349929395.03.0.523608642236.issue16160@psf.upfronthosting.co.za> Changes by Eric Snow <ericsnowcurrently at gmail.com>: Removed file: http://bugs.python.org/file27512/issue16160.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16160> _______________________________________ From report at bugs.python.org Thu Oct 11 06:25:30 2012 From: report at bugs.python.org (Eric Snow) Date: Thu, 11 Oct 2012 04:25:30 +0000 Subject: [issue16160] subclassing types.SimpleNamespace does not work In-Reply-To: <1349658607.29.0.0643105543226.issue16160@psf.upfronthosting.co.za> Message-ID: <1349929529.88.0.124585243742.issue16160@psf.upfronthosting.co.za> Eric Snow added the comment: Here's an updated patch that addresses ?ric's review comments. ---------- Added file: http://bugs.python.org/file27524/issue16160.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16160> _______________________________________ From report at bugs.python.org Thu Oct 11 06:27:19 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 11 Oct 2012 04:27:19 +0000 Subject: [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1349929639.06.0.333522225803.issue12947@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I looked at http://docs.python.org/py3k/library/doctest.html#directives and the examples with directives looked fine to me, with directive, syntax markup, and 'hide prompt' box. I also checked the next section and saw the one example that needed to have the directive visible. Really nice. ---------- stage: commit review -> committed/rejected status: pending -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12947> _______________________________________ From report at bugs.python.org Thu Oct 11 06:50:35 2012 From: report at bugs.python.org (Yury) Date: Thu, 11 Oct 2012 04:50:35 +0000 Subject: [issue16184] Attack against the pseudorandom number generator In-Reply-To: <1349867928.2.0.793137893285.issue16184@psf.upfronthosting.co.za> Message-ID: <1349931035.69.0.666439066398.issue16184@psf.upfronthosting.co.za> Yury added the comment: Thank you, you are right. Please close the issue. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16184> _______________________________________ From report at bugs.python.org Thu Oct 11 07:12:09 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 11 Oct 2012 05:12:09 +0000 Subject: [issue16184] Attack against the pseudorandom number generator In-Reply-To: <1349867928.2.0.793137893285.issue16184@psf.upfronthosting.co.za> Message-ID: <1349932329.18.0.822706554364.issue16184@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm closing the issue as suggested. I created #16190 in the hope that a documentation update is going to raise awareness. ---------- resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16184> _______________________________________ From report at bugs.python.org Thu Oct 11 07:24:49 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 11 Oct 2012 05:24:49 +0000 Subject: [issue16193] display full e-mail name in hg.python.org annotate pages Message-ID: <1349933089.11.0.333803673424.issue16193@psf.upfronthosting.co.za> New submission from Chris Jerdonek: This issue is to configure hg.python.org to display the full e-mail name on the "annotate" pages. Currently, instead of displaying everything before the "@" symbol, the pages display only the portion of e-mail addresses up to the first "." or "@", for example "tim at 19837". Information on how to configure hgweb this way is here: http://bz.selenic.com/show_bug.cgi?id=2276 ---------- messages: 172621 nosy: chris.jerdonek, ezio.melotti, georg.brandl, pitrou priority: normal severity: normal status: open title: display full e-mail name in hg.python.org annotate pages type: enhancement _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16193> _______________________________________ From report at bugs.python.org Thu Oct 11 08:16:42 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Oct 2012 06:16:42 +0000 Subject: [issue16088] http.server's send_error could set the content-length of the error body In-Reply-To: <1348959751.44.0.331357335713.issue16088@psf.upfronthosting.co.za> Message-ID: <3XchlY6zrTzQt2@mail.python.org> Roundup Robot added the comment: New changeset ee34cb049a10 by Senthil Kumaran in branch 'default': Issue #16088: BaseHTTPRequestHandler's send_error method includes a http://hg.python.org/cpython/rev/ee34cb049a10 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16088> _______________________________________ From report at bugs.python.org Thu Oct 11 08:19:07 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 11 Oct 2012 06:19:07 +0000 Subject: [issue16088] http.server's send_error could set the content-length of the error body In-Reply-To: <1348959751.44.0.331357335713.issue16088@psf.upfronthosting.co.za> Message-ID: <1349936347.62.0.0627038298945.issue16088@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I took the privilege of testing, adding news and docs and committing it. Thank you! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16088> _______________________________________ From report at bugs.python.org Thu Oct 11 09:21:03 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 11 Oct 2012 07:21:03 +0000 Subject: [issue16192] ctypes - documentation example In-Reply-To: <1349923369.86.0.516068156992.issue16192@psf.upfronthosting.co.za> Message-ID: <1349940063.89.0.674166737458.issue16192@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Perhaps if some machines expect otherwise that should be documented, otherwise might we change them. The very beginning of the ctypes documentation has documentation to that effect: "Note: Some code samples reference the ctypes c_int type. This type is an alias for the c_long type on 32-bit systems. So, you should not be confused if c_long is printed if you would expect c_int ? they are actually the same type." http://docs.python.org/dev/library/ctypes.html#ctypes-tutorial Does that address your suggestion? ---------- nosy: +chris.jerdonek status: open -> pending _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16192> _______________________________________ From report at bugs.python.org Thu Oct 11 09:36:11 2012 From: report at bugs.python.org (Brian Thorne) Date: Thu, 11 Oct 2012 07:36:11 +0000 Subject: [issue16192] ctypes - documentation example In-Reply-To: <1349923369.86.0.516068156992.issue16192@psf.upfronthosting.co.za> Message-ID: <1349940971.48.0.0486094618557.issue16192@psf.upfronthosting.co.za> Brian Thorne added the comment: > The very beginning of the ctypes documentation has documentation to that effect >Does that address your suggestion? Thanks Chris, that explains why the difference is present on non 32 bit platforms. Would using c_long for the examples produce the expected output on 64 and 32 bit systems? Just an idea to try remove potential confusion. ---------- status: pending -> open Added file: http://bugs.python.org/file27525/ctypes_doc.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16192> _______________________________________ From report at bugs.python.org Thu Oct 11 09:41:58 2012 From: report at bugs.python.org (Yongzhi Pan) Date: Thu, 11 Oct 2012 07:41:58 +0000 Subject: [issue4749] Issue with RotatingFileHandler logging handler on Windows In-Reply-To: <1230295606.47.0.842082380856.issue4749@psf.upfronthosting.co.za> Message-ID: <1349941318.24.0.320500042917.issue4749@psf.upfronthosting.co.za> Changes by Yongzhi Pan <fossilet at users.sourceforge.net>: ---------- nosy: +fossilet _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue4749> _______________________________________ From report at bugs.python.org Thu Oct 11 09:51:25 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 11 Oct 2012 07:51:25 +0000 Subject: [issue16192] ctypes - documentation example In-Reply-To: <1349923369.86.0.516068156992.issue16192@psf.upfronthosting.co.za> Message-ID: <1349941885.26.0.704931419495.issue16192@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I don't know off-hand. But maybe an additional note or code comment at the first instance in a code example would help. Switching the examples to c_long might serve only to shift potential confusion from the examples to someone's personal machine. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16192> _______________________________________ From report at bugs.python.org Thu Oct 11 10:05:33 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Oct 2012 08:05:33 +0000 Subject: [issue16190] Misleading warning in random module docs In-Reply-To: <1349885590.41.0.193272073786.issue16190@psf.upfronthosting.co.za> Message-ID: <1349942733.68.0.884946005626.issue16190@psf.upfronthosting.co.za> Changes by Raymond Hettinger <raymond.hettinger at gmail.com>: ---------- assignee: docs at python -> rhettinger components: +Documentation nosy: +rhettinger priority: normal -> low _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16190> _______________________________________ From report at bugs.python.org Thu Oct 11 10:15:24 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 11 Oct 2012 08:15:24 +0000 Subject: [issue13440] Explain the "status quo wins a stalemate" principle in the devguide In-Reply-To: <1321833284.75.0.438515825131.issue13440@psf.upfronthosting.co.za> Message-ID: <1349943323.99.0.0634102826667.issue13440@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I'll say it again, the devguide should be short enough to be practical for someone learning to contribute. Better organization could help here. I could see the devguide being a combination of (1) a brief document meant to be read cover to cover that captures the minimum one needs to know (as well as describing what else is available in the guide), and (2) more detailed info that someone could read on an as-needed basis or that a core developer could link to if assisting someone on a certain point (like the point covered by this issue). Currently, the devguide is harder to soak in because there is no boundary between (1) and (2). A recent example is that I didn't know about the custom repo option until Antoine mentioned it in a comment -- even after having looked at many of the sections. On the plus side, he was able to link to it with the current organization. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13440> _______________________________________ From report at bugs.python.org Thu Oct 11 10:25:12 2012 From: report at bugs.python.org (anand jeyahar) Date: Thu, 11 Oct 2012 08:25:12 +0000 Subject: [issue8492] Addition to readline module to get dictionary of keystrokes and commands In-Reply-To: <1271880127.18.0.454462638892.issue8492@psf.upfronthosting.co.za> Message-ID: <1349943912.34.0.313786602282.issue8492@psf.upfronthosting.co.za> Changes by anand jeyahar <anand.jeyahar at gmail.com>: ---------- nosy: +anand.jeyahar _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8492> _______________________________________ From report at bugs.python.org Thu Oct 11 10:36:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Oct 2012 08:36:27 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <1349901520.73.0.991489146519.issue16061@psf.upfronthosting.co.za> Message-ID: <201210111136.10301.storchaka@gmail.com> Serhiy Storchaka added the comment: > I compared performances of the two methods: dummy loop vs find. You can hybridize them. First just compare chars and if not match then use memcmp(). This speed up the case of repeated chars. ---------- Added file: http://bugs.python.org/file27526/unicode_2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16061> _______________________________________ -------------- next part -------------- diff -r 9475fc82768e Objects/unicodeobject.c --- a/Objects/unicodeobject.c Wed Oct 10 08:36:43 2012 -0700 +++ b/Objects/unicodeobject.c Thu Oct 11 11:30:16 2012 +0300 @@ -9881,6 +9881,64 @@ return 0; } +static void +replace_1char(PyObject *self, Py_ssize_t maxcount, Py_ssize_t pos, char *sbuf, + Py_UCS4 u1, Py_UCS4 u2, PyObject *u) +{ + Py_ssize_t index; + char *src; + Py_ssize_t len = PyUnicode_GET_LENGTH(self); + int skind = PyUnicode_KIND(self); + int rkind = PyUnicode_KIND(u); + + if (skind == 1 && rkind == 1) { + char *sdata = PyUnicode_DATA(self); + char *udata = PyUnicode_DATA(u); + char *uend = udata + len; + + memcpy(udata, sdata, len); + + while (udata < uend) { + if (*udata == u1) { + *udata = u2; + if (!--maxcount) + break; + udata++; + continue; + } + udata++; + len = uend - udata; + if (!len) + break; + udata = memchr(udata, u1, len); + if (udata == NULL) + break; + *udata = u2; + if (!--maxcount) + break; + udata++; + } + } + else { + _PyUnicode_FastCopyCharacters(u, 0, self, 0, len); + PyUnicode_WRITE(rkind, PyUnicode_DATA(u), pos, u2); + + index = 0; + src = sbuf; + while (--maxcount) + { + pos++; + src += pos * skind; + len -= pos; + index += pos; + pos = findchar(src, skind, len, u1, 1); + if (pos < 0) + break; + PyUnicode_WRITE(rkind, PyUnicode_DATA(u), index + pos, u2); + } + } +} + static PyObject * replace(PyObject *self, PyObject *str1, PyObject *str2, Py_ssize_t maxcount) @@ -9924,9 +9982,7 @@ if (len1 == 1) { /* replace characters */ Py_UCS4 u1, u2; - int rkind; - Py_ssize_t index, pos; - char *src; + Py_ssize_t pos; u1 = PyUnicode_READ_CHAR(str1, 0); pos = findchar(sbuf, PyUnicode_KIND(self), slen, u1, 1); @@ -9936,23 +9992,8 @@ u = PyUnicode_New(slen, maxchar); if (!u) goto error; - _PyUnicode_FastCopyCharacters(u, 0, self, 0, slen); - rkind = PyUnicode_KIND(u); - - PyUnicode_WRITE(rkind, PyUnicode_DATA(u), pos, u2); - index = 0; - src = sbuf; - while (--maxcount) - { - pos++; - src += pos * PyUnicode_KIND(self); - slen -= pos; - index += pos; - pos = findchar(src, PyUnicode_KIND(self), slen, u1, 1); - if (pos < 0) - break; - PyUnicode_WRITE(rkind, PyUnicode_DATA(u), index + pos, u2); - } + + replace_1char(self, maxcount, pos, sbuf, u1, u2, u); } else { int rkind = skind; From report at bugs.python.org Thu Oct 11 10:42:21 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 11 Oct 2012 08:42:21 +0000 Subject: [issue13440] Explain the "status quo wins a stalemate" principle in the devguide In-Reply-To: <1321833284.75.0.438515825131.issue13440@psf.upfronthosting.co.za> Message-ID: <1349944941.58.0.578604504258.issue13440@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Would this be the appropriate place for the links to the two essays: Personally, I would start out with a question in the FAQ. It could be called something like, "When is a change to Python justified?" and go after or in the same section as the question, "Where should I suggest new features and language changes?" Then it could be referenced from other sections as needed (e.g. from "Changing the Python Language," "Reviewing Patches," etc). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13440> _______________________________________ From report at bugs.python.org Thu Oct 11 10:45:39 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 11 Oct 2012 08:45:39 +0000 Subject: [issue8492] Addition to readline module to get dictionary of keystrokes and commands In-Reply-To: <1271880127.18.0.454462638892.issue8492@psf.upfronthosting.co.za> Message-ID: <1349945139.09.0.978552608637.issue8492@psf.upfronthosting.co.za> Changes by Andrew Svetlov <andrew.svetlov at gmail.com>: ---------- nosy: +asvetlov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8492> _______________________________________ From report at bugs.python.org Thu Oct 11 12:31:00 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Oct 2012 10:31:00 +0000 Subject: [issue14799] Tkinter ttk tests hang on linux In-Reply-To: <1336935343.12.0.855604727116.issue14799@psf.upfronthosting.co.za> Message-ID: <1349951460.46.0.320307999269.issue14799@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > $ ./python -m test.regrtest -u gui test_ttk_guionly For me (on 32-bit Ubuntu 10.04, Tk 8.5) it failed: test test_ttk_guionly failed -- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/tkinter/test/test_ttk/test_widgets.py", line 579, in test_tab_identifiers self.fail("Tab with text 'a' not found") AssertionError: Tab with text 'a' not found ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14799> _______________________________________ From report at bugs.python.org Thu Oct 11 13:03:48 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 11 Oct 2012 11:03:48 +0000 Subject: [issue14799] Tkinter ttk tests hang on linux In-Reply-To: <1336935343.12.0.855604727116.issue14799@psf.upfronthosting.co.za> Message-ID: <1349953428.67.0.566350859051.issue14799@psf.upfronthosting.co.za> Andrew Svetlov added the comment: For me it still fails. I use Ubuntu 12.04, 11.10 was failed also IIRC. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14799> _______________________________________ From report at bugs.python.org Thu Oct 11 13:10:27 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 11 Oct 2012 11:10:27 +0000 Subject: [issue16190] Misleading warning in random module docs In-Reply-To: <1349885590.41.0.193272073786.issue16190@psf.upfronthosting.co.za> Message-ID: <1349953827.76.0.506465783302.issue16190@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +ezio.melotti, haypo stage: -> needs patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16190> _______________________________________ From report at bugs.python.org Thu Oct 11 13:11:10 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Thu, 11 Oct 2012 11:11:10 +0000 Subject: [issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so Message-ID: <1349953870.22.0.50760531633.issue16194@psf.upfronthosting.co.za> New submission from V?clav ?milauer: I have several compiled modules linked into one .so file and import them using imp.load_dynamic. Only the first module imported with load_dynamic is imported properly, all subsequent calls of load_dynamic on the same file ignore the first argument (name) and return the first module again. The init function is also called only for the first module imported by load_dynamic. The bug is reproducible for python 2.7.3 and 3.2.2. Test case is attached. Here inline simplified source for 2.7: foo.c: #include<stdio.h> #include<Python.h> PyMODINIT_FUNC initfoo(){ (void) Py_InitModule("foo",NULL); printf("initfoo()\n"); } PyMODINIT_FUNC initbar(void){ (void) Py_InitModule("bar",NULL); printf("initbar()\n"); } PyMODINIT_FUNC initbaz(void){ (void) Py_InitModule("baz",NULL); printf("initbaz()\n"); } test.py: import sys,imp # import foo using the normal machinery sys.path.append('.') import foo # this is OK print imp.load_dynamic('bar','foo.so') # this imports *bar* again, but should import baz print imp.load_dynamic('baz','foo.so') # this imports *bar* again, although the module is not defined at all print imp.load_dynamic('nonsense','foo.so') Compiled with gcc -shared -fPIC foo.c -o foo.so `pkg-config python --cflags --libs` I get when running "python test.py" output: initfoo() initbar() <module 'bar' from 'foo.so'> <module 'bar' from 'foo.so'> <module 'bar' from 'foo.so'> The module 'bar' is imported 3 times, although the 2nd import should import *baz* and the third import should fail ("nonsense" module does not exist). ---------- components: Library (Lib) files: load_dynamic-test.zip messages: 172632 nosy: eudoxos priority: normal severity: normal status: open title: imp.load_dynamic imports wrong module when called several times on a multi-module .so type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file27527/load_dynamic-test.zip _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16194> _______________________________________ From report at bugs.python.org Thu Oct 11 13:18:17 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 11 Oct 2012 11:18:17 +0000 Subject: [issue16193] display full e-mail name in hg.python.org annotate pages In-Reply-To: <1349933089.11.0.333803673424.issue16193@psf.upfronthosting.co.za> Message-ID: <1349954297.54.0.623188296815.issue16193@psf.upfronthosting.co.za> Ezio Melotti added the comment: I don't think it's necessary to have the full email name for each line. The current format already allows you to distinguish users and reversions. If you need more information you can click on it and look at the changeset info. There might be problems if two people with the same name in the email work on the same file, but that sounds quite unlikely. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16193> _______________________________________ From report at bugs.python.org Thu Oct 11 13:49:13 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 11 Oct 2012 11:49:13 +0000 Subject: [issue16186] shlex bug? In-Reply-To: <1349876824.59.0.894274371181.issue16186@psf.upfronthosting.co.za> Message-ID: <1349956153.8.0.429829648692.issue16186@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- components: +Library (Lib) nosy: +ezio.melotti stage: -> needs patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16186> _______________________________________ From report at bugs.python.org Thu Oct 11 13:52:01 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 11 Oct 2012 11:52:01 +0000 Subject: [issue1043134] Add preferred extensions for MIME types Message-ID: <1349956321.39.0.269432664482.issue1043134@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +ezio.melotti versions: +Python 3.4 -Python 2.7, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1043134> _______________________________________ From report at bugs.python.org Thu Oct 11 14:00:11 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 11 Oct 2012 12:00:11 +0000 Subject: [issue15114] Deprecate strict mode of HTMLParser In-Reply-To: <1340185371.41.0.609283463083.issue15114@psf.upfronthosting.co.za> Message-ID: <1349956811.39.0.592804260071.issue15114@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- keywords: +patch Added file: http://bugs.python.org/file27528/issue15114-2.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15114> _______________________________________ From report at bugs.python.org Thu Oct 11 14:07:37 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 11 Oct 2012 12:07:37 +0000 Subject: [issue15939] make *.rst files in Doc/ parseable by doctest In-Reply-To: <1347543698.43.0.179468389771.issue15939@psf.upfronthosting.co.za> Message-ID: <1349957257.47.0.538670116693.issue15939@psf.upfronthosting.co.za> Ezio Melotti added the comment: If they don't work I see no reasons to leave them there. Either there's another way to run those tests on selected platforms that can be used instead, of if there's no way the tests should just be skipped. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15939> _______________________________________ From report at bugs.python.org Thu Oct 11 14:15:02 2012 From: report at bugs.python.org (a1abhishek) Date: Thu, 11 Oct 2012 12:15:02 +0000 Subject: [issue8402] glob returns empty list with "[" character in the folder name In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1349957702.37.0.907850278361.issue8402@psf.upfronthosting.co.za> a1abhishek added the comment: i m agree with answer number 6. the resolution mentioned is quite easy and very effectve thanks http://www.packersmoversdirectory.net/ ---------- nosy: +a1abhishek _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8402> _______________________________________ From report at bugs.python.org Thu Oct 11 14:19:48 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Oct 2012 12:19:48 +0000 Subject: [issue16190] Misleading warning in random module docs In-Reply-To: <1349885590.41.0.193272073786.issue16190@psf.upfronthosting.co.za> Message-ID: <1349957988.87.0.537299220433.issue16190@psf.upfronthosting.co.za> STINNER Victor added the comment: See also the issue #15213 (and the issue #12754). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16190> _______________________________________ From report at bugs.python.org Thu Oct 11 14:33:28 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 11 Oct 2012 12:33: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: <1349958808.64.0.289053597777.issue16194@psf.upfronthosting.co.za> Brett Cannon added the comment: Did this actually work in a previous version of Python, and if so what version? ---------- nosy: +brett.cannon status: open -> pending _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16194> _______________________________________ From report at bugs.python.org Thu Oct 11 15:01:19 2012 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 11 Oct 2012 13:01:19 +0000 Subject: [issue13440] Explain the "status quo wins a stalemate" principle in the devguide In-Reply-To: <1349944941.58.0.578604504258.issue13440@psf.upfronthosting.co.za> Message-ID: <CADiSq7fpm871wN6qs4gro3kjnzazWEOe3Jv8kuWasR4L=p1oDg@mail.gmail.com> Nick Coghlan added the comment: I'd suggest two things: Clearly separate "Essential Reading" and "Additional Resources" headings on the main page. Add "Tips & Tricks" and "Design Philosophy" sections somewhere. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13440> _______________________________________ From report at bugs.python.org Thu Oct 11 15:10:21 2012 From: report at bugs.python.org (Jean-Paul Calderone) Date: Thu, 11 Oct 2012 13:10:21 +0000 Subject: [issue16195] Difficult or impossible to figure out how garbage collector and weak references should interact for user-defined extension types Message-ID: <1349961021.39.0.560161023056.issue16195@psf.upfronthosting.co.za> New submission from Jean-Paul Calderone: There appears to be very little, if any, documentation about how to handle the list at tp_weaklistoffset for types supporting being weak referenced, particularly with respect to garbage collection. Who owns the list? Who owns the objects in the list? Should the list be traversed by the extension type's tp_traverse? Should it ever be INCREF'd or DECREF'd? Does tp_dealloc have any responsibilities with respect to it? >From looking at CPython's own source, it appears that tp_traverse should not touch it (Yhg1s confirmed this on #python). Cython, at least, appears to have come to an alternate conclusion though - it generates tp_traverse functions which visit the list (and provoke gc assertions to fail on Python 2.7 in debug mode). Some documentation about what is correct to do would be excellent, and would make it easier to explain to Cython developers what they're doing wrong (or confirm that they're doing something right, in which case there are some more bugs to file against the CPython stdlib, since they do something different from Cython). ---------- assignee: docs at python components: Documentation messages: 172639 nosy: docs at python, exarkun priority: normal severity: normal status: open title: Difficult or impossible to figure out how garbage collector and weak references should interact for user-defined extension types _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16195> _______________________________________ From report at bugs.python.org Thu Oct 11 15:13:38 2012 From: report at bugs.python.org (Mike Hoy) Date: Thu, 11 Oct 2012 13:13:38 +0000 Subject: [issue16196] Typo in devguide stdlibchanges.html Message-ID: <1349961218.46.0.199078459868.issue16196@psf.upfronthosting.co.za> New submission from Mike Hoy: Typo in: http://docs.python.org/devguide/stdlibchanges.html#adding-to-the-stdlib Reads: This document it meant to explain... Should read: This document is meant to explain... ---------- components: Devguide messages: 172640 nosy: ezio.melotti, mikehoy priority: normal severity: normal status: open title: Typo in devguide stdlibchanges.html _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16196> _______________________________________ From report at bugs.python.org Thu Oct 11 15:14:59 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Oct 2012 13:14:59 +0000 Subject: [issue1634774] locale 1251 does not convert to upper case properly Message-ID: <1349961299.03.0.763069504926.issue1634774@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- components: +Interpreter Core -Library (Lib) versions: +Python 2.7 -Python 2.6, Python 3.0 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1634774> _______________________________________ From report at bugs.python.org Thu Oct 11 15:15:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Oct 2012 13:15:22 +0000 Subject: [issue1634774] locale 1251 does not convert to upper case properly Message-ID: <1349961322.4.0.746809754239.issue1634774@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- components: +Windows _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1634774> _______________________________________ From report at bugs.python.org Thu Oct 11 15:19:07 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 11 Oct 2012 13:19:07 +0000 Subject: [issue16195] Difficult or impossible to figure out how garbage collector and weak references should interact for user-defined extension types In-Reply-To: <1349961021.39.0.560161023056.issue16195@psf.upfronthosting.co.za> Message-ID: <1349961547.65.0.595754255901.issue16195@psf.upfronthosting.co.za> Changes by Andrew Svetlov <andrew.svetlov at gmail.com>: ---------- nosy: +asvetlov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16195> _______________________________________ From report at bugs.python.org Thu Oct 11 15:22:12 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Oct 2012 13:22:12 +0000 Subject: [issue16195] Difficult or impossible to figure out how garbage collector and weak references should interact for user-defined extension types In-Reply-To: <1349961021.39.0.560161023056.issue16195@psf.upfronthosting.co.za> Message-ID: <1349961732.79.0.199601398549.issue16195@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think Cython is wrong here. The only thing to do is to call PyObject_ClearWeakRefs() in the deallocator. Everything else is handled by the interpreter. Agreed improving the documentation would be good. ---------- nosy: +pitrou, scoder stage: -> needs patch type: -> behavior versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16195> _______________________________________ From report at bugs.python.org Thu Oct 11 15:29:00 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 11 Oct 2012 13:29:00 +0000 Subject: [issue15939] make *.rst files in Doc/ parseable by doctest In-Reply-To: <1347543698.43.0.179468389771.issue15939@psf.upfronthosting.co.za> Message-ID: <1349962140.31.0.31039727941.issue15939@psf.upfronthosting.co.za> Ezio Melotti added the comment: The attached patch fixes the doctests in Doc/library/ctypes.rst. ---------- stage: -> patch review versions: +Python 3.4 Added file: http://bugs.python.org/file27529/issue15939-ctypes.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15939> _______________________________________ From report at bugs.python.org Thu Oct 11 15:39:10 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 11 Oct 2012 13:39:10 +0000 Subject: [issue16196] Typo in devguide stdlibchanges.html In-Reply-To: <1349961218.46.0.199078459868.issue16196@psf.upfronthosting.co.za> Message-ID: <1349962750.69.0.366587224355.issue16196@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed in 291342c08dd6. Thanks for the report! ---------- assignee: -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16196> _______________________________________ From report at bugs.python.org Thu Oct 11 16:04:11 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 11 Oct 2012 14:04:11 +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: <1349964251.95.0.905499302911.issue15650@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Robin, after thinking I would to agree with your decision to hold reference to type into type instance. Please, can you describe your check like: if((void *)type->tp_dealloc == (void *)dbm_dealloc) { Py_DECREF(type); } Why you decref only if type->tp_dealloc points to module's dealloc? What are you protected from? What other values also possible? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15650> _______________________________________ From report at bugs.python.org Thu Oct 11 16:10:30 2012 From: report at bugs.python.org (Philip Mountifield) Date: Thu, 11 Oct 2012 14:10:30 +0000 Subject: [issue16178] atexit._run_exitfuncs should be a public API In-Reply-To: <1349809372.69.0.332686923103.issue16178@psf.upfronthosting.co.za> Message-ID: <1349964630.37.0.539137863225.issue16178@psf.upfronthosting.co.za> Changes by Philip Mountifield <philip at mountifield.org>: ---------- nosy: +Philip.Mountifield _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16178> _______________________________________ From report at bugs.python.org Thu Oct 11 16:23:26 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 11 Oct 2012 14:23:26 +0000 Subject: [issue16191] ceval cleanup In-Reply-To: <1349913895.1.0.124857708978.issue16191@psf.upfronthosting.co.za> Message-ID: <1349965406.26.0.814411258946.issue16191@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It's a wash: ### call_method_slots ### Min: 0.437453 -> 0.421975: 1.04x faster Avg: 0.437604 -> 0.422266: 1.04x faster Significant (t=331.26) Stddev: 0.00010 -> 0.00056: 5.3245x larger Timeline: http://tinyurl.com/9qq9jo4 ### call_method_unknown ### Min: 0.413813 -> 0.425141: 1.03x slower Avg: 0.413876 -> 0.425304: 1.03x slower Significant (t=-166.29) Stddev: 0.00004 -> 0.00084: 19.9809x larger Timeline: http://tinyurl.com/97pxmh5 ### call_simple ### Min: 0.294412 -> 0.330230: 1.12x slower Avg: 0.294510 -> 0.330361: 1.12x slower Significant (t=-1373.15) Stddev: 0.00029 -> 0.00014: 2.0316x smaller Timeline: http://tinyurl.com/9qyc4zf ### chaos ### Min: 0.409597 -> 0.399421: 1.03x faster Avg: 0.481283 -> 0.400525: 1.20x faster Significant (t=9.06) Stddev: 0.06305 -> 0.00040: 158.7104x smaller Timeline: http://tinyurl.com/8ewhujt ### fannkuch ### Min: 1.523157 -> 1.477746: 1.03x faster Avg: 1.528809 -> 1.485938: 1.03x faster Significant (t=28.48) Stddev: 0.00759 -> 0.00746: 1.0170x smaller Timeline: http://tinyurl.com/9k68ek8 ### fastunpickle ### Min: 0.655073 -> 0.674753: 1.03x slower Avg: 0.658096 -> 0.676514: 1.03x slower Significant (t=-51.82) Stddev: 0.00221 -> 0.00119: 1.8605x smaller Timeline: http://tinyurl.com/94d4zcp ### formatted_logging ### Min: 0.410074 -> 0.421570: 1.03x slower Avg: 0.411432 -> 0.423328: 1.03x slower Significant (t=-39.92) Stddev: 0.00150 -> 0.00148: 1.0086x smaller Timeline: http://tinyurl.com/9slusgh ### go ### Min: 0.759984 -> 0.744335: 1.02x faster Avg: 0.763061 -> 0.747887: 1.02x faster Significant (t=35.18) Stddev: 0.00174 -> 0.00251: 1.4407x larger Timeline: http://chart.apis.google.com/chart?cht=lc&chs=700x400&chxt=x,y,x,y&chxr=1,0,1.7674369812&chco=FF0000,0000FF&chdl=../3.3/python|../py3k/python&chds=0,1.7674369812&chd=t:0.76,0.76,0.76,0.76,0.76,0.76,0.76,0.76,0.76,0.76,0.76,0.76,0.76,0.76,0.76,0.76,0.76,0.76,0.76,0.77,0.77,0.77,0.76,0.76,0.76,0.76,0.76,0.76,0.76,0.76,0.76,0.76,0.77,0.77,0.76,0.76,0.77,0.76,0.76,0.76,0.76,0.76,0.76,0.76,0.76,0.76,0.77,0.76,0.76,0.76|0.75,0.75,0.75,0.75,0.74,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.76,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.74,0.75,0.75,0.75,0.75&chxl=0:|1|10|20|30|40|50|2:||Iteration|3:||Time+(secs)&chtt=go ### iterative_count ### Min: 0.154894 -> 0.161959: 1.05x slower Avg: 0.155405 -> 0.162507: 1.05x slower Significant (t=-136.59) Stddev: 0.00030 -> 0.00022: 1.3638x smaller Timeline: http://chart.apis.google.com/chart?cht=lc&chs=700x400&chxt=x,y,x,y&chxr=1,0,1.16293883324&chco=FF0000,0000FF&chdl=../3.3/python|../py3k/python&chds=0,1.16293883324&chd=t:0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.15,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.15,0.16,0.16,0.16,0.16,0.16|0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16&chxl=0:|1|10|20|30|40|50|2:||Iteration|3:||Time+(secs)&chtt=iterative_count ### json_dump_v2 ### Min: 3.656729 -> 3.876189: 1.06x slower Avg: 3.690897 -> 3.887980: 1.05x slower Significant (t=-109.27) Stddev: 0.01121 -> 0.00607: 1.8460x smaller Timeline: http://chart.apis.google.com/chart?cht=lc&chs=700x400&chxt=x,y,x,y&chxr=1,2.65672922134,4.89833188057&chco=FF0000,0000FF&chdl=../3.3/python|../py3k/python&chds=2.65672922134,4.89833188057&chd=t:3.7,3.68,3.69,3.7,3.7,3.67,3.68,3.67,3.67,3.69,3.7,3.69,3.69,3.69,3.7,3.7,3.69,3.69,3.7,3.69,3.69,3.7,3.69,3.69,3.69,3.69,3.7,3.7,3.69,3.7,3.71,3.69,3.68,3.7,3.69,3.7,3.7,3.69,3.7,3.7,3.69,3.7,3.71,3.7,3.69,3.69,3.69,3.66,3.67,3.66|3.88,3.89,3.9,3.9,3.89,3.89,3.89,3.89,3.89,3.89,3.88,3.89,3.89,3.88,3.9,3.89,3.89,3.9,3.89,3.9,3.9,3.89,3.9,3.9,3.89,3.89,3.88,3.88,3.88,3.88,3.88,3.88,3.89,3.89,3.88,3.88,3.89,3.88,3.88,3.89,3.88,3.88,3.89,3.88,3.88,3.89,3.89,3.88,3.88,3.88&chxl=0:|1|10|20|30|40|50|2:||Iteration|3:||Time+(secs)&chtt=json_dump_v2 ### json_load ### Min: 0.546481 -> 0.568681: 1.04x slower Avg: 0.547893 -> 0.569776: 1.04x slower Significant (t=-155.12) Stddev: 0.00086 -> 0.00050: 1.7270x smaller Timeline: http://chart.apis.google.com/chart?cht=lc&chs=700x400&chxt=x,y,x,y&chxr=1,0,1.57190203667&chco=FF0000,0000FF&chdl=../3.3/python|../py3k/python&chds=0,1.57190203667&chd=t:0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55,0.55|0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57&chxl=0:|1|10|20|30|40|50|2:||Iteration|3:||Time+(secs)&chtt=json_load ### nbody ### Min: 0.333188 -> 0.349242: 1.05x slower Avg: 0.333758 -> 0.350291: 1.05x slower Significant (t=-179.88) Stddev: 0.00041 -> 0.00050: 1.2323x larger Timeline: http://chart.apis.google.com/chart?cht=lc&chs=700x400&chxt=x,y,x,y&chxr=1,0,1.35260510445&chco=FF0000,0000FF&chdl=../3.3/python|../py3k/python&chds=0,1.35260510445&chd=t:0.34,0.34,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33|0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35,0.35&chxl=0:|1|10|20|30|40|50|2:||Iteration|3:||Time+(secs)&chtt=nbody ### pathlib ### Min: 0.144972 -> 0.148708: 1.03x slower Avg: 0.145470 -> 0.149212: 1.03x slower Significant (t=-119.94) Stddev: 0.00043 -> 0.00024: 1.8258x smaller Timeline: http://chart.apis.google.com/chart?cht=lc&chs=700x400&chxt=x,y,x,y&chxr=1,0,1.15072345734&chco=FF0000,0000FF&chdl=../3.3/python|../py3k/python&chds=0,1.15072345734&chd=t:0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15|0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15,0.15&chxl=0:|1|17|34|51|68|84|2:||Iteration|3:||Time+(secs)&chtt=pathlib ### raytrace ### Min: 1.834003 -> 1.771301: 1.04x faster Avg: 1.837693 -> 1.776832: 1.03x faster Significant (t=140.03) Stddev: 0.00200 -> 0.00234: 1.1713x larger Timeline: http://chart.apis.google.com/chart?cht=lc&chs=700x400&chxt=x,y,x,y&chxr=1,0.771300792694,2.84174513817&chco=FF0000,0000FF&chdl=../3.3/python|../py3k/python&chds=0.771300792694,2.84174513817&chd=t:1.84,1.83,1.84,1.84,1.84,1.84,1.84,1.84,1.83,1.84,1.84,1.84,1.84,1.84,1.84,1.84,1.84,1.83,1.84,1.84,1.84,1.83,1.84,1.84,1.84,1.84,1.84,1.84,1.84,1.84,1.84,1.84,1.84,1.84,1.84,1.84,1.84,1.84,1.84,1.84,1.84,1.83,1.84,1.84,1.84,1.83,1.84,1.84,1.84,1.84|1.78,1.77,1.78,1.77,1.77,1.78,1.77,1.77,1.77,1.78,1.78,1.78,1.77,1.78,1.78,1.78,1.78,1.78,1.78,1.77,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.78,1.77&chxl=0:|1|10|20|30|40|50|2:||Iteration|3:||Time+(secs)&chtt=raytrace ### richards ### Min: 0.228433 -> 0.239748: 1.05x slower Avg: 0.230110 -> 0.242057: 1.05x slower Significant (t=-46.57) Stddev: 0.00092 -> 0.00156: 1.6980x larger Timeline: http://chart.apis.google.com/chart?cht=lc&chs=700x400&chxt=x,y,x,y&chxr=1,0,1.24749755859&chco=FF0000,0000FF&chdl=../3.3/python|../py3k/python&chds=0,1.24749755859&chd=t:0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23|0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.25,0.24,0.25,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.25,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24&chxl=0:|1|10|20|30|40|50|2:||Iteration|3:||Time+(secs)&chtt=richards ### spectral_norm ### Min: 0.472338 -> 0.394497: 1.20x faster Avg: 0.473632 -> 0.395272: 1.20x faster Significant (t=430.86) Stddev: 0.00109 -> 0.00068: 1.6172x smaller Timeline: http://chart.apis.google.com/chart?cht=lc&chs=700x400&chxt=x,y,x,y&chxr=1,0,1.4786093235&chco=FF0000,0000FF&chdl=../3.3/python|../py3k/python&chds=0,1.4786093235&chd=t:0.47,0.48,0.47,0.48,0.48,0.47,0.48,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.48,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47,0.47|0.39,0.39,0.4,0.39,0.4,0.39,0.39,0.4,0.39,0.39,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.39,0.4,0.39,0.39,0.4,0.4,0.39,0.4,0.39,0.4,0.39,0.4,0.4,0.4,0.39,0.4,0.39,0.39,0.39,0.4,0.39,0.39,0.4,0.4&chxl=0:|1|10|20|30|40|50|2:||Iteration|3:||Time+(secs)&chtt=spectral_norm ### threaded_count ### Min: 0.147395 -> 0.155172: 1.05x slower Avg: 0.151059 -> 0.162784: 1.08x slower Significant (t=-5.57) Stddev: 0.00379 -> 0.01439: 3.7929x larger Timeline: http://tinyurl.com/96wgctd ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16191> _______________________________________ From report at bugs.python.org Thu Oct 11 16:44:54 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Oct 2012 14:44:54 +0000 Subject: [issue1634034] Show "expected" token on syntax error Message-ID: <1349966694.66.0.101867199649.issue1634034@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm attaching a new version of the patch, based on Dave's (from 2.5 years ago). This patch is against the 3.4. Previous patches contained an error in the message formatting. "buf" variable out of scope before "msg" used. Appending '\0' to the format string isn't guaranteed to NUL-terminate the string. Actually it do nothing (except producing a warning). ---------- nosy: +serhiy.storchaka versions: +Python 3.4 -Python 3.2 Added file: http://bugs.python.org/file27530/syntax-error-hints-3.4.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1634034> _______________________________________ From report at bugs.python.org Thu Oct 11 17:04:56 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Thu, 11 Oct 2012 15:04:56 +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: <1349967896.52.0.40433601701.issue16194@psf.upfronthosting.co.za> V?clav ?milauer added the comment: I tried with python 2.4.5 and 2.5.2 in chroot (using ubuntu hardy, which packaged both of them) and the result is exactly the same for both. I doubt I am able to install anything older in a sensible manner. ---------- status: pending -> open _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16194> _______________________________________ From report at bugs.python.org Thu Oct 11 17:08:29 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Oct 2012 15:08:29 +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: <1349968109.43.0.875837257679.issue9720@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What the conclusion about the patches? Which variant I should backport for older versions? ---------- versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9720> _______________________________________ From report at bugs.python.org Thu Oct 11 17:10:02 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Oct 2012 15:10:02 +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: <1349968202.33.0.15815715129.issue16194@psf.upfronthosting.co.za> R. David Murray added the comment: This is an enhancement request, then. ---------- nosy: +r.david.murray stage: -> needs patch type: behavior -> enhancement versions: +Python 3.4 -Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16194> _______________________________________ From report at bugs.python.org Thu Oct 11 17:12:50 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Thu, 11 Oct 2012 15:12:50 +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: <1349968370.23.0.69687870617.issue16194@psf.upfronthosting.co.za> V?clav ?milauer added the comment: No, it is an old bug, since the behavior does something else than documented (http://docs.python.org/library/imp.html#imp.load_dynamic) and reasonably expected -- imp.load_dynamic("baz","foo.so") imports the "foo" module under some circumstances. ---------- type: enhancement -> behavior versions: +Python 2.7 -Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16194> _______________________________________ From report at bugs.python.org Thu Oct 11 17:21:38 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 11 Oct 2012 15:21:38 +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: <1349968898.52.0.212043320273.issue16194@psf.upfronthosting.co.za> Brett Cannon added the comment: It's actually a documentation bug. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) keywords: +easy nosy: +docs at python _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16194> _______________________________________ From report at bugs.python.org Thu Oct 11 17:22:27 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 11 Oct 2012 15:22:27 +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: <1349968947.74.0.662066442274.issue9720@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'd write the extended header when the current file size is larger than the zip64 limit (that is, when 'st.st_size > ZIP64_LIMIT' in the write method. That way the minimal header size is used whenever possible. As you noted this can cause problems when the file grows beyond the limit while it is stored in the zipfile, but IMHO storing data while it is modified is asking for problems anyway. BTW. I haven't actually review the patch yet. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9720> _______________________________________ From report at bugs.python.org Thu Oct 11 17:32:19 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Thu, 11 Oct 2012 15:32:19 +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: <1349969539.86.0.83060749889.issue16194@psf.upfronthosting.co.za> V?clav ?milauer added the comment: While I understand that this behavior went unnoticed for ages and can be seen therefore as unimportant, designating this as documentation bug is quite absurd; perhaps the following wording would be appropriate: .. note:: If this function is called multiple times on the same file (in terms of inode; symlink pointing to same file is fine), it will return the module which was first imported via `load_dynamic` instead of the requested module, without reporting any error. The previous call to `load_dynamic` may not be in the same part of the code, but it must happen within the same interpreter instance. ---------- components: +Library (Lib) -Documentation nosy: +ncoghlan _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16194> _______________________________________ From report at bugs.python.org Thu Oct 11 17:48:57 2012 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 11 Oct 2012 15:48:57 +0000 Subject: [issue15452] Improve the security model for logging listener() In-Reply-To: <1343264495.49.0.0195201203683.issue15452@psf.upfronthosting.co.za> Message-ID: <1349970537.29.0.534931606514.issue15452@psf.upfronthosting.co.za> Changes by Vinay Sajip <vinay_sajip at yahoo.co.uk>: ---------- hgrepos: +154 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15452> _______________________________________ From report at bugs.python.org Thu Oct 11 17:49:31 2012 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 11 Oct 2012 15:49:31 +0000 Subject: [issue15452] Improve the security model for logging listener() In-Reply-To: <1343264495.49.0.0195201203683.issue15452@psf.upfronthosting.co.za> Message-ID: <1349970571.81.0.733590973357.issue15452@psf.upfronthosting.co.za> Changes by Vinay Sajip <vinay_sajip at yahoo.co.uk>: ---------- keywords: +patch Added file: http://bugs.python.org/file27531/3d0ca1e82c46.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15452> _______________________________________ From report at bugs.python.org Thu Oct 11 18:11:10 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 11 Oct 2012 16:11:10 +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: <1349971870.02.0.325589851221.issue16194@psf.upfronthosting.co.za> Brett Cannon added the comment: Before this gets out of control I want to clarify that it is not "quite absurd" to label this a documentation bug and that is the proper classification for this bug. The documentation was not clear enough for you to understand what the behavior would be, so it should be clarified. But the semantics of the function are not going to change at this point since Python 2.7 is only accepting bug fixes and imp.load_dynamic() is no longer documented as of Python 3.2 and thus not strictly considered a public API any longer. ---------- components: +Documentation -Library (Lib) _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16194> _______________________________________ From report at bugs.python.org Thu Oct 11 18:12:11 2012 From: report at bugs.python.org (Zachary Ware) Date: Thu, 11 Oct 2012 16:12:11 +0000 Subject: [issue16197] Several small errors in winreg documentation Message-ID: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> New submission from Zachary Ware: There are several small inconsistencies in the winreg module documentation (docstrings and winreg.rst). Mostly these are discrepancies between "res" and "reserved", "sam" and "access", and whether or not those two are keyword arguments, but there are some other missing pieces as well. I'm happy to provide a patch to correct everything, but I'd like a little guidance beforehand. I have no experience with docstrings in C code, so I've attached a patch that attempts to correct just the CreateKeyEx() docstring. If it turns out to be ok, I'll go ahead and create a patch fixing the other ones. I'm comfortable enough with ReST changes that I'll just include those with the final docstring patch. Also, some of the changes are specific to 3.3+ (due to the WindowsError => OSError change). Should I provide one patch against default, two against 3.2 and 3.3 (including the 3.2 changes), or two against 3.2 and 3.3 (after a local commit of the 3.2 changes)? Any of the above is perfectly doable :) Thanks, Zach ---------- assignee: docs at python components: Documentation files: winreg_example.patch keywords: patch messages: 172655 nosy: brian.curtin, docs at python, stutzbach, zach.ware priority: normal severity: normal status: open title: Several small errors in winreg documentation versions: Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27532/winreg_example.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16197> _______________________________________ From report at bugs.python.org Thu Oct 11 18:19:25 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Thu, 11 Oct 2012 16:19:25 +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: <1349972365.0.0.724486561534.issue16194@psf.upfronthosting.co.za> V?clav ?milauer added the comment: I found the cause of the behavior (perhaps it is common knowledge, but I am new to python source); imp.load_dynamic calls the following functions Python/import.c: imp_load_dynamic (http://hg.python.org/cpython/file/ad51ed93377c/Python/import.c#l1777) Python/importdl.c: _PyImport_LoadDynamicModule (http://hg.python.org/cpython/file/ad51ed93377c/Python/importdl.c#l23) Python/import.c: _PyImport_FindExtensionObject (http://hg.python.org/cpython/file/ad51ed93377c/Python/import.c#l525) where the last one uses the extensions object (http://hg.python.org/cpython/file/ad51ed93377c/Python/import.c#l32), which is explained at http://hg.python.org/cpython/file/ad51ed93377c/Python/import.c#l449 Magic for extension modules (built-in as well as dynamically loaded). To prevent initializing an extension module more than once, we keep a static dictionary 'extensions' keyed by module name (for built-in modules) or by filename (for dynamically loaded modules), containing these modules. A copy of the module's dictionary is stored by calling _PyImport_FixupExtensionObject() immediately after the module initialization function succeeds. A copy can be retrieved from there by calling _PyImport_FindExtensionObject(). The fact that extensions are keyed by file name explains why opening the .so through symlink does not return the old extension object: # foo.so # bar.so -> foo.so (works for both symlinks and hardlinks) imp.load_dynamic("foo","foo.so") imp.load_dynamic("bar","bar.so") # will return the bar module I will investigate whether marking the module as capable of multiple initialization could be a workaround for the issue -- since the quoted comment further says (http://hg.python.org/cpython/file/ad51ed93377c/Python/import.c#l459): Modules which do support multiple initialization set their m_size field to a non-negative number (indicating the size of the module-specific state). They are still recorded in the extensions dictionary, to avoid loading shared libraries twice. To fix the issue, I suggest that the *extensions* dict is keyed by (filename,modulename) tuple for dynamically loaded modules. This would avoid any ambiguity. Grepping through the code shows that the *extensions* object is only accessed from Python/import.c, therefore regressions should be unlikely. What do you think? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16194> _______________________________________ From report at bugs.python.org Thu Oct 11 18:21:15 2012 From: report at bugs.python.org (Brian Curtin) Date: Thu, 11 Oct 2012 16:21:15 +0000 Subject: [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <1349972475.77.0.647617318457.issue16197@psf.upfronthosting.co.za> Brian Curtin added the comment: The patch looks alright, but I would remove the lining up of definitions. It's probably easiest to do a patch against 3.2 and I can handle the porting on commit. ---------- assignee: docs at python -> brian.curtin components: +Windows type: -> behavior _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16197> _______________________________________ From report at bugs.python.org Thu Oct 11 18:23:02 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Oct 2012 16:23:02 +0000 Subject: [issue15776] Allow pyvenv to work in existing directory In-Reply-To: <1345799746.88.0.728928529816.issue15776@psf.upfronthosting.co.za> Message-ID: <3XcyC94LHCzR1B@mail.python.org> Roundup Robot added the comment: New changeset c3c188a0325a by Vinay Sajip in branch 'default': Closes #15776: pyvenv now works with existing directories. http://hg.python.org/cpython/rev/c3c188a0325a ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15776> _______________________________________ From report at bugs.python.org Thu Oct 11 18:27:40 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Thu, 11 Oct 2012 16:27:40 +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: <1349972860.06.0.0208867888022.issue16194@psf.upfronthosting.co.za> V?clav ?milauer added the comment: I did not notice it was not documented in python 3.3 anymore -- my fault, sorry. In case there is no functional replacement for it, I will try to raise it on the ML. I am currently writing some code in 2.7 which relies on it (I don't see another way of packing multiple compiled modules into one file without using symlinks, which won't work under windows; it saves me lots of trouble with cross-module symbol dependencies and such, avoids RTLD_GLOBAL, rpath and such nasty stuff), and don't want to throw it away with future migration to 3k. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16194> _______________________________________ From report at bugs.python.org Thu Oct 11 18:32:02 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 11 Oct 2012 16:32:02 +0000 Subject: [issue15776] Allow pyvenv to work in existing directory In-Reply-To: <1345799746.88.0.728928529816.issue15776@psf.upfronthosting.co.za> Message-ID: <1349973122.67.0.0187229912248.issue15776@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Looks good. Thank you. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15776> _______________________________________ From report at bugs.python.org Thu Oct 11 18:38:01 2012 From: report at bugs.python.org (Zachary Ware) Date: Thu, 11 Oct 2012 16:38:01 +0000 Subject: [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <1349973481.88.0.293175500274.issue16197@psf.upfronthosting.co.za> Zachary Ware added the comment: Okie doke. I'll try to have a patch ready for review later this afternoon. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16197> _______________________________________ From report at bugs.python.org Thu Oct 11 18:45:47 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 11 Oct 2012 16:45:47 +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: <1349973947.94.0.77174378629.issue16194@psf.upfronthosting.co.za> Brett Cannon added the comment: The new functional equivalent is importlib.machinery.ExtensionFileLoader (http://docs.python.org/dev/py3k/library/importlib.html#importlib.machinery.ExtensionFileLoader), but underneath the hood it uses the same code as imp.load_dynamic() did. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16194> _______________________________________ From report at bugs.python.org Thu Oct 11 18:48:41 2012 From: report at bugs.python.org (Roger Serwy) Date: Thu, 11 Oct 2012 16:48:41 +0000 Subject: [issue16198] IDLE - tabbing in a string always brings up file completion window Message-ID: <1349974121.21.0.319562901545.issue16198@psf.upfronthosting.co.za> New submission from Roger Serwy: Pressing <Tab> while the cursor is in a string will bring up the file completion dialog rather than inserting a tab (or 4 spaces). This behavior is rather annoying in a text editor especially when editing multiline doc strings. This behavior is new to the 3.3 series as a consequence of issue14937. Arguably, it is a regression. The logic for bringing up the file completion window when pressing Tab in a string needs to be revised. If the string already contains a partial match, then bring up the window when pressing Tab, otherwise insert a Tab character or spaces. Alternatively, the Ctrl+Space key sequence will already bring up the file completion dialog, so having an automatic Tab completion behavior is not absolutely necessary. This issue can also be triggered in the shell. Start a string and then press tab twice. ---------- components: IDLE keywords: 3.3regression messages: 172663 nosy: serwy, terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE - tabbing in a string always brings up file completion window type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16198> _______________________________________ From report at bugs.python.org Thu Oct 11 18:59:24 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 11 Oct 2012 16:59:24 +0000 Subject: [issue15939] make *.rst files in Doc/ parseable by doctest In-Reply-To: <1347543698.43.0.179468389771.issue15939@psf.upfronthosting.co.za> Message-ID: <1349974764.27.0.665249693198.issue15939@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Either there's another way to run those tests on selected platforms that can be used instead A way to do it could be to register new doctest directives that skip the marked test based on the value of sys.platform. If we remove the directives, we lose that information and won't be able to do it anymore. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15939> _______________________________________ From report at bugs.python.org Thu Oct 11 19:07:17 2012 From: report at bugs.python.org (Santoso Wijaya) Date: Thu, 11 Oct 2012 17:07:17 +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: <1349975237.2.0.236001858243.issue16076@psf.upfronthosting.co.za> Santoso Wijaya added the comment: OTOH, xml.etree.cElementTree.Element in Python 3.2 and earlier has never been pickleable, either. Python 3.2.3+ (3.2:24499eebbc2f, Oct 10 2012, 13:54:45) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from xml.etree.cElementTree import Element >>> repr(Element) '<built-in function Element>' >>> import pickle >>> pickle.dumps(Element('foo')) Traceback (most recent call last): File "<stdin>", line 1, in <module> _pickle.PicklingError: Can't pickle <class 'Element'>: attribute lookup builtins.Element failed ---------- components: +Library (Lib) versions: +Python 3.2 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16076> _______________________________________ From report at bugs.python.org Thu Oct 11 19:35:09 2012 From: report at bugs.python.org (Georg Brandl) Date: Thu, 11 Oct 2012 17:35:09 +0000 Subject: [issue16193] display full e-mail name in hg.python.org annotate pages In-Reply-To: <1349933089.11.0.333803673424.issue16193@psf.upfronthosting.co.za> Message-ID: <1349976909.74.0.133338998835.issue16193@psf.upfronthosting.co.za> Georg Brandl added the comment: AFAIU, the current behavior would be to shorten "g.brandl at gmx.net" to "g", if I used my other email address for committing. That's a little short and not at all illuminating :) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16193> _______________________________________ From report at bugs.python.org Thu Oct 11 19:46:32 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 11 Oct 2012 17:46:32 +0000 Subject: [issue16193] display full e-mail name in hg.python.org annotate pages In-Reply-To: <1349933089.11.0.333803673424.issue16193@psf.upfronthosting.co.za> Message-ID: <1349977592.26.0.0807767163415.issue16193@psf.upfronthosting.co.za> Ezio Melotti added the comment: I usually don't care about the author, but about the changeset. The 'name at rev' provides an easy way to distinguish chunks of code that got changed in the same commit, and usually gives you enough information to figure out who the author is. Once I identified the interesting chunk I usually click on it to see the full diff, commit message, and related issue in the tracker. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16193> _______________________________________ From report at bugs.python.org Thu Oct 11 19:52:41 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 11 Oct 2012 17:52:41 +0000 Subject: [issue16193] display full e-mail name in hg.python.org annotate pages In-Reply-To: <1349933089.11.0.333803673424.issue16193@psf.upfronthosting.co.za> Message-ID: <1349977961.39.0.13719076385.issue16193@psf.upfronthosting.co.za> Chris Jerdonek added the comment: This is the suggested change in the bug report I linked to above (providing we are using 2.3 or later): > If you'd like the latter in hgweb, you can get it by editing '|user' [to '|emailuser'] in the templates. (from http://bz.selenic.com/show_bug.cgi?id=2276#c7 ) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16193> _______________________________________ From report at bugs.python.org Thu Oct 11 19:56:26 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 11 Oct 2012 17:56:26 +0000 Subject: [issue15939] make *.rst files in Doc/ parseable by doctest In-Reply-To: <1347543698.43.0.179468389771.issue15939@psf.upfronthosting.co.za> Message-ID: <1349978186.97.0.324345966472.issue15939@psf.upfronthosting.co.za> Ezio Melotti added the comment: > A way to do it could be to register new doctest directives that skip > the marked test based on the value of sys.platform. That can be done for 3.4+ only though. > If we remove the directives, we lose that information and won't > be able to do it anymore. It actually seems quite easy to distinguish them. At the beginning 'libc' is created either using cdll.msvcrt (on windows) or CDLL("libc.so.6") (on Linux). There are examples that use windll and other Windows- or Linux-specific functions later on but it's usually quite evident. If we get lost we can always dig in the history or just run the tests and see where they fail. FTR there were a few actual errors that I fixed (mostly about bytes vs string). I also removed unnecessary prints and added a few doctest directives to make some of the tests pass. 'from ctypes import *' is used quite frequently, and it would be better to change it, but I left it unchanged for now. I also removed an obsolete warning about the doctest directives in the example because Sphinx hides them. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15939> _______________________________________ From report at bugs.python.org Thu Oct 11 20:05:15 2012 From: report at bugs.python.org (Roger Serwy) Date: Thu, 11 Oct 2012 18:05:15 +0000 Subject: [issue16198] IDLE - tabbing in a string always brings up file completion window In-Reply-To: <1349974121.21.0.319562901545.issue16198@psf.upfronthosting.co.za> Message-ID: <1349978715.86.0.668296060101.issue16198@psf.upfronthosting.co.za> Roger Serwy added the comment: Attached is a preliminary patch. It checks to see if the cursor is on a line within a multiline string in order to avoid displaying the ACW. As a last resort, it checks to make sure that a valid match exists before opening the ACW when mode == COMPLETE_FILES. A test is still needed. See issue15392. ---------- keywords: +patch Added file: http://bugs.python.org/file27533/issue16198_check_matches.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16198> _______________________________________ From report at bugs.python.org Thu Oct 11 20:25:24 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 11 Oct 2012 18:25:24 +0000 Subject: [issue15939] make *.rst files in Doc/ parseable by doctest In-Reply-To: <1347543698.43.0.179468389771.issue15939@psf.upfronthosting.co.za> Message-ID: <1349979924.64.0.709879208677.issue15939@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > FTR there were a few actual errors that I fixed (mostly about bytes vs string). Great! Note that for the others, I was just trying to make the files parseable rather than passing. Currently, doctest aborts out on the files I fixed without even attempting to run the examples. > That can be done for 3.4+ only though. Well, yes and no. If there is a helper script to check documentation, it could be run on any branch regardless of whether the script is in source control. For example, I was planning to write such a script (from the regrtest patch I put together before) to help me when checking people's patches to code snippets in the documentation. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15939> _______________________________________ From report at bugs.python.org Thu Oct 11 20:41:58 2012 From: report at bugs.python.org (Zachary Ware) Date: Thu, 11 Oct 2012 18:41:58 +0000 Subject: [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <1349980918.31.0.267051539306.issue16197@psf.upfronthosting.co.za> Zachary Ware added the comment: Here's the patch against 3.2, hopefully I caught everything I meant to :) Unfortunately, I can't build Python or the docs on this machine, so I can't guarantee I didn't break anything. I tried to be careful though, especially with changing linebreaks in the docstrings. The changes for 3.3+ that don't apply to 3.2 are: - in PC\winreg.c - Change all occurrences of "a WindowsError" to "an OSError" - in Doc\library\winreg.rst - Change "a" to "an" in all occurrences of "a :exc:`OSError`" - Consolidate all the ..versionchanged:: 3.3 notes into one at the top (like in Doc\library\msvcrt.rst) Also, I did make a couple of non-cosmetic informational changes other than on 'res' and 'sam', such as listing the correct default 'access' parameter on a couple of functions (judging by my reading of said functions). Thanks, Zach ---------- Added file: http://bugs.python.org/file27534/winreg_3.2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16197> _______________________________________ From report at bugs.python.org Thu Oct 11 20:51:50 2012 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 11 Oct 2012 18:51:50 +0000 Subject: [issue16199] 2to3 very minor doc change Message-ID: <1349981509.98.0.17661303063.issue16199@psf.upfronthosting.co.za> New submission from Mark Lawrence: http://docs.python.org/library/2to3.html#using-2to3 second paragraph second sentence reads "The directories are to recursively traversed for Python sources." The "to" is not needed. ---------- assignee: docs at python components: Documentation messages: 172673 nosy: BreamoreBoy, docs at python priority: normal severity: normal status: open title: 2to3 very minor doc change type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16199> _______________________________________ From report at bugs.python.org Thu Oct 11 20:59:48 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Thu, 11 Oct 2012 18:59:48 +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: <1349981988.58.0.307595028286.issue11566@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Cannot reproduce, and cannot find the define in pyconfig.h. It's in PC/pyconfig.h, but shouldn't affect compiling with gcc. ---------- nosy: +petri.lehtinen status: open -> pending _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11566> _______________________________________ From report at bugs.python.org Thu Oct 11 21:02:20 2012 From: report at bugs.python.org (Ralf Schmitt) Date: Thu, 11 Oct 2012 19:02:20 +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: <1349982140.1.0.0833624423243.issue11566@psf.upfronthosting.co.za> Ralf Schmitt added the comment: Sorry, if I haven't been clear enough. This happens on windows when compiling extensions with "g++ -std=gnu++0x ..." ---------- status: pending -> open _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11566> _______________________________________ From report at bugs.python.org Thu Oct 11 21:05:13 2012 From: report at bugs.python.org (Glyph Lefkowitz) Date: Thu, 11 Oct 2012 19:05:13 +0000 Subject: [issue15945] memoryview + bytes fails In-Reply-To: <1347704879.16.0.744568990947.issue15945@psf.upfronthosting.co.za> Message-ID: <1349982313.47.0.647413038173.issue15945@psf.upfronthosting.co.za> Glyph Lefkowitz added the comment: It's worth noting that the "buffer()" built-in in Python2 had this behavior, and it enabled a copy-reduction optimization within Twisted's outgoing transport buffer. There are of course other ways to do this, but it seems like it would be nice to restore this handy optimization; it seems like a bug, or at least an oversight, that the convenience 'bytes+memoryview' (which cannot provide a useful optimization) works, but 'memoryview+bytes' (which would be equally helpful from a convenience perspective _could_ provide a reduction in copying) doesn't. Despite the bytes.join optimization (which, don't get me wrong, is also very helpful, almost necessary) this remains very useful. ---------- nosy: +glyph _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15945> _______________________________________ From report at bugs.python.org Thu Oct 11 21:09:30 2012 From: report at bugs.python.org (Roger Serwy) Date: Thu, 11 Oct 2012 19:09:30 +0000 Subject: [issue16200] Setting .posix=True for shlex object causes infinite loop in __next__ Message-ID: <1349982570.12.0.849029926696.issue16200@psf.upfronthosting.co.za> New submission from Roger Serwy: The documentation for shlex does not prohibit the user from setting .posix=True after creating a shlex object. When doing so, the .eof attribute is inconsistent, creating an infinite loop in the __next__ method. Here's some sample code to recreate the issue: import shlex s = shlex.shlex(r"", posix=False) s.posix = True list(s) One possible solution is to make .posix a read-only property. Another is to make .posix a property which sets .eof correctly. ---------- components: Library (Lib) messages: 172677 nosy: serwy priority: normal severity: normal status: open title: Setting .posix=True for shlex object causes infinite loop in __next__ type: behavior versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16200> _______________________________________ From report at bugs.python.org Thu Oct 11 21:13:52 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Oct 2012 19:13:52 +0000 Subject: [issue15945] memoryview + bytes fails In-Reply-To: <1347704879.16.0.744568990947.issue15945@psf.upfronthosting.co.za> Message-ID: <1349982832.85.0.372382759947.issue15945@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm not sure what you're talking about since: >>> b = buffer("abc") >>> b + "xyz" 'abcxyz' >>> (b + "xyz") is b False ... doesn't look like it avoid copies to me. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15945> _______________________________________ From report at bugs.python.org Thu Oct 11 21:15:31 2012 From: report at bugs.python.org (Ralf Schmitt) Date: Thu, 11 Oct 2012 19:15:31 +0000 Subject: [issue7735] python creates IPv6 DNS requests even when built with --disable-ipv6 In-Reply-To: <1263855099.58.0.477702556639.issue7735@psf.upfronthosting.co.za> Message-ID: <1349982931.91.0.0698480238512.issue7735@psf.upfronthosting.co.za> Ralf Schmitt added the comment: they are noticeable! If the sock.connect fails with the IPv4 address, it will then try to connect to an IPv6 address (which fails with an TypeError then). The original error is hidden! ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue7735> _______________________________________ From report at bugs.python.org Thu Oct 11 21:21:55 2012 From: report at bugs.python.org (Roger Serwy) Date: Thu, 11 Oct 2012 19:21:55 +0000 Subject: [issue16200] Setting .posix=True for shlex object causes infinite loop in __next__ In-Reply-To: <1349982570.12.0.849029926696.issue16200@psf.upfronthosting.co.za> Message-ID: <1349983315.73.0.808164397486.issue16200@psf.upfronthosting.co.za> Roger Serwy added the comment: Attached is a patch to make the .posix property read-only, along with a test. The patch is against 3.4. ---------- keywords: +patch Added file: http://bugs.python.org/file27535/shlex_posix_readonly.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16200> _______________________________________ From report at bugs.python.org Thu Oct 11 21:23:10 2012 From: report at bugs.python.org (Roger Serwy) Date: Thu, 11 Oct 2012 19:23:10 +0000 Subject: [issue16186] shlex bug? In-Reply-To: <1349876824.59.0.894274371181.issue16186@psf.upfronthosting.co.za> Message-ID: <1349983390.82.0.975822990786.issue16186@psf.upfronthosting.co.za> Roger Serwy added the comment: The .posix = True bug is a separate issue, now in #16200. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16186> _______________________________________ From report at bugs.python.org Thu Oct 11 21:31:03 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Thu, 11 Oct 2012 19:31:03 +0000 Subject: [issue16201] socket.gethostbyname incorrectly parses ip Message-ID: <1349983863.01.0.255097510924.issue16201@psf.upfronthosting.co.za> New submission from Michele Orr?: Buggy due to the use of scanf at Modueles/socketmodule.c:868 Broken from python2.7 to tip on my machine (GNU/Linux) >>> import socket [64481 refs] >>> socket.gethostbyname('4294967306.4294967296.4294967296.1') '10.0.0.1' [67764 refs] >>> socket.gethostbyname('192.168.1.1 ') '192.168.1.1' [67764 refs] >>> socket.gethostbyname(' 192.168.1.1') '192.168.1.1' [67764 refs] >>> socket.gethostbyname(' 192.168.1.1 ') Traceback (most recent call last): File "<stdin>", line 1, in <module> socket.gaierror: [Errno -2] Name or service not known [67805 refs] ---------- components: Library (Lib) messages: 172682 nosy: maker priority: normal severity: normal status: open title: socket.gethostbyname incorrectly parses ip versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16201> _______________________________________ From report at bugs.python.org Thu Oct 11 21:44:59 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Thu, 11 Oct 2012 19:44:59 +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: <1349984699.77.0.687771472245.issue11566@psf.upfronthosting.co.za> Petri Lehtinen added the comment: On MinGW? I'm not a Windows user, but IIRC building extensions with gcc on MinGW has many problems and isn't officially supported. ---------- components: +Windows -None nosy: +brian.curtin, loewis, tim.golden _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11566> _______________________________________ From report at bugs.python.org Thu Oct 11 21:52:28 2012 From: report at bugs.python.org (Ralf Schmitt) Date: Thu, 11 Oct 2012 19:52:28 +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: <1349985148.49.0.513531904083.issue11566@psf.upfronthosting.co.za> Ralf Schmitt added the comment: yes, mingw. it may have some problems and this is one of them! ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11566> _______________________________________ From report at bugs.python.org Thu Oct 11 21:59:39 2012 From: report at bugs.python.org (Roger Serwy) Date: Thu, 11 Oct 2012 19:59:39 +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: <1349985579.05.0.863206430327.issue9290@psf.upfronthosting.co.za> Roger Serwy added the comment: I tried the patch for 3.3 and it works for me on Linux. It correctly handles prior issues like #13532, #15318, #15319, and #7163, as well as providing good support for .read, .readline, .readlines. Each of those methods respond correctly to Ctrl+C and Ctrl+D. On Windows 7, with 2.7.3, Ctrl+D is still needed to indicate end-of-file, instead of Ctrl+Z. This may or may not be significant, but it is related to issue14735. ---------- nosy: +serwy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9290> _______________________________________ From report at bugs.python.org Thu Oct 11 22:10:24 2012 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 11 Oct 2012 20:10:24 +0000 Subject: [issue16202] sys.path[0] security issues Message-ID: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> New submission from Jeroen Demeyer: There is a serious security problem with Python's default sys.path. If I execute $ python /tmp/somescript.py then Python will add /tmp as sys.path[0], such that an "import foobar" will cause Python to read /tmp/foobar (or variations). This vulnerability exists in particular in distutils.util.byte_compile() with direct=False. Since the Python test suite calls this function, users running the Python test suite are vulnerable. I think the root of this issue should be fixed: Python should not simply add stuff to sys.path without checking. In prepared a patch for CPython-2.7 which only adds sys.path[0] if it seems secure to do so, by looking at file/directory permissions and ownership. In particular, it would never add /tmp to sys.path, but it would still keep the current behaviour when running a script in a directory owned by the current user with 0755 permissions. See the patch for details. I realize this goes against documented Python behaviour, but I think that a broken spec needs to be fixed. I also think that in most use cases, nothing is going to change because normally one doesn't need to import from /tmp. In any case, users can still manipulate sys.path directly. Feel free to fix this issue in a different way than my patch, but I hope you at least implement the spirit of my patch. The patch has only been tested on Linux systems. Credit goes to Volker Braun for first discovering this issue in Sage, see http://trac.sagemath.org/sage_trac/ticket/13579 ---------- components: Interpreter Core files: sys_path_security.patch keywords: patch messages: 172686 nosy: jdemeyer priority: normal severity: normal status: open title: sys.path[0] security issues type: security versions: Python 2.7 Added file: http://bugs.python.org/file27536/sys_path_security.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Thu Oct 11 22:10:53 2012 From: report at bugs.python.org (Glyph Lefkowitz) Date: Thu, 11 Oct 2012 20:10:53 +0000 Subject: [issue15945] memoryview + bytes fails In-Reply-To: <1349982832.85.0.372382759947.issue15945@psf.upfronthosting.co.za> Message-ID: <F65B7DC6-94C4-46D5-9117-D16E3EF17B0E@twistedmatrix.com> Glyph Lefkowitz added the comment: Le Oct 11, 2012 ? 12:13 PM, Antoine Pitrou <report at bugs.python.org> a ?crit : > > Antoine Pitrou added the comment: > > I'm not sure what you're talking about since: > >>>> b = buffer("abc") >>>> b + "xyz" > 'abcxyz' >>>> (b + "xyz") is b > False > > ... doesn't look like it avoid copies to me. The case where copies are avoided is documented here: <http://twistedmatrix.com/trac/browser/trunk/twisted/internet/abstract.py?rev=35733#L20> ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15945> _______________________________________ From report at bugs.python.org Thu Oct 11 22:14:35 2012 From: report at bugs.python.org (Alan WiIliams) Date: Thu, 11 Oct 2012 20:14:35 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1349986475.24.0.866941930357.issue16202@psf.upfronthosting.co.za> Changes by Alan WiIliams <astropiloto at gmail.com>: ---------- nosy: +Alan.WiIliams _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Thu Oct 11 22:16:16 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Oct 2012 20:16:16 +0000 Subject: [issue15945] memoryview + bytes fails In-Reply-To: <1347704879.16.0.744568990947.issue15945@psf.upfronthosting.co.za> Message-ID: <1349986576.27.0.726003949784.issue15945@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > The case where copies are avoided is documented here ... which would be handled nicely by issue15958. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15945> _______________________________________ From report at bugs.python.org Thu Oct 11 22:27:14 2012 From: report at bugs.python.org (Glyph Lefkowitz) Date: Thu, 11 Oct 2012 20:27:14 +0000 Subject: [issue15945] memoryview + bytes fails In-Reply-To: <1347704879.16.0.744568990947.issue15945@psf.upfronthosting.co.za> Message-ID: <1349987234.93.0.111818505095.issue15945@psf.upfronthosting.co.za> Glyph Lefkowitz added the comment: Yes, it would be *possible* to fix it with that alone, but that still makes it a pointless 'gotcha' in differing behavior between memoryview and buffer, especially given that bytes+memoryview does something semantically different than memoryview+bytes for no reason. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15945> _______________________________________ From report at bugs.python.org Thu Oct 11 22:32:23 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Oct 2012 20:32:23 +0000 Subject: [issue15945] memoryview + bytes fails In-Reply-To: <1347704879.16.0.744568990947.issue15945@psf.upfronthosting.co.za> Message-ID: <1349987543.92.0.556191239125.issue15945@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, the fact that memoryview + bytes wouldn't return you a memoryview object might be a good reason to disallow it. Compare with: >>> bytearray(b"x") + b"y" bytearray(b'xy') >>> b"x" + bytearray(b"y") b'xy' ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15945> _______________________________________ From report at bugs.python.org Thu Oct 11 22:38:25 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Oct 2012 20:38:25 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <201210111136.10301.storchaka@gmail.com> Message-ID: <CAMpsgwb-cGFdxLM8b_riX+4_ZU1U_4e2WhEtXJnkUwcpA91WbQ@mail.gmail.com> STINNER Victor added the comment: > You can hybridize them. First just compare chars and if not match then use > memcmp(). This speed up the case of repeated chars. Oh, you're patch is simple and it's amazing fast! I compare unicode with Python 2.7, 3.2, 3.4 and 3.4 patched, and bytes with 2.7. Using your patch, Python 3.4 is the fastest implemented in most cases. Common platform: CPU model: Intel(R) Core(TM) i5 CPU 661 @ 3.33GHz Bits: int=32, long=32, long long=64, pointer=32 Platform: Linux-3.2.0-31-generic-pae-i686-with-debian-wheezy-sid Platform of campaign 2.7-bytes: Python unicode implementation: UTF-16 Python version: 2.7.3+ (2.7:19d37c8d1882+, Oct 9 2012, 14:37:36) [GCC 4.6.3] CFLAGS: -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes SCM: hg revision=ad51ed93377c tag=tip branch=default date="2012-10-11 00:11 -0700" Date: 2012-10-11 14:41:49 Platform of campaign 2.7-unicode: Python unicode implementation: UTF-16 Python version: 2.7.3+ (2.7:19d37c8d1882+, Oct 9 2012, 14:37:36) [GCC 4.6.3] CFLAGS: -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes SCM: hg revision=ad51ed93377c tag=tip branch=default date="2012-10-11 00:11 -0700" Date: 2012-10-11 14:42:55 Platform of campaign 3.2-wide: Python unicode implementation: UCS-4 Python version: 3.2.3+ (3.2:f7615ee43318, Sep 27 2012, 15:00:15) [GCC 4.6.3] CFLAGS: -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes SCM: hg revision=ad51ed93377c tag=tip branch=default date="2012-10-11 00:11 -0700" Date: 2012-10-11 14:41:30 Platform of campaign 3.4: Python unicode implementation: PEP 393 Python version: 3.4.0a0 (default:ad51ed93377c, Oct 11 2012, 14:40:51) [GCC 4.6.3] CFLAGS: -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes SCM: hg revision=ad51ed93377c tag=tip branch=default date="2012-10-11 00:11 -0700" Date: 2012-10-11 14:40:52 Platform of campaign 3.4-patch: Date: 2012-10-11 14:40:25 Python version: 3.4.0a0 (default:ad51ed93377c+, Oct 11 2012, 14:33:04) [GCC 4.6.3] CFLAGS: -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes SCM: hg revision=ad51ed93377c+ tag=tip branch=default date="2012-10-11 00:11 -0700" Python unicode implementation: PEP 393 ----------------+-----------------+-----------------+-----------------+-----------------+---------------- Tests | 2.7-bytes | 2.7-unicode | 3.2-wide | 3.4 | 3.4-patch ----------------+-----------------+-----------------+-----------------+-----------------+---------------- all | 7.83 ms (+552%) | 2.05 ms (+71%) | 3.45 ms (+188%) | 15 ms (+1152%) | 1.2 ms (*) replace 50% | 4.14 ms (+135%) | 1.76 ms (*) | 3.17 ms (+81%) | 7.76 ms (+342%) | 4.18 ms (+138%) replace 10% | 1.21 ms (*) | 1.52 ms (+26%) | 3.01 ms (+150%) | 2.01 ms (+67%) | 1.23 ms replace 1% | 490 us | 1.55 ms (+217%) | 2.94 ms (+501%) | 589 us (+20%) | 489 us (*) replace 2 chars | 398 us | 1.47 ms (+271%) | 2.89 ms (+632%) | 398 us | 395 us (*) ----------------+-----------------+-----------------+-----------------+-----------------+---------------- Total | 14.1 ms (+88%) | 8.34 ms (+11%) | 15.5 ms (+106%) | 25.8 ms (+244%) | 7.49 ms (*) ----------------+-----------------+-----------------+-----------------+-----------------+---------------- ** Compare 3.2, 3.4 and 3.4 patched: ----------------+-------------+-----------------+--------------- Tests | 3.2-wide | 3.4 | 3.4-patch ----------------+-------------+-----------------+--------------- all | 3.45 ms (*) | 15 ms (+335%) | 1.2 ms (-65%) replace 50% | 3.17 ms (*) | 7.76 ms (+145%) | 4.18 ms (+32%) replace 10% | 3.01 ms (*) | 2.01 ms (-33%) | 1.23 ms (-59%) replace 1% | 2.94 ms (*) | 589 us (-80%) | 489 us (-83%) replace 2 chars | 2.89 ms (*) | 398 us (-86%) | 395 us (-86%) ----------------+-------------+-----------------+--------------- Total | 15.5 ms (*) | 25.8 ms (+67%) | 7.49 ms (-52%) ----------------+-------------+-----------------+--------------- The patch should be completed to optimize also other Unicode kinds. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16061> _______________________________________ From report at bugs.python.org Thu Oct 11 22:49:50 2012 From: report at bugs.python.org (Ralf Schmitt) Date: Thu, 11 Oct 2012 20:49:50 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1349988590.01.0.690083747482.issue16202@psf.upfronthosting.co.za> Changes by Ralf Schmitt <python-bugs at systemexit.de>: ---------- nosy: +schmir _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Thu Oct 11 22:55:48 2012 From: report at bugs.python.org (Santoso Wijaya) Date: Thu, 11 Oct 2012 20:55:48 +0000 Subject: [issue16201] socket.gethostbyname incorrectly parses ip In-Reply-To: <1349983863.01.0.255097510924.issue16201@psf.upfronthosting.co.za> Message-ID: <1349988948.71.0.0895334631203.issue16201@psf.upfronthosting.co.za> Changes by Santoso Wijaya <santoso.wijaya at gmail.com>: ---------- components: +Extension Modules nosy: +santa4nt type: -> behavior versions: +Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16201> _______________________________________ From report at bugs.python.org Thu Oct 11 22:59:38 2012 From: report at bugs.python.org (anand jeyahar) Date: Thu, 11 Oct 2012 20:59:38 +0000 Subject: [issue8492] Addition to readline module to get dictionary of keystrokes and commands In-Reply-To: <1271880127.18.0.454462638892.issue8492@psf.upfronthosting.co.za> Message-ID: <1349989177.99.0.344263563155.issue8492@psf.upfronthosting.co.za> anand jeyahar added the comment: Here's what the original maintainer chet romney had to say about this functionality not being a part of readline, and should be implemented by the calling application. From Chet Ramey: ---------- The answer is that this is very similar to the operate-and-get-next feature bash adds to the readline interface. I am not inclined to add this to readline in its current form because it manipulates state managed by the calling application (rl_startup_hook) and requires that state to be kept between calls to readline(). It's a feature that should be provided by the calling application -- it's implementation is not complicated. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8492> _______________________________________ From report at bugs.python.org Thu Oct 11 23:13:06 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Oct 2012 21:13:06 +0000 Subject: [issue16176] platform.platform() identifies Windows 8 as post2008Server In-Reply-To: <1349799142.95.0.909627211255.issue16176@psf.upfronthosting.co.za> Message-ID: <3Xd4ds0WywzR2s@mail.python.org> Roundup Robot added the comment: New changeset 8245333db1e5 by Brian Curtin in branch '3.2': Fix #16176. Properly identify Windows 8 via platform.platform() http://hg.python.org/cpython/rev/8245333db1e5 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16176> _______________________________________ From report at bugs.python.org Thu Oct 11 23:17:00 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Oct 2012 21:17:00 +0000 Subject: [issue16176] platform.platform() identifies Windows 8 as post2008Server In-Reply-To: <1349799142.95.0.909627211255.issue16176@psf.upfronthosting.co.za> Message-ID: <3Xd4kN1yKkzQxd@mail.python.org> Roundup Robot added the comment: New changeset e3acc945f0cb by Brian Curtin in branch '2.7': Fix #16176. Properly identify Windows 8 via platform.platform() http://hg.python.org/cpython/rev/e3acc945f0cb ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16176> _______________________________________ From report at bugs.python.org Thu Oct 11 23:28:35 2012 From: report at bugs.python.org (Brian Curtin) Date: Thu, 11 Oct 2012 21:28:35 +0000 Subject: [issue16176] platform.platform() identifies Windows 8 as post2008Server In-Reply-To: <1349799142.95.0.909627211255.issue16176@psf.upfronthosting.co.za> Message-ID: <1349990915.28.0.217455142632.issue16176@psf.upfronthosting.co.za> Changes by Brian Curtin <brian at python.org>: ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16176> _______________________________________ From report at bugs.python.org Thu Oct 11 23:30:42 2012 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 11 Oct 2012 21:30:42 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method Message-ID: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> New submission from Guido van Rossum: I've noticed a subtle bug in some of our internal code. Someone wants to ensure that a certain string (e.g. a URL path) matches a certain pattern in its entirety. They use re.match() with a regex ending in $. Fine. Now someone else comes along and modifies the pattern. Somehow the $ gets lost, or the pattern develops a set of toplevel choices that don't all end in $. And now things that have a valid *prefix* suddenly (and unintentionally) start matching. I think this is a common enough issue and propose a new API: a fullmatch() function and method that work just like the existing match() function and method but also check that the whole input string matches. This can be implemented slightly awkwardly as follows in user code: def fullmatch(regex, input, flags=0): m = re.match(regex, input, flags) if m is not None and m.end() == len(input): return m return None (The corresponding method will have to be somewhat more complex because the underlying match() method takes optional pos and endpos arguments.) ---------- keywords: easy messages: 172695 nosy: gvanrossum priority: normal severity: normal status: open title: Proposal: add re.fullmatch() method type: enhancement versions: Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16203> _______________________________________ From report at bugs.python.org Thu Oct 11 23:41:48 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 11 Oct 2012 21:41:48 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1349991708.18.0.720393373475.issue16202@psf.upfronthosting.co.za> Changes by Christian Heimes <lists at cheimes.de>: ---------- nosy: +christian.heimes _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Thu Oct 11 23:45:56 2012 From: report at bugs.python.org (Tim Peters) Date: Thu, 11 Oct 2012 21:45:56 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1349991956.55.0.790151998808.issue16203@psf.upfronthosting.co.za> Tim Peters added the comment: +1. Note that this really can't be done in user-level code. For example, consider matching the pattern a|ab against the string ab Without being _forced_ to consider the "ab" branch, the regexp will match just the "a" branch. So, e.g., the example code you posted will say "nope, it didn't match (the whole thing)". ---------- nosy: +tim_one _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16203> _______________________________________ From report at bugs.python.org Thu Oct 11 23:46:54 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Oct 2012 21:46:54 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1349992014.03.0.556851172854.issue16203@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What will be with non-greedy qualifiers? Should '.*?' full match any string? >>> re.match('.*?$', 'abc').group() 'abc' >>> re.match('.*?', 'abc').group() '' ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16203> _______________________________________ From report at bugs.python.org Thu Oct 11 23:58:57 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Oct 2012 21:58:57 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1349992737.27.0.775591208177.issue16203@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Note that this really can't be done in user-level code. Well, how about: def fullmatch(regex, input, flags=0): return re.match("(:?" + regex + ")$", input, flags) ---------- nosy: +pitrou _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16203> _______________________________________ From report at bugs.python.org Fri Oct 12 00:06:05 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 11 Oct 2012 22:06:05 +0000 Subject: [issue14937] IDLE's deficiency in the completion of file names (Python 32, Windows XP) In-Reply-To: <1338225445.23.0.00208814754009.issue14937@psf.upfronthosting.co.za> Message-ID: <1349993165.09.0.875208302206.issue14937@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This patch (I suspect it is this one) disabled the use of '/' in filenames on windows when using filename completion. 'c:\ <wait, tab, ^space bring up box> in 3.2.3 and 3.3.0> (If there is no 'r' prefix, it really should require '\\' to be safe.) "c:/ ditto for 3.2.3. In 3.3.0, (and, I presume, 3.2.4 if not changed) tab inserts spaces to next tab stop, while ^space is ignored. Since using '/' is recommended over unsafe '\', this is an undesireable regression. ---------- resolution: fixed -> stage: patch review -> needs patch status: closed -> open versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14937> _______________________________________ From report at bugs.python.org Fri Oct 12 00:07:21 2012 From: report at bugs.python.org (Santoso Wijaya) Date: Thu, 11 Oct 2012 22:07:21 +0000 Subject: [issue16201] socket.gethostbyname incorrectly parses ip In-Reply-To: <1349983863.01.0.255097510924.issue16201@psf.upfronthosting.co.za> Message-ID: <1349993241.92.0.602035338823.issue16201@psf.upfronthosting.co.za> Santoso Wijaya added the comment: Attaching patch to trim leading and trailing whitespaces prior to processing. Incidentally, this also means: >>> socket.gethostbyname('') '0.0.0.0' >>> socket.gethostbyname(' ') Traceback (most recent call last): File "<stdin>", line 1, in <module> socket.gaierror: [Errno -5] No address associated with hostname But I'm not sure if we're okay with changing that semantics, so I left it be in this patch. ---------- keywords: +patch Added file: http://bugs.python.org/file27537/gethostbyname_whitespace.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16201> _______________________________________ From report at bugs.python.org Fri Oct 12 00:12:49 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Oct 2012 22:12:49 +0000 Subject: [issue7735] python creates IPv6 DNS requests even when built with --disable-ipv6 In-Reply-To: <1263855099.58.0.477702556639.issue7735@psf.upfronthosting.co.za> Message-ID: <1349993569.27.0.625748111492.issue7735@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I would suggest closing as won't fix. The way I understand it, --disable-ipv6 simply allows building on systems without IPv6 support. It's not meant to disable IPv6 requests on an IPv6-compliant system. If your IPv6 connectivity doesn't work properly, you should disable it in your system configuration, not try to recompile Python! ---------- nosy: +pitrou resolution: -> wont fix stage: test needed -> committed/rejected _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue7735> _______________________________________ From report at bugs.python.org Fri Oct 12 00:13:32 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 11 Oct 2012 22:13:32 +0000 Subject: [issue16198] IDLE - tabbing in a string always brings up file completion window In-Reply-To: <1349974121.21.0.319562901545.issue16198@psf.upfronthosting.co.za> Message-ID: <1349993612.51.0.87131801476.issue16198@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On windows, one tab brings up the box and in 3.2.3 and 2.7.3 also. Perhaps they should be revised also. The difference is that in those latter two, <space> dismisses the box whereas in 3.3.0, it does not, making it even more obnoxious. Two more tabs inserts something. Tab within a comment just enters a tab converted to spaces. I think that maybe tabs within strings should always do the same as within comments. Perhaps one way is enough. (I am guessing that other editors use <tab> for this, so I can see the desire to use it.) There needs to be a way to get tabbing within multiline strings. I did not see 'file completion' in Options/Configure/Keys. Is it there under a different name? I was puzzled by the example path d:/Biblioteca/T?cnica/inform?tica/Python from #14937 until I retried in 3.2.3. In 3.3.0, a / disables filename completion. I reopened this issue. If one types 'd:\' and there is no d:, <tab> inserts spaces and ^space is ignored. I do not like this kind of inconsistency (or magical behavior shift). If you ask for file names, better to bring up a blank box, or a one-line box [<no matches>]. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16198> _______________________________________ From report at bugs.python.org Fri Oct 12 00:41:32 2012 From: report at bugs.python.org (Ralf Schmitt) Date: Thu, 11 Oct 2012 22:41:32 +0000 Subject: [issue7735] python creates IPv6 DNS requests even when built with --disable-ipv6 In-Reply-To: <1263855099.58.0.477702556639.issue7735@psf.upfronthosting.co.za> Message-ID: <1349995292.79.0.889128612509.issue7735@psf.upfronthosting.co.za> Ralf Schmitt added the comment: The fact is I have disabled IPv6 with python's --disable-ipv6 switch. If you think that this switch shouldn't be supported anymore, either remove it or document it as obsolete. Telling me to disable IPv6 in my system configuration is just arrogant. I may not be able to do so and I might have had good reasons to disable IPv6 support in python. It might even be the case that IPv6 support is working on my machine. So, that's a bad argument. And the fact that I may be able to disable IPv6, won't change the value of socket.has_ipv6 magically for me. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue7735> _______________________________________ From report at bugs.python.org Fri Oct 12 00:42:52 2012 From: report at bugs.python.org (Tim Peters) Date: Thu, 11 Oct 2012 22:42:52 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1349995372.46.0.706619963015.issue16203@psf.upfronthosting.co.za> Tim Peters added the comment: Antoine, that's certainly the conceptual intent here. Can't say whether your attempt works in all cases. The docs don't guarantee it. For example, if the original regexp started with (?x), the docs explicitly say the effect of (?x) is undefined "if there are non-whitespace characters before the [inline (?x)] flag". Sure, you could parse the regexp is user code too, and move an initial (?...x...) before your non-capturing group. For that matter, you could write your own regexp engine in user code too ;-) The point is that it should be easy for the regexp engine to implement the desired functionality - and user attempts to "fake it" have pitfalls (even Guido didn't get it right - LOL ;-) ). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16203> _______________________________________ From report at bugs.python.org Fri Oct 12 00:44:33 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Oct 2012 22:44:33 +0000 Subject: [issue7735] python creates IPv6 DNS requests even when built with --disable-ipv6 In-Reply-To: <1349995292.79.0.889128612509.issue7735@psf.upfronthosting.co.za> Message-ID: <1349995378.9147.1.camel@localhost.localdomain> Antoine Pitrou added the comment: > Telling me to disable IPv6 in my system configuration is just > arrogant. No, it's perfectly reasonable. On the other hand, recompiling Python without IPv6 to workaround a system-level problem with IPv6 is totally silly. Do you recompile all other programs which might attempt IPv6 communications? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue7735> _______________________________________ From report at bugs.python.org Fri Oct 12 00:54:19 2012 From: report at bugs.python.org (Ralf Schmitt) Date: Thu, 11 Oct 2012 22:54:19 +0000 Subject: [issue7735] python creates IPv6 DNS requests even when built with --disable-ipv6 In-Reply-To: <1263855099.58.0.477702556639.issue7735@psf.upfronthosting.co.za> Message-ID: <1349996059.9.0.541237059361.issue7735@psf.upfronthosting.co.za> Ralf Schmitt added the comment: Why do you think I'm disabling IPv6 because I have a "system level problem"? I am not recompiling python to workaround system level problems. And I don't recompile any other program. The problem is in python, it can be fixed with a one line patch. but you prefer to insult me instead of admitting that there is a problem. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue7735> _______________________________________ From report at bugs.python.org Fri Oct 12 00:55:16 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Oct 2012 22:55:16 +0000 Subject: [issue7735] python creates IPv6 DNS requests even when built with --disable-ipv6 In-Reply-To: <1263855099.58.0.477702556639.issue7735@psf.upfronthosting.co.za> Message-ID: <1349996116.97.0.294877249873.issue7735@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Why do you think I'm disabling IPv6 because I have a "system level > problem"? So please explain the problem you're having. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue7735> _______________________________________ From report at bugs.python.org Fri Oct 12 00:55:57 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 11 Oct 2012 22:55:57 +0000 Subject: [issue16199] 2to3 very minor doc change In-Reply-To: <1349981509.98.0.17661303063.issue16199@psf.upfronthosting.co.za> Message-ID: <1349996157.24.0.442783523879.issue16199@psf.upfronthosting.co.za> Changes by Chris Jerdonek <chris.jerdonek at gmail.com>: ---------- assignee: docs at python -> chris.jerdonek nosy: +chris.jerdonek _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16199> _______________________________________ From report at bugs.python.org Fri Oct 12 01:00:52 2012 From: report at bugs.python.org (Ralf Schmitt) Date: Thu, 11 Oct 2012 23:00:52 +0000 Subject: [issue7735] python creates IPv6 DNS requests even when built with --disable-ipv6 In-Reply-To: <1263855099.58.0.477702556639.issue7735@psf.upfronthosting.co.za> Message-ID: <1349996452.65.0.616593008311.issue7735@psf.upfronthosting.co.za> Ralf Schmitt added the comment: The OPs description is pretty clear. There's no good reason to ask for IPv6 addresses if IPv6 is disabled. The create_connection will try them all, and if connections to IPv4 addresses fail, you'll end up with a TypeError. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue7735> _______________________________________ From report at bugs.python.org Fri Oct 12 01:06:32 2012 From: report at bugs.python.org (Robert Bradshaw) Date: Thu, 11 Oct 2012 23:06:32 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1349996792.76.0.78675053323.issue16202@psf.upfronthosting.co.za> Robert Bradshaw added the comment: Alternatively, one could fix distutils.util.byte_compile() to execute the script in safe, empty temp directory. Running scripts in /tmp remains, as it has always been, a bad idea. Trying to determine if an import is "safe" can be arbitrarily complicated (e.g. what if the group-write bit is set, but you're the only member of that group, or there are special allow or deny ACLs for other users that aren't detected here). What notion of safeness belongs in the spec? ---------- nosy: +robertwb _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Fri Oct 12 01:08:17 2012 From: report at bugs.python.org (Daniele Varrazzo) Date: Thu, 11 Oct 2012 23:08:17 +0000 Subject: [issue16204] PyBuffer_FillInfo returns 'B' buffer, whose behavior has changed w.r.t. 3.1/3.2 Message-ID: <1349996897.29.0.414434111173.issue16204@psf.upfronthosting.co.za> New submission from Daniele Varrazzo: Definitely related to this change in Python 3.3: Accessing a memoryview element with format ?B? (unsigned bytes) now returns an integer (in accordance with the struct module syntax). For returning a bytes object the view must be cast to ?c? first. The object returned by PyBuffer_FillInfo is 'B' format: this means that python code finds itself dealing in Py 3.3 with a different object respect to what returned in Py 3.1 and 3.2. Is this change in the behavior wanted? Wouldn't have been better having FillInfo return a 'c' buffer instead? I'm adding support to Py 3.3 to psycopg2 and the B buffers make the test suite fail. I want psycopg to return consistent objects across 3.x. Is the change in this commit correct? https://github.com/dvarrazzo/psycopg/commit/469b6f8aff4cafe203d851b19bedfab0128e795a Is this a good way to return a 'c' buffer? ---------- messages: 172710 nosy: piro priority: normal severity: normal status: open title: PyBuffer_FillInfo returns 'B' buffer, whose behavior has changed w.r.t. 3.1/3.2 type: behavior versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16204> _______________________________________ From report at bugs.python.org Fri Oct 12 01:14:36 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 11 Oct 2012 23:14:36 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1349997276.16.0.60360329682.issue14621@psf.upfronthosting.co.za> Changes by Christian Heimes <lists at cheimes.de>: ---------- nosy: +christian.heimes _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14621> _______________________________________ From report at bugs.python.org Fri Oct 12 01:16:46 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Oct 2012 23:16:46 +0000 Subject: [issue16199] 2to3 very minor doc change In-Reply-To: <1349981509.98.0.17661303063.issue16199@psf.upfronthosting.co.za> Message-ID: <3Xd7NZ09PxzR2b@mail.python.org> Roundup Robot added the comment: New changeset c7f11e450c31 by Chris Jerdonek in branch '3.2': Issue #16199: Fix typo in 2to3 docs. Thanks to Mark Lawrence for the report. http://hg.python.org/cpython/rev/c7f11e450c31 New changeset d83dfa6a381a by Chris Jerdonek in branch '3.3': Issue #16199: Merge 2to3 typo fix from 3.2. http://hg.python.org/cpython/rev/d83dfa6a381a New changeset 880e62fa7770 by Chris Jerdonek in branch 'default': Issue #16199: Merge 2to3 typo fix from 3.3 (and resolve previous merge). http://hg.python.org/cpython/rev/880e62fa7770 New changeset c0a2294de787 by Chris Jerdonek in branch '2.7': Issue #16199: Backport 2to3 typo fix from 3.2. http://hg.python.org/cpython/rev/c0a2294de787 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16199> _______________________________________ From report at bugs.python.org Fri Oct 12 01:18:37 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 11 Oct 2012 23:18:37 +0000 Subject: [issue16199] 2to3 very minor doc change In-Reply-To: <1349981509.98.0.17661303063.issue16199@psf.upfronthosting.co.za> Message-ID: <1349997517.94.0.88934760189.issue16199@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Fixed. Thanks for the report, Mark! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16199> _______________________________________ From report at bugs.python.org Fri Oct 12 01:40:01 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Thu, 11 Oct 2012 23:40:01 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1349998801.43.0.544932350185.issue16202@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>: ---------- nosy: +Arfrever _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Fri Oct 12 01:50:08 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Oct 2012 23:50:08 +0000 Subject: [issue16204] PyBuffer_FillInfo returns 'B' buffer, whose behavior has changed w.r.t. 3.1/3.2 In-Reply-To: <1349996897.29.0.414434111173.issue16204@psf.upfronthosting.co.za> Message-ID: <1349999408.05.0.0622006757699.issue16204@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: ---------- keywords: +3.3regression nosy: +skrah versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16204> _______________________________________ From report at bugs.python.org Fri Oct 12 04:15:26 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 02:15:26 +0000 Subject: [issue16205] update :class:`str` references to link to the str type section Message-ID: <1350008126.16.0.898285675428.issue16205@psf.upfronthosting.co.za> New submission from Chris Jerdonek: 3.3 added a dedicated section to the docs for the str type. However, references to :class:`str` still link to the documentation of the built-in function str(). This issue is to update references to the str class to point to the new section on the str type. We could use :ref:`str <textseq>`, but it would be nice to have a solution that makes "str" have the code-style font instead of italics. ---------- assignee: docs at python components: Documentation messages: 172713 nosy: chris.jerdonek, docs at python, ezio.melotti, ncoghlan priority: normal severity: normal status: open title: update :class:`str` references to link to the str type section type: enhancement versions: Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16205> _______________________________________ From report at bugs.python.org Fri Oct 12 04:59:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 02:59:19 +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: <1350010759.94.0.554431434869.issue16205@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I'm not sure if Sphinx would allow it, but it would be nice if references to the function str() could link to the built-in function documentation, and references to the class str could link to the section on the str type. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16205> _______________________________________ From report at bugs.python.org Fri Oct 12 05:08:17 2012 From: report at bugs.python.org (Kevin Walzer) Date: Fri, 12 Oct 2012 03:08:17 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1346632042.85.0.745944196118.issue15853@psf.upfronthosting.co.za> Message-ID: <1350011297.25.0.0739367807588.issue15853@psf.upfronthosting.co.za> Kevin Walzer added the comment: The attached patch works around the crash for me on Python 2.7.3, Tk-Cocoa 8.5.12 (tip), on Lion. ---------- keywords: +patch nosy: +wordtech Added file: http://bugs.python.org/file27538/configDialog.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15853> _______________________________________ From report at bugs.python.org Fri Oct 12 05:17:48 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 03:17:48 +0000 Subject: [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1350011868.73.0.696776679024.issue13538@psf.upfronthosting.co.za> Chris Jerdonek added the comment: This may have been addressed to some extent by issue 14783: http://hg.python.org/cpython/rev/3773c98d9da8 ---------- nosy: +chris.jerdonek _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13538> _______________________________________ From report at bugs.python.org Fri Oct 12 05:19:45 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 03:19:45 +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: <1350011985.34.0.176502802281.issue16205@psf.upfronthosting.co.za> Chris Jerdonek added the comment: The documentation seems to take a similar approach with dict: http://docs.python.org/dev/library/stdtypes.html#dict http://docs.python.org/dev/library/functions.html#func-dict ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16205> _______________________________________ From report at bugs.python.org Fri Oct 12 05:23:15 2012 From: report at bugs.python.org (Kevin Walzer) Date: Fri, 12 Oct 2012 03:23:15 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1346632042.85.0.745944196118.issue15853@psf.upfronthosting.co.za> Message-ID: <1350012195.9.0.38953058731.issue15853@psf.upfronthosting.co.za> Changes by Kevin Walzer <wordtech at users.sourceforge.net>: Removed file: http://bugs.python.org/file27538/configDialog.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15853> _______________________________________ From report at bugs.python.org Fri Oct 12 05:23:56 2012 From: report at bugs.python.org (Kevin Walzer) Date: Fri, 12 Oct 2012 03:23:56 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1346632042.85.0.745944196118.issue15853@psf.upfronthosting.co.za> Message-ID: <1350012236.13.0.290554110305.issue15853@psf.upfronthosting.co.za> Changes by Kevin Walzer <wordtech at users.sourceforge.net>: Added file: http://bugs.python.org/file27539/configDialog.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15853> _______________________________________ From report at bugs.python.org Fri Oct 12 09:09:33 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 07:09:33 +0000 Subject: [issue16206] dict() docs should display multiple signatures Message-ID: <1350025773.95.0.890132868145.issue16206@psf.upfronthosting.co.za> New submission from Chris Jerdonek: The documentation for dict() (for both the built-in function and the class constructor) should display multiple signatures as do dict.__doc__ and the documentation for, say, str(). Currently, the dict() documentation just has one signature: dict([arg]) Something more in line with the docstring would be better, for example: dict(mapping={}) dict(iterable) dict(**kwargs) ---------- assignee: docs at python components: Documentation keywords: easy messages: 172718 nosy: chris.jerdonek, docs at python, ezio.melotti priority: normal severity: normal status: open title: dict() docs should display multiple signatures versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16206> _______________________________________ From report at bugs.python.org Fri Oct 12 09:12:56 2012 From: report at bugs.python.org (Ralf Schmitt) Date: Fri, 12 Oct 2012 07:12:56 +0000 Subject: [issue7735] python creates IPv6 DNS requests even when built with --disable-ipv6 In-Reply-To: <1263855099.58.0.477702556639.issue7735@psf.upfronthosting.co.za> Message-ID: <1350025976.74.0.62456231688.issue7735@psf.upfronthosting.co.za> Ralf Schmitt added the comment: It's not quite true what I wrote. Actually you get a "error: getsockaddrarg: bad family" error. But regardless of the error, there just is no need to ask for IPv6 addresses! ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue7735> _______________________________________ From report at bugs.python.org Fri Oct 12 09:22:28 2012 From: report at bugs.python.org (Ned Deily) Date: Fri, 12 Oct 2012 07:22:28 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1346632042.85.0.745944196118.issue15853@psf.upfronthosting.co.za> Message-ID: <1350026548.61.0.619834048904.issue15853@psf.upfronthosting.co.za> Changes by Ned Deily <nad at acm.org>: ---------- nosy: +serwy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15853> _______________________________________ From report at bugs.python.org Fri Oct 12 09:22:47 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 07:22:47 +0000 Subject: [issue16207] add class name to method signatures in stdtypes docs Message-ID: <1350026567.26.0.190779940356.issue16207@psf.upfronthosting.co.za> New submission from Chris Jerdonek: The method signatures for some of the classes documented in library/stdtypes lack the class name. For example, the list, dict, set, and memoryview methods lack the class name. Adding the class name will help to distinguish methods from functions. ---------- assignee: docs at python components: Documentation messages: 172720 nosy: chris.jerdonek, docs at python, ezio.melotti priority: normal severity: normal stage: needs patch status: open title: add class name to method signatures in stdtypes docs type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16207> _______________________________________ From report at bugs.python.org Fri Oct 12 09:26:20 2012 From: report at bugs.python.org (Francisco Gracia) Date: Fri, 12 Oct 2012 07:26:20 +0000 Subject: [issue14937] IDLE's deficiency in the completion of file names (Python 32, Windows XP) In-Reply-To: <1349993165.09.0.875208302206.issue14937@psf.upfronthosting.co.za> Message-ID: <CACiybx65rGJ0YcF4vxdtHm=oAr2O6-7s7PtaLL+kSa4xHhAZqA@mail.gmail.com> Francisco Gracia added the comment: In my machine with Windows XP and Python 3.3.0 both variants work, the only difference being that 'c:/ brings up the selection box authomatically and 'c:\ requieres that it be summoned with the tab key, as indicated. 2012/10/12 Terry J. Reedy <report at bugs.python.org> > > Terry J. Reedy added the comment: > > This patch (I suspect it is this one) disabled the use of '/' in filenames > on windows when using filename completion. > > 'c:\ <wait, tab, ^space bring up box> in 3.2.3 and 3.3.0> > (If there is no 'r' prefix, it really should require '\\' to be safe.) > > "c:/ ditto for 3.2.3. > In 3.3.0, (and, I presume, 3.2.4 if not changed) tab inserts spaces to > next tab stop, while ^space is ignored. > > Since using '/' is recommended over unsafe '\', this is an undesireable > regression. > > ---------- > resolution: fixed -> > stage: patch review -> needs patch > status: closed -> open > versions: +Python 3.3, Python 3.4 > > _______________________________________ > Python tracker <report at bugs.python.org> > <http://bugs.python.org/issue14937> > _______________________________________ > ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14937> _______________________________________ From report at bugs.python.org Fri Oct 12 09:32:54 2012 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 12 Oct 2012 07:32:54 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1350027174.76.0.571111526294.issue16202@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: Robert: I don't think that running scripts in /tmp is inherently unsafe. It is Python's sys.path handling which makes it unsafe. That being said, I am not against distutils being "fixed" but I do think the root issue should be fixed. And of course you're right about complicated permission checking and ACLs and what not. But I think my patch does the Right Thing in 99% of the cases, in particular for /tmp. I tried to err on the safe side. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Fri Oct 12 09:34:16 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Fri, 12 Oct 2012 07:34:16 +0000 Subject: [issue16201] socket.gethostbyname incorrectly parses ip In-Reply-To: <1349983863.01.0.255097510924.issue16201@psf.upfronthosting.co.za> Message-ID: <1350027256.04.0.313547778916.issue16201@psf.upfronthosting.co.za> Michele Orr? added the comment: > Attaching patch to trim leading and trailing whitespaces prior to > processing. Note that tests are incorrect: the parsing is of the form %d.%d.%d.%d%c, so the parser should accept trailing spaces. That's the same for ping iirc: $ ping "192.168.1.1 " PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. --- 192.168.1.1 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1007ms $ ping " 192.168.1.1" ping: unknown host 192.168.1.1 I am trying to get out with a simple parser inside the function, probabl y strtol() is the way. Since Python's C API does not provide any sscanf wrapper, I thought about adding a new one. But given that, AFAIS it appears just two times over the entire sourcecode, there is no need IMO for exporting a new one right now. What is your opinion? ---------- nosy: +ezio.melotti _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16201> _______________________________________ From report at bugs.python.org Fri Oct 12 09:39:51 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 12 Oct 2012 07:39:51 +0000 Subject: [issue16207] add class name to method signatures in stdtypes docs In-Reply-To: <1350026567.26.0.190779940356.issue16207@psf.upfronthosting.co.za> Message-ID: <1350027591.97.0.688887214655.issue16207@psf.upfronthosting.co.za> Georg Brandl added the comment: This is by design: these method descriptions are indented under their class entries; no need to repeat the class name. ---------- nosy: +georg.brandl resolution: -> works for me status: open -> pending _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16207> _______________________________________ From report at bugs.python.org Fri Oct 12 09:41:34 2012 From: report at bugs.python.org (Ned Deily) Date: Fri, 12 Oct 2012 07:41:34 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1346632042.85.0.745944196118.issue15853@psf.upfronthosting.co.za> Message-ID: <1350027694.01.0.513400722437.issue15853@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the patch, Kevin. It does need to be updated a bit for the current 2.7 branch as there have been changes since 2.7.3. Can you outline what you believe the problem is that your patch is trying to workaround? Certainly, nothing that IDLE or any other tkinter-based application does should be able to cause a hard crash in Tk. It seems very problematic to force a change to all existing versions of IDLE and require users to update their installed IDLEs just to work around a crash in the Cocoa Tk that was introduced by a specific recent checkin in Tk. Since there have been other serious bugs in Cocoa Tk that have been corrected in every recent release of Cocoa Tk, it is pretty much incumbent on users to keep up with the latest available version. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15853> _______________________________________ From report at bugs.python.org Fri Oct 12 09:44:04 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 12 Oct 2012 07:44:04 +0000 Subject: [issue7735] python creates IPv6 DNS requests even when built with --disable-ipv6 In-Reply-To: <1263855099.58.0.477702556639.issue7735@psf.upfronthosting.co.za> Message-ID: <1350027844.95.0.894798726053.issue7735@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The switch --disable-ipv6 is supported and works as intended. It is not the intention of the switch to disable AAAA lookups. Instead, it disables support for IPv6 sockets. Requesting that the switch disables any code that somehow deals with IPv6 is unreasonable - it would also affect the ipaddress module and urllib.parse. So closing this as won't fix. ---------- status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue7735> _______________________________________ From report at bugs.python.org Fri Oct 12 09:46:07 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 07:46:07 +0000 Subject: [issue16207] add class name to method signatures in stdtypes docs In-Reply-To: <1350026567.26.0.190779940356.issue16207@psf.upfronthosting.co.za> Message-ID: <1350027967.08.0.495197354261.issue16207@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I think I would be more okay with this if it weren't for the fact that some functions also appear indented under their class entries (making them look like methods). Right now, there's no visual distinction between the functions and the methods. Prefixing the methods with the class name or moving the functions above the class definition would address this. ---------- status: pending -> open _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16207> _______________________________________ From report at bugs.python.org Fri Oct 12 09:47:25 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 12 Oct 2012 07:47:25 +0000 Subject: [issue16207] add class name to method signatures in stdtypes docs In-Reply-To: <1350026567.26.0.190779940356.issue16207@psf.upfronthosting.co.za> Message-ID: <1350028045.17.0.962959205835.issue16207@psf.upfronthosting.co.za> Georg Brandl added the comment: > I think I would be more okay with this if it weren't for the fact that > some functions also appear indented under their class entries (making > them look like methods). I see, yes. In this case I agree. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16207> _______________________________________ From report at bugs.python.org Fri Oct 12 10:02:04 2012 From: report at bugs.python.org (Ralf Schmitt) Date: Fri, 12 Oct 2012 08:02:04 +0000 Subject: [issue7735] python creates IPv6 DNS requests even when built with --disable-ipv6 In-Reply-To: <1263855099.58.0.477702556639.issue7735@psf.upfronthosting.co.za> Message-ID: <1350028924.63.0.172929342737.issue7735@psf.upfronthosting.co.za> Ralf Schmitt added the comment: The switch disables support for IPv6 sockets, and since IPv6 support is disabled, there is no need to try to lookup IPv6 addresses in create_connection. They just cannot be used afterwards. I didn't request that the switch disables any code that somehow deals with IPv6. I'm just talking about that one function! You refuse to acknowledge the problem based on broken assumptions and bogus arguments. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue7735> _______________________________________ From report at bugs.python.org Fri Oct 12 10:04:15 2012 From: report at bugs.python.org (Ralf Schmitt) Date: Fri, 12 Oct 2012 08:04:15 +0000 Subject: [issue16208] getaddrinfo returns wrong results if IPv6 is disabled Message-ID: <1350029055.88.0.421531747459.issue16208@psf.upfronthosting.co.za> Changes by Ralf Schmitt <python-bugs at systemexit.de>: ---------- nosy: schmir priority: normal severity: normal status: open title: getaddrinfo returns wrong results if IPv6 is disabled _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16208> _______________________________________ From report at bugs.python.org Fri Oct 12 10:08:37 2012 From: report at bugs.python.org (Ralf Schmitt) Date: Fri, 12 Oct 2012 08:08:37 +0000 Subject: [issue16208] getaddrinfo returns wrong results if IPv6 is disabled Message-ID: <1350029317.3.0.399140827664.issue16208@psf.upfronthosting.co.za> New submission from Ralf Schmitt: I'm running the following code on python 2.7.3 on a 64 bit linux. import socket print "has_ipv6", socket.has_ipv6 res = socket.getaddrinfo("python.org", 80, socket.AF_INET6, socket.SOCK_STREAM) print "python.org is", res With IPv6 enabled, I get the following output: has_ipv6 True python.org is [(10, 1, 6, '', ('2001:888:2000:d::a2', 80, 0, 0))] With IPv6 disabled (i.e I ran ./configure --disable-ipv6), I get: has_ipv6 False python.org is [(10, 1, 6, '', (10, '\x00P\x00\x00\x00\x00 \x01\x08\x88 \x00\x00\r'))] ---------- components: +Library (Lib) type: -> behavior versions: +Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16208> _______________________________________ From report at bugs.python.org Fri Oct 12 10:12:19 2012 From: report at bugs.python.org (Ralf Schmitt) Date: Fri, 12 Oct 2012 08:12:19 +0000 Subject: [issue7735] python creates IPv6 DNS requests even when built with --disable-ipv6 In-Reply-To: <1263855099.58.0.477702556639.issue7735@psf.upfronthosting.co.za> Message-ID: <1350029539.68.0.883432353589.issue7735@psf.upfronthosting.co.za> Ralf Schmitt added the comment: btw AAAA lookups do not work if python is configured with --disable-ipv6, see http://bugs.python.org/issue16208 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue7735> _______________________________________ From report at bugs.python.org Fri Oct 12 10:13:52 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Fri, 12 Oct 2012 08:13:52 +0000 Subject: [issue16201] socket.gethostbyname incorrectly parses ip In-Reply-To: <1349983863.01.0.255097510924.issue16201@psf.upfronthosting.co.za> Message-ID: <1350029632.46.0.0978005349045.issue16201@psf.upfronthosting.co.za> Changes by Michele Orr? <maker.py at gmail.com>: Added file: http://bugs.python.org/file27540/issue16201.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16201> _______________________________________ From report at bugs.python.org Fri Oct 12 10:23:42 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 12 Oct 2012 08:23:42 +0000 Subject: [issue12268] file readline, readlines & readall methods can lose data on EINTR In-Reply-To: <1307306343.57.0.342192724444.issue12268@psf.upfronthosting.co.za> Message-ID: <1350030222.94.0.858512130192.issue12268@psf.upfronthosting.co.za> Changes by Mark Dickinson <dickinsm at gmail.com>: ---------- nosy: +mark.dickinson _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12268> _______________________________________ From report at bugs.python.org Fri Oct 12 10:37:38 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 08:37:38 +0000 Subject: [issue16207] add class name to method signatures in stdtypes docs In-Reply-To: <1350026567.26.0.190779940356.issue16207@psf.upfronthosting.co.za> Message-ID: <1350031058.29.0.511166408426.issue16207@psf.upfronthosting.co.za> Chris Jerdonek added the comment: So it looks like the class name gets stripped when rendering if you prefix the method name with the class name and the methods are nested beneath the class. So it seems like the options are to either (1) move the non-methods outside the class (e.g. before the class), or (2) clearly divide the methods and non-methods into two groups (e.g. "These are the operations..." and "These are the methods..."). I lean towards the latter. And it would be a smaller change. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16207> _______________________________________ From report at bugs.python.org Fri Oct 12 11:03:17 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 09:03:17 +0000 Subject: [issue16209] add a "class str" entry to the docs Message-ID: <1350032597.23.0.0536115574586.issue16209@psf.upfronthosting.co.za> New submission from Chris Jerdonek: This issue is to add a str class entry to the built-in types page like we have for dict, set, memoryview, etc: http://docs.python.org/dev/library/stdtypes.html This will let us reference ``str`` the class separately from ``str()`` the built-in function. It will also let us remove the "str." prefix from all of the string method descriptions. Thirdly, it will make the str documentation match what is being done for the types previous to it in the documentation, including the range, tuple, and list classes. Lastly, it will make referencing string-related sections in Sphinx a bit more intuitive. Currently, :class:`str` points to the built-in function :func:`str`. ---------- assignee: docs at python components: Documentation messages: 172733 nosy: chris.jerdonek, docs at python, ezio.melotti priority: normal severity: normal status: open title: add a "class str" entry to the docs type: enhancement versions: Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16209> _______________________________________ From report at bugs.python.org Fri Oct 12 11:05:36 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 09:05:36 +0000 Subject: [issue16207] distinguish methods from non-methods in classes in the stdtypes docs In-Reply-To: <1350026567.26.0.190779940356.issue16207@psf.upfronthosting.co.za> Message-ID: <1350032736.93.0.443950646488.issue16207@psf.upfronthosting.co.za> Changes by Chris Jerdonek <chris.jerdonek at gmail.com>: ---------- title: add class name to method signatures in stdtypes docs -> distinguish methods from non-methods in classes in the stdtypes docs _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16207> _______________________________________ From report at bugs.python.org Fri Oct 12 11:12:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 09:12:19 +0000 Subject: [issue16210] combine the two type() definitions in built-in function docs Message-ID: <1350033139.53.0.10696980819.issue16210@psf.upfronthosting.co.za> New submission from Chris Jerdonek: [Found by Ezio] The built-in function documentation has what looks like two separate definitions of the built-in function type(): http://docs.python.org/dev/library/functions.html#type These two definitions should be combined into one with a multi-line signature like we're doing for the other built-in functions. ---------- assignee: docs at python components: Documentation messages: 172734 nosy: chris.jerdonek, docs at python, ezio.melotti priority: normal severity: normal status: open title: combine the two type() definitions in built-in function docs versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16210> _______________________________________ From report at bugs.python.org Fri Oct 12 11:19:27 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 12 Oct 2012 09:19:27 +0000 Subject: [issue16210] combine the two type() definitions in built-in function docs In-Reply-To: <1350033139.53.0.10696980819.issue16210@psf.upfronthosting.co.za> Message-ID: <1350033567.67.0.203616516221.issue16210@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- stage: -> needs patch type: -> enhancement _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16210> _______________________________________ From report at bugs.python.org Fri Oct 12 11:41:02 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 12 Oct 2012 09:41:02 +0000 Subject: [issue16192] ctypes - documentation example In-Reply-To: <1349923369.86.0.516068156992.issue16192@psf.upfronthosting.co.za> Message-ID: <1350034862.93.0.44527844409.issue16192@psf.upfronthosting.co.za> Ezio Melotti added the comment: The note at the beginning could be turned in an actual note using the `.. note:` markup. This will make it more visible. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16192> _______________________________________ From report at bugs.python.org Fri Oct 12 12:02:26 2012 From: report at bugs.python.org (Volker Braun) Date: Fri, 12 Oct 2012 10:02:26 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1350036146.5.0.546026889315.issue16202@psf.upfronthosting.co.za> Volker Braun added the comment: The fact that Python's own testsuite tripped over this proves that this is subtle enough to merit some special handling. 1) It is not, and has never been, a good idea to run/compile anything off /tmp. This isn't specific to Python, it is just common sense that you don't hand over control of directory contents to others. 2) Removing /tmp from sys.path upon startup is not enough to guarantee safety. Many Python modules will happily add it back. Just as a random example, see profile.py: "sys.path.insert(0, os.path.dirname(progname))". The aim of the patch should be to warn the user of the dangers of running code in /tmp, not trying to make it safe (and, therefore, implicitly encouraging it). 3) The patch is too restrictive in my opinion, it rules out some plausible and perfectly safe use cases. For example, root owns directory and wheel owns Python script. Or sharing a group with a trusted user. Just disallowing o+w would be enough to save the unwary from executing in /tmp. ---------- nosy: +vbraun _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Fri Oct 12 12:37:30 2012 From: report at bugs.python.org (Kevin Walzer) Date: Fri, 12 Oct 2012 10:37:30 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1346632042.85.0.745944196118.issue15853@psf.upfronthosting.co.za> Message-ID: <1350038250.84.0.392940213364.issue15853@psf.upfronthosting.co.za> Kevin Walzer added the comment: The crash occurs during a "self.editFont.config" call, when the sample text in the font dialog is updated with new font properties. My changes re-structures the configure event to first create a tuple with new font properties, then apply that to the parent label widget's font. Same effect, works around the crash. My testing shows the crash occurs at the event loop level--somewhere in the event loop between Python, Tk, and Cocoa, this specific configuration causes Tk to barf and then crash. If you have followed the traffic on the event loop issues in Tk-Cocoa at SF and the Tcl-Mac list, you're aware that a) the event loop is fragile and complex and b) pretty much impossible to solve at this time because the only one who really understands it well, the original author of the code, is no longer involved with Tk development. As a result, it is often simpler to work around Tk-Cocoa event loop issues at the script level: that is what my patch does. There is little chance of solving the crash at the Tk level at this time. I don't understand what the problem with in requesting that IDLE users update their installation to get this patch; it's no different than any other bug fix. As far as making sure it works with the various releases of Python, that's work that you or another Python dev will have to do. It's a two-line fix so I doubt it will be that complicated to implement. And yes, in an ideal world, it would be better to fix Tk, but this patch solve the immediate problem because we are not able to address this issue at the Tk level at this time. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15853> _______________________________________ From report at bugs.python.org Fri Oct 12 12:38:44 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Fri, 12 Oct 2012 10:38:44 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1350038324.56.0.539319509902.issue16202@psf.upfronthosting.co.za> Changes by Hynek Schlawack <hs at ox.cx>: ---------- nosy: +hynek _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Fri Oct 12 12:52:50 2012 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 12 Oct 2012 10:52:50 +0000 Subject: [issue11009] urllib.splituser is not documented In-Reply-To: <1295987078.02.0.421774194417.issue11009@psf.upfronthosting.co.za> Message-ID: <1350039170.36.0.947638013741.issue11009@psf.upfronthosting.co.za> Vinay Sajip added the comment: Note that at least splituser is being used outside the stdlib: packaging (which was intended to be part of the stdlib) used it, and hence so do distutils2 and distlib (by sharing parts of their codebases). Of course these last two are outside the stdlib. Similar functions are reimplemented outside the stdlib (e.g. see parse_credentials in pip.download). If the only reason for not exposing these is documentation clutter, surely there are approaches to minimise this. If the reason is that future implementations may change or remove them, that should be clarified. But since the basics of an url are unlikely to change, I don't see why these functions might be removed in the future. ---------- nosy: +vinay.sajip _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11009> _______________________________________ From report at bugs.python.org Fri Oct 12 13:40:14 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 12 Oct 2012 11:40:14 +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: <1350042014.1.0.846621692995.issue16205@psf.upfronthosting.co.za> Ezio Melotti added the comment: If :class:`str` and :func:`str` point respectively to stdtypes.rst and functions.rst once a class directive is added to stdtypes.rst, then we can do that. We might than need to update a few links to use :class: instead of :func:, and possibly use :ref:`textseq` where appropriate. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16205> _______________________________________ From report at bugs.python.org Fri Oct 12 13:44:12 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 12 Oct 2012 11:44:12 +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: <1350042252.88.0.391568533016.issue16205@psf.upfronthosting.co.za> Ezio Melotti added the comment: Adding a class directive for str is tracked in #16209. ---------- dependencies: +add a "class str" entry to the docs _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16205> _______________________________________ From report at bugs.python.org Fri Oct 12 13:46:25 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 11:46:25 +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: <1350042385.17.0.86255666441.issue16205@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > If :class:`str` and :func:`str` point respectively to stdtypes.rst and functions.rst once a class directive is added to stdtypes.rst, then we can do that. I agree. I would suggest starting small by adding a stub class entry above the string methods. The class constructor could link to the built-in function str() for its definition. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16205> _______________________________________ From report at bugs.python.org Fri Oct 12 15:21:42 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 12 Oct 2012 13:21:42 +0000 Subject: [issue16191] ceval cleanup In-Reply-To: <1349913895.1.0.124857708978.issue16191@psf.upfronthosting.co.za> Message-ID: <1350048102.42.0.137108406056.issue16191@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I won't examine the patch in detail, but the cleanup is welcome and I trust you (and the test suite :-)) that it works fine. ---------- nosy: +pitrou _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16191> _______________________________________ From report at bugs.python.org Fri Oct 12 15:54:56 2012 From: report at bugs.python.org (Doug Ransom) Date: Fri, 12 Oct 2012 13:54:56 +0000 Subject: [issue16211] MacInstalls break PyDev Message-ID: <1350050095.97.0.144464091668.issue16211@psf.upfronthosting.co.za> New submission from Doug Ransom: A number of .py files are not installed in the mac installer. While python programs run OK, this thwarts users from using IDEs like Aptana Studio/PyDev. For those of us who are python dabblers, this makes it nearly impossible to write/debug python code. urllib.py is an example. Here is the note from PyDev which works with Aptana Studio http://pydev.org/manual_101_interpreter.html (though installing python as they discuss doesn't fix the problem, and the /lib folder thing is probably beyond most of us to figure out): "IMPORTANT for Mac users: The Python version that usually ships with Mac doesn't seem to have the .py source files available, which are required for PyDev, so, using a different interpreter is recommended (i.e.: Download it from http://python.org). If you don't want to use a different interpreter, get the source files for the Python '/Lib' folder and add those to the system installation. After those steps, you should have a screen as presented below:..." How about changing the install so IDEs like pydev, for all versions? A few extra bytes of disk space probably won't harm anything. ---------- assignee: ronaldoussoren components: Macintosh messages: 172743 nosy: Doug.Ransom, ronaldoussoren priority: normal severity: normal status: open title: MacInstalls break PyDev versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16211> _______________________________________ From report at bugs.python.org Fri Oct 12 16:00:36 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 12 Oct 2012 14:00:36 +0000 Subject: [issue16211] MacInstalls break PyDev In-Reply-To: <1350050095.97.0.144464091668.issue16211@psf.upfronthosting.co.za> Message-ID: <1350050436.35.0.54609919242.issue16211@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The binary installers for OSX do install all of the std library, and AFAIK the same is true for the version of python that ships with the OS. Please explains how to reproduce the problem you are having: * What release of OSX * Which python version (/usr/bin/python, binary installer from www.python.org (and if so which one))? * How can I verify that the problem is present? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16211> _______________________________________ From report at bugs.python.org Fri Oct 12 16:04:23 2012 From: report at bugs.python.org (Vladimir Ushakov) Date: Fri, 12 Oct 2012 14:04:23 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file Message-ID: <1350050663.98.0.0365442687476.issue16212@psf.upfronthosting.co.za> New submission from Vladimir Ushakov: The following code crashes the interpreter on Linux: #!/usr/bin/python3 import mmap with open('test', 'wb') as f: f.write(bytes(1)) with open('test', 'r+b') as f: m = mmap.mmap(f.fileno(), 0) f.truncate() a = m[:] --- It's not specific to the zero size truncation, it's enough if the file size decreases beyond a page border. ---------- components: IO messages: 172745 nosy: Vladimir.Ushakov priority: normal severity: normal status: open title: mmap() dumps core upon resizing the underlying file type: crash versions: Python 3.2 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16212> _______________________________________ From report at bugs.python.org Fri Oct 12 16:13:27 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Oct 2012 14:13:27 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350050663.98.0.0365442687476.issue16212@psf.upfronthosting.co.za> Message-ID: <1350051207.7.0.614299698271.issue16212@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm able to reproduce the bug. Here is a stack trace: #0 0x00000000005a650d in PyBytes_FromStringAndSize (str=0x7f44c127a000 <Address 0x7f44c127a000 out of bounds>, size=1) at Objects/bytesobject.c:82 82 (op = characters[*str & UCHAR_MAX]) != NULL) (gdb) bt #0 0x00000000005a650d in PyBytes_FromStringAndSize (str=0x7f44c127a000 <Address 0x7f44c127a000 out of bounds>, size=1) at Objects/bytesobject.c:82 #1 0x00007f44bf7c11b2 in mmap_subscript (self=0x7f44bf9ca350, item=<slice at remote 0x7f44c1168618>) at /home/heimes/dev/python/cpython/Modules/mmapmodule.c:799 #2 0x0000000000590863 in PyObject_GetItem (o=<mmap.mmap at remote 0x7f44bf9ca350>, key=<slice at remote 0x7f44c1168618>) at Objects/abstract.c:143 ---------- nosy: +christian.heimes stage: -> needs patch versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16212> _______________________________________ From report at bugs.python.org Fri Oct 12 16:15:36 2012 From: report at bugs.python.org (Mike Hoy) Date: Fri, 12 Oct 2012 14:15:36 +0000 Subject: [issue13440] Explain the "status quo wins a stalemate" principle in the devguide In-Reply-To: <1321833284.75.0.438515825131.issue13440@psf.upfronthosting.co.za> Message-ID: <1350051336.44.0.00969474544369.issue13440@psf.upfronthosting.co.za> Mike Hoy added the comment: Patch affects faq.rst/index.rst. In faq I put the two links along with some text as Chris suggested. In index I changed resources to Additional Resources and split up the old 'Resources' into 'Additional Resources/Essential Reading'. Feedback appreciated I will incorporate any new ideas into a version 2 and so forth until issue resolved. ---------- keywords: +patch Added file: http://bugs.python.org/file27541/issue13440_v1.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13440> _______________________________________ From report at bugs.python.org Fri Oct 12 16:42:29 2012 From: report at bugs.python.org (Ned Deily) Date: Fri, 12 Oct 2012 14:42:29 +0000 Subject: [issue16211] MacInstalls break PyDev In-Reply-To: <1350050095.97.0.144464091668.issue16211@psf.upfronthosting.co.za> Message-ID: <1350052949.91.0.278389623734.issue16211@psf.upfronthosting.co.za> Ned Deily added the comment: In current OS X releases, it is true that the system Pythons as shipped by Apple do not include the .py files in /System/Library/Frameworks/Python.framework; only .pyc and .pyo files are present. However, those .py files are added when you install the "Command Line Tools" component of Xcode 4. So, either do that or install another version of python, like from python.org. In any case, the behavior is under the control of Apple and OS X, not Python. ---------- nosy: +ned.deily resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16211> _______________________________________ From report at bugs.python.org Fri Oct 12 16:52:10 2012 From: report at bugs.python.org (samwyse) Date: Fri, 12 Oct 2012 14:52:10 +0000 Subject: [issue15350] {urllib,urllib.parse}.urlencode.__doc__ is unclear In-Reply-To: <1348831121.83.0.149552352795.issue15350@psf.upfronthosting.co.za> Message-ID: <CAJzXf3heDGq5PLtQbsjh6Mrc7K_ZmQFJhMMp0f=8cEs5tZWWvQ@mail.gmail.com> samwyse added the comment: Look good. I'd fix the last line, however: "sent the quote_plus" -> "sent to the quote_plus function", maybe. On Fri, Sep 28, 2012 at 6:18 AM, Brian Brazil <report at bugs.python.org> wrote: > > Brian Brazil added the comment: > > How does the attached patch look? > > I also reworded the first line to be a bit clearer, and be under 80 chars. > > ---------- > keywords: +patch > nosy: +bbrazil > Added file: http://bugs.python.org/file27329/issue15350.patch > > _______________________________________ > Python tracker <report at bugs.python.org> > <http://bugs.python.org/issue15350> > _______________________________________ ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15350> _______________________________________ From report at bugs.python.org Fri Oct 12 17:08:31 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Oct 2012 15:08:31 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1350054511.3.0.38637901948.issue16202@psf.upfronthosting.co.za> Christian Heimes added the comment: Robert Bradshaw's idea is the only feasible option for Python 2.7 or any other version except for 3.4dev. Your suggested modification to sys.path is out of option as it would create a backwards incompatibility with existing software. I'm adding 2.6 to 3.4 as all versions of Python are affected. ---------- stage: -> needs patch versions: +Python 2.6, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Fri Oct 12 17:13:35 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Oct 2012 15:13:35 +0000 Subject: [issue16213] Expose private functions in marshal used by importlib Message-ID: <1350054815.58.0.751298087125.issue16213@psf.upfronthosting.co.za> New submission from Brett Cannon: IOW make _w_long, _r_long, and __fix_co_filename public so as to not be some special ability that only importlib has. ---------- components: Library (Lib) messages: 172751 nosy: brett.cannon priority: normal severity: normal stage: needs patch status: open title: Expose private functions in marshal used by importlib type: enhancement versions: Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16213> _______________________________________ From report at bugs.python.org Fri Oct 12 17:35:03 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Oct 2012 15:35:03 +0000 Subject: [issue16191] ceval cleanup In-Reply-To: <1349913895.1.0.124857708978.issue16191@psf.upfronthosting.co.za> Message-ID: <3XdY5L1Vv8zR1L@mail.python.org> Roundup Robot added the comment: New changeset ac30a1b1cf17 by Benjamin Peterson in branch 'default': ceval cleanup http://hg.python.org/cpython/rev/ac30a1b1cf17 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16191> _______________________________________ From report at bugs.python.org Fri Oct 12 17:42:18 2012 From: report at bugs.python.org (Roger Serwy) Date: Fri, 12 Oct 2012 15:42:18 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1346632042.85.0.745944196118.issue15853@psf.upfronthosting.co.za> Message-ID: <1350056538.52.0.0941929617087.issue15853@psf.upfronthosting.co.za> Roger Serwy added the comment: It appears that Kevin's patch is working around a bug in Tkinter's tkFont object configuration. I would suggest removing the editFont object entirely from configDialog if it is truly the root cause of Tk crashing. Kevin, is the .textHighlightSample causing the crash or is the editFont.config line causing the crash? Setting the font in the Fonts/Tab pane should also change the font in the Highlighting pane. This is part of issue14876. Would the following still work on your version of IDLE? newFont = (fontName, self.fontSize.get(), fontWeight) self.labelFontSample.config(font = newFont) self.textHighlightSample.configure(font=newFont) Also, since this is a problem with Tk itself, can the crashing behavior be isolated into a small test script? I don't have a Mac to test with. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15853> _______________________________________ From report at bugs.python.org Fri Oct 12 18:00:02 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 12 Oct 2012 16:00:02 +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: <1350057602.24.0.421532712839.issue16213@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Why is it a problem for importlib to use internal APIs? I don't think support these low-level APIs as public helps anyone. ---------- nosy: +pitrou _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16213> _______________________________________ From report at bugs.python.org Fri Oct 12 18:03:56 2012 From: report at bugs.python.org (Robert Bradshaw) Date: Fri, 12 Oct 2012 16:03:56 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1350057836.11.0.173007268342.issue16202@psf.upfronthosting.co.za> Robert Bradshaw added the comment: Here's a fix to distutils. I think at least a warning is in order for running scripts from insecure directories, and ideally some happy medium can be found. ---------- Added file: http://bugs.python.org/file27542/fix_distutils.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Fri Oct 12 18:13:56 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Oct 2012 16:13:56 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1350058436.61.0.346426493099.issue16202@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm all in favor for the proposal to add a warning when the script is in a world-writable directory. But any modification can't be added to stable version as it's a new feature. Robert, you have to cleanup and remove the directory manually at the end of the block. mkdtemp() creates the directory but doesn't do house keeping. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Fri Oct 12 18:23:49 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Oct 2012 16:23:49 +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: <1350059029.57.0.877631995999.issue16213@psf.upfronthosting.co.za> Brett Cannon added the comment: Well, it means importlib becomes a special library and that no one could ever replicate it as a third-party library. Now if we can expose the various APIs around this such that they are abstracted away then it isn't a big deal. That can be done for the _r_long and _w_long, but _fix_co_filename is still a rather special thing. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16213> _______________________________________ From report at bugs.python.org Fri Oct 12 18:27:18 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 12 Oct 2012 16:27:18 +0000 Subject: [issue16213] Expose private functions in marshal used by importlib In-Reply-To: <1350059029.57.0.877631995999.issue16213@psf.upfronthosting.co.za> Message-ID: <1350059142.3322.2.camel@localhost.localdomain> Antoine Pitrou added the comment: Le vendredi 12 octobre 2012 ? 16:23 +0000, Brett Cannon a ?crit : > Well, it means importlib becomes a special library and that no one > could ever replicate it as a third-party library. Well, it *is* a special library. It is tightly integrated with the interpreter core, and it provides a fundamental service in the language. Besides, since the pyc format is an implementation detail, I don't see how exposing r_long, w_long and friends would help third-party libraries, which would still have to rely on non-public details. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16213> _______________________________________ From report at bugs.python.org Fri Oct 12 18:30:43 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 12 Oct 2012 16:30:43 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350050663.98.0.0365442687476.issue16212@psf.upfronthosting.co.za> Message-ID: <1350059443.96.0.681059893632.issue16212@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: That's normal. You're truncating the file after having it mapped, so touching the pages corresponding to the truncated part of the file will result in a segfault. See mmap's man page: """ Use of a mapped region can result in these signals: SIGBUS Attempted access to a portion of the buffer that does not correspond to the file (for example, beyond the end of the file, including the case where another process has truncated the file). """ The only way to guard against it would be to call fstat() in every buffer-protocol method in case of file-backed mapping to check against the current file size, but that would be awfully slow in case of sequential access (just imagine performing an md5sum of an mmap-ed file). ---------- nosy: +neologix _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16212> _______________________________________ From report at bugs.python.org Fri Oct 12 18:33:35 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Oct 2012 16:33:35 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350050663.98.0.0365442687476.issue16212@psf.upfronthosting.co.za> Message-ID: <1350059615.66.0.523740464466.issue16212@psf.upfronthosting.co.za> Christian Heimes added the comment: The fstat() check isn't bullet proof, too. It has a race condition as another process could truncate the file between the fstat() check and the code lines that access the mmapped file. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16212> _______________________________________ From report at bugs.python.org Fri Oct 12 18:42:29 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 12 Oct 2012 16:42:29 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350050663.98.0.0365442687476.issue16212@psf.upfronthosting.co.za> Message-ID: <1350060149.93.0.684353550974.issue16212@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: No, it's not. That's why I think there's nothing that can be done. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16212> _______________________________________ From report at bugs.python.org Fri Oct 12 18:54:45 2012 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 12 Oct 2012 16:54:45 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1350060885.4.0.595218837503.issue16202@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: If you don't plan any further Python-2 releases, it would be pity that this cannot be fixed. If you do plan a further Python-2 release, I find backwards compatibility a poor excuse. I'm not saying that backwards compatibility should be totally ignored, but it certainly should not trump everything either, especially for security issues. I carefully designed my patch to have no impact for most existing secure setups (but as I said, I'm open for improvements). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Fri Oct 12 19:00:29 2012 From: report at bugs.python.org (Dave Malcolm) Date: Fri, 12 Oct 2012 17:00:29 +0000 Subject: [issue16191] ceval cleanup In-Reply-To: <1349913895.1.0.124857708978.issue16191@psf.upfronthosting.co.za> Message-ID: <1350061229.16.0.94258690868.issue16191@psf.upfronthosting.co.za> Changes by Dave Malcolm <dmalcolm at redhat.com>: ---------- nosy: +dmalcolm _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16191> _______________________________________ From report at bugs.python.org Fri Oct 12 19:02:52 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Oct 2012 17:02:52 +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: <1350061372.35.0.308906249083.issue16213@psf.upfronthosting.co.za> Brett Cannon added the comment: http://bugs.python.org/issue15031 would deal with not needing to expose _r_long and _w_long, but that still means people are screwed for _fix_co_filename. You could argue that is a margin use-case, though. ---------- dependencies: +Split .pyc parsing from module loading _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16213> _______________________________________ From report at bugs.python.org Fri Oct 12 19:15:13 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Oct 2012 17:15:13 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1350062113.72.0.0771533118629.issue16202@psf.upfronthosting.co.za> Christian Heimes added the comment: Ultimately it's Benjamin's and Georg's decision. They are the release managers of 2.7 to 3.3 and need to come to an agreement. You have to convince them that the proposed security restriction is worth the risk of breaking 3rd party software. It would help if you describe the circumstances under which your patch doesn't add the module's path to sys.path. ---------- nosy: +benjamin.peterson, georg.brandl _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Fri Oct 12 19:56:12 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Fri, 12 Oct 2012 17:56:12 +0000 Subject: [issue15936] Add link from os.urandom to random.SystemRandom In-Reply-To: <1347487742.57.0.57747338883.issue15936@psf.upfronthosting.co.za> Message-ID: <1350064572.71.0.325704214162.issue15936@psf.upfronthosting.co.za> Changes by Petri Lehtinen <petri at digip.org>: ---------- keywords: +easy stage: -> needs patch versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15936> _______________________________________ From report at bugs.python.org Fri Oct 12 20:00:45 2012 From: report at bugs.python.org (Vladimir Ushakov) Date: Fri, 12 Oct 2012 18:00:45 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350050663.98.0.0365442687476.issue16212@psf.upfronthosting.co.za> Message-ID: <1350064845.28.0.11889976216.issue16212@psf.upfronthosting.co.za> Vladimir Ushakov added the comment: I think, handling the signal would do. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16212> _______________________________________ From report at bugs.python.org Fri Oct 12 20:08:40 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 12 Oct 2012 18:08:40 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1350065320.56.0.76623261898.issue16202@psf.upfronthosting.co.za> Benjamin Peterson added the comment: disutils should definitely be fixed. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Fri Oct 12 20:12:30 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Fri, 12 Oct 2012 18:12:30 +0000 Subject: [issue15472] Itertools doc summary table misdocuments some arguments In-Reply-To: <1343413434.71.0.36910737273.issue15472@psf.upfronthosting.co.za> Message-ID: <1350065550.05.0.215937250705.issue15472@psf.upfronthosting.co.za> Petri Lehtinen added the comment: cycle() doesn't use seq, but p (p0, p1, ...). Others use seq (seq[0], seq[1], ...). How do you think these should be changed? ---------- nosy: +petri.lehtinen _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15472> _______________________________________ From report at bugs.python.org Fri Oct 12 20:36:44 2012 From: report at bugs.python.org (Robert Bradshaw) Date: Fri, 12 Oct 2012 18:36:44 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1350067004.7.0.667164708914.issue16202@psf.upfronthosting.co.za> Robert Bradshaw added the comment: Good point about cleanup, patch updated. ---------- Added file: http://bugs.python.org/file27543/fix_distutils.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Fri Oct 12 20:39:14 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2012 18:39:14 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <CAMpsgwb-cGFdxLM8b_riX+4_ZU1U_4e2WhEtXJnkUwcpA91WbQ@mail.gmail.com> Message-ID: <201210122138.51238.storchaka@gmail.com> Serhiy Storchaka added the comment: > The patch should be completed to optimize also other Unicode kinds. I'm working on it. Here are benchmark scripts which I use. First tests regular strings (replace every n-th char), second tests random strings (replace 1/n of total randomly distributed chars). ---------- Added file: http://bugs.python.org/file27544/replacebench.py Added file: http://bugs.python.org/file27545/replacebench2.py _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16061> _______________________________________ -------------- next part -------------- import timeit, gc, sys size = 100000 repeats = 10 numbers = 100 gc.disable() def bench(a, b, c): for i in list(range(1, 11)) + [20, 50, 100, 1000, 10000]: string = (c * (i - 1) + a) * (size // i) string += c * (size - len(string)) gc.collect() best = min(timeit.Timer("text.replace(a, b)", "a=%r; b=%r; text=%r" % (a, b, string) ).repeat(repeats, numbers)) print('%.0f\t%d %a %a %a' % (best *1e6 / numbers, i, a, b, c)) sys.stdout.flush() bench('a', 'b', 'c') bench('\u010a', '\u010b', '\u010c') bench('\U0001000a', '\U0001000b', '\U0001000c') -------------- next part -------------- import timeit, gc, random, sys size = 100000 repeats = 5 numbers = 100 gc.disable() def bench(a, b, c): for i in list(range(1, 11)) + [20, 50, 100, 1000, 10000]: data = list(a * (size // i) + c * (size - size // i)) random.shuffle(data) string = ''.join(data) gc.collect() best = min(timeit.Timer("text.replace(a, b)", "a=%r; b=%r; text=%r" % (a, b, string) ).repeat(repeats, numbers)) print('%.0f\t%d %a %a %a' % (best *1e6 / numbers, i, a, b, c)) sys.stdout.flush() bench('a', 'b', 'c') bench('\u010a', '\u010b', '\u010c') bench('\U0001000a', '\U0001000b', '\U0001000c') From report at bugs.python.org Fri Oct 12 20:44:50 2012 From: report at bugs.python.org (Chris Mayo) Date: Fri, 12 Oct 2012 18:44:50 +0000 Subject: [issue16214] 2to3 does not remove exceptions import Message-ID: <1350067490.94.0.738974146357.issue16214@psf.upfronthosting.co.za> New submission from Chris Mayo: Create file a.py: #!/usr/bin/python import exceptions and run: 2to3 a.py ... RefactoringTool: No files need to be modified. Issue 2350 is marked as closed but this is still present for me in 2to3 of Python 2.7, 3.2 and 3.3. ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 172770 nosy: cjmayo priority: normal severity: normal status: open title: 2to3 does not remove exceptions import versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16214> _______________________________________ From report at bugs.python.org Fri Oct 12 21:19:07 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 12 Oct 2012 19:19:07 +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: <1350069547.21.0.650704247739.issue16213@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I don't understand this issue at all: a) _bootstrap does not currently use any private API of marshal. Instead, it has functions _w_long and _r_long implemented in pure Python. So where is the special functionality that only importlib has? Anybody could easily replicate these functions. b) Isn't it easy to implement it as such: def _w_long(x): return x.to_bytes(4, 'little') As for fix_co_filename, I think it would indeed be useful if marshal.load(s) supported an optional filename= parameter, which then fills rf.current_filename. It's better to load it into the correct form in the first place instead of fixing it after loading completed - in particular since marshal already has a mechanism to update all filenames. ---------- nosy: +loewis _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16213> _______________________________________ From report at bugs.python.org Fri Oct 12 21:31:04 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 12 Oct 2012 19:31:04 +0000 Subject: [issue2350] 'exceptions' import fixer In-Reply-To: <1205781728.94.0.172904523331.issue2350@psf.upfronthosting.co.za> Message-ID: <1350070264.18.0.418981822853.issue2350@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Brett: Why did you close the issue? Benjamin's change was never committed... ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue2350> _______________________________________ From report at bugs.python.org Fri Oct 12 21:39:02 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Oct 2012 19:39:02 +0000 Subject: [issue2350] 'exceptions' import fixer In-Reply-To: <1205781728.94.0.172904523331.issue2350@psf.upfronthosting.co.za> Message-ID: <1350070742.39.0.278470947097.issue2350@psf.upfronthosting.co.za> Brett Cannon added the comment: I don't remember. ---------- resolution: fixed -> stage: -> patch review status: closed -> open _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue2350> _______________________________________ From report at bugs.python.org Fri Oct 12 21:40:24 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Oct 2012 19:40:24 +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: <1350070824.66.0.191179101202.issue16213@psf.upfronthosting.co.za> Brett Cannon added the comment: _w_long and _r_long originally came from marshal; forgot I re-implemented them in pure Python in the end. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16213> _______________________________________ From report at bugs.python.org Fri Oct 12 21:45:41 2012 From: report at bugs.python.org (Matthew Barnett) Date: Fri, 12 Oct 2012 19:45:41 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1350071141.83.0.637701466962.issue16203@psf.upfronthosting.co.za> Matthew Barnett added the comment: '$' will match at the end of the string or just before the final '\n': >>> re.match(r'abc$', 'abc\n') <_sre.SRE_Match object at 0x00F15448> So shouldn't you be using r'\Z' instead? >>> re.match(r'abc\Z', 'abc') <_sre.SRE_Match object at 0x00F15410> >>> re.match(r'abc\Z', 'abc\n') >>> And what happens if the MULTILINE flag is turned on? >>> re.match(r'abc$', 'abc\ndef', flags=re.MULTILINE) <_sre.SRE_Match object at 0x00F15448> >>> re.match(r'abc\Z', 'abc\ndef', flags=re.MULTILINE) >>> ---------- nosy: +mrabarnett _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16203> _______________________________________ From report at bugs.python.org Fri Oct 12 21:49:54 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 12 Oct 2012 19:49:54 +0000 Subject: [issue16206] dict() docs should display multiple signatures In-Reply-To: <1350025773.95.0.890132868145.issue16206@psf.upfronthosting.co.za> Message-ID: <1350071394.79.0.37568641282.issue16206@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching proposed patch. ---------- keywords: +patch Added file: http://bugs.python.org/file27546/issue-16206-1-default.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16206> _______________________________________ From report at bugs.python.org Fri Oct 12 22:02:20 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Oct 2012 20:02:20 +0000 Subject: [issue12268] file readline, readlines & readall methods can lose data on EINTR In-Reply-To: <1307306343.57.0.342192724444.issue12268@psf.upfronthosting.co.za> Message-ID: <3Xdg1l4bQGzR58@mail.python.org> Roundup Robot added the comment: New changeset 751a91e332d9 by Gregory P. Smith in branch '2.7': Fixes Issue #12268 for the io module - File readline, readlines and http://hg.python.org/cpython/rev/751a91e332d9 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12268> _______________________________________ From report at bugs.python.org Fri Oct 12 22:33:15 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Oct 2012 20:33:15 +0000 Subject: [issue16210] combine the two type() definitions in built-in function docs In-Reply-To: <1350033139.53.0.10696980819.issue16210@psf.upfronthosting.co.za> Message-ID: <1350073995.97.0.688286768404.issue16210@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In other words, change ''' type(object) Return the type of an object. ... ... With three arguments, type() functions as a constructor as detailed below. type(name, bases, dict) Return a new type object.... ''' to something like ''' type(object) type(name, bases, dict) With one argument, return the type of an object. ... With three arguments, return a new type object. ... ''' Now that we are using double headers elsewhere, I agree we should do so here also. ---------- nosy: +terry.reedy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16210> _______________________________________ From report at bugs.python.org Fri Oct 12 23:00:59 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Oct 2012 21:00:59 +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: <1350075659.45.0.134337308266.issue16213@psf.upfronthosting.co.za> Terry J. Reedy added the comment: marshal currently has a simple, coherent, high-level interface: dump and load serializations. _fix_co_filename sounds a bit hackish and ad hoc. Martin's suggestion looks to me like a better way to publicly expose filename setting. Making a function public indefinitely freezes the api and behavior, so we need to consider if we might want to change it. If Martin is correct as to the definition of _w_long, its a trivial one line convenience function that is not particularly specific to marshal and that could have been inlined in the code (and for all I know, is, when C compiled). Its existence in marshal really seems to me like an implementation detail that should remain private. ---------- nosy: +terry.reedy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16213> _______________________________________ From report at bugs.python.org Fri Oct 12 23:05:02 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 12 Oct 2012 21:05:02 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <1348761787.62.0.977797373088.issue16061@psf.upfronthosting.co.za> Message-ID: <1350075902.81.0.591467456538.issue16061@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The performance numbers are very nice, but the patch needs a comment about the optimization, IMO. ---------- nosy: +pitrou _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16061> _______________________________________ From report at bugs.python.org Fri Oct 12 23:06:43 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 12 Oct 2012 21:06:43 +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: <1350076003.78.0.646789699493.issue16213@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > As for fix_co_filename, I think it would indeed be useful if > marshal.load(s) supported an optional filename= parameter, which then > fills rf.current_filename. AFAIR, the problem is that you first need to import the locale module (and its dependencies) before you can decide what the filesystem encoding is. Until that, you aren't sure the filenames have been decoded correctly. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16213> _______________________________________ From report at bugs.python.org Fri Oct 12 23:19:28 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 12 Oct 2012 21:19:28 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350064845.28.0.11889976216.issue16212@psf.upfronthosting.co.za> Message-ID: <CAH_1eM1APNaEHJ96+nMQ0BhRFb33U68oZY50TBgjHvuktDs_EQ@mail.gmail.com> Charles-Fran?ois Natali added the comment: > I think, handling the signal would do. You can't. Handling a signal like SIGSEGV or SIGBUS in any other way that exiting the process will result in an infinite loop (as soon as the signal handler returns the faulty instruction will be re-executed). Well, there are some higly non-portable ways to try to escape this (see http://stackoverflow.com/questions/2663456/write-a-signal-handler-to-catch-sigsegv), but it won't fly in our case. You may want to have a look at the faulthandler module for "graceful" shutdown, but nothing can't be done. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16212> _______________________________________ From report at bugs.python.org Fri Oct 12 23:29:33 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Oct 2012 21:29:33 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350050663.98.0.0365442687476.issue16212@psf.upfronthosting.co.za> Message-ID: <1350077373.37.0.601049390704.issue16212@psf.upfronthosting.co.za> STINNER Victor added the comment: "Well, there are some higly non-portable ways to try to escape this (see http://stackoverflow.com/questions/2663456/write-a-signal-handler-to-catch-sigsegv), but it won't fly in our case." There is also the libsigsegv library, but it's hard and unsafe to handle such low level signals in Python. http://www.gnu.org/software/libsigsegv/ "It has a race condition as another process could truncate the file between the fstat() check and the code lines that access the mmapped file." You can use file locks to be protected against such race condition. See for example: http://pypi.python.org/pypi/lockfile ---------- nosy: +haypo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16212> _______________________________________ From report at bugs.python.org Fri Oct 12 23:34:55 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Oct 2012 21:34:55 +0000 Subject: [issue12268] file readline, readlines & readall methods can lose data on EINTR In-Reply-To: <1307306343.57.0.342192724444.issue12268@psf.upfronthosting.co.za> Message-ID: <1350077695.97.0.615761236248.issue12268@psf.upfronthosting.co.za> Changes by STINNER Victor <victor.stinner at gmail.com>: ---------- nosy: +haypo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12268> _______________________________________ From report at bugs.python.org Fri Oct 12 23:35:59 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Oct 2012 21:35:59 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1350077759.73.0.132939697384.issue16202@psf.upfronthosting.co.za> Changes by STINNER Victor <victor.stinner at gmail.com>: ---------- nosy: +haypo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Fri Oct 12 23:42:00 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Oct 2012 21:42:00 +0000 Subject: [issue16208] getaddrinfo returns wrong results if IPv6 is disabled In-Reply-To: <1350029317.3.0.399140827664.issue16208@psf.upfronthosting.co.za> Message-ID: <1350078120.04.0.870494667154.issue16208@psf.upfronthosting.co.za> STINNER Victor added the comment: > getaddrinfo returns wrong results if IPv6 is disabled If IPv6 support is disabled, Python is unable to decode an IPv6 address. So don't ask for IPv6 addresses if you disabled IPv6 support. I don't understand this issue. ---------- nosy: +haypo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16208> _______________________________________ From report at bugs.python.org Fri Oct 12 23:46:07 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 12 Oct 2012 21:46:07 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350050663.98.0.0365442687476.issue16212@psf.upfronthosting.co.za> Message-ID: <1350078367.04.0.11375281248.issue16212@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > You can use file locks to be protected against such race condition. > See for example: Those are advisory locks, not mandatory locks. It's possible to do some mandatory locking on some systems, but on every file, and it's not portable. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16212> _______________________________________ From report at bugs.python.org Fri Oct 12 23:58:03 2012 From: report at bugs.python.org (Ralf Schmitt) Date: Fri, 12 Oct 2012 21:58:03 +0000 Subject: [issue16208] getaddrinfo returns wrong results if IPv6 is disabled In-Reply-To: <1350029317.3.0.399140827664.issue16208@psf.upfronthosting.co.za> Message-ID: <1350079083.04.0.782517137087.issue16208@psf.upfronthosting.co.za> Ralf Schmitt added the comment: Thanks for looking at this. loewis told me in http://bugs.python.org/issue7735#msg172726 the following: """The switch --disable-ipv6 is supported and works as intended. It is not the intention of the switch to disable AAAA lookups. Instead, it disables support for IPv6 sockets.""" So, I expected it to work. Can you please take a look at the issue 7735? loewis closed this as wontfix. And my argumentation actually involves "don't ask for IPv6 addresses if you disabled IPv6 support". Anyway, I still think those bogus addresses should be filtered from the getaddrinfo result (if they can't be made correct). Note that you'll also get bogus results from this call when not explicitly asking for IPv6 addresses (e.g. passing socket.AF_UNSPEC as the third argument). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16208> _______________________________________ From report at bugs.python.org Fri Oct 12 23:59:41 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Oct 2012 21:59:41 +0000 Subject: [issue16201] socket.gethostbyname incorrectly parses ip In-Reply-To: <1349983863.01.0.255097510924.issue16201@psf.upfronthosting.co.za> Message-ID: <1350079181.53.0.65104086427.issue16201@psf.upfronthosting.co.za> STINNER Victor added the comment: > Buggy due to the use of scanf at Modueles/socketmodule.c:868 I don't think so. The following test fails because sscanf() returns 5 instead of 4: if (sscanf(name, "%d.%d.%d.%d%c", &d1, &d2, &d3, &d4, &ch) == 4 && ...) So '192.168.1.1 ' is passed to getaddrinfo(). If you consider that '192.168.1.1 ' is an invalid name, you should report the issue to the vendor of the C library of your OS. -- On Linux, the "issue" is also present in inet_ntoa(): $ python Python 2.7.3 (default, Jul 24 2012, 11:41:40) [GCC 4.6.3 20120306 (Red Hat 4.6.3-2)] on linux2 >>> import ctypes >>> buffer=ctypes.create_string_buffer(128) >>> libc=ctypes.cdll.LoadLibrary("libc.so.6") >>> libc.inet_aton(b"127.0.0.1", ctypes.byref(buffer)) 1 >>> buffer.raw[:4] '\x7f\x00\x00\x01' >>> libc.inet_aton(b"127.0.0.2 ", ctypes.byref(buffer)) 1 >>> buffer.raw[:4] '\x7f\x00\x00\x02' The source code of the inet_aton() function of the GNU libc: http://sourceware.org/git/?p=glibc.git;a=blob;f=resolv/inet_addr.c;h=144b87a74c1aef62779862e78e5f87e18e66ee9e;hb=HEAD#l108 Website of the GNU libc: http://www.gnu.org/software/libc/ ---------- nosy: +haypo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16201> _______________________________________ From report at bugs.python.org Sat Oct 13 00:15:42 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Oct 2012 22:15:42 +0000 Subject: [issue16086] tp_flags: Undefined behaviour with 32 bits long In-Reply-To: <1348934655.6.0.704339106877.issue16086@psf.upfronthosting.co.za> Message-ID: <1350080142.97.0.158565952243.issue16086@psf.upfronthosting.co.za> STINNER Victor added the comment: Can anyone review my new patch, unsigned_tp_flags-2.patch? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16086> _______________________________________ From report at bugs.python.org Sat Oct 13 00:33:51 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 12 Oct 2012 22:33:51 +0000 Subject: [issue16213] Expose private functions in marshal used by importlib In-Reply-To: <1350076003.78.0.646789699493.issue16213@psf.upfronthosting.co.za> Message-ID: <20121013003351.Horde.7c3Rd9jz9kRQeJrPPBYn-HA@webmail.df.eu> Martin v. L?wis added the comment: > AFAIR, the problem is that you first need to import the locale > module (and its dependencies) before you can decide what the > filesystem encoding is. I don't think this is true. The file system encoding works fine all along, and also doesn't have to do much with co_filename. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16213> _______________________________________ From report at bugs.python.org Sat Oct 13 00:33:52 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2012 22:33:52 +0000 Subject: [issue16215] Possible double memory free in str.replace Message-ID: <1350081232.49.0.0151935995631.issue16215@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: In the function replace() in the file Objects/unicodeobject.c possible double free memory pointed by buf1. release1 indicates if memory was allocated and deallocation needed. However there are places where memory temporary deallocated but flag was not cleared. ---------- components: Interpreter Core files: dbl_mem_free.patch keywords: 3.3regression, patch messages: 172790 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Possible double memory free in str.replace versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27547/dbl_mem_free.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16215> _______________________________________ From report at bugs.python.org Sat Oct 13 00:45:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2012 22:45:08 +0000 Subject: [issue16216] Arithmetic operations with NULL Message-ID: <1350081908.35.0.947627906901.issue16216@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: In the function STRINGLIB(fastsearch_memchr_1char) in the file Objects/stringlib/fastsearch.h NULL returned by memchr/memrchr casted to intptr_t, then some arithmetic operations performed on this integer, and result casted back to pointer. I think it is unsafe to do with NULL. The code is easy to rewrite in order to avoid such a questionable operations. ---------- components: Interpreter Core files: null_align.patch keywords: 3.3regression, patch messages: 172791 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Arithmetic operations with NULL versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27548/null_align.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16216> _______________________________________ From report at bugs.python.org Sat Oct 13 01:47:29 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Oct 2012 23:47:29 +0000 Subject: [issue16216] Arithmetic operations with NULL In-Reply-To: <1350081908.35.0.947627906901.issue16216@psf.upfronthosting.co.za> Message-ID: <1350085649.53.0.567465983475.issue16216@psf.upfronthosting.co.za> STINNER Victor added the comment: > I think it is unsafe to do with NULL. Could you please elaborate? ---------- nosy: +haypo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16216> _______________________________________ From report at bugs.python.org Sat Oct 13 02:37:17 2012 From: report at bugs.python.org (Doug Ransom) Date: Sat, 13 Oct 2012 00:37:17 +0000 Subject: [issue16211] MacInstalls break PyDev In-Reply-To: <1350050095.97.0.144464091668.issue16211@psf.upfronthosting.co.za> Message-ID: <1350088637.97.0.404370771257.issue16211@psf.upfronthosting.co.za> Doug Ransom added the comment: The problem described was in respect to the python installed by the installer from python.org, not the python that ships with mac. Using OSX 10.8.1. Installing python from python.org binary installer does not fix the problem. I ran the installer before submitting this bug, which is in reference to the installer downloaded from python.org, not what OSX Provides. It may be that if OS X already installed python 2.7 the installer from python.org doesn't do anything. Installing Xcode Command Line tools also doesn't seem to work. installing python from ports sudo port install python27 does seem to work. Therefore, I think the problem is with the binary installer for os x. I think this deserves closer inspection. ---------- resolution: invalid -> status: closed -> open _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16211> _______________________________________ From report at bugs.python.org Sat Oct 13 02:51:22 2012 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Oct 2012 00:51:22 +0000 Subject: [issue16211] MacInstalls break PyDev In-Reply-To: <1350050095.97.0.144464091668.issue16211@psf.upfronthosting.co.za> Message-ID: <1350089482.72.0.489323943295.issue16211@psf.upfronthosting.co.za> Ned Deily added the comment: There is *no* way to install Python using a python.org installer and *not* have the .py files installed. You would have to go in and remove those files yourself. You should be able to see the .py files yourself by looking at /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7. Most likely the IDE you are using is not using the Python instance you think it is. To use a python.org Python, it would likely need to be reconfigured to use /usr/local/bin/python2.7 or /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7. If you still think there is a problem, please enumerate the steps you are performing and explain exactly what failure you are seeing. Also, include the results of running the following in the failing configuration: import sys print(sys.executable) print(sys.path) print(sys.version) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16211> _______________________________________ From report at bugs.python.org Sat Oct 13 03:18:08 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 13 Oct 2012 01:18:08 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350050663.98.0.0365442687476.issue16212@psf.upfronthosting.co.za> Message-ID: <1350091088.42.0.0572976636825.issue16212@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16212> _______________________________________ From report at bugs.python.org Sat Oct 13 06:12:32 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 13 Oct 2012 04:12: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: <1350101552.81.0.267098300452.issue16209@psf.upfronthosting.co.za> ?ric Araujo added the comment: This sort of request came up before, the last time only a few months ago if memory serves. The shot answer is that str is a built-in function as well as a class, and trying to split hairs over that does not really add value to the docs. I can dig up the issue(s) if you don't find them. ---------- nosy: +eric.araujo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16209> _______________________________________ From report at bugs.python.org Sat Oct 13 06:20:49 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 13 Oct 2012 04:20:49 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1350102049.03.0.832421596776.issue16202@psf.upfronthosting.co.za> Changes by ?ric Araujo <merwok at netwok.org>: ---------- assignee: -> eric.araujo components: +Distutils nosy: +eric.araujo, ncoghlan, tarek _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Sat Oct 13 07:28:21 2012 From: report at bugs.python.org (Tim Peters) Date: Sat, 13 Oct 2012 05:28:21 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1350106101.6.0.20671459696.issue16203@psf.upfronthosting.co.za> Tim Peters added the comment: Matthew, Guido wrote "check that the whole input string matches" (or slice if pos and (possibly also) endpos is/are given). So, yes, \Z is more to the point than $ if people want to continue wasting time trying to implement this as a Python-level function ;-) I don't understand what you're asking about MULTILINE. What's the issue there? Focus on Guido's "whole input string matches", not on his motivational talk about "a regex ending in $". $ and/or \Z aren't the point here; "whole input string matches" is the point. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16203> _______________________________________ From report at bugs.python.org Sat Oct 13 07:36:22 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 13 Oct 2012 05:36: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: <1350106582.28.0.135756693633.issue16209@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Let me start over with what I'm suggesting, because the idea wasn't fully developed when I first filed this issue. I'm thinking that we should create a class entry for str that contains the current string methods nested beneath it -- a bit like issue 12901. :) In conjunction with that, we should move the documentation of the str() function to the constructor for that class entry. All str links throughout the documentation would go to the class entry, and the built-in function str() would be a stub entry that also links to the class entry. That's how we do it for dict, for example: http://docs.python.org/dev/library/functions.html#func-dict One reason is practical. By doing the above, clicking "str" anywhere in the docs will take you to the documentation for both the function str() and the string methods. When I was first learning Python, it was very common for me to look up the "String Methods" section. But looking them up never seemed as convenient as it should be because they were in a different location. I always had to remember they were an extra click or two away in a separate "String Methods" section. In 3.3 we made a bit of progress on this by giving the string type its own section: http://docs.python.org/dev/library/stdtypes.html#text-sequence-type-str But we could go further by doing what we do for list, tuple, set, memoryview, range, etc. and put the documentation of the str() function and its methods next to each other in the same location. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16209> _______________________________________ From report at bugs.python.org Sat Oct 13 08:57:01 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 13 Oct 2012 06:57:01 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1350111421.35.0.34459126625.issue16202@psf.upfronthosting.co.za> Nick Coghlan added the comment: Definite +1 on distutils needing to be fixed in the upcoming maintenance releases for 2.7, 3.2 and 3.3. -1 on doing the strict path security checks on a normal invocation, -0 on doing them when -S or -E have been passed in, +0 if it is *just* a warning to users that they're doing something risky, but proceeds with normal (backwards compatible) sys.path initialisation. For 3.4, I plan to have a look at the organically-grown-over-time mess that is CPython's current interpreter initialisation system and see if I can figure out something a bit more sane and easier to configure/control (especially when embedding Python in a larger application) :P ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Sat Oct 13 09:00:14 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 13 Oct 2012 07:00:14 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1350111614.61.0.366105724557.issue16202@psf.upfronthosting.co.za> Nick Coghlan added the comment: Also, what's up with that weird fallback code in distutils? When is tempfile.mkdtemp ever missing? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Sat Oct 13 10:16:00 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Oct 2012 08:16:00 +0000 Subject: [issue16216] Arithmetic operations with NULL In-Reply-To: <1350081908.35.0.947627906901.issue16216@psf.upfronthosting.co.za> Message-ID: <1350116160.76.0.76120554277.issue16216@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The Standard is not guarantee that result of converting null pointer to integer is zero or even it is a even number. I remember the ancient C implementation, where it was not so (but Python is not supports these platform). Of course, such a method of obtaining aligned pointers is one great trick. I'm not sure whether to worry about that. ---------- nosy: +mark.dickinson _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16216> _______________________________________ From report at bugs.python.org Sat Oct 13 10:59:24 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sat, 13 Oct 2012 08:59:24 +0000 Subject: [issue16201] socket.gethostbyname incorrectly parses ip In-Reply-To: <1349983863.01.0.255097510924.issue16201@psf.upfronthosting.co.za> Message-ID: <1350118764.79.0.907086867823.issue16201@psf.upfronthosting.co.za> Michele Orr? added the comment: > >> Buggy due to the use of scanf at Modueles/socketmodule.c:868 > > I don't think so. The following test fails because sscanf() returns 5 > instead of 4: You are right, sorry for didn't notice. > If you consider that '192.168.1.1 ' is an invalid name, you should > report the issue to the vendor of the C library of your OS. Yep, I'm going to ask on #glibc if there is any specific reason for accepting trailing spaces. But this concerns the specific underlying implementation if getaddrinfo(), so IMO we should just update the int overflow issue for now, maintaining the coherence with other utilities having the same "problem". For this, I am attaching a new patch which which just do not test for trailing whitespaces. -- ? ---------- Added file: http://bugs.python.org/file27549/issue16201.1.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16201> _______________________________________ From report at bugs.python.org Sat Oct 13 11:44:59 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sat, 13 Oct 2012 09:44:59 +0000 Subject: [issue16201] socket.gethostbyname incorrectly parses ip In-Reply-To: <1349983863.01.0.255097510924.issue16201@psf.upfronthosting.co.za> Message-ID: <1350121499.49.0.565664796255.issue16201@psf.upfronthosting.co.za> Michele Orr? added the comment: Reviewed with Ezio. ---------- Added file: http://bugs.python.org/file27550/issue16201.2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16201> _______________________________________ From report at bugs.python.org Sat Oct 13 12:11:10 2012 From: report at bugs.python.org (Mike Hoy) Date: Sat, 13 Oct 2012 10:11:10 +0000 Subject: [issue15936] Add link from os.urandom to random.SystemRandom In-Reply-To: <1347487742.57.0.57747338883.issue15936@psf.upfronthosting.co.za> Message-ID: <1350123070.2.0.683996936742.issue15936@psf.upfronthosting.co.za> Changes by Mike Hoy <mhoy09 at gmail.com>: ---------- nosy: +mikehoy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15936> _______________________________________ From report at bugs.python.org Sat Oct 13 12:20:57 2012 From: report at bugs.python.org (Volker Braun) Date: Sat, 13 Oct 2012 10:20:57 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1350123657.72.0.275453655092.issue16202@psf.upfronthosting.co.za> Volker Braun added the comment: > When is tempfile.mkdtemp ever missing It was added in Python 2.3, in the dark ages before that there was only tempfile.mktemp. Though I guess we can remove the fallback now... ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Sat Oct 13 12:30:35 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Oct 2012 10:30:35 +0000 Subject: [issue16206] dict() docs should display multiple signatures In-Reply-To: <1350025773.95.0.890132868145.issue16206@psf.upfronthosting.co.za> Message-ID: <3Xf2HZ31NvzPLh@mail.python.org> Roundup Robot added the comment: New changeset ed6da2a8361c by Chris Jerdonek in branch '3.2': Issue #16206: Improve the documentation of the dict constructor. http://hg.python.org/cpython/rev/ed6da2a8361c New changeset 02de13d69149 by Chris Jerdonek in branch '3.3': Issue #16206: Merge dict documentation improvements from 3.2. http://hg.python.org/cpython/rev/02de13d69149 New changeset 392e09ba9feb by Chris Jerdonek in branch 'default': Issue #16206: Merge dict documentation improvements from 3.3. http://hg.python.org/cpython/rev/392e09ba9feb ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16206> _______________________________________ From report at bugs.python.org Sat Oct 13 12:50:21 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Oct 2012 10:50:21 +0000 Subject: [issue16206] dict() docs should display multiple signatures In-Reply-To: <1350025773.95.0.890132868145.issue16206@psf.upfronthosting.co.za> Message-ID: <3Xf2kP2MzHzPQr@mail.python.org> Roundup Robot added the comment: New changeset 5fc6f47974db by Chris Jerdonek in branch '2.7': Issue #16206: Backport dict documentation improvements from 3.2. http://hg.python.org/cpython/rev/5fc6f47974db ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16206> _______________________________________ From report at bugs.python.org Sat Oct 13 12:51:31 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 13 Oct 2012 10:51:31 +0000 Subject: [issue16206] dict() docs should display multiple signatures In-Reply-To: <1350025773.95.0.890132868145.issue16206@psf.upfronthosting.co.za> Message-ID: <1350125491.02.0.844812231843.issue16206@psf.upfronthosting.co.za> Changes by Chris Jerdonek <chris.jerdonek at gmail.com>: ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16206> _______________________________________ From report at bugs.python.org Sat Oct 13 13:48:06 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Oct 2012 11:48:06 +0000 Subject: [issue16215] Possible double memory free in str.replace In-Reply-To: <1350081232.49.0.0151935995631.issue16215@psf.upfronthosting.co.za> Message-ID: <1350128886.4.0.871242465255.issue16215@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: ---------- nosy: +haypo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16215> _______________________________________ From report at bugs.python.org Sat Oct 13 14:51:41 2012 From: report at bugs.python.org (Matthew Woodcraft) Date: Sat, 13 Oct 2012 12:51:41 +0000 Subject: [issue16217] Tracebacks are unnecessarily verbose when using 'python -m' Message-ID: <1350132701.04.0.542395484982.issue16217@psf.upfronthosting.co.za> New submission from Matthew Woodcraft: If I run my code using 'python -m' and there is an unhandled exception, the tracebacks include lines from runpy.py (and now sometimes from importlib._bootstrap) which don't provide useful information, and tend to overwhelm the valuable part of the traceback. I suppose this is in some sense a regression from Python 2.4. echo fail > fail.py python3.3 -m fail python -m fail Traceback (most recent call last): File "/usr/lib/python3.3/runpy.py", line 160, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python3.3/runpy.py", line 73, in _run_code exec(code, run_globals) File "./fail.py", line 2, in <module> fail NameError: name 'fail' is not defined Here I think it would be better to omit the first two traceback entries. Syntax errors are worse: echo syntax error > fail.py python3.3 -m fail Traceback (most recent call last): File "/usr/lib/python3.3/runpy.py", line 140, in _run_module_as_main mod_name, loader, code, fname = _get_module_details(mod_name) File "/usr/lib/python3.3/runpy.py", line 114, in _get_module_details code = loader.get_code(mod_name) File "<frozen importlib._bootstrap>", line 981, in get_code File "<frozen importlib._bootstrap>", line 313, in _call_with_frames_removed File "./fail.py", line 1 syntax error Here there are four traceback entries which could be omitted. ---------- messages: 172806 nosy: mattheww priority: normal severity: normal status: open title: Tracebacks are unnecessarily verbose when using 'python -m' type: enhancement _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16217> _______________________________________ From report at bugs.python.org Sat Oct 13 15:31:42 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Oct 2012 13:31:42 +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: <1350135102.2.0.482709001748.issue16217@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: ---------- nosy: +ncoghlan _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16217> _______________________________________ From report at bugs.python.org Sat Oct 13 16:01:46 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Oct 2012 14:01:46 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <1348761787.62.0.977797373088.issue16061@psf.upfronthosting.co.za> Message-ID: <1350136906.84.0.322583029929.issue16061@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: ---------- stage: needs patch -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16061> _______________________________________ From report at bugs.python.org Sat Oct 13 16:24:38 2012 From: report at bugs.python.org (Turn) Date: Sat, 13 Oct 2012 14:24:38 +0000 Subject: [issue16218] Python launcher does not support non ascii characters Message-ID: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> New submission from Turn: If there are non ASCII character in the py.exe arguments, the execution will fail. The script file name or path may contain non ASCII characters. ---------- components: Windows messages: 172807 nosy: turncc priority: normal severity: normal status: open title: Python launcher does not support non ascii characters type: crash versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16218> _______________________________________ From report at bugs.python.org Sat Oct 13 16:33:19 2012 From: report at bugs.python.org (Jeremy Kloth) Date: Sat, 13 Oct 2012 14:33:19 +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: <1350138799.2.0.452138325209.issue16218@psf.upfronthosting.co.za> Changes by Jeremy Kloth <jeremy.kloth+python-tracker at gmail.com>: ---------- nosy: +jkloth _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16218> _______________________________________ From report at bugs.python.org Sat Oct 13 16:52:32 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 13 Oct 2012 14:52:32 +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: <1350139952.81.0.89371208962.issue16217@psf.upfronthosting.co.za> Nick Coghlan added the comment: Agreed. We do have a mechanism in place to deal with this specifically for importlib in 3.3 (which is why the first traceback is cleaner, although it's not triggering in the SyntaxError case for some reason), but it makes sense to hide the noise from runpy as well. Flagging 3.3 for the moment, but if the change is too intrusive it will end up being 3.4 only. ---------- assignee: -> ncoghlan nosy: +brett.cannon versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16217> _______________________________________ From report at bugs.python.org Sat Oct 13 17:04:48 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sat, 13 Oct 2012 15:04:48 +0000 Subject: [issue16106] antigravity tests In-Reply-To: <1349134601.26.0.544681268044.issue16106@psf.upfronthosting.co.za> Message-ID: <1350140688.55.0.492759009041.issue16106@psf.upfronthosting.co.za> Ramchandra Apte added the comment: @Antoine Aw.. no funny bone in you.. ---------- nosy: +ramchandra.apte _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16106> _______________________________________ From report at bugs.python.org Sat Oct 13 17:35:47 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sat, 13 Oct 2012 15:35:47 +0000 Subject: [issue8402] glob returns empty list with "[" character in the folder name In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1350142547.36.0.138434481299.issue8402@psf.upfronthosting.co.za> Michele Orr? added the comment: The attached patch adds support for '\\' escaping to fnmatch, and consequently to glob. ---------- keywords: +patch nosy: +maker versions: +Python 3.4 -Python 3.2 Added file: http://bugs.python.org/file27551/issue8402.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8402> _______________________________________ From report at bugs.python.org Sat Oct 13 18:46:20 2012 From: report at bugs.python.org (Trent Nelson) Date: Sat, 13 Oct 2012 16:46:20 +0000 Subject: [issue15298] _sysconfigdata is generated in srcdir, not builddir In-Reply-To: <1341782776.55.0.708234468774.issue15298@psf.upfronthosting.co.za> Message-ID: <1350146780.14.0.93036262154.issue15298@psf.upfronthosting.co.za> Changes by Trent Nelson <trent at snakebite.org>: ---------- nosy: +trent _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15298> _______________________________________ From report at bugs.python.org Sat Oct 13 18:54:23 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 13 Oct 2012 16:54:23 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1350147263.04.0.674225420885.issue16145@psf.upfronthosting.co.za> Andrew Svetlov added the comment: LGTM ---------- nosy: +asvetlov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16145> _______________________________________ From report at bugs.python.org Sat Oct 13 19:05:08 2012 From: report at bugs.python.org (Eric Snow) Date: Sat, 13 Oct 2012 17:05:08 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1350147908.7.0.520196063896.issue16202@psf.upfronthosting.co.za> Eric Snow added the comment: > For 3.4, I plan to have a look at the organically-grown-over-time mess > that is CPython's current interpreter initialisation system and see if I > can figure out something a bit more sane and easier to configure/control > (especially when embedding Python in a larger application) :P I'm totally on board with any effort in this regard. Sign me up if you need a hand. ---------- nosy: +eric.snow _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Sat Oct 13 19:18:19 2012 From: report at bugs.python.org (Trent Nelson) Date: Sat, 13 Oct 2012 17:18:19 +0000 Subject: [issue15298] _sysconfigdata is generated in srcdir, not builddir In-Reply-To: <1341782776.55.0.708234468774.issue15298@psf.upfronthosting.co.za> Message-ID: <1350148698.99.0.668493953222.issue15298@psf.upfronthosting.co.za> Trent Nelson added the comment: The previous 'alt_sysconfigdata.patch' didn't apply cleanly to 3.3/3.x. I've attached an updated patch that does. Any objections to applying this to 3.3 -> 3.x now that the freeze is over? ---------- versions: +Python 3.4 Added file: http://bugs.python.org/file27552/issue15298-alt_sysconfigdata2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15298> _______________________________________ From report at bugs.python.org Sat Oct 13 19:22:06 2012 From: report at bugs.python.org (Trent Nelson) Date: Sat, 13 Oct 2012 17:22:06 +0000 Subject: [issue14774] _sysconfigdata.py doesn't support multiple build configurations In-Reply-To: <1336679254.12.0.498386228703.issue14774@psf.upfronthosting.co.za> Message-ID: <1350148926.0.0.0725256548699.issue14774@psf.upfronthosting.co.za> Trent Nelson added the comment: I'm pretty sure this is a duplicate of http://bugs.python.org/issue15298 (which should be fixed shortly). Feel free to re-open if I'm wrong. ---------- nosy: +trent resolution: -> duplicate status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14774> _______________________________________ From report at bugs.python.org Sat Oct 13 19:22:21 2012 From: report at bugs.python.org (Scott Maxwell) Date: Sat, 13 Oct 2012 17:22:21 +0000 Subject: [issue16219] segfault when using xml.etree.ElementTree.XMLTreeBuilder Message-ID: <1350148941.07.0.23902695609.issue16219@psf.upfronthosting.co.za> New submission from Scott Maxwell: I upgraded the meld3 module (used by Supervisord) to work on Py3K and discovered this segfault. It happens every time. I have seen this on the pre-built Mac 3.3.0 and a source-built 3.3.0 on Linux. It does not occur in 3.2.2. It appears to happen in native code so I can pinpoint the exact location of the crash. But it is easy to reproduce. It is easy to reproduce. Just grab meld3.py and test_meld3.py from my GitHub and run test_meld3. Files are here: https://raw.github.com/scottkmaxwell/meld3/master/meld3/meld3.py https://raw.github.com/scottkmaxwell/meld3/master/meld3/test_meld3.py On just clone my depot. ---------- components: Library (Lib) messages: 172815 nosy: scottmax priority: normal severity: normal status: open title: segfault when using xml.etree.ElementTree.XMLTreeBuilder type: crash versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16219> _______________________________________ From report at bugs.python.org Sat Oct 13 19:25:51 2012 From: report at bugs.python.org (Matthew Barnett) Date: Sat, 13 Oct 2012 17:25:51 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1350149151.92.0.20972484563.issue16203@psf.upfronthosting.co.za> Matthew Barnett added the comment: Tim, my point is that if the MULTILINE flag happens to be turned on, '$' won't just match at the end of the string (or slice), it'll also match at a newline, so wrapping the pattern in (?:...)$ in that case could give the wrong answer, but wrapping it in (?:...)\Z would give the right answer. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16203> _______________________________________ From report at bugs.python.org Sat Oct 13 19:33:46 2012 From: report at bugs.python.org (Christian Heimes) Date: Sat, 13 Oct 2012 17:33:46 +0000 Subject: [issue16219] segfault when using xml.etree.ElementTree.XMLTreeBuilder In-Reply-To: <1350148941.07.0.23902695609.issue16219@psf.upfronthosting.co.za> Message-ID: <1350149626.55.0.777453547464.issue16219@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks for your report.It's a know issue and has already been fixed in HG. #16089 contains a patch if you like to give it a shot. ---------- nosy: +christian.heimes resolution: -> duplicate stage: -> committed/rejected status: open -> pending _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16219> _______________________________________ From report at bugs.python.org Sat Oct 13 19:36:30 2012 From: report at bugs.python.org (Trent Nelson) Date: Sat, 13 Oct 2012 17:36:30 +0000 Subject: [issue15833] most failures to write byte-compiled file no longer suppressed In-Reply-To: <1346432246.49.0.876284426658.issue15833@psf.upfronthosting.co.za> Message-ID: <1350149790.73.0.786533689927.issue15833@psf.upfronthosting.co.za> Trent Nelson added the comment: FWIW, I just ran into the following on Solaris 10: % dbx python For information about new features see `help changes' To remove this message, put `dbxenv suppress_startup_message 7.9' in your .dbxrc Reading python Reading ld.so.1 Reading libsocket.so.1 Reading libnsl.so.1 Reading libintl.so.1 Reading librt.so.1 Reading libdl.so.1 Reading libsendfile.so.1 Reading libm.so.2 Reading libthread.so.1 Reading libc.so.1 Reading libaio.so.1 Reading libmd.so.1 (dbx) run Running: python (process id 17819) Reading libc_psr.so.1 Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] Fatal Python error: Py_Initialize: Unable to get the locale encoding Traceback (most recent call last): File "<frozen importlib._bootstrap>", line 1558, in _find_and_load File "<frozen importlib._bootstrap>", line 1525, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 586, in _check_name_wrapper File "<frozen importlib._bootstrap>", line 1023, in load_module File "<frozen importlib._bootstrap>", line 1004, in load_module File "<frozen importlib._bootstrap>", line 562, in module_for_loader_wrapper File "<frozen importlib._bootstrap>", line 854, in _load_module File "<frozen importlib._bootstrap>", line 990, in get_code File "<frozen importlib._bootstrap>", line 1051, in _cache_bytecode File "<frozen importlib._bootstrap>", line 1065, in set_data OSError: [Errno 30] Read-only file system: '/home/cpython/nfs/src/3.x/Lib/encodings/__pycache__' t at 1 (l at 1) signal ABRT (Abort) in __lwp_kill at 0xffffffff7e2dc2c0 0xffffffff7e2dc2c0: __lwp_kill+0x0008: bcc,a,pt %icc,__lwp_kill+0x18 ! 0xffffffff7e2dc2d0 Current function is Py_FatalError 2360 abort(); (dbx) q q: not found (dbx) quit Testing the 'import_error.diff' patch now... ---------- nosy: +trent _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15833> _______________________________________ From report at bugs.python.org Sat Oct 13 19:45:43 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Oct 2012 17:45:43 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1350149151.92.0.20972484563.issue16203@psf.upfronthosting.co.za> Message-ID: <1350150244.3365.48.camel@localhost.localdomain> Antoine Pitrou added the comment: > Tim, my point is that if the MULTILINE flag happens to be turned on, > '$' won't just match at the end of the string (or slice), it'll also > match at a newline, so wrapping the pattern in (?:...)$ in that case > could give the wrong answer, but wrapping it in (?:...)\Z would give > the right answer. This means Tim and Guido are right that a dedicated fullmatch() method is desireable. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16203> _______________________________________ From report at bugs.python.org Sat Oct 13 19:52:11 2012 From: report at bugs.python.org (Trent Nelson) Date: Sat, 13 Oct 2012 17:52:11 +0000 Subject: [issue15833] most failures to write byte-compiled file no longer suppressed In-Reply-To: <1346432246.49.0.876284426658.issue15833@psf.upfronthosting.co.za> Message-ID: <1350150731.67.0.764301501244.issue15833@psf.upfronthosting.co.za> Trent Nelson added the comment: That... didn't work. Also applied rpetrov's patch and that made no difference: % ./python Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] Fatal Python error: Py_Initialize: Unable to get the locale encoding Traceback (most recent call last): File "<frozen importlib._bootstrap>", line 1558, in _find_and_load File "<frozen importlib._bootstrap>", line 1525, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 586, in _check_name_wrapper File "<frozen importlib._bootstrap>", line 1023, in load_module File "<frozen importlib._bootstrap>", line 1004, in load_module File "<frozen importlib._bootstrap>", line 562, in module_for_loader_wrapper File "<frozen importlib._bootstrap>", line 854, in _load_module File "<frozen importlib._bootstrap>", line 990, in get_code File "<frozen importlib._bootstrap>", line 1051, in _cache_bytecode File "<frozen importlib._bootstrap>", line 1065, in set_data OSError: [Errno 30] Read-only file system: '/home/cpython/nfs/src/3.x/Lib/encodings/__pycache__' zsh: IOT instruction (core dumped) ./python ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15833> _______________________________________ From report at bugs.python.org Sat Oct 13 20:03:29 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Oct 2012 18:03:29 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <1350136906.89.0.860941780143.issue16061@psf.upfronthosting.co.za> Message-ID: <201210132103.09737.storchaka@gmail.com> Serhiy Storchaka added the comment: After much experimentation, I suggest the new patch. Benchmark results (time of replacing 1 of n character (ch1 to ch2) in 100000- char string). Py3.2 Py3.3 patch n ch1 ch2 fill 231 (-13%) 3025 (-93%) 200 1 'a' 'b' 'c' 626 (-18%) 2035 (-75%) 511 2 'a' 'b' 'c' 444 (-26%) 957 (-66%) 327 5 'a' 'b' 'c' 349 (-30%) 530 (-54%) 243 10 'a' 'b' 'c' 306 (-40%) 300 (-38%) 185 20 'a' 'b' 'c' 280 (-54%) 169 (-23%) 130 50 'a' 'b' 'c' 273 (-62%) 123 (-15%) 105 100 'a' 'b' 'c' 265 (-70%) 82 (-4%) 79 1000 'a' 'b' 'c' 230 (+4%) 3012 (-92%) 239 1 '\u010a' '\u010b' '\u010c' 624 (-17%) 1907 (-73%) 518 2 '\u010a' '\u010b' '\u010c' 442 (-16%) 962 (-62%) 370 5 '\u010a' '\u010b' '\u010c' 347 (-5%) 566 (-42%) 330 10 '\u010a' '\u010b' '\u010c' 305 (-10%) 357 (-23%) 275 20 '\u010a' '\u010b' '\u010c' 285 (-26%) 241 (-12%) 212 50 '\u010a' '\u010b' '\u010c' 280 (-33%) 190 (-2%) 187 100 '\u010a' '\u010b' '\u010c' 263 (-41%) 170 (-8%) 156 1000 '\u010a' '\u010b' '\u010c' 3355 (-85%) 3309 (-85%) 498 1 '\U0001000a' '\U0001000b' '\U0001000c' 2290 (-65%) 2267 (-65%) 800 2 '\U0001000a' '\U0001000b' '\U0001000c' 1598 (-62%) 1279 (-52%) 612 5 '\U0001000a' '\U0001000b' '\U0001000c' 1313 (-60%) 950 (-45%) 519 10 '\U0001000a' '\U0001000b' '\U0001000c' 1195 (-61%) 824 (-44%) 464 20 '\U0001000a' '\U0001000b' '\U0001000c' 1055 (-59%) 640 (-32%) 434 50 '\U0001000a' '\U0001000b' '\U0001000c' 982 (-55%) 549 (-20%) 439 100 '\U0001000a' '\U0001000b' '\U0001000c' 941 (-56%) 473 (-12%) 417 1000 '\U0001000a' '\U0001000b' '\U0001000c' On other platforms other numbers are possible. Especially I'm interested in the results on Windows and on 64-bit. For the test I used the script replacebench2.py, and compared the results with the help of script https://bitbucket.org/storchaka/cpython-stuff/raw/default/bench/bench-diff.py . ---------- Added file: http://bugs.python.org/file27553/str_replace_1char.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16061> _______________________________________ -------------- next part -------------- diff -r 6fb1fb550319 Objects/unicodeobject.c --- a/Objects/unicodeobject.c Thu Oct 11 18:59:34 2012 -0700 +++ b/Objects/unicodeobject.c Sat Oct 13 20:19:47 2012 +0300 @@ -9881,6 +9881,80 @@ return 0; } +static void +replace_1char_inplace(PyObject *u, Py_ssize_t pos, Py_UCS4 u1, Py_UCS4 u2, Py_ssize_t maxcount) +{ + int kind = PyUnicode_KIND(u); + void *data = PyUnicode_DATA(u); + Py_ssize_t len = PyUnicode_GET_LENGTH(u); + if (kind == PyUnicode_1BYTE_KIND) { + Py_UCS1 *s = (Py_UCS1 *)data; + Py_UCS1 *end = s + len; + s += pos; + *s = u2; + while (--maxcount && ++s != end) { + if (*s != u1) { + int attempts = 10; + while (1) { + if (++s == end) + return; + if (*s == u1) + break; + if (!--attempts) { + s++; + s = memchr(s, u1, end - s); + if (s == NULL) + return; + break; + } + } + } + *s = u2; + } + } + else if (kind == PyUnicode_2BYTE_KIND) { + Py_UCS2 *s = (Py_UCS2 *)data; + Py_UCS2 *end = s + len; + s += pos; + *s = u2; + while (--maxcount && ++s != end) { + if (*s != u1) { + int attempts = 10; + while (1) { + if (++s == end) + return; + if (*s == u1) + break; + if (!--attempts) { + Py_ssize_t i; + s++; + i = findchar(s, PyUnicode_2BYTE_KIND, end - s, u1, 1); + if (i < 0) + return; + s += i; + break; + } + } + } + *s = u2; + } + } + else { + Py_UCS4 *s = (Py_UCS4 *)data; + Py_UCS4 *end = s + len; + s += pos; + while (1) { + *s = u2; + if (!--maxcount) + return; + do { + if (++s == end) + return; + } while (*s != u1); + } + } +} + static PyObject * replace(PyObject *self, PyObject *str1, PyObject *str2, Py_ssize_t maxcount) @@ -9897,7 +9971,7 @@ Py_ssize_t len1 = PyUnicode_GET_LENGTH(str1); Py_ssize_t len2 = PyUnicode_GET_LENGTH(str2); int mayshrink; - Py_UCS4 maxchar, maxchar_str2; + Py_UCS4 maxchar, maxchar_str1, maxchar_str2; if (maxcount < 0) maxcount = PY_SSIZE_T_MAX; @@ -9906,15 +9980,16 @@ if (str1 == str2) goto nothing; - if (skind < kind1) + + maxchar = PyUnicode_MAX_CHAR_VALUE(self); + maxchar_str1 = PyUnicode_MAX_CHAR_VALUE(str1); + if (maxchar < maxchar_str1) /* substring too wide to be present */ goto nothing; - - maxchar = PyUnicode_MAX_CHAR_VALUE(self); maxchar_str2 = PyUnicode_MAX_CHAR_VALUE(str2); /* Replacing str1 with str2 may cause a maxchar reduction in the result string. */ - mayshrink = (maxchar_str2 < maxchar); + mayshrink = (maxchar_str2 < maxchar_str1); maxchar = MAX_MAXCHAR(maxchar, maxchar_str2); if (len1 == len2) { @@ -9924,35 +9999,19 @@ if (len1 == 1) { /* replace characters */ Py_UCS4 u1, u2; - int rkind; - Py_ssize_t index, pos; - char *src; + Py_ssize_t pos; u1 = PyUnicode_READ_CHAR(str1, 0); - pos = findchar(sbuf, PyUnicode_KIND(self), slen, u1, 1); + pos = findchar(sbuf, skind, slen, u1, 1); if (pos < 0) goto nothing; u2 = PyUnicode_READ_CHAR(str2, 0); u = PyUnicode_New(slen, maxchar); if (!u) goto error; + _PyUnicode_FastCopyCharacters(u, 0, self, 0, slen); - rkind = PyUnicode_KIND(u); - - PyUnicode_WRITE(rkind, PyUnicode_DATA(u), pos, u2); - index = 0; - src = sbuf; - while (--maxcount) - { - pos++; - src += pos * PyUnicode_KIND(self); - slen -= pos; - index += pos; - pos = findchar(src, PyUnicode_KIND(self), slen, u1, 1); - if (pos < 0) - break; - PyUnicode_WRITE(rkind, PyUnicode_DATA(u), index + pos, u2); - } + replace_1char_inplace(u, pos, u1, u2, maxcount); } else { int rkind = skind; From report at bugs.python.org Sat Oct 13 20:07:00 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Oct 2012 18:07:00 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1350151620.32.0.171437152676.issue16203@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Definitely this is not easy issue. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16203> _______________________________________ From report at bugs.python.org Sat Oct 13 20:14:36 2012 From: report at bugs.python.org (Trent Nelson) Date: Sat, 13 Oct 2012 18:14:36 +0000 Subject: [issue15833] most failures to write byte-compiled file no longer suppressed In-Reply-To: <1346432246.49.0.876284426658.issue15833@psf.upfronthosting.co.za> Message-ID: <1350152076.21.0.252670547098.issue15833@psf.upfronthosting.co.za> Trent Nelson added the comment: Charles: your patch is fine. +1. My Solaris failures can be traced back to http://bugs.python.org/issue15819. Sorry for the noise. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15833> _______________________________________ From report at bugs.python.org Sat Oct 13 21:24:45 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Oct 2012 19:24:45 +0000 Subject: [issue15958] bytes.join() should allow arbitrary buffer objects In-Reply-To: <1347905010.83.0.632444428638.issue15958@psf.upfronthosting.co.za> Message-ID: <1350156285.28.0.752626197688.issue15958@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch with tests. ---------- Added file: http://bugs.python.org/file27554/bytes_join_buffers.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15958> _______________________________________ From report at bugs.python.org Sat Oct 13 21:55:13 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Oct 2012 19:55:13 +0000 Subject: [issue16201] socket.gethostbyname incorrectly parses ip In-Reply-To: <1349983863.01.0.255097510924.issue16201@psf.upfronthosting.co.za> Message-ID: <1350158113.16.0.571827669736.issue16201@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't think uint32_t exists everywhere, you should use "unsigned int" instead. ---------- nosy: +pitrou _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16201> _______________________________________ From report at bugs.python.org Sat Oct 13 22:16:06 2012 From: report at bugs.python.org (Vladimir Ushakov) Date: Sat, 13 Oct 2012 20:16:06 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350050663.98.0.0365442687476.issue16212@psf.upfronthosting.co.za> Message-ID: <1350159366.03.0.713338541627.issue16212@psf.upfronthosting.co.za> Vladimir Ushakov added the comment: I know how to avoid the problem in my case, the bug does not really affect me. I posted it because I thought that the possibility to crash the interpreter is something to be avoided at all costs. I've found a few examples of handling non-restartable signals with longjmps, but not that familiar with the codebase to estimate how reliably it can be done on all supported platforms. I don't really know how this code would behave, say, on Windows. I'm gonna do some research on the topic when I have a little more time. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16212> _______________________________________ From report at bugs.python.org Sat Oct 13 22:24:12 2012 From: report at bugs.python.org (Eric Snow) Date: Sat, 13 Oct 2012 20:24:12 +0000 Subject: [issue16160] subclassing types.SimpleNamespace does not work In-Reply-To: <1349658607.29.0.0643105543226.issue16160@psf.upfronthosting.co.za> Message-ID: <1350159852.2.0.794370421685.issue16160@psf.upfronthosting.co.za> Eric Snow added the comment: Am I good to commit this? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16160> _______________________________________ From report at bugs.python.org Sat Oct 13 22:30:28 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Oct 2012 20:30:28 +0000 Subject: [issue15958] bytes.join() should allow arbitrary buffer objects In-Reply-To: <1347905010.83.0.632444428638.issue15958@psf.upfronthosting.co.za> Message-ID: <1350160228.07.0.580046952741.issue15958@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch LGTM, however... $ ./python -m timeit -s "a=[b'a']*100000" "b','.join(a)" Vanilla: 3.69 msec per loop Patched: 11.6 msec per loop ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15958> _______________________________________ From report at bugs.python.org Sat Oct 13 22:38:17 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Oct 2012 20:38:17 +0000 Subject: [issue15958] bytes.join() should allow arbitrary buffer objects In-Reply-To: <1350160228.07.0.580046952741.issue15958@psf.upfronthosting.co.za> Message-ID: <1350160597.3365.51.camel@localhost.localdomain> Antoine Pitrou added the comment: > Patch LGTM, however... > > $ ./python -m timeit -s "a=[b'a']*100000" "b','.join(a)" > > Vanilla: 3.69 msec per loop > Patched: 11.6 msec per loop True. It is a bit of a pathological case, though. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15958> _______________________________________ From report at bugs.python.org Sat Oct 13 23:00:20 2012 From: report at bugs.python.org (Brent Tubbs) Date: Sat, 13 Oct 2012 21:00:20 +0000 Subject: [issue16220] wsgiref does not call close() on iterable response when client Message-ID: <1350162020.69.0.603099084932.issue16220@psf.upfronthosting.co.za> New submission from Brent Tubbs: When a WSGI application returns an iterable that has a .close() method, the server is supposed to call that method once the request has finished. The wsgiref server does not do this when a client disconnects from a streaming response. The attached script allows testing the .close() behavior of various wsgi servers (wsgiref, cherrypy, gevent, werkzeug, and gunicorn). wsgiref is the only one of the tested implementations that does not call .close(). ---------- components: Library (Lib) files: sleepy_app.py messages: 172830 nosy: Brent.Tubbs priority: normal severity: normal status: open title: wsgiref does not call close() on iterable response when client versions: Python 2.7 Added file: http://bugs.python.org/file27555/sleepy_app.py _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16220> _______________________________________ From report at bugs.python.org Sat Oct 13 23:01:14 2012 From: report at bugs.python.org (Brent Tubbs) Date: Sat, 13 Oct 2012 21:01:14 +0000 Subject: [issue16220] wsgiref does not call close() on iterable response In-Reply-To: <1350162020.69.0.603099084932.issue16220@psf.upfronthosting.co.za> Message-ID: <1350162074.03.0.304347977892.issue16220@psf.upfronthosting.co.za> Changes by Brent Tubbs <brent.tubbs at gmail.com>: ---------- title: wsgiref does not call close() on iterable response when client -> wsgiref does not call close() on iterable response _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16220> _______________________________________ From report at bugs.python.org Sat Oct 13 23:14:29 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Oct 2012 21:14:29 +0000 Subject: [issue16220] wsgiref does not call close() on iterable response In-Reply-To: <1350162020.69.0.603099084932.issue16220@psf.upfronthosting.co.za> Message-ID: <1350162869.46.0.274181823293.issue16220@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This sounds like a reasonable expectation. Do you want to provide a patch? ---------- nosy: +pitrou, pje stage: -> needs patch type: -> behavior versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16220> _______________________________________ From report at bugs.python.org Sat Oct 13 23:14:30 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 13 Oct 2012 21:14:30 +0000 Subject: [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1350162870.07.0.781695358294.issue13538@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching a proposed patch along the lines suggested by ?ric. ---------- keywords: +patch versions: +Python 3.4 Added file: http://bugs.python.org/file27556/issue-13538-1-default.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13538> _______________________________________ From report at bugs.python.org Sat Oct 13 23:55:51 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Sat, 13 Oct 2012 21:55:51 +0000 Subject: [issue14214] test_concurrent_futures hangs In-Reply-To: <1331083850.64.0.939496340029.issue14214@psf.upfronthosting.co.za> Message-ID: <1350165351.11.0.370798280562.issue14214@psf.upfronthosting.co.za> Changes by Nadeem Vawda <nadeem.vawda at gmail.com>: ---------- resolution: -> works for me stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14214> _______________________________________ From report at bugs.python.org Sun Oct 14 00:00:08 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Sat, 13 Oct 2012 22:00:08 +0000 Subject: [issue14120] ARM Ubuntu 3.x buildbot failing test_dbm In-Reply-To: <1330159520.1.0.928033022024.issue14120@psf.upfronthosting.co.za> Message-ID: <1350165608.48.0.117009557162.issue14120@psf.upfronthosting.co.za> Nadeem Vawda added the comment: No sign of these failures any more; looks like that fixed it. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14120> _______________________________________ From report at bugs.python.org Sun Oct 14 00:19:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Oct 2012 22:19:09 +0000 Subject: [issue15958] bytes.join() should allow arbitrary buffer objects In-Reply-To: <1350160597.3365.51.camel@localhost.localdomain> Message-ID: <201210140118.48880.storchaka@gmail.com> Serhiy Storchaka added the comment: Here is a patch with restored performance. Is not it too complicated? ---------- Added file: http://bugs.python.org/file27557/bytes_join_buffers_2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15958> _______________________________________ -------------- next part -------------- diff -r 51ce9830d85a Lib/test/test_bytes.py --- a/Lib/test/test_bytes.py Sat Oct 13 11:58:23 2012 -0400 +++ b/Lib/test/test_bytes.py Sun Oct 14 01:06:42 2012 +0300 @@ -288,8 +288,22 @@ self.assertEqual(self.type2test(b"").join(lst), b"abc") self.assertEqual(self.type2test(b"").join(tuple(lst)), b"abc") self.assertEqual(self.type2test(b"").join(iter(lst)), b"abc") - self.assertEqual(self.type2test(b".").join([b"ab", b"cd"]), b"ab.cd") - # XXX more... + dot_join = self.type2test(b".:").join + self.assertEqual(dot_join([b"ab", b"cd"]), b"ab.:cd") + self.assertEqual(dot_join([memoryview(b"ab"), b"cd"]), b"ab.:cd") + self.assertEqual(dot_join([b"ab", memoryview(b"cd")]), b"ab.:cd") + self.assertEqual(dot_join([bytearray(b"ab"), b"cd"]), b"ab.:cd") + self.assertEqual(dot_join([b"ab", bytearray(b"cd")]), b"ab.:cd") + # Stress it with many items + seq = [b"abc"] * 1000 + expected = b"abc" + b".:abc" * 999 + self.assertEqual(dot_join(seq), expected) + # Error handling and cleanup when some item in the middle of the + # sequence has the wrong type. + with self.assertRaises(TypeError): + dot_join([bytearray(b"ab"), "cd", b"ef"]) + with self.assertRaises(TypeError): + dot_join([memoryview(b"ab"), "cd", b"ef"]) def test_count(self): b = self.type2test(b'mississippi') diff -r 51ce9830d85a Objects/bytearrayobject.c --- a/Objects/bytearrayobject.c Sat Oct 13 11:58:23 2012 -0400 +++ b/Objects/bytearrayobject.c Sun Oct 14 01:06:42 2012 +0300 @@ -2569,75 +2569,126 @@ in between each pair, and return the result as a new bytearray."); static PyObject * -bytearray_join(PyByteArrayObject *self, PyObject *it) +bytearray_join(PyObject *self, PyObject *orig) { - PyObject *seq; - Py_ssize_t mysize = Py_SIZE(self); - Py_ssize_t i; - Py_ssize_t n; - PyObject **items; - Py_ssize_t totalsize = 0; - PyObject *result; - char *dest; - - seq = PySequence_Fast(it, "can only join an iterable"); - if (seq == NULL) + char *sep = PyByteArray_AS_STRING(self); + const Py_ssize_t seplen = PyByteArray_GET_SIZE(self); + PyObject *res = NULL; + char *p; + Py_ssize_t seqlen = 0; + Py_ssize_t sz = 0; + Py_ssize_t i, j, nitems, nbufs; + PyObject *seq, *item; + Py_buffer *buffers = NULL; +#define NB_STATIC_BUFFERS 10 + Py_buffer static_buffers[NB_STATIC_BUFFERS]; + + seq = PySequence_Fast(orig, "can only join an iterable"); + if (seq == NULL) { return NULL; - n = PySequence_Fast_GET_SIZE(seq); - items = PySequence_Fast_ITEMS(seq); - - /* Compute the total size, and check that they are all bytes */ - /* XXX Shouldn't we use _getbuffer() on these items instead? */ - for (i = 0; i < n; i++) { - PyObject *obj = items[i]; - if (!PyByteArray_Check(obj) && !PyBytes_Check(obj)) { - PyErr_Format(PyExc_TypeError, - "can only join an iterable of bytes " - "(item %ld has type '%.100s')", - /* XXX %ld isn't right on Win64 */ - (long)i, Py_TYPE(obj)->tp_name); + } + + seqlen = PySequence_Size(seq); + if (seqlen == 0) { + Py_DECREF(seq); + return PyByteArray_FromStringAndSize("", 0); + } + if (seqlen > NB_STATIC_BUFFERS) { + buffers = PyMem_NEW(Py_buffer, seqlen); + if (buffers == NULL) { + Py_DECREF(seq); + return NULL; + } + } + else { + buffers = static_buffers; + } + + /* There is at least one thing to join. + * Do a pre-pass to figure out the total amount of space we'll + * need (sz), and see whether all arguments are buffer-compatible. + */ + for (i = nitems = nbufs = 0; i < seqlen; i++) { + Py_ssize_t itemlen; + item = PySequence_Fast_GET_ITEM(seq, i); + if (PyBytes_CheckExact(item)) { + Py_INCREF(item); + itemlen = PyBytes_GET_SIZE(item); + } + else { + if (_getbuffer(item, &buffers[nbufs]) < 0) { + PyErr_Format(PyExc_TypeError, + "sequence item %zd: expected bytes, bytearray, " + "or an object with a buffer interface, %.80s found", + i, Py_TYPE(item)->tp_name); + goto error; + } + itemlen = buffers[nbufs].len; + nbufs++; + } + nitems = i + 1; /* for error cleanup */ + if (itemlen > PY_SSIZE_T_MAX - sz) { + PyErr_SetString(PyExc_OverflowError, + "join() result is too long for bytes"); goto error; } - if (i > 0) - totalsize += mysize; - totalsize += Py_SIZE(obj); - if (totalsize < 0) { - PyErr_NoMemory(); - goto error; + sz += itemlen; + if (i != 0) { + if (seplen > PY_SSIZE_T_MAX - sz) { + PyErr_SetString(PyExc_OverflowError, + "join() result is too long for bytes"); + goto error; + } + sz += seplen; } } - /* Allocate the result, and copy the bytes */ - result = PyByteArray_FromStringAndSize(NULL, totalsize); - if (result == NULL) + /* Allocate result space. */ + res = PyByteArray_FromStringAndSize((char *) NULL, sz); + if (res == NULL) goto error; - dest = PyByteArray_AS_STRING(result); - for (i = 0; i < n; i++) { - PyObject *obj = items[i]; - Py_ssize_t size = Py_SIZE(obj); - char *buf; - if (PyByteArray_Check(obj)) - buf = PyByteArray_AS_STRING(obj); + + /* Catenate everything. */ + p = PyByteArray_AS_STRING(res); + for (i = j = 0; i < seqlen; ++i) { + Py_ssize_t n; + char *q; + if (i) { + Py_MEMCPY(p, sep, seplen); + p += seplen; + } + item = PySequence_Fast_GET_ITEM(seq, i); + if (j < nbufs && buffers[i].obj == item) { + n = buffers[j].len; + q = buffers[j].buf; + j++; + } + else { + n = PyBytes_GET_SIZE(item); + q = PyBytes_AS_STRING(item); + } + Py_MEMCPY(p, q, n); + p += n; + } + goto done; + +error: + res = NULL; +done: + Py_DECREF(seq); + for (i = j = 0; i < nitems; i++) { + item = PySequence_Fast_GET_ITEM(seq, i); + if (j < nbufs && buffers[i].obj == item) + PyBuffer_Release(&buffers[j++]); else - buf = PyBytes_AS_STRING(obj); - if (i) { - memcpy(dest, self->ob_bytes, mysize); - dest += mysize; - } - memcpy(dest, buf, size); - dest += size; + Py_DECREF(item); } - - /* Done */ - Py_DECREF(seq); - return result; - - /* Error handling */ - error: - Py_DECREF(seq); - return NULL; + if (buffers != static_buffers) + PyMem_FREE(buffers); + return res; } + PyDoc_STRVAR(splitlines__doc__, "B.splitlines([keepends]) -> list of lines\n\ \n\ diff -r 51ce9830d85a Objects/bytesobject.c --- a/Objects/bytesobject.c Sat Oct 13 11:58:23 2012 -0400 +++ b/Objects/bytesobject.c Sun Oct 14 01:06:42 2012 +0300 @@ -1114,11 +1114,14 @@ PyObject *res = NULL; char *p; Py_ssize_t seqlen = 0; - size_t sz = 0; - Py_ssize_t i; + Py_ssize_t sz = 0; + Py_ssize_t i, j, nitems, nbufs; PyObject *seq, *item; - - seq = PySequence_Fast(orig, ""); + Py_buffer *buffers = NULL; +#define NB_STATIC_BUFFERS 10 + Py_buffer static_buffers[NB_STATIC_BUFFERS]; + + seq = PySequence_Fast(orig, "can only join an iterable"); if (seq == NULL) { return NULL; } @@ -1136,64 +1139,99 @@ return item; } } - - /* There are at least two things to join, or else we have a subclass - * of the builtin types in the sequence. - * Do a pre-pass to figure out the total amount of space we'll - * need (sz), and see whether all argument are bytes. - */ - /* XXX Shouldn't we use _getbuffer() on these items instead? */ - for (i = 0; i < seqlen; i++) { - const size_t old_sz = sz; - item = PySequence_Fast_GET_ITEM(seq, i); - if (!PyBytes_Check(item) && !PyByteArray_Check(item)) { - PyErr_Format(PyExc_TypeError, - "sequence item %zd: expected bytes," - " %.80s found", - i, Py_TYPE(item)->tp_name); - Py_DECREF(seq); - return NULL; - } - sz += Py_SIZE(item); - if (i != 0) - sz += seplen; - if (sz < old_sz || sz > PY_SSIZE_T_MAX) { - PyErr_SetString(PyExc_OverflowError, - "join() result is too long for bytes"); + if (seqlen > NB_STATIC_BUFFERS) { + buffers = PyMem_NEW(Py_buffer, seqlen); + if (buffers == NULL) { Py_DECREF(seq); return NULL; } } + else { + buffers = static_buffers; + } + + /* There are at least two things to join, or else we have a subclass + * of the builtin types in the sequence. + * Do a pre-pass to figure out the total amount of space we'll + * need (sz), and see whether all arguments are buffer-compatible. + */ + for (i = nitems = nbufs = 0; i < seqlen; i++) { + Py_ssize_t itemlen; + item = PySequence_Fast_GET_ITEM(seq, i); + if (PyBytes_CheckExact(item)) { + Py_INCREF(item); + itemlen = PyBytes_GET_SIZE(item); + } + else { + if (_getbuffer(item, &buffers[nbufs]) < 0) { + PyErr_Format(PyExc_TypeError, + "sequence item %zd: expected bytes, bytearray, " + "or an object with a buffer interface, %.80s found", + i, Py_TYPE(item)->tp_name); + goto error; + } + itemlen = buffers[nbufs].len; + nbufs++; + } + nitems = i + 1; /* for error cleanup */ + if (itemlen > PY_SSIZE_T_MAX - sz) { + PyErr_SetString(PyExc_OverflowError, + "join() result is too long for bytes"); + goto error; + } + sz += itemlen; + if (i != 0) { + if (seplen > PY_SSIZE_T_MAX - sz) { + PyErr_SetString(PyExc_OverflowError, + "join() result is too long for bytes"); + goto error; + } + sz += seplen; + } + } /* Allocate result space. */ - res = PyBytes_FromStringAndSize((char*)NULL, sz); - if (res == NULL) { - Py_DECREF(seq); - return NULL; - } + res = PyBytes_FromStringAndSize((char *) NULL, sz); + if (res == NULL) + goto error; /* Catenate everything. */ - /* I'm not worried about a PyByteArray item growing because there's - nowhere in this function where we release the GIL. */ p = PyBytes_AS_STRING(res); - for (i = 0; i < seqlen; ++i) { - size_t n; + for (i = j = 0; i < seqlen; ++i) { + Py_ssize_t n; char *q; if (i) { Py_MEMCPY(p, sep, seplen); p += seplen; } item = PySequence_Fast_GET_ITEM(seq, i); - n = Py_SIZE(item); - if (PyBytes_Check(item)) + if (j < nbufs && buffers[i].obj == item) { + n = buffers[j].len; + q = buffers[j].buf; + j++; + } + else { + n = PyBytes_GET_SIZE(item); q = PyBytes_AS_STRING(item); - else - q = PyByteArray_AS_STRING(item); + } Py_MEMCPY(p, q, n); p += n; } - + goto done; + +error: + res = NULL; +done: Py_DECREF(seq); + for (i = j = 0; i < nitems; i++) { + item = PySequence_Fast_GET_ITEM(seq, i); + if (j < nbufs && buffers[i].obj == item) + PyBuffer_Release(&buffers[j++]); + else + Py_DECREF(item); + } + if (buffers != static_buffers) + PyMem_FREE(buffers); return res; } From report at bugs.python.org Sun Oct 14 00:22:26 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 13 Oct 2012 22:22:26 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350159366.03.0.713338541627.issue16212@psf.upfronthosting.co.za> Message-ID: <CAH_1eM27YrxZxWaLgPKsH-NP==5ePzRuqL+ZRG49cgXzZNJyqA@mail.gmail.com> Charles-Fran?ois Natali added the comment: > I know how to avoid the problem in my case, the bug does not really affect me. I posted it because I thought that the possibility to crash the interpreter is something to be avoided at all costs. I fully agree with you. However, that's a problem inherent to mmap(), and I don't think there's a way to avoid this, but I could be wrong. > I've found a few examples of handling non-restartable signals with longjmps, but not that familiar with the codebase to estimate how reliably it can be done on all supported platforms. I don't really know how this code would behave, say, on Windows. You can't use longjmp from signal handlers. Well, you can, but 99% of the code that does it is broken, because you can only call async-safe functions from within a signal handler, and certainly can't run the intepreter. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16212> _______________________________________ From report at bugs.python.org Sun Oct 14 00:23:25 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Oct 2012 22:23:25 +0000 Subject: [issue15958] bytes.join() should allow arbitrary buffer objects In-Reply-To: <1347905010.83.0.632444428638.issue15958@psf.upfronthosting.co.za> Message-ID: <1350167005.38.0.546504309562.issue15958@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The problem with your approach is that the sequence could be mutated while another thread is running (_getbuffer() may release the GIL). Then the pre-computed size gets wrong. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15958> _______________________________________ From report at bugs.python.org Sun Oct 14 00:26:13 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Sat, 13 Oct 2012 22:26:13 +0000 Subject: [issue14229] On KeyboardInterrupt, the exit code should mirror the signal number In-Reply-To: <1331238085.62.0.936420173713.issue14229@psf.upfronthosting.co.za> Message-ID: <1350167173.59.0.224907857917.issue14229@psf.upfronthosting.co.za> Changes by Nadeem Vawda <nadeem.vawda at gmail.com>: ---------- resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14229> _______________________________________ From report at bugs.python.org Sun Oct 14 00:27:03 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Oct 2012 22:27:03 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350050663.98.0.0365442687476.issue16212@psf.upfronthosting.co.za> Message-ID: <1350167223.63.0.854560697499.issue16212@psf.upfronthosting.co.za> Antoine Pitrou added the comment: A pity Posix isn't smart enough to refuse truncate()ing when there's a mmap open on the affected pages. Python 3's buffer API is superior in that respect :-) ---------- nosy: +pitrou _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16212> _______________________________________ From report at bugs.python.org Sun Oct 14 00:40:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Oct 2012 22:40:44 +0000 Subject: [issue15958] bytes.join() should allow arbitrary buffer objects In-Reply-To: <1350167005.38.0.546504309562.issue15958@psf.upfronthosting.co.za> Message-ID: <201210140140.29399.storchaka@gmail.com> Serhiy Storchaka added the comment: > The problem with your approach is that the sequence could be mutated while > another thread is running (_getbuffer() may release the GIL). Then the > pre-computed size gets wrong. Well, then I withdraw my patch. But what if the sequence will be mutated and PySequence_Size(seq) will become less seqlen? Then using PySequence_Fast_GET_ITEM() will be incorrect. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15958> _______________________________________ From report at bugs.python.org Sun Oct 14 00:42:50 2012 From: report at bugs.python.org (Trent Nelson) Date: Sat, 13 Oct 2012 22:42:50 +0000 Subject: [issue15298] _sysconfigdata is generated in srcdir, not builddir In-Reply-To: <1341782776.55.0.708234468774.issue15298@psf.upfronthosting.co.za> Message-ID: <1350168170.12.0.229708593944.issue15298@psf.upfronthosting.co.za> Changes by Trent Nelson <trent at snakebite.org>: Removed file: http://bugs.python.org/file27552/issue15298-alt_sysconfigdata2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15298> _______________________________________ From report at bugs.python.org Sun Oct 14 00:47:18 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Oct 2012 22:47:18 +0000 Subject: [issue15958] bytes.join() should allow arbitrary buffer objects In-Reply-To: <201210140140.29399.storchaka@gmail.com> Message-ID: <1350168337.3365.54.camel@localhost.localdomain> Antoine Pitrou added the comment: > But what if the sequence will be mutated and PySequence_Size(seq) will become > less seqlen? Then using PySequence_Fast_GET_ITEM() will be incorrect. Perhaps we should detect that case and raise, then. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15958> _______________________________________ From report at bugs.python.org Sun Oct 14 00:57:46 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 13 Oct 2012 22:57:46 +0000 Subject: [issue15936] Add link from os.urandom to random.SystemRandom In-Reply-To: <1347487742.57.0.57747338883.issue15936@psf.upfronthosting.co.za> Message-ID: <1350169066.23.0.719690574166.issue15936@psf.upfronthosting.co.za> Changes by Chris Jerdonek <chris.jerdonek at gmail.com>: ---------- nosy: +christian.heimes _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15936> _______________________________________ From report at bugs.python.org Sun Oct 14 01:02:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Oct 2012 23:02:01 +0000 Subject: [issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings In-Reply-To: <1287161682.26.0.892900314694.issue10117@psf.upfronthosting.co.za> Message-ID: <1350169321.49.0.0436241215356.issue10117@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10117> _______________________________________ From report at bugs.python.org Sun Oct 14 01:27:46 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sat, 13 Oct 2012 23:27:46 +0000 Subject: [issue16201] socket.gethostbyname incorrectly parses ip In-Reply-To: <1349983863.01.0.255097510924.issue16201@psf.upfronthosting.co.za> Message-ID: <1350170866.53.0.780989263744.issue16201@psf.upfronthosting.co.za> Michele Orr? added the comment: Updated && tested on GNU/Linux (gcc). ---------- Added file: http://bugs.python.org/file27558/issue16201.3.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16201> _______________________________________ From report at bugs.python.org Sun Oct 14 01:28:17 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Oct 2012 23:28:17 +0000 Subject: [issue15958] bytes.join() should allow arbitrary buffer objects In-Reply-To: <1347905010.83.0.632444428638.issue15958@psf.upfronthosting.co.za> Message-ID: <1350170897.8.0.0789442330208.issue15958@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: Removed file: http://bugs.python.org/file27557/bytes_join_buffers_2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15958> _______________________________________ From report at bugs.python.org Sun Oct 14 02:26:47 2012 From: report at bugs.python.org (Phillip J. Eby) Date: Sun, 14 Oct 2012 00:26:47 +0000 Subject: [issue16220] wsgiref does not call close() on iterable response In-Reply-To: <1350162020.69.0.603099084932.issue16220@psf.upfronthosting.co.za> Message-ID: <1350174407.03.0.74465567195.issue16220@psf.upfronthosting.co.za> Phillip J. Eby added the comment: FYI, this looks like a bug in wsgiref.handlers.BaseHandler.finish_response(), which should probably be using a try/finally to ensure .close() gets called. (Which would catch a failed write() to the client.) I'm kind of amazed this has gone undetected this long, but I guess that either: 1. other servers are probably catching errors from .run() and closing, 2. they're not using BaseHandler in their implementation, or 3. most apps don't have anything that essential in close() and/or the clients don't disconnect that often. ;-) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16220> _______________________________________ From report at bugs.python.org Sun Oct 14 02:29:18 2012 From: report at bugs.python.org (Vladimir Ushakov) Date: Sun, 14 Oct 2012 00:29:18 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350050663.98.0.0365442687476.issue16212@psf.upfronthosting.co.za> Message-ID: <1350174558.04.0.433036834584.issue16212@psf.upfronthosting.co.za> Vladimir Ushakov added the comment: > You can't use longjmp from signal handlers. Well, you can, but 99% of the code that does it is broken, because you can only call async-safe functions from within a signal handler, and certainly can't run the intepreter. I don't see the reason to run the interpreter. But a quick look at the source shows that the current implementation already uses longjmps to handle SIGFPE (see pyfpe.h and fpectlmodule.c). It seems to be in use on many platforms. The only problem I see so far is the possibility that we have to protect too much. However, as I could guess from quickly browsing through the mmap() implementation, the address of the mmap()ed region never leaves the module, all accesses are done using exported methods. If it is really the case, we can wrap them into something similar to PyFPE_START_PROTECT() and PyFPE_END_PROTECT() (see comments in pyfpe.h). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16212> _______________________________________ From report at bugs.python.org Sun Oct 14 04:16:27 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Sun, 14 Oct 2012 02:16:27 +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: <1350180987.79.0.937123973155.issue10050@psf.upfronthosting.co.za> Nadeem Vawda added the comment: Are we still planning on removing URLopener and FancyURLopener in 3.4? The documentation for 3.3 does not list these classes as deprecated. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10050> _______________________________________ From report at bugs.python.org Sun Oct 14 04:53:14 2012 From: report at bugs.python.org (Tim Peters) Date: Sun, 14 Oct 2012 02:53:14 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1350183194.44.0.445184224545.issue16203@psf.upfronthosting.co.za> Tim Peters added the comment: Serhiy, I expect this is easy to implement _inside_ the regexp engine. The complications come from trying to do it outside the engine. But even there, wrapping the original regexp <re> in (?:<re>)\Z is at worst very close. The only insecurity with that I've thought of concerns the doc's warnings about what can appear before an inline re.VERBOSE flag. It probably works fine even if <re> does begin with (?...x....). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16203> _______________________________________ From report at bugs.python.org Sun Oct 14 05:11:51 2012 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 14 Oct 2012 03:11:51 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1350184311.55.0.574715745238.issue16203@psf.upfronthosting.co.za> Matthew Barnett added the comment: It certainly appears to ignore the whitespace, even if the "(?x)" is at the end of the pattern or in the middle of a group. Another point we need to consider is that the user might want to use a pre-compiled pattern. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16203> _______________________________________ From report at bugs.python.org Sun Oct 14 05:41:10 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 14 Oct 2012 03:41:10 +0000 Subject: [issue10050] urllib.request still has old 2.x urllib primitives In-Reply-To: <1350180987.79.0.937123973155.issue10050@psf.upfronthosting.co.za> Message-ID: <CAPOVWOSOD2X9w=Yzm5eb0yxUqP05fxNHrNaqsswLN-TQtQ5oUw@mail.gmail.com> Senthil Kumaran added the comment: Only the classes which are marked as deprecated are allowed removed in the next release. So the ones which we marked as deprecated in 3.3 can safely go in 3.4. URLopener and FancyURLopener AFAIR had some dependency/ usage, deprecating those may require some refactoring of the existing code. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10050> _______________________________________ From report at bugs.python.org Sun Oct 14 06:15:32 2012 From: report at bugs.python.org (Eric Snow) Date: Sun, 14 Oct 2012 04:15:32 +0000 Subject: [issue12486] tokenize module should have a unicode API In-Reply-To: <1309751897.67.0.332272921906.issue12486@psf.upfronthosting.co.za> Message-ID: <1350188132.52.0.672557687133.issue12486@psf.upfronthosting.co.za> Changes by Eric Snow <ericsnowcurrently at gmail.com>: _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12486> _______________________________________ From report at bugs.python.org Sun Oct 14 07:01:14 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 14 Oct 2012 05:01:14 +0000 Subject: [issue15936] Add link from os.urandom to random.SystemRandom In-Reply-To: <1347487742.57.0.57747338883.issue15936@psf.upfronthosting.co.za> Message-ID: <1350190874.91.0.735414666441.issue15936@psf.upfronthosting.co.za> Ramchandra Apte added the comment: It should also mention that os.urandom is a low-level interface. ---------- nosy: +ramchandra.apte _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15936> _______________________________________ From report at bugs.python.org Sun Oct 14 07:26:56 2012 From: report at bugs.python.org (Eric Snow) Date: Sun, 14 Oct 2012 05:26:56 +0000 Subject: [issue16221] tokenize.untokenize() "compat" mode misses the encoding when using an iterator Message-ID: <1350192416.31.0.110132465833.issue16221@psf.upfronthosting.co.za> New submission from Eric Snow: While traversing the passed iterable, untokenize() will go to "compatibility mode" one it hits a 2-tuple instead of a 5-tuple (coming from the iterable). That token will not go through the normal steps that other tokens do. Most critically, if that token is the ENCODING token, the source is not encoded to that encoding at the end (even though it should have been). I'll have a patch up in a moment (for the tip of default). There are a couple of other issues at hand that I will bring up separately. ---------- assignee: eric.snow messages: 172848 nosy: eric.snow priority: normal severity: normal stage: test needed status: open title: tokenize.untokenize() "compat" mode misses the encoding when using an iterator type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16221> _______________________________________ From report at bugs.python.org Sun Oct 14 07:29:31 2012 From: report at bugs.python.org (Eric Snow) Date: Sun, 14 Oct 2012 05:29:31 +0000 Subject: [issue16221] tokenize.untokenize() "compat" mode misses the encoding when using an iterator In-Reply-To: <1350192416.31.0.110132465833.issue16221@psf.upfronthosting.co.za> Message-ID: <1350192571.77.0.714337634108.issue16221@psf.upfronthosting.co.za> Changes by Eric Snow <ericsnowcurrently at gmail.com>: ---------- keywords: +patch stage: test needed -> patch review Added file: http://bugs.python.org/file27559/untokenize_compat.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16221> _______________________________________ From report at bugs.python.org Sun Oct 14 07:41:36 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 05:41:36 +0000 Subject: [issue16222] "server-side clone" not found by devguide's search box Message-ID: <1350193296.32.0.998873485723.issue16222@psf.upfronthosting.co.za> New submission from Chris Jerdonek: Neither searching for "server-side" nor "clone" in the devguide "Quick Search" box pulls up the mention of server-side clones: http://docs.python.org/devguide/committing.html#long-term-development-of-features ---------- components: Devguide messages: 172849 nosy: chris.jerdonek, eric.araujo, ezio.melotti, ncoghlan priority: normal severity: normal status: open title: "server-side clone" not found by devguide's search box type: enhancement _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16222> _______________________________________ From report at bugs.python.org Sun Oct 14 07:49:11 2012 From: report at bugs.python.org (Eric Snow) Date: Sun, 14 Oct 2012 05:49:11 +0000 Subject: [issue16223] untokenize returns a string if no encoding token is recognized Message-ID: <1350193751.15.0.784217855065.issue16223@psf.upfronthosting.co.za> New submission from Eric Snow: If you pass an iterable of tokens and none of them are an ENCODING token, tokenize.untokenize() returns a string. This is contrary to what the docs say: It returns bytes, encoded using the ENCODING token, which is the first token sequence output by tokenize(). Either the docs should be clarified or untokenize() fixed. My vote is to fix it. It could check that the first token is an ENCODING token and raise an exception. Alternately it could fall back to using 'utf-8' by default. [1] http://docs.python.org/py3k/library/tokenize.html#tokenize.untokenize ---------- messages: 172850 nosy: eric.snow priority: normal severity: normal stage: test needed status: open title: untokenize returns a string if no encoding token is recognized type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16223> _______________________________________ From report at bugs.python.org Sun Oct 14 08:04:53 2012 From: report at bugs.python.org (Eric Snow) Date: Sun, 14 Oct 2012 06:04:53 +0000 Subject: [issue16224] tokenize.untokenize() misbehaves when moved to "compatiblity mode" Message-ID: <1350194693.62.0.576275883555.issue16224@psf.upfronthosting.co.za> New submission from Eric Snow: When tokenize.untokenize() encounters a 2-tuple, it moves to compatibility mode, where only the token type and string are used from that point forward. There are two closely related problems: * when the iterable is a sequence, the portion of the sequence prior to the 2-tuple is traversed a second time under compatibility mode. * when the iterable is an iterator, the first 2-tuple encountered is essentially gobbled up (see issue16221). Either an explicit "iterable = iter(iterable)" or "iterable = list(iterable)" should happen at the very beginning of Untokenizer.untokenize(). If the former, Untokenizer.compat() should be fixed to not treat that first token differently. If the latter, self.tokens should be cleared at the beginning of Untokenizer.compat(). I'll put up a patch with the second option when I get a chance. ---------- assignee: eric.snow components: Library (Lib) messages: 172851 nosy: eric.snow priority: normal severity: normal stage: test needed status: open title: tokenize.untokenize() misbehaves when moved to "compatiblity mode" type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16224> _______________________________________ From report at bugs.python.org Sun Oct 14 08:05:59 2012 From: report at bugs.python.org (Eric Snow) Date: Sun, 14 Oct 2012 06:05:59 +0000 Subject: [issue16221] tokenize.untokenize() "compat" mode misses the encoding when using an iterator In-Reply-To: <1350192416.31.0.110132465833.issue16221@psf.upfronthosting.co.za> Message-ID: <1350194759.19.0.278645361605.issue16221@psf.upfronthosting.co.za> Eric Snow added the comment: issue16224 _may_ supercede this ticket. ---------- components: +Library (Lib) _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16221> _______________________________________ From report at bugs.python.org Sun Oct 14 08:18:57 2012 From: report at bugs.python.org (Eric Snow) Date: Sun, 14 Oct 2012 06:18:57 +0000 Subject: [issue16224] tokenize.untokenize() misbehaves when moved to "compatiblity mode" In-Reply-To: <1350194693.62.0.576275883555.issue16224@psf.upfronthosting.co.za> Message-ID: <1350195537.23.0.284182123503.issue16224@psf.upfronthosting.co.za> Eric Snow added the comment: Actually, here's a patch with the first option. It preserves iterators as iterators, rather than dumping them into a list. I've also rolled the tests from issue16221 into this patch. Consequently, if the patch is suitable, that issue can be closed. ---------- keywords: +patch stage: test needed -> patch review Added file: http://bugs.python.org/file27560/untokenize_compat_force_iter.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16224> _______________________________________ From report at bugs.python.org Sun Oct 14 08:20:58 2012 From: report at bugs.python.org (Eric Snow) Date: Sun, 14 Oct 2012 06:20:58 +0000 Subject: [issue16221] tokenize.untokenize() "compat" mode misses the encoding when using an iterator In-Reply-To: <1350192416.31.0.110132465833.issue16221@psf.upfronthosting.co.za> Message-ID: <1350195658.47.0.440911173202.issue16221@psf.upfronthosting.co.za> Eric Snow added the comment: The patch that I have in #16224 takes care of this issue. If that issue goes in another direction however... ---------- status: open -> pending superseder: -> tokenize.untokenize() misbehaves when moved to "compatiblity mode" _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16221> _______________________________________ From report at bugs.python.org Sun Oct 14 09:27:28 2012 From: report at bugs.python.org (Ian Carr-de Avelon) Date: Sun, 14 Oct 2012 07:27:28 +0000 Subject: [issue16225] list.remove in for loop Message-ID: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> New submission from Ian Carr-de Avelon: I'm new to Python and I've hit what appears to me to be a bug, but may be a "feature", so a tutorial bug. I tried to loop through the items in a list, test each and remove those which fail the test. Simplifying to illustrate: >>> print test [1, 2, 3, 4, 5] >>> for item in test: ... print item ... test.remove(item) ... 1 3 5 >>> print test [2, 4] Whereas I would expect to see all items looped through and non left in the list. I have worked with languages where you are explicitly warned that you must not mess with the loop variable, or where the behaviour you will get is explained in detail, so you can use it. Not having anything flagged up in eg 5.6. Looping Techniques on http://docs.python.org/tutorial/datastructures.html I assumed that the behaviour would be safe and intuative. Yours Ian ---------- messages: 172855 nosy: Ian priority: normal severity: normal status: open title: list.remove in for loop versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16225> _______________________________________ From report at bugs.python.org Sun Oct 14 09:36:46 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 07:36:46 +0000 Subject: [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350200206.95.0.394300478856.issue16225@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I have worked with languages where you are explicitly warned that you must not mess with the loop variable There is a warning in this part of the tutorial: "It is not safe to modify the sequence being iterated over in the loop..." (from http://docs.python.org/dev/tutorial/controlflow.html#for-statements ) But it may be good to add a note to the section you reference as well. ---------- assignee: -> docs at python components: +Documentation nosy: +chris.jerdonek, docs at python _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16225> _______________________________________ From report at bugs.python.org Sun Oct 14 09:55:59 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 14 Oct 2012 07:55:59 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350174558.04.0.433036834584.issue16212@psf.upfronthosting.co.za> Message-ID: <CAH_1eM0A+mksUK0x+9y58-0-QbpUFA7+TFhxQ2aVTC31TAdYJw@mail.gmail.com> Charles-Fran?ois Natali added the comment: >> You can't use longjmp from signal handlers. Well, you can, but 99% of the code that does it is broken, because you can only call async-safe functions from within a signal handler, and certainly can't run the intepreter. > > I don't see the reason to run the interpreter. But a quick look at the source shows that the current implementation already uses longjmps to handle SIGFPE (see pyfpe.h and fpectlmodule.c). It seems to be in use on many platforms. > > The only problem I see so far is the possibility that we have to protect too much. However, as I could guess from quickly browsing through the mmap() implementation, the address of the mmap()ed region never leaves the module, all accesses are done using exported methods. If it is really the case, we can wrap them into something similar to PyFPE_START_PROTECT() and PyFPE_END_PROTECT() (see comments in pyfpe.h). SIGFPE is not handled by default (it's not generated by default, you get NaN and friends). I don't think there a re many uses of the fpe module, because it's inherently unsafe. For example, in our case, let's say you want to protect mmap_item(): what do you in case of SIGBUS? Use longjmp to jump out of the signal handler and raise an exception? That won't work, because you'll still be running on behalf of the signal handler, so as soon as you call a non async safe function (or non reentrant code), you'll deadlock, crash, or suffer from all the consequences of undefined behavior, which is much more dangerous than crashing on a SIGBUS. The *only* thing you can do is exit. Please have a look at this: https://www.securecoding.cert.org/confluence/display/seccode/SIG35-C.+Do+not+return+from+SIGSEGV,+SIGILL,+or+SIGFPE+signal+handlers https://www.securecoding.cert.org/confluence/display/seccode/SIG32-C.+Do+not+call+longjmp%28%29+from+inside+a+signal+handler > A pity Posix isn't smart enough to refuse truncate()ing when there's a mmap open on the affected pages. Python 3's buffer API is superior in that respect :-) Yes, but Python only cares about the current process. Here the exact same problem occurs if the file is truncated by another process: performing such checks for all the processes would be awfuly expensive (and probably impossible in a race-free way). Also, it's probably impossible to do on e.g. NFS mmaped files (the server is stateless). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16212> _______________________________________ From report at bugs.python.org Sun Oct 14 10:41:17 2012 From: report at bugs.python.org (Brent Tubbs) Date: Sun, 14 Oct 2012 08:41:17 +0000 Subject: [issue16220] wsgiref does not call close() on iterable response In-Reply-To: <1350162020.69.0.603099084932.issue16220@psf.upfronthosting.co.za> Message-ID: <1350204077.63.0.926689510574.issue16220@psf.upfronthosting.co.za> Brent Tubbs added the comment: Patch attached. I ran into this while trying to figure out why close() wasn't being called while running the Django dev server, which inherits from wsgiref's BaseHandler. So I'm also surprised that it's gone unnoticed so long. Thanks for the quick attention and encouragement on this! ---------- keywords: +patch Added file: http://bugs.python.org/file27561/wsgiref_close.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16220> _______________________________________ From report at bugs.python.org Sun Oct 14 10:44:09 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Oct 2012 08:44:09 +0000 Subject: [issue15819] Unable to build Python out-of-tree when source tree is readonly. In-Reply-To: <1346309362.14.0.312540957077.issue15819@psf.upfronthosting.co.za> Message-ID: <1350204249.79.0.0986791547135.issue15819@psf.upfronthosting.co.za> Changes by STINNER Victor <victor.stinner at gmail.com>: ---------- nosy: +haypo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15819> _______________________________________ From report at bugs.python.org Sun Oct 14 10:51:05 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Oct 2012 08:51:05 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350050663.98.0.0365442687476.issue16212@psf.upfronthosting.co.za> Message-ID: <1350204665.36.0.576943346025.issue16212@psf.upfronthosting.co.za> STINNER Victor added the comment: > I've found a few examples of handling non-restartable signals > with longjmps, but not that familiar with the codebase to estimate > how reliably it can be done on all supported platforms. > I don't really know how this code would behave, say, on Windows. I proposed a generic signal handler for SIGSEGV (SIGFPE, SIGILL and SIGBUS) converting the fatal signal to a classic Python exception: issue issue #3999. The idea was rejected by most core developers because it's just impossible to guarantee that Python internal structures are still consistent. A signal can occur anywhere, the longjmp() will skip all "cleanup" instructions and so it's easy to get into a deadlock case. So I proposed to display a Python traceback on such signal and just exit. For your specific case, it would much better if the kernel handles the case. > I thought that the possibility to crash the interpreter > is something to be avoided at all costs. It's quite easy to crash Python using extensions implemented in C. A simple example: ctypes.string_at(0). For your specific case, you should develop an extension which sets a signal handler before reading the mmap and then restore the old signal handler after. It might be safe if the signal handler protects a single instruction, but it's very hard to develop a signal handler for such critical signals (SIGSEGV and friends). I suggest to just close this issue as "wont fix". Python cannot do anything useful in a safe manner against this "OS bug". ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16212> _______________________________________ From report at bugs.python.org Sun Oct 14 11:04:48 2012 From: report at bugs.python.org (Vladimir Ushakov) Date: Sun, 14 Oct 2012 09:04:48 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350050663.98.0.0365442687476.issue16212@psf.upfronthosting.co.za> Message-ID: <1350205488.51.0.396212784135.issue16212@psf.upfronthosting.co.za> Vladimir Ushakov added the comment: SIGBUS as well as SIGFPE or SIGSEGV is a synchronous signal. It is delivered to the thread that caused the trouble and the stack contents is well defined. > https://www.securecoding.cert.org/confluence/display/seccode/SIG35-C.+Do+not+return+from+SIGSEGV,+SIGILL,+or+SIGFPE+signal+handlers Does not apply here: longjmp is not a return. > https://www.securecoding.cert.org/confluence/display/seccode/SIG32-C.+Do+not+call+longjmp%28%29+from+inside+a+signal+handler The grounds are weak. They refer to SIG30-C, which is based on ISO C standard. POSIX explicitly declares the fact that longjmp is allowed to exit signal handlers as an extension to ISO C standard. (See http://pubs.opengroup.org/onlinepubs/9699919799/) Besides, POSIX explicitly states that only async-signal-safe functions can be called from the handlers, which "are invoked asynchronously with process execution". That's not out case as mentioned above, we are not in asynchronous context as it could be with, say, SIGINT. (See http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_04.html) Glibc doesn't mind as well: http://www.gnu.org/software/libc/manual/html_node/Longjmp-in-Handler.html I can doubt about non-POSIX platforms, but with POSIX everything seems clean to me. Especially since the method is already in use with SIGFPE. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16212> _______________________________________ From report at bugs.python.org Sun Oct 14 11:06:25 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 09:06:25 +0000 Subject: [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350205585.98.0.940836585732.issue16225@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attached is a simple way of addressing this (essentially copying the verbiage and example from the other page). If we want, we could make the sample code different so that the reader doesn't see the same thing twice. ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file27562/issue-16225-1-default.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16225> _______________________________________ From report at bugs.python.org Sun Oct 14 11:09:51 2012 From: report at bugs.python.org (Vladimir Ushakov) Date: Sun, 14 Oct 2012 09:09:51 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350050663.98.0.0365442687476.issue16212@psf.upfronthosting.co.za> Message-ID: <1350205791.41.0.580131003132.issue16212@psf.upfronthosting.co.za> Vladimir Ushakov added the comment: > For your specific case, you should... There's nothing I should. As I said above, the bug doesn't trouble me. I just posted it as a generic contribution and don't really care whether it's going to be fixed or not. If decided so, I could help. Otherwise I'll just mind my business. :) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16212> _______________________________________ From report at bugs.python.org Sun Oct 14 11:17:59 2012 From: report at bugs.python.org (Francisco Gracia) Date: Sun, 14 Oct 2012 09:17:59 +0000 Subject: [issue16226] IDLE crashes on *File / Path browser* Message-ID: <1350206279.5.0.670551753566.issue16226@psf.upfronthosting.co.za> New submission from Francisco Gracia: The menu option *File / Path browser* (as well in the *Shell* window as in the *Editor* one) shows a new window with a tree structure rooted at *sys.path*. The available leaf nodes show the *plus* sign that usually implies that they can be expanded by clicking on the desired one. On the performance of this action IDLE disappears immediately. If one clicks just on the legend of the node, IDLE remains undisturbed but nothing more happens. Idle's help says: *File Menu: ... Path Browser -- Show sys.path directories, modules, classes and methods* so that apparently the expansion should also work. I suppose that this command would be mostly used at the initial phases of learning Python (at least I would have done it if I had noticed then its existence and function), but its present status does not favor such didactic purpose. Regards ---------- components: IDLE messages: 172863 nosy: fgracia priority: normal severity: normal status: open title: IDLE crashes on *File / Path browser* type: crash versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16226> _______________________________________ From report at bugs.python.org Sun Oct 14 11:20:20 2012 From: report at bugs.python.org (Vladimir Ushakov) Date: Sun, 14 Oct 2012 09:20:20 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350050663.98.0.0365442687476.issue16212@psf.upfronthosting.co.za> Message-ID: <1350206420.79.0.0141447829207.issue16212@psf.upfronthosting.co.za> Vladimir Ushakov added the comment: > ...it's just impossible to guarantee that Python internal structures are still consistent. In generic case, I completely agree. Here the things are much simpler (unless I missed something). We know perfectly well the code we need to protect (mmap accessors). We can make the protected sections small enough to ensure that no internal state gets corrupted. I just feel, I can do it simply and safely. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16212> _______________________________________ From report at bugs.python.org Sun Oct 14 11:30:04 2012 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 14 Oct 2012 09:30:04 +0000 Subject: [issue16227] Change unicode howtos as misleading Message-ID: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> New submission from Mark Lawrence: For http://docs.python.org/howto/unicode.html (that's Python 2.7.3) and http://docs.python.org/release/3.1.5/howto/unicode.html the first paragraph states "(This HOWTO has not yet been updated to cover the 3.x versions of Python.)". I suggest this is changed to read something like "Release 1.12 onwards of this document covers the 3.2 Python versions onwards." ---------- assignee: docs at python components: Documentation messages: 172865 nosy: BreamoreBoy, docs at python priority: normal severity: normal status: open title: Change unicode howtos as misleading type: enhancement versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16227> _______________________________________ From report at bugs.python.org Sun Oct 14 11:50:40 2012 From: report at bugs.python.org (Vladimir Ushakov) Date: Sun, 14 Oct 2012 09:50:40 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350050663.98.0.0365442687476.issue16212@psf.upfronthosting.co.za> Message-ID: <1350208240.46.0.588960528656.issue16212@psf.upfronthosting.co.za> Vladimir Ushakov added the comment: Update: The correct link to the POSIX definition of longjmp exiting a signal handler as an ISO C extension is http://pubs.opengroup.org/onlinepubs/9699919799/functions/longjmp.html ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16212> _______________________________________ From report at bugs.python.org Sun Oct 14 11:56:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2012 09:56:18 +0000 Subject: [issue16228] JSON crashes during encoding resized lists Message-ID: <1350208578.8.0.440875886805.issue16228@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: JSON encoding crash if the source list resized in process of encoding. This can be happen unintentionally in multithreaded code. Simple crash code: import json a = [object()] * 10 def crasher(obj): del a[-1] json.dumps(a, default=crasher) ---------- components: Extension Modules messages: 172867 nosy: bob.ippolito, ezio.melotti, pitrou, rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: JSON crashes during encoding resized lists type: crash versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16228> _______________________________________ From report at bugs.python.org Sun Oct 14 11:57:25 2012 From: report at bugs.python.org (Francisco Gracia) Date: Sun, 14 Oct 2012 09:57:25 +0000 Subject: [issue16229] Module *redemo.py* lacking in recent Python distributions Message-ID: <1350208645.0.0.150897720098.issue16229@psf.upfronthosting.co.za> New submission from Francisco Gracia: Since Python 3.2 the module *redemo.py* is lacking in the official Python distributions. The excellent and extremely useful *Regular expressions HOWTO* of 3.2.x and 3.3 keep however referring to it (although referring to the wrong path *Tools/demo/* instead of *Tools/Scripts/*) and the same does the *README* file. I just copied the version of the module distributed with 3.1 and it keeps working as well with 3.2.x as with 3.3.0 without having experienced any problems. Is there any justification for this situation or is it just a slip? Regards ---------- components: Demos and Tools messages: 172868 nosy: fgracia priority: normal severity: normal status: open title: Module *redemo.py* lacking in recent Python distributions versions: Python 3.2 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16229> _______________________________________ From report at bugs.python.org Sun Oct 14 12:02:19 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2012 10:02:19 +0000 Subject: [issue16228] JSON crashes during encoding resized lists In-Reply-To: <1350208578.8.0.440875886805.issue16228@psf.upfronthosting.co.za> Message-ID: <1350208939.7.0.278177615417.issue16228@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch. ---------- keywords: +patch Added file: http://bugs.python.org/file27563/json_encode_resized_list.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16228> _______________________________________ From report at bugs.python.org Sun Oct 14 12:19:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 10:19:19 +0000 Subject: [issue16227] Change unicode howtos as misleading In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350209959.44.0.472822846325.issue16227@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I wonder why the note must be there at all. None of the 2.x docs have been updated to cover the 3.x versions of Python. Otherwise, every 2.x page could use such a disclaimer. Here is where the note was added: http://hg.python.org/cpython/rev/bdef454f7212 ---------- nosy: +chris.jerdonek _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16227> _______________________________________ From report at bugs.python.org Sun Oct 14 12:26:35 2012 From: report at bugs.python.org (Berker Peksag) Date: Sun, 14 Oct 2012 10:26:35 +0000 Subject: [issue14039] Add "metavar" argument to add_subparsers() in argparse In-Reply-To: <1329436304.54.0.709137632289.issue14039@psf.upfronthosting.co.za> Message-ID: <1350210395.71.0.839455879389.issue14039@psf.upfronthosting.co.za> Changes by Berker Peksag <berker.peksag at gmail.com>: ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14039> _______________________________________ From report at bugs.python.org Sun Oct 14 12:37:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2012 10:37:16 +0000 Subject: [issue16230] select.select crashes on resized lists Message-ID: <1350211036.55.0.523850963705.issue16230@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Simple crash code: import select a = [] class F: def fileno(self): del a[-1] return 1 a[:] = [F()] * 10 select.select([], a, []) ---------- components: Extension Modules messages: 172871 nosy: serhiy.storchaka priority: normal severity: normal status: open title: select.select crashes on resized lists type: crash versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16230> _______________________________________ From report at bugs.python.org Sun Oct 14 12:40:59 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2012 10:40:59 +0000 Subject: [issue16230] select.select crashes on resized lists In-Reply-To: <1350211036.55.0.523850963705.issue16230@psf.upfronthosting.co.za> Message-ID: <1350211259.72.0.819991208572.issue16230@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch. ---------- keywords: +patch Added file: http://bugs.python.org/file27564/select_resized_list.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16230> _______________________________________ From report at bugs.python.org Sun Oct 14 12:54:09 2012 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 14 Oct 2012 10:54:09 +0000 Subject: [issue16227] Change unicode howtos as misleading In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350212049.1.0.608955432214.issue16227@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'd happily settle on seeing this historical note removed from the 2.7.3 docs. I'm unsure about the best approach for 3.1.5. Who's done the most work on unicode to answer this one, someone working on #16061 possibly? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16227> _______________________________________ From report at bugs.python.org Sun Oct 14 13:13:12 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Sun, 14 Oct 2012 11:13:12 +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: <1350213192.53.0.884310971396.issue10050@psf.upfronthosting.co.za> Nadeem Vawda added the comment: Hmm, OK. URLopener and FancyURLopener do each issue a DeprecationWarning when used, though. If they are not actually deprecated, perhaps we should remove the warnings for the moment? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10050> _______________________________________ From report at bugs.python.org Sun Oct 14 13:24:05 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2012 11:24:05 +0000 Subject: [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350213845.32.0.702999618177.issue16225@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is safe to modify a sequence during iteration if it's size not increased. >>> words = ['cat', 'window', 'defenestrate'] >>> for i, w in enumerate(words): ... if len(w) > 6: ... words[i] = w[:5] + '?' ... >>> words ['cat', 'window', 'defen?'] ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16225> _______________________________________ From report at bugs.python.org Sun Oct 14 14:06:14 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2012 12:06:14 +0000 Subject: [issue6559] add pass_fds paramter to subprocess.Popen() In-Reply-To: <1248422197.05.0.784368367425.issue6559@psf.upfronthosting.co.za> Message-ID: <1350216374.13.0.0694077774179.issue6559@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: _posixsubprocess.fork_exec docstring was not updated. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6559> _______________________________________ From report at bugs.python.org Sun Oct 14 14:14:52 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 14 Oct 2012 12:14:52 +0000 Subject: [issue14913] tokenize the source to manage Pdb breakpoints In-Reply-To: <1337946553.88.0.954704249232.issue14913@psf.upfronthosting.co.za> Message-ID: <1350216892.67.0.67875359086.issue14913@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Attached patch pdb_lnotab.patch uses lnotabs (see Objects/lnotab_notes.txt) to find the actual breakpoint line number and parses the module source with tokenize to find the set of function and fully qualified method names in a module. The patch fixes issues 6322, 14789, 14792, 14795, 14808. The local trace function is only set on functions where a breakpoint is set, this provides a significant performance improvement. ---------- Added file: http://bugs.python.org/file27565/pdb_lnotab.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14913> _______________________________________ From report at bugs.python.org Sun Oct 14 14:16:41 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 14 Oct 2012 12:16:41 +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: <1350217001.63.0.293412032435.issue6322@psf.upfronthosting.co.za> Xavier de Gaye added the comment: This is fixed in the proposed patch named pdb_lnotab.patch attached to issue 14913. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6322> _______________________________________ From report at bugs.python.org Sun Oct 14 15:00:07 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 14 Oct 2012 13:00:07 +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: <1350219607.49.0.597894641262.issue10050@psf.upfronthosting.co.za> Ezio Melotti added the comment: See also #12707. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10050> _______________________________________ From report at bugs.python.org Sun Oct 14 15:09:02 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 14 Oct 2012 13:09:02 +0000 Subject: [issue16044] xml.etree.ElementTree.Element: append method iterator param is broken In-Reply-To: <1348574765.38.0.275058753456.issue16044@psf.upfronthosting.co.za> Message-ID: <1350220142.86.0.315382887939.issue16044@psf.upfronthosting.co.za> Eli Bendersky added the comment: Closing, since this isn't a bug and append's behavior is properly documented. Regarding the error message, yes it could probably be better but you would need to enable input validation for that. Since Python is duck typed, often when arguments are not validated you get less-than-good error messages if things go wrong. In this case, append expect something Element-like that would have an "iter" method, and complains when that's not found. In 3.3 this whole thing was improved by always validating arguments in append/extend etc. and raising a TypeError when something is wrong. I don't think there's good enough reason to change this in 2.7 ---------- stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16044> _______________________________________ From report at bugs.python.org Sun Oct 14 15:17:35 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 14 Oct 2012 13:17:35 +0000 Subject: [issue15381] Optimize BytesIO to do less reallocations when written, similarly to StringIO In-Reply-To: <1342527166.53.0.694574948468.issue15381@psf.upfronthosting.co.za> Message-ID: <1350220655.07.0.663165618652.issue15381@psf.upfronthosting.co.za> Changes by Eli Bendersky <eliben at gmail.com>: ---------- title: Optimize BytesIO to so less reallocations when written, similarly to StringIO -> Optimize BytesIO to do less reallocations when written, similarly to StringIO _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15381> _______________________________________ From report at bugs.python.org Sun Oct 14 15:19:39 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 14 Oct 2012 13:19:39 +0000 Subject: [issue12321] documentation of ElementTree.find In-Reply-To: <1307958561.6.0.547513151308.issue12321@psf.upfronthosting.co.za> Message-ID: <1350220779.65.0.110179351304.issue12321@psf.upfronthosting.co.za> Changes by Eli Bendersky <eliben at gmail.com>: Removed file: http://bugs.python.org/file22406/unnamed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12321> _______________________________________ From report at bugs.python.org Sun Oct 14 15:19:47 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 14 Oct 2012 13:19:47 +0000 Subject: [issue12321] documentation of ElementTree.find In-Reply-To: <1307958561.6.0.547513151308.issue12321@psf.upfronthosting.co.za> Message-ID: <1350220787.22.0.953179689915.issue12321@psf.upfronthosting.co.za> Changes by Eli Bendersky <eliben at gmail.com>: ---------- versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12321> _______________________________________ From report at bugs.python.org Sun Oct 14 15:30:51 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 14 Oct 2012 13:30:51 +0000 Subject: [issue12321] documentation of ElementTree.find In-Reply-To: <1307958561.6.0.547513151308.issue12321@psf.upfronthosting.co.za> Message-ID: <1350221451.23.0.0474957560121.issue12321@psf.upfronthosting.co.za> Eli Bendersky added the comment: I think this may be intentional. Absolute searches on a ElementTree are discouraged with a warning: def find(self, path, namespaces=None): # assert self._root is not None if path[:1] == "/": path = "." + path warnings.warn( "This search is broken in 1.3 and earlier, and will be " "fixed in a future version. If you rely on the current " "behaviour, change it to %r" % path, FutureWarning, stacklevel=2 ) return self._root.find(path, namespaces) See what happens when an "absolute path" is attemped? The code just hacks it into a relative path and prints a menacing warning. So, I would not change the documentation at this point. However, the problem should go away if and when the XPath support is improved to really support absolute paths. ---------- resolution: -> wont fix stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12321> _______________________________________ From report at bugs.python.org Sun Oct 14 15:32:48 2012 From: report at bugs.python.org (hasufell) Date: Sun, 14 Oct 2012 13:32:48 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1350221568.14.0.080512193451.issue16202@psf.upfronthosting.co.za> Changes by hasufell <julian.ospald at googlemail.com>: ---------- nosy: +hasufell _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Sun Oct 14 15:39:14 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 14 Oct 2012 13:39:14 +0000 Subject: [issue15442] Expand the list of default dirs filecmp.dircmp ignores In-Reply-To: <1343147532.2.0.187379599839.issue15442@psf.upfronthosting.co.za> Message-ID: <1350221954.18.0.518668607874.issue15442@psf.upfronthosting.co.za> Eli Bendersky added the comment: moijes12, why are the added names "raw" ? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15442> _______________________________________ From report at bugs.python.org Sun Oct 14 15:54:47 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Oct 2012 13:54:47 +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: <3Xfkml1mDQzR3M@mail.python.org> Roundup Robot added the comment: New changeset bf9d118779f5 by Andrew Svetlov in branch 'default': Issue #15721: make _tkinter module pep384 compatible. http://hg.python.org/cpython/rev/bf9d118779f5 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15721> _______________________________________ From report at bugs.python.org Sun Oct 14 15:56:00 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 14 Oct 2012 13:56:00 +0000 Subject: [issue16227] Change unicode howtos as misleading In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350222960.53.0.707294448734.issue16227@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I don't think there is a need to update the 3.1.x version of the documentation in that respect. ---------- nosy: +loewis versions: +Python 3.3, Python 3.4 -Python 3.1 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16227> _______________________________________ From report at bugs.python.org Sun Oct 14 16:02:56 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 14 Oct 2012 14:02:56 +0000 Subject: [issue16227] Change unicode howtos as misleading In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350223376.11.0.282859149235.issue16227@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Before the disclaimer can be removed, all statements of the document should be reviewed. From a shallow glance, the section on "Python 2.x's support" should be changed to "Python's support". The reference to Marc-Andre Lemburg's presentation should be removed, as it's not current anymore. The 2.7 version of the document is fine as it stands; it indeed doesn't talk about 3.x. ---------- versions: -Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16227> _______________________________________ From report at bugs.python.org Sun Oct 14 16:06:53 2012 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 14 Oct 2012 14:06:53 +0000 Subject: [issue16227] Change unicode howtos as misleading In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350223613.9.0.202591585562.issue16227@psf.upfronthosting.co.za> Mark Lawrence added the comment: See also #4153 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16227> _______________________________________ From report at bugs.python.org Sun Oct 14 16:19:00 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 14 Oct 2012 14:19:00 +0000 Subject: [issue16227] Change unicode howtos as misleading In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350224340.86.0.18691996221.issue16227@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- components: +Unicode nosy: +ezio.melotti _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16227> _______________________________________ From report at bugs.python.org Sun Oct 14 16:30:17 2012 From: report at bugs.python.org (PSchaafsma) Date: Sun, 14 Oct 2012 14:30:17 +0000 Subject: [issue16231] pickle persistent_id return value Message-ID: <1350225017.39.0.976217955919.issue16231@psf.upfronthosting.co.za> New submission from PSchaafsma: The documentation of persistent_id prescribes that returning None will cause default pickling behavior. This makes sense. However, in the Pickler.save function in pickle.py, the return value of persistent_id checked as boolean, causing also return values like 0 and [] to indicate default pickling. This becomes a problem when unpickleable objects are identified by a simple index in some other list. ---------- components: Library (Lib) messages: 172887 nosy: pschaafsma priority: normal severity: normal status: open title: pickle persistent_id return value type: behavior versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16231> _______________________________________ From report at bugs.python.org Sun Oct 14 16:38:05 2012 From: report at bugs.python.org (emeaudroid emeaudroid) Date: Sun, 14 Oct 2012 14:38:05 +0000 Subject: [issue16232] curses.textpad.Textbox backtrace support Message-ID: <1350225485.82.0.832122533952.issue16232@psf.upfronthosting.co.za> New submission from emeaudroid emeaudroid: python: 2.6.6 curses' revision: 61064 2008-02-25 16:29:58Z andrew.kuchling line 93 and 102 of curses/textpad.py could you replace the backspace's specific chars codes by using this dedicated curses' function retrieving the currently in-use char's code ? ord( curses.erasechar( )) this one would make specific erase char specified to term supported, unlike curses.ascii.BS, curses.KEY_BACKSPACE that are specifics to most configurations indeed. at least adding the curses.ascii.DEL char's code seems legit na ? ---------- components: Extension Modules messages: 172888 nosy: emeaudroid.emeaudroid priority: normal severity: normal status: open title: curses.textpad.Textbox backtrace support type: enhancement versions: Python 2.6 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16232> _______________________________________ From report at bugs.python.org Sun Oct 14 17:04:25 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 14 Oct 2012 15:04:25 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350205488.51.0.396212784135.issue16212@psf.upfronthosting.co.za> Message-ID: <CAH_1eM3jmCMa=w2HrGXyQvCQ+BLbs2tieoqwanJynnSyVimqGQ@mail.gmail.com> Charles-Fran?ois Natali added the comment: > SIGBUS as well as SIGFPE or SIGSEGV is a synchronous signal. It is delivered to the thread that caused the trouble and the stack contents is well defined. Except that signal handlers are per-process, not per thread. So if another thread (which could be running without the GIL, e.g. doing some lengthy computation) triggers a SIGBUS while the handler is setup, it's going to try to longjmp to the jmp_buf set by the other thread. And this will get really nasty. > >> https://www.securecoding.cert.org/confluence/display/seccode/SIG35-C.+Do+not+return+from+SIGSEGV,+SIGILL,+or+SIGFPE+signal+handlers > > Does not apply here: longjmp is not a return. I still don't understand how you plan to handle the SIGBUS/SIGSEGV. Where will you longjmp to? If the idea is to dump a traceback and exit, then there's faulthandler for that. As for the stack content, variables with automatic storage class (i.e. local variables) modified should be declared volatile (which may or may not be an issue here). >> https://www.securecoding.cert.org/confluence/display/seccode/SIG32-C.+Do+not+call+longjmp%28%29+from+inside+a+signal+handler > > The grounds are weak. They refer to SIG30-C, which is based on ISO C standard. > > POSIX explicitly declares the fact that longjmp is allowed to exit signal handlers as an extension to ISO C standard. It is allowed, but as said earlier, 99% of use cases are just wrong. > Besides, POSIX explicitly states that only async-signal-safe functions can be called from the handlers, which "are invoked asynchronously with process execution". That's not out case as mentioned above, we are not in asynchronous context as it could be with, say, SIGINT. Well, nothing prevents "kill -SEGV <PID>". Besides, setjmp() is expensive, and here we would be setting up a jmp_buf even for a single byte memory access. But I think we've talked enough :-) Honestly, if you manage to find a way to handle this, I'll be happy to commit it, so don't hesitate if you think you've found an approach that will work. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16212> _______________________________________ From report at bugs.python.org Sun Oct 14 17:47:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2012 15:47:13 +0000 Subject: [issue13454] crash when deleting one pair from tee() In-Reply-To: <1321978245.14.0.0332901316698.issue13454@psf.upfronthosting.co.za> Message-ID: <1350229633.57.0.196867100337.issue13454@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch (tests included). Thank Pyry for report, Victor and Amaury for analysis. Maybe I picked up the poor names for iterators? May be exhausted and unexhausted would be better? Feel free to correct me. ---------- keywords: +patch nosy: +serhiy.storchaka stage: test needed -> patch review versions: +Python 3.4 Added file: http://bugs.python.org/file27566/itertools_tee_nonrecursive_clear.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13454> _______________________________________ From report at bugs.python.org Sun Oct 14 17:52:29 2012 From: report at bugs.python.org (Francisco Gracia) Date: Sun, 14 Oct 2012 15:52:29 +0000 Subject: [issue16233] IDLE: conceptual problems with *Class browser* Message-ID: <1350229949.19.0.565182759034.issue16233@psf.upfronthosting.co.za> New submission from Francisco Gracia: The *File* option in the menu bar of both the Python shell and the program editor have an entry called *Class Browser*. If one selects it from the shell window, one gets always an error message with the title: "No filename" which says: "This buffer has no associated filename". This happens whatever the previous history of the current interactive session. If one selects it from the editor window with a Python module loaded, then another window shows correctly the expected information about the classes defined in such a module, if any. The same previous error appears if the current contents of the editor are not recognised as a Python module (for instance by not having been yet saved), which is reasonable. IDLE's help says: "Class Browser -- Show classes and methods in current file". This does not clarify things much (what does *current file* mean from the shell window?) and does not permit one to get a coherent idea of the purpose originally intended for the option (a module imported in the current interactive session could not be rightly understood as a *current file*?). I find this situation quite confuse and would suggest that some action could be taken in order to at least clarify it, if not improve it, as for instance (in order of desirability and --very likely-- difficulty): - Just make the error message less puzzling and more informative when coming from the shell window (what does *buffer* mean in this context?) and let the help file explain that this operation has only sense in connection with Python scripts being edited (if that is the case, as it seems). - Disable the option in the shell window. - Suppress the option in the shell window and keep it only in the editor window when the document it is handling is recognised as a Python module. - Keep the option also in the shell window and make it display information about the classes defined in the namespace of the current interactive session, if any. I think that this is what would be a real and useful *class browser*. Thank you in advance for your attention. ---------- components: IDLE messages: 172891 nosy: fgracia priority: normal severity: normal status: open title: IDLE: conceptual problems with *Class browser* type: enhancement versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16233> _______________________________________ From report at bugs.python.org Sun Oct 14 18:37:24 2012 From: report at bugs.python.org (Vladimir Ushakov) Date: Sun, 14 Oct 2012 16:37:24 +0000 Subject: [issue16212] mmap() dumps core upon resizing the underlying file In-Reply-To: <1350050663.98.0.0365442687476.issue16212@psf.upfronthosting.co.za> Message-ID: <1350232644.87.0.922171863112.issue16212@psf.upfronthosting.co.za> Vladimir Ushakov added the comment: > But I think we've talked enough... So do I. Let's go for it. I'll make a patch (which apparently takes some time) and post it here, we'll discuss it then. Thanks for your comments. Now I believe it's a bit harder than I thought initially, but still doable. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16212> _______________________________________ From report at bugs.python.org Sun Oct 14 19:18:13 2012 From: report at bugs.python.org (Ned Deily) Date: Sun, 14 Oct 2012 17:18:13 +0000 Subject: [issue16226] IDLE crashes on *File / Path browser* In-Reply-To: <1350206279.5.0.670551753566.issue16226@psf.upfronthosting.co.za> Message-ID: <1350235093.36.0.334224474774.issue16226@psf.upfronthosting.co.za> Ned Deily added the comment: Thank you for the report. There does seem to be a regression in the 3.3 version of IDLE. Using the OS X version of bin/idle3.3 and selecting menu item File -> Path Browser results in the following exception: Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/tkinter/__init__.py", line 1442, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/idlelib/TreeWidget.py", line 131, in expand self.update() File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/idlelib/TreeWidget.py", line 164, in update self.parent.update() File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/idlelib/TreeWidget.py", line 170, in update self.draw(7, 2) File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/idlelib/TreeWidget.py", line 197, in draw cy = child.draw(cx, cy) File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/idlelib/TreeWidget.py", line 184, in draw sublist = self.item._GetSubList() File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/idlelib/TreeWidget.py", line 338, in _GetSubList sublist = self.GetSubList() File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/idlelib/PathBrowser.py", line 61, in GetSubList for nn, name in self.listmodules(names): File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/idlelib/PathBrowser.py", line 78, in listmodules for suff, mode, flag in suffixes: ValueError: too many values to unpack (expected 3) ---------- keywords: +3.3regression nosy: +ned.deily priority: normal -> high stage: -> needs patch versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16226> _______________________________________ From report at bugs.python.org Sun Oct 14 19:37:28 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 14 Oct 2012 17:37:28 +0000 Subject: [issue16222] "server-side clone" not found by devguide's search box In-Reply-To: <1350193296.32.0.998873485723.issue16222@psf.upfronthosting.co.za> Message-ID: <1350236248.55.0.241550123719.issue16222@psf.upfronthosting.co.za> ?ric Araujo added the comment: Not sure this needs more exposure. New core developers will learn about that feature from other devs, and contributors (the primary audience of the devguide) can't use these repos. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16222> _______________________________________ From report at bugs.python.org Sun Oct 14 19:49:09 2012 From: report at bugs.python.org (Ned Deily) Date: Sun, 14 Oct 2012 17:49:09 +0000 Subject: [issue16229] Module *redemo.py* lacking in recent Python distributions In-Reply-To: <1350208645.0.0.150897720098.issue16229@psf.upfronthosting.co.za> Message-ID: <1350236949.44.0.927008518375.issue16229@psf.upfronthosting.co.za> Ned Deily added the comment: The demo scripts in the Tools directory were cleaned up earlier in Python 3 and moved. redemo.py is still included in the 3.2 and later source distributions in the Tools/demo directory. The builders of binary installers and third-party distributors of Python 3.x may make their own decisions about whether to include the Tools directory in their distros. For which platform and from what source are you installing Python 3.2? ---------- nosy: +ned.deily _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16229> _______________________________________ From report at bugs.python.org Sun Oct 14 20:07:54 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 14 Oct 2012 18:07:54 +0000 Subject: [issue8425] a -= b should be fast if a is a small set and b is a large set In-Reply-To: <1271438382.18.0.76932438586.issue8425@psf.upfronthosting.co.za> Message-ID: <1350238074.13.0.807784219782.issue8425@psf.upfronthosting.co.za> Changes by Terry J. Reedy <tjreedy at udel.edu>: ---------- stage: needs patch -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8425> _______________________________________ From report at bugs.python.org Sun Oct 14 20:14:10 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 14 Oct 2012 18:14:10 +0000 Subject: [issue16083] HTTPServer does not correctly handle bad headers In-Reply-To: <1348829642.54.0.0563748954245.issue16083@psf.upfronthosting.co.za> Message-ID: <1350238449.99.0.0834139317132.issue16083@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Is this really a security issue? If so, that should be explained. ---------- nosy: +terry.reedy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16083> _______________________________________ From report at bugs.python.org Sun Oct 14 20:14:30 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 18:14:30 +0000 Subject: [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350238470.95.0.657575374419.issue16225@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > It is safe to modify a sequence during iteration if it's size not increased. What do you mean by "safe"? The example given by the original commenter does not increase the size either. I believe "safe" is meant in the sense of avoiding possibly unexpected behavior. I can clarify the language if you feel it is ambiguous. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16225> _______________________________________ From report at bugs.python.org Sun Oct 14 20:16:06 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 14 Oct 2012 18:16:06 +0000 Subject: [issue8786] Add support for IEEE 754 contexts to decimal module. In-Reply-To: <1274524113.24.0.215320207255.issue8786@psf.upfronthosting.co.za> Message-ID: <1350238566.21.0.259110273865.issue8786@psf.upfronthosting.co.za> Changes by Terry J. Reedy <tjreedy at udel.edu>: ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8786> _______________________________________ From report at bugs.python.org Sun Oct 14 20:17:24 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 14 Oct 2012 18:17:24 +0000 Subject: [issue16083] HTTPServer does not correctly handle bad headers In-Reply-To: <1348829642.54.0.0563748954245.issue16083@psf.upfronthosting.co.za> Message-ID: <1350238644.39.0.550610472268.issue16083@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: ---------- nosy: +orsenthil _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16083> _______________________________________ From report at bugs.python.org Sun Oct 14 20:29:58 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 18:29:58 +0000 Subject: [issue16227] Change unicode howtos as misleading In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350239398.42.0.479427382226.issue16227@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I don't think there is a need to update the 3.1.x version of the documentation in that respect. > versions: +Python 3.3, Python 3.4 -Python 3.1 This issue was just about the 2.7 version. 3.x doesn't contain the language mentioned by the original commenter. If 2.7 should not be changed, this issue should be closed. Or are you suggesting other updates to the 3.x docs? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16227> _______________________________________ From report at bugs.python.org Sun Oct 14 20:31:14 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 14 Oct 2012 18:31:14 +0000 Subject: [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350239474.17.0.0581517384868.issue16225@psf.upfronthosting.co.za> Georg Brandl added the comment: Well, I guess Serhiy meant "neither increase nor decrease". In the end, the exact behavior will never be clear if you don't state explicitly how it's implemented: a counter that starts at 0 and is increased on __next__ until it's equal to len(list) (as checked at every iteration step). But in general the advice should be: if you want to insert or remove elements during iteration, iterate over a copy. ---------- nosy: +georg.brandl _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16225> _______________________________________ From report at bugs.python.org Sun Oct 14 20:34:12 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 18:34:12 +0000 Subject: [issue16227] Change unicode howtos as misleading In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350239652.97.0.941771358879.issue16227@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > 3.x doesn't contain the language mentioned by the original commenter. 3.2 onwards I mean. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16227> _______________________________________ From report at bugs.python.org Sun Oct 14 20:36:50 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sun, 14 Oct 2012 18:36:50 +0000 Subject: [issue16083] HTTPServer does not correctly handle bad headers In-Reply-To: <1348829642.54.0.0563748954245.issue16083@psf.upfronthosting.co.za> Message-ID: <1350239810.82.0.107876545401.issue16083@psf.upfronthosting.co.za> Michele Orr? added the comment: Well, it is a security issue IMO, but not particularly harmful. But certainly that's not a RFC violation, since I'm not sending rfc-compliant packets.[0] The best an attacker could do is to DDoS the server running HTTPServer: tracebacks may open file descriptors and/or send emails to the sysadmin, and hence the attacker could flood the server opening new file descriptors, or the email box.[0] At least, this is the worst thing that came to my mind discussing with exarkun. [0] https://twistedmatrix.com/trac/ticket/6029 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16083> _______________________________________ From report at bugs.python.org Sun Oct 14 20:39:20 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 18:39:20 +0000 Subject: [issue16222] "server-side clone" not found by devguide's search box In-Reply-To: <1350193296.32.0.998873485723.issue16222@psf.upfronthosting.co.za> Message-ID: <1350239960.88.0.112966732384.issue16222@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I filed this in case it signals some underlying issue with search that could use improving (and that may affect other search terms). I can change the title to remove the focus on those two terms. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16222> _______________________________________ From report at bugs.python.org Sun Oct 14 20:39:37 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 18:39:37 +0000 Subject: [issue16222] some terms not found by devguide's search box In-Reply-To: <1350193296.32.0.998873485723.issue16222@psf.upfronthosting.co.za> Message-ID: <1350239977.02.0.864213002079.issue16222@psf.upfronthosting.co.za> Changes by Chris Jerdonek <chris.jerdonek at gmail.com>: ---------- title: "server-side clone" not found by devguide's search box -> some terms not found by devguide's search box _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16222> _______________________________________ From report at bugs.python.org Sun Oct 14 20:51:46 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 14 Oct 2012 18:51:46 +0000 Subject: [issue8786] Add support for IEEE 754 contexts to decimal module. In-Reply-To: <1274524113.24.0.215320207255.issue8786@psf.upfronthosting.co.za> Message-ID: <1350240706.09.0.661508323295.issue8786@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I do not think IEEEContext should not be made a class rather than a function until it really *is* a subclass with altered or added behavior. This means at least its own __str__ method and in this case, a __setattr__ that enforces the invariants. Here that means refusing to modify the context, or at least not prec and Emax (assuming that changes to any other context attributes (are there any?) are harmless. Something like def __setattr__(self, key, value): if key in ('prec', 'Emax'): raise AttributeError("cannot change {} of IEEEContext".format(key)) else: super(IEEEContext, self).__setattr__(key, name) ---------- nosy: +terry.reedy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8786> _______________________________________ From report at bugs.python.org Sun Oct 14 20:54:59 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 14 Oct 2012 18:54:59 +0000 Subject: [issue16227] Change unicode howtos as misleading In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350240899.23.0.0775990660498.issue16227@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Ah, I missed that. I'm skeptical that the proposed change is an improvement - how would the reader know how to find version 1.12 of the document? I'm also skeptical that removal of the note in 2.7 is useful: people finding the document in Google would misunderstand. My proposal: "This version of the document talks about Unicode support in Python 2.x. See <URL> for the Python 3 version." ---------- versions: +Python 2.7 -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16227> _______________________________________ From report at bugs.python.org Sun Oct 14 20:57:56 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 14 Oct 2012 18:57:56 +0000 Subject: [issue13454] crash when deleting one pair from tee() In-Reply-To: <1321978245.14.0.0332901316698.issue13454@psf.upfronthosting.co.za> Message-ID: <1350241076.23.0.302190116887.issue13454@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Serhiy, I only see a test in your patch, no actual modification to itertools. ---------- nosy: +pitrou _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13454> _______________________________________ From report at bugs.python.org Sun Oct 14 21:38:42 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 19:38:42 +0000 Subject: [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350243522.79.0.0905439715454.issue16225@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > But in general the advice should be: if you want to insert or remove elements during iteration, iterate over a copy. I would expand this to cover changing the list in any way. I think the point being made is that iteration doesn't implicitly make a copy. There are cases where modifying the list in place can also yield unexpected results. For example (naive list reversal): >>> words = ['cat', 'window', 'defenestrate'] >>> for i, word in enumerate(words): ... words[-i-1] = word ... >>> words ['cat', 'window', 'cat'] ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16225> _______________________________________ From report at bugs.python.org Sun Oct 14 21:48:36 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 19:48:36 +0000 Subject: [issue16227] Change unicode howtos as misleading In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350244116.97.0.806546425928.issue16227@psf.upfronthosting.co.za> Chris Jerdonek added the comment: That proposal sounds fine to me. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16227> _______________________________________ From report at bugs.python.org Sun Oct 14 21:56:19 2012 From: report at bugs.python.org (Kevin Walzer) Date: Sun, 14 Oct 2012 19:56:19 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1346632042.85.0.745944196118.issue15853@psf.upfronthosting.co.za> Message-ID: <1350244579.22.0.42391034212.issue15853@psf.upfronthosting.co.za> Kevin Walzer added the comment: editFont.config is causing the crash. The revised patch you suggest configures both the display font example and the highlight-text example. We can certainly amend my patch along those lines. I cannot reproduce the issue in simple Tcl/Tk using the equivalent [font create] and [font configure] calls. As noted, bugs involving the Tcl/Tk event loop on the Mac can be hard to reproduce. It is usually simpler, where possible, to work around the issue at the script level. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15853> _______________________________________ From report at bugs.python.org Sun Oct 14 22:12:50 2012 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 14 Oct 2012 20:12:50 +0000 Subject: [issue16227] Change unicode howtos as misleading In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350245570.66.0.174788592425.issue16227@psf.upfronthosting.co.za> Mark Lawrence added the comment: The mvl proposal fine by me too, thanks guys. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16227> _______________________________________ From report at bugs.python.org Sun Oct 14 22:15:55 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 14 Oct 2012 20:15:55 +0000 Subject: [issue16234] Implement correct block_size and tests for HMAC-SHA3 Message-ID: <1350245755.11.0.901944251293.issue16234@psf.upfronthosting.co.za> New submission from Christian Heimes: HMAC-SHA3 hasn't been specified yet. Once an official RFC or NIST document is out I can implement the correct block_size attribute and add test vectors. In the mean time I'm disabling SHA3 by returning NotImplemented from block_size. This ticket a reminder for myself. ---------- assignee: christian.heimes components: Extension Modules, Library (Lib) messages: 172910 nosy: christian.heimes priority: normal severity: normal status: open title: Implement correct block_size and tests for HMAC-SHA3 type: enhancement versions: Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16234> _______________________________________ From report at bugs.python.org Sun Oct 14 22:16:38 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Oct 2012 20:16:38 +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: <3XfvFK5mJWzQyZ@mail.python.org> Roundup Robot added the comment: New changeset 40a1652349e9 by Christian Heimes in branch 'default': Issue #16234: Modify sha3's block_size method to return NotImplemented. http://hg.python.org/cpython/rev/40a1652349e9 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16234> _______________________________________ From report at bugs.python.org Sun Oct 14 22:18:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2012 20:18:27 +0000 Subject: [issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords In-Reply-To: <1242980336.93.0.332167282409.issue6083@psf.upfronthosting.co.za> Message-ID: <1350245907.09.0.438409665303.issue6083@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which get rid of all three PyArg_ParseTuple usage with parsing nested sequences. Thanks Evgeny for reproducers. ---------- nosy: +serhiy.storchaka Added file: http://bugs.python.org/file27567/PyArg_ParseTuple_refcount.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6083> _______________________________________ From report at bugs.python.org Sun Oct 14 22:18:40 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 14 Oct 2012 20:18:40 +0000 Subject: [issue16083] HTTPServer does not correctly handle bad request line In-Reply-To: <1348829642.54.0.0563748954245.issue16083@psf.upfronthosting.co.za> Message-ID: <1350245920.92.0.752585994346.issue16083@psf.upfronthosting.co.za> ?ric Araujo added the comment: This does not seem to qualify as a security issue. ---------- title: HTTPServer does not correctly handle bad headers -> HTTPServer does not correctly handle bad request line type: security -> behavior versions: -Python 3.1 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16083> _______________________________________ From report at bugs.python.org Sun Oct 14 22:19:02 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2012 20:19:02 +0000 Subject: [issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords In-Reply-To: <1242980336.93.0.332167282409.issue6083@psf.upfronthosting.co.za> Message-ID: <1350245942.75.0.641469710984.issue6083@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6083> _______________________________________ From report at bugs.python.org Sun Oct 14 22:19:46 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 14 Oct 2012 20:19:46 +0000 Subject: [issue5256] rlcompleter adds builtins when custom dict is used In-Reply-To: <1234569860.16.0.0783224890959.issue5256@psf.upfronthosting.co.za> Message-ID: <1350245986.44.0.00835487378438.issue5256@psf.upfronthosting.co.za> Changes by ?ric Araujo <merwok at netwok.org>: ---------- keywords: +needs review versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5256> _______________________________________ From report at bugs.python.org Sun Oct 14 22:24:35 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 14 Oct 2012 20:24:35 +0000 Subject: [issue5256] rlcompleter adds builtins when custom dict is used In-Reply-To: <1234569860.16.0.0783224890959.issue5256@psf.upfronthosting.co.za> Message-ID: <1350246275.37.0.961374721726.issue5256@psf.upfronthosting.co.za> ?ric Araujo added the comment: Looks good to me. I wrote one comment on the doc patch review. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5256> _______________________________________ From report at bugs.python.org Sun Oct 14 22:28:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2012 20:28:23 +0000 Subject: [issue13454] crash when deleting one pair from tee() In-Reply-To: <1321978245.14.0.0332901316698.issue13454@psf.upfronthosting.co.za> Message-ID: <1350246503.01.0.590997442846.issue13454@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: Removed file: http://bugs.python.org/file27566/itertools_tee_nonrecursive_clear.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13454> _______________________________________ From report at bugs.python.org Sun Oct 14 22:29:18 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 14 Oct 2012 20:29:18 +0000 Subject: [issue16106] antigravity tests In-Reply-To: <1349134601.26.0.544681268044.issue16106@psf.upfronthosting.co.za> Message-ID: <1350246558.72.0.607141586654.issue16106@psf.upfronthosting.co.za> ?ric Araujo added the comment: Agreed with Antoine. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16106> _______________________________________ From report at bugs.python.org Sun Oct 14 22:30:54 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2012 20:30:54 +0000 Subject: [issue13454] crash when deleting one pair from tee() In-Reply-To: <1321978245.14.0.0332901316698.issue13454@psf.upfronthosting.co.za> Message-ID: <1350246654.89.0.681307336115.issue13454@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oh, I worked on it in a different directory. Fortunately I found a temporary copy and I?do not have to write all code again. Sorry. ---------- Added file: http://bugs.python.org/file27568/itertools_tee_nonrecursive_clear.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13454> _______________________________________ From report at bugs.python.org Sun Oct 14 22:31:19 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 14 Oct 2012 20:31:19 +0000 Subject: [issue16227] Add link to 3.3 version in unicode howto In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350246679.59.0.894886514837.issue16227@psf.upfronthosting.co.za> Changes by ?ric Araujo <merwok at netwok.org>: ---------- keywords: +easy nosy: +eric.araujo stage: -> needs patch title: Change unicode howtos as misleading -> Add link to 3.3 version in unicode howto _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16227> _______________________________________ From report at bugs.python.org Sun Oct 14 22:35:04 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 14 Oct 2012 20:35:04 +0000 Subject: [issue16229] File *redemo.py* lacking in recent Python distributions but still referenced In-Reply-To: <1350208645.0.0.150897720098.issue16229@psf.upfronthosting.co.za> Message-ID: <1350246904.97.0.645400001243.issue16229@psf.upfronthosting.co.za> Changes by ?ric Araujo <merwok at netwok.org>: ---------- assignee: -> docs at python components: +Documentation -Demos and Tools keywords: +easy nosy: +docs at python stage: -> needs patch title: Module *redemo.py* lacking in recent Python distributions -> File *redemo.py* lacking in recent Python distributions but still referenced versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16229> _______________________________________ From report at bugs.python.org Sun Oct 14 22:36:40 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 14 Oct 2012 20:36:40 +0000 Subject: [issue16229] File *redemo.py* lacking in recent Python distributions In-Reply-To: <1350208645.0.0.150897720098.issue16229@psf.upfronthosting.co.za> Message-ID: <1350247000.78.0.682990177006.issue16229@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hm Tools/demo is actually the correct location in 3.2+. ---------- nosy: +eric.araujo stage: needs patch -> title: File *redemo.py* lacking in recent Python distributions but still referenced -> File *redemo.py* lacking in recent Python distributions _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16229> _______________________________________ From report at bugs.python.org Sun Oct 14 22:38:56 2012 From: report at bugs.python.org (Ned Deily) Date: Sun, 14 Oct 2012 20:38:56 +0000 Subject: [issue16229] File *redemo.py* lacking in recent Python distributions In-Reply-To: <1350208645.0.0.150897720098.issue16229@psf.upfronthosting.co.za> Message-ID: <1350247136.6.0.909224059076.issue16229@psf.upfronthosting.co.za> Ned Deily added the comment: I don't think this is a documentation issue. I think it's more likely a Windows installer issue since I don't see the file installed in the current python.org 3.3 Windows distribution. But I was waiting for confirmation from the OP that he is using the Windows installer. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16229> _______________________________________ From report at bugs.python.org Sun Oct 14 22:45:45 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 14 Oct 2012 20:45:45 +0000 Subject: [issue8402] Add a way to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1350247545.48.0.613827330602.issue8402@psf.upfronthosting.co.za> ?ric Araujo added the comment: I have comments on the patch but a review link does not appear. Could you update your clone to latest default revision and regenerate the patch? Thanks. ---------- nosy: +eric.araujo title: glob returns empty list with "[" character in the folder name -> Add a way to escape metacharacters in glob/fnmatch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8402> _______________________________________ From report at bugs.python.org Sun Oct 14 22:46:21 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 14 Oct 2012 20:46:21 +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: <1350247581.02.0.316781312211.issue16218@psf.upfronthosting.co.za> Changes by ?ric Araujo <merwok at netwok.org>: ---------- nosy: +brian.curtin, tim.golden _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16218> _______________________________________ From report at bugs.python.org Sun Oct 14 22:48:43 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 14 Oct 2012 20:48:43 +0000 Subject: [issue14913] tokenize the source to manage Pdb breakpoints In-Reply-To: <1337946553.88.0.954704249232.issue14913@psf.upfronthosting.co.za> Message-ID: <1350247723.11.0.444868545343.issue14913@psf.upfronthosting.co.za> Changes by ?ric Araujo <merwok at netwok.org>: ---------- nosy: +georg.brandl versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14913> _______________________________________ From report at bugs.python.org Sun Oct 14 22:49:01 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 14 Oct 2012 20:49:01 +0000 Subject: [issue15442] Expand the list of default dirs filecmp.dircmp ignores In-Reply-To: <1343147532.2.0.187379599839.issue15442@psf.upfronthosting.co.za> Message-ID: <1350247741.81.0.565421124931.issue15442@psf.upfronthosting.co.za> ?ric Araujo added the comment: ISTM the names should be regular names, not regular expression patterns. ---------- nosy: +eric.araujo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15442> _______________________________________ From report at bugs.python.org Sun Oct 14 22:59:22 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sun, 14 Oct 2012 20:59:22 +0000 Subject: [issue5256] rlcompleter adds builtins when custom dict is used In-Reply-To: <1234569860.16.0.0783224890959.issue5256@psf.upfronthosting.co.za> Message-ID: <1350248362.36.0.978375526826.issue5256@psf.upfronthosting.co.za> Michele Orr? added the comment: Updated with tip, and merged with documentation. ---------- Added file: http://bugs.python.org/file27569/issue5256.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5256> _______________________________________ From report at bugs.python.org Sun Oct 14 23:04:23 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sun, 14 Oct 2012 21:04:23 +0000 Subject: [issue8402] Add a way to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1350248663.65.0.215854548477.issue8402@psf.upfronthosting.co.za> Michele Orr? added the comment: Noblesse oblige :) ---------- Added file: http://bugs.python.org/file27570/issue8402.1.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8402> _______________________________________ From report at bugs.python.org Sun Oct 14 23:22:56 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 21:22:56 +0000 Subject: [issue16227] Add link to 3.3 version in unicode howto In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350249776.9.0.39374881972.issue16227@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching proposed patch. ---------- keywords: +patch Added file: http://bugs.python.org/file27571/issue-16227-1-27.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16227> _______________________________________ From report at bugs.python.org Sun Oct 14 23:54:39 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2012 21:54:39 +0000 Subject: [issue12457] type() returns incorrect type for nested classes In-Reply-To: <1309497940.68.0.603392922196.issue12457@psf.upfronthosting.co.za> Message-ID: <1350251679.19.0.398087143483.issue12457@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There is no crash. I don't think this is a bug. It looks as feature request and this feature already implemented in 3.3 (PEP 3155). ---------- components: +Interpreter Core -None nosy: +serhiy.storchaka stage: -> needs patch type: crash -> behavior _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12457> _______________________________________ From report at bugs.python.org Sun Oct 14 23:55:14 2012 From: report at bugs.python.org (Ray Donnelly) Date: Sun, 14 Oct 2012 21:55:14 +0000 Subject: [issue16235] Add python-config.sh for use during cross compilation. Message-ID: <1350251714.79.0.226527559426.issue16235@psf.upfronthosting.co.za> New submission from Ray Donnelly: Creates python-config.sh which aims to behave exactly the same as python-config except it doesn't depend on a Python interpreter on the build machine (only depends on a posixy shell, tested with bash, dash, MSYS-bash). I use this for cross compiling gdb with Python pretty printer support. ---------- components: Cross-Build files: 0000-add-python-config-sh.patch keywords: patch messages: 172925 nosy: Ray.Donnelly priority: normal severity: normal status: open title: Add python-config.sh for use during cross compilation. type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27572/0000-add-python-config-sh.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16235> _______________________________________ From report at bugs.python.org Sun Oct 14 23:56:28 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 21:56:28 +0000 Subject: [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350251788.66.0.877250023942.issue16225@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching revised patch. ---------- Added file: http://bugs.python.org/file27573/issue-16225-2-default.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16225> _______________________________________ From report at bugs.python.org Mon Oct 15 00:01:20 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 14 Oct 2012 22:01:20 +0000 Subject: [issue16227] Add link to 3.3 version in unicode howto In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350252080.52.0.157592118575.issue16227@psf.upfronthosting.co.za> ?ric Araujo added the comment: I would not rephrase the first two lines. Nice trick of using py3k in the link. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16227> _______________________________________ From report at bugs.python.org Mon Oct 15 00:04:22 2012 From: report at bugs.python.org (Ravi Sinha) Date: Sun, 14 Oct 2012 22:04:22 +0000 Subject: [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1350252262.49.0.643676233389.issue16154@psf.upfronthosting.co.za> Ravi Sinha added the comment: I've used the testsetup directive and the problem in http://hg.python.org/cpython/file/40a1652349e9/Doc/library/math.rst, line 79, is fixed; the test passes Added # doctest: +SKIP to lines 179 and 180 in http://hg.python.org/cpython/file/40a1652349e9/Doc/library/filecmp.rst, and it passes too For http://hg.python.org/cpython/file/40a1652349e9/Doc/library/string.rst, lines 612-624, used +NORMALIZE_WHITESPACE and the test passed, but since Terry preferred a code change, did that too; the test passes Put my name at the proper position in Misc/ACKS For the multiple versions, I needed to ask whether they'd all belong to this same patch or there would be different patches for each version? Sorry if it's a silly question; I haven't had the time to wrap my head around how to best work with all the versions together With the directives Chris and Terry suggested, it should be easy to make several other tests pass; I'll make a few more patches ---------- Added file: http://bugs.python.org/file27574/doc_lib_Oct14_2012.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16154> _______________________________________ From report at bugs.python.org Mon Oct 15 00:06:06 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 22:06:06 +0000 Subject: [issue16227] Add link to 3.3 version in unicode howto In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350252366.5.0.762360949951.issue16227@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I would not rephrase the first two lines. Why not? The current language focuses on the negative ("explaining problems") while we prefer an affirmative tone: http://docs.python.org/devguide/documenting.html#affirmative-tone ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16227> _______________________________________ From report at bugs.python.org Mon Oct 15 00:10:10 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 22:10:10 +0000 Subject: [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350252610.23.0.962696951987.issue16225@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Reattaching. I duplicated a variable definition that was defined previously. ---------- Added file: http://bugs.python.org/file27575/issue-16225-3-default.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16225> _______________________________________ From report at bugs.python.org Mon Oct 15 00:15:17 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sun, 14 Oct 2012 22:15:17 +0000 Subject: [issue16236] Doc/Makefile should have $PYTHON=python2 Message-ID: <1350252917.6.0.180225296667.issue16236@psf.upfronthosting.co.za> New submission from Michele Orr?: On Arch/Linux, running `make html` fails with $ make html mkdir -p build/html build/doctrees python tools/sphinx-build.py -b html -d build/doctrees -D latex_paper_size= . build/html Traceback (most recent call last): File "tools/sphinx-build.py", line 27, in <module> from sphinx import main File "/..../cpython/Doc/tools/sphinx/__init__.py", line 44 except ImportError, err: ^ SyntaxError: invalid syntax make: *** [build] Error 1 That is because sphinx needs python version 2 to run; but `python` is symlinked to python3 on my platform. We should replace $PYTHON with python2, which AFAIS here[0], it would point to the correct version. [0] http://hg.python.org/cpython/file/5fc6f47974db/Makefile.pre.in#l808 ---------- components: Interpreter Core messages: 172931 nosy: maker priority: normal severity: normal status: open title: Doc/Makefile should have $PYTHON=python2 versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16236> _______________________________________ From report at bugs.python.org Mon Oct 15 00:16:06 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sun, 14 Oct 2012 22:16:06 +0000 Subject: [issue16236] Doc/Makefile should have $PYTHON=python2 In-Reply-To: <1350252917.6.0.180225296667.issue16236@psf.upfronthosting.co.za> Message-ID: <1350252966.65.0.473999154432.issue16236@psf.upfronthosting.co.za> Changes by Michele Orr? <maker.py at gmail.com>: ---------- keywords: +patch Added file: http://bugs.python.org/file27576/issue16236.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16236> _______________________________________ From report at bugs.python.org Mon Oct 15 00:17:48 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sun, 14 Oct 2012 22:17:48 +0000 Subject: [issue16236] Doc/Makefile should have $PYTHON=python2 In-Reply-To: <1350252917.6.0.180225296667.issue16236@psf.upfronthosting.co.za> Message-ID: <1350253068.3.0.961275273286.issue16236@psf.upfronthosting.co.za> Changes by Michele Orr? <maker.py at gmail.com>: ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16236> _______________________________________ From report at bugs.python.org Mon Oct 15 00:22:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2012 22:22:13 +0000 Subject: [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350253333.89.0.993602903636.issue16225@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I mean it does not lead to crash, hang, etc. Even growing list during iteration can be safe you move forward faster than list grows or if you known where to stop. Unexpected behavior for one people can be expected for others. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16225> _______________________________________ From report at bugs.python.org Mon Oct 15 00:34:39 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 22:34:39 +0000 Subject: [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350254079.74.0.873932835191.issue16225@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I mean it does not lead to crash, hang, etc. I agree. I removed the word "safe" in the patch I attached to reduce ambiguity. Regarding unexpected behavior, remember that the tutorial is for beginners/newcomers. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16225> _______________________________________ From report at bugs.python.org Mon Oct 15 01:00:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2012 23:00:23 +0000 Subject: [issue16225] list.remove in for loop In-Reply-To: <1350254079.74.0.873932835191.issue16225@psf.upfronthosting.co.za> Message-ID: <201210150200.07479.storchaka@gmail.com> Serhiy Storchaka added the comment: > I agree. I removed the word "safe" in the patch I attached to reduce > ambiguity. Yes, so much the better. It will be nice somewhere in deep clarify for experts what happens with list iterator if the list changed. And iterating over modifyed (if you insert/remove keys, but not when you only update values) dict or set really yield unexpected results (i.e. they expected in them undefinability). This is really not recommended. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16225> _______________________________________ From report at bugs.python.org Mon Oct 15 01:04:25 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 14 Oct 2012 23:04:25 +0000 Subject: [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350255865.19.0.0379302970244.issue16225@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > It will be nice somewhere in deep clarify for experts what happens with list iterator if the list changed. There is a note somewhat to this effect here: http://docs.python.org/dev/reference/compound_stmts.html#the-for-statement "Note There is a subtlety when the sequence is being modified by the loop...." ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16225> _______________________________________ From report at bugs.python.org Mon Oct 15 03:25:38 2012 From: report at bugs.python.org (Roger Serwy) Date: Mon, 15 Oct 2012 01:25:38 +0000 Subject: [issue16226] IDLE crashes on *File / Path browser* In-Reply-To: <1350206279.5.0.670551753566.issue16226@psf.upfronthosting.co.za> Message-ID: <1350264338.36.0.653125202792.issue16226@psf.upfronthosting.co.za> Roger Serwy added the comment: Here's the revision that broke it: b81ddaf0db47 The 2.7 branch still uses imp.get_suffixes, whereas the 3.3 and 3.4 uses this importlib construct. The imp.get_suffixes returns a list of tuples of 3 items: (suffix, mode, type). The current code only returns what would be the first item of that tuple. The for-loop only uses that first item anyway, so the tuple unpacking can be removed safely. The attached patch fixes the issue. It also includes a basic unit test within the idlelib/test directory. We need to get the unittest framework started for IDLE, as given in issue15392. ---------- keywords: +patch nosy: +serwy Added file: http://bugs.python.org/file27577/issue16226.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16226> _______________________________________ From report at bugs.python.org Mon Oct 15 03:29:22 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 15 Oct 2012 01:29:22 +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: <1350264562.63.0.685261140718.issue16234@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16234> _______________________________________ From report at bugs.python.org Mon Oct 15 04:03:29 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 15 Oct 2012 02:03:29 +0000 Subject: [issue16230] select.select crashes on resized lists In-Reply-To: <1350211036.55.0.523850963705.issue16230@psf.upfronthosting.co.za> Message-ID: <1350266609.43.0.727327723366.issue16230@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16230> _______________________________________ From report at bugs.python.org Mon Oct 15 04:04:14 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 15 Oct 2012 02:04:14 +0000 Subject: [issue16228] JSON crashes during encoding resized lists In-Reply-To: <1350208578.8.0.440875886805.issue16228@psf.upfronthosting.co.za> Message-ID: <1350266654.96.0.556963903821.issue16228@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16228> _______________________________________ From report at bugs.python.org Mon Oct 15 04:20:54 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 15 Oct 2012 02:20:54 +0000 Subject: [issue16220] wsgiref does not call close() on iterable response In-Reply-To: <1350162020.69.0.603099084932.issue16220@psf.upfronthosting.co.za> Message-ID: <1350267654.36.0.0868336099359.issue16220@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16220> _______________________________________ From report at bugs.python.org Mon Oct 15 04:22:50 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 15 Oct 2012 02:22:50 +0000 Subject: [issue16220] wsgiref does not call close() on iterable response In-Reply-To: <1350162020.69.0.603099084932.issue16220@psf.upfronthosting.co.za> Message-ID: <1350267770.12.0.747766367375.issue16220@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Brent, could you possibly provide also a test?. Something to integrate with the standard testsuite that fails without your patch but passes with it. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16220> _______________________________________ From report at bugs.python.org Mon Oct 15 04:24:31 2012 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 15 Oct 2012 02:24:31 +0000 Subject: [issue16237] bdist_rpm SPEC files created with distutils may be distro specific Message-ID: <1350267871.71.0.392371801371.issue16237@psf.upfronthosting.co.za> New submission from Nick Coghlan: In resolving 14443 we effectively embedded the vendor macros in the SPEC file generated by bdist_rpm on older versions of RHEL (and derivatives). While I think that's a necessary evil (in order to create Python 3 RPMs that actually work properly at all on those platforms), we should note the distro limitation somewhere in the documentation: even if the RPM would otherwise work properly on Fedora *and* RHEL (and perhaps even openSUSE), the embedded copy of the vendor post install macros may misfire. ---------- assignee: docs at python components: Documentation messages: 172938 nosy: dmalcolm, docs at python, ncoghlan priority: normal severity: normal stage: needs patch status: open title: bdist_rpm SPEC files created with distutils may be distro specific type: enhancement versions: Python 3.2, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16237> _______________________________________ From report at bugs.python.org Mon Oct 15 04:30:37 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 15 Oct 2012 02:30:37 +0000 Subject: [issue16220] wsgiref does not call close() on iterable response In-Reply-To: <1350162020.69.0.603099084932.issue16220@psf.upfronthosting.co.za> Message-ID: <1350268237.43.0.893794690171.issue16220@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Your patch is trivial enough, I am OK to integrate it as is, but it would be nice to verify that we are not reintroducing this bug in the future. I know that writing a the test will be far more difficult that writing the patch. You can try :). Anyway I am OK to integrate current patch as is. Looks simple enough. The comment in "run()" is a bit scary, and we could call "self.close()" twice, with this patch, or call extra code after "self.close()" is called. I don't know it that would be an issue, I am not familiarized enough with WSGI. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16220> _______________________________________ From report at bugs.python.org Mon Oct 15 04:40:05 2012 From: report at bugs.python.org (Graham Dumpleton) Date: Mon, 15 Oct 2012 02:40:05 +0000 Subject: [issue16220] wsgiref does not call close() on iterable response In-Reply-To: <1350162020.69.0.603099084932.issue16220@psf.upfronthosting.co.za> Message-ID: <1350268805.93.0.821815332061.issue16220@psf.upfronthosting.co.za> Graham Dumpleton added the comment: Hmmm. Wonders if finally finding this was prompted in part by recent post about this very issue. :-) http://blog.dscpl.com.au/2012/10/obligations-for-calling-close-on.html Also related is this issue from Django I highlighted long time ago. https://code.djangoproject.com/ticket/16241 I would have to look through Django code again but wondering if the issue there was in fact caused by underlying issue in standard library or whether would have needed to be separately fixed in Django still. ---------- nosy: +grahamd _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16220> _______________________________________ From report at bugs.python.org Mon Oct 15 04:42:38 2012 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Oct 2012 02:42:38 +0000 Subject: [issue16236] Doc/Makefile should have $PYTHON=python2 In-Reply-To: <1350252917.6.0.180225296667.issue16236@psf.upfronthosting.co.za> Message-ID: <1350268958.79.0.738088559322.issue16236@psf.upfronthosting.co.za> Ned Deily added the comment: The patch should not unconditionally use `python2` since many distributions do not yet install a `python2` link to the interpreter nor is there one when running python2.7 from a build directory. The Makefile could conditionally try `python2` and then fall back to `python`. ---------- nosy: +ned.deily versions: +Python 2.7 -Python 3.1, Python 3.5 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16236> _______________________________________ From report at bugs.python.org Mon Oct 15 04:43:39 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 15 Oct 2012 02:43:39 +0000 Subject: [issue16225] list.remove in for loop In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350269019.33.0.108745535647.issue16225@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16225> _______________________________________ From report at bugs.python.org Mon Oct 15 04:57:44 2012 From: report at bugs.python.org (Roger Serwy) Date: Mon, 15 Oct 2012 02:57:44 +0000 Subject: [issue16186] shlex bug? In-Reply-To: <1349876824.59.0.894274371181.issue16186@psf.upfronthosting.co.za> Message-ID: <1350269864.42.0.526658185841.issue16186@psf.upfronthosting.co.za> Roger Serwy added the comment: Upon further reading of the non-POSIX mode of shlex, this behavior is not a bug. See http://docs.python.org/py3k/library/shlex.html?highlight=shlex#parsing-rules The "'h' w" test case parses correctly according to: * Closing quotes separate words ("Do"Separate is parsed as "Do" and Separate); The " 'h' w" test case parses correctly, since the quote is now within a word. The literal whitespace at the beginning is not recognized as whitespace, as it is not a "|". This follows the rule: * Quote characters are not recognized within words (Do"Not"Separate is parsed as the single word Do"Not"Separate); I'm closing this issue as invalid. Feel free to reopen if there is an error in my analysis. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16186> _______________________________________ From report at bugs.python.org Mon Oct 15 04:57:59 2012 From: report at bugs.python.org (Roger Serwy) Date: Mon, 15 Oct 2012 02:57:59 +0000 Subject: [issue16186] shlex bug? In-Reply-To: <1349876824.59.0.894274371181.issue16186@psf.upfronthosting.co.za> Message-ID: <1350269879.76.0.389519072316.issue16186@psf.upfronthosting.co.za> Changes by Roger Serwy <roger.serwy at gmail.com>: ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16186> _______________________________________ From report at bugs.python.org Mon Oct 15 05:05:05 2012 From: report at bugs.python.org (Roger Serwy) Date: Mon, 15 Oct 2012 03:05:05 +0000 Subject: [issue16200] Setting .posix=True for shlex object causes infinite loop in __next__ In-Reply-To: <1349982570.12.0.849029926696.issue16200@psf.upfronthosting.co.za> Message-ID: <1350270304.99.0.689804285407.issue16200@psf.upfronthosting.co.za> Changes by Roger Serwy <roger.serwy at gmail.com>: ---------- nosy: +ezio.melotti _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16200> _______________________________________ From report at bugs.python.org Mon Oct 15 06:23:11 2012 From: report at bugs.python.org (Roger Serwy) Date: Mon, 15 Oct 2012 04:23:11 +0000 Subject: [issue16198] IDLE - tabbing in a string always brings up file completion window In-Reply-To: <1349993612.51.0.87131801476.issue16198@psf.upfronthosting.co.za> Message-ID: <507B8FB1.2000809@gmail.com> Roger Serwy added the comment: > I think that maybe tabs within strings should always do the same as within comments. Perhaps one way is enough. (I am guessing that other editors use <tab> for this, so I can see the desire to use it.) There needs to be a way to get tabbing within multiline strings. I did not see 'file completion' in Options/Configure/Keys. Is it there under a different name? Tab completion for file names is a convenience feature in IDLE, since file I/O requires specifying file names in strings. The given patch restores tabbing within a multiline string. There is no configuration option for file completion. > > I was puzzled by the example path d:/Biblioteca/T?cnica/inform?tica/Python from #14937 until I retried in 3.2.3. In 3.3.0, a / disables filename completion. I reopened this issue. I can use either "/" or "\" for file completion under Windows 7 with 3.3.0. Try "C:/" instead. > > If one types 'd:\' and there is no d:, <tab> inserts spaces and ^space is ignored. I do not like this kind of inconsistency (or magical behavior shift). If you ask for file names, better to bring up a blank box, or a one-line box [<no matches>]. I agree that it is inconsistent, but then again, file-completion in a string with Tab is a convenience feature. There is no good way to specify "ask for file names" unless you create a separate key binding just for that. Sometimes, a Tab is just a Tab. The behavior introduced by the provided patch will only provide the file completion box (or automatic fill-in) if the given string already partially matches a file in the file system. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16198> _______________________________________ From report at bugs.python.org Mon Oct 15 06:41:50 2012 From: report at bugs.python.org (Roger Serwy) Date: Mon, 15 Oct 2012 04:41:50 +0000 Subject: [issue10834] Python 2.7 x86 IDLE fails to run in Windows 7 In-Reply-To: <1294224063.9.0.656095341139.issue10834@psf.upfronthosting.co.za> Message-ID: <1350276110.77.0.451414630557.issue10834@psf.upfronthosting.co.za> Roger Serwy added the comment: Running "python -m test.test_asynchat" succeeds on Windows 7 with version 2.7.3. I'm closing this issue as it works for me. Feel free to re-open if you disagree. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10834> _______________________________________ From report at bugs.python.org Mon Oct 15 07:19:58 2012 From: report at bugs.python.org (Brent Tubbs) Date: Mon, 15 Oct 2012 05:19:58 +0000 Subject: [issue16220] wsgiref does not call close() on iterable response In-Reply-To: <1350162020.69.0.603099084932.issue16220@psf.upfronthosting.co.za> Message-ID: <1350278398.38.0.616265483664.issue16220@psf.upfronthosting.co.za> Brent Tubbs added the comment: You guessed it Graham! Bob Brewer pointed me to your post while I was fighting with this, which led me to testing the behavior under various servers and finding the wsgiref issue. Current Django trunk doesn't have its own finish_response anymore for the dev server; it's using the one on wsgiref's BaseHandler. So Django's problem should get fixed when wsgiref's does. I'm working on a test of the simpler case of ensuring that close() is called when any old exception is raised during the response. A test that actually sets up a socket and tests the client disconnecting would be a lot more complicated and a bit out of step with the current wsgi tests that all seem to use a socket-less mock. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16220> _______________________________________ From report at bugs.python.org Mon Oct 15 08:11:49 2012 From: report at bugs.python.org (Bryce Verdier) Date: Mon, 15 Oct 2012 06:11:49 +0000 Subject: [issue15936] Add link from os.urandom to random.SystemRandom In-Reply-To: <1347487742.57.0.57747338883.issue15936@psf.upfronthosting.co.za> Message-ID: <1350281509.37.0.35326605814.issue15936@psf.upfronthosting.co.za> Bryce Verdier added the comment: Ramchandra, doesn't the description of os.urandom already imply that it's a low-level interface? Or are you saying that you want this to be explicitly stated? I would also like to work on this bug ---------- nosy: +louiscipher _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15936> _______________________________________ From report at bugs.python.org Mon Oct 15 08:52:54 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 06:52:54 +0000 Subject: [issue13454] crash when deleting one pair from tee() In-Reply-To: <1321978245.14.0.0332901316698.issue13454@psf.upfronthosting.co.za> Message-ID: <1350283974.07.0.703010605681.issue13454@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: Removed file: http://bugs.python.org/file27568/itertools_tee_nonrecursive_clear.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13454> _______________________________________ From report at bugs.python.org Mon Oct 15 08:53:42 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 06:53:42 +0000 Subject: [issue13454] crash when deleting one pair from tee() In-Reply-To: <1321978245.14.0.0332901316698.issue13454@psf.upfronthosting.co.za> Message-ID: <1350284022.75.0.131915651243.issue13454@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: Added file: http://bugs.python.org/file27578/itertools_tee_nonrecursive_clear.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13454> _______________________________________ From report at bugs.python.org Mon Oct 15 09:20:50 2012 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 15 Oct 2012 07:20:50 +0000 Subject: [issue11009] urllib.splituser is not documented In-Reply-To: <1295987078.02.0.421774194417.issue11009@psf.upfronthosting.co.za> Message-ID: <1350285650.59.0.327090908544.issue11009@psf.upfronthosting.co.za> anatoly techtonik added the comment: Why not to follow the convention and add underscore _ to the names to remove the ambiguity and future reports and confusion about that thees functions are not documented? ---------- status: closed -> pending _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11009> _______________________________________ From report at bugs.python.org Mon Oct 15 09:38:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 07:38:07 +0000 Subject: [issue8402] Add a way to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1350286687.3.0.795051528094.issue8402@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > The attached patch adds support for '\\' escaping to fnmatch, and consequently to glob. This is a backward incompatible change. For example glob.glob(r'C:\Program Files\*') will be broken. As flacs says a way to escape metacharacters in glob/fnmatch already exists. If someone want to match literal name "Ajax_[version2].txt" it should use pattern "Ajax_[[]version2].txt". Documentation should explicitly mentions such way. It will be good also to add new fnmatch.escape() function. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8402> _______________________________________ From report at bugs.python.org Mon Oct 15 09:52:04 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 15 Oct 2012 07:52:04 +0000 Subject: [issue16211] MacInstalls break PyDev In-Reply-To: <1350050095.97.0.144464091668.issue16211@psf.upfronthosting.co.za> Message-ID: <1350287524.25.0.358555447504.issue16211@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'm closing this as invalid as the python sources for the stdlib are installed by the python.org installer, and this is probably a problem with PyDev. It is lame that Apple doesn't install the python sources anymore, but there is nothing we can do about that. Feel free to reopen when there is more information that points to a problem with python. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16211> _______________________________________ From report at bugs.python.org Mon Oct 15 09:52:48 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 15 Oct 2012 07:52:48 +0000 Subject: [issue14329] proxy_bypass_macosx_sysconf does not handle singel ip addresses correctly In-Reply-To: <1331851754.34.0.615850283155.issue14329@psf.upfronthosting.co.za> Message-ID: <1350287568.85.0.765352612502.issue14329@psf.upfronthosting.co.za> Changes by Ronald Oussoren <ronaldoussoren at mac.com>: ---------- status: pending -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14329> _______________________________________ From report at bugs.python.org Mon Oct 15 10:04:40 2012 From: report at bugs.python.org (Francisco Gracia) Date: Mon, 15 Oct 2012 08:04:40 +0000 Subject: [issue16229] Module *redemo.py* lacking in recent Python distributions In-Reply-To: <1350236949.44.0.927008518375.issue16229@psf.upfronthosting.co.za> Message-ID: <CACiybx7OM0xNXG3Uwwk89RkFzKkWy9cKv7ZvwPw7bKvcY26wiw@mail.gmail.com> Francisco Gracia added the comment: You are right. I am referring to the Windows installer. I forgot to mention that I am using Windows XP. Thank you. 2012/10/14 Ned Deily <report at bugs.python.org> > > Ned Deily added the comment: > > The demo scripts in the Tools directory were cleaned up earlier in Python > 3 and moved. redemo.py is still included in the 3.2 and later source > distributions in the Tools/demo directory. The builders of binary > installers and third-party distributors of Python 3.x may make their own > decisions about whether to include the Tools directory in their distros. > For which platform and from what source are you installing Python 3.2? > > ---------- > nosy: +ned.deily > > _______________________________________ > Python tracker <report at bugs.python.org> > <http://bugs.python.org/issue16229> > _______________________________________ > ---------- title: File *redemo.py* lacking in recent Python distributions -> Module *redemo.py* lacking in recent Python distributions _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16229> _______________________________________ From report at bugs.python.org Mon Oct 15 10:42:17 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 08:42:17 +0000 Subject: [issue8402] Add a way to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1350290537.96.0.713616183254.issue8402@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which add fnmatch.escape() function. ---------- Added file: http://bugs.python.org/file27579/fnmatch_escape.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8402> _______________________________________ From report at bugs.python.org Mon Oct 15 11:11:40 2012 From: report at bugs.python.org (Graham Dumpleton) Date: Mon, 15 Oct 2012 09:11:40 +0000 Subject: [issue16220] wsgiref does not call close() on iterable response In-Reply-To: <1350162020.69.0.603099084932.issue16220@psf.upfronthosting.co.za> Message-ID: <1350292300.83.0.16273384128.issue16220@psf.upfronthosting.co.za> Graham Dumpleton added the comment: That's right, the Django bug report I filed was actually for Django 1.3, which didn't use wsgiref. I wasn't using Django 1.4 at the time so didn't bother to check its new implementation based on wsgiref. Instead I just assumed wsgiref would be right. Whoops. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16220> _______________________________________ From report at bugs.python.org Mon Oct 15 11:33:33 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Oct 2012 09:33:33 +0000 Subject: [issue16200] Setting .posix=True for shlex object causes infinite loop in __next__ In-Reply-To: <1349982570.12.0.849029926696.issue16200@psf.upfronthosting.co.za> Message-ID: <1350293613.97.0.206427789685.issue16200@psf.upfronthosting.co.za> Ezio Melotti added the comment: Making .posix read-only is technically backward-incompatible, but I'm not sure if there are cases where people might have changed its value without incurring in the bug. Leaving .posix read/writable and changing .eof accordingly might be a better solution. As a side note, you can use assertRaises (possibly as a context manager) in the tests. ---------- stage: -> patch review versions: +Python 3.2 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16200> _______________________________________ From report at bugs.python.org Mon Oct 15 12:11:35 2012 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 15 Oct 2012 10:11:35 +0000 Subject: [issue10836] TypeError during exception handling in urllib.request.urlretrieve In-Reply-To: <1294252036.56.0.144119584231.issue10836@psf.upfronthosting.co.za> Message-ID: <1350295895.39.0.681675136591.issue10836@psf.upfronthosting.co.za> anatoly techtonik added the comment: Looks like a regression - I can't remember such messages in Python 2. ---------- nosy: +techtonik _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10836> _______________________________________ From report at bugs.python.org Mon Oct 15 12:37:03 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Oct 2012 10:37:03 +0000 Subject: [issue5256] rlcompleter adds builtins when custom dict is used In-Reply-To: <1234569860.16.0.0783224890959.issue5256@psf.upfronthosting.co.za> Message-ID: <1350297423.57.0.212278284608.issue5256@psf.upfronthosting.co.za> Ezio Melotti added the comment: I would make the argument keyword-only. Changing the logic to avoid eval() might be OK, but IIUC is not related to this issue, and it should be done separately. The markup in the doc could be better (`...` should be ``...`` or a more specific directive that generates a link). A versionchanged should be added as well. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5256> _______________________________________ From report at bugs.python.org Mon Oct 15 12:40:08 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Oct 2012 10:40:08 +0000 Subject: [issue16106] antigravity tests In-Reply-To: <1349134601.26.0.544681268044.issue16106@psf.upfronthosting.co.za> Message-ID: <1350297608.59.0.261226781959.issue16106@psf.upfronthosting.co.za> Ezio Melotti added the comment: The test could be made CPython-specific, but if you think it's not necessary I'll just close the issue. The main reason I wrote this was to experiment a bit with unittest.mock :) ---------- resolution: -> rejected stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16106> _______________________________________ From report at bugs.python.org Mon Oct 15 12:49:38 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Oct 2012 10:49:38 +0000 Subject: [issue16222] some terms not found by devguide's search box In-Reply-To: <1350193296.32.0.998873485723.issue16222@psf.upfronthosting.co.za> Message-ID: <1350298178.42.0.0764066812024.issue16222@psf.upfronthosting.co.za> Ezio Melotti added the comment: See also #15871. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16222> _______________________________________ From report at bugs.python.org Mon Oct 15 12:50:35 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 10:50:35 +0000 Subject: [issue8402] Add a way to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1350298235.87.0.951775306194.issue8402@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I am not sure if escape() should support bytes. translate() doesn't. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8402> _______________________________________ From report at bugs.python.org Mon Oct 15 13:02:50 2012 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 15 Oct 2012 11:02:50 +0000 Subject: [issue10836] regression: TypeError during exception handling in urllib.request.urlretrieve In-Reply-To: <1294252036.56.0.144119584231.issue10836@psf.upfronthosting.co.za> Message-ID: <1350298970.31.0.0812067598645.issue10836@psf.upfronthosting.co.za> anatoly techtonik added the comment: Clearly regressing. In Python 2 it was IOError exception: >>> import urllib >>> urllib.urlretrieve('missing') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\pp\lib\urllib.py", line 93, in urlretrieve return _urlopener.retrieve(url, filename, reporthook, data) File "C:\pp\lib\urllib.py", line 239, in retrieve fp = self.open(url, data) File "C:\pp\lib\urllib.py", line 207, in open return getattr(self, name)(url) File "C:\pp\lib\urllib.py", line 462, in open_file return self.open_local_file(url) File "C:\pp\lib\urllib.py", line 476, in open_local_file raise IOError(e.errno, e.strerror, e.filename) IOError: [Errno 2] The system cannot find the file specified: 'missing' >>> ---------- title: TypeError during exception handling in urllib.request.urlretrieve -> regression: TypeError during exception handling in urllib.request.urlretrieve _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10836> _______________________________________ From report at bugs.python.org Mon Oct 15 13:05:10 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Oct 2012 11:05:10 +0000 Subject: [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1350299110.51.0.674960545785.issue13538@psf.upfronthosting.co.za> Ezio Melotti added the comment: Instead of documenting what *encoding* and *errors* do, I would just say that str(bytesobj, encoding, errors) is equivalent to bytesobj.decode(encoding, errors) (assuming it really is). I don't like encodings/decodings done via the str/bytes constructors, and I think the docs should encourage the use of bytes.decode/str.encode. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13538> _______________________________________ From report at bugs.python.org Mon Oct 15 13:33:54 2012 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 15 Oct 2012 11:33:54 +0000 Subject: [issue16238] Automatically remove build directory when build options changed Message-ID: <1350300834.63.0.981208567885.issue16238@psf.upfronthosting.co.za> New submission from anatoly techtonik: After build options in setup.py is edited, command `python setup.py install` doesn't remove build directory and uses its cached content. This behavior is non-obvious and leads to errors. The proposal is to calculate hash from build configuration, save it in build directory, and regenerate build dir when hash doesn't match. ---------- assignee: eric.araujo components: Distutils, Distutils2 messages: 172961 nosy: alexis, eric.araujo, tarek, techtonik priority: normal severity: normal status: open title: Automatically remove build directory when build options changed type: behavior versions: Python 3.2 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16238> _______________________________________ From report at bugs.python.org Mon Oct 15 13:52:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 11:52:30 +0000 Subject: [issue10060] python.exe crashes or hangs on help() modules when bad modules found In-Reply-To: <1286676227.2.0.62342583611.issue10060@psf.upfronthosting.co.za> Message-ID: <1350301950.56.0.775638092471.issue10060@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- nosy: +serhiy.storchaka status: open -> pending _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10060> _______________________________________ From report at bugs.python.org Mon Oct 15 13:57:57 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 15 Oct 2012 11:57:57 +0000 Subject: [issue10836] regression: TypeError during exception handling in urllib.request.urlretrieve In-Reply-To: <1294252036.56.0.144119584231.issue10836@psf.upfronthosting.co.za> Message-ID: <1350302277.68.0.937642027023.issue10836@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc <amauryfa at gmail.com>: ---------- keywords: +easy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10836> _______________________________________ From report at bugs.python.org Mon Oct 15 14:02:42 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 12:02:42 +0000 Subject: [issue13929] fnmatch to support escape characters In-Reply-To: <1328251823.76.0.3651219427.issue13929@psf.upfronthosting.co.za> Message-ID: <1350302562.8.0.947945904914.issue13929@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Issue8402 has discussion and patch(es). ---------- nosy: +serhiy.storchaka resolution: -> duplicate status: open -> closed superseder: -> Add a way to escape metacharacters in glob/fnmatch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13929> _______________________________________ From report at bugs.python.org Mon Oct 15 14:06:03 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Oct 2012 12:06:03 +0000 Subject: [issue10836] regression: TypeError during exception handling in urllib.request.urlretrieve In-Reply-To: <1294252036.56.0.144119584231.issue10836@psf.upfronthosting.co.za> Message-ID: <1350302763.24.0.0873471325281.issue10836@psf.upfronthosting.co.za> Changes by STINNER Victor <victor.stinner at gmail.com>: ---------- nosy: +haypo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10836> _______________________________________ From report at bugs.python.org Mon Oct 15 14:25:16 2012 From: report at bugs.python.org (Roger Serwy) Date: Mon, 15 Oct 2012 12:25:16 +0000 Subject: [issue16200] Setting .posix=True for shlex object causes infinite loop in __next__ In-Reply-To: <1349982570.12.0.849029926696.issue16200@psf.upfronthosting.co.za> Message-ID: <1350303916.18.0.941016030427.issue16200@psf.upfronthosting.co.za> Roger Serwy added the comment: The shlex_posix_property.patch makes .posix a read/write property that changes .eof appropriately. ---------- Added file: http://bugs.python.org/file27580/shlex_posix_property.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16200> _______________________________________ From report at bugs.python.org Mon Oct 15 14:29:50 2012 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 15 Oct 2012 12:29:50 +0000 Subject: [issue15442] Expand the list of default dirs filecmp.dircmp ignores In-Reply-To: <1343147532.2.0.187379599839.issue15442@psf.upfronthosting.co.za> Message-ID: <1350304190.86.0.192885560616.issue15442@psf.upfronthosting.co.za> Eli Bendersky added the comment: I tend to agree with ?ric here. moijes12, would you like to send an updated patch without the raw literals, and with added tests for the new/changed functionality? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15442> _______________________________________ From report at bugs.python.org Mon Oct 15 14:51:30 2012 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 15 Oct 2012 12:51:30 +0000 Subject: [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1350305490.93.0.142531467061.issue15586@psf.upfronthosting.co.za> Changes by Eli Bendersky <eliben at gmail.com>: ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15586> _______________________________________ From report at bugs.python.org Mon Oct 15 14:55:38 2012 From: report at bugs.python.org (=?utf-8?q?Peter_W=C3=BCrtz?=) Date: Mon, 15 Oct 2012 12:55:38 +0000 Subject: [issue16239] PEP8 arithmetic operator examples Message-ID: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> New submission from Peter W?rtz: I think the PEP8 examples for arithmetic expressions are a bit misleading. (http://www.python.org/dev/peps/pep-0008/#id20) The text clearly says that it should add spaces around operators of low(est) priority, which means that I'm encouraged to visually group an expression of high priority. It doesn't say (anymore?) that there should always be spaces around all arithmetic operators. This is however not reflected in the examples. In the examples "x = x*2 - 1" is listed as a negative example, while being perfectly compliant with the guide. Shouldn't this be in the "Yes" or an "Optionally" example block? I believe these examples may cause some people to interpret the style guide in a very rigid way, eventually leading to PEP8 formatting tools that flatten out nicely grouped expressions. ---------- assignee: docs at python components: Documentation messages: 172965 nosy: docs at python, pwuertz priority: normal severity: normal status: open title: PEP8 arithmetic operator examples type: enhancement _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16239> _______________________________________ From report at bugs.python.org Mon Oct 15 14:55:57 2012 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 15 Oct 2012 12:55:57 +0000 Subject: [issue15811] ElementTree.write() raises TypeError when xml_declaration = True and encoding is a unicode string In-Reply-To: <1346246320.04.0.762260786774.issue15811@psf.upfronthosting.co.za> Message-ID: <1350305757.15.0.845398870273.issue15811@psf.upfronthosting.co.za> Eli Bendersky added the comment: Finally found time to look at this, sorry for the delay. I agree with Amaury, and don't think any change is necessary in 2.7, the behavior there is quite consistent with what was usually done in 2.x. For porting or keeping the code 2/3 compatible, Amaury's solution is appropriate. ---------- resolution: -> wont fix stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15811> _______________________________________ From report at bugs.python.org Mon Oct 15 14:56:35 2012 From: report at bugs.python.org (Kushal Das) Date: Mon, 15 Oct 2012 12:56:35 +0000 Subject: [issue16238] Automatically remove build directory when build options changed In-Reply-To: <1350300834.63.0.981208567885.issue16238@psf.upfronthosting.co.za> Message-ID: <1350305795.59.0.757671652659.issue16238@psf.upfronthosting.co.za> Changes by Kushal Das <kushaldas at gmail.com>: ---------- nosy: +kushaldas _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16238> _______________________________________ From report at bugs.python.org Mon Oct 15 14:59:00 2012 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 15 Oct 2012 12:59:00 +0000 Subject: [issue15518] Provide test coverage for filecmp.dircmp.report methods. In-Reply-To: <1343786533.33.0.657671203467.issue15518@psf.upfronthosting.co.za> Message-ID: <1350305940.61.0.0193819592468.issue15518@psf.upfronthosting.co.za> Eli Bendersky added the comment: Moving to 3.4 In 3.3 we won't add functionality to filecmp, but in 3.4 we will, so the new tests should go there. ---------- nosy: +eli.bendersky versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15518> _______________________________________ From report at bugs.python.org Mon Oct 15 15:04:20 2012 From: report at bugs.python.org (Brett Cannon) Date: Mon, 15 Oct 2012 13:04:20 +0000 Subject: [issue16214] 2to3 does not remove exceptions import In-Reply-To: <1350067490.94.0.738974146357.issue16214@psf.upfronthosting.co.za> Message-ID: <1350306260.83.0.968742091817.issue16214@psf.upfronthosting.co.za> Changes by Brett Cannon <brett at python.org>: ---------- resolution: -> duplicate status: open -> closed superseder: -> 'exceptions' import fixer _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16214> _______________________________________ From report at bugs.python.org Mon Oct 15 15:05:23 2012 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 15 Oct 2012 13:05:23 +0000 Subject: [issue15518] Provide test coverage for filecmp.dircmp.report methods. In-Reply-To: <1343786533.33.0.657671203467.issue15518@psf.upfronthosting.co.za> Message-ID: <1350306323.01.0.958450931667.issue15518@psf.upfronthosting.co.za> Eli Bendersky added the comment: Chris Calloway, let's move this forward. I want to see more tests for filecmp ASAP. Please address Chris Jerdonek's points in a new patch made vs. fresh default branch (3.4), at this point "cd"ing (before the test_cwd thing is done). For testing code, practicality beats purity. Having these tests in place will help moving other issues forward (i.e. #15454). Also, as Chris Jerdonek has mentioned, having as little as possible in each test_ method is a good practice, and older test code that doesn't follow it can be fixed later (patches welcome). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15518> _______________________________________ From report at bugs.python.org Mon Oct 15 15:06:00 2012 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 15 Oct 2012 13:06:00 +0000 Subject: [issue15351] Add to unittest.TestCase support for using context managers In-Reply-To: <1342280032.27.0.345733068822.issue15351@psf.upfronthosting.co.za> Message-ID: <1350306360.88.0.387929801237.issue15351@psf.upfronthosting.co.za> Changes by Eli Bendersky <eliben at gmail.com>: ---------- nosy: +eli.bendersky _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15351> _______________________________________ From report at bugs.python.org Mon Oct 15 15:23:34 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 13:23:34 +0000 Subject: [issue13133] FD leaks in ZipFile.read(), ZipFile.extract() and also using explicit arc_member.close() In-Reply-To: <1318099735.4.0.121973105523.issue13133@psf.upfronthosting.co.za> Message-ID: <1350307414.45.0.778120622989.issue13133@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13133> _______________________________________ From report at bugs.python.org Mon Oct 15 15:28:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 13:28:08 +0000 Subject: [issue9969] tokenize: add support for tokenizing 'str' objects In-Reply-To: <1285679839.5.0.180278126855.issue9969@psf.upfronthosting.co.za> Message-ID: <1350307688.43.0.595543139715.issue9969@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- versions: +Python 3.4 -Python 3.2, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9969> _______________________________________ From report at bugs.python.org Mon Oct 15 15:29:11 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 13:29:11 +0000 Subject: [issue7101] tarfile: OSError with TarFile.add(..., recursive=True) about non-existing file In-Reply-To: <1255218562.66.0.694569702907.issue7101@psf.upfronthosting.co.za> Message-ID: <1350307751.93.0.588345815403.issue7101@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- status: open -> languishing _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue7101> _______________________________________ From report at bugs.python.org Mon Oct 15 15:35:47 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 15 Oct 2012 13:35:47 +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: <1350308147.49.0.680804721845.issue15721@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Andrew, I have questions about the following part of commit bf9d118779f5: + PyTclObject_Type_slots[3].pfunc = PyObject_GenericGetAttr; First, the "3" refers to the position of Py_tp_getattro in the array, which is a fragile thing IMO. Then, this hack was not necessary before; why is it needed now? IIRC on Windows a static initializer cannot contain dll-imported variables, but function pointers are OK. Or do you have evidence of the contrary? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15721> _______________________________________ From report at bugs.python.org Mon Oct 15 15:58:25 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 13:58:25 +0000 Subject: [issue1776674] glob.glob inconsistent Message-ID: <1350309505.61.0.525701373706.issue1776674@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The question is what result desirable for glob.glob("c:/tmp///3691674.jpg*"), ['c:/tmp///3691674.jpg'] or ['c:\\tmp\\3691674.jpg']? ---------- nosy: +serhiy.storchaka versions: +Python 3.3, Python 3.4 -Python 3.1 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1776674> _______________________________________ From report at bugs.python.org Mon Oct 15 16:03:53 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 15 Oct 2012 14:03:53 +0000 Subject: [issue15936] Add link from os.urandom to random.SystemRandom In-Reply-To: <1347487742.57.0.57747338883.issue15936@psf.upfronthosting.co.za> Message-ID: <1350309833.4.0.333894862931.issue15936@psf.upfronthosting.co.za> Ramchandra Apte added the comment: @Bryce Retract that message. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15936> _______________________________________ From report at bugs.python.org Mon Oct 15 16:08:57 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 14:08:57 +0000 Subject: [issue1776674] glob.glob inconsistent Message-ID: <1350310137.63.0.412287934179.issue1776674@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have added some comments in Rietveld. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1776674> _______________________________________ From report at bugs.python.org Mon Oct 15 16:16:14 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Oct 2012 14:16:14 +0000 Subject: [issue8402] Add a way to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1350310574.52.0.388722306768.issue8402@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think the escaping workaround should be documented in the glob and/or fnmatch docs. This way users can simply do: import glob glob.glob("c:\abc\afolderwith[[]test]\*") rather than import glob import fnmatch glob.glob(fnmatch.escape("c:\abc\afolderwith[test]\") + "*") The function might still be useful with patterns constructed programmatically, but I'm not sure how common the problem really is. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8402> _______________________________________ From report at bugs.python.org Mon Oct 15 16:16:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 14:16:22 +0000 Subject: [issue1776674] glob.glob inconsistent Message-ID: <1350310582.1.0.801238766709.issue1776674@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Shell preserves the separators. Well, in any case we always can apply os.path.normpath() to result. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1776674> _______________________________________ From report at bugs.python.org Mon Oct 15 16:34:38 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Oct 2012 14:34:38 +0000 Subject: [issue1776674] glob.glob inconsistent Message-ID: <1350311678.02.0.882383490789.issue1776674@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +ezio.melotti _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1776674> _______________________________________ From report at bugs.python.org Mon Oct 15 16:35:19 2012 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 15 Oct 2012 14:35:19 +0000 Subject: [issue10836] regression: TypeError during exception handling in urllib.request.urlretrieve In-Reply-To: <1294252036.56.0.144119584231.issue10836@psf.upfronthosting.co.za> Message-ID: <1350311719.33.0.60573082742.issue10836@psf.upfronthosting.co.za> Changes by Guido van Rossum <guido at python.org>: ---------- priority: normal -> high _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10836> _______________________________________ From report at bugs.python.org Mon Oct 15 16:36:40 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 15 Oct 2012 14:36:40 +0000 Subject: [issue16231] pickle persistent_id return value In-Reply-To: <1350225017.39.0.976217955919.issue16231@psf.upfronthosting.co.za> Message-ID: <1350311800.15.0.507351896709.issue16231@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: An easy workaround (and probably the preferred method) it to return a (tag, index) tuple, like the example in http://docs.python.org/release/3.2/library/pickle.html#pickle-persistent Testing for the None value introduces a slight incompatibility, so IMO it could only be changed for 3.4. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16231> _______________________________________ From report at bugs.python.org Mon Oct 15 16:43:29 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 14:43:29 +0000 Subject: [issue16240] Document a way to escape metacharacters in glob/fnmatch Message-ID: <1350312209.74.0.651951907427.issue16240@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: fnmatch.translate's docstraing says "There is no way to quote meta-characters.", but this is wrong. One can remove the special meaning of ``'?'``, ``'*'`` and ``'['`` by wrapping them between square brackets. Thus, ``'[?]'`` matches the literal character ``'?'``. There are a lot of related issues: issue8402, issue13929, issue9358, issue738389, issue738361, issue1580472, issue5852. ---------- assignee: docs at python components: Documentation files: fnmatch_doc_escape.patch keywords: easy, patch messages: 172976 nosy: docs at python, serhiy.storchaka priority: high severity: normal status: open title: Document a way to escape metacharacters in glob/fnmatch type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27581/fnmatch_doc_escape.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16240> _______________________________________ From report at bugs.python.org Mon Oct 15 16:45:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 14:45:22 +0000 Subject: [issue8402] Add a way to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1350312322.77.0.296689063664.issue8402@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I think the escaping workaround should be documented in the glob and/or fnmatch docs. See issue16240. This issue left for enhancement. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8402> _______________________________________ From report at bugs.python.org Mon Oct 15 16:49:07 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Oct 2012 14:49:07 +0000 Subject: [issue10836] regression: TypeError during exception handling in urllib.request.urlretrieve In-Reply-To: <1294252036.56.0.144119584231.issue10836@psf.upfronthosting.co.za> Message-ID: <1350312547.88.0.446842918186.issue10836@psf.upfronthosting.co.za> Ezio Melotti added the comment: The problem is in open_local_file (Lib/urllib/request.py:1885). It passes 3 arguments to URLError, but the constructor only accepts 2: reason and filename (Lib/urllib/error.py:29). This used to be an IOError when urllib was a single module rather than a package. ---------- nosy: +ezio.melotti versions: +Python 3.3, Python 3.4 -Python 3.1 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10836> _______________________________________ From report at bugs.python.org Mon Oct 15 16:50:24 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 14:50:24 +0000 Subject: [issue8402] Add a way to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1350312624.91.0.588278232406.issue8402@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated (thanks Ezio for review and comments). ---------- Added file: http://bugs.python.org/file27582/fnmatch_escape_2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8402> _______________________________________ From report at bugs.python.org Mon Oct 15 16:53:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 14:53:26 +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: <1350312806.1.0.967416129341.issue8402@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- title: Add a way to escape metacharacters in glob/fnmatch -> Add a function to escape metacharacters in glob/fnmatch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8402> _______________________________________ From report at bugs.python.org Mon Oct 15 17:05:21 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 15 Oct 2012 15:05:21 +0000 Subject: [issue16241] "-X faulthandler" is not documented in -X option docs Message-ID: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> New submission from Ramchandra Apte: http://docs.python.org/release/3.3.0/using/cmdline.html#cmdoption-X says "CPython currently defines none of them..." But in Python 3.3, "faulthandler" can be passed to the option. ---------- assignee: docs at python components: Documentation messages: 172980 nosy: docs at python, ramchandra.apte priority: normal severity: normal status: open title: "-X faulthandler" is not documented in -X option docs versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16241> _______________________________________ From report at bugs.python.org Mon Oct 15 17:06:39 2012 From: report at bugs.python.org (Jan Lieskovsky) Date: Mon, 15 Oct 2012 15:06:39 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1350313599.07.0.895636084976.issue16202@psf.upfronthosting.co.za> Jan Lieskovsky added the comment: Jeroen, just out of curiosity. Is the current issue different from CVE-2008-5983 (at first quick glance it looks the be the same issue):? [1] http://bugs.python.org/issue5753 Thank you, Jan. -- Jan iankko Lieskovsky ---------- nosy: +iankko _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Mon Oct 15 17:13:46 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 15 Oct 2012 15:13:46 +0000 Subject: [issue10836] urllib.request.urlretrieve calls URLError with 3 args In-Reply-To: <1294252036.56.0.144119584231.issue10836@psf.upfronthosting.co.za> Message-ID: <1350314026.17.0.629098082393.issue10836@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The presence of "During handling of the above exception, another exception occurred:" is part of an intentional change between 2.x and 3.x. Exception handling has been tweaked a bit more in the past year. 3.2.3 only gives the second half of the traceback, which I suppose is worse. In 3.3.0, the exception raising an exception behavior is fixed for this particular input on my Win 7 system. >>> import urllib.request >>> urllib.request.urlretrieve('missing') Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> urllib.request.urlretrieve('missing') File "C:\Programs\Python33\lib\urllib\request.py", line 185, in urlretrieve with contextlib.closing(urlopen(url, data)) as fp: File "C:\Programs\Python33\lib\urllib\request.py", line 160, in urlopen return opener.open(url, data, timeout) File "C:\Programs\Python33\lib\urllib\request.py", line 458, in open req = Request(fullurl, data) File "C:\Programs\Python33\lib\urllib\request.py", line 279, in __init__ self._parse() File "C:\Programs\Python33\lib\urllib\request.py", line 284, in _parse raise ValueError("unknown url type: %s" % self.full_url) ValueError: unknown url type: missing urlretrieve no longer assumes the file: scheme. (It was never documented to do so, and there is no good reason to do so.) If given explicitly with an invalid name, it gives the current equivalent of the 2.x error and message. >>> urllib.request.urlretrieve('file:missing') ... urllib.error.URLError: <urlopen error [WinError 2] The system cannot find the file specified: 'missing'> Nonetheless, this 3 arg call should be fixed 1887 except OSError as e: 1888 raise URLError(e.errno, e.strerror, e.filename) ---------- nosy: +terry.reedy title: regression: TypeError during exception handling in urllib.request.urlretrieve -> urllib.request.urlretrieve calls URLError with 3 args _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10836> _______________________________________ From report at bugs.python.org Mon Oct 15 17:38:06 2012 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 15 Oct 2012 15:38:06 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1350315486.72.0.0901018353363.issue16202@psf.upfronthosting.co.za> Nick Coghlan added the comment: It's actually the same as #946373 - it's not about adding the current directory to sys.path, it's adding the directory of a script that's in a world-writable directory (such as /tmp). The difference is that the proposed solution this time recognises that simply not adding that directory would break the world, so it aims for a more nuanced approach (plus distutils itself writing a script to /tmp and then running it is just plain wrong). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Mon Oct 15 17:43:10 2012 From: report at bugs.python.org (PSchaafsma) Date: Mon, 15 Oct 2012 15:43:10 +0000 Subject: [issue16231] pickle persistent_id return value In-Reply-To: <1350225017.39.0.976217955919.issue16231@psf.upfronthosting.co.za> Message-ID: <1350315790.23.0.376473984718.issue16231@psf.upfronthosting.co.za> PSchaafsma added the comment: There are indeed many easy workarounds, and we definitely don't want to introduce any incompatibilities. I guess the best thing to do is just update the documentation, right? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16231> _______________________________________ From report at bugs.python.org Mon Oct 15 18:04:22 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Oct 2012 16:04:22 +0000 Subject: [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <1350317062.77.0.893347368035.issue16241@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +ezio.melotti, haypo stage: -> needs patch type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16241> _______________________________________ From report at bugs.python.org Mon Oct 15 18:37:06 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 15 Oct 2012 16:37:06 +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: <1350319026.92.0.190703714994.issue15721@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Amaury, I completely agree with your objection. I've found this code in xxlimited.c and adapted to _tkinter source. If that weird code can be removed I will do it. I have no idea how we can catch/reproduce the problem, maybe Martin von Loewis can help as author of xxlimited.c code? As I know almost nobody make PEP 384 compliant modules for now and maybe there are couple of dark corners at least in the docs. See also #15650 for another question related to adaptation to pep3121. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15721> _______________________________________ From report at bugs.python.org Mon Oct 15 18:52:37 2012 From: report at bugs.python.org (moijes12) Date: Mon, 15 Oct 2012 16:52:37 +0000 Subject: [issue15442] Expand the list of default dirs filecmp.dircmp ignores In-Reply-To: <1343147532.2.0.187379599839.issue15442@psf.upfronthosting.co.za> Message-ID: <1350319957.05.0.942703857671.issue15442@psf.upfronthosting.co.za> moijes12 added the comment: Yeah. I'm on it. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15442> _______________________________________ From report at bugs.python.org Mon Oct 15 18:55:14 2012 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Oct 2012 16:55:14 +0000 Subject: [issue16229] Demo *redemo.py* lacking in Windows installation In-Reply-To: <1350208645.0.0.150897720098.issue16229@psf.upfronthosting.co.za> Message-ID: <1350320114.07.0.625848452798.issue16229@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the update. So I think the bigger issue here is there something that should be changed in the Windows installer to accommodate the demo changes in Python 3. Adding the Windows experts and deassigning from docs. ---------- assignee: docs at python -> components: +Installation, Windows -Documentation nosy: +brian.curtin, loewis, tim.golden -docs at python title: Module *redemo.py* lacking in recent Python distributions -> Demo *redemo.py* lacking in Windows installation _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16229> _______________________________________ From report at bugs.python.org Mon Oct 15 19:01:58 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Oct 2012 17:01:58 +0000 Subject: [issue10836] urllib.request.urlretrieve calls URLError with 3 args In-Reply-To: <1294252036.56.0.144119584231.issue10836@psf.upfronthosting.co.za> Message-ID: <1350320518.85.0.881185985345.issue10836@psf.upfronthosting.co.za> Ezio Melotti added the comment: While fixing this issue is easy, there is a wider problem with the use of URLError. The constructor accepts two args, reason and filename. About half of the errors in Lib/urllib/request.py use only one argument, and in the other half not a single one uses the second arg for the filename: raise URLError('file error', 'proxy support for file protocol currently not implemented') raise URLError('local file error', 'not on local host') raise URLError('ftp error', 'proxy support for ftp protocol currently not implemented') if not host: raise URLError('ftp error', 'no host given') raise URLError('ftp error', msg).with_traceback(sys.exc_info()[2]) raise URLError('data error', 'proxy support for data protocol currently not implemented') raise URLError('ftp error', reason).with_traceback( raise URLError('ftp error', reason) from reason Note that the only the first arg ends up in the error message. This should be reported in another issue though. In the attached patch I passed only the first argoment and did - raise URLError(e.errno, e.strerror, e.filename) + raise URLError('local file error') The result is Traceback (most recent call last): File "/home/wolf/dev/py/3.2/Lib/urllib/request.py", line 1769, in open_local_file stats = os.stat(localname) OSError: [Errno 2] No such file or directory: 'foo' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/wolf/dev/py/3.2/Lib/urllib/request.py", line 1771, in open_local_file raise URLError('local file error') urllib.error.URLError: <urlopen error local file error> If that's OK I'll add a couple of tests and commit. ---------- keywords: +patch Added file: http://bugs.python.org/file27583/issue10836.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10836> _______________________________________ From report at bugs.python.org Mon Oct 15 19:27:03 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 15 Oct 2012 17:27:03 +0000 Subject: [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1350322023.08.0.276065644301.issue13538@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I would just say that str(bytesobj, encoding, errors) is equivalent to bytesobj.decode(encoding, errors) (assuming it really is). Good suggestion. And yes, code is shared in the following way: http://hg.python.org/cpython/file/d3c7ebdc71bb/Objects/bytesobject.c#l2306 One thing that would need to be addressed in the str() version is if bytesobj is a PEP 3118 character buffer, after which it falls back to bytesobj.decode(encoding, errors). I will update the patch so people can see how it looks. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13538> _______________________________________ From report at bugs.python.org Mon Oct 15 19:29:56 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 15 Oct 2012 17:29:56 +0000 Subject: [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1350322196.94.0.900729147272.issue13538@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Indeed: >>> m = memoryview(b"") >>> str(m, "utf-8") '' >>> m.decode("utf-8") Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'memoryview' object has no attribute 'decode' ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13538> _______________________________________ From report at bugs.python.org Mon Oct 15 19:30:35 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 15 Oct 2012 17:30:35 +0000 Subject: [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1350322235.53.0.251936029978.issue13538@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Note: "character buffer" isn't a term we use anymore (in Python 3, that is). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13538> _______________________________________ From report at bugs.python.org Mon Oct 15 19:39:22 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Oct 2012 17:39:22 +0000 Subject: [issue10836] urllib.request.urlretrieve calls URLError with 3 args In-Reply-To: <1294252036.56.0.144119584231.issue10836@psf.upfronthosting.co.za> Message-ID: <1350322762.91.0.497927594618.issue10836@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- stage: needs patch -> patch review Added file: http://bugs.python.org/file27584/issue10836-2.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10836> _______________________________________ From report at bugs.python.org Mon Oct 15 19:44:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 17:44:30 +0000 Subject: [issue15442] Expand the list of default dirs filecmp.dircmp ignores In-Reply-To: <1343147532.2.0.187379599839.issue15442@psf.upfronthosting.co.za> Message-ID: <1350323070.56.0.137928143004.issue15442@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Should __pycache__ be ignored too? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15442> _______________________________________ From report at bugs.python.org Mon Oct 15 20:11:13 2012 From: report at bugs.python.org (Joseph Fall) Date: Mon, 15 Oct 2012 18:11:13 +0000 Subject: [issue16242] Pickle and __getattr__ Message-ID: <1350324673.62.0.567343854306.issue16242@psf.upfronthosting.co.za> New submission from Joseph Fall: This report is to re-raise an old issue from 2009: http://bugs.python.org/issue5370 Although that issue is marked as "fixed", I disagree that it was ever "fixed", and spent an evil day tracking it down. Use Case: - take two 3rd party packages: django and django-crispy-forms - django, deep in its inner-workings, uses Pickle - django-cripsy-forms implements the _getattr__ method in one of it's classes - when you put the two together such that django pickles a form, the python interpreter goes into a tailspin in very sinister and hard-to-track-down ways (different behaviour in 2.5, 2.6, 2.7, as noted in issue5370, which includes a simple test case) The "resolution" for issue5370 was to add some documentation to Pickle. But I would argue this is insufficient - the implementer of django-crispy-forms would have no reason to ever look at the Pickle docs, and so is very likely to implement this bug (which s/he did). Perhaps, if this issue cannot be resolved in code, as suggested by gagenellina back in 2009, at least some documentation could be added to __getattr__ (and others) warning that these methods could potentially be called before __init__ (similar to the documentation added to Pickle)? I'd be happy to draft a small bit of documentation for this, although if someone can think of a way to simply resolve this in Pickle so it does not cause the issue in the first place, that seems to me ideal. A test case is included with issue5370 ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 172993 nosy: docs at python, powderflask priority: normal severity: normal status: open title: Pickle and __getattr__ type: behavior versions: Python 2.6, Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16242> _______________________________________ From report at bugs.python.org Mon Oct 15 20:34:48 2012 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Oct 2012 18:34:48 +0000 Subject: [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <1350326088.68.0.82877874113.issue16197@psf.upfronthosting.co.za> Zachary Ware added the comment: It occurs to me that I should have asked; should the documentation be changed to match the code, or the code to match the documentation (with regards to the default argument to the access parameter in a few functions)? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16197> _______________________________________ From report at bugs.python.org Mon Oct 15 20:39:14 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 15 Oct 2012 18:39:14 +0000 Subject: [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <1350326354.41.0.962855598473.issue16197@psf.upfronthosting.co.za> Brian Curtin added the comment: Docs should match code. If we did it the other way around we'd probably break something. Thanks for looking into this. I've been busy the last few days but I will get to the review and application of the patch very soon. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16197> _______________________________________ From report at bugs.python.org Mon Oct 15 21:08:42 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 15 Oct 2012 19:08:42 +0000 Subject: [issue15958] bytes.join() should allow arbitrary buffer objects In-Reply-To: <1347905010.83.0.632444428638.issue15958@psf.upfronthosting.co.za> Message-ID: <1350328122.65.0.355089044323.issue15958@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is an updated patch using PySequence_Fast_GET_SIZE to avoid problems when the sequence is resized during iteration. ---------- Added file: http://bugs.python.org/file27585/bytes_join_buffers2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15958> _______________________________________ From report at bugs.python.org Mon Oct 15 21:20:03 2012 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Oct 2012 19:20:03 +0000 Subject: [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <1350328803.48.0.905283187169.issue16197@psf.upfronthosting.co.za> Zachary Ware added the comment: That's what I figured, so that's what I did in the patch; but I've also seen cases in Python where prior documentation has dictated how the code should work. Thanks for the confirmation. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16197> _______________________________________ From report at bugs.python.org Mon Oct 15 21:24:03 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 15 Oct 2012 19:24:03 +0000 Subject: [issue13897] Move fields relevant to sys.exc_info out of frame into generator/threadstate In-Reply-To: <1327767887.13.0.0676848614688.issue13897@psf.upfronthosting.co.za> Message-ID: <1350329043.07.0.632608453741.issue13897@psf.upfronthosting.co.za> Changes by Terry J. Reedy <tjreedy at udel.edu>: ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13897> _______________________________________ From report at bugs.python.org Mon Oct 15 21:24:22 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 15 Oct 2012 19:24:22 +0000 Subject: [issue13607] Move generator specific sections out of ceval. In-Reply-To: <1323993774.57.0.570625937446.issue13607@psf.upfronthosting.co.za> Message-ID: <1350329062.63.0.139762206373.issue13607@psf.upfronthosting.co.za> Changes by Terry J. Reedy <tjreedy at udel.edu>: ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13607> _______________________________________ From report at bugs.python.org Mon Oct 15 21:56:09 2012 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 15 Oct 2012 19:56:09 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1350330969.5.0.409487880625.issue16202@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: It's sort of the same as #946373, except that bug report deals with other bad consequences of sys.path[0], unrelated to security. #5753 is specifically about the C API, not about running "plain" Python. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Mon Oct 15 22:08:48 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Mon, 15 Oct 2012 20:08:48 +0000 Subject: [issue5256] rlcompleter adds builtins when custom dict is used In-Reply-To: <1234569860.16.0.0783224890959.issue5256@psf.upfronthosting.co.za> Message-ID: <1350331728.19.0.749300049423.issue5256@psf.upfronthosting.co.za> Michele Orr? added the comment: Updated. Note that removing `eval` is necessary for the new logic of the function. ---------- Added file: http://bugs.python.org/file27586/issue5256.1.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5256> _______________________________________ From report at bugs.python.org Mon Oct 15 22:24:59 2012 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 15 Oct 2012 20:24:59 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1350332699.19.0.739265778461.issue16202@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: I should point out that there is also dangerous code in Lib/test/test_subprocess.py in the test_cwd() function. There, the following is executed from /tmp: python -c 'import sys,os; sys.stdout.write(os.getcwd())' As Python luckily knows where to import sys and os from, this doesn't seem exploitable, but it should be fixed. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16202> _______________________________________ From report at bugs.python.org Mon Oct 15 22:48:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 20:48:44 +0000 Subject: [issue12486] tokenize module should have a unicode API In-Reply-To: <1309751897.67.0.332272921906.issue12486@psf.upfronthosting.co.za> Message-ID: <1350334124.33.0.546970507682.issue12486@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch to allow tokenize() accepts string is very simple, only 4 lines. But it requires a lot of documentation changes. Then we can get rid of undocumented generate_tokens(). Note, stdlib an tools use only generate_tokens(), none uses tokenize(). Of course, it will be better if tokenize() will work with iterator protocol. Here is a preliminary patch. I will be thankful for the help with the documentation and for the discussion. Of course, it will be better if tokenize() will work with iterator protocol. ---------- keywords: +patch nosy: +serhiy.storchaka versions: +Python 3.4 -Python 3.3 Added file: http://bugs.python.org/file27587/tokenize_str.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12486> _______________________________________ From report at bugs.python.org Mon Oct 15 22:55:02 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 20:55:02 +0000 Subject: [issue9771] add an optional "default" argument to tokenize.detect_encoding In-Reply-To: <1283599930.65.0.476914851505.issue9771@psf.upfronthosting.co.za> Message-ID: <1350334502.49.0.433867513436.issue9771@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I never understood the usage of the second item. IMO it should be None if no cookie found. UTF-8 is the default source encoding for Python 3. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9771> _______________________________________ From report at bugs.python.org Mon Oct 15 23:07:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2012 21:07:13 +0000 Subject: [issue12691] tokenize.untokenize is broken In-Reply-To: <1312496489.46.0.0769213514508.issue12691@psf.upfronthosting.co.za> Message-ID: <1350335233.52.0.164951054027.issue12691@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12691> _______________________________________ From report at bugs.python.org Tue Oct 16 01:19:45 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 15 Oct 2012 23:19:45 +0000 Subject: [issue16243] Regression in inspect module Message-ID: <1350343185.48.0.60485336671.issue16243@psf.upfronthosting.co.za> New submission from Alexander Belopolsky: In Python 3.3.0 and 3.2.3: >>> from inspect import * >>> def f(a,b):pass ... >>> formatargspec(getargspec(f)) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/inspect.py", line 905, in formatargspec spec = formatargandannotation(arg) File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/inspect.py", line 898, in formatargandannotation if arg in annotations: TypeError: unhashable type: 'list' No such error in 2.7.1: >>> formatargspec(getargspec(f)) '((a, b), None, None, None)' ---------- components: Library (Lib) messages: 173003 nosy: belopolsky priority: normal severity: normal status: open title: Regression in inspect module type: behavior versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16243> _______________________________________ From report at bugs.python.org Tue Oct 16 01:57:54 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Oct 2012 23:57:54 +0000 Subject: [issue16243] Regression in inspect module In-Reply-To: <1350343185.48.0.60485336671.issue16243@psf.upfronthosting.co.za> Message-ID: <1350345474.67.0.524741909476.issue16243@psf.upfronthosting.co.za> STINNER Victor added the comment: It looks like a typo in your code. You should use instead: formatargspec(*getargspec(f)) Or better: formatargspec(*getfullargspec(f)) Try with: def f(a: int, b: float): pass ---------- nosy: +haypo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16243> _______________________________________ From report at bugs.python.org Tue Oct 16 02:13:04 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2012 00:13:04 +0000 Subject: [issue16227] Add link to 3.3 version in unicode howto In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <3XgcRf6HSKzQnN@mail.python.org> Roundup Robot added the comment: New changeset c59884f4bc8d by Chris Jerdonek in branch '2.7': Issue #16227: Add to 2.x Unicode HOWTO a link to the Python 3 version. http://hg.python.org/cpython/rev/c59884f4bc8d ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16227> _______________________________________ From report at bugs.python.org Tue Oct 16 02:15:11 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 16 Oct 2012 00:15:11 +0000 Subject: [issue16227] Add link to 3.3 version in unicode howto In-Reply-To: <1350207004.2.0.875772602898.issue16227@psf.upfronthosting.co.za> Message-ID: <1350346511.59.0.762420818448.issue16227@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Committed without changing the first sentence, as ?ric preferred. Thanks for the report, Mark! ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16227> _______________________________________ From report at bugs.python.org Tue Oct 16 02:24:21 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 16 Oct 2012 00:24:21 +0000 Subject: [issue16225] add to "looping techniques" tutorial a note about modifying sequence In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350347061.56.0.996993822068.issue16225@psf.upfronthosting.co.za> Changes by Chris Jerdonek <chris.jerdonek at gmail.com>: ---------- title: list.remove in for loop -> add to "looping techniques" tutorial a note about modifying sequence type: -> enhancement versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16225> _______________________________________ From report at bugs.python.org Tue Oct 16 03:24:42 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Oct 2012 01:24:42 +0000 Subject: [issue16225] add to "looping techniques" tutorial a note about modifying sequence In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350350682.22.0.557455053444.issue16225@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > > It will be nice somewhere in deep clarify > > for experts what happens with list iterator if the list changed. Resist the urge to over-specify. Unless the behavior is tested and known to be consistent across all implementations, I'm content with the current docs: "Note There is a subtlety when the sequence is being modified by the loop...." Chris's currently patch seems reasonable to me and I don't think anything further is a good idea. With nearly any data structure in any language, most programmers learn to be cautious about and generally avoid looping over a structure while mutating it. Adding yet more documentation details won't make the issue go away. I recommend posting the current patch and closing this issue to be done with it. ---------- nosy: +rhettinger _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16225> _______________________________________ From report at bugs.python.org Tue Oct 16 03:30:20 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 16 Oct 2012 01:30:20 +0000 Subject: [issue16225] add to "looping techniques" tutorial a note about modifying sequence In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350351020.68.0.856390757609.issue16225@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks, Raymond. I will be doing that later today. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16225> _______________________________________ From report at bugs.python.org Tue Oct 16 03:44:11 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Oct 2012 01:44:11 +0000 Subject: [issue16239] PEP8 arithmetic operator examples In-Reply-To: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> Message-ID: <1350351851.76.0.858970441431.issue16239@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Shouldn't this be in the "Yes" > or an "Optionally" example block? +1 ---------- nosy: +rhettinger _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16239> _______________________________________ From report at bugs.python.org Tue Oct 16 04:30:50 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 16 Oct 2012 02:30:50 +0000 Subject: [issue16243] Regression in inspect module In-Reply-To: <1350343185.48.0.60485336671.issue16243@psf.upfronthosting.co.za> Message-ID: <1350354650.04.0.332431763409.issue16243@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: My bad, but I think documentation can be improved by adding an example. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python type: behavior -> enhancement versions: -Python 3.2, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16243> _______________________________________ From report at bugs.python.org Tue Oct 16 04:51:36 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2012 02:51:36 +0000 Subject: [issue16225] add to "looping techniques" tutorial a note about modifying sequence In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <3XggyZ6sgRzPF3@mail.python.org> Roundup Robot added the comment: New changeset 1f1bf6a3abbc by Chris Jerdonek in branch '3.2': Issue #16225: Add additional note to tutorial about changing sequence while looping. http://hg.python.org/cpython/rev/1f1bf6a3abbc New changeset 8cb14494d33c by Chris Jerdonek in branch '3.3': Issue #16225: Merge from 3.2: Add additional note to tutorial about looping. http://hg.python.org/cpython/rev/8cb14494d33c New changeset e0a407d41af5 by Chris Jerdonek in branch 'default': Issue #16225: Merge from 3.3: Add additional note to tutorial about looping. http://hg.python.org/cpython/rev/e0a407d41af5 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16225> _______________________________________ From report at bugs.python.org Tue Oct 16 05:02:25 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2012 03:02:25 +0000 Subject: [issue16225] add to "looping techniques" tutorial a note about modifying sequence In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <3XghC43gxkzR62@mail.python.org> Roundup Robot added the comment: New changeset dc006b6212e7 by Chris Jerdonek in branch '2.7': Issue #16225: Backport from 3.2: Add additional note to tutorial about looping. http://hg.python.org/cpython/rev/dc006b6212e7 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16225> _______________________________________ From report at bugs.python.org Tue Oct 16 05:04:55 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 16 Oct 2012 03:04:55 +0000 Subject: [issue16225] add to "looping techniques" tutorial a note about modifying sequence In-Reply-To: <1350199648.26.0.090631048797.issue16225@psf.upfronthosting.co.za> Message-ID: <1350356695.97.0.505671209842.issue16225@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Committed. Thanks for reporting the suggestion, Ian. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16225> _______________________________________ From report at bugs.python.org Tue Oct 16 05:40:14 2012 From: report at bugs.python.org (Trent Nelson) Date: Tue, 16 Oct 2012 03:40:14 +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: <1350358814.98.0.311313435218.issue16235@psf.upfronthosting.co.za> Changes by Trent Nelson <trent at snakebite.org>: ---------- nosy: +trent _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16235> _______________________________________ From report at bugs.python.org Tue Oct 16 06:13:36 2012 From: report at bugs.python.org (Todd Rovito) Date: Tue, 16 Oct 2012 04:13:36 +0000 Subject: [issue9583] Document startup option/environment interaction In-Reply-To: <1281653669.29.0.363654611831.issue9583@psf.upfronthosting.co.za> Message-ID: <1350360816.38.0.644122171931.issue9583@psf.upfronthosting.co.za> Todd Rovito added the comment: Applies to Python 3.4 in development and Python 2.7. I recently ran into a similar conflict where I was overriding a environment variable with a command line option and didn't realize it. I first checked the documentation and noticed that it was not clear. Then I found this bug report and made a patch which is attached. The patch iterates what Terry Reedy suggested which I thought made the documentation clearer. This is my first patch to Python I hope it is helpful as Python has served me well over the years. ---------- keywords: +patch nosy: +Todd.Rovito versions: +Python 3.4 -Python 3.1, Python 3.2 Added file: http://bugs.python.org/file27588/EnvironmentVariables.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9583> _______________________________________ From report at bugs.python.org Tue Oct 16 07:00:12 2012 From: report at bugs.python.org (Todd Rovito) Date: Tue, 16 Oct 2012 05:00:12 +0000 Subject: [issue1283110] Give __len__() advice for "don't know" Message-ID: <1350363612.41.0.313154561382.issue1283110@psf.upfronthosting.co.za> Todd Rovito added the comment: For Python 3.4 attached is a patch as suggested by Raymond Hettinger. My suggestion is to put the patch in Doc/reference/datamodel.rst because if a user searches google.com for __len__ this is the first link in the list. I think this extra information is a valuable addition to the documentation. ---------- keywords: +patch nosy: +Todd.Rovito versions: +Python 3.4 Added file: http://bugs.python.org/file27589/DataModel__len__.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1283110> _______________________________________ From report at bugs.python.org Tue Oct 16 07:05:37 2012 From: report at bugs.python.org (Richard Jones) Date: Tue, 16 Oct 2012 05:05:37 +0000 Subject: [issue16244] TimedRotatingFileHandler forces "write" mode, should use "append" Message-ID: <1350363937.05.0.667982982296.issue16244@psf.upfronthosting.co.za> New submission from Richard Jones: The RotatingFileHandler classes force the open() mode of the new log file to be "w" even though it is initially defaulted to "a" in doRollover() methods: self.mode = 'w' self.stream = self._open() This can cause problems in systems that have multiple programs writing to the log file; they can both end up opening the new file in "w" mode and then there's loss of data. I cannot think of a reason why "w" should be forced in this manner. The fix is to remove the "self.mode = 'w'" line from the two doRollover() methods. ---------- components: Library (Lib) messages: 173016 nosy: richard priority: normal severity: normal status: open title: TimedRotatingFileHandler forces "write" mode, should use "append" type: behavior _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16244> _______________________________________ From report at bugs.python.org Tue Oct 16 07:17:23 2012 From: report at bugs.python.org (Todd Rovito) Date: Tue, 16 Oct 2012 05:17:23 +0000 Subject: [issue9583] Document startup option/environment interaction In-Reply-To: <1281653669.29.0.363654611831.issue9583@psf.upfronthosting.co.za> Message-ID: <1350364643.06.0.286432007627.issue9583@psf.upfronthosting.co.za> Todd Rovito added the comment: After another review I decided to submit a newer patch that uses a comma so I think the documentation flows better. ---------- type: -> enhancement Added file: http://bugs.python.org/file27590/EnvironmentVariables.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9583> _______________________________________ From report at bugs.python.org Tue Oct 16 08:15:52 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Tue, 16 Oct 2012 06:15:52 +0000 Subject: [issue16244] TimedRotatingFileHandler forces "write" mode, should use "append" In-Reply-To: <1350363937.05.0.667982982296.issue16244@psf.upfronthosting.co.za> Message-ID: <1350368152.95.0.780840019651.issue16244@psf.upfronthosting.co.za> Changes by Hynek Schlawack <hs at ox.cx>: ---------- nosy: +hynek _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16244> _______________________________________ From report at bugs.python.org Tue Oct 16 08:57:53 2012 From: report at bugs.python.org (Ned Deily) Date: Tue, 16 Oct 2012 06:57:53 +0000 Subject: [issue16244] TimedRotatingFileHandler forces "write" mode, should use "append" In-Reply-To: <1350363937.05.0.667982982296.issue16244@psf.upfronthosting.co.za> Message-ID: <1350370673.19.0.558776415181.issue16244@psf.upfronthosting.co.za> Changes by Ned Deily <nad at acm.org>: ---------- nosy: +vinay.sajip _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16244> _______________________________________ From report at bugs.python.org Tue Oct 16 09:11:07 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 16 Oct 2012 07:11:07 +0000 Subject: [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1350371467.23.0.174864849643.issue13538@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching updated patch based on Ezio and Antoine's comments. Let me know if I'm not using the correct or preferred terminology around buffer objects and the buffer protocol. It doesn't seem like the section on the buffer protocol actually says what objects implementing the buffer protocol should be called. I gather indirectly from the docs that such objects are called "buffer objects" (as opposed to just "buffers"): http://docs.python.org/dev/c-api/buffer.html#bufferobjects ---------- stage: needs patch -> patch review Added file: http://bugs.python.org/file27591/issue-13538-2-default.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13538> _______________________________________ From report at bugs.python.org Tue Oct 16 09:22:42 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 16 Oct 2012 07:22:42 +0000 Subject: [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1350372162.06.0.531310448751.issue13538@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Reattaching patch (a line was missing). ---------- Added file: http://bugs.python.org/file27592/issue-13538-3-default.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13538> _______________________________________ From report at bugs.python.org Tue Oct 16 10:38:57 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Oct 2012 08:38:57 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1350376737.11.0.671527718342.issue15988@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- dependencies: +Possible integer overflow of PyLong_AsLong() results _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15988> _______________________________________ From report at bugs.python.org Tue Oct 16 11:33:48 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2012 09:33:48 +0000 Subject: [issue16244] TimedRotatingFileHandler forces "write" mode, should use "append" In-Reply-To: <1350363937.05.0.667982982296.issue16244@psf.upfronthosting.co.za> Message-ID: <3Xgrtg4XmszQvL@mail.python.org> Roundup Robot added the comment: New changeset 6fcfe701502b by Vinay Sajip in branch '2.7': Issue #16244: Remove file mode overrides. http://hg.python.org/cpython/rev/6fcfe701502b New changeset 5e770555be62 by Vinay Sajip in branch '3.2': Issue #16244: Remove file mode overrides. http://hg.python.org/cpython/rev/5e770555be62 New changeset 4f1287be26a6 by Vinay Sajip in branch '3.3': Issue #16244: Merged change from 3.2. http://hg.python.org/cpython/rev/4f1287be26a6 New changeset c20b0b5590db by Vinay Sajip in branch 'default': Closes #16244: Merged change from 3.3. http://hg.python.org/cpython/rev/c20b0b5590db ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16244> _______________________________________ From report at bugs.python.org Tue Oct 16 11:41:51 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 16 Oct 2012 09:41:51 +0000 Subject: [issue16245] Update html.entities.html5 dictionary and parseentities.py Message-ID: <1350380511.49.0.860998010837.issue16245@psf.upfronthosting.co.za> New submission from Ezio Melotti: A JSON file containing all the HTML5 entities is now available at http://dev.w3.org/html5/spec/entities.json. I tested from the interpreter to see if it matches the values in html.entities.html5 and there are a dozen of entities that need to be updated: >>> s = json.load(open('entities.json')) >>> from html.entities import html5 >>> for (k1,i1),(k2,i2) in zip(sorted(s.items()), sorted(html5.items())): ... if i1['characters'] != i2: (k1, k2, i1['characters'], i2, i1['codepoints'], list(map(ord, i2))) ... ('⃜', 'DotDot;', '?', '??', [8412], [9676, 8412]) ('̑', 'DownBreve;', '?', '??', [785], [9676, 785]) ('⟨', 'LeftAngleBracket;', '?', '?', [10216], [9001]) (' ', 'NewLine;', '\n', '?', [10], [9226]) ('⟩', 'RightAngleBracket;', '?', '?', [10217], [9002]) (' ', 'Tab;', '\t', '?', [9], [9225]) ('⃛', 'TripleDot;', '?', '??', [8411], [9676, 8411]) ('⟨', 'lang;', '?', '?', [10216], [9001]) ('⟨', 'langle;', '?', '?', [10216], [9001]) ('⟩', 'rang;', '?', '?', [10217], [9002]) ('⟩', 'rangle;', '?', '?', [10217], [9002]) ('⃛', 'tdot;', '?', '??', [8411], [9676, 8411]) The Tools/scripts/parseentities.py script should also be updated (or possibly a new, separate script should be added), so it can be used to generate the html5 dict. I'm setting this as release blocker so that the update gets done before the release (other values might change in the meanwhile). ---------- assignee: ezio.melotti messages: 173021 nosy: ezio.melotti priority: release blocker severity: normal stage: needs patch status: open title: Update html.entities.html5 dictionary and parseentities.py type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16245> _______________________________________ From report at bugs.python.org Tue Oct 16 11:54:23 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Oct 2012 09:54:23 +0000 Subject: [issue16103] sys.stdin.readline 'unsupported' (IDLE 2.7.3, Win7, pythonw) In-Reply-To: <1349121673.49.0.0542189425732.issue16103@psf.upfronthosting.co.za> Message-ID: <1350381263.29.0.0206915121964.issue16103@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Yes, the first part of my post was about how it worked in regular interactive window: prints text, then prompt, then blinking underline cursor. Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win32 -- Win7 Professional, with all MS patches. Are you running the apr 10 release or something compiled later, with the readline stub replaced? Problem manifests in raw_input(): get same behavior of print prompt then crash when should display input cursor. >>> raw_input('xyz') # IDLE still xyz Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> raw_input('xyz') UnsupportedOperation: readline Problem really is sys.stdin.readline(), which is the dummy stub I quoted in first message. >>> sys.stdin.readline() Traceback (most recent call last): File "<pyshell#11>", line 1, in <module> sys.stdin.readline() UnsupportedOperation: readline ---------- title: Help() fails at raw_input readline (IDLE 2.7.3, Win7, pythonw) -> sys.stdin.readline 'unsupported' (IDLE 2.7.3, Win7, pythonw) _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16103> _______________________________________ From report at bugs.python.org Tue Oct 16 11:57:06 2012 From: report at bugs.python.org (Kushal Das) Date: Tue, 16 Oct 2012 09:57:06 +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: <1350381426.9.0.699569113314.issue16245@psf.upfronthosting.co.za> Changes by Kushal Das <kushaldas at gmail.com>: ---------- nosy: +kushaldas _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16245> _______________________________________ From report at bugs.python.org Tue Oct 16 11:58:25 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 16 Oct 2012 09:58:25 +0000 Subject: [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1350381505.77.0.900699605011.issue13538@psf.upfronthosting.co.za> Ezio Melotti added the comment: + str(bytes, encoding[, errors='strict']) + str(bytes, errors[, encoding='utf-8']) Why not simply str(bytes, encoding='utf-8', errors='strict')? (Your signature suggests that str(b'abc', 'strict') should work.) + the string itself. This behavior differs from :func:`repr` in that the I'm not sure this is the right place where to explain the differences between __str__ and __repr__ (or maybe it is?). Also doesn't str() falls back on __repr__ if __str__ is missing? Does :meth:`__str__` link to object.__str__? + If *encoding* or *errors* is given, and/or + (or :class:`bytearray`) object, then :func:`str` calls I would use 'is equivalent to', rather than 'calls'. + :meth:`bytes.decode(encoding, errors) <bytes.decode>` on the object + and returns the value. Otherwise, the bytes object underlying the buffer + object is obtained before calling :meth:`bytes.decode() <bytes.decode>`. :meth:`bytes.decode` should be enough. + Passing a :func:`bytes <bytes>` :func:`bytes` should be enough (if it isn't, maybe you want :func:`.bytes`). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13538> _______________________________________ From report at bugs.python.org Tue Oct 16 12:15:49 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2012 10:15:49 +0000 Subject: [issue15936] Add link from os.urandom to random.SystemRandom In-Reply-To: <1347487742.57.0.57747338883.issue15936@psf.upfronthosting.co.za> Message-ID: <3Xgsq92GwCzR5Y@mail.python.org> Roundup Robot added the comment: New changeset 0a0b890508d3 by Andrew Svetlov in branch '3.3': Issue #15936: Add link from os.urandom to random.SystemRandom http://hg.python.org/cpython/rev/0a0b890508d3 New changeset 34c2bb737364 by Andrew Svetlov in branch 'default': Merge issue #15936: Add link from os.urandom to random.SystemRandom http://hg.python.org/cpython/rev/34c2bb737364 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15936> _______________________________________ From report at bugs.python.org Tue Oct 16 12:23:24 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2012 10:23:24 +0000 Subject: [issue15936] Add link from os.urandom to random.SystemRandom In-Reply-To: <1347487742.57.0.57747338883.issue15936@psf.upfronthosting.co.za> Message-ID: <3Xgszw2s0lzR5c@mail.python.org> Roundup Robot added the comment: New changeset 2bff4969b65b by Andrew Svetlov in branch '2.7': Issue #15936: Add link from os.urandom to random.SystemRandom http://hg.python.org/cpython/rev/2bff4969b65b ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15936> _______________________________________ From report at bugs.python.org Tue Oct 16 12:23:57 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 16 Oct 2012 10:23:57 +0000 Subject: [issue15936] Add link from os.urandom to random.SystemRandom In-Reply-To: <1347487742.57.0.57747338883.issue15936@psf.upfronthosting.co.za> Message-ID: <1350383037.11.0.855970056682.issue15936@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks. ---------- nosy: +asvetlov resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15936> _______________________________________ From report at bugs.python.org Tue Oct 16 12:53:04 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2012 10:53:04 +0000 Subject: [issue15936] Add link from os.urandom to random.SystemRandom In-Reply-To: <1347487742.57.0.57747338883.issue15936@psf.upfronthosting.co.za> Message-ID: <3Xgtf81Fp9zR45@mail.python.org> Roundup Robot added the comment: New changeset c1f27cf0cc9d by Andrew Svetlov in branch '2.7': Issue #15936: Reformat text for os.random to follow Larry Hastings suggestion http://hg.python.org/cpython/rev/c1f27cf0cc9d New changeset da8155ccf70b by Andrew Svetlov in branch '3.3': Issue #15936: Reformat text for os.random to follow Larry Hastings suggestion http://hg.python.org/cpython/rev/da8155ccf70b New changeset bd3647e9ac62 by Andrew Svetlov in branch 'default': Merge issue #15936: Reformat text for os.random to follow Larry Hastings suggestion http://hg.python.org/cpython/rev/bd3647e9ac62 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15936> _______________________________________ From report at bugs.python.org Tue Oct 16 12:59:36 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 16 Oct 2012 10:59:36 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1350385176.07.0.576983269348.issue15988@psf.upfronthosting.co.za> Changes by Mark Dickinson <dickinsm at gmail.com>: ---------- nosy: +mark.dickinson _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15988> _______________________________________ From report at bugs.python.org Tue Oct 16 13:26:37 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Oct 2012 11:26:37 +0000 Subject: [issue16103] sys.stdin.readline 'unsupported' (IDLE 2.7.3, Win7, pythonw) In-Reply-To: <1349121673.49.0.0542189425732.issue16103@psf.upfronthosting.co.za> Message-ID: <1350386797.94.0.126663887224.issue16103@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Check patch for issue9290. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16103> _______________________________________ From report at bugs.python.org Tue Oct 16 13:28:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Oct 2012 11:28:22 +0000 Subject: [issue16103] sys.stdin.readline 'unsupported' (IDLE 2.7.3, Win7, pythonw) In-Reply-To: <1349121673.49.0.0542189425732.issue16103@psf.upfronthosting.co.za> Message-ID: <1350386902.56.0.075103633895.issue16103@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What type of sys.stdin? Try run in "no subprocess" mode (-n). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16103> _______________________________________ From report at bugs.python.org Tue Oct 16 13:49:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2012 11:49:14 +0000 Subject: [issue15833] most failures to write byte-compiled file no longer suppressed In-Reply-To: <1346432246.49.0.876284426658.issue15833@psf.upfronthosting.co.za> Message-ID: <3Xgvtx5j6LzR7B@mail.python.org> Roundup Robot added the comment: New changeset 53ce30b62de2 by Trent Nelson in branch '3.3': Issue #15833: don't raise an exception if importlib can't write byte-compiled http://hg.python.org/cpython/rev/53ce30b62de2 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15833> _______________________________________ From report at bugs.python.org Tue Oct 16 13:51:41 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 16 Oct 2012 11:51:41 +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: <1350388301.94.0.829554434668.issue16245@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- keywords: +patch Added file: http://bugs.python.org/file27593/issue16245.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16245> _______________________________________ From report at bugs.python.org Tue Oct 16 14:00:57 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Oct 2012 12:00:57 +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: <1350388857.11.0.70216890614.issue16245@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16245> _______________________________________ From report at bugs.python.org Tue Oct 16 14:03:57 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2012 12:03:57 +0000 Subject: [issue15833] most failures to write byte-compiled file no longer suppressed In-Reply-To: <1346432246.49.0.876284426658.issue15833@psf.upfronthosting.co.za> Message-ID: <3XgwCw72B2zR8K@mail.python.org> Roundup Robot added the comment: New changeset 36b2ca7dc893 by Trent Nelson in branch 'default': Merge issue #15833: don't raise an exception if importlib can't write http://hg.python.org/cpython/rev/36b2ca7dc893 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15833> _______________________________________ From report at bugs.python.org Tue Oct 16 14:05:06 2012 From: report at bugs.python.org (Trent Nelson) Date: Tue, 16 Oct 2012 12:05:06 +0000 Subject: [issue15833] most failures to write byte-compiled file no longer suppressed In-Reply-To: <1346432246.49.0.876284426658.issue15833@psf.upfronthosting.co.za> Message-ID: <1350389106.66.0.974770053847.issue15833@psf.upfronthosting.co.za> Trent Nelson added the comment: Charles' patch applied in 3.3 and merged to 3.x. Thanks Charles. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15833> _______________________________________ From report at bugs.python.org Tue Oct 16 14:16:57 2012 From: report at bugs.python.org (Ethan Furman) Date: Tue, 16 Oct 2012 12:16:57 +0000 Subject: [issue16246] Multiprocessing infinite loop on Windows Message-ID: <1350389817.55.0.995425148307.issue16246@psf.upfronthosting.co.za> New submission from Ethan Furman: On Windows multiprocessing has a well known limitation: because there is no fork() new shells must be invoked, and if the call that ultimately starts multiprocessing is not guarded by an `if __name__ == '__main___'` check an infinite loops results and you have a very nice brick instead of a computer. On Stackoverflow I proposed a work-around [1], which is basically to check if an environment variable exists (MP_GUARD is this case), and if it does raise an exception. I'm going to try and merge that into multiprocessing itself. Are there any other platforms besides Windows where this is a problem? [1] http://stackoverflow.com/q/12852643/208880 ---------- components: Windows messages: 173033 nosy: amaury.forgeotdarc, jnoller, stoneleaf priority: normal severity: normal status: open title: Multiprocessing infinite loop on Windows versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16246> _______________________________________ From report at bugs.python.org Tue Oct 16 14:17:46 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2012 12:17:46 +0000 Subject: [issue15298] _sysconfigdata is generated in srcdir, not builddir In-Reply-To: <1341782776.55.0.708234468774.issue15298@psf.upfronthosting.co.za> Message-ID: <3XgwWs3yVFzPBH@mail.python.org> Roundup Robot added the comment: New changeset 24d52d3060e8 by Trent Nelson in branch '3.3': Issue #15298: ensure _sysconfigdata is generated in build directory, http://hg.python.org/cpython/rev/24d52d3060e8 New changeset f85c3f4d9b98 by Trent Nelson in branch 'default': Merge issue #15298: ensure _sysconfigdata is generated in build directory, http://hg.python.org/cpython/rev/f85c3f4d9b98 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15298> _______________________________________ From report at bugs.python.org Tue Oct 16 14:31:20 2012 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 16 Oct 2012 12:31:20 +0000 Subject: [issue16247] Report failing url in URLError? Message-ID: <1350390680.77.0.132205585956.issue16247@psf.upfronthosting.co.za> New submission from Nick Coghlan: Trying to streamline the URL retrieval example in the concurrent.futures docs were severely hampered by the fact the URLError thrown by urlopen doesn't tell you *what URL* it was trying to retrieve when it failed. This is OK in synchronous code (where you probably still have the URL around), but quite a pain in asynchronous code (such as that using concurrent.futures) where the original context may have been lost by the time the future is signalled. ---------- messages: 173035 nosy: ncoghlan priority: normal severity: normal status: open title: Report failing url in URLError? _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16247> _______________________________________ From report at bugs.python.org Tue Oct 16 14:33:19 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 16 Oct 2012 12:33:19 +0000 Subject: [issue16247] Report failing url in URLError? In-Reply-To: <1350390680.77.0.132205585956.issue16247@psf.upfronthosting.co.za> Message-ID: <1350390799.44.0.451935032341.issue16247@psf.upfronthosting.co.za> Ezio Melotti added the comment: See also #10836 and msg172988. ---------- components: +Library (Lib) nosy: +ezio.melotti stage: -> needs patch type: -> behavior versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16247> _______________________________________ From report at bugs.python.org Tue Oct 16 14:44:51 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 16 Oct 2012 12:44:51 +0000 Subject: [issue16151] Deferred KeyboardInterrupt in interactive mode In-Reply-To: <1349551962.43.0.949416732292.issue16151@psf.upfronthosting.co.za> Message-ID: <1350391491.71.0.957775755695.issue16151@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: My Python interpreter does not have auto-completion. Do you import something special at startup? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16151> _______________________________________ From report at bugs.python.org Tue Oct 16 14:57:24 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2012 12:57:24 +0000 Subject: [issue15819] Unable to build Python out-of-tree when source tree is readonly. In-Reply-To: <1346309362.14.0.312540957077.issue15819@psf.upfronthosting.co.za> Message-ID: <3XgxPc0SXMzR8g@mail.python.org> Roundup Robot added the comment: New changeset 617591e7d708 by Trent Nelson in branch '3.2': Issue #15819: additional fixes for out-of-tree builds from read-only src. http://hg.python.org/cpython/rev/617591e7d708 New changeset abb00e23681a by Trent Nelson in branch '3.3': Merge issue #15819: additional fixes for out-of-tree builds from read-only src. http://hg.python.org/cpython/rev/abb00e23681a New changeset 3420fbd87646 by Trent Nelson in branch 'default': Merge issue #15819: additional fixes for out-of-tree builds from read-only src. http://hg.python.org/cpython/rev/3420fbd87646 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15819> _______________________________________ From report at bugs.python.org Tue Oct 16 15:02:26 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Oct 2012 13:02:26 +0000 Subject: [issue16246] Multiprocessing infinite loop on Windows In-Reply-To: <1350389817.55.0.995425148307.issue16246@psf.upfronthosting.co.za> Message-ID: <1350392546.35.0.806700856432.issue16246@psf.upfronthosting.co.za> Changes by R. David Murray <rdmurray at bitdance.com>: ---------- nosy: +sbt type: -> behavior versions: +Python 3.4 -Python 3.1 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16246> _______________________________________ From report at bugs.python.org Tue Oct 16 15:06:57 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Oct 2012 13:06:57 +0000 Subject: [issue16151] Deferred KeyboardInterrupt in interactive mode In-Reply-To: <1349551962.43.0.949416732292.issue16151@psf.upfronthosting.co.za> Message-ID: <1350392817.32.0.95202998507.issue16151@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Nothing. I think it depends if Python was build with readline support. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16151> _______________________________________ From report at bugs.python.org Tue Oct 16 15:07:01 2012 From: report at bugs.python.org (Tim Golden) Date: Tue, 16 Oct 2012 13:07:01 +0000 Subject: [issue16246] Multiprocessing infinite loop on Windows In-Reply-To: <1350392546.35.0.806700856432.issue16246@psf.upfronthosting.co.za> Message-ID: <507D5BF2.4040206@timgolden.me.uk> Tim Golden added the comment: The natural way to do this in windows is using the Job API: http://msdn.microsoft.com/en-us/library/windows/desktop/ms684161%28v=vs.85%29.aspx However I'm not sure where to apply this within the multiprocessing architecture (or if it's even a good idea). ---------- nosy: +tim.golden _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16246> _______________________________________ From report at bugs.python.org Tue Oct 16 15:43:20 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2012 13:43:20 +0000 Subject: [issue15819] Unable to build Python out-of-tree when source tree is readonly. In-Reply-To: <1346309362.14.0.312540957077.issue15819@psf.upfronthosting.co.za> Message-ID: <3XgyQb2m2CzR9W@mail.python.org> Roundup Robot added the comment: New changeset e0a2b14a3cf9 by Trent Nelson in branch '2.7': Issue #15819: additional fixes for out-of-tree builds from read-only src. http://hg.python.org/cpython/rev/e0a2b14a3cf9 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15819> _______________________________________ From report at bugs.python.org Tue Oct 16 15:52:14 2012 From: report at bugs.python.org (Trent Nelson) Date: Tue, 16 Oct 2012 13:52:14 +0000 Subject: [issue15819] Unable to build Python out-of-tree when source tree is readonly. In-Reply-To: <1346309362.14.0.312540957077.issue15819@psf.upfronthosting.co.za> Message-ID: <1350395534.73.0.966095055881.issue15819@psf.upfronthosting.co.za> Trent Nelson added the comment: Things should be looking a lot better now across the board. I just committed fixes where appropriate to 2.7, 3.2, 3.3 and 3.x for this issue and two related issues: http://bugs.python.org/issue15298 http://bugs.python.org/issue15833 The only thing that stands out now for 3.[23x] is $(srcdir)/Lib/$(PLATDIR). Do we need a patch along the following lines? % hg diff diff -r 617591e7d708 Makefile.pre.in --- a/Makefile.pre.in Tue Oct 16 08:41:32 2012 -0400 +++ b/Makefile.pre.in Tue Oct 16 09:46:53 2012 -0400 @@ -947,7 +947,7 @@ multiprocessing multiprocessing/dummy \ unittest unittest/test \ curses pydoc_data $(MACHDEPS) -libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c +libinstall: build_all Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ if test ! -d $(DESTDIR)$$i; then \ @@ -1031,14 +1031,14 @@ ./$(BUILDPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt # Create the PLATDIR source directory, if one wasn't distributed.. -$(srcdir)/Lib/$(PLATDIR): - mkdir $(srcdir)/Lib/$(PLATDIR) - cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen +Lib/$(PLATDIR): + mkdir Lib/$(PLATDIR) + cp $(srcdir)/Lib/plat-generic/regen Lib/$(PLATDIR)/regen export PATH; PATH="`pwd`:$$PATH"; \ export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \ export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \ export EXE; EXE="$(BUILDEXE)"; \ - cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen + cd Lib/$(PLATDIR); $(RUNSHARED) ./regen python-config: $(srcdir)/Misc/python-config.in # Substitution happens here, as the completely-expanded BINDIR ---------- nosy: +pitrou _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15819> _______________________________________ From report at bugs.python.org Tue Oct 16 16:11:04 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 16 Oct 2012 14:11:04 +0000 Subject: [issue16246] Multiprocessing infinite loop on Windows In-Reply-To: <1350389817.55.0.995425148307.issue16246@psf.upfronthosting.co.za> Message-ID: <1350396664.91.0.557274817237.issue16246@psf.upfronthosting.co.za> Richard Oudkerk added the comment: I think this is a duplicate of Issue #15646 which has been fixed in the 2.7 and 3.x branches. If you run Lib/test/mp_fork_bomb.py you should get a RuntimeError with a helpful message telling you to use the 'if __name__ == "__main__"' idiom. ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> pending superseder: -> multiprocessing can do equivalent of a fork bomb on Windows _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16246> _______________________________________ From report at bugs.python.org Tue Oct 16 16:46:01 2012 From: report at bugs.python.org (Roger Serwy) Date: Tue, 16 Oct 2012 14:46:01 +0000 Subject: [issue16103] sys.stdin.readline 'unsupported' (IDLE 2.7.3, Win7, pythonw) In-Reply-To: <1349121673.49.0.0542189425732.issue16103@psf.upfronthosting.co.za> Message-ID: <1350398761.63.0.719162020314.issue16103@psf.upfronthosting.co.za> Roger Serwy added the comment: I am running 2.7.3 from Apr 10, 2012, freshly installed. I still can not reproduce this problem when running IDLE with or without a subprocess. Is your PyShell.py file the original or was it modified by accident? It may be possible that run.py was modified as well and is failing to register stdin correctly. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16103> _______________________________________ From report at bugs.python.org Tue Oct 16 16:51:26 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 16 Oct 2012 14:51:26 +0000 Subject: [issue15833] most failures to write byte-compiled file no longer suppressed In-Reply-To: <1350389106.66.0.974770053847.issue15833@psf.upfronthosting.co.za> Message-ID: <CAH_1eM2+eNXVCpvLFB1JL5K-w_5vpp51+byW7424q_s_A3be_g@mail.gmail.com> Charles-Fran?ois Natali added the comment: > Charles' patch applied in 3.3 and merged to 3.x. Thanks Charles. Thanks for taking care of this! ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15833> _______________________________________ From report at bugs.python.org Tue Oct 16 17:11:25 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2012 15:11:25 +0000 Subject: [issue15819] Unable to build Python out-of-tree when source tree is readonly. In-Reply-To: <1346309362.14.0.312540957077.issue15819@psf.upfronthosting.co.za> Message-ID: <3Xh0ND6GwBzR8Y@mail.python.org> Roundup Robot added the comment: New changeset c35db4960d1c by Trent Nelson in branch '2.7': Issue #15819: tweak logic in previous commit (e0a2b14a3cf9). http://hg.python.org/cpython/rev/c35db4960d1c New changeset 5707c8a36cc0 by Trent Nelson in branch '3.2': Issue #15819: tweak logic in previous commit (617591e7d708). http://hg.python.org/cpython/rev/5707c8a36cc0 New changeset 85863c4a93db by Trent Nelson in branch '3.3': Merge issue #15819: tweak logic in previous commit. http://hg.python.org/cpython/rev/85863c4a93db New changeset d282018bff10 by Trent Nelson in branch 'default': Merge issue #15819: tweak logic in previous commit. http://hg.python.org/cpython/rev/d282018bff10 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15819> _______________________________________ From report at bugs.python.org Tue Oct 16 17:29:21 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Tue, 16 Oct 2012 15:29:21 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted code execution. Message-ID: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> New submission from Ramchandra Apte: Because tkinter.py uses exec to execute code from a file, it has a security bug. It searches for the file in the home dir. Apparently, on my system (don't know if its the same on others), the $HOME variable is the same as the non-root one when running Python with root priveleges Steps to reproduce: create a file called .Tk.py in your home folder Whatever code is in that file will be executed. run these three lines of code in Python: import tkinter w = tkinter.Tk() w.mainloop() I will add more details in later comments. ---------- components: Tkinter messages: 173047 nosy: ramchandra.apte priority: normal severity: normal status: open title: Security bug in tkinter allows for untrusted code execution. _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16248> _______________________________________ From report at bugs.python.org Tue Oct 16 17:29:27 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Tue, 16 Oct 2012 15:29:27 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <1350401367.93.0.870189324124.issue16248@psf.upfronthosting.co.za> Changes by Ramchandra Apte <maniandram01 at gmail.com>: ---------- type: -> security _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16248> _______________________________________ From report at bugs.python.org Tue Oct 16 17:31:35 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Tue, 16 Oct 2012 15:31:35 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <1350401495.98.0.07932817614.issue16248@psf.upfronthosting.co.za> Ramchandra Apte added the comment: s/tkinter.py/tkinter.__init__ ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16248> _______________________________________ From report at bugs.python.org Tue Oct 16 17:32:35 2012 From: report at bugs.python.org (julien tayon) Date: Tue, 16 Oct 2012 15:32:35 +0000 Subject: [issue16249] unicode name accepts a punctuation glyph Message-ID: <1350401555.49.0.382314434888.issue16249@psf.upfronthosting.co.za> New submission from julien tayon: I guess unicode variable names are restricted to letters, and that symbols and punctuation shoud be ignored (except _). I have tested other dots (punctuation) they dont work. Only http://www.fileformat.info/info/unicode/char/00b7/index.htm oddly enough has worked so far. $ python3.2 Python 3.2.3 (default, Sep 10 2012, 18:14:40) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> foo?bar=42 File "<stdin>", line 1 foo?bar=42 ^ SyntaxError: invalid character in identifier >>> print(ord("foo?bar"[3])) 8901 >>> foo?bar = 42 >>> print(ord("foo?bar"[3])) 183 I have sampled randomly in the same block as MIDDLE DOT and it seems to behave correctly. ---------- components: Interpreter Core messages: 173049 nosy: julien.tayon priority: normal severity: normal status: open title: unicode name accepts a punctuation glyph type: behavior versions: Python 3.2 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16249> _______________________________________ From report at bugs.python.org Tue Oct 16 17:32:48 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Tue, 16 Oct 2012 15:32:48 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <1350401568.21.0.229188344313.issue16248@psf.upfronthosting.co.za> Ramchandra Apte added the comment: In Lib/tkinter/__init__.py:1801 , the readprofile function executes untrusted code. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16248> _______________________________________ From report at bugs.python.org Tue Oct 16 17:34:06 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Tue, 16 Oct 2012 15:34:06 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <1350401646.23.0.912539377792.issue16248@psf.upfronthosting.co.za> Ramchandra Apte added the comment: specifically, when running Python using sudo (not in a root shell), the $HOME variable is preserved. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16248> _______________________________________ From report at bugs.python.org Tue Oct 16 17:41:18 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Oct 2012 15:41:18 +0000 Subject: [issue16249] unicode name accepts a punctuation glyph In-Reply-To: <1350401555.49.0.382314434888.issue16249@psf.upfronthosting.co.za> Message-ID: <1350402078.83.0.19959096418.issue16249@psf.upfronthosting.co.za> R. David Murray added the comment: The rules for python identifiers are documented here: http://docs.python.org/dev/reference/lexical_analysis.html#identifiers Are you saying that the behavior does not match the documentation? ---------- nosy: +r.david.murray _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16249> _______________________________________ From report at bugs.python.org Tue Oct 16 17:50:49 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 16 Oct 2012 15:50:49 +0000 Subject: [issue10836] urllib.request.urlretrieve calls URLError with 3 args In-Reply-To: <1294252036.56.0.144119584231.issue10836@psf.upfronthosting.co.za> Message-ID: <1350402649.67.0.932428330588.issue10836@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > This should be reported in another issue though. Has this been done? ---------- nosy: +chris.jerdonek _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10836> _______________________________________ From report at bugs.python.org Tue Oct 16 17:54:46 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 16 Oct 2012 15:54:46 +0000 Subject: [issue10836] urllib.request.urlretrieve calls URLError with 3 args In-Reply-To: <1294252036.56.0.144119584231.issue10836@psf.upfronthosting.co.za> Message-ID: <1350402886.83.0.588091109174.issue10836@psf.upfronthosting.co.za> Ezio Melotti added the comment: Nick reported #16247 today which is very similar. ---------- nosy: +ncoghlan _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10836> _______________________________________ From report at bugs.python.org Tue Oct 16 17:56:51 2012 From: report at bugs.python.org (julien tayon) Date: Tue, 16 Oct 2012 15:56:51 +0000 Subject: [issue16249] unicode name accepts a punctuation glyph In-Reply-To: <1350401555.49.0.382314434888.issue16249@psf.upfronthosting.co.za> Message-ID: <1350403011.13.0.108731287066.issue16249@psf.upfronthosting.co.za> julien tayon added the comment: http://www.fileformat.info/info/unicode/char/b7/index.htm the unicode category is Po (Ponctuation). Empirically, it cannot start a variable name so according to the rules given in the lexical analyser it should be one of : Mn, Mc, Nd, Pc Which is not the case Po not in [ Mn, Mc, Nd, Pc ]. Modulo my weak brain, it does not seem right. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16249> _______________________________________ From report at bugs.python.org Tue Oct 16 18:02:24 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 16 Oct 2012 16:02:24 +0000 Subject: [issue16249] unicode name accepts a punctuation glyph In-Reply-To: <1350401555.49.0.382314434888.issue16249@psf.upfronthosting.co.za> Message-ID: <1350403344.52.0.74313684026.issue16249@psf.upfronthosting.co.za> Ezio Melotti added the comment: The characters with the Other_ID_Continue property are also included, i.e.: 00B7 ; Other_ID_Continue # Po MIDDLE DOT 0387 ; Other_ID_Continue # Po GREEK ANO TELEIA 1369..1371 ; Other_ID_Continue # No [9] ETHIOPIC DIGIT ONE..ETHIOPIC DIGIT NINE 19DA ; Other_ID_Continue # No NEW TAI LUE THAM DIGIT ONE See http://unicode.org/Public/UNIDATA/PropList.txt ---------- assignee: -> ezio.melotti nosy: +ezio.melotti resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16249> _______________________________________ From report at bugs.python.org Tue Oct 16 18:05:39 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Oct 2012 16:05:39 +0000 Subject: [issue7512] shutil.copystat may fail EOPNOTSUPP In-Reply-To: <1260862393.85.0.15479395745.issue7512@psf.upfronthosting.co.za> Message-ID: <1350403539.06.0.905201657816.issue7512@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Tests added in issue14662. This issue can be closed. ---------- nosy: +serhiy.storchaka status: pending -> open _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue7512> _______________________________________ From report at bugs.python.org Tue Oct 16 18:18:13 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 16 Oct 2012 16:18:13 +0000 Subject: [issue16250] URLError invoked with reason as filename Message-ID: <1350404293.01.0.800497532294.issue16250@psf.upfronthosting.co.za> New submission from Chris Jerdonek: This issue is to fix invocations of URLError so that "reasons" are not passed in for the "filename" argument of the URLError constructor. Ezio found and described this issue when commenting on issue 10836: http://bugs.python.org/issue10836#msg172988 In more detail: URLError accepts "reason" and "filename" arguments: http://hg.python.org/cpython/file/74b95194ba86/Lib/urllib/error.py#l23 However, in several places in Lib/urllib, URLError is invoked with a "reason" passed in for the filename. For example: raise URLError('local file error', 'not on local host') This issue could be addressed for this example by changing the above to: raise URLError('local file error: not on local host') This dovetails with issue #16247, which is to start passing the actual filename in for some calls to URLError (and perhaps to adjust URLError's __str__, etc). ---------- components: Library (Lib) keywords: easy messages: 173058 nosy: chris.jerdonek, ezio.melotti priority: normal severity: normal status: open title: URLError invoked with reason as filename type: enhancement versions: Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16250> _______________________________________ From report at bugs.python.org Tue Oct 16 18:21:06 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 16 Oct 2012 16:21:06 +0000 Subject: [issue10836] urllib.request.urlretrieve calls URLError with 3 args In-Reply-To: <1294252036.56.0.144119584231.issue10836@psf.upfronthosting.co.za> Message-ID: <1350404466.3.0.750088341194.issue10836@psf.upfronthosting.co.za> Chris Jerdonek added the comment: For tracking purposes, I created issue 16250 for what you observed above, which as you said is related to but not the same as Nick's issue 16247. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10836> _______________________________________ From report at bugs.python.org Tue Oct 16 18:23:30 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 16 Oct 2012 16:23:30 +0000 Subject: [issue16250] URLError invoked with reason as filename In-Reply-To: <1350404293.01.0.800497532294.issue16250@psf.upfronthosting.co.za> Message-ID: <1350404610.33.0.595423398967.issue16250@psf.upfronthosting.co.za> Changes by Senthil Kumaran <senthil at uthcode.com>: ---------- nosy: +orsenthil _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16250> _______________________________________ From report at bugs.python.org Tue Oct 16 18:43:54 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 16 Oct 2012 16:43:54 +0000 Subject: [issue16250] URLError invoked with reason as filename In-Reply-To: <1350404293.01.0.800497532294.issue16250@psf.upfronthosting.co.za> Message-ID: <1350405834.63.0.244392942031.issue16250@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +ncoghlan _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16250> _______________________________________ From report at bugs.python.org Tue Oct 16 18:52:05 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 16 Oct 2012 16:52:05 +0000 Subject: [issue16250] URLError invoked with reason as filename In-Reply-To: <1350404293.01.0.800497532294.issue16250@psf.upfronthosting.co.za> Message-ID: <1350406325.56.0.108283438473.issue16250@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > raise URLError('local file error: not on local host') I should also point out that URLError invocations with formats like the above already do occur in Lib/urllib/request.py. For example: raise URLError('ftp error: no host given') exc = URLError('ftp error: %s' % msg) raise URLError("http protocol error: bad status line") ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16250> _______________________________________ From report at bugs.python.org Tue Oct 16 18:55:46 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Oct 2012 16:55:46 +0000 Subject: [issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input In-Reply-To: <1236786647.39.0.745171492116.issue5476@psf.upfronthosting.co.za> Message-ID: <1350406546.67.0.839371588098.issue5476@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is more than 6 months old with no activity. ---------- nosy: +serhiy.storchaka status: pending -> open _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5476> _______________________________________ From report at bugs.python.org Tue Oct 16 19:13:35 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Oct 2012 17:13:35 +0000 Subject: [issue2263] struct.pack() + numpy int raises SystemError In-Reply-To: <1205134764.8.0.415620235375.issue2263@psf.upfronthosting.co.za> Message-ID: <1350407615.78.0.0609340703729.issue2263@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: FYI Py_TPFLAGS_INT_SUBCLASS already not used in Python 3.x. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue2263> _______________________________________ From report at bugs.python.org Tue Oct 16 19:15:00 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 16 Oct 2012 17:15:00 +0000 Subject: [issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input In-Reply-To: <1236786647.39.0.745171492116.issue5476@psf.upfronthosting.co.za> Message-ID: <1350407700.8.0.430494337582.issue5476@psf.upfronthosting.co.za> Changes by Mark Dickinson <dickinsm at gmail.com>: ---------- nosy: +mark.dickinson _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5476> _______________________________________ From report at bugs.python.org Tue Oct 16 19:33:47 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Oct 2012 17:33:47 +0000 Subject: [issue5223] infinite recursion in PyErr_WriteUnraisable In-Reply-To: <1234412915.77.0.527314714811.issue5223@psf.upfronthosting.co.za> Message-ID: <1350408827.73.0.202214938154.issue5223@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: On 2.7 prints two 42, on 3.x fails (RuntimeError: maximum recursion depth exceeded in comparison) on first call. 2.6 out of date for non-security fix. ---------- nosy: +serhiy.storchaka status: pending -> open _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5223> _______________________________________ From report at bugs.python.org Tue Oct 16 19:53:29 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Oct 2012 17:53:29 +0000 Subject: [issue15958] bytes.join() should allow arbitrary buffer objects In-Reply-To: <1347905010.83.0.632444428638.issue15958@psf.upfronthosting.co.za> Message-ID: <1350410009.09.0.415722124071.issue15958@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a new patch checking that the sequence size didn't change. I also refactored the join() implementation into a shared function in stringlib. ---------- Added file: http://bugs.python.org/file27594/bytes_join_buffers3.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15958> _______________________________________ From report at bugs.python.org Tue Oct 16 19:56:50 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Oct 2012 17:56:50 +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: <1350410210.71.0.865976430938.issue13572@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Barry, you can reproduce it? The issue obviously in PyUnicode_FromString() call from PyCursesWindow_GetKey(). We can try latin1 encoding, locale encoding or utf-8 with surrogateescape error handler. ---------- nosy: +serhiy.storchaka status: pending -> open _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13572> _______________________________________ From report at bugs.python.org Tue Oct 16 20:24:54 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 16 Oct 2012 18:24:54 +0000 Subject: [issue16251] object.__reduce__() Message-ID: <1350411894.01.0.763638555345.issue16251@psf.upfronthosting.co.za> New submission from Eric Snow: In Objects/typeobject.c, reduce_2() makes _PyObject_GetAttrId() calls to pull some methods for the object in question. This is a problem when the object's type defines __getattr__() or __getattribute__() and returns something like None when the attribute is not found: from copy import deepcopy class Spam(dict): def __getattr__(self, name): # defaults to None return self.get(name) deepcopy(Spam(ham=5)) While we could do a check on the result of _PyObject_GetAttrId() to make sure it is callable, the better solution would be to look up the methods on the object's type rather than on the object. Doing so falls in line with the specified pattern for special method lookup [1]. I'm guessing there are a few other related places in typeobject.c that have the same problem which could be fixed in the same way. I'm marking this as a bug rather than a feature since it is a deviation from the specification for special methods. [1] http://docs.python.org/dev/reference/datamodel.html#special-method-lookup ---------- components: Interpreter Core messages: 173066 nosy: eric.snow priority: normal severity: normal stage: needs patch status: open title: object.__reduce__() type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16251> _______________________________________ From report at bugs.python.org Tue Oct 16 20:30:02 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Oct 2012 18:30:02 +0000 Subject: [issue15958] bytes.join() should allow arbitrary buffer objects In-Reply-To: <1347905010.83.0.632444428638.issue15958@psf.upfronthosting.co.za> Message-ID: <1350412202.59.0.356819928016.issue15958@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I added new comments. :-( ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15958> _______________________________________ From report at bugs.python.org Tue Oct 16 20:34:31 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 16 Oct 2012 18:34:31 +0000 Subject: [issue16251] object.__reduce__() In-Reply-To: <1350411894.01.0.763638555345.issue16251@psf.upfronthosting.co.za> Message-ID: <1350412471.69.0.0330551475039.issue16251@psf.upfronthosting.co.za> Benjamin Peterson added the comment: pickle and _pickle also look on the instance for __reduce__ and __reduce_ex__. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16251> _______________________________________ From report at bugs.python.org Tue Oct 16 20:38:08 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 16 Oct 2012 18:38:08 +0000 Subject: [issue16251] some special methods are looked up on the instance rather than the type In-Reply-To: <1350411894.01.0.763638555345.issue16251@psf.upfronthosting.co.za> Message-ID: <1350412688.84.0.580884111961.issue16251@psf.upfronthosting.co.za> Changes by Eric Snow <ericsnowcurrently at gmail.com>: ---------- title: object.__reduce__() -> some special methods are looked up on the instance rather than the type _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16251> _______________________________________ From report at bugs.python.org Tue Oct 16 21:04:53 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Oct 2012 19:04:53 +0000 Subject: [issue15958] bytes.join() should allow arbitrary buffer objects In-Reply-To: <1350412202.59.0.356819928016.issue15958@psf.upfronthosting.co.za> Message-ID: <1350414185.3336.1.camel@localhost.localdomain> Antoine Pitrou added the comment: > I added new comments. :-( Thanks. I think I will commit after adding the missing #undef :-) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15958> _______________________________________ From report at bugs.python.org Tue Oct 16 21:05:39 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Oct 2012 19:05:39 +0000 Subject: [issue13572] import _curses fails because of UnicodeDecodeError('utf8' codec can't decode byte 0xb5 ...') on ARM Ubuntu 3.x In-Reply-To: <1350410210.71.0.865976430938.issue13572@psf.upfronthosting.co.za> Message-ID: <201210162205.20630.storchaka@gmail.com> Serhiy Storchaka added the comment: Here are three patches. I think one of them (or any) should fix the issue. The question is what solution returns more suitable result for non-ascii key names. ---------- keywords: +patch Added file: http://bugs.python.org/file27595/curses_getkey_utf8_surrogateescape.patch Added file: http://bugs.python.org/file27596/curses_getkey_latin1.patch Added file: http://bugs.python.org/file27597/curses_getkey_locale.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13572> _______________________________________ -------------- next part -------------- diff -r bd3647e9ac62 Modules/_cursesmodule.c --- a/Modules/_cursesmodule.c Tue Oct 16 13:52:53 2012 +0300 +++ b/Modules/_cursesmodule.c Tue Oct 16 21:53:38 2012 +0300 @@ -1144,12 +1144,20 @@ return Py_BuildValue("C", rtn); } else { const char *knp; + size_t size; #if defined(__NetBSD__) knp = unctrl(rtn); #else knp = keyname(rtn); #endif - return PyUnicode_FromString((knp == NULL) ? "" : knp); + if (knp == NULL) + return PyUnicode_FromStringAndSize(NULL, 0); + size = strlen(knp); + if (size > PY_SSIZE_T_MAX) { + PyErr_SetString(PyExc_OverflowError, "input too long"); + return NULL; + } + return PyUnicode_DecodeUTF8Stateful(knp, (Py_ssize_t)size, "surrogateescape", NULL); } } -------------- next part -------------- diff -r bd3647e9ac62 Modules/_cursesmodule.c --- a/Modules/_cursesmodule.c Tue Oct 16 13:52:53 2012 +0300 +++ b/Modules/_cursesmodule.c Tue Oct 16 21:54:08 2012 +0300 @@ -1144,12 +1144,20 @@ return Py_BuildValue("C", rtn); } else { const char *knp; + size_t size; #if defined(__NetBSD__) knp = unctrl(rtn); #else knp = keyname(rtn); #endif - return PyUnicode_FromString((knp == NULL) ? "" : knp); + if (knp == NULL) + return PyUnicode_FromStringAndSize(NULL, 0); + size = strlen(knp); + if (size > PY_SSIZE_T_MAX) { + PyErr_SetString(PyExc_OverflowError, "input too long"); + return NULL; + } + return PyUnicode_DecodeLatin1(knp, (Py_ssize_t)size, NULL); } } -------------- next part -------------- diff -r bd3647e9ac62 Modules/_cursesmodule.c --- a/Modules/_cursesmodule.c Tue Oct 16 13:52:53 2012 +0300 +++ b/Modules/_cursesmodule.c Tue Oct 16 21:54:40 2012 +0300 @@ -1144,12 +1144,20 @@ return Py_BuildValue("C", rtn); } else { const char *knp; + size_t size; #if defined(__NetBSD__) knp = unctrl(rtn); #else knp = keyname(rtn); #endif - return PyUnicode_FromString((knp == NULL) ? "" : knp); + if (knp == NULL) + return PyUnicode_FromStringAndSize(NULL, 0); + size = strlen(knp); + if (size > PY_SSIZE_T_MAX) { + PyErr_SetString(PyExc_OverflowError, "input too long"); + return NULL; + } + return PyUnicode_DecodeLocaleAndSize(knp, (Py_ssize_t)size, NULL); } } From report at bugs.python.org Tue Oct 16 21:09:17 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2012 19:09:17 +0000 Subject: [issue15958] bytes.join() should allow arbitrary buffer objects In-Reply-To: <1347905010.83.0.632444428638.issue15958@psf.upfronthosting.co.za> Message-ID: <3Xh5fh3t64zR2y@mail.python.org> Roundup Robot added the comment: New changeset 16285c1b4dda by Antoine Pitrou in branch 'default': Issue #15958: bytes.join and bytearray.join now accept arbitrary buffer objects. http://hg.python.org/cpython/rev/16285c1b4dda ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15958> _______________________________________ From report at bugs.python.org Tue Oct 16 21:09:41 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Oct 2012 19:09:41 +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: <1350414581.63.0.699616015814.issue9290@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I agree with the goal. We need an automated test for these proxies. ---------- nosy: +terry.reedy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9290> _______________________________________ From report at bugs.python.org Tue Oct 16 21:10:04 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Oct 2012 19:10:04 +0000 Subject: [issue16103] sys.stdin.readline 'unsupported' (IDLE 2.7.3, Win7, pythonw) In-Reply-To: <1349121673.49.0.0542189425732.issue16103@psf.upfronthosting.co.za> Message-ID: <1350414604.58.0.539356538232.issue16103@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Roger, you are partially right -- there are changes, but they were intentional. I updated the idlelib part of my installation to match the repository on July 9 to incorporate the _RPCFile wrapping of of the three stdio files, including this: - sys.stdin = self.console = self.get_remote_proxy("stdin") + sys.stdin = self.console = _RPCFile(self.get_remote_proxy("stdin")) >>> import sys >>> sys.stdin <idlelib.run._RPCInputFile object at 0x000000000315D320> Sorry about forgetting this. Anyway, I presume you remember that issue. It seems that there is still a bug either in that update or its interaction with other code. What happens in linux with a fresh 2.7 build? Serhiy's patch for #9290 replaces _RPCXyxFile with PseudoXyzFile subclasses of revised PseudoFile. If it works, it should fix this issue also. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16103> _______________________________________ From report at bugs.python.org Tue Oct 16 21:10:56 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Oct 2012 19:10:56 +0000 Subject: [issue16252] bytes and bytearray methods are undocumented Message-ID: <1350414656.76.0.593225775655.issue16252@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Everything is in the title. I couldn't find any doc for bytes.join, etc. (while str methods are documented in library/stdtypes.html#string-methods). ---------- assignee: docs at python components: Documentation messages: 173074 nosy: docs at python, pitrou priority: normal severity: normal stage: needs patch status: open title: bytes and bytearray methods are undocumented type: behavior versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16252> _______________________________________ From report at bugs.python.org Tue Oct 16 21:11:27 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Oct 2012 19:11:27 +0000 Subject: [issue15958] bytes.join() should allow arbitrary buffer objects In-Reply-To: <1347905010.83.0.632444428638.issue15958@psf.upfronthosting.co.za> Message-ID: <1350414687.01.0.73430579108.issue15958@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Done now. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15958> _______________________________________ From report at bugs.python.org Tue Oct 16 21:11:34 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Oct 2012 19:11:34 +0000 Subject: [issue15958] bytes.join() should allow arbitrary buffer objects In-Reply-To: <1347905010.83.0.632444428638.issue15958@psf.upfronthosting.co.za> Message-ID: <1350414694.03.0.47667797868.issue15958@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15958> _______________________________________ From report at bugs.python.org Tue Oct 16 21:13:37 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 16 Oct 2012 19:13:37 +0000 Subject: [issue16252] bytes and bytearray methods are undocumented In-Reply-To: <1350414656.76.0.593225775655.issue16252@psf.upfronthosting.co.za> Message-ID: <1350414817.7.0.788583408426.issue16252@psf.upfronthosting.co.za> Ezio Melotti added the comment: http://docs.python.org/dev/library/stdtypes.html#bytes-and-bytearray-operations """ Due to the common use of ASCII text as the basis for binary protocols, bytes and bytearray objects provide almost all methods found on text strings, with the exceptions of: """ The additional methods are documented after that. ---------- nosy: +ezio.melotti _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16252> _______________________________________ From report at bugs.python.org Tue Oct 16 21:14:57 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Oct 2012 19:14:57 +0000 Subject: [issue16252] bytes and bytearray methods are undocumented In-Reply-To: <1350414656.76.0.593225775655.issue16252@psf.upfronthosting.co.za> Message-ID: <1350414897.85.0.901416509818.issue16252@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ah, right. I guess a hyperlink to those methods wouldn't hurt, though :) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16252> _______________________________________ From report at bugs.python.org Tue Oct 16 21:15:55 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Oct 2012 19:15:55 +0000 Subject: [issue16252] bytes and bytearray methods are undocumented In-Reply-To: <1350414656.76.0.593225775655.issue16252@psf.upfronthosting.co.za> Message-ID: <1350414955.67.0.102038795217.issue16252@psf.upfronthosting.co.za> Antoine Pitrou added the comment: For the record, in the SSL socket docs, I listed the supported methods explicitly (http://docs.python.org/dev/library/ssl.html#ssl-sockets). I think it makes things clearer for the reader. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16252> _______________________________________ From report at bugs.python.org Tue Oct 16 21:19:01 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 16 Oct 2012 19:19:01 +0000 Subject: [issue16251] pickle special methods are looked up on the instance rather than the type In-Reply-To: <1350411894.01.0.763638555345.issue16251@psf.upfronthosting.co.za> Message-ID: <1350415141.07.0.728682079907.issue16251@psf.upfronthosting.co.za> Changes by Benjamin Peterson <benjamin at python.org>: ---------- title: some special methods are looked up on the instance rather than the type -> pickle special methods are looked up on the instance rather than the type _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16251> _______________________________________ From report at bugs.python.org Tue Oct 16 21:23:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Oct 2012 19:23:08 +0000 Subject: [issue15958] bytes.join() should allow arbitrary buffer objects In-Reply-To: <1350414687.01.0.73430579108.issue15958@psf.upfronthosting.co.za> Message-ID: <201210162222.55146.storchaka@gmail.com> Serhiy Storchaka added the comment: Well done. However check at top of Objects/stringlib/join.h does not protect from using the file with asciilib or ucs1lib. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15958> _______________________________________ From report at bugs.python.org Tue Oct 16 21:24:56 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Oct 2012 19:24:56 +0000 Subject: [issue15958] bytes.join() should allow arbitrary buffer objects In-Reply-To: <201210162222.55146.storchaka@gmail.com> Message-ID: <1350415387.3336.2.camel@localhost.localdomain> Antoine Pitrou added the comment: > However check at top of Objects/stringlib/join.h does not protect from using > the file with asciilib or ucs1lib. I'm not sure that's a problem. Someone would have to go out of their way to use join.h with only UCS1 unicode strings. Also tests would probably start failing, since str.join doesn't have the right signature :-) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15958> _______________________________________ From report at bugs.python.org Tue Oct 16 21:28:04 2012 From: report at bugs.python.org (Roger Upole) Date: Tue, 16 Oct 2012 19:28:04 +0000 Subject: [issue16253] Docs for PyArg_ParseTupleAndKeywords say it doesn't accept nested tuples Message-ID: <1350415684.72.0.0946925077197.issue16253@psf.upfronthosting.co.za> New submission from Roger Upole: The docs for this function state "Nested tuples cannot be parsed when using keyword arguments!" but this restriction was removed some time ago. ---------- assignee: docs at python components: Documentation messages: 173081 nosy: docs at python, rupole priority: normal severity: normal status: open title: Docs for PyArg_ParseTupleAndKeywords say it doesn't accept nested tuples _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16253> _______________________________________ From report at bugs.python.org Tue Oct 16 21:38:59 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Oct 2012 19:38:59 +0000 Subject: [issue5223] infinite recursion in PyErr_WriteUnraisable In-Reply-To: <1234412915.77.0.527314714811.issue5223@psf.upfronthosting.co.za> Message-ID: <1350416339.22.0.288026269571.issue5223@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, so I would say this whole issue is out of date now, since maintained branches don't show the issue. ---------- resolution: -> out of date stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5223> _______________________________________ From report at bugs.python.org Tue Oct 16 21:41:36 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Oct 2012 19:41:36 +0000 Subject: [issue16251] pickle special methods are looked up on the instance rather than the type In-Reply-To: <1350411894.01.0.763638555345.issue16251@psf.upfronthosting.co.za> Message-ID: <1350416496.24.0.711817484512.issue16251@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I'm marking this as a bug rather than a feature since it is a deviation > from the specification for special methods. It may still break some existing code, though (especially for people using proxies). ---------- nosy: +pitrou _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16251> _______________________________________ From report at bugs.python.org Tue Oct 16 21:59:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Oct 2012 19:59:01 +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: <1350417541.05.0.813023628908.issue9290@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Unfortunately we have not a unittest framework for IDLE yet. After implementing issue15392 I will make tests for these proxies. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9290> _______________________________________ From report at bugs.python.org Tue Oct 16 22:00:31 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Oct 2012 20:00:31 +0000 Subject: [issue7512] shutil.copystat may fail EOPNOTSUPP In-Reply-To: <1260862393.85.0.15479395745.issue7512@psf.upfronthosting.co.za> Message-ID: <1350417631.34.0.137954474017.issue7512@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, thanks. ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue7512> _______________________________________ From report at bugs.python.org Tue Oct 16 22:03:16 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 16 Oct 2012 20:03:16 +0000 Subject: [issue16252] bytes and bytearray methods are undocumented In-Reply-To: <1350414656.76.0.593225775655.issue16252@psf.upfronthosting.co.za> Message-ID: <1350417796.73.0.933456390011.issue16252@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I couldn't find any doc for bytes.join, etc. One of the contributing factors to this is that bytes doesn't have its own class entry in the same way that, for example, list, dict, and memoryview have. This creates a stumbling block for readers because they have to know to click on the "Bytes and Bytearray Operations" section as opposed to simply clicking on the type name as it is done for several other types. With a class entry, locating where the methods are documented would be quicker and more intuitive. ---------- nosy: +chris.jerdonek _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16252> _______________________________________ From report at bugs.python.org Tue Oct 16 22:04:44 2012 From: report at bugs.python.org (Trent Nelson) Date: Tue, 16 Oct 2012 20:04:44 +0000 Subject: [issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS) In-Reply-To: <1345515355.02.0.72747216818.issue15745@psf.upfronthosting.co.za> Message-ID: <1350417884.01.0.0175353763499.issue15745@psf.upfronthosting.co.za> Trent Nelson added the comment: I've figured out what the primary problem is on these platforms: os.stat() returns st_mtime and st_atime values with nanosecond resolution, but without a corresponding utimensat(), we can only affect time with microsecond precision via utimes(). Therefore, the following logic is faulty: def _test_utime(self, filename, attr, utime, delta): # Issue #13327 removed the requirement to pass None as the # second argument. Check that the previous methods of passing # a time tuple or None work in addition to no argument. st0 = os.stat(filename) # Doesn't set anything new, but sets the time tuple way utime(filename, (attr(st0, "st_atime"), attr(st0, "st_mtime"))) # Setting the time to the time you just read, then reading again, # should always return exactly the same times. st1 = os.stat(filename) self.assertEqual(attr(st0, "st_mtime"), attr(st1, "st_mtime")) self.assertEqual(attr(st0, "st_atime"), attr(st1, "st_atime")) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15745> _______________________________________ From report at bugs.python.org Tue Oct 16 22:13:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Oct 2012 20:13:55 +0000 Subject: [issue10909] thread hang, possibly related to print In-Reply-To: <1295026647.31.0.671636636712.issue10909@psf.upfronthosting.co.za> Message-ID: <1350418435.83.0.465181479714.issue10909@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is this issue reproduced now, with Python 2.7.3+? Is this issue reproduced with issue9290 patch? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10909> _______________________________________ From report at bugs.python.org Tue Oct 16 22:14:08 2012 From: report at bugs.python.org (David Beazley) Date: Tue, 16 Oct 2012 20:14:08 +0000 Subject: [issue16254] PyUnicode_AsWideCharString() increases string size Message-ID: <1350418448.6.0.265249549125.issue16254@psf.upfronthosting.co.za> New submission from David Beazley: The PyUnicode_AsWideCharString() function is described as creating a new buffer of type wchar_t allocated by PyMem_Alloc() (which must be freed by the user). However, if you use this function, it causes the size of the original string object to permanently increase. For example, suppose you had some extension code like this: static PyObject *py_receive_wchar(PyObject *self, PyObject *args) { PyObject *obj; wchar_t *s; Py_ssize_t len; if (!PyArg_ParseTuple(args, "U", &obj)) { return NULL; } if ((s = PyUnicode_AsWideCharString(obj, &len)) == NULL) { return NULL; } /* Do nothing */ PyMem_Free(s); Py_RETURN_NONE; } Now, try an experiment (assume that the above extension function is available as 'receive_wchar'). >>> s = "Hell"*1000 >>> len(s) 4000 >>> import sys >>> sys.getsizeof(s) 4049 >>> receive_wchar(s) >>> sys.getsizeof(s) 20053 >>> It seems that PyUnicode_AsWideCharString() may be filling in the wstr field of the associated PyASCIIObject structure from PEP393 (I haven't verified). Once filled, it never seems to be discarded. Background: I am trying to figure out how to convert from Unicode to (wchar_t, int *) that doesn't cause a permanent increase in the memory footprint of the original Unicode object. Also, I'm trying to stay away from deprecated Unicode APIs. ---------- components: Extension Modules, Interpreter Core, Unicode messages: 173089 nosy: dabeaz, ezio.melotti priority: normal severity: normal status: open title: PyUnicode_AsWideCharString() increases string size versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16254> _______________________________________ From report at bugs.python.org Tue Oct 16 22:17:01 2012 From: report at bugs.python.org (David Beazley) Date: Tue, 16 Oct 2012 20:17:01 +0000 Subject: [issue16254] PyUnicode_AsWideCharString() increases string size In-Reply-To: <1350418448.6.0.265249549125.issue16254@psf.upfronthosting.co.za> Message-ID: <1350418621.21.0.667695585676.issue16254@psf.upfronthosting.co.za> David Beazley added the comment: I should quickly add, is there any way to simply have this function not keep the wchar_t buffer around afterwards? That would be great. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16254> _______________________________________ From report at bugs.python.org Tue Oct 16 22:22:17 2012 From: report at bugs.python.org (Felipe Cruz) Date: Tue, 16 Oct 2012 20:22:17 +0000 Subject: [issue16105] Pass read only FD to signal.set_wakeup_fd In-Reply-To: <1349125559.77.0.651840030069.issue16105@psf.upfronthosting.co.za> Message-ID: <1350418937.33.0.327342370241.issue16105@psf.upfronthosting.co.za> Felipe Cruz added the comment: I've followed latest suggestions. Test and code updated. ---------- Added file: http://bugs.python.org/file27598/issue16105_v4.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16105> _______________________________________ From report at bugs.python.org Tue Oct 16 22:43:57 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Oct 2012 20:43:57 +0000 Subject: [issue1529353] Squeezer - squeeze large output in the interpreter Message-ID: <1350420237.47.0.156835208617.issue1529353@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- nosy: +serhiy.storchaka versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1529353> _______________________________________ From report at bugs.python.org Tue Oct 16 22:52:44 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Oct 2012 20:52:44 +0000 Subject: [issue15744] missing tests for {RawIO,BufferedIO,TextIO}.writelines In-Reply-To: <1345500357.29.0.226025015503.issue15744@psf.upfronthosting.co.za> Message-ID: <1350420764.84.0.980379655067.issue15744@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: ---------- stage: needs patch -> patch review versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15744> _______________________________________ From report at bugs.python.org Tue Oct 16 22:59:02 2012 From: report at bugs.python.org (Larry Hastings) Date: Tue, 16 Oct 2012 20:59:02 +0000 Subject: [issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS) In-Reply-To: <1345515355.02.0.72747216818.issue15745@psf.upfronthosting.co.za> Message-ID: <1350421142.95.0.720470548438.issue15745@psf.upfronthosting.co.za> Larry Hastings added the comment: Is there a different utime family function on these platforms that *can* write atime/mtime with ns resolution? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15745> _______________________________________ From report at bugs.python.org Tue Oct 16 23:00:02 2012 From: report at bugs.python.org (Ben Rousch) Date: Tue, 16 Oct 2012 21:00:02 +0000 Subject: [issue16255] subrocess.Popen needs /bin/sh but Android only has /system/bin/sh Message-ID: <1350421202.49.0.905467284446.issue16255@psf.upfronthosting.co.za> New submission from Ben Rousch: The subprocess.Popen function uses /bin/sh in Unix environments. Android is detected as a Unix environemnt, but has moved that executable to /system/bin/sh. This can be worked around by adding a parameter "executable='/system/bin/sh'" to the call, but it is impractical to do this for every call to Popen in every library and codebase. For subprocess.Popen to work on Android, Popen needs to be able to detect if /bin/sh is not there and try /system/bin/sh instead. ---------- components: Library (Lib) messages: 173093 nosy: brousch priority: normal severity: normal status: open title: subrocess.Popen needs /bin/sh but Android only has /system/bin/sh type: crash versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16255> _______________________________________ From report at bugs.python.org Tue Oct 16 23:03:48 2012 From: report at bugs.python.org (Trent Nelson) Date: Tue, 16 Oct 2012 21:03:48 +0000 Subject: [issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS) In-Reply-To: <1345515355.02.0.72747216818.issue15745@psf.upfronthosting.co.za> Message-ID: <1350421428.18.0.859266960681.issue15745@psf.upfronthosting.co.za> Trent Nelson added the comment: There doesn't appear to be on FreeBSD. Although, on Solaris, -D__EXTENSIONS__ opens up access to utimensat() (at least on 11), so I'll factor that into configure.ac. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15745> _______________________________________ From report at bugs.python.org Tue Oct 16 23:07:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Oct 2012 21:07:18 +0000 Subject: [issue13220] print function unable while multiprocessing.Process is being run In-Reply-To: <1319038082.58.0.169311394229.issue13220@psf.upfronthosting.co.za> Message-ID: <1350421638.28.0.138411877623.issue13220@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: *nix has the same difference of behavior between interpreter and IDLE shell. With issue9290 patch the "function f" line also printed. And then the script hangs. ---------- nosy: +serhiy.storchaka versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13220> _______________________________________ From report at bugs.python.org Tue Oct 16 23:08:15 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2012 21:08:15 +0000 Subject: [issue15744] missing tests for {RawIO,BufferedIO,TextIO}.writelines In-Reply-To: <1345500357.29.0.226025015503.issue15744@psf.upfronthosting.co.za> Message-ID: <3Xh8Hy4Tb9zQxT@mail.python.org> Roundup Robot added the comment: New changeset 4c204a61bd79 by Antoine Pitrou in branch '3.2': Also add tests for TextIOWrapper.writelines() (issue #15744). http://hg.python.org/cpython/rev/4c204a61bd79 New changeset 2efcaec45697 by Antoine Pitrou in branch '3.3': Merge for issue #15744: add tests for the writelines() method of file objects. http://hg.python.org/cpython/rev/2efcaec45697 New changeset e526d67016f0 by Antoine Pitrou in branch 'default': Merge for issue #15744: add tests for the writelines() method of file objects. http://hg.python.org/cpython/rev/e526d67016f0 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15744> _______________________________________ From report at bugs.python.org Tue Oct 16 23:09:32 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 16 Oct 2012 21:09:32 +0000 Subject: [issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS) In-Reply-To: <1345515355.02.0.72747216818.issue15745@psf.upfronthosting.co.za> Message-ID: <1350421772.93.0.394541791783.issue15745@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>: ---------- nosy: +Arfrever _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15745> _______________________________________ From report at bugs.python.org Tue Oct 16 23:14:29 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 16 Oct 2012 21:14:29 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1346632042.85.0.745944196118.issue15853@psf.upfronthosting.co.za> Message-ID: <1350422069.45.0.090621912682.issue15853@psf.upfronthosting.co.za> Changes by Andrew Svetlov <andrew.svetlov at gmail.com>: ---------- nosy: +asvetlov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15853> _______________________________________ From report at bugs.python.org Tue Oct 16 23:14:58 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2012 21:14:58 +0000 Subject: [issue15744] missing tests for {RawIO,BufferedIO,TextIO}.writelines In-Reply-To: <1345500357.29.0.226025015503.issue15744@psf.upfronthosting.co.za> Message-ID: <3Xh8Rk1PPvzR0w@mail.python.org> Roundup Robot added the comment: New changeset 5b062bb56037 by Antoine Pitrou in branch '2.7': Also add tests for TextIOWrapper.writelines() (issue #15744). http://hg.python.org/cpython/rev/5b062bb56037 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15744> _______________________________________ From report at bugs.python.org Tue Oct 16 23:16:03 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Oct 2012 21:16:03 +0000 Subject: [issue15744] missing tests for {RawIO,BufferedIO,TextIO}.writelines In-Reply-To: <1345500357.29.0.226025015503.issue15744@psf.upfronthosting.co.za> Message-ID: <1350422163.4.0.385418560584.issue15744@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've committed a modified version of your patch. Thank you ! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15744> _______________________________________ From report at bugs.python.org Tue Oct 16 23:22:12 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 16 Oct 2012 21:22:12 +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: <1350422532.94.0.886226939646.issue13572@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I cannot reproduce it with Python 3.3 hg head on my ARM buildbot. _curses builds and imports just fine now. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13572> _______________________________________ From report at bugs.python.org Tue Oct 16 23:24:06 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Oct 2012 21:24:06 +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: <1350422646.56.0.156625300504.issue16255@psf.upfronthosting.co.za> R. David Murray added the comment: Android really should not be breaking the standards that way. We do want to support Android, but have you submitted a bug report to them? ---------- nosy: +r.david.murray _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16255> _______________________________________ From report at bugs.python.org Tue Oct 16 23:35:23 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 16 Oct 2012 21:35:23 +0000 Subject: [issue16254] PyUnicode_AsWideCharString() increases string size In-Reply-To: <1350418448.6.0.265249549125.issue16254@psf.upfronthosting.co.za> Message-ID: <1350423323.27.0.367484867962.issue16254@psf.upfronthosting.co.za> Martin v. L?wis added the comment: As stated, this is not a bug: there is no memory leak, nor any deviation from documented behavior. You are right that it fills the wstr pointer, by calling PyUnicode_AsUnicodeAndSize in unicode_aswidechar, and then copying the data to a fresh buffer. This is merely the simplest implementation; it's certainly possible to improve it. Contributions are welcome. A number of things need to be considered: - Computing the wstr size is somewhat expensive if on a 16-bit wchar_t system, since the result may need surrogate pairs. - I would suggest that if possible, the wstr representation should be returned out of the unicode object (resetting wstr to NULL). This should produce the greatest reuse in code, yet avoid unnecessary copying. - It's not possible to do so for strings where wstr is shared with the canonical representation (i.e. a UCS-2 string on 16-bit wchar_t, and a UCS-4 string on 32-bit wchar_t). - I don't think wstr should be cleared if it was already filled when the function got called. Instead, wstr should only be returned if it was originally NULL. ---------- nosy: +loewis _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16254> _______________________________________ From report at bugs.python.org Tue Oct 16 23:35:52 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Oct 2012 21:35:52 +0000 Subject: [issue16254] PyUnicode_AsWideCharString() increases string size In-Reply-To: <1350418448.6.0.265249549125.issue16254@psf.upfronthosting.co.za> Message-ID: <1350423352.54.0.177284718521.issue16254@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: ---------- nosy: +haypo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16254> _______________________________________ From report at bugs.python.org Tue Oct 16 23:40:39 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 16 Oct 2012 21:40:39 +0000 Subject: [issue16254] PyUnicode_AsWideCharString() increases string size In-Reply-To: <1350418448.6.0.265249549125.issue16254@psf.upfronthosting.co.za> Message-ID: <1350423639.06.0.160049691737.issue16254@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>: ---------- nosy: +Arfrever _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16254> _______________________________________ From report at bugs.python.org Tue Oct 16 23:40:48 2012 From: report at bugs.python.org (Trent Nelson) Date: Tue, 16 Oct 2012 21:40:48 +0000 Subject: [issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS) In-Reply-To: <1345515355.02.0.72747216818.issue15745@psf.upfronthosting.co.za> Message-ID: <1350423648.28.0.50132101244.issue15745@psf.upfronthosting.co.za> Trent Nelson added the comment: This patch (surprisingly) seems to do the job quite nicely: diff -r 1280b38fe583 Lib/test/test_os.py --- a/Lib/test/test_os.py Tue Oct 16 23:14:03 2012 +1000 +++ b/Lib/test/test_os.py Tue Oct 16 21:25:36 2012 +0000 @@ -40,6 +40,20 @@ or (st.st_mtime != st[8]) or (st.st_ctime != st[9])) +try: + import posix +except ImportError: + # Windows has nanosecond utime resolution. + UTIME_EPSILON = 2e-9 +else: + import sysconfig + if 'HAVE_UTIMENSAT' in posix._have_functions: + UTIME_EPSILON = 2e-9 + elif 'HAVE_UTIMES' in sysconfig.get_config_vars(): + UTIME_EPSILON = 2e-6 + else: + UTIME_EPSILON = 1.0 + # Detect whether we're on a Linux system that uses the (now outdated # and unmaintained) linuxthreads threading library. There's an issue # when combining linuxthreads with a failed execv call: see @@ -312,18 +326,32 @@ st0 = os.stat(filename) # Doesn't set anything new, but sets the time tuple way utime(filename, (attr(st0, "st_atime"), attr(st0, "st_mtime"))) - # Setting the time to the time you just read, then reading again, - # should always return exactly the same times. st1 = os.stat(filename) - self.assertEqual(attr(st0, "st_mtime"), attr(st1, "st_mtime")) - self.assertEqual(attr(st0, "st_atime"), attr(st1, "st_atime")) + + def _t(left, right, attr, name): + l = attr(left, name) + r = attr(right, name) + if isinstance(l, int): + assert isinstance(r, int) + l = l / 1e9 + r = r / 1e9 + return abs(l - r) + + epsilon = UTIME_EPSILON + self.assertLess(_t(st0, st1, attr, "st_mtime"), epsilon) + self.assertLess(_t(st0, st1, attr, "st_atime"), epsilon) + # Set to the current time in the old explicit way. os.utime(filename, None) st2 = os.stat(support.TESTFN) # Set to the current time in the new way os.utime(filename) st3 = os.stat(filename) - self.assertAlmostEqual(attr(st2, "st_mtime"), attr(st3, "st_mtime"), delta=delta) + self.assertAlmostEqual( + attr(st2, "st_mtime"), + attr(st3, "st_mtime"), + delta=delta + ) def test_utime(self): def utime(file, times): test_os passes on FreeBSD, Linux and Mac OS X with that applied. However, the Solaris 10/SPARC box still fails: AssertionError: 9.5367431640625e-07 not less than 2e-09 But it appears that build is actually picking up utimensat(), which makes the Solaris failures unrelated to the FreeBSD/NetBSD ones. I'll do some more investigating. Might warrant a separate issue. Larry: thoughts on the test_os.patch as is? ---------- keywords: +patch Added file: http://bugs.python.org/file27599/test_os.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15745> _______________________________________ From report at bugs.python.org Tue Oct 16 23:48:41 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 16 Oct 2012 21:48:41 +0000 Subject: [issue16238] Automatically remove build directory when build options changed In-Reply-To: <1350300834.63.0.981208567885.issue16238@psf.upfronthosting.co.za> Message-ID: <1350424121.84.0.48061073089.issue16238@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>: ---------- nosy: +Arfrever _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16238> _______________________________________ From report at bugs.python.org Tue Oct 16 23:55:10 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 16 Oct 2012 21:55:10 +0000 Subject: [issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input In-Reply-To: <1236786647.39.0.745171492116.issue5476@psf.upfronthosting.co.za> Message-ID: <1350424510.13.0.241830095432.issue5476@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: >From the macro posted earlier: Py##child##ArrType_Type.tp_base = &Py##parent2##ArrType_Type; tp_base is *not* PyInt_Type, so I was wrong when I said that the dominant base was int. This is wrong IMO: tp_base should be int, for the type to be correctly initialized. Compare: >>> from numpy import * >>> print int_.__bases__, int_.__base__ (<type 'numpy.signedinteger'>, <type 'int'>) <type 'numpy.signedinteger'> >>> class C(signedinteger, int): ... pass ... >>> print C.__bases__, C.__base__ (<type 'numpy.signedinteger'>, <type 'int'>) <type 'int'> ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5476> _______________________________________ From report at bugs.python.org Wed Oct 17 00:07:23 2012 From: report at bugs.python.org (David Beazley) Date: Tue, 16 Oct 2012 22:07:23 +0000 Subject: [issue16254] PyUnicode_AsWideCharString() increases string size In-Reply-To: <1350418448.6.0.265249549125.issue16254@psf.upfronthosting.co.za> Message-ID: <1350425243.79.0.472032673968.issue16254@psf.upfronthosting.co.za> David Beazley added the comment: Maybe it's not a bug, but I still think it's undesirable. Basically, you have a function that allocates a buffer, fills it with data, and allows the buffer to be destroyed. Yet, as a side effect, it allocates a second buffer, fills it, and permanently attaches it to the original string object. Thus it makes the size of the string object blow up to a size substantially larger than it was before with no way to reclaim memory other than to delete the whole string. Maybe this is some sort of rare event that doesn't matter, but maybe there's some bit of C extension code that is trying to pass a wchar_t array off to some external library. The extension writer is using the PyUnicode_AsWideCharString() function with the understanding that it creates a new array and that you have to destroy it. They understand that it's not super fast to have to make a copy, but it's better than nothing. What's unfortunate is that all of this attention to memory management doesn't reward the programmer as a copy gets left behind on the string object anyways. For instance, I start with a 10 Megabyte string, I pass it through a C extension function, and now the string is mysteriously using 50 Megabytes of memory. I think the idea of filling wstr, returning it and clearing it (if originally NULL) would definitely work here. Actually, that's exactly what I want--don't fill in the wstr member if it's not set already. That way, it's possible for C extensions to temporarily get the wstr buffer, do something, and then toss it away without affecting the original string. Another suggestion: An API function to simply clear wstr and the UTF-8 representation could also work. Again, this is for extension writers who want to pull data out of strings, but don't want to leave these memory side effects behind. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16254> _______________________________________ From report at bugs.python.org Wed Oct 17 00:12:05 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 16 Oct 2012 22:12:05 +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: <1350425525.33.0.998947499981.issue16194@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: """To prevent initializing an extension module more than once, we keep a static dictionary 'extensions' keyed by module name (for built-in modules) or by filename (for dynamically loaded modules), containing these modules. """ So there can be only one module per filename. But what if this dictionary was keyed by tuple(name, filename) instead? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16194> _______________________________________ From report at bugs.python.org Wed Oct 17 00:14:40 2012 From: report at bugs.python.org (David Beazley) Date: Tue, 16 Oct 2012 22:14:40 +0000 Subject: [issue16254] PyUnicode_AsWideCharString() increases string size In-Reply-To: <1350418448.6.0.265249549125.issue16254@psf.upfronthosting.co.za> Message-ID: <1350425680.21.0.0146862242132.issue16254@psf.upfronthosting.co.za> David Beazley added the comment: Another note: the PyUnicode_AsUTF8String() doesn't leave the UTF-8 encoded byte string behind on the original string object. I got into this thinking that PyUnicode_AsWideCharString() might have similar behavior. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16254> _______________________________________ From report at bugs.python.org Wed Oct 17 00:31:07 2012 From: report at bugs.python.org (Roumen Petrov) Date: Tue, 16 Oct 2012 22:31:07 +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: <1350426667.74.0.515764333021.issue16255@psf.upfronthosting.co.za> Roumen Petrov added the comment: ...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.... ---------- nosy: +rpetrov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16255> _______________________________________ From report at bugs.python.org Wed Oct 17 01:09:22 2012 From: report at bugs.python.org (Christopher Barker) Date: Tue, 16 Oct 2012 23:09:22 +0000 Subject: [issue16256] permissions wrong on Mac doc dir Message-ID: <1350428962.56.0.21849680877.issue16256@psf.upfronthosting.co.za> New submission from Christopher Barker: I just tried to "pip install ipython" and got: error: could not create '/Library/Frameworks/Python.framework/Versions/2.7/share/doc/ipython': Permission denied indeed: $ ls -l /Library/Frameworks/Python.framework/Versions/2.7/share/ total 0 drwxr-xr-x 3 root admin 102 Oct 11 09:14 doc drwxrwxr-x 3 root admin 102 Jun 11 2011 man which looks like the doc dir should have the same perms as the man dir. we might want to clen up that tiny nugget in future builds. ---------- assignee: ronaldoussoren components: Installation, Macintosh messages: 173108 nosy: Chris.Barker, ronaldoussoren priority: normal severity: normal status: open title: permissions wrong on Mac doc dir versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16256> _______________________________________ From report at bugs.python.org Wed Oct 17 01:16:29 2012 From: report at bugs.python.org (Ben Rousch) Date: Tue, 16 Oct 2012 23:16:29 +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: <1350429389.78.0.03399156336.issue16255@psf.upfronthosting.co.za> Ben Rousch added the comment: @rpetrov thanks for finding that - I was having trouble hunting down what the standard is. I think you're quoting from http://pubs.opengroup.org/onlinepubs/009695399/utilities/sh.html ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16255> _______________________________________ From report at bugs.python.org Wed Oct 17 01:20:01 2012 From: report at bugs.python.org (Matthew Barnett) Date: Tue, 16 Oct 2012 23:20:01 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1350429601.18.0.407551689054.issue16203@psf.upfronthosting.co.za> Matthew Barnett added the comment: I'm about to add this to my regex implementation and, naturally, I want it to have the same name for compatibility. However, I'm not that keen on "fullmatch" and would prefer "matchall" instead. What do you think? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16203> _______________________________________ From report at bugs.python.org Wed Oct 17 01:36:37 2012 From: report at bugs.python.org (Roger Serwy) Date: Tue, 16 Oct 2012 23:36:37 +0000 Subject: [issue16103] sys.stdin.readline 'unsupported' (IDLE 2.7.3, Win7, pythonw) In-Reply-To: <1349121673.49.0.0542189425732.issue16103@psf.upfronthosting.co.za> Message-ID: <1350430597.61.0.24373364589.issue16103@psf.upfronthosting.co.za> Roger Serwy added the comment: Terry, your idlelib directory is in an inconsistent state. IDLE 2.7.3 works well on Arch Linux. I rebuilt it from revision 70274d53c1dd. With and without a subprocess, IDLE's sys.stdin.readline works. Let's close this issue and focus on #9290. It's your decision to close. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16103> _______________________________________ From report at bugs.python.org Wed Oct 17 01:39:49 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 16 Oct 2012 23:39:49 +0000 Subject: [issue16250] URLError invoked with reason as filename In-Reply-To: <1350404293.01.0.800497532294.issue16250@psf.upfronthosting.co.za> Message-ID: <1350430789.06.0.988985822205.issue16250@psf.upfronthosting.co.za> Chris Jerdonek added the comment: For future reference, this affects 3.2 onwards. It probably makes sense to address this in the same branches in which we plan to address issue 16247 (currently set to 3.3 onwards). ---------- stage: -> needs patch versions: +Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16250> _______________________________________ From report at bugs.python.org Wed Oct 17 01:45:39 2012 From: report at bugs.python.org (Tim Peters) Date: Tue, 16 Oct 2012 23:45:39 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1350431139.44.0.929828636753.issue16203@psf.upfronthosting.co.za> Tim Peters added the comment: I like "matchall" fine, but I can't channel Guido on names - he sometimes gets those wrong ;-) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16203> _______________________________________ From report at bugs.python.org Wed Oct 17 01:49:27 2012 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 16 Oct 2012 23:49:27 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1350431139.44.0.929828636753.issue16203@psf.upfronthosting.co.za> Message-ID: <CAP7+vJKyqFmv5F18LJMTviZmwLvuWXO3z4deTnm82uDHKDnx0Q@mail.gmail.com> Guido van Rossum added the comment: re.matchall() would appear to be related to re.findall(), which it isn't. The re2 package has a FullMatch method: http://code.google.com/p/re2/wiki/CplusplusAPI ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16203> _______________________________________ From report at bugs.python.org Wed Oct 17 02:06:31 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 17 Oct 2012 00:06:31 +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: <1350432391.11.0.854113653501.issue16255@psf.upfronthosting.co.za> R. David Murray added the comment: We should do that, then, if /bin/sh doesn't exist. ---------- nosy: +gregory.p.smith type: crash -> behavior versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16255> _______________________________________ From report at bugs.python.org Wed Oct 17 02:13:45 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 17 Oct 2012 00:13:45 +0000 Subject: [issue16103] sys.stdin.readline 'unsupported' (IDLE 2.7.3, Win7, pythonw) In-Reply-To: <1349121673.49.0.0542189425732.issue16103@psf.upfronthosting.co.za> Message-ID: <1350432825.67.0.0178337200455.issue16103@psf.upfronthosting.co.za> Changes by Terry J. Reedy <tjreedy at udel.edu>: ---------- resolution: -> duplicate status: open -> closed superseder: -> IDLE and Command line present different behavior for sys.stdin _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16103> _______________________________________ From report at bugs.python.org Wed Oct 17 02:22:38 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 17 Oct 2012 00:22:38 +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: <1350433358.29.0.142295936689.issue16255@psf.upfronthosting.co.za> Changes by Chris Jerdonek <chris.jerdonek at gmail.com>: ---------- nosy: +asvetlov, chris.jerdonek _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16255> _______________________________________ From report at bugs.python.org Wed Oct 17 02:23:53 2012 From: report at bugs.python.org (Matthew Barnett) Date: Wed, 17 Oct 2012 00:23:53 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1350433433.87.0.983925567657.issue16203@psf.upfronthosting.co.za> Matthew Barnett added the comment: re2's FullMatch method contrasts with its PartialMatch method, which re doesn't have! ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16203> _______________________________________ From report at bugs.python.org Wed Oct 17 02:32:36 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 17 Oct 2012 00:32:36 +0000 Subject: [issue16252] bytes and bytearray methods are undocumented In-Reply-To: <1350414656.76.0.593225775655.issue16252@psf.upfronthosting.co.za> Message-ID: <1350433956.21.0.929337491597.issue16252@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16252> _______________________________________ From report at bugs.python.org Wed Oct 17 02:45:41 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 17 Oct 2012 00:45:41 +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: <1350434741.46.0.506927522971.issue16255@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I wouldn't blame android for this; I doubt Android claims to support whatever standard you are holding it to. It seems simple enough for us to make the default configurable (a public module level constant that anyone can override in their code after importing the module to change the default) or to otherwise query the system for where the default shell is at import time. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16255> _______________________________________ From report at bugs.python.org Wed Oct 17 03:00:26 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 17 Oct 2012 01:00:26 +0000 Subject: [issue16251] pickle special methods are looked up on the instance rather than the type In-Reply-To: <1350411894.01.0.763638555345.issue16251@psf.upfronthosting.co.za> Message-ID: <1350435626.76.0.69857640219.issue16251@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > It may still break some existing code, though > (especially for people using proxies). I agree this is a significant risk. Before any change gets made, it should be discussed on python-dev (especially if you intend on backporting the change). ---------- nosy: +rhettinger _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16251> _______________________________________ From report at bugs.python.org Wed Oct 17 03:08:49 2012 From: report at bugs.python.org (Eric Snow) Date: Wed, 17 Oct 2012 01:08:49 +0000 Subject: [issue16251] pickle special methods are looked up on the instance rather than the type In-Reply-To: <1350411894.01.0.763638555345.issue16251@psf.upfronthosting.co.za> Message-ID: <1350436129.1.0.520651055528.issue16251@psf.upfronthosting.co.za> Eric Snow added the comment: > Before any change gets made, it should be discussed on python-dev > (especially if you intend on backporting the change). Agreed. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16251> _______________________________________ From report at bugs.python.org Wed Oct 17 03:12:12 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 17 Oct 2012 01:12:12 +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: <1350436332.34.0.820528102799.issue16255@psf.upfronthosting.co.za> R. David Murray added the comment: Well, posix; but I was wrong about what posix required, as Roumen pointed out. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16255> _______________________________________ From report at bugs.python.org Wed Oct 17 04:02:07 2012 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 17 Oct 2012 02:02:07 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1350433433.87.0.983925567657.issue16203@psf.upfronthosting.co.za> Message-ID: <CAP7+vJKj=6h0OADO+weLRVZMexJQBzZw1REc47sduxjT2StrVA@mail.gmail.com> Guido van Rossum added the comment: But my other argument stands. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16203> _______________________________________ From report at bugs.python.org Wed Oct 17 04:17:00 2012 From: report at bugs.python.org (Matthew Barnett) Date: Wed, 17 Oct 2012 02:17:00 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1350440220.51.0.24421525689.issue16203@psf.upfronthosting.co.za> Matthew Barnett added the comment: OK, in order to avoid bikeshedding, "fullmatch" it is. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16203> _______________________________________ From report at bugs.python.org Wed Oct 17 04:18:11 2012 From: report at bugs.python.org (Trent Nelson) Date: Wed, 17 Oct 2012 02:18:11 +0000 Subject: [issue16257] test_socket.test_create_connection tests for wrong errno on Solaris Message-ID: <1350440291.72.0.895496145296.issue16257@psf.upfronthosting.co.za> New submission from Trent Nelson: ====================================================================== FAIL: test_create_connection (test.test_socket.NetworkConnectionNoServer) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/3.x.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/test/test_socket.py", line 4112, in test_create_connection self.assertEqual(cm.exception.errno, errno.ECONNREFUSED) AssertionError: 128 != 146 >>> errno.errorcode[128] 'ENETUNREACH' Needs a Solaris-specific exception. ---------- messages: 173123 nosy: trent priority: normal severity: normal status: open title: test_socket.test_create_connection tests for wrong errno on Solaris versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16257> _______________________________________ From report at bugs.python.org Wed Oct 17 04:19:55 2012 From: report at bugs.python.org (Trent Nelson) Date: Wed, 17 Oct 2012 02:19:55 +0000 Subject: [issue16258] test_local.TestEnUSCollection failures on Solaris 10 Message-ID: <1350440395.6.0.0364005495024.issue16258@psf.upfronthosting.co.za> New submission from Trent Nelson: ====================================================================== ERROR: test_strxfrm (test.test_locale.TestEnUSCollation) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/3.x.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/test/test_locale.py", line 346, in test_strxfrm self.assertLess(locale.strxfrm('a'), locale.strxfrm('b')) ValueError: character U+101010e is not in range [U+0000; U+10ffff] ====================================================================== ERROR: test_strxfrm_with_diacritic (test.test_locale.TestEnUSCollation) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/3.x.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/test/test_locale.py", line 367, in test_strxfrm_with_diacritic self.assertLess(locale.strxfrm('?'), locale.strxfrm('b')) ValueError: character U+101010e is not in range [U+0000; U+10ffff] ---------------------------------------------------------------------- Haven't investigated yet. ---------- messages: 173124 nosy: trent priority: normal severity: normal status: open title: test_local.TestEnUSCollection failures on Solaris 10 versions: Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16258> _______________________________________ From report at bugs.python.org Wed Oct 17 04:24:05 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 17 Oct 2012 02:24:05 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <1350440645.16.0.89770624373.issue16248@psf.upfronthosting.co.za> Ramchandra Apte added the comment: I made many mistakes in the original bug report. Here is a fixed one: Because Lib/tkinter/__init__.py:1801 uses exec to execute code from a file, it has a security bug. It searches for the file in the home dir. Apparently, on my system, the $HOME variable is the same as the non-root one when running Python with root privileges using sudo. Steps to reproduce: create a file called .Tk.py in your home folder Whatever code is in that file will be executed. run these three lines of code in Python using sudo: import tkinter w = tkinter.Tk() And the code in the .Tk.py will be executed (unless if you change the baseName for the Tk object) There may be similar ways of running Python with root privileges preserving the environment variables in other OS'es Using Kubuntu Linux (variant of Ubuntu Linux) 12.04 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16248> _______________________________________ From report at bugs.python.org Wed Oct 17 05:08:17 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 17 Oct 2012 03:08:17 +0000 Subject: [issue16257] test_socket.test_create_connection tests for wrong errno on Solaris In-Reply-To: <1350440291.72.0.895496145296.issue16257@psf.upfronthosting.co.za> Message-ID: <1350443297.89.0.81613646907.issue16257@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16257> _______________________________________ From report at bugs.python.org Wed Oct 17 05:08:51 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 17 Oct 2012 03:08:51 +0000 Subject: [issue16258] test_local.TestEnUSCollection failures on Solaris 10 In-Reply-To: <1350440395.6.0.0364005495024.issue16258@psf.upfronthosting.co.za> Message-ID: <1350443331.89.0.908986606238.issue16258@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16258> _______________________________________ From report at bugs.python.org Wed Oct 17 05:26:34 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 17 Oct 2012 03:26:34 +0000 Subject: [issue16259] Replace exec() in test.regrtest with __import__ Message-ID: <1350444394.63.0.4278126209.issue16259@psf.upfronthosting.co.za> New submission from Ramchandra Apte: In Lib/test/regrtest.py:1336 , exec is used to import an module. I think it could be replaced with an __import__ call. ---------- components: Library (Lib) messages: 173126 nosy: ramchandra.apte priority: normal severity: normal status: open title: Replace exec() in test.regrtest with __import__ _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16259> _______________________________________ From report at bugs.python.org Wed Oct 17 05:52:04 2012 From: report at bugs.python.org (Todd Rovito) Date: Wed, 17 Oct 2012 03:52:04 +0000 Subject: [issue12913] Add a debugging howto In-Reply-To: <1315323088.65.0.459623812563.issue12913@psf.upfronthosting.co.za> Message-ID: <1350445924.23.0.340846620926.issue12913@psf.upfronthosting.co.za> Todd Rovito added the comment: I think this is an excellent idea. How about putting in some advanced debugging with IDLE? For example I have read somewhere that IDLE lets you set break points but the documentation for IDLE OS not that clear on debugging. ---------- nosy: +Todd.Rovito _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12913> _______________________________________ From report at bugs.python.org Wed Oct 17 05:55:11 2012 From: report at bugs.python.org (Eric Snow) Date: Wed, 17 Oct 2012 03:55:11 +0000 Subject: [issue16259] Replace exec() in test.regrtest with __import__ In-Reply-To: <1350444394.63.0.4278126209.issue16259@psf.upfronthosting.co.za> Message-ID: <1350446111.63.0.841530679464.issue16259@psf.upfronthosting.co.za> Eric Snow added the comment: Rather, importlib.import_module(). :) ---------- nosy: +eric.snow _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16259> _______________________________________ From report at bugs.python.org Wed Oct 17 05:56:18 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 17 Oct 2012 03:56:18 +0000 Subject: [issue12913] Add a debugging howto In-Reply-To: <1315323088.65.0.459623812563.issue12913@psf.upfronthosting.co.za> Message-ID: <1350446178.57.0.58261060892.issue12913@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Right-click to open a menu in which you can set a breakpoint. I don't think debugging in IDLE needs a tutorial. (except the setting breakpoint thing should be documented. ---------- nosy: +ramchandra.apte _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12913> _______________________________________ From report at bugs.python.org Wed Oct 17 06:38:16 2012 From: report at bugs.python.org (Larry Hastings) Date: Wed, 17 Oct 2012 04:38:16 +0000 Subject: [issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS) In-Reply-To: <1345515355.02.0.72747216818.issue15745@psf.upfronthosting.co.za> Message-ID: <1350448696.66.0.285548158717.issue15745@psf.upfronthosting.co.za> Larry Hastings added the comment: You're a sneaky, naughty bunny. "posix._have_functions" indeed! I guess your back was to the wall. 1) If I follow your code correctly, when one has utimensat, the assertLess calls using _t consider st0.st_mtime_ns < st1.st_mtime_ns even if the left operand is (2e18-1) greater than the right. It divides both operands by 1e9, then checks whether their delta is < 2e9. In nanoseconds, 2e18-1 is roughly 63.5 years. The case where one doesn't have utimensat but do have utimens is similarly generous. Little wonder the test now passes! Could you narrow down the range a little? 2) I'd prefer if you amended the comment rather than remove it, perhaps adding # (assuming your read and write functions both take the same units, # which isn't true on all platforms--some Solaris and FreeBSD versions # can read ns time but can only write ms time) 3) Could you please find better names than "_t", "l", and "r"? 4) In the future, please upload a patch as an attached file rather than as an inline comment. This will permit me to use the bug tracker's built-in Reitveld to examine the diff, which is more comfortable and permits inline comments. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15745> _______________________________________ From report at bugs.python.org Wed Oct 17 07:46:34 2012 From: report at bugs.python.org (Trent Nelson) Date: Wed, 17 Oct 2012 05:46:34 +0000 Subject: [issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS) In-Reply-To: <1345515355.02.0.72747216818.issue15745@psf.upfronthosting.co.za> Message-ID: <1350452794.13.0.0143785340066.issue15745@psf.upfronthosting.co.za> Trent Nelson added the comment: Thanks for the feedback Larry; yeah that patch definitely wasn't intended to be "production quality" -- more of a proof of concept. I agree with your points, they'll be factored into the next patch. However, I'm absolutely baffled by the Solaris 10 failure. The more I looked into it, the weirder it got. The issue is always the same: self.assertEqual(attr(st0, "st_mtime"), attr(st1, "st_mtime")) AssertionError: 1347752941.275297 != 1347752941.275296 That is, test_utime() always results in a st1.st_mtime that is "off-by-1" from st0.st_mtime. The precision is well within the nanasecond resolution offered by utimensat, so it doesn't appear to be the same issue experienced by other platforms. I'll have to break into the debugger again and see what's going on. Side note: I noticed this comment/code just above _test_utime(): def test_utime_dir(self): delta = 1000000 st = os.stat(support.TESTFN) # round to int, because some systems may support sub-second # time stamps in stat, but not in utime. os.utime(support.TESTFN, (st.st_atime, int(st.st_mtime-delta))) st2 = os.stat(support.TESTFN) self.assertEqual(st2.st_mtime, int(st.st_mtime-delta)) That... seems to (albeit vaguely) describe what's going on here with Solaris 10. I also noticed support.TESTFN is actually a directory in this test case. Again, I'm not sure how that fits in with test_utime_dir() versus a second invocation of _test_utime(support.TESTFN) from test_utime(). test_utime_dir() is ultra-lax, test_utime() is ultra-strict, I'm not sure which one should be updated to match the other. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15745> _______________________________________ From report at bugs.python.org Wed Oct 17 07:52:56 2012 From: report at bugs.python.org (Trent Nelson) Date: Wed, 17 Oct 2012 05:52:56 +0000 Subject: [issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS) In-Reply-To: <1345515355.02.0.72747216818.issue15745@psf.upfronthosting.co.za> Message-ID: <1350453176.53.0.689017574773.issue15745@psf.upfronthosting.co.za> Trent Nelson added the comment: Oh, and another "quirk" I noticed yesterday. I usually religiously disable atime on all my filesystems. For whatever reason, it's not disabled on this Solaris 10 box. Turns out os.stat() was updating st_atime, which kind of throws a spanner in the works for all our st_atime tests in _test_utime() -- we call os.stat() after utime() to check that our atime update worked -- but the stat call results in another st_atime update. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15745> _______________________________________ From report at bugs.python.org Wed Oct 17 07:57:18 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Oct 2012 05:57:18 +0000 Subject: [issue16160] subclassing types.SimpleNamespace does not work In-Reply-To: <1349658607.29.0.0643105543226.issue16160@psf.upfronthosting.co.za> Message-ID: <3XhN2P5KyzzPY3@mail.python.org> Roundup Robot added the comment: New changeset c5124145e79e by Eric Snow in branch '3.3': Close #16160: Subclass support now works for types.SimpleNamespace. Thanks to RDM for noticing. http://hg.python.org/cpython/rev/c5124145e79e New changeset 47b9732696eb by Eric Snow in branch 'default': merge for issue #16160: Subclass support now works for types.SimpleNamespace. http://hg.python.org/cpython/rev/47b9732696eb ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16160> _______________________________________ From report at bugs.python.org Wed Oct 17 08:10:26 2012 From: report at bugs.python.org (Ned Deily) Date: Wed, 17 Oct 2012 06:10:26 +0000 Subject: [issue16256] permissions wrong on Mac doc dir In-Reply-To: <1350428962.56.0.21849680877.issue16256@psf.upfronthosting.co.za> Message-ID: <1350454226.96.0.676001510102.issue16256@psf.upfronthosting.co.za> Changes by Ned Deily <nad at acm.org>: ---------- assignee: ronaldoussoren -> ned.deily nosy: +ned.deily _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16256> _______________________________________ From report at bugs.python.org Wed Oct 17 08:31:48 2012 From: report at bugs.python.org (Ned Deily) Date: Wed, 17 Oct 2012 06:31:48 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1346632042.85.0.745944196118.issue15853@psf.upfronthosting.co.za> Message-ID: <1350455508.13.0.178166281678.issue15853@psf.upfronthosting.co.za> Ned Deily added the comment: I'm still not keen on working around a Tk crash by modifying IDLE especially when we know exactly which Tk change set caused the regression. On the other hand, I sympathize with Kevin regarding the complexity of trying to track down and fix things involving event loops spanning Cocoa, Tk, Python, and IDLE and I do appreciate the effort you've put into debugging this and other Tk problems. Thank you, Kevin. So, if we're going to take the expedient approach, we need to come up with proper patches for 2.7, 3.2, 3.3, and default and then we need to test them for regressions with our other major supported platforms: Windows, some set of X11, OS X Carbon Tk 8.4, as well as the Cocoa Tk 8.5. I can test the latter two. I'd appreciate it if others could test the other platforms. Roger, do you feel up to turning your suggestions into patches? Once we're comfortable that the workaround works and doesn't cause other regressions, I can bug the ActiveState folks to push out a new release of ActiveTcl with fixes for some other problems and these fixes can go out in the next set of Python maintenance releases that should be coming up in the near future. ---------- stage: -> needs patch versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15853> _______________________________________ From report at bugs.python.org Wed Oct 17 08:55:32 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 17 Oct 2012 06:55:32 +0000 Subject: [issue10836] urllib.request.urlretrieve calls URLError with 3 args In-Reply-To: <1294252036.56.0.144119584231.issue10836@psf.upfronthosting.co.za> Message-ID: <1350456932.69.0.259522398611.issue10836@psf.upfronthosting.co.za> Senthil Kumaran added the comment: @Ezio, regarding msg172988. That's embarrassing. It should be fixed soon. Review on the patch, how about having the strerror and filename from the exception? - raise URLError(e.errno, e.strerror, e.filename) + raise URLError(e.strerror, e.filename) I believe, that could have been the original intention which got overlooked. And yes to fixing the other URLError msg related issues too, with just changing to single msg first, instead of wrongly sending the filename. ---------- assignee: orsenthil -> _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10836> _______________________________________ From report at bugs.python.org Wed Oct 17 09:06:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2012 07:06:53 +0000 Subject: [issue15581] curses: segfault in addstr() In-Reply-To: <1344393356.61.0.716752115095.issue15581@psf.upfronthosting.co.za> Message-ID: <1350457613.75.0.394509868037.issue15581@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is output an unicode string? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15581> _______________________________________ From report at bugs.python.org Wed Oct 17 09:35:58 2012 From: report at bugs.python.org (Ned Deily) Date: Wed, 17 Oct 2012 07:35:58 +0000 Subject: [issue15298] _sysconfigdata is generated in srcdir, not builddir In-Reply-To: <1341782776.55.0.708234468774.issue15298@psf.upfronthosting.co.za> Message-ID: <1350459358.22.0.467910806216.issue15298@psf.upfronthosting.co.za> Ned Deily added the comment: There seems to be a bootstrap issue here. Building with ./configure --with-pydebug --prefix=... on OS X in a clean source directory (hg purge --all), 'make' makes it to building the static libpython .a but then dies on the sysconfig generate-posix-vars step: ar rc libpython3.4dm.a Modules/_threadmodule.o Modules/signalmodule.o Modules/posixmodule.o Modules/errnomodule.o Modules/pwdmodule.o Modules/_sre.o Modules/_codecsmodule.o Modules/_weakref.o Modules/_functoolsmodule.o Modules/operator.o Modules/_collectionsmodule.o Modules/itertoolsmodule.o Modules/_localemodule.o Modules/_iomodule.o Modules/iobase.o Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o Modules/textio.o Modules/stringio.o Modules/zipimport.o Modules/faulthandler.o Modules/symtablemodule.o Modules/xxsubtype.o /usr/bin/ranlib: file: libpython3.4dm.a(dynamic_annotations.o) has no symbols /usr/bin/ranlib: file: libpython3.4dm.a(pymath.o) has no symbols ranlib libpython3.4dm.a ranlib: file: libpython3.4dm.a(dynamic_annotations.o) has no symbols ranlib: file: libpython3.4dm.a(pymath.o) has no symbols /usr/bin/clang -framework CoreFoundation -o python Modules/python.o libpython3.4dm.a -ldl -framework CoreFoundation ./python -E -S -m sysconfig --generate-posix-vars Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] Traceback (most recent call last): File "/py/dev/default/b10.7_t10.7_x4.3_cclang_d/unix/source/Lib/runpy.py", line 160, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/py/dev/default/b10.7_t10.7_x4.3_cclang_d/unix/source/Lib/runpy.py", line 73, in _run_code exec(code, run_globals) File "/py/dev/default/b10.7_t10.7_x4.3_cclang_d/unix/source/Lib/sysconfig.py", line 683, in <module> _main() File "/py/dev/default/b10.7_t10.7_x4.3_cclang_d/unix/source/Lib/sysconfig.py", line 671, in _main _generate_posix_vars() File "/py/dev/default/b10.7_t10.7_x4.3_cclang_d/unix/source/Lib/sysconfig.py", line 374, in _generate_posix_vars pybuilddir = 'build/lib.%s-%s' % (get_platform(), sys.version[:3]) File "/py/dev/default/b10.7_t10.7_x4.3_cclang_d/unix/source/Lib/sysconfig.py", line 651, in get_platform get_config_vars(), File "/py/dev/default/b10.7_t10.7_x4.3_cclang_d/unix/source/Lib/sysconfig.py", line 520, in get_config_vars _init_posix(_CONFIG_VARS) File "/py/dev/default/b10.7_t10.7_x4.3_cclang_d/unix/source/Lib/sysconfig.py", line 393, in _init_posix from _sysconfigdata import build_time_vars ImportError: No module named '_sysconfigdata' ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15298> _______________________________________ From report at bugs.python.org Wed Oct 17 09:43:19 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 17 Oct 2012 07:43: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: <1350459799.87.0.943786357583.issue16248@psf.upfronthosting.co.za> Changes by Ramchandra Apte <maniandram01 at gmail.com>: ---------- title: Security bug in tkinter allows for untrusted code execution. -> Security bug in tkinter allows for untrusted, arbitrary code execution. _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16248> _______________________________________ From report at bugs.python.org Wed Oct 17 10:02:43 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 17 Oct 2012 08:02:43 +0000 Subject: [issue16260] change bare except in locale.py Message-ID: <1350460963.18.0.317835294303.issue16260@psf.upfronthosting.co.za> New submission from Ramchandra Apte: In Lib/locale.py:1860 , a bare except is used. It should be replaced with "except Error" as the setlocale() function raises `Error` if an error occurs. ---------- components: Library (Lib) messages: 173138 nosy: ramchandra.apte priority: normal severity: normal status: open title: change bare except in locale.py _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16260> _______________________________________ From report at bugs.python.org Wed Oct 17 10:04:58 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 17 Oct 2012 08:04:58 +0000 Subject: [issue16260] change bare except in locale.py In-Reply-To: <1350460963.18.0.317835294303.issue16260@psf.upfronthosting.co.za> Message-ID: <1350461098.63.0.110045376523.issue16260@psf.upfronthosting.co.za> Ramchandra Apte added the comment: I am going to file a new bug for fixing the bare excepts in the std lib. ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16260> _______________________________________ From report at bugs.python.org Wed Oct 17 10:06:05 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 17 Oct 2012 08:06:05 +0000 Subject: [issue16261] Fix bare excepts in various places in std lib Message-ID: <1350461165.29.0.129000928595.issue16261@psf.upfronthosting.co.za> New submission from Ramchandra Apte: Will attach patch. ---------- components: Library (Lib) messages: 173140 nosy: ramchandra.apte priority: normal severity: normal status: open title: Fix bare excepts in various places in std lib _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16261> _______________________________________ From report at bugs.python.org Wed Oct 17 10:08:33 2012 From: report at bugs.python.org (Trent Nelson) Date: Wed, 17 Oct 2012 08:08:33 +0000 Subject: [issue15298] _sysconfigdata is generated in srcdir, not builddir In-Reply-To: <1341782776.55.0.708234468774.issue15298@psf.upfronthosting.co.za> Message-ID: <1350461313.98.0.0507945211334.issue15298@psf.upfronthosting.co.za> Trent Nelson added the comment: Ah, this is because of this OS X-specific snippet in sysconfig.get_platform(): elif osname[:6] == "darwin": import _osx_support osname, release, machine = _osx_support.get_platform_osx( get_config_vars(), osname, release, machine) get_config_vars() results in _init_posix() eventually being called, which attempts to import _sysconfigdata. Ugh. Looking into a patch now. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15298> _______________________________________ From report at bugs.python.org Wed Oct 17 10:22:46 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Wed, 17 Oct 2012 08:22:46 +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: <1350462166.2.0.392276384343.issue16194@psf.upfronthosting.co.za> V?clav ?milauer added the comment: Yes, that's what I suggested at the end of msg172656 - including modulename in the key. Brett, would it be OK if I make patch against 3.3 (or head, if you prefer) to key by (modulename,filename) for compiled modules? I had a look at importlib.machinery.ExtensionFileLoader and it will suffer from the same issue. Should I open a separate bug for the post-3.3 patch, and keep this as documentation bug for 2.7? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16194> _______________________________________ From report at bugs.python.org Wed Oct 17 10:24:59 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Oct 2012 08:24:59 +0000 Subject: [issue15298] _sysconfigdata is generated in srcdir, not builddir In-Reply-To: <1341782776.55.0.708234468774.issue15298@psf.upfronthosting.co.za> Message-ID: <3XhRJq0fqLzMHG@mail.python.org> Roundup Robot added the comment: New changeset 66959d419369 by Trent Nelson in branch '3.3': Issue #15298: fix an OS X bootstrap issue with _sysconfigdata.py. http://hg.python.org/cpython/rev/66959d419369 New changeset 429774e8d9f9 by Trent Nelson in branch 'default': Merge issue #15298: fix an OS X bootstrap issue with _sysconfigdata.py. http://hg.python.org/cpython/rev/429774e8d9f9 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15298> _______________________________________ From report at bugs.python.org Wed Oct 17 10:46:39 2012 From: report at bugs.python.org (devurandom) Date: Wed, 17 Oct 2012 08:46:39 +0000 Subject: [issue15483] CROSS: initialise include and library paths in setup.py In-Reply-To: <1343554833.66.0.976178324221.issue15483@psf.upfronthosting.co.za> Message-ID: <1350463599.38.0.0648410300826.issue15483@psf.upfronthosting.co.za> Changes by devurandom <devurandom at gmx.net>: ---------- nosy: +devurandom _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15483> _______________________________________ From report at bugs.python.org Wed Oct 17 10:46:49 2012 From: report at bugs.python.org (devurandom) Date: Wed, 17 Oct 2012 08:46:49 +0000 Subject: [issue3754] cross-compilation support for python build In-Reply-To: <1220305759.82.0.468834426074.issue3754@psf.upfronthosting.co.za> Message-ID: <1350463609.92.0.366541645831.issue3754@psf.upfronthosting.co.za> Changes by devurandom <devurandom at gmx.net>: ---------- nosy: +devurandom _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue3754> _______________________________________ From report at bugs.python.org Wed Oct 17 10:46:57 2012 From: report at bugs.python.org (devurandom) Date: Wed, 17 Oct 2012 08:46:57 +0000 Subject: [issue15484] CROSS: use _PYTHON_PROJECT_BASE in distutils sysconfig In-Reply-To: <1343555002.08.0.568710473474.issue15484@psf.upfronthosting.co.za> Message-ID: <1350463617.08.0.937999385383.issue15484@psf.upfronthosting.co.za> Changes by devurandom <devurandom at gmx.net>: ---------- nosy: +devurandom _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15484> _______________________________________ From report at bugs.python.org Wed Oct 17 10:46:59 2012 From: report at bugs.python.org (devurandom) Date: Wed, 17 Oct 2012 08:46:59 +0000 Subject: [issue15268] curses configure checks fail if only /usr/include/ncursesw/curses.h is installed In-Reply-To: <1341623074.57.0.341676091224.issue15268@psf.upfronthosting.co.za> Message-ID: <1350463619.47.0.607390607581.issue15268@psf.upfronthosting.co.za> Changes by devurandom <devurandom at gmx.net>: ---------- nosy: +devurandom _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15268> _______________________________________ From report at bugs.python.org Wed Oct 17 10:47:19 2012 From: report at bugs.python.org (devurandom) Date: Wed, 17 Oct 2012 08:47:19 +0000 Subject: [issue15298] _sysconfigdata is generated in srcdir, not builddir In-Reply-To: <1341782776.55.0.708234468774.issue15298@psf.upfronthosting.co.za> Message-ID: <1350463639.47.0.745464261372.issue15298@psf.upfronthosting.co.za> Changes by devurandom <devurandom at gmx.net>: ---------- nosy: +devurandom _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15298> _______________________________________ From report at bugs.python.org Wed Oct 17 10:47:22 2012 From: report at bugs.python.org (devurandom) Date: Wed, 17 Oct 2012 08:47:22 +0000 Subject: [issue14598] _cursesmodule.c fails with ncurses-5.9 on Linux In-Reply-To: <1334593853.62.0.710921461264.issue14598@psf.upfronthosting.co.za> Message-ID: <1350463642.84.0.892143162007.issue14598@psf.upfronthosting.co.za> Changes by devurandom <devurandom at gmx.net>: ---------- nosy: +devurandom _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14598> _______________________________________ From report at bugs.python.org Wed Oct 17 10:49:44 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Oct 2012 08:49:44 +0000 Subject: [issue15819] Unable to build Python out-of-tree when source tree is readonly. In-Reply-To: <1346309362.14.0.312540957077.issue15819@psf.upfronthosting.co.za> Message-ID: <3XhRsM4WfLzMBv@mail.python.org> Roundup Robot added the comment: New changeset 7e879a453bb3 by Trent Nelson in branch '2.7': Issue #15819: use standard autoconf preset output variables. http://hg.python.org/cpython/rev/7e879a453bb3 New changeset 65b3c41052b6 by Trent Nelson in branch '3.2': Issue #15819: use standard autoconf preset output variables. http://hg.python.org/cpython/rev/65b3c41052b6 New changeset b78e97b84f35 by Trent Nelson in branch '3.3': Issue #15819: use standard autoconf preset output variables. http://hg.python.org/cpython/rev/b78e97b84f35 New changeset f9eb516bea88 by Trent Nelson in branch 'default': Issue #15819: use standard autoconf preset output variables. http://hg.python.org/cpython/rev/f9eb516bea88 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15819> _______________________________________ From report at bugs.python.org Wed Oct 17 10:58:58 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2012 08:58:58 +0000 Subject: [issue15581] curses: segfault in addstr() In-Reply-To: <1344393356.61.0.716752115095.issue15581@psf.upfronthosting.co.za> Message-ID: <1350464338.28.0.986168725951.issue15581@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Seems the bug was fixed for 3.3 in issue12567. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15581> _______________________________________ From report at bugs.python.org Wed Oct 17 11:01:26 2012 From: report at bugs.python.org (Matthias Klose) Date: Wed, 17 Oct 2012 09:01:26 +0000 Subject: [issue16262] srcdir != builddir builds fail, if hg is not installed Message-ID: <1350464486.47.0.189031527493.issue16262@psf.upfronthosting.co.za> New submission from Matthias Klose: seen with the 3.3 branch and the trunk: also, I think using python now unconditionally breaks the cross builds, so this should call PYTHON_FOR_BUILD, not python. /bin/mkdir -p Include hg: no-repository, python: found! cannot run ../Parser/asdl_c.py -h Include ../Parser/Python.asdl /bin/mkdir -p Python hg: no-repository, python: found! cannot run ../Parser/asdl_c.py -c Python ../Parser/Python.asdl gcc -pthread -c -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fprofile-generate -g -flto -fuse-linker-plugin -IObjects -IInclude -IPython -I. -IInclude -I../Include -D_FORTIFY_SOURCE=2 -DPy_BUILD_CORE -o Python/Python-ast.o Python/Python-ast.c gcc: error: Python/Python-ast.c: No such file or directory gcc: fatal error: no input files compilation terminated. make[3]: *** [Python/Python-ast.o] Error 4 ---------- messages: 173146 nosy: doko priority: normal severity: normal status: open title: srcdir != builddir builds fail, if hg is not installed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16262> _______________________________________ From report at bugs.python.org Wed Oct 17 11:11:34 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2012 09:11:34 +0000 Subject: [issue13617] Reject embedded null characters in wchar* strings In-Reply-To: <1324094022.4.0.746327138354.issue13617@psf.upfronthosting.co.za> Message-ID: <1350465094.03.0.277177061593.issue13617@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I added some comments in Rietveld. I see other instances of the use of non-checked PyUnicode_AsWideCharString() and PyUnicode_AsUnicode(). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13617> _______________________________________ From report at bugs.python.org Wed Oct 17 11:49:30 2012 From: report at bugs.python.org (Larry Hastings) Date: Wed, 17 Oct 2012 09:49:30 +0000 Subject: [issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS) In-Reply-To: <1345515355.02.0.72747216818.issue15745@psf.upfronthosting.co.za> Message-ID: <1350467370.14.0.180846505886.issue15745@psf.upfronthosting.co.za> Larry Hastings added the comment: I don't know POSIX / UNIX all that well. Does it require that a stat call updates atime? Because that's one of those "how does it ever work" head-scratchers. (Maybe everybody always disables atime these days? I don't think I do.) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15745> _______________________________________ From report at bugs.python.org Wed Oct 17 11:55:56 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Oct 2012 09:55:56 +0000 Subject: [issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS) In-Reply-To: <1350467370.14.0.180846505886.issue15745@psf.upfronthosting.co.za> Message-ID: <1350467647.3398.1.camel@localhost.localdomain> Antoine Pitrou added the comment: > I don't know POSIX / UNIX all that well. Does it require that a stat > call updates atime? Because that's one of those "how does it ever > work" head-scratchers. (Maybe everybody always disables atime these > days? I don't think I do.) I think most Linux distributions disable it for you; or, rather, they use the "relatime" mount option which is a smart cheat: relatime Update inode access times relative to modify or change time. Access time is only updated if the previous access time was earlier than the current modify or change time. (Similar to noatime, but doesn't break mutt or other applications that need to know if a file has been read since the last time it was modified.) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15745> _______________________________________ From report at bugs.python.org Wed Oct 17 11:57:37 2012 From: report at bugs.python.org (Trent Nelson) Date: Wed, 17 Oct 2012 09:57:37 +0000 Subject: [issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS) In-Reply-To: <1345515355.02.0.72747216818.issue15745@psf.upfronthosting.co.za> Message-ID: <1350467857.72.0.726644251785.issue15745@psf.upfronthosting.co.za> Trent Nelson added the comment: Re: "how did it ever work"... on Solaris, because of the st_mtime failure, it doesn't even get a chance to fail on the subsequent st_atime. I suspect the only platform that's exercised the utimensat() to date is Linux, and either a) os.stat() doesn't affect atime on Linux, b) everyone has atime disabled, c) the two stat calls happen quick enough that no measurable difference is observed against st_atime. As for POSIX: http://pubs.opengroup.org/onlinepubs/9699919799/toc.htm "The fstat() function shall update any time-related fields (as described in XBD File Times Update ), before writing into the stat structure." The referenced section: 4.8 File Times Update Each file has three distinct associated timestamps: the time of last data access, the time of last data modification, and the time the file status last changed. These values are returned in the file characteristics structure struct stat, as described in <sys/stat.h> . Each function or utility in POSIX.1-2008 that reads or writes data (even if the data does not change) or performs an operation to change file status (even if the file status does not change) indicates which of the appropriate timestamps shall be marked for update. If an implementation of such a function or utility marks for update one of these timestamps in a place or time not specified by POSIX.1-2008, this shall be documented, except that any changes caused by pathname resolution need not be documented. For the other functions or utilities in POSIX.1-2008 (those that are not explicitly required to read or write file data or change file status, but that in some implementations happen to do so), the effect is unspecified. An implementation may update timestamps that are marked for update immediately, or it may update such timestamps periodically. At the point in time when an update occurs, any marked timestamps shall be set to the current time and the update marks shall be cleared. All timestamps that are marked for update shall be updated when the file ceases to be open by any process or before a fstat(), fstatat(), fsync(), futimens(), lstat(), stat(), utime(), utimensat(), or utimes() is successfully performed on the file. Other times at which updates are done are unspecified. Marks for update, and updates themselves, shall not be done for files on read-only file systems; see Read-Only File System . The resolution of timestamps of files in a file system is implementation-defined, but shall be no coarser than one-second resolution. The three timestamps shall always have values that are supported by the file system. Whenever any of a file's timestamps are to be set to a value V according to the rules of the preceding paragraphs of this section, the implementation shall immediately set the timestamp to the greatest value supported by the file system that is not greater than V. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15745> _______________________________________ From report at bugs.python.org Wed Oct 17 12:05:21 2012 From: report at bugs.python.org (Trent Nelson) Date: Wed, 17 Oct 2012 10:05:21 +0000 Subject: [issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS) In-Reply-To: <1345515355.02.0.72747216818.issue15745@psf.upfronthosting.co.za> Message-ID: <1350468321.81.0.661050926246.issue15745@psf.upfronthosting.co.za> Trent Nelson added the comment: Here's a thought... why not alter the test to work with fixed times and separate the atime tests from the mtime tests. For atime, we can set utime(filename, (0.0, ...)) and see if a subsequent os.stat() returns st_atime as 0.0 -- that'll tell us whether or not atime is affected. For the mtime tests, rather than having a variable UTIME_EPSILON, just have fixed dates that match the expected precision of the underlying platform? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15745> _______________________________________ From report at bugs.python.org Wed Oct 17 12:16:15 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Oct 2012 10:16:15 +0000 Subject: [issue16257] test_socket.test_create_connection tests for wrong errno on Solaris In-Reply-To: <1350440291.72.0.895496145296.issue16257@psf.upfronthosting.co.za> Message-ID: <3XhTnB32FXzM1p@mail.python.org> Roundup Robot added the comment: New changeset b5fa9d8603b6 by Trent Nelson in branch '3.2': Issue #16257: make test_create_connection() handle ENETUNREACH. http://hg.python.org/cpython/rev/b5fa9d8603b6 New changeset 6a938ce6315c by Trent Nelson in branch '3.3': Issue #16257: make test_create_connection() handle ENETUNREACH. http://hg.python.org/cpython/rev/6a938ce6315c New changeset 37a59bd23578 by Trent Nelson in branch 'default': Issue #16257: make test_create_connection() handle ENETUNREACH. http://hg.python.org/cpython/rev/37a59bd23578 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16257> _______________________________________ From report at bugs.python.org Wed Oct 17 12:17:17 2012 From: report at bugs.python.org (Trent Nelson) Date: Wed, 17 Oct 2012 10:17:17 +0000 Subject: [issue16257] test_socket.test_create_connection tests for wrong errno on Solaris In-Reply-To: <1350440291.72.0.895496145296.issue16257@psf.upfronthosting.co.za> Message-ID: <1350469037.59.0.189422018507.issue16257@psf.upfronthosting.co.za> Changes by Trent Nelson <trent at snakebite.org>: ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16257> _______________________________________ From report at bugs.python.org Wed Oct 17 12:18:57 2012 From: report at bugs.python.org (Matthias Klose) Date: Wed, 17 Oct 2012 10:18:57 +0000 Subject: [issue16262] srcdir != builddir builds fail, if hg is not installed In-Reply-To: <1350464486.47.0.189031527493.issue16262@psf.upfronthosting.co.za> Message-ID: <1350469137.48.0.644475770611.issue16262@psf.upfronthosting.co.za> Matthias Klose added the comment: looking at the unused subprocess import in asdl_c.py, maybe some call-outs to svn/hg were made in the past? the patch removes the check for hg for the asdl.[ch] builds, and sets ADSLGEN to a appropriate python interpreter if one is found. fixes the build for src != build; the cross build wasn't affected, we can build with any python version. ---------- keywords: +needs review, patch Added file: http://bugs.python.org/file27600/asdlgen.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16262> _______________________________________ From report at bugs.python.org Wed Oct 17 12:21:45 2012 From: report at bugs.python.org (Trent Nelson) Date: Wed, 17 Oct 2012 10:21:45 +0000 Subject: [issue16263] sendmsg, recvmsg, recvmsg_into et al not being detected on Solaris Message-ID: <1350469305.65.0.493434149752.issue16263@psf.upfronthosting.co.za> New submission from Trent Nelson: Sample test_socket -v output: testSendmsgDataGenerator (test.test_socket.SendmsgUDPTest) ... skipped "don't have sendmsg" testSendmsgExcessCmsgReject (test.test_socket.SendmsgUDPTest) ... skipped "don't have sendmsg" testSendmsgGather (test.test_socket.SendmsgUDPTest) ... skipped "don't have sendmsg" testSendmsgNoDestAddr (test.test_socket.SendmsgUDPTest) ... skipped "don't have sendmsg" testRecvmsg (test.test_socket.RecvmsgUDPTest) ... skipped "don't have recvmsg" testRecvmsgAfterClose (test.test_socket.RecvmsgUDPTest) ... skipped "don't have recvmsg" testRecvmsgBadArgs (test.test_socket.RecvmsgUDPTest) ... skipped "don't have recvmsg" This is on the Solaris 10 box. sendmsg/recvmsg etc definitely exist. Haven't investigated yet. ---------- assignee: trent messages: 173154 nosy: jcea, trent priority: normal severity: normal status: open title: sendmsg, recvmsg, recvmsg_into et al not being detected on Solaris versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16263> _______________________________________ From report at bugs.python.org Wed Oct 17 12:37:28 2012 From: report at bugs.python.org (Matthias Klose) Date: Wed, 17 Oct 2012 10:37:28 +0000 Subject: [issue16262] srcdir != builddir builds fail, if hg is not installed In-Reply-To: <1350464486.47.0.189031527493.issue16262@psf.upfronthosting.co.za> Message-ID: <1350470248.62.0.992178378755.issue16262@psf.upfronthosting.co.za> Matthias Klose added the comment: r71315 did remove the call-out to hg, so it looks safe to not check for hg in ASDLGEN. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16262> _______________________________________ From report at bugs.python.org Wed Oct 17 12:39:02 2012 From: report at bugs.python.org (Matthias Klose) Date: Wed, 17 Oct 2012 10:39:02 +0000 Subject: [issue16262] srcdir != builddir builds fail, if hg is not installed In-Reply-To: <1350464486.47.0.189031527493.issue16262@psf.upfronthosting.co.za> Message-ID: <1350470342.03.0.445881121094.issue16262@psf.upfronthosting.co.za> Matthias Klose added the comment: typo, r71375 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16262> _______________________________________ From report at bugs.python.org Wed Oct 17 12:40:36 2012 From: report at bugs.python.org (Matthias Klose) Date: Wed, 17 Oct 2012 10:40:36 +0000 Subject: [issue16262] srcdir != builddir builds fail, if hg is not installed In-Reply-To: <1350464486.47.0.189031527493.issue16262@psf.upfronthosting.co.za> Message-ID: <1350470436.47.0.60494495391.issue16262@psf.upfronthosting.co.za> Changes by Matthias Klose <doko at debian.org>: ---------- components: +Build versions: +Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16262> _______________________________________ From report at bugs.python.org Wed Oct 17 13:00:46 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Oct 2012 11:00:46 +0000 Subject: [issue16264] test_logging failure on Windows 7 buildbot Message-ID: <1350471646.28.0.767525471529.issue16264@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Changeset d3c7ebdc71bb produced the following test failure on one of the stable buildbots: ====================================================================== FAIL: test_noserver (test.test_logging.SocketHandlerTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_logging.py", line 1453, in test_noserver self.assertTrue(self.sock_hdlr.retryTime > now) AssertionError: False is not true See http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x ---------- assignee: giampaolo.rodola components: Library (Lib), Tests messages: 173157 nosy: giampaolo.rodola, jkloth, pitrou priority: normal severity: normal stage: needs patch status: open title: test_logging failure on Windows 7 buildbot type: behavior versions: Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16264> _______________________________________ From report at bugs.python.org Wed Oct 17 13:01:31 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Oct 2012 11:01:31 +0000 Subject: [issue16262] srcdir != builddir builds fail, if hg is not installed In-Reply-To: <1350464486.47.0.189031527493.issue16262@psf.upfronthosting.co.za> Message-ID: <1350471691.22.0.779067090869.issue16262@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: ---------- nosy: +trent _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16262> _______________________________________ From report at bugs.python.org Wed Oct 17 13:24:36 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Oct 2012 11:24:36 +0000 Subject: [issue16264] test_logging failure on Windows 7 buildbot In-Reply-To: <1350471646.28.0.767525471529.issue16264@psf.upfronthosting.co.za> Message-ID: <3XhWJ41B5pzQr1@mail.python.org> Roundup Robot added the comment: New changeset 240fa6e93925 by Giampaolo Rodola' in branch 'default': test_logging.py: where needed use unittest's assertGreater, assertLesser, assertIs rather than assertTrue (also in order to debug issue 16264) http://hg.python.org/cpython/rev/240fa6e93925 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16264> _______________________________________ From report at bugs.python.org Wed Oct 17 13:26:25 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 17 Oct 2012 11:26:25 +0000 Subject: [issue16264] test_logging failure on Windows 7 buildbot In-Reply-To: <1350471646.28.0.767525471529.issue16264@psf.upfronthosting.co.za> Message-ID: <1350473185.47.0.205484833079.issue16264@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Committed http://hg.python.org/cpython/rev/240fa6e93925 in order to have a clearer look on what's going on. Will get back on this later today, after the next bb failure. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16264> _______________________________________ From report at bugs.python.org Wed Oct 17 13:38:54 2012 From: report at bugs.python.org (Trent Nelson) Date: Wed, 17 Oct 2012 11:38:54 +0000 Subject: [issue15298] _sysconfigdata is generated in srcdir, not builddir In-Reply-To: <1341782776.55.0.708234468774.issue15298@psf.upfronthosting.co.za> Message-ID: <1350473934.92.0.114162509842.issue15298@psf.upfronthosting.co.za> Trent Nelson added the comment: That last commit fixes in-tree builds, but broke out-of-tree builds. I've refactored the patch (sysconfig.py.patch) to fix the issue, but it's getting progressively more hacky, so I wanted to see what other people think before proceeding. (That being said, it works a *lot* better than the previous solution of writing _sysconfigdata.py to the root builddir, then moving it. That didn't work at all for out-of-tree builds. This solution slots _sysconfigdata directly into sys.modules, which _init_posix() is more than happy with.) ---------- Added file: http://bugs.python.org/file27601/sysconfig.py.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15298> _______________________________________ From report at bugs.python.org Wed Oct 17 14:05:48 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 17 Oct 2012 12:05:48 +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: <1350475548.14.0.500626377815.issue16194@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, I think keeping this bug as the doc bug and opening a new one for the enhancement is the best way to go. ---------- versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16194> _______________________________________ From report at bugs.python.org Wed Oct 17 14:16:55 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 17 Oct 2012 12:16:55 +0000 Subject: [issue16259] Replace exec() in test.regrtest with __import__ In-Reply-To: <1350444394.63.0.4278126209.issue16259@psf.upfronthosting.co.za> Message-ID: <1350476215.66.0.219109863369.issue16259@psf.upfronthosting.co.za> R. David Murray added the comment: That's a safe use of exec, since the name is coming from a loaded module and not from user input. Still, load_module would be cleaner. However, the real fix is to just delete that code. It is dead code...we always pass the indirect_test argument to dash_R. ---------- nosy: +r.david.murray _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16259> _______________________________________ From report at bugs.python.org Wed Oct 17 14:48:50 2012 From: report at bugs.python.org (Yongzhi Pan) Date: Wed, 17 Oct 2012 12:48:50 +0000 Subject: [issue16265] Code sample does not collapse correctly Message-ID: <1350478130.47.0.20528799459.issue16265@psf.upfronthosting.co.za> New submission from Yongzhi Pan: http://docs.python.org/py3k/tutorial/inputoutput.html#fancier-output-formatting In the last but second code sample in that section, the code is not correctly colored and cannot be correctly collapsed. Expanded: >>> table = {'Sjoerd': 4127, 'Jack': 4098, 'Dcab': 8637678} >>> print ('Jack: {0[Jack]:d}; Sjoerd: {0[Sjoerd]:d}; ' ... 'Dcab: {0[Dcab]:d}'.format(table)) Jack: 4098; Sjoerd: 4127; Dcab: 8637678 Collapsed: table = {'Sjoerd': 4127, 'Jack': 4098, 'Dcab': 8637678} print('Jack: {0[Jack]:d}; Sjoerd: {0[Sjoerd]:d}; ' ---------- assignee: docs at python components: Documentation messages: 173163 nosy: docs at python, fossilet priority: normal severity: normal status: open title: Code sample does not collapse correctly type: behavior versions: Python 3.2, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16265> _______________________________________ From report at bugs.python.org Wed Oct 17 14:56:34 2012 From: report at bugs.python.org (Trent Nelson) Date: Wed, 17 Oct 2012 12:56:34 +0000 Subject: [issue16258] test_local.TestEnUSCollection failures on Solaris 10 In-Reply-To: <1350440395.6.0.0364005495024.issue16258@psf.upfronthosting.co.za> Message-ID: <1350478594.8.0.684903582189.issue16258@psf.upfronthosting.co.za> Trent Nelson added the comment: With the caveat that I know absolutely nothing about locales, here's what I've been able to reduce the problem down to: zinc (alias s11, Solaris 11 x64): >>> locale.setlocale(locale.LC_ALL, 'C') 'C' >>> locale.strxfrm('a') 'a' >>> locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') 'en_US.UTF-8' >>> locale.strxfrm('a') Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: character U+10105a3 is not in range [U+0000; U+10ffff] >>> nitrogen (alias s10, Solaris 10 SPARC): >>> locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') 'en_US.UTF-8' >>> locale.strxfrm('a') Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: character U+101010e is not in range [U+0000; U+10ffff] Not sure how relevant it is, but on both those Solaris boxes, locale.LC_ALL returns 6, whereas on BSD and OS X it always seems to return 0. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16258> _______________________________________ From report at bugs.python.org Wed Oct 17 14:58:39 2012 From: report at bugs.python.org (Yongzhi Pan) Date: Wed, 17 Oct 2012 12:58:39 +0000 Subject: [issue16266] Typo in tutorial Message-ID: <1350478719.85.0.211709670607.issue16266@psf.upfronthosting.co.za> New submission from Yongzhi Pan: http://docs.python.org/py3k/tutorial/inputoutput.html#reading-and-writing-files The text: In text mode, the default is to convert platform-specific line endings (\n on Unix, \r\n on Windows) to just \n on reading and \n back to platform-specific line endings on writing. Is the last '\n' a typo and not needed? ---------- assignee: docs at python components: Documentation messages: 173165 nosy: docs at python, fossilet priority: normal severity: normal status: open title: Typo in tutorial type: behavior versions: Python 3.2, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16266> _______________________________________ From report at bugs.python.org Wed Oct 17 15:02:59 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 17 Oct 2012 13:02:59 +0000 Subject: [issue16258] test_local.TestEnUSCollection failures on Solaris 10 In-Reply-To: <1350440395.6.0.0364005495024.issue16258@psf.upfronthosting.co.za> Message-ID: <1350478979.43.0.227993875415.issue16258@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: I can reproduce this on my x86 Solaris 10 update 10. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16258> _______________________________________ From report at bugs.python.org Wed Oct 17 15:03:20 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Oct 2012 13:03:20 +0000 Subject: [issue16258] test_local.TestEnUSCollection failures on Solaris 10 In-Reply-To: <1350440395.6.0.0364005495024.issue16258@psf.upfronthosting.co.za> Message-ID: <1350479000.11.0.87429331219.issue16258@psf.upfronthosting.co.za> Antoine Pitrou added the comment: With the system Python on s10: Python 2.6.8 (unknown, Apr 13 2012, 17:08:12) [C] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import locale >>> locale.strxfrm('a') 'a' >>> locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') 'en_US.UTF-8' >>> locale.strxfrm('a') '\x01\x01\x01\x0e\x01\x01\x01\x01\x01\x01\x01\x02\x01\x01\x0fi\x01\x01\x01\x01' >>> locale.strxfrm('a').decode('utf-8') u'\x01\x01\x01\x0e\x01\x01\x01\x01\x01\x01\x01\x02\x01\x01\x0fi\x01\x01\x01\x01' The difference between Python 2 and Python 3 is that Python 3 uses wcsxfrm, not strxfrm. Apparently Solaris' wcsxfrm is some broken thing that returns the same thing as strxfrm, cast to a wchar_t *, hence the character U+101010e (corresponding to the '\x01\x01\x01\x0e' bytestring above). ---------- nosy: +loewis, pitrou _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16258> _______________________________________ From report at bugs.python.org Wed Oct 17 15:05:36 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 17 Oct 2012 13:05:36 +0000 Subject: [issue16258] test_local.TestEnUSCollection failures on Solaris 10 In-Reply-To: <1350440395.6.0.0364005495024.issue16258@psf.upfronthosting.co.za> Message-ID: <1350479136.84.0.547029008234.issue16258@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: BTW, this works in python 3.2: x86, 32 bit python, Solaris 10 update 10: """ Python 3.2.3 (default, Apr 12 2012, 13:29:13) [GCC 4.7.0] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import locale >>> locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') 'en_US.UTF-8' >>> locale.strxfrm('a') '???\U00010f69?' """ ---------- keywords: +3.3regression _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16258> _______________________________________ From report at bugs.python.org Wed Oct 17 15:12:46 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 17 Oct 2012 13:12:46 +0000 Subject: [issue16266] Typo in tutorial In-Reply-To: <1350478719.85.0.211709670607.issue16266@psf.upfronthosting.co.za> Message-ID: <1350479566.34.0.374622093992.issue16266@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I'm not native English speaker, but for me it just means \r\n -> \n when read from stream and \n -> \r\n when write to stream if OS is Windows. That's correct. ---------- nosy: +asvetlov, chris.jerdonek _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16266> _______________________________________ From report at bugs.python.org Wed Oct 17 15:20:59 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2012 13:20:59 +0000 Subject: [issue15200] Faster os.walk In-Reply-To: <1340784682.62.0.274796197077.issue15200@psf.upfronthosting.co.za> Message-ID: <1350480059.0.0.198409807734.issue15200@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Timing of walk depends on how deep we dive into the directories. $?./python -m timeit -s "from os import walk" "for x in walk('/home/serhiy/py/1/2/3/4/5/6/7/8/9/cpython/'): pass" 10 loops, best of 3: 398 msec per loop $ ./python -m timeit -s "from os import fwalk" "for x in fwalk('/home/serhiy/py/1/2/3/4/5/6/7/8/9/cpython/'): pass" 10 loops, best of 3: 249 msec per loop Given the above mentioned objections (consuming a lot of file descriptors, OS/FS dependency, testing burden) I withdraw my patch and close the issue. Thanks all for discussion. ---------- resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15200> _______________________________________ From report at bugs.python.org Wed Oct 17 15:34:00 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Oct 2012 13:34:00 +0000 Subject: [issue16258] test_local.TestEnUSCollection failures on Solaris 10 In-Reply-To: <1350440395.6.0.0364005495024.issue16258@psf.upfronthosting.co.za> Message-ID: <1350480840.33.0.260817486481.issue16258@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It only works on Python 3.2 because PyUnicode_FromWideChar is more permissive, it seems. The first character in the wchar_t string returned by Solaris is still 0x101010e. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16258> _______________________________________ From report at bugs.python.org Wed Oct 17 15:44:36 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Oct 2012 13:44:36 +0000 Subject: [issue16258] test_local.TestEnUSCollection failures on Solaris 10 In-Reply-To: <1350440395.6.0.0364005495024.issue16258@psf.upfronthosting.co.za> Message-ID: <1350481476.8.0.77568263361.issue16258@psf.upfronthosting.co.za> Antoine Pitrou added the comment: (by the way, I also tried a memset() before calling wcsxfrm(): no change) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16258> _______________________________________ From report at bugs.python.org Wed Oct 17 15:47:51 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Oct 2012 13:47:51 +0000 Subject: [issue16265] Code sample does not collapse correctly In-Reply-To: <1350478130.47.0.20528799459.issue16265@psf.upfronthosting.co.za> Message-ID: <3XhZTL5D5hzM06@mail.python.org> Roundup Robot added the comment: New changeset a0fba0382ae0 by Andrew Svetlov in branch '3.2': Issue #16265: Fix collapsing of code sample in tutorial. http://hg.python.org/cpython/rev/a0fba0382ae0 New changeset 7c0de8be4eaf by Andrew Svetlov in branch '3.3': Merge issue #16265: Fix collapsing of code sample in tutorial. http://hg.python.org/cpython/rev/7c0de8be4eaf New changeset c8a11e9a0217 by Andrew Svetlov in branch 'default': Merge issue #16265: Fix collapsing of code sample in tutorial. http://hg.python.org/cpython/rev/c8a11e9a0217 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16265> _______________________________________ From report at bugs.python.org Wed Oct 17 15:48:26 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 17 Oct 2012 13:48:26 +0000 Subject: [issue16265] Code sample does not collapse correctly In-Reply-To: <1350478130.47.0.20528799459.issue16265@psf.upfronthosting.co.za> Message-ID: <1350481706.45.0.256555283308.issue16265@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks. ---------- nosy: +asvetlov resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16265> _______________________________________ From report at bugs.python.org Wed Oct 17 15:49:21 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2012 13:49:21 +0000 Subject: [issue15145] Faster *_find_max_char In-Reply-To: <1340398318.47.0.89388206382.issue15145@psf.upfronthosting.co.za> Message-ID: <1350481761.92.0.307701828317.issue15145@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: Removed file: http://bugs.python.org/file26093/find_max_char.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15145> _______________________________________ From report at bugs.python.org Wed Oct 17 15:50:08 2012 From: report at bugs.python.org (Brett Cannon) Date: Wed, 17 Oct 2012 13:50:08 +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: <1350481808.53.0.408615298882.issue16261@psf.upfronthosting.co.za> Brett Cannon added the comment: One thing to be aware of, Ramchandra, is that there might be a slight backwards-compatibility problem from tightening up what exceptions propagate. Now with proper documentation and only applying things to 3.4 this probably won't be a problem. ---------- nosy: +brett.cannon _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16261> _______________________________________ From report at bugs.python.org Wed Oct 17 15:56:31 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2012 13:56:31 +0000 Subject: [issue15145] Faster *_find_max_char In-Reply-To: <1340398318.47.0.89388206382.issue15145@psf.upfronthosting.co.za> Message-ID: <1350482190.99.0.820187654555.issue15145@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated to tip. But because results are contradictory and often patched version even slower vanilla (and I don't understand why it happens), I close the issue. I think all changes are irrelevant and differences are only compiler optimization artifacts. ---------- resolution: -> rejected stage: patch review -> committed/rejected status: open -> closed Added file: http://bugs.python.org/file27602/find_max_char_2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15145> _______________________________________ From report at bugs.python.org Wed Oct 17 15:57:54 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Oct 2012 13:57:54 +0000 Subject: [issue15145] Faster *_find_max_char In-Reply-To: <1340398318.47.0.89388206382.issue15145@psf.upfronthosting.co.za> Message-ID: <1350482274.29.0.867327601823.issue15145@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks for the effort, Serhiy! ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15145> _______________________________________ From report at bugs.python.org Wed Oct 17 16:02:25 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2012 14:02:25 +0000 Subject: [issue15378] Underported Tools/unicode/comparecodecs.py In-Reply-To: <1342513821.95.0.889666827691.issue15378@psf.upfronthosting.co.za> Message-ID: <1350482545.36.0.259926261634.issue15378@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- Removed message: http://bugs.python.org/msg165687 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15378> _______________________________________ From report at bugs.python.org Wed Oct 17 16:03:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2012 14:03:49 +0000 Subject: [issue15378] Underported Tools/unicode/comparecodecs.py In-Reply-To: <1342513821.95.0.889666827691.issue15378@psf.upfronthosting.co.za> Message-ID: <1350482629.84.0.604478198014.issue15378@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Can anyone look at this tiny patch? ---------- versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15378> _______________________________________ From report at bugs.python.org Wed Oct 17 16:16:45 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Oct 2012 14:16:45 +0000 Subject: [issue15378] Underported Tools/unicode/comparecodecs.py In-Reply-To: <1342513821.95.0.889666827691.issue15378@psf.upfronthosting.co.za> Message-ID: <3Xhb6j16kBzNZP@mail.python.org> Roundup Robot added the comment: New changeset 98f64cbed2ac by Antoine Pitrou in branch '3.2': Issue #15378: Fix Tools/unicode/comparecodecs.py. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/98f64cbed2ac New changeset f281d7700339 by Antoine Pitrou in branch '3.3': Issue #15378: Fix Tools/unicode/comparecodecs.py. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/f281d7700339 New changeset ae1f84fd143e by Antoine Pitrou in branch 'default': Issue #15378: Fix Tools/unicode/comparecodecs.py. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/ae1f84fd143e ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15378> _______________________________________ From report at bugs.python.org Wed Oct 17 16:17:22 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Oct 2012 14:17:22 +0000 Subject: [issue15378] Underported Tools/unicode/comparecodecs.py In-Reply-To: <1342513821.95.0.889666827691.issue15378@psf.upfronthosting.co.za> Message-ID: <1350483442.48.0.506091044165.issue15378@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The patch is obviously good, thank you :) ---------- nosy: +pitrou resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15378> _______________________________________ From report at bugs.python.org Wed Oct 17 16:33:41 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Oct 2012 14:33:41 +0000 Subject: [issue9583] Document startup option/environment interaction In-Reply-To: <1281653669.29.0.363654611831.issue9583@psf.upfronthosting.co.za> Message-ID: <3XhbVF17LjzR6l@mail.python.org> Roundup Robot added the comment: New changeset 2f812212599b by Andrew Svetlov in branch '2.7': Issue #9583: Document startup option/environment interaction. http://hg.python.org/cpython/rev/2f812212599b New changeset a8052ad9752b by Andrew Svetlov in branch '3.2': Issue #9583: Document startup option/environment interaction. http://hg.python.org/cpython/rev/a8052ad9752b New changeset f0bb61cbc046 by Andrew Svetlov in branch '3.3': Merge issue #9583: Document startup option/environment interaction. http://hg.python.org/cpython/rev/f0bb61cbc046 New changeset def0e0bb06ef by Andrew Svetlov in branch 'default': Merge issue #9583: Document startup option/environment interaction. http://hg.python.org/cpython/rev/def0e0bb06ef ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9583> _______________________________________ From report at bugs.python.org Wed Oct 17 16:35:27 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 17 Oct 2012 14:35:27 +0000 Subject: [issue9583] Document startup option/environment interaction In-Reply-To: <1281653669.29.0.363654611831.issue9583@psf.upfronthosting.co.za> Message-ID: <1350484527.75.0.345562901535.issue9583@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Applied patch. Thanks, Todd. I think the issue can be closed. ---------- nosy: +asvetlov versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9583> _______________________________________ From report at bugs.python.org Wed Oct 17 16:35:41 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 17 Oct 2012 14:35:41 +0000 Subject: [issue13441] TestEnUSCollation.test_strxfrm() fails on Solaris In-Reply-To: <1321833496.0.0.544021070577.issue13441@psf.upfronthosting.co.za> Message-ID: <1350484541.58.0.194201224338.issue13441@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea superseder: -> test_local.TestEnUSCollection failures on Solaris 10 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13441> _______________________________________ From report at bugs.python.org Wed Oct 17 16:36:26 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 17 Oct 2012 14:36:26 +0000 Subject: [issue16258] test_local.TestEnUSCollection failures on Solaris 10 In-Reply-To: <1350440395.6.0.0364005495024.issue16258@psf.upfronthosting.co.za> Message-ID: <1350484586.35.0.114604218133.issue16258@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +haypo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16258> _______________________________________ From report at bugs.python.org Wed Oct 17 17:41:21 2012 From: report at bugs.python.org (Christopher the Magnificent) Date: Wed, 17 Oct 2012 15:41:21 +0000 Subject: [issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use) Message-ID: <1350488481.01.0.487550684008.issue16267@psf.upfronthosting.co.za> New submission from Christopher the Magnificent: This may be an issue with the interpreter behavior or it may be a documentation issue. Note: I only selected Python 3.3 as the version, but it probably affects MANY other Python versions. Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 01:25:11) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "copyright", "credits" or "license()" for more information. >>> import abc >>> help(abc.abstractclassmethod) Help on class abstractclassmethod in module abc: class abstractclassmethod(builtins.classmethod) | A decorator indicating abstract classmethods. | | Similar to abstractmethod. | | Usage: | | class C(metaclass=ABCMeta): | @abstractclassmethod | def my_abstract_classmethod(cls, ...): | ... | | 'abstractclassmethod' is deprecated. Use 'classmethod' with | 'abstractmethod' instead. . (et cetra) . . >>> # doesn't work >>> class Demo(metaclass=abc.ABCMeta): ... @abc.abstractmethod ... @classmethod ... def test(cls): ... pass ... Traceback (most recent call last): File "<pyshell#26>", line 1, in <module> class Demo3(metaclass=abc.ABCMeta): File "<pyshell#26>", line 3, in Demo3 @classmethod File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/abc.py", line 24, in abstractmethod funcobj.__isabstractmethod__ = True AttributeError: attribute '__isabstractmethod__' of 'classmethod' objects is not writable >>> # DOES work >>> class Demo2(metaclass=abc.ABCMeta): ... @classmethod ... @abc.abstractmethod ... def test(cls): ... pass ... >>> Demo2() Traceback (most recent call last): File "<pyshell#33>", line 1, in <module> Demo4() TypeError: Can't instantiate abstract class Demo2 with abstract methods test Hopefully this is enough documentation to show what the issues is. If not, just chime in. :-) ---------- assignee: docs at python components: Documentation, Interpreter Core messages: 173183 nosy: christopherthemagnificent, docs at python priority: normal severity: normal status: open title: order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use) type: behavior versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16267> _______________________________________ From report at bugs.python.org Wed Oct 17 18:33:48 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 17 Oct 2012 16:33:48 +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: <1350491628.5.0.761775584977.issue16267@psf.upfronthosting.co.za> Changes by Andrew Svetlov <andrew.svetlov at gmail.com>: ---------- nosy: +asvetlov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16267> _______________________________________ From report at bugs.python.org Wed Oct 17 18:40:26 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 17 Oct 2012 16:40:26 +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: <1350492026.56.0.00646904740896.issue16267@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I think better to fix code to make first sample also work. It can be done as special cases in abc.abstractmethod to process classmethod/staticmethod objects properly. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16267> _______________________________________ From report at bugs.python.org Wed Oct 17 18:53:31 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Oct 2012 16:53:31 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1350492811.58.0.0601543791813.issue14621@psf.upfronthosting.co.za> Christian Heimes added the comment: I've modified unicodeobject's unicode_hash() function. V8's algorithm is about 55% slower for a 800 MB ASCII string on my box. Python's current hash algorithm for bytes and unicode: while (--len >= 0) x = (_PyHASH_MULTIPLIER * x) ^ (Py_uhash_t) *P++; $ ./python -m timeit -s "t = 'abcdefgh' * int(1E8)" "hash(t)" 10 loops, best of 3: 94.1 msec per loop V8's algorithm: while (--len >= 0) { x += (Py_uhash_t) *P++; x += ((x + (Py_uhash_t)len) << 10); x ^= (x >> 6); } $ ./python -m timeit -s "t = 'abcdefgh' * int(1E8)" "hash(t)" 10 loops, best of 3: 164 msec per loop ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14621> _______________________________________ From report at bugs.python.org Wed Oct 17 19:02:10 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 17 Oct 2012 17:02:10 +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: <1350493330.31.0.94538987079.issue16267@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>: ---------- nosy: +Arfrever _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16267> _______________________________________ From report at bugs.python.org Wed Oct 17 19:07:42 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 17 Oct 2012 17:07:42 +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: <1350493662.33.0.248972756523.issue16248@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>: ---------- nosy: +Arfrever, gpolo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16248> _______________________________________ From report at bugs.python.org Wed Oct 17 19:08:32 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 17 Oct 2012 17:08:32 +0000 Subject: [issue15483] CROSS: initialise include and library paths in setup.py In-Reply-To: <1343554833.66.0.976178324221.issue15483@psf.upfronthosting.co.za> Message-ID: <1350493712.45.0.0976016796313.issue15483@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>: ---------- nosy: +Arfrever _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15483> _______________________________________ From report at bugs.python.org Wed Oct 17 19:09:25 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 17 Oct 2012 17:09:25 +0000 Subject: [issue15268] curses configure checks fail if only /usr/include/ncursesw/curses.h is installed In-Reply-To: <1341623074.57.0.341676091224.issue15268@psf.upfronthosting.co.za> Message-ID: <1350493765.97.0.250690071537.issue15268@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>: ---------- nosy: +Arfrever _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15268> _______________________________________ From report at bugs.python.org Wed Oct 17 19:12:45 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 17 Oct 2012 17:12:45 +0000 Subject: [issue16266] Typo in tutorial In-Reply-To: <1350478719.85.0.211709670607.issue16266@psf.upfronthosting.co.za> Message-ID: <1350493965.08.0.280855160243.issue16266@psf.upfronthosting.co.za> Chris Jerdonek added the comment: The last \n is needed for the reason Andrew mentioned, but it is true that the sentence could probably be rephrased to reduce the chance of confusion. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16266> _______________________________________ From report at bugs.python.org Wed Oct 17 19:40:14 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 17 Oct 2012 17:40:14 +0000 Subject: [issue16266] Rephrase sentence in tutorial about universal newlines In-Reply-To: <1350478719.85.0.211709670607.issue16266@psf.upfronthosting.co.za> Message-ID: <1350495614.37.0.0733542825275.issue16266@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I would suggest something like this: "In text mode, the default when reading is to convert platform-specific line endings (\n on Unix, \r\n on Windows) to just \n. When writing in text mode, the default is to convert occurrences of \n back to platform-specific line endings." ---------- keywords: +easy title: Typo in tutorial -> Rephrase sentence in tutorial about universal newlines versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16266> _______________________________________ From report at bugs.python.org Wed Oct 17 19:47:51 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 17 Oct 2012 17:47:51 +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: <1350496071.2.0.504186527739.issue16267@psf.upfronthosting.co.za> R. David Murray added the comment: I've added the nosy list from issue 11610, in case complicating the implementation is seen as sub-optimal :) ---------- nosy: +Darren.Dale, benjamin.peterson, daniel.urban, dsdale24, eric.araujo, eric.snow, ncoghlan, python-dev, r.david.murray, stutzbach _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16267> _______________________________________ From report at bugs.python.org Wed Oct 17 20:07:00 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 17 Oct 2012 18:07:00 +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: <1350497220.38.0.322340447995.issue16267@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I don't see why classmethod/staticmethod should be special cased if it doesn't work for other decorators. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16267> _______________________________________ From report at bugs.python.org Wed Oct 17 20:15:10 2012 From: report at bugs.python.org (Darren Dale) Date: Wed, 17 Oct 2012 18:15:10 +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: <1350497710.51.0.755895816306.issue16267@psf.upfronthosting.co.za> Darren Dale added the comment: Quoting the documentation for abstractmethod: "When abstractmethod() is applied in combination with other method descriptors, it should be applied as the innermost decorator, as shown in the following usage examples:" The examples include staticmethod and classmethod. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16267> _______________________________________ From report at bugs.python.org Wed Oct 17 20:16:05 2012 From: report at bugs.python.org (Guilherme Polo) Date: Wed, 17 Oct 2012 18:16:05 +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: <1350497765.87.0.914034657546.issue16248@psf.upfronthosting.co.za> Guilherme Polo added the comment: It is a well known fact that the readprofile function uses exec, and it has been like that for more than 18 years. The parameters baseName and className defines the execution of the files $HOME/.{className}.tcl, $HOME/.{className}.py, $HOME/.{baseName}.tcl, and $HOME/.{baseName}.py. The function's docstring actually say that. Said that, I never needed to load custom code during the creation of a Tk instance. To me the existence of readprofile is unneeded. But what is your proposal to the issue ? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16248> _______________________________________ From report at bugs.python.org Wed Oct 17 20:38:58 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 17 Oct 2012 18:38:58 +0000 Subject: [issue16266] Rephrase sentence in tutorial about universal newlines In-Reply-To: <1350478719.85.0.211709670607.issue16266@psf.upfronthosting.co.za> Message-ID: <1350499138.59.0.119918909604.issue16266@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Looks good to me, please apply it. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16266> _______________________________________ From report at bugs.python.org Wed Oct 17 20:41:42 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 17 Oct 2012 18:41:42 +0000 Subject: [issue9583] Document startup option/environment interaction In-Reply-To: <1281653669.29.0.363654611831.issue9583@psf.upfronthosting.co.za> Message-ID: <1350499302.81.0.92992475834.issue9583@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Close the issue. Feel free to reopen if clarification needed. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9583> _______________________________________ From report at bugs.python.org Wed Oct 17 20:42:48 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Wed, 17 Oct 2012 18:42:48 +0000 Subject: [issue15450] Allow dircmp.subdirs to behave well under subclassing In-Reply-To: <1343260803.75.0.101432828571.issue15450@psf.upfronthosting.co.za> Message-ID: <1350499368.11.0.471865050623.issue15450@psf.upfronthosting.co.za> Changes by Petri Lehtinen <petri at digip.org>: ---------- keywords: +patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15450> _______________________________________ From report at bugs.python.org Wed Oct 17 20:55:18 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Wed, 17 Oct 2012 18:55:18 +0000 Subject: [issue13614] setup.py register fails if long_description contains ReST In-Reply-To: <1324069250.69.0.136486094973.issue13614@psf.upfronthosting.co.za> Message-ID: <1350500118.84.0.422447210183.issue13614@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Can this be closed? ---------- nosy: +petri.lehtinen _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13614> _______________________________________ From report at bugs.python.org Wed Oct 17 20:58:21 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 17 Oct 2012 18:58:21 +0000 Subject: [issue13614] setup.py register fails if long_description contains ReST In-Reply-To: <1324069250.69.0.136486094973.issue13614@psf.upfronthosting.co.za> Message-ID: <1350500301.49.0.496145598928.issue13614@psf.upfronthosting.co.za> ?ric Araujo added the comment: The changesets you see are in distutils2, I haven?t had a chance to backport them yet. ---------- stage: test needed -> commit review versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13614> _______________________________________ From report at bugs.python.org Wed Oct 17 21:02:06 2012 From: report at bugs.python.org (Chris Calloway) Date: Wed, 17 Oct 2012 19:02:06 +0000 Subject: [issue15518] Provide test coverage for filecmp.dircmp.report methods. In-Reply-To: <1343786533.33.0.657671203467.issue15518@psf.upfronthosting.co.za> Message-ID: <1350500526.66.0.263854070398.issue15518@psf.upfronthosting.co.za> Chris Calloway added the comment: I have a number of patches for this issue I have worked on during a few local Python user group hack nights. I have not submitted them yet, however, as they require some expository material here in order to illustrate how they address Jerdonek's points. I have a regional Python conference (PyCarolinas) that I have some responsibilities in through the weekend, however, and will not be able to move forward ASAP until after then. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15518> _______________________________________ From report at bugs.python.org Wed Oct 17 21:05:10 2012 From: report at bugs.python.org (Christopher the Magnificent) Date: Wed, 17 Oct 2012 19:05:10 +0000 Subject: [issue16268] dir(closure) claims that a closure has no __dir__, only to work later after manually invoking __dir__ from its type Message-ID: <1350500710.5.0.876584221442.issue16268@psf.upfronthosting.co.za> New submission from Christopher the Magnificent: This is really short, you should spot the inconsistency in the result of the same function call fairly easily. Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 01:25:11) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> class Thing: ... def method(self): ... print(__class__) ... >>> x = Thing.method.__closure__[0] >>> dir(x) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: object does not provide __dir__ >>> type(x).__dir__(x) ['__gt__', '__eq__', '__setattr__', '__doc__', '__sizeof__', '__str__', '__init__', '__repr__', 'cell_contents', '__dir__', '__ge__', '__class__', '__new__', '__ne__', '__subclasshook__', '__hash__', '__lt__', '__reduce__', '__le__', '__getattribute__', '__format__', '__reduce_ex__', '__delattr__'] >>> dir(x) ['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'cell_contents'] >>> ---------- components: Interpreter Core messages: 173197 nosy: christopherthemagnificent priority: normal severity: normal status: open title: dir(closure) claims that a closure has no __dir__, only to work later after manually invoking __dir__ from its type type: behavior versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16268> _______________________________________ From report at bugs.python.org Wed Oct 17 21:14:39 2012 From: report at bugs.python.org (Kushal Das) Date: Wed, 17 Oct 2012 19:14:39 +0000 Subject: [issue16268] dir(closure) claims that a closure has no __dir__, only to work later after manually invoking __dir__ from its type In-Reply-To: <1350500710.5.0.876584221442.issue16268@psf.upfronthosting.co.za> Message-ID: <1350501279.04.0.386195994434.issue16268@psf.upfronthosting.co.za> Changes by Kushal Das <kushaldas at gmail.com>: ---------- nosy: +kushaldas _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16268> _______________________________________ From report at bugs.python.org Wed Oct 17 21:26:45 2012 From: report at bugs.python.org (Christopher the Magnificent) Date: Wed, 17 Oct 2012 19:26:45 +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: <1350502005.74.0.479396572328.issue16267@psf.upfronthosting.co.za> Christopher the Magnificent added the comment: As Darren Dale pointed out, it looks like this is a (partial) documentation issue. I think it's plausible that someone like me, who has used abstractmethod by itself, would read the docs for abstractclassmethod and not re-read the docs on abstract method to know that he needs to put the one decorator first and other other second. Changing Python to make it indifferent to the order of classmethod and abstractmethod wouldn't be a bad idea if it isn't too hairy to implement, since it does not seem to be intuitive to me and probably others that the order of the decorators in this specific situation should matter. At bare minimum, I recommend that the documentation for abstractclassmethod and abstractstaticmethod should be updated to indicate not merely that abstractmethod and either classmethod or staticmethod should be used together, but IN WHICH ORDER they should be used, if it is decided to preserve the sensitivity to ordering. :-) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16267> _______________________________________ From report at bugs.python.org Wed Oct 17 21:28:28 2012 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Oct 2012 19:28:28 +0000 Subject: [issue16258] test_local.TestEnUSCollection failures on Solaris 10 In-Reply-To: <1350484586.4.0.438755242822.issue16258@psf.upfronthosting.co.za> Message-ID: <CAMpsgwa9ErMwLwVJ3sbBf27RfDW4EauTs0Ljb+8+OPoGJd5QJg@mail.gmail.com> STINNER Victor added the comment: Python 3.2 rejects characters outside the range U+0000-U+10ffff in some operations, but not everywhere. I fixed Python 3.3 to be more strict and always reject characters outside this range. I noticed the Solaris issue with mbstowcs() on locale encodings different than UTF-8: #13441. I asked if it's more important to be strict on Unicode, or if we need to handle the wcsxfrm() issue on python-dev: http://mail.python.org/pipermail/python-dev/2011-December/114759.html Stefan Krah answered: "Yes, if the cause is a broken mbstowcs() that sounds good." http://mail.python.org/pipermail/python-dev/2011-December/114781.html I asked for help on OpenIndiana IRC channel, but nobody had a locale encoding different than UTF-8. I didn't have access to a Solaris box, so I chose to skip failing tests on Solaris. My commit 2a2d0872d993 (and 7ffe3d304487) skips many locales to workaround this issue in test__locale. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16258> _______________________________________ From report at bugs.python.org Wed Oct 17 22:00:19 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 17 Oct 2012 20:00:19 +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: <1350504019.31.0.158204375182.issue16267@psf.upfronthosting.co.za> Andrew Svetlov added the comment: After brief looking sources I figured out it can be solved by adding setters for __isabstractmethod__ to classmethod/staticmethod objects. It can be done, I'll try to make a patch. For property situation is worse: property is abstract if any of getter/setter/deleter is abstract. Which object attribute should be set for setting __isabstractmethod__ for property? We can make the rule: abstractmethod for classmethod/staticmethod/property should set descriptor as abstract, not functions behind it. I'm not sure is it true solution but I like to try to make a patch for that. Anyway, the patch for describing current behavior in the docs is welcome. ---------- stage: -> needs patch versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16267> _______________________________________ From report at bugs.python.org Wed Oct 17 22:15:12 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 17 Oct 2012 20:15:12 +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: <1350504912.5.0.710387566464.issue16194@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>: ---------- nosy: +Arfrever _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16194> _______________________________________ From report at bugs.python.org Wed Oct 17 22:16:21 2012 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 17 Oct 2012 20:16:21 +0000 Subject: [issue15814] memoryview: equality-hash invariant In-Reply-To: <1346260029.19.0.320505643782.issue15814@psf.upfronthosting.co.za> Message-ID: <1350504981.34.0.052673308278.issue15814@psf.upfronthosting.co.za> Mark Lawrence added the comment: The 3.3.0 docs now state "Note Hashing of memoryviews with formats other than ?B?, ?b? or ?c? as well as hashing of multi-dimensional memoryviews is possible in version 3.3.0, but will raise an error in 3.3.1 in order to be compatible with the new memoryview equality definition." I assume 3.3.1 should read 3.4, or have I missed something? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15814> _______________________________________ From report at bugs.python.org Wed Oct 17 22:16:48 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 17 Oct 2012 20:16:48 +0000 Subject: [issue16262] srcdir != builddir builds fail, if hg is not installed In-Reply-To: <1350464486.47.0.189031527493.issue16262@psf.upfronthosting.co.za> Message-ID: <1350505008.81.0.183244173421.issue16262@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>: ---------- nosy: +Arfrever _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16262> _______________________________________ From report at bugs.python.org Wed Oct 17 22:17:53 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 17 Oct 2012 20:17:53 +0000 Subject: [issue16268] dir(closure) claims that a closure has no __dir__, only to work later after manually invoking __dir__ from its type In-Reply-To: <1350500710.5.0.876584221442.issue16268@psf.upfronthosting.co.za> Message-ID: <1350505073.79.0.441345957248.issue16268@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>: ---------- nosy: +Arfrever _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16268> _______________________________________ From report at bugs.python.org Wed Oct 17 22:22:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2012 20:22:16 +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: <1350505336.18.0.460648266633.issue13301@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The patch does not unquote strings ("spam\n" is interpreted as r"spam\n") and allows invalid entry such as "\\" or boo. ---------- nosy: +serhiy.storchaka stage: patch review -> needs patch versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13301> _______________________________________ From report at bugs.python.org Wed Oct 17 22:24:04 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 17 Oct 2012 20:24:04 +0000 Subject: [issue15814] memoryview: equality-hash invariant In-Reply-To: <1346260029.19.0.320505643782.issue15814@psf.upfronthosting.co.za> Message-ID: <1350505444.96.0.211111079026.issue15814@psf.upfronthosting.co.za> Martin v. L?wis added the comment: 3.3.1 is correct, you apparently missed msg169425. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15814> _______________________________________ From report at bugs.python.org Wed Oct 17 22:30:33 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2012 20:30:33 +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: <1350505833.34.0.227858751188.issue12759@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: >?My only question is, the exception we raise now says, there invalid characters in the group name, whether in our case the group name is just empty. Good point. It would be better if you move the test outside isname() function and immediately raise an error with an appropriate message. ---------- nosy: +serhiy.storchaka stage: patch review -> needs patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12759> _______________________________________ From report at bugs.python.org Wed Oct 17 23:09:36 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Oct 2012 21:09:36 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349706807.82.0.556520783402.issue16166@psf.upfronthosting.co.za> Message-ID: <1350508176.5.0.515411821873.issue16166@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I would prefer if you yanked PY_LITTLE_ENDIAN_FLAG. We don't need two different ways to do it. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16166> _______________________________________ From report at bugs.python.org Wed Oct 17 23:16:26 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Oct 2012 21:16:26 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1350508586.9.0.491693346442.issue16203@psf.upfronthosting.co.za> Antoine Pitrou added the comment: FWIW, I prefer "fullmatch" as well :) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16203> _______________________________________ From report at bugs.python.org Wed Oct 17 23:21:57 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 17 Oct 2012 21:21:57 +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: <1350508917.01.0.720614099364.issue14900@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I'm waiting for your patch. Thanks. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14900> _______________________________________ From report at bugs.python.org Wed Oct 17 23:28:38 2012 From: report at bugs.python.org (William Edwards) Date: Wed, 17 Oct 2012 21:28:38 +0000 Subject: [issue16269] multiprocessing.Queue uses select() Message-ID: <1350509318.53.0.123166895316.issue16269@psf.upfronthosting.co.za> New submission from William Edwards: If you have 1024 file descriptors already open, the file descriptors created internally in multiprocessing.Queue will be beyond 1024 and the select() call buried deep in the Queue will throw an exception. In fact, all uses of select() in the Python libs should be use poll() where available instead, obviously. ---------- components: IO messages: 173208 nosy: William.Edwards priority: normal severity: normal status: open title: multiprocessing.Queue uses select() type: behavior versions: Python 2.6, Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16269> _______________________________________ From report at bugs.python.org Wed Oct 17 23:38:49 2012 From: report at bugs.python.org (=?utf-8?q?Ugra_D=C3=A1niel?=) Date: Wed, 17 Oct 2012 21:38:49 +0000 Subject: [issue16270] ftplib hangs when closing connection Message-ID: <1350509929.7.0.680667591801.issue16270@psf.upfronthosting.co.za> New submission from Ugra D?niel: With version 3.3 (64 bit on Arch Linux) Python now hangs when closing FTP connection on some sites: url = "ftp://ftp.fu-berlin.de/pub/misc/movies/database/ratings.list.gz" with urllib.request.urlopen( url ): pass ---------- components: Library (Lib) messages: 173209 nosy: daniel.ugra priority: normal severity: normal status: open title: ftplib hangs when closing connection type: behavior versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16270> _______________________________________ From report at bugs.python.org Wed Oct 17 23:46:20 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Oct 2012 21:46:20 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349706807.82.0.556520783402.issue16166@psf.upfronthosting.co.za> Message-ID: <1350510380.99.0.14671341883.issue16166@psf.upfronthosting.co.za> Christian Heimes added the comment: I've replaced the macros with PY_BIG_ENDIAN or PY_LITTLE_ENDIAN. Both are always defined and exactly one is set to 1, the other to 0. ---------- Added file: http://bugs.python.org/file27603/endian2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16166> _______________________________________ From report at bugs.python.org Wed Oct 17 23:48:15 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Oct 2012 21:48:15 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349706807.82.0.556520783402.issue16166@psf.upfronthosting.co.za> Message-ID: <1350510495.09.0.21950870331.issue16166@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Looks fine to me. I suppose you'll have to check the big endian buildbots. ---------- stage: needs patch -> commit review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16166> _______________________________________ From report at bugs.python.org Wed Oct 17 23:48:48 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Oct 2012 21:48:48 +0000 Subject: [issue16270] ftplib hangs when closing connection In-Reply-To: <1350509929.7.0.680667591801.issue16270@psf.upfronthosting.co.za> Message-ID: <1350510528.96.0.940151530296.issue16270@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: ---------- keywords: +3.3regression nosy: +giampaolo.rodola, orsenthil versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16270> _______________________________________ From report at bugs.python.org Wed Oct 17 23:49:17 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Oct 2012 21:49:17 +0000 Subject: [issue16269] multiprocessing.Queue uses select() In-Reply-To: <1350509318.53.0.123166895316.issue16269@psf.upfronthosting.co.za> Message-ID: <1350510557.62.0.423871618516.issue16269@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: ---------- nosy: +sbt versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16269> _______________________________________ From report at bugs.python.org Wed Oct 17 23:50:01 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 17 Oct 2012 21:50:01 +0000 Subject: [issue16270] ftplib hangs when closing connection In-Reply-To: <1350509929.7.0.680667591801.issue16270@psf.upfronthosting.co.za> Message-ID: <1350510601.89.0.510539062802.issue16270@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I guess this is about urllib, not ftplib. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16270> _______________________________________ From report at bugs.python.org Wed Oct 17 23:52:29 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Oct 2012 21:52:29 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349706807.82.0.556520783402.issue16166@psf.upfronthosting.co.za> Message-ID: <3XhnDX6s6GzPCT@mail.python.org> Roundup Robot added the comment: New changeset d2127cdec10e by Christian Heimes in branch 'default': Issue #16166: Add PY_LITTLE_ENDIAN and PY_BIG_ENDIAN macros and unified http://hg.python.org/cpython/rev/d2127cdec10e ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16166> _______________________________________ From report at bugs.python.org Wed Oct 17 23:56:20 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 17 Oct 2012 21:56:20 +0000 Subject: [issue16269] multiprocessing.Queue uses select() In-Reply-To: <1350509318.53.0.123166895316.issue16269@psf.upfronthosting.co.za> Message-ID: <1350510980.4.0.763807352138.issue16269@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' <g.rodola at gmail.com>: ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16269> _______________________________________ From report at bugs.python.org Thu Oct 18 00:08:52 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Oct 2012 22:08:52 +0000 Subject: [issue15298] _sysconfigdata is generated in srcdir, not builddir In-Reply-To: <1341782776.55.0.708234468774.issue15298@psf.upfronthosting.co.za> Message-ID: <3XhnbR663xzQwy@mail.python.org> Roundup Robot added the comment: New changeset 1250498db562 by Trent Nelson in branch '3.3': Issue #15298: refactor previous fix from 66959d419369. http://hg.python.org/cpython/rev/1250498db562 New changeset a0614e041bc8 by Trent Nelson in branch 'default': Merge issue #15298. http://hg.python.org/cpython/rev/a0614e041bc8 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15298> _______________________________________ From report at bugs.python.org Thu Oct 18 00:25:55 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Oct 2012 22:25:55 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349706807.82.0.556520783402.issue16166@psf.upfronthosting.co.za> Message-ID: <1350512755.49.0.743622678485.issue16166@psf.upfronthosting.co.za> Changes by Christian Heimes <lists at cheimes.de>: ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16166> _______________________________________ From report at bugs.python.org Thu Oct 18 00:34:49 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 17 Oct 2012 22:34:49 +0000 Subject: [issue16269] multiprocessing.Queue uses select() In-Reply-To: <1350509318.53.0.123166895316.issue16269@psf.upfronthosting.co.za> Message-ID: <1350513289.76.0.255329949396.issue16269@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: On one hand this seems reasonable to me, on the other hand I'm not sure. select() other than being supported on all platforms has the advantage of being simple and quick to use (you just call it once by passing a set of fds and then you're done). poll() / epoll() aren't as simple as they require: - e/poll() object initialization - fds registration - fds unregistration - e/poll() object destruction Given the exact point where this is supposed to take place (here: http://hg.python.org/cpython/file/f6fcff683866/Lib/multiprocessing/connection.py#l865) I'm not sure it's really worth the effort as on one hand you fix a pretty rare scalability issue, on the other hand you introduce a considerable slowdown given the amount of operations involved and described above. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16269> _______________________________________ From report at bugs.python.org Thu Oct 18 00:45:24 2012 From: report at bugs.python.org (Todd Rovito) Date: Wed, 17 Oct 2012 22:45:24 +0000 Subject: [issue1283110] Give __len__() advice for "don't know" Message-ID: <1350513924.79.0.688600280975.issue1283110@psf.upfronthosting.co.za> Changes by Todd Rovito <rovitotv at gmail.com>: Removed file: http://bugs.python.org/file27589/DataModel__len__.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1283110> _______________________________________ From report at bugs.python.org Thu Oct 18 01:37:59 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 17 Oct 2012 23:37:59 +0000 Subject: [issue16269] multiprocessing.Queue uses select() In-Reply-To: <1350509318.53.0.123166895316.issue16269@psf.upfronthosting.co.za> Message-ID: <1350517079.34.0.849920138537.issue16269@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > select() other than being supported on all platforms has the advantage of > being simple and quick to use (you just call it once by passing a set of fds > and then you're done). Do you mean at the C level? Wouldn't you just do struct pollfd pfd = {fd, POLLIN, 0}; if (poll(&pfd, 1, timeout) < 0) {...} ready = pfd.revents != 0; That does not look any less simple and quick. > on the other hand you introduce a considerable slowdown given the amount > of operations involved and described above. poll(), unlike select(), does not have to scan an fd_set (of 1024 bits?) so I would have expected it to be faster if anything. At the python level creating a new poll object each time might indeed be slower, but one could always cache it on the queue object. BTW, are there any non-Windows platforms which support multiprocessing but don't have poll()? (On Windows WaitForSingleObject() is used instead.) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16269> _______________________________________ From report at bugs.python.org Thu Oct 18 01:43:06 2012 From: report at bugs.python.org (Christopher the Magnificent) Date: Wed, 17 Oct 2012 23:43:06 +0000 Subject: [issue16271] weird dual behavior with changing __qualname__; different values observed through attribute and descriptor Message-ID: <1350517386.42.0.0716657058677.issue16271@psf.upfronthosting.co.za> New submission from Christopher the Magnificent: The output below is NOT typed at the Python interactive interpeter. The ">>> " shows what is being evaluated and the line below it shows what the result it. The output gets generated here: (lines 418-449 of the attached file) def name_globalize_class(name, second=None): def decorator(cls): def printval(source, value=None): print(">>> " + source) if value is not None: print(repr(value)) print("in decorator: new name is:", repr(name)) print() printval("cls", cls) printval("cls.__name__", cls.__name__) printval("cls.__qualname__", cls.__qualname__) printval('type.__dict__["__qualname__"].__get__(cls)', type.__dict__["__qualname__"].__get__(cls)) print() cls.__name__ = name cls.__qualname__ = name stuff = ">>> cls.__name__ = {0}\n>>> cls.__qualname__ = {0}\n" print(stuff.format(repr(name))) printval("cls.__name__", cls.__name__) printval("cls.__qualname__", cls.__qualname__) printval('type.__dict__["__qualname__"].__get__(cls)', type.__dict__["__qualname__"].__get__(cls)) printval("cls", cls) print() globals()[name] = cls pdb.set_trace() return cls return decorator HERE IS THE OUTPUT: >>> cls <class '__main__._maketokensnodes.<locals>._TokenClass'> >>> cls.__name__ '_TokenClass' >>> cls.__qualname__ '_maketokensnodes.<locals>._TokenClass' >>> type.__dict__["__qualname__"].__get__(cls) '_maketokensnodes.<locals>._TokenClass' >>> cls.__name__ = 'KEYWORD' >>> cls.__qualname__ = 'KEYWORD' >>> cls.__name__ 'KEYWORD' >>> cls.__qualname__ 'KEYWORD' >>> type.__dict__["__qualname__"].__get__(cls) '_maketokensnodes.<locals>._TokenClass' >>> cls <class '__main__._maketokensnodes.<locals>._TokenClass'> END OF OUTPUT Note how after assigning to cls.__qualname__ it looks like the class's dictionary object has been assigned into, masking the class's C-level type attribute-level ht_qualname! My gut feeling is that this has to be some kind of a bug. Let me know if it is. ---------- components: Interpreter Core files: parser_BUGGY2.py messages: 173217 nosy: christopherthemagnificent priority: normal severity: normal status: open title: weird dual behavior with changing __qualname__; different values observed through attribute and descriptor versions: Python 3.3 Added file: http://bugs.python.org/file27604/parser_BUGGY2.py _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16271> _______________________________________ From report at bugs.python.org Thu Oct 18 02:03:50 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 18 Oct 2012 00:03:50 +0000 Subject: [issue16269] multiprocessing.Queue uses select() In-Reply-To: <1350509318.53.0.123166895316.issue16269@psf.upfronthosting.co.za> Message-ID: <1350518630.23.0.779040172532.issue16269@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > Do you mean at the C level? No, Python of course. > poll(), unlike select(), does not have to scan an fd_set > (of 1024 bits?) so I would have expected it to be faster if anything. That might be true in a continuous loop (e.g. a reactor). Judging from where this is supposed to take place (http://hg.python.org/cpython/file/f6fcff683866/Lib/multiprocessing/connection.py#l865) what you would end up doing within the wait() function is: - init_pollster() - register(fd) * num of fds - unregister(fd) * num of fds - close_pollster() ...and I suspect that's likely to be slower than just using select(), even if you cache the poll object. Anyway, I might be wrong, and figuring that out with a simple benchmark is easy. Other than that I'm not sure how often wait() gets called usually so even if a slowdown is introduced that might not even be a problem. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16269> _______________________________________ From report at bugs.python.org Thu Oct 18 02:13:13 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 18 Oct 2012 00:13:13 +0000 Subject: [issue16269] multiprocessing.Queue uses select() In-Reply-To: <1350509318.53.0.123166895316.issue16269@psf.upfronthosting.co.za> Message-ID: <1350519193.51.0.00699600295599.issue16269@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Speaking of which, it seems this is a duplicate of issue 10527. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16269> _______________________________________ From report at bugs.python.org Thu Oct 18 02:15:40 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 18 Oct 2012 00:15:40 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <1350519340.58.0.948077303224.issue10527@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' <g.rodola at gmail.com>: ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10527> _______________________________________ From report at bugs.python.org Thu Oct 18 02:20:58 2012 From: report at bugs.python.org (Todd Rovito) Date: Thu, 18 Oct 2012 00:20:58 +0000 Subject: [issue1283110] Give __len__() advice for "don't know" Message-ID: <1350519658.51.0.0572618732904.issue1283110@psf.upfronthosting.co.za> Todd Rovito added the comment: New patch with a better reference to the source for the test case. This was suggested by PythonMentors list. I think the patch improves the documentation. This works on Python 3.4. ---------- Added file: http://bugs.python.org/file27605/DataModel__len__.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1283110> _______________________________________ From report at bugs.python.org Thu Oct 18 02:25:22 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 18 Oct 2012 00:25:22 +0000 Subject: [issue15032] Provide a select.select implemented using select.poll In-Reply-To: <1339102803.48.0.0979109123526.issue15032@psf.upfronthosting.co.za> Message-ID: <1350519922.84.0.379605575586.issue15032@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: It's not clear to me how you intend to provide this exactly. To me it looks like a good candidate for a recipe, otherwise I don't see it as a good fit for the stdlib. ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15032> _______________________________________ From report at bugs.python.org Thu Oct 18 02:27:43 2012 From: report at bugs.python.org (Chris Colbert) Date: Thu, 18 Oct 2012 00:27:43 +0000 Subject: [issue16272] C-API documentation clarification for tp_dictoffset Message-ID: <1350520063.61.0.687481658196.issue16272@psf.upfronthosting.co.za> New submission from Chris Colbert: The documentation of the tp_dictoffset is a bit unclear when describing the responsibilities of a base type with a nonzero tp_dictoffset. http://docs.python.org/c-api/typeobj.html I feel there should some statement to the effect of: """ If a type defines a nonzero tp_dictoffset, that type is responsible for defining a `__dict__` slot as part of the tp_getset structures. Failure to do so will result in the dict being inaccesible from Python via `obj.__dict__` from instances of the type or subtypes. """ The reasoning is twofold: 1) `PyType_Ready` does not add the default getset members like `type_new` does. This prevents the instances of the type itself from retrieving `obj.__dict__` 2) `type_new` will provide the default `subtype_dict` getset member for subclasses, but this calls `get_builtin_base_with_dict` which will resolve to the most base type which is not heap allocated; in this case, the C type. Since this type has no `__dict__` getset member, the lookup fails. Adding a bit of verbage about this "gotcha" would likely save some headaches in the future. ---------- assignee: docs at python components: Documentation messages: 173222 nosy: Chris.Colbert, docs at python priority: normal severity: normal status: open title: C-API documentation clarification for tp_dictoffset versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16272> _______________________________________ From report at bugs.python.org Thu Oct 18 02:29:25 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 18 Oct 2012 00:29:25 +0000 Subject: [issue16269] multiprocessing.Queue uses select() In-Reply-To: <1350509318.53.0.123166895316.issue16269@psf.upfronthosting.co.za> Message-ID: <1350520165.37.0.220424617762.issue16269@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' <g.rodola at gmail.com>: ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16269> _______________________________________ From report at bugs.python.org Thu Oct 18 02:42:54 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 18 Oct 2012 00:42:54 +0000 Subject: [issue16270] ftplib hangs when closing connection In-Reply-To: <1350509929.7.0.680667591801.issue16270@psf.upfronthosting.co.za> Message-ID: <1350520974.41.0.893457101197.issue16270@psf.upfronthosting.co.za> R. David Murray added the comment: Well, urllib calls ftplib for ftp urls, so it might be about ftplib. But in that case it would be better to have a reproducer that *just* uses ftplib. ---------- nosy: +r.david.murray _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16270> _______________________________________ From report at bugs.python.org Thu Oct 18 03:03:59 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 18 Oct 2012 01:03:59 +0000 Subject: [issue16270] ftplib hangs when closing connection In-Reply-To: <1350509929.7.0.680667591801.issue16270@psf.upfronthosting.co.za> Message-ID: <1350522239.89.0.818951869341.issue16270@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I can reproduce the issue on python 3.3. To have a clearer understanding on what's going on use: import urllib.request import ftplib ftplib.FTP.debugging = 4 url = "ftp://ftp.fu-berlin.de/pub/misc/movies/database/ratings.list.gz" with urllib.request.urlopen(url): pass The problem appears to be endtransfer() erroneously calling ftp.voidresp() (it just shouldn't): http://hg.python.org/cpython/file/f6fcff683866/Lib/urllib/request.py#l2328 Patch in attachment fixes the issue. ---------- keywords: +patch Added file: http://bugs.python.org/file27606/urllib.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16270> _______________________________________ From report at bugs.python.org Thu Oct 18 03:07:46 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 18 Oct 2012 01:07:46 +0000 Subject: [issue16270] urllib hangs when closing connection In-Reply-To: <1350509929.7.0.680667591801.issue16270@psf.upfronthosting.co.za> Message-ID: <1350522466.65.0.0573011901265.issue16270@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' <g.rodola at gmail.com>: ---------- title: ftplib hangs when closing connection -> urllib hangs when closing connection _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16270> _______________________________________ From report at bugs.python.org Thu Oct 18 04:06:39 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 18 Oct 2012 02:06:39 +0000 Subject: [issue16268] dir(closure) does not find __dir__ In-Reply-To: <1350500710.5.0.876584221442.issue16268@psf.upfronthosting.co.za> Message-ID: <1350525999.62.0.331075569126.issue16268@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Here is a somewhat simpler way to reproduce (following the same definition of x): >>> dir(x) ... TypeError: object does not provide __dir__ >>> x.__dir__ <built-in method __dir__ of cell object at 0x10c182950> >>> dir(x) ['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'cell_contents'] The dir() documentation says, "If the object has a method named __dir__(), this method will be called and must return the list of attributes." (from http://docs.python.org/py3k/library/functions.html#dir ) ---------- nosy: +chris.jerdonek title: dir(closure) claims that a closure has no __dir__, only to work later after manually invoking __dir__ from its type -> dir(closure) does not find __dir__ versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16268> _______________________________________ From report at bugs.python.org Thu Oct 18 04:08:42 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 18 Oct 2012 02:08:42 +0000 Subject: [issue16273] f.tell() returning negative number on Windows build Message-ID: <1350526122.97.0.103530434711.issue16273@psf.upfronthosting.co.za> New submission from Raymond Hettinger: On a fresh 64-bit install of Windows 2.7.3 running on Windows 7, f.tell() is producing unexpected (and unusable) results: >>> f = open('sample.txt') >>> f.read(3) >>> f.read(3) >>> f.tell() -5L ---------- components: Interpreter Core messages: 173226 nosy: rhettinger priority: normal severity: normal status: open title: f.tell() returning negative number on Windows build type: behavior versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16273> _______________________________________ From report at bugs.python.org Thu Oct 18 05:31:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 Oct 2012 03:31:10 +0000 Subject: [issue16266] Rephrase sentence in tutorial about universal newlines In-Reply-To: <1350478719.85.0.211709670607.issue16266@psf.upfronthosting.co.za> Message-ID: <3XhwlK55ZzzR6F@mail.python.org> Roundup Robot added the comment: New changeset 7b2a13b20b33 by Chris Jerdonek in branch '3.2': Clarify universal-newline wording in tutorial (issue #16266). http://hg.python.org/cpython/rev/7b2a13b20b33 New changeset b5439bca219f by Chris Jerdonek in branch '3.3': Merge from 3.2: clarify universal-newline wording in tutorial (issue #16266). http://hg.python.org/cpython/rev/b5439bca219f New changeset a45cb181e4d0 by Chris Jerdonek in branch 'default': Merge from 3.3: clarify universal-newline wording in tutorial (issue #16266). http://hg.python.org/cpython/rev/a45cb181e4d0 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16266> _______________________________________ From report at bugs.python.org Thu Oct 18 05:33:00 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 18 Oct 2012 03:33:00 +0000 Subject: [issue16266] Rephrase sentence in tutorial about universal newlines In-Reply-To: <1350478719.85.0.211709670607.issue16266@psf.upfronthosting.co.za> Message-ID: <1350531180.43.0.849174237107.issue16266@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Committed. Thanks for the report! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: behavior -> enhancement _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16266> _______________________________________ From report at bugs.python.org Thu Oct 18 06:07:22 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 18 Oct 2012 04:07:22 +0000 Subject: [issue15032] Provide a select.select implemented using select.poll In-Reply-To: <1339102803.48.0.0979109123526.issue15032@psf.upfronthosting.co.za> Message-ID: <1350533242.36.0.0866195050422.issue15032@psf.upfronthosting.co.za> Gregory P. Smith added the comment: indeed, i don't know that there is any point to this idea. i'm all for just getting rid of all uses of select in the stdlib and making them poll only in 3.4 unless someone can point to a modern system that does not support poll. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15032> _______________________________________ From report at bugs.python.org Thu Oct 18 06:55:11 2012 From: report at bugs.python.org (mani and ram) Date: Thu, 18 Oct 2012 04:55:11 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1350497765.87.0.914034657546.issue16248@psf.upfronthosting.co.za> Message-ID: <CAExgZOifKPifLH+7wu7tBgMRJxhOpCvXtB+i+NogLS-MkALVmg@mail.gmail.com> mani and ram added the comment: On 17 October 2012 23:46, Guilherme Polo <report at bugs.python.org> wrote: > > Guilherme Polo added the comment: > > It is a well known fact that the readprofile function uses exec, and it > has been like that for more than 18 years. The parameters baseName and > className defines the execution of the files $HOME/.{className}.tcl, > $HOME/.{className}.py, $HOME/.{baseName}.tcl, and $HOME/.{baseName}.py. The > function's docstring actually say that. > > Said that, I never needed to load custom code during the creation of a Tk > instance. To me the existence of readprofile is unneeded. > > But what is your proposal to the issue ? > > ---------- > > _______________________________________ > Python tracker <report at bugs.python.org> > <http://bugs.python.org/issue16248> > _______________________________________ > Simply remove the readprofile code (it is not documented and I never had to use it) ---------- nosy: +maniandram _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16248> _______________________________________ From report at bugs.python.org Thu Oct 18 07:02:58 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Thu, 18 Oct 2012 05:02:58 +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: <1350536578.43.0.0744993544996.issue16248@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Apparently when replying by email my old account name is shown ("mani and ram") Just so you know that "mani and ram" is me. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16248> _______________________________________ From report at bugs.python.org Thu Oct 18 07:35:15 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 Oct 2012 05:35:15 +0000 Subject: [issue16257] test_socket.test_create_connection tests for wrong errno on Solaris In-Reply-To: <1350440291.72.0.895496145296.issue16257@psf.upfronthosting.co.za> Message-ID: <3XhzVV4p9wzMQm@mail.python.org> Roundup Robot added the comment: New changeset 8599036d9140 by Trent Nelson in branch '2.7': Issue #16257: make test_create_connection() handle ENETUNREACH. http://hg.python.org/cpython/rev/8599036d9140 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16257> _______________________________________ From report at bugs.python.org Thu Oct 18 07:44:36 2012 From: report at bugs.python.org (Benjamin Trofatter) Date: Thu, 18 Oct 2012 05:44:36 +0000 Subject: [issue1723038] Curses Menu Message-ID: <1350539076.73.0.354826941323.issue1723038@psf.upfronthosting.co.za> Benjamin Trofatter added the comment: I took the curses.panel module as a starting point as well but have made rather a bit more progress with the extension. The attached patch includes a full wrapper around the curses menu extension, tests, documentation, and the necessary additions to setup.py. Feedback would be much appreciated as I'm also most of the way through a wrapper for the curses form extension and would like to get it finished up shortly. ---------- nosy: +bentrofatter versions: +Python 3.4 -Python 3.2 Added file: http://bugs.python.org/file27607/curses_menu.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1723038> _______________________________________ From report at bugs.python.org Thu Oct 18 08:01:34 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Oct 2012 06:01:34 +0000 Subject: [issue16273] f.tell() returning negative number on Windows build In-Reply-To: <1350526122.97.0.103530434711.issue16273@psf.upfronthosting.co.za> Message-ID: <1350540094.88.0.685069015962.issue16273@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: ---------- nosy: +pitrou priority: normal -> high _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16273> _______________________________________ From report at bugs.python.org Thu Oct 18 08:32:25 2012 From: report at bugs.python.org (Brent Tubbs) Date: Thu, 18 Oct 2012 06:32:25 +0000 Subject: [issue16220] wsgiref does not call close() on iterable response In-Reply-To: <1350162020.69.0.603099084932.issue16220@psf.upfronthosting.co.za> Message-ID: <1350541945.27.0.125533325731.issue16220@psf.upfronthosting.co.za> Brent Tubbs added the comment: Updated patch with test attached. ---------- Added file: http://bugs.python.org/file27608/wsgiref_close_plus_test.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16220> _______________________________________ From report at bugs.python.org Thu Oct 18 09:35:59 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2012 07:35:59 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1350510380.99.0.14671341883.issue16166@psf.upfronthosting.co.za> Message-ID: <201210181035.42894.storchaka@gmail.com> Serhiy Storchaka added the comment: > I've replaced the macros with PY_BIG_ENDIAN or PY_LITTLE_ENDIAN. Both are > always defined and exactly one is set to 1, the other to 0. It looks like a joke. The programmer puts on the table by his bed two glasses. One with water, for the case of he will drink at night. Another empty, for the case of he will not drink. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16166> _______________________________________ From report at bugs.python.org Thu Oct 18 09:39:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2012 07:39:18 +0000 Subject: [issue16273] f.tell() returning negative number on Windows build In-Reply-To: <1350526122.97.0.103530434711.issue16273@psf.upfronthosting.co.za> Message-ID: <1350545958.19.0.265758662726.issue16273@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What tell() returns before any reading? What about non-buffered files? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16273> _______________________________________ From report at bugs.python.org Thu Oct 18 10:06:51 2012 From: report at bugs.python.org (Trent Nelson) Date: Thu, 18 Oct 2012 08:06:51 +0000 Subject: [issue16274] test_asyncore failing on Solaris 10 2.7 (nitrogen/s10) Message-ID: <1350547611.85.0.565736375067.issue16274@psf.upfronthosting.co.za> New submission from Trent Nelson: % ./python -m test.regrtest test_asyncore test_asyncore Exception in thread Thread-3: Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/threading.py", line 552, in __bootstrap_inner self.run() File "/home/cpython/hg/2.7/Lib/threading.py", line 505, in run self.__target(*self.__args, **self.__kwargs) File "/home/cpython/hg/2.7/Lib/test/test_asyncore.py", line 712, in <lambda> t = threading.Thread(target=lambda: asyncore.loop(timeout=0.1, count=500)) File "/home/cpython/hg/2.7/Lib/asyncore.py", line 220, in loop poll_fun(timeout, map) File "/home/cpython/hg/2.7/Lib/asyncore.py", line 156, in poll read(obj) File "/home/cpython/hg/2.7/Lib/asyncore.py", line 87, in read obj.handle_error() File "/home/cpython/hg/2.7/Lib/asyncore.py", line 83, in read obj.handle_read_event() File "/home/cpython/hg/2.7/Lib/asyncore.py", line 443, in handle_read_event self.handle_accept() File "/home/cpython/hg/2.7/Lib/test/test_asyncore.py", line 487, in handle_accept sock, addr = self.accept() TypeError: 'NoneType' object is not iterable Exception in thread Thread-4: Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/threading.py", line 552, in __bootstrap_inner self.run() File "/home/cpython/hg/2.7/Lib/threading.py", line 505, in run self.__target(*self.__args, **self.__kwargs) File "/home/cpython/hg/2.7/Lib/test/test_asyncore.py", line 712, in <lambda> t = threading.Thread(target=lambda: asyncore.loop(timeout=0.1, count=500)) File "/home/cpython/hg/2.7/Lib/asyncore.py", line 220, in loop poll_fun(timeout, map) File "/home/cpython/hg/2.7/Lib/asyncore.py", line 156, in poll read(obj) File "/home/cpython/hg/2.7/Lib/asyncore.py", line 87, in read obj.handle_error() File "/home/cpython/hg/2.7/Lib/asyncore.py", line 83, in read obj.handle_read_event() File "/home/cpython/hg/2.7/Lib/asyncore.py", line 443, in handle_read_event self.handle_accept() File "/home/cpython/hg/2.7/Lib/test/test_asyncore.py", line 487, in handle_accept sock, addr = self.accept() TypeError: 'NoneType' object is not iterable 1 test OK. [43391 refs] Sample buildbot run that failed: http://buildbot.python.org/all/builders/SPARC64%20Solaris%2010%20%5BSB%5D%202.7/builds/69/steps/test/logs/stdio Haven't investigated yet. ---------- assignee: trent messages: 173237 nosy: jcea, trent priority: normal severity: normal status: open title: test_asyncore failing on Solaris 10 2.7 (nitrogen/s10) versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16274> _______________________________________ From report at bugs.python.org Thu Oct 18 10:15:27 2012 From: report at bugs.python.org (Trent Nelson) Date: Thu, 18 Oct 2012 08:15:27 +0000 Subject: [issue13843] Python doesn't compile anymore on our Solaris buildbot: undefined libintl_* symbols In-Reply-To: <1327354335.3.0.0960870172041.issue13843@psf.upfronthosting.co.za> Message-ID: <1350548127.18.0.0037600447065.issue13843@psf.upfronthosting.co.za> Trent Nelson added the comment: I ran into this yesterday on my Solaris 10 box (nitrogen/s10), seemingly out of nowhere. The problem is caused when a GNU libintl.h gets picked up via `#include <libintl.h>` instead of the system one in /usr/include. In my case, this was happening because I had set CPPFLAGS to "-I/opt/csw/include -I/opt/csw/include/ncurses -I/usr/include". The fix is to order the includes as follows: "-I/opt/csw/include/ncurses -I/usr/include -I/opt/csw/include". The order is important: you want the /opt/csw/include/ncurses to come first, otherwise _curses won't build from the curses.h in /usr/include. However, for libintl.h, you want the /usr/include version, not the /opt/csw/include version. (Side note: I briefly looked at the GNU libintl.h in /opt/csw/include. The `libintl_` function prefix is driven by some #ifdef logic, so, presumably, if you really wanted to build with the GNU libintl, you could do some #define tweaking to disable the `libintl_` prefix. The libintl shipped with Solaris 10 seems to work fine, so I didn't bother with this.) Closing as fixed. ---------- nosy: +trent resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13843> _______________________________________ From report at bugs.python.org Thu Oct 18 10:28:07 2012 From: report at bugs.python.org (William Edwards) Date: Thu, 18 Oct 2012 08:28:07 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <1350548887.24.0.604477179348.issue10527@psf.upfronthosting.co.za> William Edwards added the comment: issue 16259 has just been closed as a dup of this one. Does this mean that this one will be fixed in Python 2.x too? ---------- nosy: +William.Edwards _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10527> _______________________________________ From report at bugs.python.org Thu Oct 18 10:29:00 2012 From: report at bugs.python.org (William Edwards) Date: Thu, 18 Oct 2012 08:29:00 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <1350548940.53.0.425689705291.issue10527@psf.upfronthosting.co.za> William Edwards added the comment: Apologies, I meant: issue 16269 has just been closed as a dup of this one. Does this mean that this one will be fixed in Python 2.x too? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10527> _______________________________________ From report at bugs.python.org Thu Oct 18 10:33:48 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 18 Oct 2012 08:33:48 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1350549228.81.0.3468247808.issue16203@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- components: +Regular Expressions nosy: +ezio.melotti _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16203> _______________________________________ From report at bugs.python.org Thu Oct 18 10:34:18 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 18 Oct 2012 08:34:18 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <1350549258.71.0.504067480408.issue10527@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Not necessarily. It just means the other one was a duplicate. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10527> _______________________________________ From report at bugs.python.org Thu Oct 18 10:35:44 2012 From: report at bugs.python.org (William Edwards) Date: Thu, 18 Oct 2012 08:35:44 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1350549258.71.0.504067480408.issue10527@psf.upfronthosting.co.za> Message-ID: <CAKkef2xTfU13mewijkWXy5juv=ZU7NCGiKFGd-kDweNNjhknRg@mail.gmail.com> William Edwards added the comment: That was my fear; I raise an issue hurting my 2.x servers in production, and its closed as duplicate instead of not-going-to-fix? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10527> _______________________________________ From report at bugs.python.org Thu Oct 18 10:41:41 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 18 Oct 2012 08:41:41 +0000 Subject: [issue16262] srcdir != builddir builds fail, if hg is not installed In-Reply-To: <1350464486.47.0.189031527493.issue16262@psf.upfronthosting.co.za> Message-ID: <1350549701.71.0.451211563807.issue16262@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think you mean b23ad0a6cf87 (see #12273). ---------- nosy: +ezio.melotti type: -> behavior _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16262> _______________________________________ From report at bugs.python.org Thu Oct 18 11:19:28 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 18 Oct 2012 09:19:28 +0000 Subject: [issue16274] test_asyncore failing on Solaris 10 2.7 (nitrogen/s10) In-Reply-To: <1350547611.85.0.565736375067.issue16274@psf.upfronthosting.co.za> Message-ID: <1350551968.04.0.629500785103.issue16274@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: That is weird. accept() should never return None. What about python 3.x? ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16274> _______________________________________ From report at bugs.python.org Thu Oct 18 11:24:49 2012 From: report at bugs.python.org (Trent Nelson) Date: Thu, 18 Oct 2012 09:24:49 +0000 Subject: [issue16275] test_ctypes fails on Solaris 10 SPARC 2.7 (nitrogen/s10) (Sun C compiler) Message-ID: <1350552289.03.0.785225307416.issue16275@psf.upfronthosting.co.za> New submission from Trent Nelson: This should be a fun one to track down. Relevant buildbot run: http://buildbot.python.org/all/builders/SPARC64%20Solaris%2010%20%5BSB%5D%202.7/builds/69/steps/test/logs/stdio When recompiled with gcc 4.6.3 (/opt/csw/bin/gcc), test_ctypes passes without issue (on 2.7 and 3.2). Going to try a local build of libffi from git with Sun C and --with-system-ffi to see if that helps. ====================================================================== FAIL: test_struct_return_2H (ctypes.test.test_as_parameter.AsParamPropertyWrapperTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_as_parameter.py", line 172, in test_struct_return_2H self.assertEqual((s2h.x, s2h.y), (99*2, 88*3)) AssertionError: Tuples differ: (-65, -28679) != (198, 264) First differing element 0: -65 198 - (-65, -28679) + (198, 264) ====================================================================== FAIL: test_struct_return_8H (ctypes.test.test_as_parameter.AsParamPropertyWrapperTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_as_parameter.py", line 189, in test_struct_return_8H (9*2, 8*3, 7*4, 6*5, 5*6, 4*7, 3*8, 2*9)) AssertionError: Tuples differ: (8412232, 9364168, 1, -4223016... != (18, 24, 28, 30, 30, 28, 24, 1... First differing element 0: 8412232 18 - (8412232, 9364168, 1, -4223016, -8, -32, -4222983, 5425288) + (18, 24, 28, 30, 30, 28, 24, 18) ====================================================================== FAIL: test_wchar_parm (ctypes.test.test_as_parameter.AsParamPropertyWrapperTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_as_parameter.py", line 28, in test_wchar_parm self.assertEqual(result, 139) AssertionError: 138 != 139 ====================================================================== FAIL: test_struct_return_2H (ctypes.test.test_as_parameter.AsParamWrapperTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_as_parameter.py", line 172, in test_struct_return_2H self.assertEqual((s2h.x, s2h.y), (99*2, 88*3)) AssertionError: Tuples differ: (-65, -28679) != (198, 264) First differing element 0: -65 198 - (-65, -28679) + (198, 264) ====================================================================== FAIL: test_struct_return_8H (ctypes.test.test_as_parameter.AsParamWrapperTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_as_parameter.py", line 189, in test_struct_return_8H (9*2, 8*3, 7*4, 6*5, 5*6, 4*7, 3*8, 2*9)) AssertionError: Tuples differ: (8431512, 9370440, 1, -4223016... != (18, 24, 28, 30, 30, 28, 24, 1... First differing element 0: 8431512 18 - (8431512, 9370440, 1, -4223016, -8, -32, -4222983, 5425848) + (18, 24, 28, 30, 30, 28, 24, 18) ====================================================================== FAIL: test_wchar_parm (ctypes.test.test_as_parameter.AsParamWrapperTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_as_parameter.py", line 28, in test_wchar_parm self.assertEqual(result, 139) AssertionError: 138 != 139 ====================================================================== FAIL: test_struct_return_2H (ctypes.test.test_as_parameter.BasicWrapTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_as_parameter.py", line 172, in test_struct_return_2H self.assertEqual((s2h.x, s2h.y), (99*2, 88*3)) AssertionError: Tuples differ: (-65, -28679) != (198, 264) First differing element 0: -65 198 - (-65, -28679) + (198, 264) ====================================================================== FAIL: test_struct_return_8H (ctypes.test.test_as_parameter.BasicWrapTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_as_parameter.py", line 189, in test_struct_return_8H (9*2, 8*3, 7*4, 6*5, 5*6, 4*7, 3*8, 2*9)) AssertionError: Tuples differ: (5707864, 9374608, 1, -4223016... != (18, 24, 28, 30, 30, 28, 24, 1... First differing element 0: 5707864 18 - (5707864, 9374608, 1, -4223016, -8, -32, -4222983, -25924296) + (18, 24, 28, 30, 30, 28, 24, 18) ====================================================================== FAIL: test_wchar_parm (ctypes.test.test_as_parameter.BasicWrapTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_as_parameter.py", line 28, in test_wchar_parm self.assertEqual(result, 139) AssertionError: 138 != 139 ====================================================================== FAIL: test_ints (ctypes.test.test_bitfields.C_Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_bitfields.py", line 40, in test_ints self.assertEqual((name, i, getattr(b, name)), (name, i, func(byref(b), name))) AssertionError: Tuples differ: ('A', 1, -1) != ('A', 1, 0) First differing element 2: -1 0 - ('A', 1, -1) ? ^^ + ('A', 1, 0) ? ^ ====================================================================== FAIL: test_shorts (ctypes.test.test_bitfields.C_Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_bitfields.py", line 47, in test_shorts self.assertEqual((name, i, getattr(b, name)), (name, i, func(byref(b), name))) AssertionError: Tuples differ: ('M', 1, -1) != ('M', 1, 0) First differing element 2: -1 0 - ('M', 1, -1) ? ^^ + ('M', 1, 0) ? ^ ====================================================================== FAIL: test_byte (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 36, in test_byte self.check_type(c_byte, 42) File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 22, in check_type self.assertEqual(self.got_args, (arg,)) AssertionError: Tuples differ: (0,) != (42,) First differing element 0: 0 42 - (0,) + (42,) ====================================================================== FAIL: test_char (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 91, in test_char self.check_type(c_char, "x") File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 22, in check_type self.assertEqual(self.got_args, (arg,)) AssertionError: Tuples differ: ('\x00',) != ('x',) First differing element 0: x - ('\x00',) ? - -- + ('x',) ====================================================================== FAIL: test_double (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 83, in test_double self.check_type(c_double, 3.14) File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 30, in check_type self.assertEqual(self.got_args, (-3, arg)) AssertionError: Tuples differ: (0, 3.14) != (-3, 3.14) First differing element 0: 0 -3 - (0, 3.14) ? ^ + (-3, 3.14) ? ^^ ====================================================================== FAIL: test_int (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 50, in test_int self.check_type(c_int, 42) File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 30, in check_type self.assertEqual(self.got_args, (-3, arg)) AssertionError: Tuples differ: (0, 42) != (-3, 42) First differing element 0: 0 -3 - (0, 42) ? ^ + (-3, 42) ? ^^ ====================================================================== FAIL: test_long (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 57, in test_long self.check_type(c_long, 42) File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 30, in check_type self.assertEqual(self.got_args, (-3, arg)) AssertionError: Tuples differ: (0, 42) != (-3, 42) First differing element 0: 0 -3 - (0, 42) ? ^ + (-3, 42) ? ^^ ====================================================================== FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 87, in test_longdouble self.check_type(c_longdouble, 3.14) File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 30, in check_type self.assertEqual(self.got_args, (-3, arg)) AssertionError: Tuples differ: (0, 3.14) != (-3, 3.14) First differing element 0: 0 -3 - (0, 3.14) ? ^ + (-3, 3.14) ? ^^ ====================================================================== FAIL: test_longlong (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 65, in test_longlong self.check_type(c_longlong, 5948291757245277467) File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 30, in check_type self.assertEqual(self.got_args, (-3, arg)) AssertionError: Tuples differ: (0, 5948291757245277467L) != (-3, 5948291757245277467L) First differing element 0: 0 -3 - (0, 5948291757245277467L) ? ^ + (-3, 5948291757245277467L) ? ^^ ====================================================================== FAIL: test_pyobject (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 107, in test_pyobject self.check_type(py_object, o) File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 30, in check_type self.assertEqual(self.got_args, (-3, arg)) AssertionError: Tuples differ: (0, ()) != (-3, ()) First differing element 0: 0 -3 - (0, ()) ? ^ + (-3, ()) ? ^^ ====================================================================== FAIL: test_short (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 43, in test_short self.check_type(c_short, 42) File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 22, in check_type self.assertEqual(self.got_args, (arg,)) AssertionError: Tuples differ: (0,) != (42,) First differing element 0: 0 42 - (0,) + (42,) ====================================================================== FAIL: test_ubyte (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 40, in test_ubyte self.check_type(c_ubyte, 42) File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 22, in check_type self.assertEqual(self.got_args, (arg,)) AssertionError: Tuples differ: (0,) != (42,) First differing element 0: 0 42 - (0,) + (42,) ====================================================================== FAIL: test_uint (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 54, in test_uint self.check_type(c_uint, 42) File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 30, in check_type self.assertEqual(self.got_args, (-3, arg)) AssertionError: Tuples differ: (0, 42L) != (-3, 42) First differing element 0: 0 -3 - (0, 42L) ? ^ - + (-3, 42) ? ^^ ====================================================================== FAIL: test_ulong (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 61, in test_ulong self.check_type(c_ulong, 42) File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 30, in check_type self.assertEqual(self.got_args, (-3, arg)) AssertionError: Tuples differ: (0, 42L) != (-3, 42) First differing element 0: 0 -3 - (0, 42L) ? ^ - + (-3, 42) ? ^^ ====================================================================== FAIL: test_ulonglong (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 72, in test_ulonglong self.check_type(c_ulonglong, 10955412242170339782) File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 30, in check_type self.assertEqual(self.got_args, (-3, arg)) AssertionError: Tuples differ: (0, 10955412242170339782L) != (-3, 10955412242170339782L) First differing element 0: 0 -3 - (0, 10955412242170339782L) ? ^ + (-3, 10955412242170339782L) ? ^^ ====================================================================== FAIL: test_ushort (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 47, in test_ushort self.check_type(c_ushort, 42) File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_callbacks.py", line 22, in check_type self.assertEqual(self.got_args, (arg,)) AssertionError: Tuples differ: (0,) != (42,) First differing element 0: 0 42 - (0,) + (42,) ====================================================================== FAIL: test_byte (ctypes.test.test_cfuncs.CFunctions) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_cfuncs.py", line 20, in test_byte self.assertEqual(self._dll.tf_b(-126), -42) AssertionError: 0 != -42 ====================================================================== FAIL: test_byte_plus (ctypes.test.test_cfuncs.CFunctions) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_cfuncs.py", line 26, in test_byte_plus self.assertEqual(self._dll.tf_bb(0, -126), -42) AssertionError: 0 != -42 ====================================================================== FAIL: test_longdouble (ctypes.test.test_cfuncs.CFunctions) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_cfuncs.py", line 164, in test_longdouble self.assertEqual(self._dll.tf_D(42.), 14.) AssertionError: nan != 14.0 ====================================================================== FAIL: test_longdouble_plus (ctypes.test.test_cfuncs.CFunctions) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_cfuncs.py", line 170, in test_longdouble_plus self.assertEqual(self._dll.tf_bD(0, 42.), 14.) AssertionError: nan != 14.0 ====================================================================== FAIL: test_short (ctypes.test.test_cfuncs.CFunctions) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_cfuncs.py", line 44, in test_short self.assertEqual(self._dll.tf_h(-32766), -10922) AssertionError: 0 != -10922 ====================================================================== FAIL: test_short_plus (ctypes.test.test_cfuncs.CFunctions) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_cfuncs.py", line 50, in test_short_plus self.assertEqual(self._dll.tf_bh(0, -32766), -10922) AssertionError: 0 != -10922 ====================================================================== FAIL: test_ubyte (ctypes.test.test_cfuncs.CFunctions) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_cfuncs.py", line 32, in test_ubyte self.assertEqual(self._dll.tf_B(255), 85) AssertionError: 0 != 85 ====================================================================== FAIL: test_ubyte_plus (ctypes.test.test_cfuncs.CFunctions) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_cfuncs.py", line 38, in test_ubyte_plus self.assertEqual(self._dll.tf_bB(0, 255), 85) AssertionError: 0 != 85 ====================================================================== FAIL: test_ushort (ctypes.test.test_cfuncs.CFunctions) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_cfuncs.py", line 56, in test_ushort self.assertEqual(self._dll.tf_H(65535), 21845) AssertionError: 0 != 21845 ====================================================================== FAIL: test_ushort_plus (ctypes.test.test_cfuncs.CFunctions) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_cfuncs.py", line 62, in test_ushort_plus self.assertEqual(self._dll.tf_bH(0, 65535), 21845) AssertionError: 0 != 21845 ====================================================================== FAIL: test_dllfunctions (ctypes.test.test_funcptr.CFuncPtrTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_funcptr.py", line 100, in test_dllfunctions self.assertEqual(strchr("abcdefghi", "b"), "bcdefghi") AssertionError: '' != 'bcdefghi' ====================================================================== FAIL: test_doubleresult (ctypes.test.test_functions.FunctionTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_functions.py", line 139, in test_doubleresult self.assertEqual(result, 21) AssertionError: 18.0 != 21 ====================================================================== FAIL: test_floatresult (ctypes.test.test_functions.FunctionTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_functions.py", line 127, in test_floatresult self.assertEqual(result, 21) AssertionError: 18.0 != 21 ====================================================================== FAIL: test_intresult (ctypes.test.test_functions.FunctionTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_functions.py", line 101, in test_intresult self.assertEqual(result, 21) AssertionError: 18 != 21 ====================================================================== FAIL: test_longdoubleresult (ctypes.test.test_functions.FunctionTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_functions.py", line 151, in test_longdoubleresult self.assertEqual(result, 21) AssertionError: nan != 21 ====================================================================== FAIL: test_longlongresult (ctypes.test.test_functions.FunctionTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_functions.py", line 167, in test_longlongresult self.assertEqual(result, 21) AssertionError: 18L != 21 ====================================================================== FAIL: test_struct_return_2H (ctypes.test.test_functions.FunctionTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_functions.py", line 349, in test_struct_return_2H self.assertEqual((s2h.x, s2h.y), (99*2, 88*3)) AssertionError: Tuples differ: (-65, -28679) != (198, 264) First differing element 0: -65 198 - (-65, -28679) + (198, 264) ====================================================================== FAIL: test_struct_return_8H (ctypes.test.test_functions.FunctionTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_functions.py", line 377, in test_struct_return_8H (9*2, 8*3, 7*4, 6*5, 5*6, 4*7, 3*8, 2*9)) AssertionError: Tuples differ: (5707864, 9758944, 1, -4223016... != (18, 24, 28, 30, 30, 28, 24, 1... First differing element 0: 5707864 18 - (5707864, 9758944, 1, -4223016, -8, -32, -4222983, -25924296) + (18, 24, 28, 30, 30, 28, 24, 18) ====================================================================== FAIL: test_wchar_parm (ctypes.test.test_functions.FunctionTestCatest test_ctypes failed -- multiple errors occurred se) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_functions.py", line 74, in test_wchar_parm self.assertEqual(result, 139) AssertionError: 138 != 139 ====================================================================== FAIL: test_with_prototype (ctypes.test.test_returnfuncptrs.ReturnFuncPtrTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_returnfuncptrs.py", line 15, in test_with_prototype self.assertEqual(strchr("abcdef", "b"), "bcdef") AssertionError: '' != 'bcdef' ====================================================================== FAIL: test_without_prototype (ctypes.test.test_returnfuncptrs.ReturnFuncPtrTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_returnfuncptrs.py", line 29, in test_without_prototype self.assertTrue(strchr("abcdef", "b"), "bcdef") AssertionError: bcdef ====================================================================== FAIL: test_functions (ctypes.test.test_stringptr.StringPtrTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/2.7.snakebite-solaris10-u10ga2-sparc64-1/build/Lib/ctypes/test/test_stringptr.py", line 51, in test_functions self.assertEqual(strchr("abcdef", "c"), "cdef") AssertionError: '' != 'cdef' ---------------------------------------------------------------------- Ran 340 tests in 2.623s FAILED (failures=47, skipped=2) ---------- assignee: trent messages: 173245 nosy: amaury.forgeotdarc, belopolsky, jcea, meador.inge, trent priority: normal severity: normal status: open title: test_ctypes fails on Solaris 10 SPARC 2.7 (nitrogen/s10) (Sun C compiler) versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16275> _______________________________________ From report at bugs.python.org Thu Oct 18 11:30:12 2012 From: report at bugs.python.org (Trent Nelson) Date: Thu, 18 Oct 2012 09:30:12 +0000 Subject: [issue16274] test_asyncore failing on Solaris 10 2.7 (nitrogen/s10) In-Reply-To: <1350547611.85.0.565736375067.issue16274@psf.upfronthosting.co.za> Message-ID: <1350552612.16.0.984821591897.issue16274@psf.upfronthosting.co.za> Trent Nelson added the comment: 3.2 appears fine. This behavior only seems to happen on 2.7. The affected tests are: test_quick_connect (test.test_asyncore.TestAPI_UseSelect) test_quick_connect (test.test_asyncore.TestAPI_UsePoll) Doing some more digging. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16274> _______________________________________ From report at bugs.python.org Thu Oct 18 11:33:33 2012 From: report at bugs.python.org (Antoine Dechaume) Date: Thu, 18 Oct 2012 09:33:33 +0000 Subject: [issue16276] OrderedDict constructor do not keep items order Message-ID: <1350552813.45.0.500801824963.issue16276@psf.upfronthosting.co.za> New submission from Antoine Dechaume: Example: from collections import OrderedDict print OrderedDict(a=0,b=1,c=2) I get OrderedDict([('a', 0), ('c', 2), ('b', 1)]) I expected OrderedDict([('a', 0), ('b', 1), ('c', 2)]) ---------- components: Library (Lib) messages: 173247 nosy: ADechaume priority: normal severity: normal status: open title: OrderedDict constructor do not keep items order type: behavior versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16276> _______________________________________ From report at bugs.python.org Thu Oct 18 11:38:36 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 18 Oct 2012 09:38:36 +0000 Subject: [issue16276] OrderedDict constructor do not keep items order In-Reply-To: <1350552813.45.0.500801824963.issue16276@psf.upfronthosting.co.za> Message-ID: <1350553116.34.0.682098217906.issue16276@psf.upfronthosting.co.za> Ezio Melotti added the comment: This is documented at http://docs.python.org/dev/library/collections#collections.OrderedDict: """The OrderedDict constructor and update() method both accept keyword arguments, but their order is lost because Python?s function call semantics pass-in keyword arguments using a regular unordered dictionary.""" ---------- nosy: +ezio.melotti resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16276> _______________________________________ From report at bugs.python.org Thu Oct 18 11:56:12 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 18 Oct 2012 09:56:12 +0000 Subject: [issue16274] test_asyncore failing on Solaris 10 2.7 (nitrogen/s10) In-Reply-To: <1350547611.85.0.565736375067.issue16274@psf.upfronthosting.co.za> Message-ID: <1350554172.69.0.377399829572.issue16274@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I notice there are some differences in sock_accept() (Modules/socketmodule.c) between 2.7 and 3.2. Maybe a bugfix which wasn't backported to 2.7. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16274> _______________________________________ From report at bugs.python.org Thu Oct 18 11:57:08 2012 From: report at bugs.python.org (Trent Nelson) Date: Thu, 18 Oct 2012 09:57:08 +0000 Subject: [issue16274] test_asyncore failing on Solaris 10 2.7 (nitrogen/s10) In-Reply-To: <1350547611.85.0.565736375067.issue16274@psf.upfronthosting.co.za> Message-ID: <1350554228.54.0.278662358724.issue16274@psf.upfronthosting.co.za> Trent Nelson added the comment: Yeah I've just backported the semantic changes between asyncore and test_asyncore from 3.2 -> 2.7. I'll report back shortly with results. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16274> _______________________________________ From report at bugs.python.org Thu Oct 18 12:02:21 2012 From: report at bugs.python.org (Trent Nelson) Date: Thu, 18 Oct 2012 10:02:21 +0000 Subject: [issue16274] test_asyncore failing on Solaris 10 2.7 (nitrogen/s10) In-Reply-To: <1350547611.85.0.565736375067.issue16274@psf.upfronthosting.co.za> Message-ID: <1350554541.69.0.891827437408.issue16274@psf.upfronthosting.co.za> Trent Nelson added the comment: Ok, attached patch is a semantic backport matching 2.7 to 3.2. All tests pass with this patch. (I can't comment on whether or not the changes in 3.2 actually fix an underlying issue, or just hide it better.) ---------- keywords: +patch Added file: http://bugs.python.org/file27609/issue16274_asyncore.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16274> _______________________________________ From report at bugs.python.org Thu Oct 18 12:08:13 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 Oct 2012 10:08:13 +0000 Subject: [issue16274] test_asyncore failing on Solaris 10 2.7 (nitrogen/s10) In-Reply-To: <1350547611.85.0.565736375067.issue16274@psf.upfronthosting.co.za> Message-ID: <3Xj5YT0xJPzR4L@mail.python.org> Roundup Robot added the comment: New changeset 90a46f8943d0 by Trent Nelson in branch '2.7': Issue #16274: backport of 3.2's asyncore/test_asyncore to 2.7. http://hg.python.org/cpython/rev/90a46f8943d0 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16274> _______________________________________ From report at bugs.python.org Thu Oct 18 12:09:15 2012 From: report at bugs.python.org (Trent Nelson) Date: Thu, 18 Oct 2012 10:09:15 +0000 Subject: [issue16274] test_asyncore failing on Solaris 10 2.7 (nitrogen/s10) In-Reply-To: <1350547611.85.0.565736375067.issue16274@psf.upfronthosting.co.za> Message-ID: <1350554955.34.0.682765161608.issue16274@psf.upfronthosting.co.za> Trent Nelson added the comment: Patch applied and everything passes, so closing for now. ---------- status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16274> _______________________________________ From report at bugs.python.org Thu Oct 18 13:06:50 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2012 11:06:50 +0000 Subject: [issue15958] bytes.join() should allow arbitrary buffer objects In-Reply-To: <1347905010.83.0.632444428638.issue15958@psf.upfronthosting.co.za> Message-ID: <1350558410.75.0.106090702538.issue15958@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yet one issue. You forgot to add join.h to BYTESTR_DEPS in Makefile.pre.in. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15958> _______________________________________ From report at bugs.python.org Thu Oct 18 13:45:20 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 Oct 2012 11:45:20 +0000 Subject: [issue16274] test_asyncore failing on Solaris 10 2.7 (nitrogen/s10) In-Reply-To: <1350547611.85.0.565736375067.issue16274@psf.upfronthosting.co.za> Message-ID: <3Xj7jW3ZP3zR3M@mail.python.org> Roundup Robot added the comment: New changeset 2f0770cc6d3f by Trent Nelson in branch '2.7': Issue #16274: revert r79813:90a46f8943d0 changes to asyncore/test_asyncore. http://hg.python.org/cpython/rev/2f0770cc6d3f ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16274> _______________________________________ From report at bugs.python.org Thu Oct 18 13:47:28 2012 From: report at bugs.python.org (Trent Nelson) Date: Thu, 18 Oct 2012 11:47:28 +0000 Subject: [issue16274] test_asyncore failing on Solaris 10 2.7 (nitrogen/s10) In-Reply-To: <1350547611.85.0.565736375067.issue16274@psf.upfronthosting.co.za> Message-ID: <1350560848.78.0.822177092052.issue16274@psf.upfronthosting.co.za> Trent Nelson added the comment: That backport wasn't appropriate -- it included new public members to asyncore that were introduced in 3.2. I'll work on a less intrusive patch. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16274> _______________________________________ From report at bugs.python.org Thu Oct 18 13:53:36 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 18 Oct 2012 11:53:36 +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: <1350561216.05.0.507344101313.issue16235@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +doko stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16235> _______________________________________ From report at bugs.python.org Thu Oct 18 13:59:50 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2012 11:59:50 +0000 Subject: [issue16277] Objects/longobject.c not compiled without long long Message-ID: <1350561590.48.0.466518610474.issue16277@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Preprocessor directives emit error in PyLong_FromVoidPtr: PyLong_FromVoidPtr: sizeof(void*) > sizeof(long), but no long long if HAVE_LONG_LONG not defined. Here is a patch which adds missing branch (lost somewhere in 2->3 translation). Also removed non-needed optimization which can cause undefined behavior (C Standard not guarantee (long long)NULL == 0). ---------- components: Interpreter Core files: long_fromvoidptr.patch keywords: patch messages: 173257 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Objects/longobject.c not compiled without long long type: compile error versions: Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27610/long_fromvoidptr.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16277> _______________________________________ From report at bugs.python.org Thu Oct 18 14:02:18 2012 From: report at bugs.python.org (Antonio Cuni) Date: Thu, 18 Oct 2012 12:02: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: <1350561738.5.0.846324711696.issue9011@psf.upfronthosting.co.za> Antonio Cuni added the comment: there is still an inconsistency in handling negative imaginary literals: >>> -1j.real -0.0 >>> complex('-1j').real 0.0 ---------- nosy: +antocuni _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9011> _______________________________________ From report at bugs.python.org Thu Oct 18 14:04:01 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Oct 2012 12:04:01 +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: <1350561841.76.0.25737594457.issue9011@psf.upfronthosting.co.za> Mark Dickinson added the comment: No, that's expected behaviour. 1j is complex(0.0, 1.0) -1j is complex(-0.0, -1.0) so -1j.real is -0.0. There's not really any other sensible way to handle this. The complex-from-string constructor, on the other hand, is more careful about interpreting signs. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9011> _______________________________________ From report at bugs.python.org Thu Oct 18 14:13:35 2012 From: report at bugs.python.org (Antonio Cuni) Date: Thu, 18 Oct 2012 12:13:35 +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: <1350562415.8.0.119482987512.issue9011@psf.upfronthosting.co.za> Antonio Cuni added the comment: I would say that the complex-from-string constructor should be fixed to handle this special case "correctly". I find very confusing that we get a different result whether we use a string literal or not. For example, in pypy we use the same code for parsing literals and converting strings, so you get -0.0 in both cases. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9011> _______________________________________ From report at bugs.python.org Thu Oct 18 14:18:24 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Oct 2012 12:18:24 +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: <1350562704.79.0.89580594441.issue9011@psf.upfronthosting.co.za> Mark Dickinson added the comment: With the string, the minus sign applies only to the imaginary part; with the expression '-1j', it applies to the whole complex number (both real and imaginary parts). I don't see any sensible way to 'fix' the string to complex conversion; indeed, I think any change would make it worse than before. It's a known issue with complex arithmetic that x + 1j*y doesn't give you complex(x, y); the conversions from string and the complex(x, y) form are there to make it possible to carefully create a complex number with known real and imaginary parts. > For example, in pypy we use the same code for parsing literals and > converting strings, so you get -0.0 in both cases. But -1j isn't a literal. It's unary minus applied to a the complex number given by the literal '1j'. Python's code *does* give the same results both for converting strings and parsing literals. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9011> _______________________________________ From report at bugs.python.org Thu Oct 18 14:22:20 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 18 Oct 2012 12:22:20 +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: <1350562940.39.0.366558126907.issue9011@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Indeed, -1j is not a literal: >>> dis.dis(lambda :-1j.real) 1 0 LOAD_CONST 0 (1j) 3 LOAD_ATTR 0 (real) 6 UNARY_NEGATIVE 7 RETURN_VALUE ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9011> _______________________________________ From report at bugs.python.org Thu Oct 18 14:31:49 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Oct 2012 12:31:49 +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: <1350563509.15.0.439850077314.issue9011@psf.upfronthosting.co.za> Mark Dickinson added the comment: And -1j.real is -(1j.real), of course, not (-1j).real. My bad. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9011> _______________________________________ From report at bugs.python.org Thu Oct 18 14:46:16 2012 From: report at bugs.python.org (Trent Nelson) Date: Thu, 18 Oct 2012 12:46:16 +0000 Subject: [issue1516] make _ctypes work with non-gcc compilers In-Reply-To: <1196297579.57.0.775741892495.issue1516@psf.upfronthosting.co.za> Message-ID: <1350564376.19.0.0547692669968.issue1516@psf.upfronthosting.co.za> Changes by Trent Nelson <trent at snakebite.org>: ---------- nosy: +trent _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1516> _______________________________________ From report at bugs.python.org Thu Oct 18 14:49:55 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 18 Oct 2012 12:49:55 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <1350564595.6.0.0782573867769.issue10527@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: If an issue is a duplicate of another one it gets closed as a duplicate, and that's it basically. This issue is still open and this is where the matter should be discussed. ---------- nosy: +sbt _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10527> _______________________________________ From report at bugs.python.org Thu Oct 18 14:52:02 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 18 Oct 2012 12:52:02 +0000 Subject: [issue16112] platform.architecture does not correctly escape argument to /usr/bin/file In-Reply-To: <1349818492.6.0.718153686867.issue16112@psf.upfronthosting.co.za> Message-ID: <507FFB6C.7060202@egenix.com> Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> The main reason for keeping the compatibility is that the module is >> also being used outside the stdlib for Python versions starting from >> 2.4 and later. I don't want to maintain two separate versions. > > Which projects use their own copy of platform.py? Where does this file come from? It's originally from the mxCGIPython project I ran a few years ago and which now lives on in form of the eGenix PyRun project. Since the main purpose of platform.py is to identify the underlying Python runtime and OS platform across multiple Python runtimes and OS platforms, it's meant to always be used in latest version, even against older Python versions. > Using subprocess sounds safer than adding a (theorical) TOCTTOU issue: > http://en.wikipedia.org/wiki/Time_of_check_to_time_of_use > > If you are concerned about compatibility with Python 2.4, you should maintain platform outside the stdlib. The stdlib is regulary updated to the most recent syntax/modules. For example, "yield from" is now used in the stdlib of Python 3.4. The Python 2.4 compatibility requirement only applies to Python 2.x, not Python 3.x. Since Python 2.4 does ship with subprocess, I guess we could use subprocess even in Python 2.7, but I'm not sure whether it's a good idea to change the code in such a major way for a patch level release. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Oct 18 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-09-27: Released eGenix PyRun 1.1.0 ... http://egenix.com/go35 2012-09-26: Released mxODBC.Connect 2.0.1 ... http://egenix.com/go34 2012-09-25: Released mxODBC 3.2.1 ... http://egenix.com/go33 2012-10-23: Python Meeting Duesseldorf ... 5 days to go 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 <report at bugs.python.org> <http://bugs.python.org/issue16112> _______________________________________ From report at bugs.python.org Thu Oct 18 14:56:31 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Oct 2012 12:56:31 +0000 Subject: [issue16277] Objects/longobject.c not compiled without long long In-Reply-To: <1350561590.48.0.466518610474.issue16277@psf.upfronthosting.co.za> Message-ID: <1350564991.53.0.447049972916.issue16277@psf.upfronthosting.co.za> Mark Dickinson added the comment: First part of the patch looks fine to me. For the second part, I don't see any undefined behaviour here. Can you explain where the undefined behaviour comes from? And are you sure that this is really just an optimization? It looks as though it might be deliberately there to make sure that the conversion still produces a Python 0 even on systems where the NULL pointer *doesn't* give 0 when converted to an integer. ---------- nosy: +mark.dickinson _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16277> _______________________________________ From report at bugs.python.org Thu Oct 18 15:22:54 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Oct 2012 13:22:54 +0000 Subject: [issue16277] Objects/longobject.c not compiled without long long In-Reply-To: <1350561590.48.0.466518610474.issue16277@psf.upfronthosting.co.za> Message-ID: <1350566574.06.0.732232229804.issue16277@psf.upfronthosting.co.za> Mark Dickinson added the comment: Actually, I think that special case needs to be added to the first branch as well. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16277> _______________________________________ From report at bugs.python.org Thu Oct 18 15:51:37 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2012 13:51:37 +0000 Subject: [issue16277] Objects/longobject.c not compiled without long long In-Reply-To: <1350564991.53.0.447049972916.issue16277@psf.upfronthosting.co.za> Message-ID: <201210181651.20215.storchaka@gmail.com> Serhiy Storchaka added the comment: > For the second part, I don't see any undefined behaviour here. Can you > explain where the undefined behaviour comes from? And are you sure that > this is really just an optimization? It looks as though it might be > deliberately there to make sure that the conversion still produces a > Python 0 even on systems where the NULL pointer *doesn't* give 0 when > converted to an integer. If on some platform (uintptr_t)NULL != 0, then some other address can be reflected to 0. In shuch case PyLong_FromVoidPtr() returns zero integer for both NULL and this non-NULL addresses. Of course this is a hypothetic situation. What about (Py_uintptr_t)p - (Py_uintptr_t)(void *)NULL? Then we should change PyLong_AsVoidPtr() too. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16277> _______________________________________ From report at bugs.python.org Thu Oct 18 15:59:39 2012 From: report at bugs.python.org (Trent Nelson) Date: Thu, 18 Oct 2012 13:59:39 +0000 Subject: [issue16275] test_ctypes fails on Solaris 10 SPARC 2.7 (nitrogen/s10) (Sun C compiler) In-Reply-To: <1350552289.03.0.785225307416.issue16275@psf.upfronthosting.co.za> Message-ID: <1350568779.6.0.529774770615.issue16275@psf.upfronthosting.co.za> Trent Nelson added the comment: With the latest build (from git) of libffi, tests still fail, but differently. (These errors seem slightly less perverse than the ones pasted previously.) ====================================================================== FAIL: test_wchar_parm (ctypes.test.test_as_parameter.AsParamPropertyWrapperTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_as_parameter.py", line 28, in test_wchar_parm self.assertEqual(result, 139) AssertionError: 138 != 139 ====================================================================== FAIL: test_wchar_parm (ctypes.test.test_as_parameter.AsParamWrapperTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_as_parameter.py", line 28, in test_wchar_parm self.assertEqual(result, 139) AssertionError: 138 != 139 ====================================================================== FAIL: test_wchar_parm (ctypes.test.test_as_parameter.BasicWrapTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_as_parameter.py", line 28, in test_wchar_parm self.assertEqual(result, 139) AssertionError: 138 != 139 ====================================================================== FAIL: test_ints (ctypes.test.test_bitfields.C_Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_bitfields.py", line 40, in test_ints self.assertEqual((name, i, getattr(b, name)), (name, i, func(byref(b), name))) AssertionError: Tuples differ: ('A', 1, -1) != ('A', 1, 0) First differing element 2: -1 0 - ('A', 1, -1) ? ^^ + ('A', 1, 0) ? ^ ====================================================================== FAIL: test_shorts (ctypes.test.test_bitfields.C_Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_bitfields.py", line 47, in test_shorts self.assertEqual((name, i, getattr(b, name)), (name, i, func(byref(b), name))) AssertionError: Tuples differ: ('M', 1, -1) != ('M', 1, 0) First differing element 2: -1 0 - ('M', 1, -1) ? ^^ + ('M', 1, 0) ? ^ ====================================================================== FAIL: test_byte (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 36, in test_byte self.check_type(c_byte, 42) File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 22, in check_type self.assertEqual(self.got_args, (arg,)) AssertionError: Tuples differ: (0,) != (42,) First differing element 0: 0 42 - (0,) + (42,) ====================================================================== FAIL: test_char (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 91, in test_char self.check_type(c_char, "x") File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 22, in check_type self.assertEqual(self.got_args, (arg,)) AssertionError: Tuples differ: ('\x00',) != ('x',) First differing element 0: x - ('\x00',) ? - -- + ('x',) ====================================================================== FAIL: test_double (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 83, in test_double self.check_type(c_double, 3.14) File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 30, in check_type self.assertEqual(self.got_args, (-3, arg)) AssertionError: Tuples differ: (0, 3.14) != (-3, 3.14) First differing element 0: 0 -3 - (0, 3.14) ? ^ + (-3, 3.14) ? ^^ ====================================================================== FAIL: test_int (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 50, in test_int self.check_type(c_int, 42) File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 30, in check_type self.assertEqual(self.got_args, (-3, arg)) AssertionError: Tuples differ: (0, 42) != (-3, 42) First differing element 0: 0 -3 - (0, 42) ? ^ + (-3, 42) ? ^^ ====================================================================== FAIL: test_long (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 57, in test_long self.check_type(c_long, 42) File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 30, in check_type self.assertEqual(self.got_args, (-3, arg)) AssertionError: Tuples differ: (0, 42) != (-3, 42) First differing element 0: 0 -3 - (0, 42) ? ^ + (-3, 42) ? ^^ ====================================================================== FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 87, in test_longdouble self.check_type(c_longdouble, 3.14) File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 30, in check_type self.assertEqual(self.got_args, (-3, arg)) AssertionError: Tuples differ: (0, 3.14) != (-3, 3.14) First differing element 0: 0 -3 - (0, 3.14) ? ^ + (-3, 3.14) ? ^^ ====================================================================== FAIL: test_longlong (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 65, in test_longlong self.check_type(c_longlong, 5948291757245277467) File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 30, in check_type self.assertEqual(self.got_args, (-3, arg)) AssertionError: Tuples differ: (0, 5948291757245277467L) != (-3, 5948291757245277467L) First differing element 0: 0 -3 - (0, 5948291757245277467L) ? ^ + (-3, 5948291757245277467L) ? ^^ ====================================================================== FAIL: test_pyobject (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 107, in test_pyobject self.check_type(py_object, o) File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 30, in check_type self.assertEqual(self.got_args, (-3, arg)) AssertionError: Tuples differ: (0, ()) != (-3, ()) First differing element 0: 0 -3 - (0, ()) ? ^ + (-3, ()) ? ^^ ====================================================================== FAIL: test_short (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 43, in test_short self.check_type(c_short, 42) File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 22, in check_type self.assertEqual(self.got_args, (arg,)) AssertionError: Tuples differ: (0,) != (42,) First differing element 0: 0 42 - (0,) + (42,) ====================================================================== FAIL: test_ubyte (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 40, in test_ubyte self.check_type(c_ubyte, 42) File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 22, in check_type self.assertEqual(self.got_args, (arg,)) AssertionError: Tuples differ: (0,) != (42,) First differing element 0: 0 42 - (0,) + (42,) ====================================================================== FAIL: test_uint (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 54, in test_uint self.check_type(c_uint, 42) File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 30, in check_type self.assertEqual(self.got_args, (-3, arg)) AssertionError: Tuples differ: (0, 42L) != (-3, 42) First differing element 0: 0 -3 - (0, 42L) ? ^ - + (-3, 42) ? ^^ ====================================================================== FAIL: test_ulong (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 61, in test_ulong self.check_type(c_ulong, 42) File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 30, in check_type self.assertEqual(self.got_args, (-3, arg)) AssertionError: Tuples differ: (0, 42L) != (-3, 42) First differing element 0: 0 -3 - (0, 42L) ? ^ - + (-3, 42) ? ^^ ====================================================================== FAIL: test_ulonglong (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 72, in test_ulonglong self.check_type(c_ulonglong, 10955412242170339782) File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 30, in check_type self.assertEqual(self.got_args, (-3, arg)) AssertionError: Tuples differ: (0, 10955412242170339782L) != (-3, 10955412242170339782L) First differing element 0: 0 -3 - (0, 10955412242170339782L) ? ^ + (-3, 10955412242170339782L) ? ^^ ====================================================================== FAIL: test_ushort (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 47, in test_ushort self.check_type(c_ushort, 42) File "/home/cpython/hg/2.7/Lib/ctypes/test/test_callbacks.py", line 22, in check_type self.assertEqual(self.got_args, (arg,)) AssertionError: Tuples differ: (0,) != (42,) First differing element 0: 0 42 - (0,) + (42,) ====================================================================== FAIL: test_byte (ctypes.test.test_cfuncs.CFunctions) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_cfuncs.py", line 20, in test_byte self.assertEqual(self._dll.tf_b(-126), -42) AssertionError: 0 != -42 ====================================================================== FAIL: test_byte_plus (ctypes.test.test_cfuncs.CFunctions) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_cfuncs.py", line 26, in test_byte_plus self.assertEqual(self._dll.tf_bb(0, -126), -42) AssertionError: 0 != -42 ====================================================================== FAIL: test_short (ctypes.test.test_cfuncs.CFunctions) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_cfuncs.py", line 44, in test_short self.assertEqual(self._dll.tf_h(-32766), -10922) AssertionError: 0 != -10922 ====================================================================== FAIL: test_short_plus (ctypes.test.test_cfuncs.CFunctions) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_cfuncs.py", line 50, in test_short_plus self.assertEqual(self._dll.tf_bh(0, -32766), -10922) AssertionError: 0 != -10922 ====================================================================== FAIL: test_ubyte (ctypes.test.test_cfuncs.CFunctions) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_cfuncs.py", line 32, in test_ubyte self.assertEqual(self._dll.tf_B(255), 85) AssertionError: 0 != 85 ====================================================================== FAIL: test_ubyte_plus (ctypes.test.test_cfuncs.CFunctions) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_cfuncs.py", line 38, in test_ubyte_plus self.assertEqual(self._dll.tf_bB(0, 255), 85) AssertionError: 0 != 85 ====================================================================== FAIL: test_ushort (ctypes.test.test_cfuncs.CFunctions) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_cfuncs.py", line 56, in test_ushort self.assertEqual(self._dll.tf_H(65535), 21845) AssertionError: 0 != 21845 ====================================================================== FAIL: test_ushort_plus (ctypes.test.test_cfuncs.CFunctions) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_cfuncs.py", line 62, in test_ushort_plus self.assertEqual(self._dll.tf_bH(0, 65535), 21845) AssertionError: 0 != 21845 ====================================================================== FAIL: test_dllfunctions (ctypes.test.test_funcptr.CFuncPtrTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_funcptr.py", line 100, in test_dllfunctions self.assertEqual(strchr("abcdefghi", "b"), "bcdefghi") AssertionError: '' != 'bcdefghi' ====================================================================== FAIL: test_doubleresult (ctypes.test.test_functions.FunctionTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_functions.py", line 139, in test_doubleresult self.assertEqual(result, 21) AssertionError: 18.0 != 21 ====================================================================== FAIL: test_floatresult (ctypes.test.test_functions.FunctionTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_functions.py", line 127, in test_floatresult self.assertEqual(result, 21) AssertionError: 18.0 != 21 ====================================================================== FAIL: test_intresult (ctypes.test.test_functions.FunctionTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_functions.py", line 101, in test_intresult self.assertEqual(result, 21) AssertionError: 18 != 21 ====================================================================== FAIL: test_longdoubleresult (ctypes.test.test_functions.FunctionTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_functions.py", line 151, in test_longdoubleresult self.assertEqual(result, 21) AssertionError: 18.0 != 21 ====================================================================== FAIL: test_longlongresult (ctypes.test.test_functions.FunctionTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_functions.py", line 167, in test_longlongresult self.assertEqual(result, 21) AssertionError: 18L != 21 ====================================================================== FAIL: test_wchar_parm (ctypes.test.test_functions.FunctionTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_functions.py", line 74, in test_wchar_parm self.assertEqual(result, 139) AssertionError: 138 != 139 ====================================================================== FAIL: test_with_prototype (ctypes.test.test_returnfuncptrs.ReturnFuncPtrTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_returnfuncptrs.py", line 15, in test_with_prototype self.assertEqual(strchr("abcdef", "b"), "bcdef") AssertionError: '' != 'bcdef' ====================================================================== FAIL: test_without_prototype (ctypes.test.test_returnfuncptrs.ReturnFuncPtrTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_returnfuncptrs.py", line 29, in test_without_prototype self.assertTrue(strchr("abcdef", "b"), "bcdef") AssertionError: bcdef ====================================================================== FAIL: test_functions (ctypes.test.test_stringptr.StringPtrTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/hg/2.7/Lib/ctypes/test/test_stringptr.py", line 51, in test_functions self.assertEqual(strchr("abcdef", "c"), "cdef") AssertionError: '' != 'cdef' ---------------------------------------------------------------------- Ran 340 tests in 2.567s FAILED (failures=37, skipped=2) ---------- nosy: +theller _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16275> _______________________________________ From report at bugs.python.org Thu Oct 18 16:03:33 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Oct 2012 14:03:33 +0000 Subject: [issue16277] Objects/longobject.c not compiled without long long In-Reply-To: <1350561590.48.0.466518610474.issue16277@psf.upfronthosting.co.za> Message-ID: <1350569013.6.0.550534957781.issue16277@psf.upfronthosting.co.za> Mark Dickinson added the comment: > If on some platform (uintptr_t)NULL != 0, then some other address can be > reflected to 0. This doesn't seem very likely, since then the C implementation wouldn't roundtrip when converting that other pointer to an integer and back to a pointer. (C99 6.3.2.3 says that (void *)0 is a null pointer constant.) The code you removed is not undefined behaviour, and is not just an optimization---removing it would change the semantics of PyLong_FromVoidPtr. There may be code that depends on PyLong_FromVoidPtr(NULL) being 0. I believe the code should stay. > What about (Py_uintptr_t)p - (Py_uintptr_t)(void *)NULL? What about it? What's the relevance to this issue? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16277> _______________________________________ From report at bugs.python.org Thu Oct 18 16:38:32 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2012 14:38:32 +0000 Subject: [issue16277] Objects/longobject.c not compiled without long long In-Reply-To: <1350569013.6.0.550534957781.issue16277@psf.upfronthosting.co.za> Message-ID: <201210181738.14883.storchaka@gmail.com> Serhiy Storchaka added the comment: > This doesn't seem very likely, since then the C implementation wouldn't > roundtrip when converting that other pointer to an integer and back to a > pointer. (C99 6.3.2.3 says that (void *)0 is a null pointer constant.) "0" lexeme is not 0 integer. In expression "(void*)0" "0" means null pointer. You can't do printf("%p", 0), because in this case compiler does not know what 0 you have in mind. > The code you removed is not undefined behaviour, and is not just an > optimization---removing it would change the semantics of > PyLong_FromVoidPtr. There may be code that depends on > PyLong_FromVoidPtr(NULL) being 0. I believe the code should stay. I think it was wrong implementation, even if only in theoretical considerations. I believe Python does not support platforms where it matters. The removed code creates the impression that the problem is solved, but in fact it is not. Yes, we can leave it, but it doesn't make sense. > > What about (Py_uintptr_t)p - (Py_uintptr_t)(void *)NULL? > What about it? What's the relevance to this issue? This provides the invariant PyLong_FromVoidPtr(NULL) == PyLong_FromLong(0) and does not cost anything on platforms where (Py_uintptr_t)(void *)NULL == 0. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16277> _______________________________________ From report at bugs.python.org Thu Oct 18 16:47:40 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 18 Oct 2012 14:47:40 +0000 Subject: [issue16275] test_ctypes fails on Solaris 10 SPARC 2.7 (nitrogen/s10) (Sun C compiler) In-Reply-To: <1350552289.03.0.785225307416.issue16275@psf.upfronthosting.co.za> Message-ID: <1350571660.3.0.00715010586627.issue16275@psf.upfronthosting.co.za> Stefan Krah added the comment: --with-system-ffi should probably solve some problems, see #12927. The summary of that issue is that the unpatched libffi is not compatible with suncc and any issues should be reported upstream (at least that was Meador's and my own opinion). ---------- nosy: +skrah _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16275> _______________________________________ From report at bugs.python.org Thu Oct 18 16:49:54 2012 From: report at bugs.python.org (Trent Nelson) Date: Thu, 18 Oct 2012 14:49:54 +0000 Subject: [issue16275] test_ctypes fails on Solaris 10 SPARC 2.7 (nitrogen/s10) (Sun C compiler) In-Reply-To: <1350552289.03.0.785225307416.issue16275@psf.upfronthosting.co.za> Message-ID: <1350571794.47.0.0335488613321.issue16275@psf.upfronthosting.co.za> Trent Nelson added the comment: After an hour of fiddling with pre-requisites, I was able to run the libffi testsuite (for the Sun C build). The results weren't ideal: === libffi Summary === # of expected passes 1528 # of unexpected failures 118 # of unsupported tests 55 And for the gcc 4.6 build: === libffi Summary === # of expected passes 1659 # of unsupported tests 55 I'm giving up. (For now.) Hopefully I'll be able to rope the libffi folk onto Snakebite in the future. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16275> _______________________________________ From report at bugs.python.org Thu Oct 18 16:56:33 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Oct 2012 14:56:33 +0000 Subject: [issue16277] Objects/longobject.c not compiled without long long In-Reply-To: <1350561590.48.0.466518610474.issue16277@psf.upfronthosting.co.za> Message-ID: <1350572193.35.0.503899791259.issue16277@psf.upfronthosting.co.za> Mark Dickinson added the comment: > "0" lexeme is not 0 integer. Ah yes, true. C99 6.3.2.3 specifies an "integer *constant* expression". So I was mistaken in thinking that converting an arbitrary integer-valued expression with value 0 to (void*) must always give a NULL pointer. > I think it was wrong implementation, even if only in theoretical > considerations. Okay, but do you agree that (1) there's no undefined behaviour, and (2) removing this code has the potential to change results on platforms where converting NULL to an integer doesn't give zero? If you agree with those two things, then this is a behaviour change, not a bugfix, and you should open a new issue aimed at 3.4 for that. > I believe Python does not support platforms where it matters. What's your justification for this belief? > This provides the invariant PyLong_FromVoidPtr(NULL) == PyLong_FromLong(0) and does not cost anything on platforms where (Py_uintptr_t)(void *)NULL == 0. Sorry, but this is making no sense to me. You wrote: "(Py_uintptr_t)p - (Py_uintptr_t)(void *)NULL". Is that supposed to be existing code that you're proposing changing? An example to prove some point (what point?) Code you're proposing to add somewhere? (If so, where are you proposing to add it?) Why are you subtracting these two pointers? What's p? I'm finding it hard to make sense of what you're writing. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16277> _______________________________________ From report at bugs.python.org Thu Oct 18 16:58:24 2012 From: report at bugs.python.org (Trent Nelson) Date: Thu, 18 Oct 2012 14:58:24 +0000 Subject: [issue16275] test_ctypes fails on Solaris 10 SPARC 2.7 (nitrogen/s10) (Sun C compiler) In-Reply-To: <1350571660.3.0.00715010586627.issue16275@psf.upfronthosting.co.za> Message-ID: <20121018145816.GA92513@snakebite.org> Trent Nelson added the comment: On Thu, Oct 18, 2012 at 07:47:40AM -0700, Stefan Krah wrote: > > Stefan Krah added the comment: > > --with-system-ffi should probably solve some problems, see #12927. This isn't an option on Solaris 10, as it doesn't ship with a "system ffi", unfortunately. (That being said, after building the latest libffi with Sun C, I do use --with-system-ffi in order to override the building of Modules/_ctypes/libffi.) > > The summary of that issue is that the unpatched libffi is not > compatible with suncc and any issues should be reported upstream > (at least that was Meador's and my own opinion). Sun CC is supported by libffi for SPARC only. You're right regarding x86/x64 though; libffi explicitly doesn't support using anything other than gcc on Solaris if it's x86. (Unfortunately, my only SPARC boxes are running Solaris 9 and 10. I don't have new-enough SPARC CPUs that can run Solaris 11. If I did, this would probably be moot, as I could just use the system libffi Sun provide.) Side note: on my Solaris 11 x64 box, --with-system-ffi works (once -I and -L are tweaked), but test_ctypes still fails if you're building with Sun CC. ---------- title: test_ctypes fails on Solaris 10 SPARC 2.7 (nitrogen/s10) (Sun C compiler) -> test_ctypes fails on Solaris 10 SPARC 2.7 (nitrogen/s10) (Sun C compiler) _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16275> _______________________________________ From report at bugs.python.org Thu Oct 18 17:04:30 2012 From: report at bugs.python.org (Trent Nelson) Date: Thu, 18 Oct 2012 15:04:30 +0000 Subject: [issue1516] make _ctypes work with non-gcc compilers In-Reply-To: <1350564376.41.0.184916591295.issue1516@psf.upfronthosting.co.za> Message-ID: <20121018150424.GB92513@snakebite.org> Trent Nelson added the comment: Hi Greg, I realize it's been a good five years since you first raised this issue, but I was wondering if you ever ended up making any progress with it? In trying to get Python working on Snakebite UNIX boxes with vendor CCs, I'm running into all sorts of issues. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1516> _______________________________________ From report at bugs.python.org Thu Oct 18 17:21:29 2012 From: report at bugs.python.org (Todd Rovito) Date: Thu, 18 Oct 2012 15:21:29 +0000 Subject: [issue1207589] Right Click Context Menu Message-ID: <1350573689.03.0.609895233952.issue1207589@psf.upfronthosting.co.za> Changes by Todd Rovito <rovitotv at gmail.com>: ---------- nosy: +Todd.Rovito _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1207589> _______________________________________ From report at bugs.python.org Thu Oct 18 17:24:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2012 15:24:09 +0000 Subject: [issue16277] Objects/longobject.c not compiled without long long In-Reply-To: <1350572193.35.0.503899791259.issue16277@psf.upfronthosting.co.za> Message-ID: <201210181823.50764.storchaka@gmail.com> Serhiy Storchaka added the comment: > Okay, but do you agree that (1) there's no undefined behaviour, and (2) > removing this code has the potential to change results on platforms where > converting NULL to an integer doesn't give zero? Undefined behavior (or may be just the wrong behavior), we obtain later, when converting in PyLong_AsVoidPtr() zero integer back to pointer. On platforms where converting NULL to an integer doesn't give zero it's a bug. > > I believe Python does not support platforms where it matters. > What's your justification for this belief? Can you show the contrexample? I can not. If such a platform existed, perhaps this bug has been already shown it. > Sorry, but this is making no sense to me. You wrote: "(Py_uintptr_t)p - > (Py_uintptr_t)(void *)NULL". Is that supposed to be existing code that > you're proposing changing? An example to prove some point (what point?) > Code you're proposing to add somewhere? (If so, where are you proposing > to add it?) Why are you subtracting these two pointers? What's p? I'm > finding it hard to make sense of what you're writing. I mean using PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) ((Py_uintptr_t)p - (Py_uintptr_t)(void *)NULL)) instead PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)(Py_uintptr_t)p). Of course PyLong_AsVoidPtr() should be changed to return (void *)(x + (Py_uintptr_t) (void *)NULL) instead (void *)x. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16277> _______________________________________ From report at bugs.python.org Thu Oct 18 17:24:27 2012 From: report at bugs.python.org (Guilherme Polo) Date: Thu, 18 Oct 2012 15:24:27 +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: <1350573867.73.0.949153974259.issue16248@psf.upfronthosting.co.za> Guilherme Polo added the comment: For something that has been around for so long, I would be a little more careful. My suggestion is: no longer declare readprofile as an internal function; remove the direct call to readprofile from Tk.__init__; tell users about the new behavior, and the need to call readprofile themselves if they wish to. In some years we might be able to estimate if readprofile is used at all, and then decide about removing it. Since I haven't been active as a Python committer, I will let the final decision to someone else. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16248> _______________________________________ From report at bugs.python.org Thu Oct 18 17:33:34 2012 From: report at bugs.python.org (Todd Rovito) Date: Thu, 18 Oct 2012 15:33:34 +0000 Subject: [issue10405] IDLE breakpoint facility undocumented In-Reply-To: <1289638474.62.0.690259510388.issue10405@psf.upfronthosting.co.za> Message-ID: <1350574414.76.0.995691012505.issue10405@psf.upfronthosting.co.za> Changes by Todd Rovito <rovitotv at gmail.com>: ---------- nosy: +Todd.Rovito _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10405> _______________________________________ From report at bugs.python.org Thu Oct 18 17:40:37 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 Oct 2012 15:40:37 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1350574836.99.0.356364182366.issue1207589@psf.upfronthosting.co.za> Changes by Terry J. Reedy <tjreedy at udel.edu>: ---------- title: Right Click Context Menu -> IDLE: Right Click Context Menu _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1207589> _______________________________________ From report at bugs.python.org Thu Oct 18 17:48:38 2012 From: report at bugs.python.org (Greg Couch) Date: Thu, 18 Oct 2012 15:48:38 +0000 Subject: [issue1516] make _ctypes work with non-gcc compilers In-Reply-To: <20121018150424.GB92513@snakebite.org> Message-ID: <alpine.LRH.2.02.1210180843260.7198@watson.cgl.ucsf.edu> Greg Couch added the comment: On Thu, 18 Oct 2012, Trent Nelson wrote: > Trent Nelson added the comment: > > Hi Greg, > > I realize it's been a good five years since you first raised this > issue, but I was wondering if you ever ended up making any progress > with it? > > In trying to get Python working on Snakebite UNIX boxes with vendor > CCs, I'm running into all sorts of issues. > > ---------- > > _______________________________________ > Python tracker <report at bugs.python.org> > <http://bugs.python.org/issue1516> > _______________________________________ Hi Trent, Sorry to say I don't have any more insight on how to get libffi working on more platforms. Lucking ctypes isn't used in the Python core, so it's not required to get Python working. I'm using supported compilers on all platforms now. Good luck, Greg ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1516> _______________________________________ From report at bugs.python.org Thu Oct 18 17:54:40 2012 From: report at bugs.python.org (Eric Snow) Date: Thu, 18 Oct 2012 15:54:40 +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: <1350575680.22.0.270140249435.issue16267@psf.upfronthosting.co.za> Eric Snow added the comment: The catch is that when abstractmethod is the inner decorator, __isabstractmethod__ is set on the object that classmethod/staticmethod is wrapping. When abstractmethod is the outer decorator, __isabstractmethod__ is set on the resulting classmethod/staticmethod object instead. Unless there is some practical reason that the distinction matters, I'm +1 on letting __isabstractmethod__ be set on classmethods and staticmethods. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16267> _______________________________________ From report at bugs.python.org Thu Oct 18 18:04:09 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Thu, 18 Oct 2012 16:04:09 +0000 Subject: [issue12686] argparse - document (and improve?) use of SUPPRESS with help= In-Reply-To: <1312356221.08.0.599664751964.issue12686@psf.upfronthosting.co.za> Message-ID: <1350576249.21.0.66278970466.issue12686@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Can this be closed? ---------- nosy: +petri.lehtinen _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12686> _______________________________________ From report at bugs.python.org Thu Oct 18 18:04:58 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Thu, 18 Oct 2012 16:04:58 +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: <1350576298.96.0.913535152093.issue11175@psf.upfronthosting.co.za> Changes by Petri Lehtinen <petri at digip.org>: ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11175> _______________________________________ From report at bugs.python.org Thu Oct 18 18:05:45 2012 From: report at bugs.python.org (Todd Rovito) Date: Thu, 18 Oct 2012 16:05:45 +0000 Subject: [issue13884] IDLE 2.6.5 Recent Files undocks In-Reply-To: <1327621264.5.0.587291207239.issue13884@psf.upfronthosting.co.za> Message-ID: <1350576345.32.0.453053455108.issue13884@psf.upfronthosting.co.za> Changes by Todd Rovito <rovitotv at gmail.com>: ---------- nosy: +Todd.Rovito _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13884> _______________________________________ From report at bugs.python.org Thu Oct 18 18:06:22 2012 From: report at bugs.python.org (Todd Rovito) Date: Thu, 18 Oct 2012 16:06:22 +0000 Subject: [issue13504] Meta-issue for "Invent with Python" IDLE feedback In-Reply-To: <1322613083.36.0.200533745275.issue13504@psf.upfronthosting.co.za> Message-ID: <1350576382.84.0.0151531091929.issue13504@psf.upfronthosting.co.za> Changes by Todd Rovito <rovitotv at gmail.com>: ---------- nosy: +Todd.Rovito _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13504> _______________________________________ From report at bugs.python.org Thu Oct 18 18:32:17 2012 From: report at bugs.python.org (Darren Dale) Date: Thu, 18 Oct 2012 16:32:17 +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: <1350577937.37.0.752630110887.issue16267@psf.upfronthosting.co.za> Darren Dale added the comment: There is a very practical reason, which was the whole point of issue11610. Descriptors are should declare themselves abstract when they are composed of abstract methods. If you have a property with an concrete getter but an abstract setter, the property should declare itself abstract until such time as it is provided a concrete setter. If we allow __isabstractmethod__ to be settable by @abstractmethod, it undermines the whole scheme of descriptors delegating their abstractedness to the methods of which they are composed. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16267> _______________________________________ From report at bugs.python.org Thu Oct 18 18:38:21 2012 From: report at bugs.python.org (Steven Bethard) Date: Thu, 18 Oct 2012 16:38:21 +0000 Subject: [issue12686] argparse - document (and improve?) use of SUPPRESS with help= In-Reply-To: <1312356221.08.0.599664751964.issue12686@psf.upfronthosting.co.za> Message-ID: <1350578301.71.0.961511836049.issue12686@psf.upfronthosting.co.za> Steven Bethard added the comment: Yeah, looks like we can close this. If anyone finds a specific bug in the use of SUPPRESS, please open a new issue. ---------- resolution: -> duplicate status: open -> closed superseder: -> document argparse's help=SUPPRESS _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12686> _______________________________________ From report at bugs.python.org Thu Oct 18 18:57:29 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 Oct 2012 16:57:29 +0000 Subject: [issue13884] IDLE: Remove tear-off menu feature In-Reply-To: <1327621264.5.0.587291207239.issue13884@psf.upfronthosting.co.za> Message-ID: <1350579449.94.0.88965061461.issue13884@psf.upfronthosting.co.za> Changes by Terry J. Reedy <tjreedy at udel.edu>: ---------- stage: -> patch review title: IDLE 2.6.5 Recent Files undocks -> IDLE: Remove tear-off menu feature type: -> enhancement versions: +Python 3.4 -Python 2.6 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13884> _______________________________________ From report at bugs.python.org Thu Oct 18 19:04:19 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 Oct 2012 17:04:19 +0000 Subject: [issue13884] IDLE: Remove tear-off menu feature In-Reply-To: <1327621264.5.0.587291207239.issue13884@psf.upfronthosting.co.za> Message-ID: <1350579859.97.0.734123515748.issue13884@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I wonder if anyone uses this feature and would miss it if gone. Since it is a simple matter of passing 'tearoff=0/1' on menu creation, perhaps it should be a configuration feature. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13884> _______________________________________ From report at bugs.python.org Thu Oct 18 19:36:16 2012 From: report at bugs.python.org (David Benjamin) Date: Thu, 18 Oct 2012 17:36:16 +0000 Subject: [issue16278] os.rename documentation slightly inaccurate Message-ID: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> New submission from David Benjamin: This is somewhat of a nitpick. os.rename's documentation says "If dst is a directory, OSError will be raised". On Unix, this isn't completely true. If the source is a directory and the destination is an empty directory, it'll overwrite the former with the latter. (Actually if the source is a directory the inverse is true; if dst is a file, OSError will be raised.) In [1]: import os In [2]: os.mkdir("aaa") In [3]: open("aaa/blah", "w").close() In [4]: os.mkdir("bbb") In [5]: os.rename("aaa", "bbb") In [6]: os.listdir("bbb") Out[6]: ['blah'] ---------- assignee: docs at python components: Documentation messages: 173285 nosy: David.Benjamin, docs at python priority: normal severity: normal status: open title: os.rename documentation slightly inaccurate type: enhancement versions: Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16278> _______________________________________ From report at bugs.python.org Thu Oct 18 19:53:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2012 17:53:40 +0000 Subject: [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1350582820.64.0.853794431827.issue16278@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- versions: +Python 3.2, Python 3.3 -Python 3.5 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16278> _______________________________________ From report at bugs.python.org Thu Oct 18 20:52:31 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Oct 2012 18:52:31 +0000 Subject: [issue16277] Objects/longobject.c not compiled without long long In-Reply-To: <1350561590.48.0.466518610474.issue16277@psf.upfronthosting.co.za> Message-ID: <1350586351.5.0.511768200474.issue16277@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Undefined behavior (or may be just the wrong behavior), we obtain later, > when > converting in PyLong_AsVoidPtr() zero integer back to pointer. On > platforms > where converting NULL to an integer doesn't give zero it's a bug. So maybe the fix should be to special case zero in PyLong_AsVoidPtr, and turn 0L back into NULL there? I think it's just too risky to change the current behaviour in 3.2 and 3.3, given the number of places that PyLong_FromVoidPtr is used. Unlike you, I don't have confidence that there are no current or future platforms that don't map NULL to 0. It might be reasonable to consider a change for 3.4. > I mean using PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) > ((Py_uintptr_t)p - (Py_uintptr_t)(void *)NULL)) instead ... Okay, thanks for explaining. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16277> _______________________________________ From report at bugs.python.org Thu Oct 18 20:54:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 Oct 2012 18:54:14 +0000 Subject: [issue16277] Objects/longobject.c not compiled without long long In-Reply-To: <1350561590.48.0.466518610474.issue16277@psf.upfronthosting.co.za> Message-ID: <3XjKDP6CPczR6T@mail.python.org> Roundup Robot added the comment: New changeset bedb2903d71e by Mark Dickinson in branch '3.2': Issue #16277: in PyLong_FromVoidPtr, add missing branch for sizeof(void*) <= sizeof(long). http://hg.python.org/cpython/rev/bedb2903d71e New changeset 8ce04be1321c by Mark Dickinson in branch '3.3': Issue #16277: merge fix from 3.2 http://hg.python.org/cpython/rev/8ce04be1321c New changeset 02e57069f43e by Mark Dickinson in branch 'default': Issue #16277: merge fix from 3.3 http://hg.python.org/cpython/rev/02e57069f43e ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16277> _______________________________________ From report at bugs.python.org Thu Oct 18 20:56:16 2012 From: report at bugs.python.org (Jeremy Banks) Date: Thu, 18 Oct 2012 18:56:16 +0000 Subject: [issue10740] sqlite3 module should allow DDL statements in transactions In-Reply-To: <1292868135.81.0.257293444934.issue10740@psf.upfronthosting.co.za> Message-ID: <1350586576.25.0.523815501806.issue10740@psf.upfronthosting.co.za> Changes by Jeremy Banks <jeremy at jeremybanks.ca>: ---------- nosy: +Jeremy Banks _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10740> _______________________________________ From report at bugs.python.org Thu Oct 18 20:57:07 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Oct 2012 18:57:07 +0000 Subject: [issue16277] Objects/longobject.c not compiled without long long In-Reply-To: <1350561590.48.0.466518610474.issue16277@psf.upfronthosting.co.za> Message-ID: <1350586627.42.0.296059374516.issue16277@psf.upfronthosting.co.za> Mark Dickinson added the comment: I've fixed the missing branch in 3.2, 3.3 and 3.4. ---------- assignee: -> mark.dickinson versions: -Python 3.2, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16277> _______________________________________ From report at bugs.python.org Thu Oct 18 21:21:20 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2012 19:21:20 +0000 Subject: [issue16277] Objects/longobject.c not compiled without long long In-Reply-To: <1350586351.5.0.511768200474.issue16277@psf.upfronthosting.co.za> Message-ID: <201210182220.51833.storchaka@gmail.com> Serhiy Storchaka added the comment: > So maybe the fix should be to special case zero in PyLong_AsVoidPtr, and > turn 0L back into NULL there? Yes, of course. If we have a special case in PyLong_FromVoidPtr(), it is wrong that we do not have the special case in PyLong_AsVoidPtr(). But this will change the current (potentially buggy) behaviour. ;-) The patch long_fromvoidptr_2.patch contains such changes (as you want). But this changes are buggy too, because now PyLong_FromVoidPtr() and PyLong_AsVoidPtr() are multivalued. PyLong_FromVoidPtr() maps to 0 NULL and may be yet another pointer, PyLong_AsVoidPtr() maps to NULL 0 and may be yet another integer. The patch long_fromvoidptr_3.patch is more consistent in this sense. Now both functions are univalued, > I think it's just too risky to change the current behaviour in 3.2 and 3.3, > given the number of places that PyLong_FromVoidPtr is used. Buggy behaviour changed if we fix the bug. > Unlike you, I > don't have confidence that there are no current or future platforms that > don't map NULL to 0. I just want to say that I'm not sure whether to fix this bug. But if we fix it for purity, it should be fixed right. ---------- Added file: http://bugs.python.org/file27611/long_fromvoidptr_2.patch Added file: http://bugs.python.org/file27612/long_fromvoidptr_3.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16277> _______________________________________ -------------- next part -------------- diff -r a45cb181e4d0 Objects/longobject.c --- a/Objects/longobject.c Wed Oct 17 20:29:07 2012 -0700 +++ b/Objects/longobject.c Thu Oct 18 22:18:07 2012 +0300 @@ -935,17 +935,20 @@ PyObject * PyLong_FromVoidPtr(void *p) { + /* special-case null pointer */ + if (!p) + return PyLong_FromLong(0); +#if SIZEOF_VOID_P <= SIZEOF_LONG + return PyLong_FromUnsignedLong((unsigned long)(Py_uintptr_t)p); +#else #ifndef HAVE_LONG_LONG # error "PyLong_FromVoidPtr: sizeof(void*) > sizeof(long), but no long long" #endif #if SIZEOF_LONG_LONG < SIZEOF_VOID_P # error "PyLong_FromVoidPtr: sizeof(PY_LONG_LONG) < sizeof(void*)" #endif - /* special-case null pointer */ - if (!p) - return PyLong_FromLong(0); return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)(Py_uintptr_t)p); - +#endif /* SIZEOF_VOID_P <= SIZEOF_LONG */ } /* Get a C pointer from a long int object. */ @@ -977,6 +980,9 @@ #endif /* SIZEOF_VOID_P <= SIZEOF_LONG */ + /* special-case null pointer */ + if (!x) + return NULL; if (x == -1 && PyErr_Occurred()) return NULL; return (void *)x; -------------- next part -------------- diff -r a45cb181e4d0 Objects/longobject.c --- a/Objects/longobject.c Wed Oct 17 20:29:07 2012 -0700 +++ b/Objects/longobject.c Thu Oct 18 22:03:11 2012 +0300 @@ -935,17 +935,19 @@ PyObject * PyLong_FromVoidPtr(void *p) { + /* always convert NULL to 0 */ + Py_uintptr_t x = (Py_uintptr_t)p - (Py_uintptr_t)(void *)NULL; +#if SIZEOF_VOID_P <= SIZEOF_LONG + return PyLong_FromUnsignedLong((unsigned long)x); +#else #ifndef HAVE_LONG_LONG # error "PyLong_FromVoidPtr: sizeof(void*) > sizeof(long), but no long long" #endif #if SIZEOF_LONG_LONG < SIZEOF_VOID_P # error "PyLong_FromVoidPtr: sizeof(PY_LONG_LONG) < sizeof(void*)" #endif - /* special-case null pointer */ - if (!p) - return PyLong_FromLong(0); - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)(Py_uintptr_t)p); - + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)x); +#endif /* SIZEOF_VOID_P <= SIZEOF_LONG */ } /* Get a C pointer from a long int object. */ @@ -979,7 +981,8 @@ if (x == -1 && PyErr_Occurred()) return NULL; - return (void *)x; + /* always convert 0 to NULL */ + return (void *)((Py_uintptr_t)x + (Py_uintptr_t)(void *)NULL); } #ifdef HAVE_LONG_LONG From report at bugs.python.org Thu Oct 18 21:33:20 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 Oct 2012 19:33:20 +0000 Subject: [issue15958] bytes.join() should allow arbitrary buffer objects In-Reply-To: <1347905010.83.0.632444428638.issue15958@psf.upfronthosting.co.za> Message-ID: <3XjL5W3cG4zMLK@mail.python.org> Roundup Robot added the comment: New changeset 388e43bb519d by Antoine Pitrou in branch 'default': Followup to issue #15958: add join.h to Makefile dependencies for byte strings http://hg.python.org/cpython/rev/388e43bb519d ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15958> _______________________________________ From report at bugs.python.org Thu Oct 18 21:54:46 2012 From: report at bugs.python.org (Todd Rovito) Date: Thu, 18 Oct 2012 19:54:46 +0000 Subject: [issue13884] IDLE: Remove tear-off menu feature In-Reply-To: <1327621264.5.0.587291207239.issue13884@psf.upfronthosting.co.za> Message-ID: <1350590086.79.0.880718868453.issue13884@psf.upfronthosting.co.za> Todd Rovito added the comment: Terry, I would not miss the feature at all this is very old school Unix like and most people find it confusing. At my job I tend to provide Python support to my co-workers and have had many questions about it. In addition I think #13504 meta issue provides even more evidence that removing the tear off menus would be a good thing. Something to consider with IDLE is it is often the first thing a user sees when using Python and first impressions count in most circumstances. IDLE could be much improved and Roger Serwy has a good start on improvements with his IdleX project. Thanks for the review and I for one would appreciate this patch getting committed. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13884> _______________________________________ From report at bugs.python.org Thu Oct 18 21:59:43 2012 From: report at bugs.python.org (Julian Berman) Date: Thu, 18 Oct 2012 19:59:43 +0000 Subject: [issue16279] namedtuple should compare equality with field names taken into account Message-ID: <1350590383.92.0.380750579544.issue16279@psf.upfronthosting.co.za> New submission from Julian Berman: I find the following to be unintuitive: Python 3.3.0rc1 (default, Sep 6 2012, 16:02:32) [GCC 4.2.1 Compatible Apple Clang 3.1 (tags/Apple/clang-318.0.58)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from collections import namedtuple >>> F = namedtuple("F", "x") >>> G = namedtuple("G", "y") >>> F(12) == G(12) True I'm OK with not taking the class name into account, that sounds reasonable, but I think field names should make those unequal. ---------- components: Library (Lib) messages: 173292 nosy: Julian, rhettinger priority: normal severity: normal status: open title: namedtuple should compare equality with field names taken into account type: enhancement versions: Python 3.4, Python 3.5 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16279> _______________________________________ From report at bugs.python.org Thu Oct 18 22:12:35 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2012 20:12:35 +0000 Subject: [issue13884] IDLE: Remove tear-off menu feature In-Reply-To: <1327621264.5.0.587291207239.issue13884@psf.upfronthosting.co.za> Message-ID: <1350591155.75.0.793267001803.issue13884@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, please, make it a configuration feature (off by default). Tear-off menus useful for large and deeply nested menus. Do not forget about people with disabilities. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13884> _______________________________________ From report at bugs.python.org Thu Oct 18 22:22:29 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Oct 2012 20:22:29 +0000 Subject: [issue16277] Objects/longobject.c not compiled without long long In-Reply-To: <1350561590.48.0.466518610474.issue16277@psf.upfronthosting.co.za> Message-ID: <1350591749.39.0.567174848561.issue16277@psf.upfronthosting.co.za> Mark Dickinson added the comment: Let's keep it simple and just drop the special case for 3.4. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16277> _______________________________________ From report at bugs.python.org Thu Oct 18 22:36:45 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2012 20:36:45 +0000 Subject: [issue16280] Inconsistency with PyLong_FromVoidPtr() and PyLong_AsVoidPtr() Message-ID: <1350592605.75.0.903576562046.issue16280@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: This issue is taken out of the discussion of issue16277. PyLong_FromVoidPtr() has special case which maps null pointer to zero integer. On platforms where (uintptr_t)(void *)0 is 0, this code has no effect and is redundant. But on hypothetic platforms where (uintptr_t)(void *)0 is not 0, PyLong_FromVoidPtr() maps NULL to 0 and then PyLong_AsVoidPtr() maps 0 to non-NULL. Also PyLong_FromVoidPtr() is multivalued, it maps to 0 NULL and may be some other pointer. PyLong_FromVoidPtr() in 2.7 has special case only on platform where sizeof(void*) >?sizeof(long). It commented as "optimize null pointers". In 3.x branch such optimization non needed because PyLong_FromUnsignedLongLong() already has special case for short integers. The solution of this issue is getting rid of a special case, or adding a special case in PyLong_FromVoidPtr(). It is desirable to make it avoiding multivaluedity. ---------- components: Interpreter Core messages: 173295 nosy: mark.dickinson, serhiy.storchaka priority: normal severity: normal status: open title: Inconsistency with PyLong_FromVoidPtr() and PyLong_AsVoidPtr() type: resource usage versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16280> _______________________________________ From report at bugs.python.org Thu Oct 18 22:40:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2012 20:40:08 +0000 Subject: [issue16277] Objects/longobject.c not compiled without long long In-Reply-To: <1350561590.48.0.466518610474.issue16277@psf.upfronthosting.co.za> Message-ID: <1350592808.17.0.152126045287.issue16277@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I close this issue as the main bug was fixed. For incidental bug I open issue16280. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16277> _______________________________________ From report at bugs.python.org Thu Oct 18 23:30:18 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 Oct 2012 21:30:18 +0000 Subject: [issue16280] Inconsistency with PyLong_FromVoidPtr() and PyLong_AsVoidPtr() In-Reply-To: <1350592605.75.0.903576562046.issue16280@psf.upfronthosting.co.za> Message-ID: <3XjNhT2v3lzPRj@mail.python.org> Roundup Robot added the comment: New changeset 5ae4ff03b35f by Mark Dickinson in branch 'default': Issue 16280: Drop questionable special-casing of null pointer in PyLong_FromVoidPtr. http://hg.python.org/cpython/rev/5ae4ff03b35f ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16280> _______________________________________ From report at bugs.python.org Thu Oct 18 23:31:57 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Oct 2012 21:31:57 +0000 Subject: [issue16280] Inconsistency with PyLong_FromVoidPtr() and PyLong_AsVoidPtr() In-Reply-To: <1350592605.75.0.903576562046.issue16280@psf.upfronthosting.co.za> Message-ID: <1350595917.01.0.578233775897.issue16280@psf.upfronthosting.co.za> Mark Dickinson added the comment: Dropped the special case for 3.4. I'm leaving the code as-is for the maintenance branches, as discussed in issue16277. ---------- assignee: -> mark.dickinson resolution: -> fixed status: open -> closed type: resource usage -> behavior _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16280> _______________________________________ From report at bugs.python.org Thu Oct 18 23:34:59 2012 From: report at bugs.python.org (Roumen Petrov) Date: Thu, 18 Oct 2012 21:34:59 +0000 Subject: [issue16262] srcdir != builddir builds fail, if hg is not installed In-Reply-To: <1350464486.47.0.189031527493.issue16262@psf.upfronthosting.co.za> Message-ID: <1350596099.93.0.327708396641.issue16262@psf.upfronthosting.co.za> Roumen Petrov added the comment: issue 15819 is still open .... ---------- nosy: +rpetrov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16262> _______________________________________ From report at bugs.python.org Thu Oct 18 23:53:23 2012 From: report at bugs.python.org (Ned Deily) Date: Thu, 18 Oct 2012 21:53:23 +0000 Subject: [issue13884] IDLE: Remove tear-off menu feature In-Reply-To: <1327621264.5.0.587291207239.issue13884@psf.upfronthosting.co.za> Message-ID: <1350597203.58.0.937189089771.issue13884@psf.upfronthosting.co.za> Ned Deily added the comment: Keep in mind that tear-off menus are not supported on IDLE on OS X when using Aqua Tk (either Carbon or Cocoa), the standard these days. That's primarily because Aqua Tk uses native OS X menu bars which appear once at the top of the desktop, not in each window. There are no dotted line menu bars there. The desktop menu bar menu items change to reflect which window currently has keyboard focus. ---------- nosy: +ned.deily _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13884> _______________________________________ From report at bugs.python.org Fri Oct 19 02:51:23 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2012 00:51:23 +0000 Subject: [issue16281] TODO in tailmatch(): it does not support backward in all cases Message-ID: <1350607883.61.0.918476063498.issue16281@psf.upfronthosting.co.za> New submission from STINNER Victor: Oh oh, it looks like the implementation of tailmatch() was not finished: /* If both are of the same kind, memcmp is sufficient */ if (kind_self == kind_sub) { return ...; } /* otherwise we have to compare each character by first accesing it */ else { /* We do not need to compare 0 and len(substring)-1 because the if statement above ensured already that they are equal when we end up here. */ /* TODO: honor direction and do a forward or backwards search */ for (i = 1; i < end_sub; ++i) { if (PyUnicode_READ(kind_self, data_self, offset + i) != PyUnicode_READ(kind_sub, data_sub, i)) return 0; } return 1; } ---------- messages: 173301 nosy: haypo, loewis, serhiy.storchaka priority: normal severity: normal status: open title: TODO in tailmatch(): it does not support backward in all cases versions: Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16281> _______________________________________ From report at bugs.python.org Fri Oct 19 03:19:55 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Oct 2012 01:19:55 +0000 Subject: [issue16226] IDLE crashes on *File / Path browser* In-Reply-To: <1350206279.5.0.670551753566.issue16226@psf.upfronthosting.co.za> Message-ID: <3XjTnQ1WmjzPST@mail.python.org> Roundup Robot added the comment: New changeset d369e50677a6 by Ned Deily in branch '3.3': Issue #16226: Fix IDLE Path Browser crash. http://hg.python.org/cpython/rev/d369e50677a6 New changeset 58f9523cf407 by Ned Deily in branch 'default': Issue #16226: Fix IDLE Path Browser crash. http://hg.python.org/cpython/rev/58f9523cf407 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16226> _______________________________________ From report at bugs.python.org Fri Oct 19 03:31:04 2012 From: report at bugs.python.org (Ned Deily) Date: Fri, 19 Oct 2012 01:31:04 +0000 Subject: [issue16226] IDLE crashes on *File / Path browser* In-Reply-To: <1350206279.5.0.670551753566.issue16226@psf.upfronthosting.co.za> Message-ID: <1350610264.28.0.695829177107.issue16226@psf.upfronthosting.co.za> Ned Deily added the comment: I've committed Roger's fix for release in 3.3.1 and 3.4.0. Thanks, Roger. I did not apply the proposed test since, as it stands, it would never be run by test.regrtest without establishing a idlelib test runner infrastructure as proposed by Issue15392. I'm attaching the test as a separate patch and will add a comment to 15392 that the test should be added. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed Added file: http://bugs.python.org/file27613/issue16226_test.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16226> _______________________________________ From report at bugs.python.org Fri Oct 19 03:33:31 2012 From: report at bugs.python.org (Ned Deily) Date: Fri, 19 Oct 2012 01:33:31 +0000 Subject: [issue15392] Create a unittest framework for IDLE In-Reply-To: <1342673080.97.0.671694156374.issue15392@psf.upfronthosting.co.za> Message-ID: <1350610411.3.0.469514703061.issue15392@psf.upfronthosting.co.za> Ned Deily added the comment: There is now one test available to be applied from Issue16226; see http://bugs.python.org/file27613/issue16226_test.patch. It may need to be modified depending on where the tests are ultimately put in the source tree. ---------- nosy: +ned.deily _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15392> _______________________________________ From report at bugs.python.org Fri Oct 19 03:52:01 2012 From: report at bugs.python.org (Todd Rovito) Date: Fri, 19 Oct 2012 01:52:01 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1350611521.04.0.496952057637.issue1207589@psf.upfronthosting.co.za> Todd Rovito added the comment: I used taleinat's patch as the start for a patch that works with 3.4. Lots of code was changed from 2010 to 2012 so I basically hand merged the patch into 3.4. This patch was tested with Python 3.4.0a0 on both Mac OS X and Linux. As suggested by taleinat and Guilherme the shortcuts keys are not included in the context menu. ---------- Added file: http://bugs.python.org/file27614/RightClickContextMenuUpdatedFor3point4.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1207589> _______________________________________ From report at bugs.python.org Fri Oct 19 03:57:34 2012 From: report at bugs.python.org (Todd Rovito) Date: Fri, 19 Oct 2012 01:57:34 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1350611854.57.0.391741353576.issue1207589@psf.upfronthosting.co.za> Changes by Todd Rovito <rovitotv at gmail.com>: Removed file: http://bugs.python.org/file27614/RightClickContextMenuUpdatedFor3point4.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1207589> _______________________________________ From report at bugs.python.org Fri Oct 19 04:00:29 2012 From: report at bugs.python.org (Todd Rovito) Date: Fri, 19 Oct 2012 02:00:29 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1350612029.95.0.922684093958.issue1207589@psf.upfronthosting.co.za> Todd Rovito added the comment: This time I ran make patchcheck on the patch and it corrected a single white space. I used taleinat's patch as the start for a patch that works with 3.4. Lots of code was changed from 2010 to 2012 so I basically hand merged the patch into 3.4. This patch was tested with Python 3.4.0a0 on both Mac OS X and Linux. As suggested by taleinat and Guilherme the shortcuts keys are not included in the context menu. ---------- Added file: http://bugs.python.org/file27615/RightClickContextMenuUpdatedFor3point4.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1207589> _______________________________________ From report at bugs.python.org Fri Oct 19 04:27:57 2012 From: report at bugs.python.org (James Teh) Date: Fri, 19 Oct 2012 02:27:57 +0000 Subject: [issue14255] tempfile.gettempdir() didn't return the path with correct case. In-Reply-To: <1331514762.82.0.635964063955.issue14255@psf.upfronthosting.co.za> Message-ID: <1350613677.62.0.25917448424.issue14255@psf.upfronthosting.co.za> James Teh added the comment: This issue is much nastier than it seems when dealing with character sets that contain multi-byte characters in Python 2.7 on Windows. For example, on a Japanese system: 1. The ANSI code page is cp932 and Python 2.7 will return the TEMP environment variable as a str with this encoding. 2. If a user has a username containing the character \u5c71, this will be encoded as \x8eR, so the TEMP environment variable will include this character. 3. When normcase is called, \x8eR is converted to \x8er. 4. Because \x8eR is a multi-byte character, \x8er is an unrelated character; case insensitivity for "R" doesn't apply. 5. The result is that the correct temp directory is skipped. In fact, on most systems, IOError is raised because none of the other candidate directories are valid either. ---------- nosy: +jteh _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14255> _______________________________________ From report at bugs.python.org Fri Oct 19 04:43:48 2012 From: report at bugs.python.org (Todd Rovito) Date: Fri, 19 Oct 2012 02:43:48 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1350614628.08.0.051345801493.issue1207589@psf.upfronthosting.co.za> Todd Rovito added the comment: I used taleinat's patch as the start for a patch that works with 2.7. Lots of code was changed from 2010 to 2012 so I basically hand merged the patch into 2.7. This patch was tested with Python 2.7.3 on both Mac OS X and Linux. As suggested by taleinat and Guilherme the shortcuts keys are not included in the context menu. ---------- versions: +Python 2.7 -Python 3.4 Added file: http://bugs.python.org/file27616/RightClickContextMenuUpdatedFor2point7.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1207589> _______________________________________ From report at bugs.python.org Fri Oct 19 04:46:21 2012 From: report at bugs.python.org (Todd Rovito) Date: Fri, 19 Oct 2012 02:46:21 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1350614781.61.0.540800175026.issue1207589@psf.upfronthosting.co.za> Todd Rovito added the comment: Changed the version to make it clear this issue as a patch for 3.4 and 2.7. ---------- versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1207589> _______________________________________ From report at bugs.python.org Fri Oct 19 09:35:35 2012 From: report at bugs.python.org (Ned Deily) Date: Fri, 19 Oct 2012 07:35:35 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1346632042.85.0.745944196118.issue15853@psf.upfronthosting.co.za> Message-ID: <1350632135.52.0.688337326707.issue15853@psf.upfronthosting.co.za> Ned Deily added the comment: The attached patch applies cleanly to default, 3.3, 3.2, and 2.7. It appears to prevent the Tk crash observed with ActiveTcl 8.5.12.1 with all of them and I did not observe regressions when briefly tested on OS X with older versions of Tk 8.5 or Tk 8.4 nor on Linux with X11 Tk 8.5. It still needs to be tested on Windows. ---------- stage: needs patch -> patch review Added file: http://bugs.python.org/file27617/issue15853.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15853> _______________________________________ From report at bugs.python.org Fri Oct 19 10:11:13 2012 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 19 Oct 2012 08:11:13 +0000 Subject: [issue16282] The Python Tutorial the previous link needs updating Message-ID: <1350634273.76.0.49473405577.issue16282@psf.upfronthosting.co.za> New submission from Mark Lawrence: http://docs.python.org/tutorial/ the previous link goes to http://docs.python.org/whatsnew/2.0.html. Can we have this updated please? ---------- assignee: docs at python components: Documentation messages: 173311 nosy: BreamoreBoy, docs at python priority: normal severity: normal status: open title: The Python Tutorial the previous link needs updating versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16282> _______________________________________ From report at bugs.python.org Fri Oct 19 10:22:26 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 19 Oct 2012 08:22:26 +0000 Subject: [issue16282] The Python Tutorial the previous link needs updating In-Reply-To: <1350634273.76.0.49473405577.issue16282@psf.upfronthosting.co.za> Message-ID: <1350634946.59.0.0713793174436.issue16282@psf.upfronthosting.co.za> Chris Jerdonek added the comment: This issue does not seem limited to a particular page. For example, the "Previous topic" link for the Python Standard Library part: http://docs.python.org/library/index.html is "9. Full Grammar specification", which is the last section of the following part (the following part being the Language Reference). ---------- nosy: +chris.jerdonek _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16282> _______________________________________ From report at bugs.python.org Fri Oct 19 10:29:37 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 19 Oct 2012 08:29:37 +0000 Subject: [issue16282] The Python Tutorial the previous link needs updating In-Reply-To: <1350634273.76.0.49473405577.issue16282@psf.upfronthosting.co.za> Message-ID: <1350635377.05.0.355124309078.issue16282@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > http://docs.python.org/tutorial/ the previous link goes to http://docs.python.org/whatsnew/2.0.html. This seems correct to me since the 'All "What's new" documents since 2.0' part of the documentation occurs immediately before the Tutorial part, and 2.0 is the last section in that 'All "What's new"' part. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16282> _______________________________________ From report at bugs.python.org Fri Oct 19 10:51:43 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 19 Oct 2012 08:51:43 +0000 Subject: [issue16282] The Python Tutorial the previous link needs updating In-Reply-To: <1350634273.76.0.49473405577.issue16282@psf.upfronthosting.co.za> Message-ID: <1350636703.2.0.344861648474.issue16282@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Note that the 2.0 issue was previously reported in issue 4988 and issue 7683. The issue I described occurs because the parts on the home page are listed in an order different from their order in the table of contents: http://docs.python.org/ http://docs.python.org/contents.html So "Previous topic" respects the table of contents ordering and not the home page ordering. ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16282> _______________________________________ From report at bugs.python.org Fri Oct 19 10:52:58 2012 From: report at bugs.python.org (Marcus von Appen) Date: Fri, 19 Oct 2012 08:52:58 +0000 Subject: [issue16283] ctypes.util.find_library does not find all DLLs anymore Message-ID: <1350636778.52.0.107234052838.issue16283@psf.upfronthosting.co.za> New submission from Marcus von Appen: ctypes.util.find_library does not seem to be able to find certain libraries in Python3.3 on Win32 platforms anymore, if the library suffix is omitted. For some reason, os.path.isfile() in ctypes.util.find_library returns False in those cases. Please try out the attached test script. This produces the following output on a Windows 7 x64 system for me (given that a OpenAL32.dll is installed): C:\>c:\Python27-x64\python.exe ct_test.py Python build: 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] Path 'C:\Windows\system32' exists in $PATH: True File 'C:\Windows\system32\OpenAL32.dll' exists: True ctypes says for 'OpenAL32.dll': C:\Windows\system32\OpenAL32.dll ctypes says for 'OpenAL32': C:\Windows\system32\OpenAL32.dll C:\>c:\Python31-x64\python.exe ct_test.py Python build: 3.1.4 (default, Jun 12 2011, 14:16:16) [MSC v.1500 64 bit (AMD64)] Path 'C:\Windows\system32' exists in $PATH: True File 'C:\Windows\system32\OpenAL32.dll' exists: True ctypes says for 'OpenAL32.dll': C:\Windows\system32\OpenAL32.dll ctypes says for 'OpenAL32': C:\Windows\system32\OpenAL32.dll C:\>c:\Python32-x64\python.exe ct_test.py Python build: 3.2.3 (default, Apr 11 2012, 07:12:16) [MSC v.1500 64 bit (AMD64)] Path 'C:\Windows\system32' exists in $PATH: True File 'C:\Windows\system32\OpenAL32.dll' exists: True ctypes says for 'OpenAL32.dll': C:\Windows\system32\OpenAL32.dll ctypes says for 'OpenAL32': C:\Windows\system32\OpenAL32.dll C:\>c:\Python33-x64\python.exe ct_test.py Python build: 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:57:17) [MSC v.1600 64 bit (AMD64)] Path 'C:\Windows\system32' exists in $PATH: True File 'C:\Windows\system32\OpenAL32.dll' exists: True ctypes says for 'OpenAL32.dll': C:\Windows\system32\OpenAL32.dll ctypes says for 'OpenAL32': None ---------- components: ctypes files: ct_test.py messages: 173315 nosy: marcusva priority: normal severity: normal status: open title: ctypes.util.find_library does not find all DLLs anymore type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file27618/ct_test.py _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16283> _______________________________________ From report at bugs.python.org Fri Oct 19 10:54:37 2012 From: report at bugs.python.org (Ruben Gonzalez) Date: Fri, 19 Oct 2012 08:54:37 +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: <1350636877.46.0.165875480549.issue9720@psf.upfronthosting.co.za> Changes by Ruben Gonzalez <rubenrua at teltek.es>: ---------- nosy: +Ruben.Gonzalez _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9720> _______________________________________ From report at bugs.python.org Fri Oct 19 11:36:41 2012 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 19 Oct 2012 09:36:41 +0000 Subject: [issue16279] namedtuple should compare equality with field names taken into account In-Reply-To: <1350590383.92.0.380750579544.issue16279@psf.upfronthosting.co.za> Message-ID: <1350639401.75.0.808285196181.issue16279@psf.upfronthosting.co.za> Nick Coghlan added the comment: So that they can be returned from an API without breaking backwards compatibility, named tuples are intentionally equivalent to the corresponding ordinary tuple: >>> from collections import namedtuple >>> Pair = namedtuple("Pair", "x y") >>> Pair(1, 2) == (1, 2) True Transitivity thus requires that two named tuples with different field names also compare equal with each other: >>> Pair2 = namedtuple("Pair2", "a b") >>> Pair(1, 2) == (1, 2) == Pair2(1, 2) True >>> Pair(1, 2) == Pair2(1, 2) True So the field names on named tuples are just an access mechanism - they aren't part of the value of the instances. ---------- nosy: +ncoghlan resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16279> _______________________________________ From report at bugs.python.org Fri Oct 19 11:37:20 2012 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 19 Oct 2012 09:37:20 +0000 Subject: [issue16279] namedtuple should compare equality with field names taken into account In-Reply-To: <1350590383.92.0.380750579544.issue16279@psf.upfronthosting.co.za> Message-ID: <1350639440.41.0.41223011784.issue16279@psf.upfronthosting.co.za> Nick Coghlan added the comment: "... returned from an API that previously returned an ordinary tuple ..." ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16279> _______________________________________ From report at bugs.python.org Fri Oct 19 12:15:26 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 19 Oct 2012 10:15:26 +0000 Subject: [issue16284] concurrent.futures ThreadPoolExecutor keeps unnecessary references to worker functions. Message-ID: <1350641726.57.0.22505418852.issue16284@psf.upfronthosting.co.za> New submission from Mark Dickinson: The ThreadPoolExecutor unnecessarily keeps references to _WorkItem objects. With the attached patch (which lacks a test), all tests still pass, and the references are removed as soon as they're no longer needed. ---------- files: kill_reference.diff keywords: patch messages: 173318 nosy: bquinlan, mark.dickinson priority: normal severity: normal status: open title: concurrent.futures ThreadPoolExecutor keeps unnecessary references to worker functions. type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27619/kill_reference.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16284> _______________________________________ From report at bugs.python.org Fri Oct 19 12:33:27 2012 From: report at bugs.python.org (Ralf Schmitt) Date: Fri, 19 Oct 2012 10:33:27 +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: <1350642807.58.0.547468608085.issue16284@psf.upfronthosting.co.za> Changes by Ralf Schmitt <python-bugs at systemexit.de>: ---------- nosy: +schmir _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16284> _______________________________________ From report at bugs.python.org Fri Oct 19 12:56:08 2012 From: report at bugs.python.org (Matteo Parrucci) Date: Fri, 19 Oct 2012 10:56:08 +0000 Subject: [issue16285] Erroneously encoding tilde to %7e in quote Message-ID: <1350644168.93.0.364254038155.issue16285@psf.upfronthosting.co.za> New submission from Matteo Parrucci: RFC 3986 (http://www.ietf.org/rfc/rfc3986.txt) says: For consistency, percent-encoded octets in the ranges of ALPHA (%41-%5A and %61-%7A), DIGIT (%30-%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should not be created by URI producers and, when found in a URI, should be decoded to their corresponding unreserved characters by URI normalizers. >From python documentation talking about urllib.quote() Example: quote('/~connolly/') yields '/%7econnolly/'. I think ~ should be added to the safe characters of quote function ---------- messages: 173319 nosy: Matteo.Parrucci priority: normal severity: normal status: open title: Erroneously encoding tilde to %7e in quote _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16285> _______________________________________ From report at bugs.python.org Fri Oct 19 13:02:09 2012 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 19 Oct 2012 11:02:09 +0000 Subject: [issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite In-Reply-To: <1242857063.47.0.919073638283.issue6074@psf.upfronthosting.co.za> Message-ID: <1350644529.88.0.804138830443.issue6074@psf.upfronthosting.co.za> Nick Coghlan added the comment: Interesting - the test case I wrote for this was failing on Linux as well. Same fix worked both places, though (i.e. ensuring S_IWUSR is always set on .pyc files so they can be updated properly) 2.7 update incoming, we'll see what the Windows buildbots have to say before doing anything to 3.x. (Kevin: I didn't end up using your patch, as I decided it was simpler to just create the files with the user's write permission set. This doesn't weaken the security, as any attacker running with the user's privileges could just change the permissions anyway) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6074> _______________________________________ From report at bugs.python.org Fri Oct 19 13:07:50 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 19 Oct 2012 11:07:50 +0000 Subject: [issue16256] permissions wrong on Mac doc dir In-Reply-To: <1350428962.56.0.21849680877.issue16256@psf.upfronthosting.co.za> Message-ID: <1350644870.64.0.411294774102.issue16256@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Oddly enough the share/doc directory is created in the postinstall script for the documentation, looking at the script again makes me think that the script could be removed other than the symlink in /Developer/Documentation and that link is not useful on modern systems. Changing that can wait until we switch to a newer installer format (see issue15661) The attached patch is relative to the 2.7 tree and should fix the issue by explicitly setting the directory mode when creating it. ---------- Added file: http://bugs.python.org/file27620/issue16256.txt _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16256> _______________________________________ From report at bugs.python.org Fri Oct 19 13:20:49 2012 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 19 Oct 2012 11:20:49 +0000 Subject: [issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite In-Reply-To: <1242857063.47.0.919073638283.issue6074@psf.upfronthosting.co.za> Message-ID: <1350645649.34.0.212414251975.issue6074@psf.upfronthosting.co.za> Nick Coghlan added the comment: Ah, my test was buggy - the mtime wasn't reliably changing by enough, so the pyc wasn't always being rewritten. I changed it to force a big time delta by backdating the original source file. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6074> _______________________________________ From report at bugs.python.org Fri Oct 19 13:25:29 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Oct 2012 11:25:29 +0000 Subject: [issue16270] urllib hangs when closing connection In-Reply-To: <1350509929.7.0.680667591801.issue16270@psf.upfronthosting.co.za> Message-ID: <3XjlD82Cz0zR6x@mail.python.org> Roundup Robot added the comment: New changeset edeeb727df86 by Giampaolo Rodola' in branch 'default': Fix issue #16270: urllib may hang when used for retrieving files via FTP by using a context manager. http://hg.python.org/cpython/rev/edeeb727df86 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16270> _______________________________________ From report at bugs.python.org Fri Oct 19 13:25:31 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Oct 2012 11:25:31 +0000 Subject: [issue12805] Optimizations for bytes.join() et. al In-Reply-To: <1313973836.25.0.316459845083.issue12805@psf.upfronthosting.co.za> Message-ID: <201210191424.53473.storchaka@gmail.com> Serhiy Storchaka added the comment: I adapted a patch to the current code (now it works for bytearrays too), deleted the behavior change, left optimization only for 0- and 1-bytes separator, deleted tests (bytes.join tests already exists), wrote a benchmark and after long experiments has set a condition for this optimization. Now, I believe, the patch never leads to regression. The patch has been simplified, it's only 13 lines long. Thank you, John O'Connor. ---------- Added file: http://bugs.python.org/file27621/bytes_join_optimization_2.patch Added file: http://bugs.python.org/file27622/bytes_join_bench.sh _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12805> _______________________________________ -------------- next part -------------- diff -r 5ae4ff03b35f Objects/stringlib/join.h --- a/Objects/stringlib/join.h Thu Oct 18 22:18:42 2012 +0100 +++ b/Objects/stringlib/join.h Fri Oct 19 14:05:51 2012 +0300 @@ -94,6 +94,19 @@ /* Catenate everything. */ p = STRINGLIB_STR(res); + if (!seplen || (seplen == 1 && nbufs > 2 && nbufs > (sz >> 5))) { + /* fast path */ + if (seplen) + memset(p + buffers[0].len, sepstr[0], + sz - buffers[0].len - buffers[nbufs - 1].len); + for (i = 0; i < nbufs; i++) { + Py_ssize_t n = buffers[i].len; + char *q = buffers[i].buf; + Py_MEMCPY(p, q, n); + p += n; + } + goto done; + } for (i = 0; i < nbufs; i++) { Py_ssize_t n; char *q; -------------- next part -------------- A non-text attachment was scrubbed... Name: bytes_join_bench.sh Type: application/x-shellscript Size: 466 bytes Desc: not available URL: <http://mail.python.org/pipermail/python-bugs-list/attachments/20121019/cacb611c/attachment-0001.bin> From report at bugs.python.org Fri Oct 19 13:35:08 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Oct 2012 11:35:08 +0000 Subject: [issue16270] urllib hangs when closing connection In-Reply-To: <1350509929.7.0.680667591801.issue16270@psf.upfronthosting.co.za> Message-ID: <3XjlRH6SrRzR7n@mail.python.org> Roundup Robot added the comment: New changeset 2e6bcbb0ff59 by Giampaolo Rodola' in branch '3.3': Fix issue #16270: urllib may hang when used for retrieving files via FTP by using a context manager. http://hg.python.org/cpython/rev/2e6bcbb0ff59 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16270> _______________________________________ From report at bugs.python.org Fri Oct 19 13:40:37 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Oct 2012 11:40:37 +0000 Subject: [issue16270] urllib hangs when closing connection In-Reply-To: <1350509929.7.0.680667591801.issue16270@psf.upfronthosting.co.za> Message-ID: <3XjlYd0yG0zPYp@mail.python.org> Roundup Robot added the comment: New changeset 7f0d9637a3ad by Giampaolo Rodola' in branch '3.2': Fix issue #16270: urllib may hang when used for retrieving files via FTP by using a context manager. http://hg.python.org/cpython/rev/7f0d9637a3ad ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16270> _______________________________________ From report at bugs.python.org Fri Oct 19 13:41:53 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 19 Oct 2012 11:41:53 +0000 Subject: [issue16270] urllib hangs when closing connection In-Reply-To: <1350509929.7.0.680667591801.issue16270@psf.upfronthosting.co.za> Message-ID: <1350646913.79.0.772981409667.issue16270@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' <g.rodola at gmail.com>: ---------- assignee: -> giampaolo.rodola resolution: -> fixed status: open -> closed versions: +Python 3.2 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16270> _______________________________________ From report at bugs.python.org Fri Oct 19 13:43:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Oct 2012 11:43:08 +0000 Subject: [issue16285] Update urllib to RFC 3986 In-Reply-To: <1350644168.93.0.364254038155.issue16285@psf.upfronthosting.co.za> Message-ID: <1350646988.65.0.739394856689.issue16285@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, urllib based on RFC 2396, but RFC 3986 obsoletes RFC 2396. Updating to RFC 3986 should be new feature. For older versions can not change anything. But you always can use "safe" argument with quote(). ---------- components: +Library (Lib) nosy: +orsenthil, serhiy.storchaka title: Erroneously encoding tilde to %7e in quote -> Update urllib to RFC 3986 type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16285> _______________________________________ From report at bugs.python.org Fri Oct 19 13:58:28 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Oct 2012 11:58:28 +0000 Subject: [issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite In-Reply-To: <1242857063.47.0.919073638283.issue6074@psf.upfronthosting.co.za> Message-ID: <3XjlyC5gk6zPSt@mail.python.org> Roundup Robot added the comment: New changeset 321414874b26 by Nick Coghlan in branch '2.7': Issue #6074: Restore the long-broken support for running with read-only source files on Windows http://hg.python.org/cpython/rev/321414874b26 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6074> _______________________________________ From report at bugs.python.org Fri Oct 19 14:06:28 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Oct 2012 12:06:28 +0000 Subject: [issue13440] Explain the "status quo wins a stalemate" principle in the devguide In-Reply-To: <1321833284.75.0.438515825131.issue13440@psf.upfronthosting.co.za> Message-ID: <3Xjm7S0mv3zR6B@mail.python.org> Roundup Robot added the comment: New changeset ec52e044421d by Nick Coghlan in branch 'default': Close #13440 by linking to a couple of blog posts from the dev FAQ. Also rearrange the main page a bit to address some other concerns that came up on the tracker issue http://hg.python.org/devguide/rev/ec52e044421d ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13440> _______________________________________ From report at bugs.python.org Fri Oct 19 14:19:10 2012 From: report at bugs.python.org (Trent Nelson) Date: Fri, 19 Oct 2012 12:19:10 +0000 Subject: [issue16263] sendmsg, recvmsg, recvmsg_into et al not being detected on Solaris In-Reply-To: <1350469305.65.0.493434149752.issue16263@psf.upfronthosting.co.za> Message-ID: <20121019121904.GA96081@snakebite.org> Trent Nelson added the comment: After some investigation, I've established the following cause: 1. Our Solaris builds should add -D_XPG4_2 to CPPFLAGS. I've been manually setting this on the Solaris build slaves. This define ensures all the POSIX 95 things get picked up (like sendmsg etc). 2. Even when it is in CPPFLAGS, it doesn't get picked up when building extension modules, such as socketmodule.c, because they are built solely with CCSHARED. The first issue can be fixed via configure.ac/Makefile.pre.in. As for the second issue... it's somewhat odd that there's no documented way to ensure extra flags get passed $CC when building extensions. Then again, it's always been like this, and nobody has complained to date. Thus, rather than introduce a public/documented way for extending flags passed to $CC when building extension modules, I think for now, altering configure.ac/Makefile.pre.in to also tweak CCSHARED when on Solaris as part of fixing the first part is sufficient. Patch to follow. Trent. P.S.: when -D_XPG4_2 is added to CCSHARED, the socket sendmsg stuff gets built and... *drum-roll* fails some tests :-) ---------- title: sendmsg, recvmsg, recvmsg_into et al not being detected on Solaris -> sendmsg, recvmsg, recvmsg_into et al not being detected on Solaris _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16263> _______________________________________ From report at bugs.python.org Fri Oct 19 14:19:30 2012 From: report at bugs.python.org (Trent Nelson) Date: Fri, 19 Oct 2012 12:19:30 +0000 Subject: [issue16263] sendmsg, recvmsg, recvmsg_into et al not being detected on Solaris In-Reply-To: <1350469305.65.0.493434149752.issue16263@psf.upfronthosting.co.za> Message-ID: <1350649170.21.0.840206946459.issue16263@psf.upfronthosting.co.za> Changes by Trent Nelson <trent at snakebite.org>: ---------- title: sendmsg, recvmsg, recvmsg_into et al not being detected on Solaris -> sendmsg, recvmsg, recvmsg_into et al not being detected on Solaris _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16263> _______________________________________ From report at bugs.python.org Fri Oct 19 14:27:21 2012 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 19 Oct 2012 12:27:21 +0000 Subject: [issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite In-Reply-To: <1242857063.47.0.919073638283.issue6074@psf.upfronthosting.co.za> Message-ID: <1350649641.53.0.689134693991.issue6074@psf.upfronthosting.co.za> Nick Coghlan added the comment: Buildbots look happy, removing 2.7 from affected versions. ---------- versions: -Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6074> _______________________________________ From report at bugs.python.org Fri Oct 19 14:36:06 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2012 12:36:06 +0000 Subject: [issue16286] Optimize a==b and a!=b for bytes and str Message-ID: <1350650166.87.0.27478619259.issue16286@psf.upfronthosting.co.za> New submission from STINNER Victor: Attached patch optimize a==b and a!=b operators for bytes and str types of Python 3.4. For str, memcmp() is now always used, instead of a loop using PyUnicode_READ() (which is slow) for kind different than 1. For bytes, compare the first but also the last byte before calling memcmp(), instead of just comparing the first byte. Similar optimization was implemented in Py_UNICODE_MATCH(): changeset: 38242:0de9a789de39 branch: legacy-trunk user: Fredrik Lundh <fredrik at pythonware.com> date: Tue May 23 10:10:57 2006 +0000 files: Include/unicodeobject.h description: needforspeed: check first *and* last character before doing a full memcmp Initially I only wrote the patch to check the hash values before comparing content of the strings. -- I done some statistics tests. For a fresh Python interpreter, the hash values are only known in 7% cases (but when hashes are compared, they are quite always different, so the optimization is useful). When running "./python -m test test_os", hashes are known and different in 41.4%. After running 70 tests, hashes are known and different in 80%. ---------- files: compare_hash.patch keywords: patch messages: 173332 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: Optimize a==b and a!=b for bytes and str type: performance versions: Python 3.4 Added file: http://bugs.python.org/file27623/compare_hash.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16286> _______________________________________ From report at bugs.python.org Fri Oct 19 14:38:28 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Oct 2012 12:38:28 +0000 Subject: [issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite In-Reply-To: <1242857063.47.0.919073638283.issue6074@psf.upfronthosting.co.za> Message-ID: <3XjmrN1rN8zRBy@mail.python.org> Roundup Robot added the comment: New changeset 1856d57abfc8 by Nick Coghlan in branch '3.2': Issue #6074: Forward port Windows read-only source file fix from 2.7 http://hg.python.org/cpython/rev/1856d57abfc8 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6074> _______________________________________ From report at bugs.python.org Fri Oct 19 14:52:53 2012 From: report at bugs.python.org (Trent Nelson) Date: Fri, 19 Oct 2012 12:52:53 +0000 Subject: [issue15963] Improve ./configure's support for 32/64-bit debug|release|profiled builds w/ vendor (non-gcc) compilers on proprietary UNIX systems (Solaris/HP-UX/AIX et al). In-Reply-To: <1347975635.66.0.0788814924298.issue15963@psf.upfronthosting.co.za> Message-ID: <20121019125248.GB96081@snakebite.org> Trent Nelson added the comment: On Tue, Sep 18, 2012 at 06:40:35AM -0700, Trent Nelson wrote: > Side bar design question: on BSD/Linux/OSX w/ gcc/clang, if you're on > an amd64 platform, you'll get a 64-bit build. This isn't the case for > Solaris, HP-UX and AIX -- the default is always 32-bit. You need > aforementioned gymnastics to coerce a 64-bit build. > > Is this by design? If so, then I guess I'm proposing that ./configure > should have a `--with-64`-type argument that'll generate a 64-bit > build. > > If not, then we need to decide whether to change the default behavior > such that ./configure always generates a 64-bit build if you're on a > 64-bit platform -- if you want a 32-bit build, you need to explicitly > tell ./configure (i.e. --with-32). > > Changing the default is probably only viable for 3.4 onwards. It'd be > nice if 2.7->3.3 had generic configure support for 64-bit builds > though (via --with-64). > > XXX TODO for trent: review autoconf's offerings... getting 64-bit > builds from vendor cc's can't be that unusual. Just wanted to make note of a precedent I noticed yesterday whilst coercing local builds of Tcl, expect and a few other things on the Solaris 10 SPARC box: they all use `--enable-64bit` as the arg to configure to enable 64-bit builds. Additionally, none of them default to 64-bit out-of-the-box; they all inherit the underlying compilers "default" behavior. Which means gcc/clang gets you 64-bit on amd64, but a cc build on a 64-bit host may not. (I need to check a few more permutations on this, like what happens with gcc on SPARC/IA64 etc if the host OS is 64-bit -- does it default to 64-bit?) Side note: some of those projects had *much* nicer autoconf-fu than we do. Tcl implements the --enable-64bit stuff in aclocal.m4. So, I'm changing my stance from what I quoted above. We should try mimic the precedent set by other projects: - Use --enable-64bit as the flag. - "Default" 64-bit builds depend on the underlying compiler. ---------- title: Improve ./configure's support for 32/64-bit debug|release|profiled builds w/ vendor (non-gcc) compilers on proprietary UNIX systems (Solaris/HP-UX/AIX et al). -> Improve ./configure's support for 32/64-bit debug|release|profiled builds w/ vendor (non-gcc) compilers on proprietary UNIX systems (Solaris/HP-UX/AIX et al). _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15963> _______________________________________ From report at bugs.python.org Fri Oct 19 14:58:17 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Oct 2012 12:58:17 +0000 Subject: [issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite In-Reply-To: <1242857063.47.0.919073638283.issue6074@psf.upfronthosting.co.za> Message-ID: <3XjnHD6gD7zRCV@mail.python.org> Roundup Robot added the comment: New changeset 3f6db10b7a69 by Nick Coghlan in branch '3.3': Dummy merge from 3.2, as that approach to resolving #6074 is not applicable to importlib http://hg.python.org/cpython/rev/3f6db10b7a69 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6074> _______________________________________ From report at bugs.python.org Fri Oct 19 15:03:06 2012 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 19 Oct 2012 13:03:06 +0000 Subject: [issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite In-Reply-To: <1242857063.47.0.919073638283.issue6074@psf.upfronthosting.co.za> Message-ID: <1350651786.73.0.687820563725.issue6074@psf.upfronthosting.co.za> Nick Coghlan added the comment: OK, it should just be the two importlib based releases affected now. ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6074> _______________________________________ From report at bugs.python.org Fri Oct 19 15:04:32 2012 From: report at bugs.python.org (Trent Nelson) Date: Fri, 19 Oct 2012 13:04:32 +0000 Subject: [issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS In-Reply-To: <1345515355.02.0.72747216818.issue15745@psf.upfronthosting.co.za> Message-ID: <20121019130426.GC96081@snakebite.org> Trent Nelson added the comment: Larry and I just chatted about this on IRC. Summary: 1.) I was wrong about os.stat() affecting atime. I fired up a console session on Solaris to "prove" my atime observation only to find os.stat() had no impact on atime: % ./python Python 2.7.3+ (2.7:90a46f8943d0, Oct 18 2012, 11:09:15) [C] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> fname = 'configure' >>> st0 = os.stat(fname) >>> os.utime(fname, (st0.st_atime, st0.st_mtime)) >>> st0.st_atime 1350571183.474864 >>> st1 = os.stat(fname) >>> st1.st_atime 1350571183.474864 So, we can ignore my "but os.stat() affects atime!" noise earlier in this report. 2.) Regardless of the underlying platform, the unit tests should test utime() with nano, micro and second resolution. However, the tests should be cognizant of the underlying platform's os.stat() versus os.utime() resolution when testing the actual results. That is, if you pass a nanosecond time to os.utime() on a platform that doesn't have underlying nanosecond support for utime (i.e. no utimensat()), then expect a microsecond resolution time back from stat(). 3.) Regarding fixed times versus re-setting the first results of our stat() call: no strong opinion either way -- the main objective is to ensure the tests have good coverage and are robust. So whatever gets the job done. ---------- title: Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS) -> Numerous utime ns tests fail on FreeBSD w/ ZFS _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15745> _______________________________________ From report at bugs.python.org Fri Oct 19 15:13:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Oct 2012 13:13:08 +0000 Subject: [issue16286] Optimize a==b and a!=b for bytes and str In-Reply-To: <1350650166.87.0.27478619259.issue16286@psf.upfronthosting.co.za> Message-ID: <1350652388.21.0.298066576488.issue16286@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Good. I would like to see similar statistics tests for any real application. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16286> _______________________________________ From report at bugs.python.org Fri Oct 19 15:16:39 2012 From: report at bugs.python.org (Trent Nelson) Date: Fri, 19 Oct 2012 13:16:39 +0000 Subject: [issue16287] Sporadic test_utime() failures on Solaris Message-ID: <1350652599.36.0.707342371082.issue16287@psf.upfronthosting.co.za> New submission from Trent Nelson: This was initially observed in #15745, however, there's a separate problem here. The current test_utime() on Solaris sporadically (usually) fails along the following lines: > self.assertEqual(attr(st0, "st_mtime"), attr(st1, "st_mtime")) > AssertionError: 1347752941.275297 != 1347752941.275296 > That is, test_utime() always results in a st1.st_mtime that is > "off-by-1" from st0.st_mtime. The precision is well within the > nanasecond resolution offered by utimensat, so it doesn't appear to be > the same issue experienced by other platforms. Run that test in a loop though, and it sometimes passes. So, there's an underlying bug, somewhere. ---------- messages: 173339 nosy: trent priority: normal severity: normal status: open title: Sporadic test_utime() failures on Solaris _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16287> _______________________________________ From report at bugs.python.org Fri Oct 19 15:17:38 2012 From: report at bugs.python.org (Trent Nelson) Date: Fri, 19 Oct 2012 13:17:38 +0000 Subject: [issue16287] Sporadic test_utime() failures on Solaris In-Reply-To: <1350652599.36.0.707342371082.issue16287@psf.upfronthosting.co.za> Message-ID: <1350652658.71.0.448788396848.issue16287@psf.upfronthosting.co.za> Changes by Trent Nelson <trent at snakebite.org>: ---------- nosy: +larry, pitrou _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16287> _______________________________________ From report at bugs.python.org Fri Oct 19 15:17:59 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Oct 2012 13:17:59 +0000 Subject: [issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite In-Reply-To: <1242857063.47.0.919073638283.issue6074@psf.upfronthosting.co.za> Message-ID: <3Xjnjy2lGGzRCN@mail.python.org> Roundup Robot added the comment: New changeset df83d3bbd934 by Nick Coghlan in branch '2.7': Issue #6074: Actually delete the source file in the test as intended http://hg.python.org/cpython/rev/df83d3bbd934 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6074> _______________________________________ From report at bugs.python.org Fri Oct 19 15:18:08 2012 From: report at bugs.python.org (Trent Nelson) Date: Fri, 19 Oct 2012 13:18:08 +0000 Subject: [issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS) In-Reply-To: <1350452794.13.0.0143785340066.issue15745@psf.upfronthosting.co.za> Message-ID: <20121019131704.GD96081@snakebite.org> Trent Nelson added the comment: On Tue, Oct 16, 2012 at 10:46:34PM -0700, Trent Nelson wrote: > > Trent Nelson added the comment: > > Thanks for the feedback Larry; yeah that patch definitely wasn't > intended to be "production quality" -- more of a proof of concept. I > agree with your points, they'll be factored into the next patch. > > However, I'm absolutely baffled by the Solaris 10 failure. The more I > looked into it, the weirder it got. The issue is always the same: > > self.assertEqual(attr(st0, "st_mtime"), attr(st1, "st_mtime")) > AssertionError: 1347752941.275297 != 1347752941.275296 > > That is, test_utime() always results in a st1.st_mtime that is > "off-by-1" from st0.st_mtime. The precision is well within the > nanasecond resolution offered by utimensat, so it doesn't appear to be > the same issue experienced by other platforms. I've concluded that the problem on Solaris is actually unrelated to the original failures on FreeBSD and NetBSD that this issue was raised for (where os.stat() returns nanosecond resolution but os.utime() only accepts microsecond). I've raised a separate bug for this issue: #16287. ---------- title: Numerous utime ns tests fail on FreeBSD w/ ZFS -> Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS) _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15745> _______________________________________ From report at bugs.python.org Fri Oct 19 15:36:30 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Oct 2012 13:36:30 +0000 Subject: [issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite In-Reply-To: <1242857063.47.0.919073638283.issue6074@psf.upfronthosting.co.za> Message-ID: <3Xjp7K5w8YzRCR@mail.python.org> Roundup Robot added the comment: New changeset bbb3459fbcb8 by Nick Coghlan in branch '3.3': Issue #6074: Apply an appropriate fix for importlib based imports http://hg.python.org/cpython/rev/bbb3459fbcb8 New changeset bedcc790c6e7 by Nick Coghlan in branch 'default': Merge fix from #6074 from 3.3 http://hg.python.org/cpython/rev/bedcc790c6e7 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6074> _______________________________________ From report at bugs.python.org Fri Oct 19 15:41:09 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Oct 2012 13:41:09 +0000 Subject: [issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite In-Reply-To: <1242857063.47.0.919073638283.issue6074@psf.upfronthosting.co.za> Message-ID: <3XjpDh5VnDzR6m@mail.python.org> Roundup Robot added the comment: New changeset 8cf7f6fe4282 by Nick Coghlan in branch '3.2': Issue #6074: Actually delete the source file in the test as intended http://hg.python.org/cpython/rev/8cf7f6fe4282 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6074> _______________________________________ From report at bugs.python.org Fri Oct 19 15:43:56 2012 From: report at bugs.python.org (Dirkjan Ochtman) Date: Fri, 19 Oct 2012 13:43:56 +0000 Subject: [issue16286] Optimize a==b and a!=b for bytes and str In-Reply-To: <1350650166.87.0.27478619259.issue16286@psf.upfronthosting.co.za> Message-ID: <1350654236.45.0.455478319774.issue16286@psf.upfronthosting.co.za> Changes by Dirkjan Ochtman <dirkjan at ochtman.nl>: ---------- nosy: +djc _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16286> _______________________________________ From report at bugs.python.org Fri Oct 19 15:45:54 2012 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 19 Oct 2012 13:45:54 +0000 Subject: [issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite In-Reply-To: <1242857063.47.0.919073638283.issue6074@psf.upfronthosting.co.za> Message-ID: <1350654354.52.0.155452289877.issue6074@psf.upfronthosting.co.za> Nick Coghlan added the comment: For 3.3+ I ended up using a tweaked version of Eric's patch - I kept the general test structure, but used the behavioural test I had created (i.e. does updating the initially read-only source file affect a subsequent bytecode only import?), as well as the simple rule of just always making the cached files writable by the owning user. On 3.3+, this permissions tweak occurs regardless of OS, because I didn't think it was worth the runtime hit to make it OS specific (whereas the use of the C preprocessor previously made that not an issue). ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6074> _______________________________________ From report at bugs.python.org Fri Oct 19 18:17:56 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Oct 2012 16:17:56 +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: <1350663476.31.0.832879172577.issue16261@psf.upfronthosting.co.za> Changes by ?ric Araujo <merwok at netwok.org>: ---------- nosy: +eric.araujo versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16261> _______________________________________ From report at bugs.python.org Fri Oct 19 18:18:49 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Oct 2012 16:18: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: <1350663529.2.0.624084457092.issue16255@psf.upfronthosting.co.za> Changes by ?ric Araujo <merwok at netwok.org>: ---------- nosy: +eric.araujo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16255> _______________________________________ From report at bugs.python.org Fri Oct 19 18:22:10 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Oct 2012 16:22:10 +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: <1350663730.37.0.604959511915.issue16245@psf.upfronthosting.co.za> ?ric Araujo added the comment: I say replace the code. HTML 4.01 won?t be updated. ---------- nosy: +eric.araujo, georg.brandl, larry _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16245> _______________________________________ From report at bugs.python.org Fri Oct 19 18:23:57 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Oct 2012 16:23:57 +0000 Subject: [issue16238] Automatically remove build directory when build options changed In-Reply-To: <1350300834.63.0.981208567885.issue16238@psf.upfronthosting.co.za> Message-ID: <1350663837.98.0.883387809699.issue16238@psf.upfronthosting.co.za> ?ric Araujo added the comment: Right, this is desirable behaviour. I thought setup.py and setup.cfg were dependencies in the files graph, meaning that if setup.py is newer than a py or so/dll file in the build dir, everything gets rebuilt. I?ll have to check that. ---------- stage: -> test needed versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16238> _______________________________________ From report at bugs.python.org Fri Oct 19 18:24:24 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Oct 2012 16:24:24 +0000 Subject: [issue16237] bdist_rpm SPEC files created with distutils may be distro specific In-Reply-To: <1350267871.71.0.392371801371.issue16237@psf.upfronthosting.co.za> Message-ID: <1350663864.04.0.107278790536.issue16237@psf.upfronthosting.co.za> Changes by ?ric Araujo <merwok at netwok.org>: ---------- nosy: +eric.araujo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16237> _______________________________________ From report at bugs.python.org Fri Oct 19 18:32:44 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 19 Oct 2012 16:32:44 +0000 Subject: [issue16287] Sporadic test_utime() failures on Solaris In-Reply-To: <1350652599.36.0.707342371082.issue16287@psf.upfronthosting.co.za> Message-ID: <1350664364.13.0.290451209651.issue16287@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16287> _______________________________________ From report at bugs.python.org Fri Oct 19 18:42:10 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Oct 2012 16:42:10 +0000 Subject: [issue16236] Doc/Makefile should have $PYTHON=python2 In-Reply-To: <1350252917.6.0.180225296667.issue16236@psf.upfronthosting.co.za> Message-ID: <1350664930.66.0.110920123091.issue16236@psf.upfronthosting.co.za> ?ric Araujo added the comment: Yes, please don?t break many OSes for the sake of one. ---------- nosy: +eric.araujo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16236> _______________________________________ From report at bugs.python.org Fri Oct 19 18:43:21 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Oct 2012 16:43:21 +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: <1350665001.9.0.235937497939.issue16235@psf.upfronthosting.co.za> Changes by ?ric Araujo <merwok at netwok.org>: ---------- nosy: +eric.araujo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16235> _______________________________________ From report at bugs.python.org Fri Oct 19 18:53:57 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 19 Oct 2012 16:53:57 +0000 Subject: [issue16287] Sporadic test_utime() failures on Solaris In-Reply-To: <1350652599.36.0.707342371082.issue16287@psf.upfronthosting.co.za> Message-ID: <1350665637.21.0.584521447278.issue16287@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>: ---------- nosy: +Arfrever _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16287> _______________________________________ From report at bugs.python.org Fri Oct 19 19:02:54 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 19 Oct 2012 17:02:54 +0000 Subject: [issue16286] Optimize a==b and a!=b for bytes and str In-Reply-To: <1350650166.87.0.27478619259.issue16286@psf.upfronthosting.co.za> Message-ID: <1350666174.34.0.455989201016.issue16286@psf.upfronthosting.co.za> Changes by Christian Heimes <lists at cheimes.de>: ---------- nosy: +christian.heimes _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16286> _______________________________________ From report at bugs.python.org Fri Oct 19 19:27:40 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 19 Oct 2012 17:27:40 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1349706807.82.0.556520783402.issue16166@psf.upfronthosting.co.za> Message-ID: <1350667660.05.0.959749218105.issue16166@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Instead of using macro values, I would rather define ONLY a single macro, PY_LITTLE_ENDIAN or PY_BIG_ENDIAN. Far less error prone!. It is far fool-proof "#ifdef PY_LITTLE_ENDIAN" than "#if PY_LITTLE_ENDIAN". ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16166> _______________________________________ From report at bugs.python.org Fri Oct 19 19:43:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Oct 2012 17:43:13 +0000 Subject: [issue16166] Add PY_BYTE_ORDER macro to get endianess of platform In-Reply-To: <1350667660.05.0.959749218105.issue16166@psf.upfronthosting.co.za> Message-ID: <201210192042.57290.storchaka@gmail.com> Serhiy Storchaka added the comment: > Instead of using macro values, I would rather define ONLY a single macro, > PY_LITTLE_ENDIAN or PY_BIG_ENDIAN. Time machine strikes back. #ifdef WORDS_BIGENDIAN ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16166> _______________________________________ From report at bugs.python.org Fri Oct 19 20:20:19 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 19 Oct 2012 18:20:19 +0000 Subject: [issue16274] test_asyncore failing on Solaris 10 2.7 (nitrogen/s10) In-Reply-To: <1350547611.85.0.565736375067.issue16274@psf.upfronthosting.co.za> Message-ID: <1350670819.28.0.375303005163.issue16274@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: "hg annotate" is useful :-) Changes in 3.2 look like coming from here: """ jcea at ubuntu:~/hg/python/cpython$ hg log -r 64988 changeset: 64988:0f8c2eb89f46 user: Antoine Pitrou <solipsis at pitrou.net> date: Tue Sep 28 21:23:11 2010 +0000 summary: Issue #9090: When a socket with a timeout fails with EWOULDBLOCK or EAGAIN, jcea at ubuntu:~/hg/python/cpython$ hg log -r 65314 changeset: 65314:12442ac3f7dd parent: 65312:a27fc0ff3678 user: Antoine Pitrou <solipsis at pitrou.net> date: Thu Oct 14 15:05:38 2010 +0000 summary: Issue #7523: Add SOCK_CLOEXEC and SOCK_NONBLOCK to the socket module, """ ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16274> _______________________________________ From report at bugs.python.org Fri Oct 19 20:22:40 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 19 Oct 2012 18:22:40 +0000 Subject: [issue9090] Error code 10035 calling socket.recv() on a socket with a timeout (WSAEWOULDBLOCK - A non-blocking socket operation could not be completed immediately) In-Reply-To: <1277602727.58.0.118328870924.issue9090@psf.upfronthosting.co.za> Message-ID: <1350670960.55.0.429469139238.issue9090@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Backport to 2.7 should be done: See Issue #16274. ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9090> _______________________________________ From report at bugs.python.org Fri Oct 19 20:25:16 2012 From: report at bugs.python.org (Trent Nelson) Date: Fri, 19 Oct 2012 18:25:16 +0000 Subject: [issue16274] test_asyncore failing on Solaris 10 2.7 (nitrogen/s10) In-Reply-To: <1350547611.85.0.565736375067.issue16274@psf.upfronthosting.co.za> Message-ID: <1350671116.5.0.820761632535.issue16274@psf.upfronthosting.co.za> Changes by Trent Nelson <trent at snakebite.org>: ---------- status: closed -> open _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16274> _______________________________________ From report at bugs.python.org Fri Oct 19 20:34:49 2012 From: report at bugs.python.org (Robert Collins) Date: Fri, 19 Oct 2012 18:34:49 +0000 Subject: [issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription()) Message-ID: <1350671689.29.0.0409273215418.issue16288@psf.upfronthosting.co.za> New submission from Robert Collins: TextTestRunner calls str(TestCase) directly, which makes it hard for testscenarios to rename the test cases as it parameterises them (because __str__ is a descriptor). While testscenarios could use a decorator instead, thats undesirable as the test case object would still need to be customised so that calls to self.id() and self.shortDescription() inside it still return consistent information. So the relevant code is this: def getDescription(self, test): 41 if self.descriptions: 42 return test.shortDescription() or str(test) 43 else: 44 return str(test) What I'd like is to have this be something like: 41 if self.descriptions: 42 return test.shortDescription() or test.id() 43 else: 44 return test.id() Which would let testscenarios adjust both shortDescriptions and id, and Just Work. ---------- messages: 173352 nosy: michael.foord, rbcollins priority: normal severity: normal status: open title: TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription()) versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16288> _______________________________________ From report at bugs.python.org Fri Oct 19 20:42:26 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Oct 2012 18:42:26 +0000 Subject: [issue16229] Demo *redemo.py* lacking in Windows installation In-Reply-To: <1350208645.0.0.150897720098.issue16229@psf.upfronthosting.co.za> Message-ID: <1350672146.57.0.798917557177.issue16229@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On my win7 3.3.0 install, I have Tools/scripts and a couple of other subdirs but no Tools/demo directory. ---------- nosy: +terry.reedy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16229> _______________________________________ From report at bugs.python.org Fri Oct 19 20:43:52 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Oct 2012 18:43:52 +0000 Subject: [issue16233] IDLE: conceptual problems with *Class browser* In-Reply-To: <1350229949.19.0.565182759034.issue16233@psf.upfronthosting.co.za> Message-ID: <1350672232.53.0.36948857134.issue16233@psf.upfronthosting.co.za> Changes by Terry J. Reedy <tjreedy at udel.edu>: ---------- nosy: +serwy, terry.reedy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16233> _______________________________________ From report at bugs.python.org Fri Oct 19 20:47:00 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Oct 2012 18:47:00 +0000 Subject: [issue16243] Add example for inspect module doc In-Reply-To: <1350343185.48.0.60485336671.issue16243@psf.upfronthosting.co.za> Message-ID: <1350672420.83.0.382620488018.issue16243@psf.upfronthosting.co.za> Changes by Terry J. Reedy <tjreedy at udel.edu>: ---------- title: Regression in inspect module -> Add example for inspect module doc _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16243> _______________________________________ From report at bugs.python.org Fri Oct 19 20:47:22 2012 From: report at bugs.python.org (Robert Collins) Date: Fri, 19 Oct 2012 18:47:22 +0000 Subject: [issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription()) In-Reply-To: <1350671689.29.0.0409273215418.issue16288@psf.upfronthosting.co.za> Message-ID: <1350672442.25.0.920314641488.issue16288@psf.upfronthosting.co.za> Robert Collins added the comment: Or anther way this could be done would be to make TestCase.__str__ call self.id(), and then __str__ never needs to be adjusted - id() or shortDescription are the only things to tweak. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16288> _______________________________________ From report at bugs.python.org Fri Oct 19 20:51:22 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Oct 2012 18:51:22 +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: <1350672682.89.0.783323234431.issue16248@psf.upfronthosting.co.za> Changes by Terry J. Reedy <tjreedy at udel.edu>: ---------- nosy: +terry.reedy -Want to Delete This Account _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16248> _______________________________________ From report at bugs.python.org Fri Oct 19 20:52:43 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Oct 2012 18:52:43 +0000 Subject: [issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription()) In-Reply-To: <1350671689.29.0.0409273215418.issue16288@psf.upfronthosting.co.za> Message-ID: <1350672763.2.0.384888886664.issue16288@psf.upfronthosting.co.za> R. David Murray added the comment: By "descriptor" I think you really mean it is a special method (ie: looked up on the class only, not on an instance). A descriptor is something else. This is a feature request and could only be implemented in 3.4. Assuming I'm understanding what you are asking for (which is not certain), as a partial workaround you could reset _testMethodName. ---------- keywords: +easy nosy: +r.david.murray type: -> enhancement versions: -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.5 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16288> _______________________________________ From report at bugs.python.org Fri Oct 19 21:04:45 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 19 Oct 2012 19:04:45 +0000 Subject: [issue2350] 'exceptions' import fixer In-Reply-To: <1205781728.94.0.172904523331.issue2350@psf.upfronthosting.co.za> Message-ID: <1350673485.52.0.220160693505.issue2350@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 -Python 2.6 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue2350> _______________________________________ From report at bugs.python.org Fri Oct 19 21:05:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Oct 2012 19:05:41 +0000 Subject: [issue15379] Charmap decoding of no-BMP characters In-Reply-To: <1342512958.35.0.341191772548.issue15379@psf.upfronthosting.co.za> Message-ID: <1350673541.73.0.698873774178.issue15379@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The 2.7 patch is just a backport of 3.2 patch (including the last Antoine's fix). Please look and commit. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15379> _______________________________________ From report at bugs.python.org Fri Oct 19 21:10:20 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Oct 2012 19:10:20 +0000 Subject: [issue14850] The inconsistency of codecs.charmap_decode In-Reply-To: <1337352396.54.0.468921009595.issue14850@psf.upfronthosting.co.za> Message-ID: <1350673820.76.0.869521567441.issue14850@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Does anyone have objections against the idea or the implementation of the patch? Please review. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14850> _______________________________________ From report at bugs.python.org Fri Oct 19 21:19:28 2012 From: report at bugs.python.org (Gertjan Klein) Date: Fri, 19 Oct 2012 19:19:28 +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: <1350674368.58.0.802001130964.issue16218@psf.upfronthosting.co.za> Changes by Gertjan Klein <gklein at xs4all.nl>: ---------- nosy: +gklein _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16218> _______________________________________ From report at bugs.python.org Fri Oct 19 21:22:38 2012 From: report at bugs.python.org (Eric Snow) Date: Fri, 19 Oct 2012 19:22:38 +0000 Subject: [issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite In-Reply-To: <1242857063.47.0.919073638283.issue6074@psf.upfronthosting.co.za> Message-ID: <1350674558.92.0.0959449903479.issue6074@psf.upfronthosting.co.za> Eric Snow added the comment: Sounds good. Thanks for getting this done, Nick. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6074> _______________________________________ From report at bugs.python.org Fri Oct 19 21:31:35 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 19 Oct 2012 19:31:35 +0000 Subject: [issue16195] Difficult or impossible to figure out how garbage collector and weak references should interact for user-defined extension types In-Reply-To: <1349961021.39.0.560161023056.issue16195@psf.upfronthosting.co.za> Message-ID: <1350675095.08.0.193250935615.issue16195@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16195> _______________________________________ From report at bugs.python.org Fri Oct 19 21:48:27 2012 From: report at bugs.python.org (Tim Golden) Date: Fri, 19 Oct 2012 19:48:27 +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: <1350676107.82.0.0586546868797.issue16218@psf.upfronthosting.co.za> Tim Golden added the comment: Confirming that this doesn't happen on 2.7 py -2 ?.py succeeds py -3 ?.py gives: python: failed to set __main__.__loader__ ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16218> _______________________________________ From report at bugs.python.org Fri Oct 19 22:13:51 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 19 Oct 2012 20:13:51 +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: <1350677631.58.0.852097353145.issue15872@psf.upfronthosting.co.za> Changes by Barry A. Warsaw <barry at python.org>: ---------- nosy: +barry _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15872> _______________________________________ From report at bugs.python.org Fri Oct 19 23:50:00 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Oct 2012 21:50:00 +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: <1350683400.91.0.329908711582.issue16137@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Alexander, looks as you changes in r87736 was not backported to 2.7. ---------- components: +Extension Modules -Library (Lib) nosy: +belopolsky stage: -> needs patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16137> _______________________________________ From report at bugs.python.org Sat Oct 20 00:05:26 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 19 Oct 2012 22:05:26 +0000 Subject: [issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription()) In-Reply-To: <1350671689.29.0.0409273215418.issue16288@psf.upfronthosting.co.za> Message-ID: <1350684326.49.0.809792680372.issue16288@psf.upfronthosting.co.za> Changes by Chris Jerdonek <chris.jerdonek at gmail.com>: ---------- nosy: +chris.jerdonek _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16288> _______________________________________ From report at bugs.python.org Sat Oct 20 00:13:54 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Oct 2012 22:13:54 +0000 Subject: [issue15522] impove 27 percent performance on stringpbject.c( by prefetch and loop optimization) In-Reply-To: <1343813632.92.0.115452555082.issue15522@psf.upfronthosting.co.za> Message-ID: <1350684834.94.0.348879128243.issue15522@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- status: open -> pending _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15522> _______________________________________ From report at bugs.python.org Sat Oct 20 00:44:21 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 19 Oct 2012 22:44:21 +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: <1350686661.6.0.234578611901.issue16255@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Is there some document describing procedure for building/installing/running_tests at Android device? I have Samsung Galaxy Tab and would to work on the issue. But my android experience is limited to installing Scripting Layer for Android from Google Play and running python3 scripts. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16255> _______________________________________ From report at bugs.python.org Sat Oct 20 00:59:21 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 19 Oct 2012 22:59:21 +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: <1350687561.02.0.568464345418.issue16255@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > It seems simple enough for us to make the default configurable This seems good to do in any case (as opposed to having the string be "hard-coded"), and we can test it independently of Android. There is a recently added test in the 3.x branches that can be modified: test method "test_executable_replaces_shell" which checks that the executable argument replaces the default shell for non-Windows. I would suggest implementing Gregory's two suggested measures as two separate patches. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16255> _______________________________________ From report at bugs.python.org Sat Oct 20 01:29:36 2012 From: report at bugs.python.org (Ben Rousch) Date: Fri, 19 Oct 2012 23:29:36 +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: <1350689376.81.0.23582976098.issue16255@psf.upfronthosting.co.za> Ben Rousch added the comment: > Is there some document describing procedure for building/installing/running_tests at Android device? I'm using the android-python27 project, but you can also reproduce it under SL4A: Start SL4A Menu -> View -> Interpreters Python 2.6.2 or Python 3 >>> from subprocess import Popen >>> p = Popen("ls", shell=True) *Fails* OSError: [Error 2] No such file or directory >>> p = Popen("ls" shell=True, executable="/system/bin/sh") *Works* ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16255> _______________________________________ From report at bugs.python.org Sat Oct 20 01:38:00 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 19 Oct 2012 23:38:00 +0000 Subject: [issue14850] The inconsistency of codecs.charmap_decode In-Reply-To: <1337352396.54.0.468921009595.issue14850@psf.upfronthosting.co.za> Message-ID: <1350689880.96.0.673404776641.issue14850@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: ---------- nosy: +haypo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14850> _______________________________________ From report at bugs.python.org Sat Oct 20 01:43:45 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 19 Oct 2012 23:43:45 +0000 Subject: [issue12805] Optimizations for bytes.join() et. al In-Reply-To: <1313973836.25.0.316459845083.issue12805@psf.upfronthosting.co.za> Message-ID: <1350690225.67.0.847588674819.issue12805@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't understand the point of this optimization. It looks rather cryptic and very specific. Can you elaborate? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12805> _______________________________________ From report at bugs.python.org Sat Oct 20 04:18:39 2012 From: report at bugs.python.org (Robert Collins) Date: Sat, 20 Oct 2012 02:18:39 +0000 Subject: [issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription()) In-Reply-To: <1350671689.29.0.0409273215418.issue16288@psf.upfronthosting.co.za> Message-ID: <1350699519.13.0.00161154283041.issue16288@psf.upfronthosting.co.za> Robert Collins added the comment: They aren't descriptors? They certainly aren't normal methods: >>> class foo(object): ... def __str__(self): return "foo" ... >>> f = foo() >>> f.__str__ = lambda: "bar" >>> str(f) 'foo' I *thought* the mechanism by which they can only be replaced by altering the class *was* descriptors, but I gladly seek better info! _testMethodName is overloaded though: its both 'what is the test method' and 'part of the description or id of the test', so resetting it would be - at best - risky when only changing the description or id. ---------- type: enhancement -> _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16288> _______________________________________ From report at bugs.python.org Sat Oct 20 06:56:37 2012 From: report at bugs.python.org (Todd Rovito) Date: Sat, 20 Oct 2012 04:56:37 +0000 Subject: [issue1283110] Give __len__() advice for "don't know" Message-ID: <1350708997.06.0.169573733192.issue1283110@psf.upfronthosting.co.za> Changes by Todd Rovito <rovitotv at gmail.com>: Removed file: http://bugs.python.org/file27605/DataModel__len__.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1283110> _______________________________________ From report at bugs.python.org Sat Oct 20 06:57:33 2012 From: report at bugs.python.org (Todd Rovito) Date: Sat, 20 Oct 2012 04:57:33 +0000 Subject: [issue1283110] Give __len__() advice for "don't know" Message-ID: <1350709053.57.0.461197110378.issue1283110@psf.upfronthosting.co.za> Todd Rovito added the comment: Changed the file name so it is clear that this patch goes with version 3.4. ---------- Added file: http://bugs.python.org/file27624/RightClickContextMenuUpdatedFor3point4.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1283110> _______________________________________ From report at bugs.python.org Sat Oct 20 06:57:52 2012 From: report at bugs.python.org (Todd Rovito) Date: Sat, 20 Oct 2012 04:57:52 +0000 Subject: [issue1283110] Give __len__() advice for "don't know" Message-ID: <1350709072.42.0.659003165699.issue1283110@psf.upfronthosting.co.za> Changes by Todd Rovito <rovitotv at gmail.com>: Removed file: http://bugs.python.org/file27624/RightClickContextMenuUpdatedFor3point4.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1283110> _______________________________________ From report at bugs.python.org Sat Oct 20 06:58:17 2012 From: report at bugs.python.org (Todd Rovito) Date: Sat, 20 Oct 2012 04:58:17 +0000 Subject: [issue1283110] Give __len__() advice for "don't know" Message-ID: <1350709097.67.0.534737520335.issue1283110@psf.upfronthosting.co.za> Todd Rovito added the comment: Used the right patch file name this time... ---------- Added file: http://bugs.python.org/file27625/DataModel__len__3point4.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1283110> _______________________________________ From report at bugs.python.org Sat Oct 20 06:59:18 2012 From: report at bugs.python.org (Todd Rovito) Date: Sat, 20 Oct 2012 04:59:18 +0000 Subject: [issue1283110] Give __len__() advice for "don't know" Message-ID: <1350709158.75.0.483159020919.issue1283110@psf.upfronthosting.co.za> Todd Rovito added the comment: This patch is for Python 2.7. ---------- versions: +Python 2.7 Added file: http://bugs.python.org/file27626/DataModel__len__2point7.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1283110> _______________________________________ From report at bugs.python.org Sat Oct 20 07:19:52 2012 From: report at bugs.python.org (Todd Rovito) Date: Sat, 20 Oct 2012 05:19:52 +0000 Subject: [issue10405] IDLE breakpoint facility undocumented In-Reply-To: <1289638474.62.0.690259510388.issue10405@psf.upfronthosting.co.za> Message-ID: <1350710392.64.0.668975781976.issue10405@psf.upfronthosting.co.za> Todd Rovito added the comment: Nick, I agree some documentation is better than none. But somebody could do better I am not sure how to debug in IDLE. I have taken your file and created a 2.7 patch. ---------- keywords: +patch type: -> enhancement versions: -Python 3.1, Python 3.2 Added file: http://bugs.python.org/file27627/IDLEBreakPointDocumentation2point7.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10405> _______________________________________ From report at bugs.python.org Sat Oct 20 07:48:58 2012 From: report at bugs.python.org (Todd Rovito) Date: Sat, 20 Oct 2012 05:48:58 +0000 Subject: [issue10405] IDLE breakpoint facility undocumented In-Reply-To: <1289638474.62.0.690259510388.issue10405@psf.upfronthosting.co.za> Message-ID: <1350712138.7.0.502156821771.issue10405@psf.upfronthosting.co.za> Changes by Todd Rovito <rovitotv at gmail.com>: Removed file: http://bugs.python.org/file27627/IDLEBreakPointDocumentation2point7.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10405> _______________________________________ From report at bugs.python.org Sat Oct 20 07:49:37 2012 From: report at bugs.python.org (Todd Rovito) Date: Sat, 20 Oct 2012 05:49:37 +0000 Subject: [issue10405] IDLE breakpoint facility undocumented In-Reply-To: <1289638474.62.0.690259510388.issue10405@psf.upfronthosting.co.za> Message-ID: <1350712177.83.0.235340508987.issue10405@psf.upfronthosting.co.za> Todd Rovito added the comment: This patch works for both Python 3.4 and Python 2.7, it is a very simple patch. ---------- versions: +Python 3.4 Added file: http://bugs.python.org/file27628/IDLEBreakPointDocumentation.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10405> _______________________________________ From report at bugs.python.org Sat Oct 20 08:05:20 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 20 Oct 2012 06:05:20 +0000 Subject: [issue16286] Optimize a==b and a!=b for bytes and str In-Reply-To: <1350650166.87.0.27478619259.issue16286@psf.upfronthosting.co.za> Message-ID: <1350713120.78.0.107039524684.issue16286@psf.upfronthosting.co.za> Gregory P. Smith added the comment: something to include in your statistics is the lengths of the already hashed data being compared. i expect there to be a minimum length before this optimization is useful. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16286> _______________________________________ From report at bugs.python.org Sat Oct 20 08:51:04 2012 From: report at bugs.python.org (Todd Rovito) Date: Sat, 20 Oct 2012 06:51:04 +0000 Subject: [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1350715864.23.0.39887598223.issue16278@psf.upfronthosting.co.za> Changes by Todd Rovito <rovitotv at gmail.com>: ---------- nosy: +Todd.Rovito _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16278> _______________________________________ From report at bugs.python.org Sat Oct 20 09:12:20 2012 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Oct 2012 07:12:20 +0000 Subject: [issue16289] Update devguide for 3.4 Message-ID: <1350717140.43.0.154723711234.issue16289@psf.upfronthosting.co.za> New submission from Ned Deily: The Developer's Guide needs to be updated to reflect the release of 3.3. Primarily, this involves adding the 3.3 branch and updating the sequence of branch names and other release number references. The attached patch does so. It's pretty much a straightforward substitution except for noting that the 3.2 branch remains open for bug fixes until its upcoming final maintenance release when it will move to security mode (the devguide should be updated again at that point). ---------- assignee: ned.deily components: Devguide files: update_devguide_for_34.patch keywords: patch messages: 173372 nosy: benjamin.peterson, ezio.melotti, georg.brandl, larry, ned.deily priority: normal severity: normal stage: patch review status: open title: Update devguide for 3.4 Added file: http://bugs.python.org/file27629/update_devguide_for_34.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16289> _______________________________________ From report at bugs.python.org Sat Oct 20 09:25:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 07:25:18 +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: <1350717918.8.0.784916055485.issue16218@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I can reproduce this on Linux (3.3+ only): $ name=$(printf "\xff") $ echo "print('Hello, world')" >$name $ ./python $name python: failed to set __main__.__loader__ The issue is in PyRun_SimpleFileExFlags() function, which gets raw char * as the file name (the documentation says about the filesystem encoding (sys.getfilesystemencoding())), but then this name decoded from UTF-8 in set_main_loader(). ---------- components: +Interpreter Core -Windows keywords: +3.3regression nosy: +serhiy.storchaka versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16218> _______________________________________ From report at bugs.python.org Sat Oct 20 09:55:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 07:55:03 +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: <1350719703.03.0.828025924078.issue16218@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which fixes filename decoding error in PyRun_SimpleFileExFlags(). ---------- keywords: +patch Added file: http://bugs.python.org/file27630/pythonrun_filename_decoding.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16218> _______________________________________ From report at bugs.python.org Sat Oct 20 10:29:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 08:29:23 +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: <1350721763.13.0.077446352045.issue15872@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- components: +Library (Lib) nosy: +larry, serhiy.storchaka versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15872> _______________________________________ From report at bugs.python.org Sat Oct 20 10:29:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 08:29: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: <1350721793.41.0.334522849904.issue15872@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- keywords: +3.3regression _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15872> _______________________________________ From report at bugs.python.org Sat Oct 20 10:53:28 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 08:53:28 +0000 Subject: [issue12805] Optimizations for bytes.join() et. al In-Reply-To: <1313973836.25.0.316459845083.issue12805@psf.upfronthosting.co.za> Message-ID: <1350723208.01.0.360267188824.issue12805@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In a normal loop we copy into the output buffer for each iteration the element and the separator. As you know, the processor can copy large amounts of data several times more efficiently than byte-for-byte. Therefore, filling the buffer by memset more efficient than calling Py_MEMCPY on each iteration if the buffer size is not too large. Experimenting on different machines I found that Py_MEMCPY is more expensive than sequential filling up to 32 bytes (may be even more, but I chose a conservative estimate). And for empty separator we can just omit copying and filling (it saves several checks per iteration). ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12805> _______________________________________ From report at bugs.python.org Sat Oct 20 11:16:09 2012 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Oct 2012 09:16:09 +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: <1350724569.46.0.738004984687.issue16218@psf.upfronthosting.co.za> STINNER Victor added the comment: The patch looks correct, but a test is missing. ---------- nosy: +haypo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16218> _______________________________________ From report at bugs.python.org Sat Oct 20 11:22:39 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sat, 20 Oct 2012 09:22:39 +0000 Subject: [issue16236] Doc/Makefile should have $PYTHON=python2 In-Reply-To: <1350252917.6.0.180225296667.issue16236@psf.upfronthosting.co.za> Message-ID: <1350724959.75.0.0150218095718.issue16236@psf.upfronthosting.co.za> Michele Orr? added the comment: > The patch should not unconditionally use `python2` since many distributions do not yet install a `python2` link > to the interpreter nor is there one when running python2.7 from a build directory. The Makefile could > conditionally try `python2` and then fall back to `python`. Sorry, I did not know that some OSes could not have the `python2` symlink, I just watched if there was on the Makefile. > Yes, please don?t break many OSes for the sake of one. Concerning this, we should do a proper configure script. Do you think that's worth it, E`ric? ``` Real configure scripts are generally much more complicated than this, since they may deal with systems where $PATH is not delimited by colons; or systems where executable programs may have optional extensions like .EXE; or $PATH variables that have the current working directory included in them as an empty string; etc. ```` -- http://mywiki.wooledge.org/BashFAQ/081 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16236> _______________________________________ From report at bugs.python.org Sat Oct 20 11:37:21 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Oct 2012 09:37:21 +0000 Subject: [issue12805] Optimizations for bytes.join() et. al In-Reply-To: <1313973836.25.0.316459845083.issue12805@psf.upfronthosting.co.za> Message-ID: <1350725841.96.0.498268789159.issue12805@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, but does it really make a difference and in which cases? In other words, do you have benchmark numbers? :) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12805> _______________________________________ From report at bugs.python.org Sat Oct 20 11:39:39 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 20 Oct 2012 09:39:39 +0000 Subject: [issue16290] PyComplex_AsCComplex should allow __complex__ to return float. Message-ID: <1350725979.91.0.694424373202.issue16290@psf.upfronthosting.co.za> New submission from Mark Dickinson: See thread starting at http://mail.python.org/pipermail/python-dev/2012-October/122241.html The cmath module functions don't accept custom types that define __complex__, but whose __complex__ method returns a float rather than a complex number: Python 3.4.0a0 (default:53a7c2226a2b+, Oct 19 2012, 12:16:36) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> class A: ... def __complex__(self): return 42.0 ... >>> import cmath >>> cmath.sqrt(A()) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: __complex__ should return a complex object In contrast, the complex constructor is happy to accept such objects. The root cause is that PyArg_ParseTuple's 'D' format calls PyComplex_AsCComplex (in Objects/complexobject.c), which refuses to accept a __complex__ result of type float. ---------- assignee: mark.dickinson components: Interpreter Core messages: 173379 nosy: mark.dickinson priority: normal severity: normal stage: needs patch status: open title: PyComplex_AsCComplex should allow __complex__ to return float. type: enhancement versions: Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16290> _______________________________________ From report at bugs.python.org Sat Oct 20 11:51:34 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 20 Oct 2012 09:51:34 +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: <1350726694.58.0.775287360981.issue16290@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch ---------- keywords: +patch Added file: http://bugs.python.org/file27631/issue16290.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16290> _______________________________________ From report at bugs.python.org Sat Oct 20 12:02:47 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 20 Oct 2012 10:02:47 +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: <1350727367.54.0.546798169338.issue16218@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +ezio.melotti stage: -> test needed type: crash -> behavior _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16218> _______________________________________ From report at bugs.python.org Sat Oct 20 12:13:58 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 20 Oct 2012 10:13:58 +0000 Subject: [issue16289] Update devguide for 3.4 In-Reply-To: <1350717140.43.0.154723711234.issue16289@psf.upfronthosting.co.za> Message-ID: <1350728038.65.0.0244268830177.issue16289@psf.upfronthosting.co.za> Ezio Melotti added the comment: LGTM ---------- type: -> enhancement _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16289> _______________________________________ From report at bugs.python.org Sat Oct 20 12:31:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 10:31: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: <1350729072.08.0.795921434814.issue16218@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Where we have tests for Python launch? I can't find. runpy is not affected. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16218> _______________________________________ From report at bugs.python.org Sat Oct 20 13:28:43 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 11:28:43 +0000 Subject: [issue15989] Possible integer overflow of PyLong_AsLong() results In-Reply-To: <1348167705.87.0.588220983695.issue15989@psf.upfronthosting.co.za> Message-ID: <1350732523.96.0.47006986151.issue15989@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a tests for most of fixed overflows. Some errors are difficult or impossible to reproduce. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15989> _______________________________________ From report at bugs.python.org Sat Oct 20 13:29:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 11:29:26 +0000 Subject: [issue15989] Possible integer overflow of PyLong_AsLong() results In-Reply-To: <1348167705.87.0.588220983695.issue15989@psf.upfronthosting.co.za> Message-ID: <1350732566.25.0.958991284101.issue15989@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: Added file: http://bugs.python.org/file27632/long_aslong_overflow_tests.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15989> _______________________________________ From report at bugs.python.org Sat Oct 20 13:40:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 11:40:27 +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: <1350733227.26.0.533547768969.issue16290@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch LGTM. Is there a new feature, not a bugfix? If yes, then I expect some documentation changes. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16290> _______________________________________ From report at bugs.python.org Sat Oct 20 13:41:14 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 20 Oct 2012 11:41:14 +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: <1350733274.64.0.606192538039.issue15872@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: + self.assertEqual(shutil.rmtree(os.path.join(tmpdir, "tstfile"), + ignore_errors=True), None) I wouldn't use assertEqual as the return value is not meaningful. ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15872> _______________________________________ From report at bugs.python.org Sat Oct 20 13:56:17 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 20 Oct 2012 11:56:17 +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: <1350734177.95.0.540926194354.issue16290@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Is there a new feature, not a bugfix? There's an ongoing argument about that on the python-dev thread. :-) But yes, I think this needs a doc update---even if it's considered a bugfix, the current docs could be clarified. http://docs.python.org/dev/reference/datamodel.html?highlight=__complex__#object.__complex__ says "Should return a value of the appropriate type." My interpretation of that is that __int__ should return an int, __float__ a float, __complex__ a complex number; with this change, that interpretation no longer works. I'll update the patch (and add a Misc/NEWS entry, too). Thanks! ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16290> _______________________________________ From report at bugs.python.org Sat Oct 20 14:29:27 2012 From: report at bugs.python.org (Djoume Salvetti) Date: Sat, 20 Oct 2012 12:29:27 +0000 Subject: [issue5128] compileall: consider ctime In-Reply-To: <1233584376.51.0.787053739937.issue5128@psf.upfronthosting.co.za> Message-ID: <1350736167.86.0.415630040791.issue5128@psf.upfronthosting.co.za> Djoume Salvetti added the comment: This patch introduces a slight change in behaviour. Now compilation will only happen if there is a difference in the number of seconds in the timestamp of files, before this patch any difference in mtime will trigger a rebuild. This is because the timestamp in the pyc file is an integer number of seconds, while mtime from stat is a float time. ---------- nosy: +djoume _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5128> _______________________________________ From report at bugs.python.org Sat Oct 20 14:30:00 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 20 Oct 2012 12:30:00 +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: <1350736200.64.0.0405408744633.issue16284@psf.upfronthosting.co.za> Mark Dickinson added the comment: A new patch (with tests), and a fuller explanation: At work, we've got Python talking to a customer's existing COM library; we're using Thomas Heller's 'comtypes' library to do that. Unfortunately, comtypes depends quite a lot on __del__-time cleanup, so reference counting matters. (I'm well aware that this isn't the recommended way to deal with resource cleanup in Python, but rewriting the existing infrastructure isn't a realistic option here.) Anyway, it turned out that the concurrent.futures executors were indirectly holding onto references to COM objects, causing issues with our application. The attached patch adds a few 'del' statements to remove references that are no longer needed. For the ProcessExecutor, some of those 'del' statements had to go into the multiprocessing.Queue implementation. The troublesome pattern (in both multiprocessing and futures) takes the form (simplified): def my_worker_function(...): ... while <exit_condition_not_satisfied>: obj = blocking_wait_for_next_item() do_processing(obj) ... The issue is that the reference to obj is kept until the completion of the next blocking wait call. I'm suggesting just adding an extra 'del obj' after 'do_processing(obj)'. ---------- components: +Library (Lib) Added file: http://bugs.python.org/file27633/kill_reference_2.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16284> _______________________________________ From report at bugs.python.org Sat Oct 20 14:38:20 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 20 Oct 2012 12:38:20 +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: <1350736700.66.0.246038773301.issue16284@psf.upfronthosting.co.za> Changes by Mark Dickinson <dickinsm at gmail.com>: ---------- nosy: +jnoller, sbt _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16284> _______________________________________ From report at bugs.python.org Sat Oct 20 14:41:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 12:41:13 +0000 Subject: [issue16290] PyComplex_AsCComplex should allow __complex__ to return float. In-Reply-To: <1350734177.95.0.540926194354.issue16290@psf.upfronthosting.co.za> Message-ID: <201210201540.58186.storchaka@gmail.com> Serhiy Storchaka added the comment: > My interpretation of that is that __int__ should return an int, __float__ a > float, __complex__ a complex number; It's a reasonable interpretation. Changing it can be confusing. On the other hand, int and float look like specialized subclasses of complex (they even have .real, .imag and .conjugate()). The ducktype principle requires that we can use ints or floats everywhere where complexes needed. This means that you should add a branch for integers too. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16290> _______________________________________ From report at bugs.python.org Sat Oct 20 15:03:25 2012 From: report at bugs.python.org (Chris Mayo) Date: Sat, 20 Oct 2012 13:03:25 +0000 Subject: [issue2350] 'exceptions' import fixer In-Reply-To: <1205781728.94.0.172904523331.issue2350@psf.upfronthosting.co.za> Message-ID: <1350738205.43.0.0153652899218.issue2350@psf.upfronthosting.co.za> Changes by Chris Mayo <aklhfex at gmail.com>: ---------- nosy: +cjmayo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue2350> _______________________________________ From report at bugs.python.org Sat Oct 20 15:17:44 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 20 Oct 2012 13:17:44 +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: <1350739064.32.0.748018133948.issue16290@psf.upfronthosting.co.za> Mark Dickinson added the comment: > This means that you should add a branch for integers too. I'd rather not go that far, at least in this issue: we'd also end up changing __float__ to allow it to return an int, in that case. If we're considering that, the discussion should go back to python-dev / python-ideas. One difference is that int -> float is a lossy conversion that has to care about details like rounding and overflow. float -> complex in contrast is much simpler. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16290> _______________________________________ From report at bugs.python.org Sat Oct 20 15:53:33 2012 From: report at bugs.python.org (Mike Hoy) Date: Sat, 20 Oct 2012 13:53:33 +0000 Subject: [issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription()) In-Reply-To: <1350671689.29.0.0409273215418.issue16288@psf.upfronthosting.co.za> Message-ID: <1350741213.68.0.587721084838.issue16288@psf.upfronthosting.co.za> Changes by Mike Hoy <mhoy09 at gmail.com>: ---------- nosy: +mikehoy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16288> _______________________________________ From report at bugs.python.org Sat Oct 20 16:24:39 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Oct 2012 14:24:39 +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: <1350743079.31.0.0903018554997.issue16284@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Sounds fine to me. You might want to make the test CPython-specific. ---------- nosy: +pitrou _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16284> _______________________________________ From report at bugs.python.org Sat Oct 20 16:25:44 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Oct 2012 14:25:44 +0000 Subject: [issue16289] Update devguide for 3.4 In-Reply-To: <1350717140.43.0.154723711234.issue16289@psf.upfronthosting.co.za> Message-ID: <1350743144.76.0.724860629464.issue16289@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It doesn't sound very useful to mention both 3.2 and 3.3, since 3.2 maintenance will soon stop. ---------- nosy: +pitrou _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16289> _______________________________________ From report at bugs.python.org Sat Oct 20 16:35:40 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 20 Oct 2012 14:35:40 +0000 Subject: [issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription()) In-Reply-To: <1350671689.29.0.0409273215418.issue16288@psf.upfronthosting.co.za> Message-ID: <1350743740.39.0.866977193481.issue16288@psf.upfronthosting.co.za> R. David Murray added the comment: The special handling of special methods is baked into the attribute lookup machinery. The discussion of this is in the language reference somewhere, as is the explanation of what descriptors are and how they work. ---------- type: -> enhancement _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16288> _______________________________________ From report at bugs.python.org Sat Oct 20 17:09:28 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 20 Oct 2012 15:09:28 +0000 Subject: [issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription()) In-Reply-To: <1350671689.29.0.0409273215418.issue16288@psf.upfronthosting.co.za> Message-ID: <1350745768.44.0.170557583196.issue16288@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > So the relevant code is this: > def getDescription(self, test): > ... > 43 return str(test) > ... > What I'd like is to have this be something like: > 44 return test.id() > Or anther way this could be done would be to make TestCase.__str__ call self.id() Note that str(test) and test.id() don't return the same value. The former is the "friendly" name. It is probably intentional that TextTestResult uses the TestCase instance's friendly name in its getDescription() method as opposed to the id. > TextTestRunner calls str(TestCase) directly, which makes it hard for testscenarios to rename the test cases as it parameterises them What about testscenarios subclassing the TestCase instances as it parametrizes them? class ScenariosTestCase(case.__class__): def __str__(self): return "testscenarios test name..." case.__class__ = ScenariosTestCase print(str(case)) >From the documentation, it looks like testscenarios creates new test objects from the originals anyways. Alternatively (although I don't if testscenarios can control what test runner is being used), TextTestRunner could be subclassed with its own getDescription() method. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16288> _______________________________________ From report at bugs.python.org Sat Oct 20 17:09:31 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 20 Oct 2012 15:09:31 +0000 Subject: [issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription()) In-Reply-To: <1350671689.29.0.0409273215418.issue16288@psf.upfronthosting.co.za> Message-ID: <1350745771.47.0.442482557761.issue16288@psf.upfronthosting.co.za> ?ric Araujo added the comment: http://docs.python.org/reference/datamodel.html#special-method-lookup-for-new-style-classes ---------- nosy: +eric.araujo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16288> _______________________________________ From report at bugs.python.org Sat Oct 20 17:12:46 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 20 Oct 2012 15:12:46 +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: <1350745966.62.0.827698454396.issue15872@psf.upfronthosting.co.za> ?ric Araujo added the comment: NotADirectoryError not being caught makes sense to me: not passing a directory as argument to rmtree is a programmer error, not something coming from the OS or filesystem. ---------- nosy: +eric.araujo, pitrou _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15872> _______________________________________ From report at bugs.python.org Sat Oct 20 17:59:49 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Oct 2012 15:59:49 +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: <1350748789.92.0.918309462485.issue15872@psf.upfronthosting.co.za> Antoine Pitrou added the comment: To be honest I don't really understand the point of the ignore_errors flag on rmtree. If rmtree fails to delete the directory tree (which will happen if one of the files can't be deleted), why would you want it to return succesfully? ---------- nosy: +hynek _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15872> _______________________________________ From report at bugs.python.org Sat Oct 20 18:24:42 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 16:24:42 +0000 Subject: [issue12805] Optimizations for bytes.join() et. al In-Reply-To: <1350725841.96.0.498268789159.issue12805@psf.upfronthosting.co.za> Message-ID: <201210201924.25284.storchaka@gmail.com> Serhiy Storchaka added the comment: > Ok, but does it really make a difference and in which cases? Up to 40% on Athlon and up to 70% on Atom. > In other words, do you have benchmark numbers? :) Attached results for AMD Athlon 64 X2 4600+ and Intel Atom N570 @ 1.66GHz under 32-bit Linux. You can run the benchmark on your machine (requires Posix- compatible shell, sed awk). ---------- Added file: http://bugs.python.org/file27634/bytes_join_bench.res Added file: http://bugs.python.org/file27635/bytes_join_bench_2.res _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12805> _______________________________________ -------------- next part -------------- 0 x 3 0.313 usec 0.34 usec -8% 1 x 3 0.311 usec 0.307 usec +1% 2 x 3 0.322 usec 0.3 usec +7% 5 x 3 0.322 usec 0.31 usec +4% 10 x 3 0.319 usec 0.345 usec -8% 20 x 3 0.32 usec 0.323 usec -1% 50 x 3 0.356 usec 0.355 usec +0% 100 x 3 0.358 usec 0.364 usec -2% 1000 x 3 0.908 usec 0.899 usec +1% 0 x 10 0.623 usec 0.529 usec +18% 1 x 10 0.61 usec 0.543 usec +12% 2 x 10 0.651 usec 0.532 usec +22% 5 x 10 0.655 usec 0.591 usec +11% 10 x 10 0.683 usec 0.584 usec +17% 20 x 10 0.681 usec 0.615 usec +11% 50 x 10 0.825 usec 0.878 usec -6% 100 x 10 0.861 usec 0.888 usec -3% 1000 x 10 2.37 usec 2.27 usec +4% 0 x 100 4.55 usec 3.41 usec +33% 1 x 100 4.39 usec 3.56 usec +23% 2 x 100 4.83 usec 3.33 usec +45% 5 x 100 4.98 usec 3.76 usec +32% 10 x 100 5.17 usec 3.98 usec +30% 20 x 100 5.11 usec 4.28 usec +19% 50 x 100 5.99 usec 6.45 usec -7% 100 x 100 6.81 usec 6.46 usec +5% 1000 x 100 40.8 usec 40.8 usec +0% 0 x 1000 43.3 usec 30.6 usec +42% 1 x 1000 41.9 usec 37.8 usec +11% 2 x 1000 46 usec 35.7 usec +29% 5 x 1000 46.1 usec 35.9 usec +28% 10 x 1000 49.9 usec 36.2 usec +38% 20 x 1000 49.4 usec 45.8 usec +8% 50 x 1000 96.3 usec 95.7 usec +1% 100 x 1000 125 usec 126 usec -1% 1000 x 1000 1.74 msec 1.74 msec +0% 0 x 10000 565 usec 458 usec +23% 1 x 10000 573 usec 473 usec +21% 2 x 10000 635 usec 454 usec +40% 5 x 10000 609 usec 504 usec +21% 10 x 10000 693 usec 597 usec +16% 20 x 10000 718 usec 682 usec +5% 50 x 10000 2.53 msec 2.51 msec +1% 100 x 10000 3.56 msec 3.52 msec +1% 1000 x 10000 16.7 msec 17 msec -2% -------------- next part -------------- 0 x 3 1.01 usec 0.935 usec +8% 1 x 3 0.993 usec 0.936 usec +6% 2 x 3 0.991 usec 0.93 usec +7% 5 x 3 0.991 usec 0.941 usec +5% 10 x 3 0.991 usec 0.936 usec +6% 20 x 3 1.03 usec 0.974 usec +6% 50 x 3 1.19 usec 1.14 usec +4% 100 x 3 1.15 usec 1.17 usec -2% 1000 x 3 1.85 usec 1.89 usec -2% 0 x 10 1.56 usec 1.47 usec +6% 1 x 10 1.56 usec 1.42 usec +10% 2 x 10 1.64 usec 1.48 usec +11% 5 x 10 1.77 usec 1.53 usec +16% 10 x 10 1.78 usec 1.48 usec +20% 20 x 10 1.95 usec 1.55 usec +26% 50 x 10 2.65 usec 2.64 usec +0% 100 x 10 2.71 usec 2.73 usec -1% 1000 x 10 5.12 usec 4.87 usec +5% 0 x 100 12.1 usec 7.49 usec +62% 1 x 100 9.88 usec 7.67 usec +29% 2 x 100 12.8 usec 7.64 usec +68% 5 x 100 12.8 usec 8.22 usec +56% 10 x 100 12.8 usec 8.39 usec +53% 20 x 100 14.2 usec 8.92 usec +59% 50 x 100 16.3 usec 16 usec +2% 100 x 100 19.7 usec 19.6 usec +1% 1000 x 100 47.6 usec 47.1 usec +1% 0 x 1000 125 usec 73.3 usec +71% 1 x 1000 98.2 usec 75.3 usec +30% 2 x 1000 126 usec 75.9 usec +66% 5 x 1000 113 usec 78.8 usec +43% 10 x 1000 124 usec 80.7 usec +54% 20 x 1000 137 usec 86.3 usec +59% 50 x 1000 173 usec 175 usec -1% 100 x 1000 256 usec 249 usec +3% 1000 x 1000 2.07 msec 2.05 msec +1% 0 x 10000 1.29 msec 769 usec -100% 1 x 10000 1.01 msec 792 usec -100% 2 x 10000 1.15 msec 802 usec -100% 5 x 10000 1.34 msec 834 usec -100% 10 x 10000 1.34 msec 887 usec -100% 20 x 10000 1.42 msec 996 usec -100% 50 x 10000 3.53 msec 3.57 msec -1% 100 x 10000 4.5 msec 4.51 msec -0% 1000 x 10000 21.5 msec 21.2 msec +1% From report at bugs.python.org Sat Oct 20 18:32:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 16:32:49 +0000 Subject: [issue10888] os.stat(filepath).st_mode gives wrong 'executable permission' result In-Reply-To: <1294751581.52.0.421644635374.issue10888@psf.upfronthosting.co.za> Message-ID: <1350750769.92.0.377251798672.issue10888@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- status: open -> pending _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10888> _______________________________________ From report at bugs.python.org Sat Oct 20 18:38:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 16:38:09 +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: <1350751089.09.0.255197726773.issue15872@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Now shutil.rmtree has different behavior when called for non-directory on systems with and without at-functions. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15872> _______________________________________ From report at bugs.python.org Sat Oct 20 18:42:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 16:42: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: <1350751373.33.0.39712375895.issue15872@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > If rmtree fails to delete the directory tree (which will happen if one of the files can't be deleted), why would you want it to return succesfully? At least it free some disk space. ;-) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15872> _______________________________________ From report at bugs.python.org Sat Oct 20 19:48:36 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Sat, 20 Oct 2012 17:48:36 +0000 Subject: [issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors In-Reply-To: <1350748789.92.0.918309462485.issue15872@psf.upfronthosting.co.za> Message-ID: <864B4B27-2744-49C3-BDE6-81828AD33429@ox.cx> Hynek Schlawack added the comment: > To be honest I don't really understand the point of the ignore_errors flag on rmtree. If rmtree fails to delete the directory tree (which will happen if one of the files can't be deleted), why would you want it to return succesfully? I presume it?s meant as a best-effort cleanup. Regardless both Eric & Serhiy are right: it?s a programmer error to call it on files and it may shadow bugs catching it. OTOH the implementation is inconsistent and not backward compatible now, so we have to fix it unfortunately. The patch needs to address Giampaolo?s (bug tracker) & Serhiy?s (Rietveld) comments before it can be merged though ? thanks. :) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15872> _______________________________________ From report at bugs.python.org Sat Oct 20 20:15:54 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Oct 2012 18:15:54 +0000 Subject: [issue12805] Optimizations for bytes.join() et. al In-Reply-To: <1313973836.25.0.316459845083.issue12805@psf.upfronthosting.co.za> Message-ID: <1350756954.69.0.104462399224.issue12805@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, here are the benchmark results here with a 1-byte separator: 10 x 10 0.244 usec 0.202 usec +21% 100 x 10 0.325 usec 0.326 usec -0% 1000 x 10 0.691 usec 0.689 usec +0% 10 x 1000 18.2 usec 14.2 usec +28% 100 x 1000 39.8 usec 40.6 usec -2% 1000 x 1000 94.6 usec 96 usec -1% and with an empty separator: 10 x 10 0.245 usec 0.198 usec +24% 100 x 10 0.335 usec 0.286 usec +17% 1000 x 10 0.637 usec 0.593 usec +7% 10 x 1000 18.9 usec 14.1 usec +34% 100 x 1000 40.3 usec 36.2 usec +11% 1000 x 1000 93.7 usec 96.9 usec -3% (Core i5 2500K, 64-bit, gcc) I would say the empty separator case is interesting, because a common use case for bytes.join() is indeed fast concatenation. However, the 1-byte separator case could be dropped, which would simplify the patch and the heuristic. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12805> _______________________________________ From report at bugs.python.org Sat Oct 20 20:53:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 18:53:01 +0000 Subject: [issue12805] Optimizations for bytes.join() et. al In-Reply-To: <1313973836.25.0.316459845083.issue12805@psf.upfronthosting.co.za> Message-ID: <1350759181.27.0.154666664354.issue12805@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Indeed, 1-char separator is more common for strings, but I found several b'\n'.join or b','.join even in stdlib. 3 lines of difference are only 2.3% of Objects/stringlib/join.h. Here is a patch with dropped the 1-byte separator case. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12805> _______________________________________ From report at bugs.python.org Sat Oct 20 20:54:51 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 18:54:51 +0000 Subject: [issue12805] Optimizations for bytes.join() et. al In-Reply-To: <1313973836.25.0.316459845083.issue12805@psf.upfronthosting.co.za> Message-ID: <1350759291.46.0.913186251511.issue12805@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: Added file: http://bugs.python.org/file27636/bytes_join_optimization_3.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12805> _______________________________________ From report at bugs.python.org Sat Oct 20 21:03:19 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 19:03:19 +0000 Subject: [issue15027] Faster UTF-32 encoding In-Reply-To: <1339077451.46.0.686170991807.issue15027@psf.upfronthosting.co.za> Message-ID: <1350759799.83.0.472717717224.issue15027@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: Removed file: http://bugs.python.org/file25857/encode-utf32.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15027> _______________________________________ From report at bugs.python.org Sat Oct 20 21:05:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 19:05:07 +0000 Subject: [issue15027] Faster UTF-32 encoding In-Reply-To: <1339077451.46.0.686170991807.issue15027@psf.upfronthosting.co.za> Message-ID: <1350759907.83.0.916347710571.issue15027@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated to 3.4. Is anyone interested in 7x speedup of UTF-32 encoder? ---------- keywords: +needs review versions: +Python 3.4 -Python 3.3 Added file: http://bugs.python.org/file27637/encode_utf32_2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15027> _______________________________________ From report at bugs.python.org Sat Oct 20 21:06:21 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 19:06:21 +0000 Subject: [issue14625] Faster utf-32 decoder In-Reply-To: <1334869197.32.0.159275934867.issue14625@psf.upfronthosting.co.za> Message-ID: <1350759981.36.0.112165595336.issue14625@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: Removed file: http://bugs.python.org/file25278/decode_utf32_a.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14625> _______________________________________ From report at bugs.python.org Sat Oct 20 21:06:35 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 19:06:35 +0000 Subject: [issue14625] Faster utf-32 decoder In-Reply-To: <1334869197.32.0.159275934867.issue14625@psf.upfronthosting.co.za> Message-ID: <1350759995.01.0.633425135263.issue14625@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: Removed file: http://bugs.python.org/file25279/decode_utf32_b.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14625> _______________________________________ From report at bugs.python.org Sat Oct 20 21:06:51 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 19:06:51 +0000 Subject: [issue14625] Faster utf-32 decoder In-Reply-To: <1334869197.32.0.159275934867.issue14625@psf.upfronthosting.co.za> Message-ID: <1350760011.21.0.780033115219.issue14625@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: Removed file: http://bugs.python.org/file25537/decode_utf32_a_2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14625> _______________________________________ From report at bugs.python.org Sat Oct 20 21:07:24 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 19:07:24 +0000 Subject: [issue14625] Faster utf-32 decoder In-Reply-To: <1334869197.32.0.159275934867.issue14625@psf.upfronthosting.co.za> Message-ID: <1350760044.69.0.250847959242.issue14625@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: Removed file: http://bugs.python.org/file25538/decode_utf32_b_2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14625> _______________________________________ From report at bugs.python.org Sat Oct 20 21:10:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 19:10:08 +0000 Subject: [issue14625] Faster utf-32 decoder In-Reply-To: <1334869197.32.0.159275934867.issue14625@psf.upfronthosting.co.za> Message-ID: <1350760208.01.0.600885393969.issue14625@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patches updated to 3.4. ---------- keywords: +needs review versions: +Python 3.4 -Python 3.3 Added file: http://bugs.python.org/file27638/decode_utf32_a_3.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14625> _______________________________________ From report at bugs.python.org Sat Oct 20 21:11:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 19:11:26 +0000 Subject: [issue14625] Faster utf-32 decoder In-Reply-To: <1334869197.32.0.159275934867.issue14625@psf.upfronthosting.co.za> Message-ID: <1350760286.25.0.763215241029.issue14625@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- keywords: +3.3regression Added file: http://bugs.python.org/file27639/decode_utf32_b_3.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14625> _______________________________________ From report at bugs.python.org Sat Oct 20 21:23:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 19:23:40 +0000 Subject: [issue14625] Faster utf-32 decoder In-Reply-To: <1334869197.32.0.159275934867.issue14625@psf.upfronthosting.co.za> Message-ID: <1350761020.57.0.505390219816.issue14625@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I suggest apply patch A to 3.3 as it fixes performance regression (2x) and is very simple. ---------- versions: +Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14625> _______________________________________ From report at bugs.python.org Sat Oct 20 21:25:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 19:25:53 +0000 Subject: [issue14625] Faster utf-32 decoder In-Reply-To: <1334869197.32.0.159275934867.issue14625@psf.upfronthosting.co.za> Message-ID: <1350761153.43.0.899820263935.issue14625@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- nosy: +georg.brandl _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14625> _______________________________________ From report at bugs.python.org Sat Oct 20 21:38:13 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 20 Oct 2012 19:38:13 +0000 Subject: [issue14625] Faster utf-32 decoder In-Reply-To: <1334869197.32.0.159275934867.issue14625@psf.upfronthosting.co.za> Message-ID: <1350761893.41.0.974921225885.issue14625@psf.upfronthosting.co.za> Georg Brandl added the comment: Very simple? You're changing most of the code there. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14625> _______________________________________ From report at bugs.python.org Sat Oct 20 21:59:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 19:59:49 +0000 Subject: [issue14625] Faster utf-32 decoder In-Reply-To: <1350761893.41.0.974921225885.issue14625@psf.upfronthosting.co.za> Message-ID: <201210202259.33410.storchaka@gmail.com> Serhiy Storchaka added the comment: It was too complicated code. Actually patched code is smaller. 1 file changed, 71 insertions(+), 80 deletions(-) UTF-16 codec was modified in some way. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14625> _______________________________________ From report at bugs.python.org Sat Oct 20 22:04:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 20:04:44 +0000 Subject: [issue15186] Support os.walk(dir_fd=) In-Reply-To: <1340667585.2.0.886069096281.issue15186@psf.upfronthosting.co.za> Message-ID: <1350763484.95.0.451260039176.issue15186@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- status: open -> pending _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15186> _______________________________________ From report at bugs.python.org Sat Oct 20 22:09:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 20:09:41 +0000 Subject: [issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16) Message-ID: <1350763781.01.0.631054237413.issue1470548@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- keywords: +needs review stage: test needed -> versions: +Python 3.4 -Python 3.1 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1470548> _______________________________________ From report at bugs.python.org Sat Oct 20 22:13:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 20:13:22 +0000 Subject: [issue1598083] Top-level exception handler writes to stdout unsafely Message-ID: <1350764002.46.0.449724738071.issue1598083@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- Removed message: http://bugs.python.org/msg162876 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1598083> _______________________________________ From report at bugs.python.org Sat Oct 20 22:13:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 20:13:40 +0000 Subject: [issue1598083] Top-level exception handler writes to stdout unsafely Message-ID: <1350764020.13.0.17802126559.issue1598083@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- nosy: -serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1598083> _______________________________________ From report at bugs.python.org Sat Oct 20 22:21:49 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 20 Oct 2012 20:21:49 +0000 Subject: [issue14625] Faster utf-32 decoder In-Reply-To: <1334869197.32.0.159275934867.issue14625@psf.upfronthosting.co.za> Message-ID: <1350764508.99.0.500051551296.issue14625@psf.upfronthosting.co.za> Georg Brandl added the comment: That the new code is smaller is no guarantee that it's as correct :) That is exactly the reason we don't put optimizations in bugfix releases. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14625> _______________________________________ From report at bugs.python.org Sat Oct 20 22:24:42 2012 From: report at bugs.python.org (Todd Rovito) Date: Sat, 20 Oct 2012 20:24:42 +0000 Subject: [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1350764682.03.0.120431957014.issue16278@psf.upfronthosting.co.za> Todd Rovito added the comment: David, Thanks for your bug report. Indeed os.rename does not exhibit the same behavior as the documentation describes. For Python 3.4 here is the fix I came up with: "Rename the file or directory src to dst. If dst is a directory that is not empty, OSError will be raised. On Unix, if dst exists and is a file, it will be replaced silently if the user has permission and src is a file. On Unix, if src is a directory and dst is a file NotADirectoryError will be raised. The operation may fail on some Unix flavors if src and dst are on different filesystems. If successful, the renaming will be an atomic operation (this is a POSIX requirement). On Windows, if dst already exists, OSError will be raised even if it is a file." I have attached a Python 3.4 patch for consideration. This might not be the best phrasing so please feel free to offer alternatives. ---------- keywords: +patch Added file: http://bugs.python.org/file27640/OSRenameTest3point4.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16278> _______________________________________ From report at bugs.python.org Sat Oct 20 22:28:51 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Oct 2012 20:28:51 +0000 Subject: [issue10405] IDLE breakpoint facility undocumented In-Reply-To: <1289638474.62.0.690259510388.issue10405@psf.upfronthosting.co.za> Message-ID: <3XkbDf1wNhzR86@mail.python.org> Roundup Robot added the comment: New changeset c0a423ce4b96 by Ned Deily in branch '2.7': Issue #10405: Document IDLE context menus in Standard Library document http://hg.python.org/cpython/rev/c0a423ce4b96 New changeset 566b7574becb by Ned Deily in branch '3.2': Issue #10405: Document IDLE context menus in Standard Library document http://hg.python.org/cpython/rev/566b7574becb New changeset 85c4d21f7454 by Ned Deily in branch '3.3': Issue #10405: merge from 3.2 http://hg.python.org/cpython/rev/85c4d21f7454 New changeset ea7849650fd1 by Ned Deily in branch 'default': Issue #10405: merge from 3.3 http://hg.python.org/cpython/rev/ea7849650fd1 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10405> _______________________________________ From report at bugs.python.org Sat Oct 20 22:36:01 2012 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Oct 2012 20:36:01 +0000 Subject: [issue10405] IDLE breakpoint facility undocumented In-Reply-To: <1289638474.62.0.690259510388.issue10405@psf.upfronthosting.co.za> Message-ID: <1350765361.62.0.316926725972.issue10405@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for your suggestions, Nick and Todd. While reviewing them, I realized that there is also a small context (right-click) menu for the IDLE shell window as well. I expanded the doc changes to include it and included several other minor doc updates. I also updated the builtin IDLE Help file. By the way, if you haven't already and wish to contribute patches, please be sure to sign a PSF contributor agreement (http://www.python.org/psf/contrib/). ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: enhancement -> versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10405> _______________________________________ From report at bugs.python.org Sat Oct 20 22:37:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 20:37:44 +0000 Subject: [issue16042] smtplib: unlimited readline() from connection In-Reply-To: <1348569609.82.0.499861906556.issue16042@psf.upfronthosting.co.za> Message-ID: <1350765464.77.0.469864093705.issue16042@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I understand you, it's a patch against 2.7. >+ def readline(self, size=-1): In io.IOBase.readline() and in io.TextIOBase.readline() this parameter named "limit". >+ if size is not None and len(str) == size: >+ break It can be moved to the while condition: while chr != b"\n" and (size is None or len(str) < size): ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16042> _______________________________________ From report at bugs.python.org Sat Oct 20 22:41:33 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 20:41:33 +0000 Subject: [issue16013] small csv reader bug In-Reply-To: <1348491792.39.0.00618601585478.issue16013@psf.upfronthosting.co.za> Message-ID: <1350765693.56.0.00278063359291.issue16013@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16013> _______________________________________ From report at bugs.python.org Sat Oct 20 23:05:06 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Oct 2012 21:05:06 +0000 Subject: [issue16289] Update devguide for 3.4 In-Reply-To: <1350717140.43.0.154723711234.issue16289@psf.upfronthosting.co.za> Message-ID: <3Xkc2V22HXzQxd@mail.python.org> Roundup Robot added the comment: New changeset 2f682e133960 by Ned Deily in branch 'default': Issue #16289: Update Developer's Guide for the 3.4 development cycle. http://hg.python.org/devguide/rev/2f682e133960 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16289> _______________________________________ From report at bugs.python.org Sat Oct 20 23:09:52 2012 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Oct 2012 21:09:52 +0000 Subject: [issue16289] Update devguide for 3.4 In-Reply-To: <1350717140.43.0.154723711234.issue16289@psf.upfronthosting.co.za> Message-ID: <1350767392.29.0.38552583371.issue16289@psf.upfronthosting.co.za> Ned Deily added the comment: Antoine, I think if possible it is best to always have the devguide reflect the current process. Once 3.2 moves to security mode, it is a trivial process to update devguide again (no release involved!). ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16289> _______________________________________ From report at bugs.python.org Sat Oct 20 23:14:54 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Oct 2012 21:14:54 +0000 Subject: [issue12805] Optimizations for bytes.join() et. al In-Reply-To: <1313973836.25.0.316459845083.issue12805@psf.upfronthosting.co.za> Message-ID: <3XkcFn5NrTzRB8@mail.python.org> Roundup Robot added the comment: New changeset bfa715f98c0f by Antoine Pitrou in branch 'default': Issue #12805: Make bytes.join and bytearray.join faster when the separator is empty. http://hg.python.org/cpython/rev/bfa715f98c0f ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12805> _______________________________________ From report at bugs.python.org Sat Oct 20 23:15:41 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Oct 2012 21:15:41 +0000 Subject: [issue12805] Optimizations for bytes.join() et. al In-Reply-To: <1313973836.25.0.316459845083.issue12805@psf.upfronthosting.co.za> Message-ID: <1350767741.85.0.641240278385.issue12805@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I have committed the simple optimization patch, thank you! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12805> _______________________________________ From report at bugs.python.org Sat Oct 20 23:18:38 2012 From: report at bugs.python.org (John O'Connor) Date: Sat, 20 Oct 2012 21:18:38 +0000 Subject: [issue12805] Optimizations for bytes.join() et. al In-Reply-To: <1350767741.85.0.641240278385.issue12805@psf.upfronthosting.co.za> Message-ID: <CABCbifWsMWeKuM3BYGd3-Q=XLEN6u6jHVMnGme4RKZ6vac9Y-w@mail.gmail.com> John O'Connor added the comment: I think that's a good compromise and much better than what I had originally. - John ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12805> _______________________________________ From report at bugs.python.org Sat Oct 20 23:34:36 2012 From: report at bugs.python.org (Silverback Networks) Date: Sat, 20 Oct 2012 21:34:36 +0000 Subject: [issue15772] Unresolved symbols in Windows 64-bit python In-Reply-To: <1345754338.96.0.805254982219.issue15772@psf.upfronthosting.co.za> Message-ID: <1350768876.28.0.354296542604.issue15772@psf.upfronthosting.co.za> Silverback Networks added the comment: Same errors in 3.3. Some names are decorated, some aren't, seemingly at random. For instance, python32.lib contains: 35B20 _PyObject_Dump 35B20 __imp__PyObject_Dump and just below that, 2924A PyObject_Free 2924A __imp_PyObject_Free But the Visual Studio 2010 compiler always looks for the underscored names for x64, resulting in, for instance: error LNK2019: unresolved external symbol __imp__PyObject_Free referenced in function _WRdealloc I understand that the x64 isn't supposed to use underscore prefixes as all, but it is and Python partially is. I have no idea why. The preprocessed output of including python.h, btw, is: __declspec(dllimport) void PyObject_Free(void *); ---------- nosy: +silverbacknet _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15772> _______________________________________ From report at bugs.python.org Sat Oct 20 23:34:54 2012 From: report at bugs.python.org (Silverback Networks) Date: Sat, 20 Oct 2012 21:34:54 +0000 Subject: [issue15772] Unresolved symbols in Windows 64-bit python In-Reply-To: <1345754338.96.0.805254982219.issue15772@psf.upfronthosting.co.za> Message-ID: <1350768894.11.0.986082856356.issue15772@psf.upfronthosting.co.za> Changes by Silverback Networks <silverbacknet at gmail.com>: ---------- versions: +Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15772> _______________________________________ From report at bugs.python.org Sun Oct 21 00:09:37 2012 From: report at bugs.python.org (Ray Donnelly) Date: Sat, 20 Oct 2012 22:09:37 +0000 Subject: [issue16291] Fix some general cross compile issues and some darwin specific ones. Tested with build=linux, host=darwin Message-ID: <1350770977.75.0.64501763721.issue16291@psf.upfronthosting.co.za> New submission from Ray Donnelly: I've fixed up the very few missing configure bits and one issue with PYTHON_FOR_BUILD using srcdir instead of builddir. I also rolled in a simple warning fix that I ran into (the #ifdef HAVE_CHROOT added to posixmodule.c) configured with: $srcdir/configure --prefix=$PWD/install/darwin-x86_64/python-3.4.x --build=x86_64-linux-gnu --host=x86_64-apple-darwin11 using these compilers: http://mingw-and-ndk.googlecode.com/files/multiarch-darwin11-cctools127.2-gcc42-5666.3-llvmgcc42-2336.1-Linux-120724.tar.xz and MacOSX10.7.sdk, I can successfully build Python for Mac OS X on Linux. ---------- components: Cross-Build files: 0010-DARWIN-CROSS.patch keywords: patch messages: 173420 nosy: Ray.Donnelly, doko priority: normal severity: normal status: open title: Fix some general cross compile issues and some darwin specific ones. Tested with build=linux, host=darwin type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27641/0010-DARWIN-CROSS.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16291> _______________________________________ From report at bugs.python.org Sun Oct 21 00:17:25 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 22:17:25 +0000 Subject: [issue10182] match_start truncates large values In-Reply-To: <1287859071.54.0.617398147143.issue10182@psf.upfronthosting.co.za> Message-ID: <1350771445.47.0.531415243451.issue10182@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I analyzed all 1-valued usages of Py_BuildValue and found similar bags only in Modules/_sre.h. Here is a patch. Bugs should be evident on big-endian platform with sizeof(int) <?sizeof(size_t) or sizeof(long) <?sizeof(size_t). Standard tests should fail on such platforms. ---------- keywords: +patch versions: +Python 3.4 Added file: http://bugs.python.org/file27642/buildvalue_overflow.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10182> _______________________________________ From report at bugs.python.org Sun Oct 21 00:17:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2012 22:17:53 +0000 Subject: [issue10182] match_start truncates large values In-Reply-To: <1287859071.54.0.617398147143.issue10182@psf.upfronthosting.co.za> Message-ID: <1350771473.16.0.688444506678.issue10182@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10182> _______________________________________ From report at bugs.python.org Sun Oct 21 00:33:38 2012 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Oct 2012 22:33:38 +0000 Subject: [issue16291] Fix some general cross compile issues and some darwin specific ones. Tested with build=linux, host=darwin In-Reply-To: <1350770977.75.0.64501763721.issue16291@psf.upfronthosting.co.za> Message-ID: <1350772418.26.0.510605550145.issue16291@psf.upfronthosting.co.za> Ned Deily added the comment: I'm curious as to what value there would be in adding support for cross building an OS X variant of Python on Linux. It seems to me that such an animal would be fragile and incomplete at best. For example, normal Python builds on OS X normally require certain OS X frameworks outside of those included with the compiler. It's difficult enough to support native builds on a wide range of OS X releases and hardware configurations. Why would we want to officially support this particular variant of cross building on another platform? ---------- nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16291> _______________________________________ From report at bugs.python.org Sun Oct 21 01:05:08 2012 From: report at bugs.python.org (Ray Donnelly) Date: Sat, 20 Oct 2012 23:05:08 +0000 Subject: [issue16292] Cross compilation fixes (general) Message-ID: <1350774308.18.0.656262327513.issue16292@psf.upfronthosting.co.za> New submission from Ray Donnelly: This patch fixes 2 cross compilation bugs and improves a comment. ---------- components: Cross-Build files: 0005-cross-fixes.patch keywords: patch messages: 173423 nosy: Ray.Donnelly, doko priority: normal severity: normal status: open title: Cross compilation fixes (general) type: compile error versions: Python 3.4 Added file: http://bugs.python.org/file27643/0005-cross-fixes.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16292> _______________________________________ From report at bugs.python.org Sun Oct 21 01:10:02 2012 From: report at bugs.python.org (Ray Donnelly) Date: Sat, 20 Oct 2012 23:10:02 +0000 Subject: [issue16291] Fix some general cross compile issues and some darwin specific ones. Tested with build=linux, host=darwin In-Reply-To: <1350770977.75.0.64501763721.issue16291@psf.upfronthosting.co.za> Message-ID: <1350774602.88.0.284901850393.issue16291@psf.upfronthosting.co.za> Ray Donnelly added the comment: > It seems to me that such an animal would be fragile and incomplete at best. There's no reason for it to be either fragile or incomplete. My cross builds have a goal of being comprehensive. > Python builds on OS X normally require certain OS X frameworks outside of those included with the compiler. If the user supplies the Apple Mac OS X SDK then the frameworks are correctly detected and used. To enable this, I use a set of wrapper scripts to enable this, here's the contents of x86_64-apple-darwin11-gcc: #!/bin/sh # Auto-generated, do not edit /home/ray/darwin-cross/apple-osx/bin/i686-apple-darwin11-gcc -isysroot /home/ray/darwin-cross/MacOSX10.7.sdk -mmacosx-version-min=10.5 -DMAXOSX_DEPLOYEMENT_TARGET=10.5 -m64 "$@" > Why would we want to officially support this particular variant of cross building on another platform? There's 3 separate issues merged into this patch, general cross compilation fixes, the new darwin cross compilation feature and a few darwin warning fixes (that apply equally to cross and native). I shouldn't have done that, and am in the process of splitting this issue up so that each part can be judged in isolation. Please see the new issue I've made for the general cross compilation issues: http://bugs.python.org/issue16292 ..later I'll work on a new patch for this issue. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16291> _______________________________________ From report at bugs.python.org Sun Oct 21 01:58:38 2012 From: report at bugs.python.org (Ray Donnelly) Date: Sat, 20 Oct 2012 23:58:38 +0000 Subject: [issue16292] Cross compilation fixes (general) In-Reply-To: <1350774308.18.0.656262327513.issue16292@psf.upfronthosting.co.za> Message-ID: <1350777518.76.0.681809030184.issue16292@psf.upfronthosting.co.za> Changes by Ray Donnelly <mingw.android at gmail.com>: ---------- nosy: +ned.deily _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16292> _______________________________________ From report at bugs.python.org Sun Oct 21 03:25:37 2012 From: report at bugs.python.org (Julian Berman) Date: Sun, 21 Oct 2012 01:25:37 +0000 Subject: [issue16293] curses.ungetch raises OverflowError when given -1 Message-ID: <1350782737.16.0.822622780307.issue16293@psf.upfronthosting.co.za> New submission from Julian Berman: The following code now raises an OverflowError on 3.3: import curses def test_screen(screen): screen.nodelay(True) key = screen.getch() screen.nodelay(False) curses.ungetch(key) curses.wrapper(test_screen) or equivalently just def test_screen(screen): curses.ungetch(-1) ---------- components: Library (Lib) messages: 173425 nosy: Julian, haypo priority: normal severity: normal status: open title: curses.ungetch raises OverflowError when given -1 versions: Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16293> _______________________________________ From report at bugs.python.org Sun Oct 21 04:48:23 2012 From: report at bugs.python.org (Jeff McNeil) Date: Sun, 21 Oct 2012 02:48:23 +0000 Subject: [issue14255] tempfile.gettempdir() didn't return the path with correct case. In-Reply-To: <1331514762.82.0.635964063955.issue14255@psf.upfronthosting.co.za> Message-ID: <1350787703.1.0.74482614909.issue14255@psf.upfronthosting.co.za> Jeff McNeil added the comment: Yeah clearly the wrong behavior on Winders. I think that moving to 'normpath' instead of 'normcase' is likely the right thing to do. Patch is attached, so if someone with commit powers could review real quick I'll address whatever needs to be addressed. IMHO, the 'normcase' calls are of questionable benefit since the posix call is simply an identity and as this bug details, it isn't necessarily the right behavior on Win. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14255> _______________________________________ From report at bugs.python.org Sun Oct 21 05:20:26 2012 From: report at bugs.python.org (Todd Rovito) Date: Sun, 21 Oct 2012 03:20:26 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1350789626.2.0.467623683278.issue1207589@psf.upfronthosting.co.za> Changes by Todd Rovito <rovitotv at gmail.com>: Removed file: http://bugs.python.org/file27615/RightClickContextMenuUpdatedFor3point4.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1207589> _______________________________________ From report at bugs.python.org Sun Oct 21 05:20:33 2012 From: report at bugs.python.org (Todd Rovito) Date: Sun, 21 Oct 2012 03:20:33 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1350789633.91.0.498655434538.issue1207589@psf.upfronthosting.co.za> Changes by Todd Rovito <rovitotv at gmail.com>: Removed file: http://bugs.python.org/file27616/RightClickContextMenuUpdatedFor2point7.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1207589> _______________________________________ From report at bugs.python.org Sun Oct 21 05:21:41 2012 From: report at bugs.python.org (Todd Rovito) Date: Sun, 21 Oct 2012 03:21:41 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1350789701.26.0.444899370457.issue1207589@psf.upfronthosting.co.za> Todd Rovito added the comment: Same patch as before but updated the documentation and help.txt file for IDLE. This is for Python 2.7. ---------- Added file: http://bugs.python.org/file27644/RightClickContextMenuUpdatedWithDocs2point7.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1207589> _______________________________________ From report at bugs.python.org Sun Oct 21 05:22:13 2012 From: report at bugs.python.org (Todd Rovito) Date: Sun, 21 Oct 2012 03:22:13 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1350789733.31.0.347113377754.issue1207589@psf.upfronthosting.co.za> Todd Rovito added the comment: Same patch as before but updated the documentation and help.txt file for IDLE. This is for Python 3.4. ---------- Added file: http://bugs.python.org/file27645/RightClickContextMenuUpdatedWithDocs3point4.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1207589> _______________________________________ From report at bugs.python.org Sun Oct 21 05:22:38 2012 From: report at bugs.python.org (Kevin Chen) Date: Sun, 21 Oct 2012 03:22:38 +0000 Subject: [issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite In-Reply-To: <1242857063.47.0.919073638283.issue6074@psf.upfronthosting.co.za> Message-ID: <1350789758.42.0.472669159361.issue6074@psf.upfronthosting.co.za> Kevin Chen added the comment: Hi Nick, Thank you so much for rolling out this change. I think your implementation of the fix is more elegant. I have learned a few things from you. I would love to keep helping to test/fix bugs for Python on Windows. Please contact me if there is anything you would like me to take a look at. There will be many Windows users who will feel very grateful for this change you have implemented. This will actually give many the chance to upgrade to the latest 2.7 when it is released. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6074> _______________________________________ From report at bugs.python.org Sun Oct 21 06:16:36 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 21 Oct 2012 04:16:36 +0000 Subject: [issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite In-Reply-To: <1242857063.47.0.919073638283.issue6074@psf.upfronthosting.co.za> Message-ID: <1350792996.74.0.977104907429.issue6074@psf.upfronthosting.co.za> Nick Coghlan added the comment: No worries. If you could do a fresh build of the 2.7 branch and confirm this fix works for you, that would be great. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6074> _______________________________________ From report at bugs.python.org Sun Oct 21 06:45:49 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 21 Oct 2012 04:45:49 +0000 Subject: [issue16042] smtplib: unlimited readline() from connection In-Reply-To: <1348569609.82.0.499861906556.issue16042@psf.upfronthosting.co.za> Message-ID: <1350794749.72.0.175313138682.issue16042@psf.upfronthosting.co.za> Changes by R. David Murray <rdmurray at bitdance.com>: ---------- components: +email _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16042> _______________________________________ From report at bugs.python.org Sun Oct 21 07:21:41 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 21 Oct 2012 05:21:41 +0000 Subject: [issue15522] improve 27 percent performance on stringpbject.c (by prefetch and loop optimization) In-Reply-To: <1343813632.92.0.115452555082.issue15522@psf.upfronthosting.co.za> Message-ID: <1350796901.56.0.288897623269.issue15522@psf.upfronthosting.co.za> Changes by Ramchandra Apte <maniandram01 at gmail.com>: ---------- status: pending -> open title: impove 27 percent performance on stringpbject.c( by prefetch and loop optimization) -> improve 27 percent performance on stringpbject.c (by prefetch and loop optimization) _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15522> _______________________________________ From report at bugs.python.org Sun Oct 21 07:49:09 2012 From: report at bugs.python.org (Todd Rovito) Date: Sun, 21 Oct 2012 05:49:09 +0000 Subject: [issue15869] IDLE: Include .desktop file and icon In-Reply-To: <1346929874.07.0.220677915984.issue15869@psf.upfronthosting.co.za> Message-ID: <1350798549.28.0.0417747965136.issue15869@psf.upfronthosting.co.za> Changes by Todd Rovito <rovitotv at gmail.com>: ---------- nosy: +Todd.Rovito _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15869> _______________________________________ From report at bugs.python.org Sun Oct 21 07:54:54 2012 From: report at bugs.python.org (Todd Rovito) Date: Sun, 21 Oct 2012 05:54:54 +0000 Subject: [issue15392] Create a unittest framework for IDLE In-Reply-To: <1342673080.97.0.671694156374.issue15392@psf.upfronthosting.co.za> Message-ID: <1350798894.88.0.425559402.issue15392@psf.upfronthosting.co.za> Changes by Todd Rovito <rovitotv at gmail.com>: ---------- nosy: +Todd.Rovito _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15392> _______________________________________ From report at bugs.python.org Sun Oct 21 08:28:34 2012 From: report at bugs.python.org (Pedro Meirelles) Date: Sun, 21 Oct 2012 06:28:34 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1346632042.85.0.745944196118.issue15853@psf.upfronthosting.co.za> Message-ID: <1350800914.04.0.0166614196468.issue15853@psf.upfronthosting.co.za> Pedro Meirelles added the comment: Hello, I am biologist I am just starting to learn Python. I have a mac and I am using OS X 10.8.2. I have installed Python 2.7.3 and when I try to copy and paste (use command) or go to preferences IDLE crashes. I did what Ned Deily said in msg169739: sudo mv /Library/Frameworks/Tk.framework /Library/Frameworks/Tk_disabled It worked. Now I can copy and paste in IDLE. But when I type quots (" or ') it crashes. What you think I can do to work in IDLE using both command and typing " and '? Sorry if my question is too elementary. I appreciate a lot all the comments and answers. It is very useful and enlightening. Kind regards ---------- nosy: +pedrommeirelles _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15853> _______________________________________ From report at bugs.python.org Sun Oct 21 08:46:30 2012 From: report at bugs.python.org (Ned Deily) Date: Sun, 21 Oct 2012 06:46:30 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1346632042.85.0.745944196118.issue15853@psf.upfronthosting.co.za> Message-ID: <1350801990.27.0.378927311644.issue15853@psf.upfronthosting.co.za> Ned Deily added the comment: Pedro, try installing the older ActiveTcl 8.5.11.1 from here: http://downloads.activestate.com/ActiveTcl/releases/8.5.11.1/ It is not perfect but does not have the Preferences regression and does have fixes for crashes when typing composite input characters. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15853> _______________________________________ From report at bugs.python.org Sun Oct 21 08:50:27 2012 From: report at bugs.python.org (Pedro Meirelles) Date: Sun, 21 Oct 2012 06:50:27 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1350801990.27.0.378927311644.issue15853@psf.upfronthosting.co.za> Message-ID: <CAEW0jV9ADNCcj5KB+rozZtG7w5z0EE8+oXYEvMNScLcXVkGorg@mail.gmail.com> Pedro Meirelles added the comment: Thank you very much, Ned! It worked, awesome! All the best 2012/10/20 Ned Deily <report at bugs.python.org> > > Ned Deily added the comment: > > Pedro, try installing the older ActiveTcl 8.5.11.1 from here: > > http://downloads.activestate.com/ActiveTcl/releases/8.5.11.1/ > > It is not perfect but does not have the Preferences regression and does > have fixes for crashes when typing composite input characters. > > ---------- > > _______________________________________ > Python tracker <report at bugs.python.org> > <http://bugs.python.org/issue15853> > _______________________________________ > ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15853> _______________________________________ From report at bugs.python.org Sun Oct 21 09:19:10 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 21 Oct 2012 07:19:10 +0000 Subject: [issue10836] urllib.request.urlretrieve calls URLError with 3 args In-Reply-To: <1294252036.56.0.144119584231.issue10836@psf.upfronthosting.co.za> Message-ID: <1350803950.67.0.0593833759944.issue10836@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Here is the patch which captures both HTTPError and URLError at the open_file and thus preventing multiple exceptions to be raised ( URLError and next IOError). This can go in 3.4 and since this is bug, where correct exception is not being caught and wrong args are sent, I think the catching of correct exception can be backported to old versions ---------- Added file: http://bugs.python.org/file27646/issue10836.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10836> _______________________________________ From report at bugs.python.org Sun Oct 21 11:06:46 2012 From: report at bugs.python.org (Brian Quinlan) Date: Sun, 21 Oct 2012 09:06:46 +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: <1350810406.71.0.721128101341.issue16284@psf.upfronthosting.co.za> Brian Quinlan added the comment: The concurrent.futures stuff looks good to me. Could you add a comment explaining why the delete is necessary? And, as Antoine said, the test should be CPython only. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16284> _______________________________________ From report at bugs.python.org Sun Oct 21 11:13:40 2012 From: report at bugs.python.org (Brian Quinlan) Date: Sun, 21 Oct 2012 09:13:40 +0000 Subject: [issue15966] concurrent.futures: Executor.submit keyword arguments may not be called 'fn' (or 'self') In-Reply-To: <1347982368.75.0.56994107832.issue15966@psf.upfronthosting.co.za> Message-ID: <1350810820.63.0.558722499195.issue15966@psf.upfronthosting.co.za> Brian Quinlan added the comment: This has come up before. Did you actually bang into this? Because the fix seems pretty ugly to me and the work-around (using functools.partial) is pretty easy. But, if people are actually hitting this, then your is probably the best that we can do. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15966> _______________________________________ From report at bugs.python.org Sun Oct 21 11:15:08 2012 From: report at bugs.python.org (Brian Quinlan) Date: Sun, 21 Oct 2012 09:15:08 +0000 Subject: [issue13785] Make concurrent.futures.Future state public In-Reply-To: <1326560835.55.0.282912980665.issue13785@psf.upfronthosting.co.za> Message-ID: <1350810908.89.0.245599106785.issue13785@psf.upfronthosting.co.za> Changes by Brian Quinlan <brian at sweetapp.com>: ---------- stage: -> needs patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13785> _______________________________________ From report at bugs.python.org Sun Oct 21 11:17:45 2012 From: report at bugs.python.org (Brian Quinlan) Date: Sun, 21 Oct 2012 09:17:45 +0000 Subject: [issue8792] Support Apache extensions to XML-RPC in xmlrpclib In-Reply-To: <1274558114.05.0.260300491762.issue8792@psf.upfronthosting.co.za> Message-ID: <1350811065.63.0.641312056302.issue8792@psf.upfronthosting.co.za> Brian Quinlan added the comment: I'm closing this since the filer hasn't specified exactly what they want. ---------- status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8792> _______________________________________ From report at bugs.python.org Sun Oct 21 11:19:50 2012 From: report at bugs.python.org (Brian Quinlan) Date: Sun, 21 Oct 2012 09:19:50 +0000 Subject: [issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't batch function arguments by chunks In-Reply-To: <1298300689.71.0.822605356721.issue11271@psf.upfronthosting.co.za> Message-ID: <1350811190.48.0.242155182787.issue11271@psf.upfronthosting.co.za> Changes by Brian Quinlan <brian at sweetapp.com>: ---------- status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11271> _______________________________________ From report at bugs.python.org Sun Oct 21 11:41:12 2012 From: report at bugs.python.org (Silverback Networks) Date: Sun, 21 Oct 2012 09:41:12 +0000 Subject: [issue15772] Unresolved symbols in Windows 64-bit python In-Reply-To: <1345754338.96.0.805254982219.issue15772@psf.upfronthosting.co.za> Message-ID: <1350812472.37.0.0920837181696.issue15772@psf.upfronthosting.co.za> Silverback Networks added the comment: Boy, do I feel like an idiot now. An update to VC 2010 Express SP1 had clobbered by x64 build capabilities completely, and even reinstalling the SDK did nothing. It turns out that there's a specific hotfix you have to install to get x64 builds working again: http://support.microsoft.com/kb/2519277 When I did that and fixed up the build environment variables, Python extensions all built again, despite the apparently random decorating. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15772> _______________________________________ From report at bugs.python.org Sun Oct 21 12:31:44 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 21 Oct 2012 10:31:44 +0000 Subject: [issue15522] improve 27 percent performance on stringpbject.c (by prefetch and loop optimization) In-Reply-To: <1343813632.92.0.115452555082.issue15522@psf.upfronthosting.co.za> Message-ID: <1350815504.16.0.768445172424.issue15522@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm closing this issue, since the OP since to have lost interest in his/her proposal. Abael, if you want to propose an actual patch, please open a new issue. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15522> _______________________________________ From report at bugs.python.org Sun Oct 21 12:57:02 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 21 Oct 2012 10:57:02 +0000 Subject: [issue16293] curses.ungetch raises OverflowError when given -1 In-Reply-To: <1350782737.16.0.822622780307.issue16293@psf.upfronthosting.co.za> Message-ID: <CAMpsgwZT8W-6aAKUXbXFxP27SbwCLyq+ed6Owea=hpKYLE60kQ@mail.gmail.com> STINNER Victor added the comment: Do you consider this behaviour as a bug? What is the behaviour in C? Le 21 oct. 2012 03:25, "Julian Berman" <report at bugs.python.org> a ?crit : > > New submission from Julian Berman: > > The following code now raises an OverflowError on 3.3: > > import curses > > def test_screen(screen): > screen.nodelay(True) > key = screen.getch() > screen.nodelay(False) > curses.ungetch(key) > > curses.wrapper(test_screen) > > or equivalently just > > def test_screen(screen): > curses.ungetch(-1) > > ---------- > components: Library (Lib) > messages: 173425 > nosy: Julian, haypo > priority: normal > severity: normal > status: open > title: curses.ungetch raises OverflowError when given -1 > versions: Python 3.3, Python 3.4, Python 3.5 > > _______________________________________ > Python tracker <report at bugs.python.org> > <http://bugs.python.org/issue16293> > _______________________________________ > ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16293> _______________________________________ From report at bugs.python.org Sun Oct 21 13:58:32 2012 From: report at bugs.python.org (Kevin Chen) Date: Sun, 21 Oct 2012 11:58:32 +0000 Subject: [issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite In-Reply-To: <1242857063.47.0.919073638283.issue6074@psf.upfronthosting.co.za> Message-ID: <1350820712.8.0.869826106526.issue6074@psf.upfronthosting.co.za> Kevin Chen added the comment: Okay just tried it. This is under Windows 7 x64. I created a .py file with read-only permission. When I import the .py module, the created .pyc doesn't have read-only permission. So it works as intended under Windows OS. As long as under posix system the created .pyc files have the same permissions as the .py file, then everything is good. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6074> _______________________________________ From report at bugs.python.org Sun Oct 21 14:11:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 21 Oct 2012 12:11:10 +0000 Subject: [issue16220] wsgiref does not call close() on iterable response In-Reply-To: <1350162020.69.0.603099084932.issue16220@psf.upfronthosting.co.za> Message-ID: <3Xl07y0MMqzR3n@mail.python.org> Roundup Robot added the comment: New changeset d5af1b235dab by Antoine Pitrou in branch '2.7': Issue #16220: wsgiref now always calls close() on an iterable response. http://hg.python.org/cpython/rev/d5af1b235dab ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16220> _______________________________________ From report at bugs.python.org Sun Oct 21 14:13:01 2012 From: report at bugs.python.org (Yongzhi Pan) Date: Sun, 21 Oct 2012 12:13:01 +0000 Subject: [issue16294] 8 space indent in tutorial Message-ID: <1350821581.15.0.866474949137.issue16294@psf.upfronthosting.co.za> New submission from Yongzhi Pan: http://docs.python.org/py3k/tutorial/stdlib2.html#weak-references In the code example, the two class funtions' bodies have indents of 8 spaces. All other indents in the docs are 4 spaces. I suggest here we use 4 spaces also. ---------- assignee: docs at python components: Documentation messages: 173443 nosy: docs at python, fossilet priority: normal severity: normal status: open title: 8 space indent in tutorial type: enhancement versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16294> _______________________________________ From report at bugs.python.org Sun Oct 21 14:13:28 2012 From: report at bugs.python.org (Ray Donnelly) Date: Sun, 21 Oct 2012 12:13:28 +0000 Subject: [issue16291] Fix some general cross compile issues and some darwin specific ones. Tested with build=linux, host=darwin In-Reply-To: <1350770977.75.0.64501763721.issue16291@psf.upfronthosting.co.za> Message-ID: <1350821608.63.0.403000172435.issue16291@psf.upfronthosting.co.za> Changes by Ray Donnelly <mingw.android at gmail.com>: Removed file: http://bugs.python.org/file27641/0010-DARWIN-CROSS.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16291> _______________________________________ From report at bugs.python.org Sun Oct 21 14:16:09 2012 From: report at bugs.python.org (Ray Donnelly) Date: Sun, 21 Oct 2012 12:16:09 +0000 Subject: [issue16291] Enable darwin-host cross compilation. Tested with build=linux, host=darwin In-Reply-To: <1350770977.75.0.64501763721.issue16291@psf.upfronthosting.co.za> Message-ID: <1350821769.21.0.77664799856.issue16291@psf.upfronthosting.co.za> Ray Donnelly added the comment: Here's the darwin cross enabling portion. I've also removed the warnings fixes from it as they're not relevant. ---------- title: Fix some general cross compile issues and some darwin specific ones. Tested with build=linux, host=darwin -> Enable darwin-host cross compilation. Tested with build=linux, host=darwin Added file: http://bugs.python.org/file27647/0010-cross-darwin-feature.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16291> _______________________________________ From report at bugs.python.org Sun Oct 21 14:17:12 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 21 Oct 2012 12:17:12 +0000 Subject: [issue16220] wsgiref does not call close() on iterable response In-Reply-To: <1350162020.69.0.603099084932.issue16220@psf.upfronthosting.co.za> Message-ID: <3Xl0Gv4xLYzR2v@mail.python.org> Roundup Robot added the comment: New changeset eef470032457 by Antoine Pitrou in branch '3.2': Issue #16220: wsgiref now always calls close() on an iterable response. http://hg.python.org/cpython/rev/eef470032457 New changeset 2530acc092d8 by Antoine Pitrou in branch '3.3': Issue #16220: wsgiref now always calls close() on an iterable response. http://hg.python.org/cpython/rev/2530acc092d8 New changeset cf3a739345c6 by Antoine Pitrou in branch 'default': Issue #16220: wsgiref now always calls close() on an iterable response. http://hg.python.org/cpython/rev/cf3a739345c6 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16220> _______________________________________ From report at bugs.python.org Sun Oct 21 14:17:46 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 21 Oct 2012 12:17:46 +0000 Subject: [issue16220] wsgiref does not call close() on iterable response In-Reply-To: <1350162020.69.0.603099084932.issue16220@psf.upfronthosting.co.za> Message-ID: <1350821866.66.0.429752859815.issue16220@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Your patch is now committed, Brent, thank you! ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16220> _______________________________________ From report at bugs.python.org Sun Oct 21 14:32:30 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 21 Oct 2012 12:32:30 +0000 Subject: [issue1598083] Top-level exception handler writes to stdout unsafely Message-ID: <1350822750.72.0.571023748978.issue1598083@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This is certainly a low-priority issue, as it will almost never happen in practice. ---------- nosy: +pitrou priority: high -> low stage: test needed -> needs patch versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1598083> _______________________________________ From report at bugs.python.org Sun Oct 21 14:42:09 2012 From: report at bugs.python.org (desolat) Date: Sun, 21 Oct 2012 12:42:09 +0000 Subject: [issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite In-Reply-To: <1242857063.47.0.919073638283.issue6074@psf.upfronthosting.co.za> Message-ID: <1350823329.95.0.169250912683.issue6074@psf.upfronthosting.co.za> Changes by desolat <nuabaranda at web.de>: ---------- nosy: -desolat _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6074> _______________________________________ From report at bugs.python.org Sun Oct 21 15:29:12 2012 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 21 Oct 2012 13:29:12 +0000 Subject: [issue16292] Cross compilation fixes (general) In-Reply-To: <1350774308.18.0.656262327513.issue16292@psf.upfronthosting.co.za> Message-ID: <1350826152.3.0.434371015553.issue16292@psf.upfronthosting.co.za> Roumen Petrov added the comment: duplicate with 15483 and 15484 ---------- nosy: +rpetrov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16292> _______________________________________ From report at bugs.python.org Sun Oct 21 15:53:03 2012 From: report at bugs.python.org (Julian Berman) Date: Sun, 21 Oct 2012 13:53:03 +0000 Subject: [issue16293] curses.ungetch raises OverflowError when given -1 In-Reply-To: <1350782737.16.0.822622780307.issue16293@psf.upfronthosting.co.za> Message-ID: <1350827583.36.0.0336314357307.issue16293@psf.upfronthosting.co.za> Julian Berman added the comment: Hi, sorry for being terse :). After checking a bit, man 3 getch says that it returns ERR (-1) in non-blocking mode if no input is available. I think you're right though -- calling ungetch without checking for the error value seems like it should be a bug in the application, and looking at some examples that seems to be correct. The reason this came up though is because the changes to range checking broke bpython, which does something like the code I pasted in the first post. The reason it appears to have worked before is because later on getkey is called, and getkey checks if it got ERR and converts that to an exception, which was being caught and silenced. Now though, the code will fail at the call to ungetch. So, I guess, besides the change in behavior, which I guess is less bug prone before so it's probably desirable, OverflowError sounds scary. Perhaps ungetch should check for -1 and raise a curses.error instead? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16293> _______________________________________ From report at bugs.python.org Sun Oct 21 16:35:05 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 21 Oct 2012 14:35:05 +0000 Subject: [issue5128] compileall: consider ctime In-Reply-To: <1233584376.51.0.787053739937.issue5128@psf.upfronthosting.co.za> Message-ID: <1350830105.85.0.281258789307.issue5128@psf.upfronthosting.co.za> Brett Cannon added the comment: There is no patch, Djoume, but honestly that's fine since if you want to submit a change to something it should go in a new issue. But honestly compileall needs to be rewritten in Python 3.4 to use importlib and have it control when source code should be rebuilt since the .pyc format changed in Python 3.3 to include source file size. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5128> _______________________________________ From report at bugs.python.org Sun Oct 21 16:35:37 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 21 Oct 2012 14:35:37 +0000 Subject: [issue12034] check_GetFinalPathNameByHandle() suboptimal In-Reply-To: <1304884806.89.0.503663992861.issue12034@psf.upfronthosting.co.za> Message-ID: <3Xl3Ld1WyjzQvw@mail.python.org> Roundup Robot added the comment: New changeset 8afa3ce5ff3e by Antoine Pitrou in branch 'default': Issue #12034: Fix bogus caching of result in check_GetFinalPathNameByHandle. http://hg.python.org/cpython/rev/8afa3ce5ff3e ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12034> _______________________________________ From report at bugs.python.org Sun Oct 21 16:42:00 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 21 Oct 2012 14:42:00 +0000 Subject: [issue12034] check_GetFinalPathNameByHandle() suboptimal In-Reply-To: <1304884806.89.0.503663992861.issue12034@psf.upfronthosting.co.za> Message-ID: <1350830520.53.0.717617877241.issue12034@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Patch committed, thank you! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12034> _______________________________________ From report at bugs.python.org Sun Oct 21 17:01:02 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 21 Oct 2012 15:01:02 +0000 Subject: [issue16034] bz2 module appears slower in Python 3.x versus Python 2.x In-Reply-To: <1348547973.67.0.489000428853.issue16034@psf.upfronthosting.co.za> Message-ID: <3Xl3vy1LkGzR7q@mail.python.org> Roundup Robot added the comment: New changeset cc02eca14526 by Nadeem Vawda in branch 'default': Issue #16034 follow-up: Apply optimizations to the lzma module. http://hg.python.org/cpython/rev/cc02eca14526 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16034> _______________________________________ From report at bugs.python.org Sun Oct 21 17:21:00 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 21 Oct 2012 15:21:00 +0000 Subject: [issue16264] test_logging failure on Windows 7 buildbot In-Reply-To: <1350471646.28.0.767525471529.issue16264@psf.upfronthosting.co.za> Message-ID: <3Xl4Lz5TMhzQt2@mail.python.org> Roundup Robot added the comment: New changeset 0fb2267897ba by Antoine Pitrou in branch 'default': Try to fix issue #16264 (test_logging failure on some buildbots). http://hg.python.org/cpython/rev/0fb2267897ba ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16264> _______________________________________ From report at bugs.python.org Sun Oct 21 17:28:08 2012 From: report at bugs.python.org (Armin Rigo) Date: Sun, 21 Oct 2012 15:28:08 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1350833288.02.0.408837485671.issue14621@psf.upfronthosting.co.za> Armin Rigo added the comment: Just to make it extra clear: Vlado showed that the "-R" switch of Python can easily be made fully pointless, with only a bit of extra work. Here is how: * Assume you have an algo that gives you as many strings with colliding hashes as you want, provided you know the last 8 bits of the secret prefix. * Say you want to attack a web server. You send it 256 requests, each with 100 strings that have identical hash for one of the 256 possible values. You measure which one is significantly slower than the others. * From there you are back in the original situation: you know which of the 256 values to pick, so you can make the web server crawl by sending it a large number of strings that have identical hashes for this particular value. It's interesting to note how this whole -R discussion made very long threads on python-dev, and python-dev has subsequently ignored (for the past 6 months!) the fact that their "fix" can be worked around in a matter of minutes. (For information, I'm sure that if the algorithm is improved to depend on all 32 or 64 bits of the prefix, it would still be easy to crack it. You don't actually need to send 2**32 or 2**64 requests to the web server: with careful design you can send only 32 or 64 requests that each leak one bit of information. Doing that requires a bit more research, but once the recipe is known, it can be freely reused, which seems to defeat the original point.) ---------- nosy: +arigo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14621> _______________________________________ From report at bugs.python.org Sun Oct 21 17:28:56 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 21 Oct 2012 15:28:56 +0000 Subject: [issue16264] test_logging failure on Windows 7 buildbot In-Reply-To: <1350471646.28.0.767525471529.issue16264@psf.upfronthosting.co.za> Message-ID: <1350833336.59.0.578004988004.issue16264@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Looks ok now. It's a timing glitch because both SocketHandler's built-in timeout and its default retry delay are one second, so when connect times out once the next retry time is a bit behind time.time(). (note: SocketHandler's implementation looks grotesque. Enough said). ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16264> _______________________________________ From report at bugs.python.org Sun Oct 21 17:35:29 2012 From: report at bugs.python.org (Armin Rigo) Date: Sun, 21 Oct 2012 15:35:29 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1350833729.42.0.504657217501.issue14621@psf.upfronthosting.co.za> Armin Rigo added the comment: For reference, the above means that we can implement -R support for PyPy as a dummy ignored flag, and get "security" that is very close to CPython's. :-) ---------- keywords: +easy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14621> _______________________________________ From report at bugs.python.org Sun Oct 21 17:39:43 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 21 Oct 2012 15:39:43 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1350833983.85.0.00524392462597.issue14621@psf.upfronthosting.co.za> Benjamin Peterson added the comment: That doesn't make it any easy CPython issue. :) ---------- keywords: -easy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14621> _______________________________________ From report at bugs.python.org Sun Oct 21 17:44:12 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 21 Oct 2012 15:44:12 +0000 Subject: [issue12692] test_urllib2net is triggering a ResourceWarning In-Reply-To: <1312520551.96.0.100282355939.issue12692@psf.upfronthosting.co.za> Message-ID: <3Xl4sl59W4zPc8@mail.python.org> Roundup Robot added the comment: New changeset 92656b5df2f2 by Nadeem Vawda in branch 'default': Issue #12692: Fix resource leak in urllib.request. http://hg.python.org/cpython/rev/92656b5df2f2 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12692> _______________________________________ From report at bugs.python.org Sun Oct 21 17:45:23 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Sun, 21 Oct 2012 15:45:23 +0000 Subject: [issue12692] test_urllib2net is triggering a ResourceWarning In-Reply-To: <1312520551.96.0.100282355939.issue12692@psf.upfronthosting.co.za> Message-ID: <1350834323.47.0.385364829257.issue12692@psf.upfronthosting.co.za> Changes by Nadeem Vawda <nadeem.vawda at gmail.com>: ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12692> _______________________________________ From report at bugs.python.org Sun Oct 21 18:30:13 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 21 Oct 2012 16:30:13 +0000 Subject: [issue5148] gzip.open breaks with 'U' flag In-Reply-To: <1233709542.39.0.638969424034.issue5148@psf.upfronthosting.co.za> Message-ID: <3Xl5tr5PPFzPP7@mail.python.org> Roundup Robot added the comment: New changeset e647229c422b by Nadeem Vawda in branch '2.7': Issue #5148: Ignore 'U' in mode given to gzip.open() and gzip.GzipFile(). http://hg.python.org/cpython/rev/e647229c422b ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5148> _______________________________________ From report at bugs.python.org Sun Oct 21 18:33:51 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 21 Oct 2012 16:33:51 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1350837231.92.0.123775563241.issue14621@psf.upfronthosting.co.za> Christian Heimes added the comment: As far as my understanding goes the issue can't be solved with our current hash algorithm. We'd have to use a crypto hash function or at least a hash algorithm that has an increased avalanche effect on the outcome. The current hash algorithm is designed and optimized for speed and not for security. Any other algorithm is going to slow down hashing. Small strings and strings with lots of NUL bytes may leak too many information, too. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14621> _______________________________________ From report at bugs.python.org Sun Oct 21 18:34:00 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Sun, 21 Oct 2012 16:34:00 +0000 Subject: [issue5148] gzip.open breaks with 'U' flag In-Reply-To: <1233709542.39.0.638969424034.issue5148@psf.upfronthosting.co.za> Message-ID: <1350837240.31.0.354184296065.issue5148@psf.upfronthosting.co.za> Nadeem Vawda added the comment: The data corruption issue is now fixed in the 2.7 branch. In 3.x, using a mode containing 'U' results in an exception rather than silent data corruption. Additionally, gzip.open() has supported text modes ("rt"/"wt"/"at") and newline translation since 3.3 [issue 13989]. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5148> _______________________________________ From report at bugs.python.org Sun Oct 21 19:17:24 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Oct 2012 17:17:24 +0000 Subject: [issue16230] select.select crashes on resized lists In-Reply-To: <1350211036.55.0.523850963705.issue16230@psf.upfronthosting.co.za> Message-ID: <1350839844.97.0.377075114244.issue16230@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- keywords: +needs review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16230> _______________________________________ From report at bugs.python.org Sun Oct 21 19:17:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Oct 2012 17:17:30 +0000 Subject: [issue16228] JSON crashes during encoding resized lists In-Reply-To: <1350208578.8.0.440875886805.issue16228@psf.upfronthosting.co.za> Message-ID: <1350839850.96.0.944206303137.issue16228@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- keywords: +needs review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16228> _______________________________________ From report at bugs.python.org Sun Oct 21 19:21:22 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 21 Oct 2012 17:21:22 +0000 Subject: [issue16295] With VS2010 the select extension links against wsock32 instead of ws2_32 Message-ID: <1350840082.43.0.801367725826.issue16295@psf.upfronthosting.co.za> New submission from Richard Oudkerk: Using VS2010 _socket links against ws2_32.lib but select links against wsock32.lib. Using VS2008 both extensions link against ws2_32.lib. It appears that the conversion to VS2010 caused the regression. (Compare #10295 and #11750.) ---------- messages: 173463 nosy: kristjan.jonsson, sbt priority: normal severity: normal stage: needs patch status: open title: With VS2010 the select extension links against wsock32 instead of ws2_32 type: resource usage versions: Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16295> _______________________________________ From report at bugs.python.org Sun Oct 21 19:40:36 2012 From: report at bugs.python.org (Michael Foord) Date: Sun, 21 Oct 2012 17:40:36 +0000 Subject: [issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription()) In-Reply-To: <1350671689.29.0.0409273215418.issue16288@psf.upfronthosting.co.za> Message-ID: <1350841236.27.0.869728631831.issue16288@psf.upfronthosting.co.za> Changes by Michael Foord <michael at voidspace.org.uk>: ---------- assignee: -> michael.foord _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16288> _______________________________________ From report at bugs.python.org Sun Oct 21 19:56:15 2012 From: report at bugs.python.org (Silverback Networks) Date: Sun, 21 Oct 2012 17:56:15 +0000 Subject: [issue16296] Patch to fix building on Win32/64 under VS 2010 Message-ID: <1350842175.59.0.919553926658.issue16296@psf.upfronthosting.co.za> New submission from Silverback Networks: Once I got my broken environment fixed, this was the only thing that didn't work. The bug is that VS 2010 no longer creates a manifest by default, despite the documentation, and there are confirmation posts around the internet. /Manifest has to be forced starting with VS 2010. Here is a patch to fix that: --- Lib/distutils/msvc9compiler.py 2011-08-14 11:17:42.000000000 -0700 +++ Lib/distutils/msvc9compiler.py 2012-10-21 10:38:42.257682200 -0700 @@ -411,10 +411,16 @@ '/Z7', '/D_DEBUG'] self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO'] + if self.__version >= 10: + self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO', '/Manifest'] if self.__version >= 7: self.ldflags_shared_debug = [ '/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG', '/pdb:None' ] + if self.__version >= 10: + self.ldflags_shared = [ + '/DLL', '/nologo', '/INCREMENTAL:NO', '/DEBUG', '/pdb:None', '/Manifest' + ] self.ldflags_static = [ '/nologo'] self.initialized = True ---------- components: Build messages: 173464 nosy: silverbacknet priority: normal severity: normal status: open title: Patch to fix building on Win32/64 under VS 2010 type: compile error versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16296> _______________________________________ From report at bugs.python.org Sun Oct 21 19:58:54 2012 From: report at bugs.python.org (Silverback Networks) Date: Sun, 21 Oct 2012 17:58:54 +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: <1350842334.16.0.264401505747.issue16296@psf.upfronthosting.co.za> Silverback Networks added the comment: oops, add _debug on the second part of the patch. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16296> _______________________________________ From report at bugs.python.org Sun Oct 21 20:04:53 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 21 Oct 2012 18:04:53 +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: <1350842693.04.0.76007406123.issue16296@psf.upfronthosting.co.za> Christian Heimes added the comment: Can you please upload a proper patch files? It makes code review and applying the patch easier for us. ---------- components: +Windows keywords: +3.3regression nosy: +christian.heimes stage: -> patch review versions: -Python 3.1 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16296> _______________________________________ From report at bugs.python.org Sun Oct 21 20:24:27 2012 From: report at bugs.python.org (Robert Collins) Date: Sun, 21 Oct 2012 18:24:27 +0000 Subject: [issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription()) In-Reply-To: <1350671689.29.0.0409273215418.issue16288@psf.upfronthosting.co.za> Message-ID: <1350843867.63.0.560864506697.issue16288@psf.upfronthosting.co.za> Robert Collins added the comment: testscenarios copies the tests, it doesn't call the constructor for the class; this makes things a lot simpler than trying to reconstruct whatever state the object may have from scratch again. As for str(test) and test.id() being different - well sure they are today, but I don't know that the str(test) format is /useful/ today, as its not a particularly good str() anyhow. It doesn't identify that its a test instance even. This suggests two alternatives to me: - decide that we want three things: id, friendly-id and shortDescription, and have three non-magic methods, which TextTestRunner can call depending on what the user wants to see. - decide we want two things, id and shortDescription, and TextTestRunner can combine these things to meet the users request. (e.g. id + ' ' + shortDescription) And separately, as the __str__ isn't particularly good anyhow, perhaps we should take the opportunity to think about what we want from it and adjust it. ---------- type: enhancement -> _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16288> _______________________________________ From report at bugs.python.org Sun Oct 21 20:27:24 2012 From: report at bugs.python.org (Mike Hoy) Date: Sun, 21 Oct 2012 18:27:24 +0000 Subject: [issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription()) In-Reply-To: <1350671689.29.0.0409273215418.issue16288@psf.upfronthosting.co.za> Message-ID: <1350844044.45.0.482060377705.issue16288@psf.upfronthosting.co.za> Changes by Mike Hoy <mhoy09 at gmail.com>: ---------- nosy: -mikehoy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16288> _______________________________________ From report at bugs.python.org Sun Oct 21 20:40:50 2012 From: report at bugs.python.org (Michael Foord) Date: Sun, 21 Oct 2012 18:40:50 +0000 Subject: [issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription()) In-Reply-To: <1350671689.29.0.0409273215418.issue16288@psf.upfronthosting.co.za> Message-ID: <1350844850.27.0.213061040025.issue16288@psf.upfronthosting.co.za> Michael Foord added the comment: So three including str sounds sufficient to me: short description, long description and repr (with str == repr) for debugging. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16288> _______________________________________ From report at bugs.python.org Sun Oct 21 20:46:08 2012 From: report at bugs.python.org (Silverback Networks) Date: Sun, 21 Oct 2012 18:46:08 +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: <1350845168.57.0.487832913059.issue16296@psf.upfronthosting.co.za> Silverback Networks added the comment: Sure. I got this patch from Mercurial, just in case, but it looks the same. ---------- keywords: +patch Added file: http://bugs.python.org/file27648/msvc9manifest.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16296> _______________________________________ From report at bugs.python.org Sun Oct 21 20:53:43 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 21 Oct 2012 18:53:43 +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: <1350845623.87.0.156189624899.issue16296@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: ---------- nosy: +brian.curtin, loewis, tim.golden _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16296> _______________________________________ From report at bugs.python.org Sun Oct 21 21:08:36 2012 From: report at bugs.python.org (Ravi Sinha) Date: Sun, 21 Oct 2012 19:08:36 +0000 Subject: [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1350846516.99.0.835479488357.issue16154@psf.upfronthosting.co.za> Changes by Ravi Sinha <rss1406 at gmail.com>: Added file: http://bugs.python.org/file27649/27.doc_lib_Oct21_2012.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16154> _______________________________________ From report at bugs.python.org Sun Oct 21 21:09:02 2012 From: report at bugs.python.org (Ravi Sinha) Date: Sun, 21 Oct 2012 19:09:02 +0000 Subject: [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1350846542.42.0.391857458542.issue16154@psf.upfronthosting.co.za> Changes by Ravi Sinha <rss1406 at gmail.com>: Added file: http://bugs.python.org/file27650/32.doc_lib_Oct21_2012.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16154> _______________________________________ From report at bugs.python.org Sun Oct 21 21:09:16 2012 From: report at bugs.python.org (Ravi Sinha) Date: Sun, 21 Oct 2012 19:09:16 +0000 Subject: [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1350846556.52.0.645782950225.issue16154@psf.upfronthosting.co.za> Changes by Ravi Sinha <rss1406 at gmail.com>: Added file: http://bugs.python.org/file27651/33.doc_lib_Oct21_2012.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16154> _______________________________________ From report at bugs.python.org Sun Oct 21 21:12:39 2012 From: report at bugs.python.org (Ravi Sinha) Date: Sun, 21 Oct 2012 19:12:39 +0000 Subject: [issue16154] Some minor doc fixes in Doc/library In-Reply-To: <1349562325.82.0.0767622542031.issue16154@psf.upfronthosting.co.za> Message-ID: <1350846759.38.0.886603987115.issue16154@psf.upfronthosting.co.za> Ravi Sinha added the comment: Based on what I saw on some other issues, I think there is just a separate patch for each version (coming from separate working repositories), but all attached to the same issue. So I am doing the same. All the changes have been made to files under Doc/library/ - colorsys.rst, filecmp.rst, fractions.rst, math.rst, string.rst and Misc/ACKS. The beginning number for each patch and the description show which version it's meant for. There are some minor differences for 2.7 and 3.2; they either did not need a fix or needed some more tests to be skipped. For 2.7 and 3.2 I don't know how to use the online source browser to link the files directly. Please let me know if the patches are okay or how to go from here. Thanks. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16154> _______________________________________ From report at bugs.python.org Sun Oct 21 21:22:09 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 21 Oct 2012 19:22:09 +0000 Subject: [issue14398] bz2.BZ2DEcompressor.decompress fail on large files In-Reply-To: <1332605719.75.0.496276331472.issue14398@psf.upfronthosting.co.za> Message-ID: <3Xl9jF1t22zMmj@mail.python.org> Roundup Robot added the comment: New changeset ebb8c7d79f52 by Nadeem Vawda in branch '3.2': Issue #14398: Fix size truncation and overflow bugs in bz2 module. http://hg.python.org/cpython/rev/ebb8c7d79f52 New changeset 25fdf297c077 by Nadeem Vawda in branch '3.3': Merge #14398: Fix size truncation and overflow bugs in bz2 module. http://hg.python.org/cpython/rev/25fdf297c077 New changeset d6bf506ea13f by Nadeem Vawda in branch 'default': Merge #14398: Fix size truncation and overflow bugs in bz2 module. http://hg.python.org/cpython/rev/d6bf506ea13f ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14398> _______________________________________ From report at bugs.python.org Sun Oct 21 21:24:48 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 21 Oct 2012 19:24:48 +0000 Subject: [issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription()) In-Reply-To: <1350671689.29.0.0409273215418.issue16288@psf.upfronthosting.co.za> Message-ID: <1350847488.44.0.0492158622125.issue16288@psf.upfronthosting.co.za> R. David Murray added the comment: Robert: I don't know if there's something funky going on with your browser, but every time you post the 'enhancement' setting for type seems to get lost. ---------- type: -> enhancement _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16288> _______________________________________ From report at bugs.python.org Sun Oct 21 21:49:34 2012 From: report at bugs.python.org (Robert Collins) Date: Sun, 21 Oct 2012 19:49:34 +0000 Subject: [issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription()) In-Reply-To: <1350671689.29.0.0409273215418.issue16288@psf.upfronthosting.co.za> Message-ID: <1350848974.79.0.640359405389.issue16288@psf.upfronthosting.co.za> Robert Collins added the comment: @Michael I'll put a patch together next week then. @R.david.murray no idea - but I've refreshed the page, we'll if it behaves better. My guess would be a buggy in-flight-collision detection in the issue tracker code. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16288> _______________________________________ From report at bugs.python.org Sun Oct 21 21:49:45 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 21 Oct 2012 19:49:45 +0000 Subject: [issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription()) In-Reply-To: <1350671689.29.0.0409273215418.issue16288@psf.upfronthosting.co.za> Message-ID: <1350848985.63.0.0299745543473.issue16288@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > testscenarios copies the tests, it doesn't call the constructor for the class; My suggestion on how to override __str__ (by assignment to __class__) doesn't require that the constructor be called. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16288> _______________________________________ From report at bugs.python.org Sun Oct 21 21:57:36 2012 From: report at bugs.python.org (Ravi Sinha) Date: Sun, 21 Oct 2012 19:57:36 +0000 Subject: [issue16155] Some minor doc fixes in Doc/faq In-Reply-To: <1349562552.07.0.641735051076.issue16155@psf.upfronthosting.co.za> Message-ID: <1350849456.97.0.209520558884.issue16155@psf.upfronthosting.co.za> Ravi Sinha added the comment: Did the same changes for versions 2.7, 3.2, 3.3, and 3.4 For line wrap in cases like http://hg.python.org/cpython/file/40a1652349e9/Doc/faq/general.rst, line 448, broke the list across separate lines, and had to use +NORMALIZE_WHITESPACE to make the tests pass. For the same file, in line 454, versions 2.7 and 3.2 don't have '-> None' while versions 3.3 and 3.4 do. So made the changes accordingly. Adding '<BLANKLINE>' around the contents of the help is making the tests pass too. I am assuming that <BLANKLINE> means the new pager that I get on OS X. This was the case uniformly across all 4 versions. Attaching all 4 patches, for different versions. Please let me know where to go from here. ---------- Added file: http://bugs.python.org/file27652/27.doc_faq_Oct21_2012.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16155> _______________________________________ From report at bugs.python.org Sun Oct 21 21:57:59 2012 From: report at bugs.python.org (Ravi Sinha) Date: Sun, 21 Oct 2012 19:57:59 +0000 Subject: [issue16155] Some minor doc fixes in Doc/faq In-Reply-To: <1349562552.07.0.641735051076.issue16155@psf.upfronthosting.co.za> Message-ID: <1350849479.52.0.44814245932.issue16155@psf.upfronthosting.co.za> Changes by Ravi Sinha <rss1406 at gmail.com>: Added file: http://bugs.python.org/file27653/32.doc_faq_Oct21_2012.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16155> _______________________________________ From report at bugs.python.org Sun Oct 21 21:58:17 2012 From: report at bugs.python.org (Ravi Sinha) Date: Sun, 21 Oct 2012 19:58:17 +0000 Subject: [issue16155] Some minor doc fixes in Doc/faq In-Reply-To: <1349562552.07.0.641735051076.issue16155@psf.upfronthosting.co.za> Message-ID: <1350849497.46.0.987938779775.issue16155@psf.upfronthosting.co.za> Changes by Ravi Sinha <rss1406 at gmail.com>: Added file: http://bugs.python.org/file27654/33.doc_faq_Oct21_2012.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16155> _______________________________________ From report at bugs.python.org Sun Oct 21 21:58:39 2012 From: report at bugs.python.org (Ravi Sinha) Date: Sun, 21 Oct 2012 19:58:39 +0000 Subject: [issue16155] Some minor doc fixes in Doc/faq In-Reply-To: <1349562552.07.0.641735051076.issue16155@psf.upfronthosting.co.za> Message-ID: <1350849519.52.0.664638205952.issue16155@psf.upfronthosting.co.za> Changes by Ravi Sinha <rss1406 at gmail.com>: Added file: http://bugs.python.org/file27655/34.doc_faq_Oct21_2012.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16155> _______________________________________ From report at bugs.python.org Sun Oct 21 22:06:28 2012 From: report at bugs.python.org (Mike Hoy) Date: Sun, 21 Oct 2012 20:06:28 +0000 Subject: [issue16294] 8 space indent in tutorial In-Reply-To: <1350821581.15.0.866474949137.issue16294@psf.upfronthosting.co.za> Message-ID: <1350849988.03.0.00833547991744.issue16294@psf.upfronthosting.co.za> Mike Hoy added the comment: Probably no need for a patch (since it's such a simple fix) but I felt like doing something. ---------- keywords: +patch nosy: +mikehoy Added file: http://bugs.python.org/file27656/issue16294.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16294> _______________________________________ From report at bugs.python.org Sun Oct 21 22:12:49 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 21 Oct 2012 20:12: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: <1350850369.55.0.674226869191.issue16255@psf.upfronthosting.co.za> Chris Jerdonek added the comment: It occurs to me that logic for detecting the shell might make sense for being part of the os module, e.g. os.getdefaultshell(). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16255> _______________________________________ From report at bugs.python.org Sun Oct 21 22:16:28 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Oct 2012 20:16:28 +0000 Subject: [issue10905] zipfile: fix arcname with leading '///' or '..' In-Reply-To: <1295006628.53.0.290414123413.issue10905@psf.upfronthosting.co.za> Message-ID: <1350850588.68.0.241826980062.issue10905@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Some comments to patch. + arcname = os.path.sep.join([x for x in arcname.split(os.path.sep) + if x != '..']) File names in zip archive should use '/' as separator, not os.path.sep. '../spam' will be not cleaned by this code. + while arcname[0] in (os.sep, os.altsep): + arcname = arcname[1:] It will not save from filenames containing drive letter: 'C:/Windows/python.exe'. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10905> _______________________________________ From report at bugs.python.org Sun Oct 21 22:20:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Oct 2012 20:20:08 +0000 Subject: [issue14398] bz2.BZ2DEcompressor.decompress fail on large files In-Reply-To: <1332605719.75.0.496276331472.issue14398@psf.upfronthosting.co.za> Message-ID: <1350850808.46.0.556227424838.issue14398@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What about 2.7? ---------- nosy: +serhiy.storchaka versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14398> _______________________________________ From report at bugs.python.org Sun Oct 21 22:30:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 21 Oct 2012 20:30:10 +0000 Subject: [issue10836] urllib.request.urlretrieve calls URLError with 3 args In-Reply-To: <1294252036.56.0.144119584231.issue10836@psf.upfronthosting.co.za> Message-ID: <3XlCCj5p5zzPTh@mail.python.org> Roundup Robot added the comment: New changeset daef5526d2ac by Senthil Kumaran in branch 'default': Issue #10836: Fix exception raised when file not found in urlretrieve http://hg.python.org/cpython/rev/daef5526d2ac ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10836> _______________________________________ From report at bugs.python.org Sun Oct 21 22:30:19 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Sun, 21 Oct 2012 20:30:19 +0000 Subject: [issue14398] bz2.BZ2DEcompressor.decompress fail on large files In-Reply-To: <1332605719.75.0.496276331472.issue14398@psf.upfronthosting.co.za> Message-ID: <1350851419.22.0.265775903539.issue14398@psf.upfronthosting.co.za> Nadeem Vawda added the comment: I'm working on it now. Will push in the next 15 minutes or so. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14398> _______________________________________ From report at bugs.python.org Sun Oct 21 22:31:23 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 21 Oct 2012 20:31:23 +0000 Subject: [issue10836] urllib.request.urlretrieve calls URLError with 3 args In-Reply-To: <1294252036.56.0.144119584231.issue10836@psf.upfronthosting.co.za> Message-ID: <1350851483.37.0.64208047884.issue10836@psf.upfronthosting.co.za> Senthil Kumaran added the comment: This one is fixed in 3.4. I can see the previous versions raised IOError exception and it is not a good idea to change by backporting. But the wrong arguments on URLError should be fixed tough. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10836> _______________________________________ From report at bugs.python.org Sun Oct 21 22:32:20 2012 From: report at bugs.python.org (Mike Hoy) Date: Sun, 21 Oct 2012 20:32:20 +0000 Subject: [issue12944] Accept arbitrary files for packaging's upload command In-Reply-To: <1315549969.41.0.856641810932.issue12944@psf.upfronthosting.co.za> Message-ID: <1350851540.95.0.907955896716.issue12944@psf.upfronthosting.co.za> Changes by Mike Hoy <mhoy09 at gmail.com>: ---------- nosy: -mikehoy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12944> _______________________________________ From report at bugs.python.org Sun Oct 21 22:33:03 2012 From: report at bugs.python.org (Mike Hoy) Date: Sun, 21 Oct 2012 20:33:03 +0000 Subject: [issue13198] Remove duplicate definition of write_record_file In-Reply-To: <1318857154.54.0.641953188635.issue13198@psf.upfronthosting.co.za> Message-ID: <1350851583.38.0.785915355937.issue13198@psf.upfronthosting.co.za> Changes by Mike Hoy <mhoy09 at gmail.com>: ---------- nosy: -mikehoy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13198> _______________________________________ From report at bugs.python.org Sun Oct 21 22:37:23 2012 From: report at bugs.python.org (Mike Hoy) Date: Sun, 21 Oct 2012 20:37:23 +0000 Subject: [issue15569] Doc doc: incorrect description of some roles as format-only In-Reply-To: <1344302647.18.0.307450045197.issue15569@psf.upfronthosting.co.za> Message-ID: <1350851843.47.0.253847655765.issue15569@psf.upfronthosting.co.za> Changes by Mike Hoy <mhoy09 at gmail.com>: ---------- nosy: -mikehoy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15569> _______________________________________ From report at bugs.python.org Sun Oct 21 22:56:05 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 21 Oct 2012 20:56:05 +0000 Subject: [issue16295] With VS2010 the select extension links against wsock32 instead of ws2_32 In-Reply-To: <1350840082.43.0.801367725826.issue16295@psf.upfronthosting.co.za> Message-ID: <1350852965.43.0.816938770571.issue16295@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: ---------- nosy: +brian.curtin, loewis, tim.golden _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16295> _______________________________________ From report at bugs.python.org Sun Oct 21 23:06:29 2012 From: report at bugs.python.org (Paul Moore) Date: Sun, 21 Oct 2012 21:06:29 +0000 Subject: [issue13198] Remove duplicate definition of write_record_file In-Reply-To: <1318857154.54.0.641953188635.issue13198@psf.upfronthosting.co.za> Message-ID: <1350853589.81.0.898578301211.issue13198@psf.upfronthosting.co.za> Changes by Paul Moore <p.f.moore at gmail.com>: ---------- nosy: -pmoore _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13198> _______________________________________ From report at bugs.python.org Sun Oct 21 23:09:42 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 21 Oct 2012 21:09:42 +0000 Subject: [issue14398] bz2.BZ2DEcompressor.decompress fail on large files In-Reply-To: <1332605719.75.0.496276331472.issue14398@psf.upfronthosting.co.za> Message-ID: <3XlD5L1ldnzP4H@mail.python.org> Roundup Robot added the comment: New changeset f03a335621ce by Nadeem Vawda in branch '2.7': Issue #14398: Fix size truncation and overflow bugs in bz2 module. http://hg.python.org/cpython/rev/f03a335621ce ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14398> _______________________________________ From report at bugs.python.org Sun Oct 21 23:12:54 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Sun, 21 Oct 2012 21:12:54 +0000 Subject: [issue14398] bz2.BZ2DEcompressor.decompress fail on large files In-Reply-To: <1332605719.75.0.496276331472.issue14398@psf.upfronthosting.co.za> Message-ID: <1350853974.9.0.692529299388.issue14398@psf.upfronthosting.co.za> Nadeem Vawda added the comment: All fixed, along with some other similar but harder-to-trigger bugs. Thanks for the bug report, Laurent! ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14398> _______________________________________ From report at bugs.python.org Sun Oct 21 23:19:23 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 21 Oct 2012 21:19:23 +0000 Subject: [issue16262] srcdir != builddir builds fail, if hg is not installed In-Reply-To: <1350464486.47.0.189031527493.issue16262@psf.upfronthosting.co.za> Message-ID: <3XlDJV33tlzPP7@mail.python.org> Roundup Robot added the comment: New changeset 03236a19eb87 by Matthias Klose in branch '3.2': - Issue #16262: fix out-of-src-tree builds, if mercurial is not installed. http://hg.python.org/cpython/rev/03236a19eb87 New changeset ea6de576d1c8 by Matthias Klose in branch '3.3': - Issue #16262: fix out-of-src-tree builds, if mercurial is not installed. http://hg.python.org/cpython/rev/ea6de576d1c8 New changeset 2a0c9472c89c by Matthias Klose in branch 'default': - Issue #16262: fix out-of-src-tree builds, if mercurial is not installed. http://hg.python.org/cpython/rev/2a0c9472c89c ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16262> _______________________________________ From report at bugs.python.org Sun Oct 21 23:23:11 2012 From: report at bugs.python.org (Matthias Klose) Date: Sun, 21 Oct 2012 21:23:11 +0000 Subject: [issue16262] srcdir != builddir builds fail, if hg is not installed In-Reply-To: <1350464486.47.0.189031527493.issue16262@psf.upfronthosting.co.za> Message-ID: <1350854591.09.0.379305401971.issue16262@psf.upfronthosting.co.za> Matthias Klose added the comment: now checked in even without review, because it was broken on the branches too. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16262> _______________________________________ From report at bugs.python.org Sun Oct 21 23:36:22 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 21 Oct 2012 21:36:22 +0000 Subject: [issue14394] Add speed improvement note to the decimal docs. In-Reply-To: <1332496271.62.0.623566153633.issue14394@psf.upfronthosting.co.za> Message-ID: <1350855382.4.0.479626804003.issue14394@psf.upfronthosting.co.za> Stefan Krah added the comment: Closing as out-of-date. ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14394> _______________________________________ From report at bugs.python.org Sun Oct 21 23:42:53 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 21 Oct 2012 21:42:53 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1350833288.02.0.408837485671.issue14621@psf.upfronthosting.co.za> Message-ID: <CAMpsgwaqd7ofxeZJbPcBMLWJY0TCg3-j2a577gTRADc3HiGj0w@mail.gmail.com> STINNER Victor added the comment: > It's interesting to note how this whole -R discussion made very long threads on python-dev, and python-dev has subsequently ignored (for the past 6 months!) the fact that their "fix" can be worked around in a matter of minutes. No, this issue has no been ignored. Nobody proposed anything to fix this issue, but we are still working on it (sometimes in private). In my opinion, we cannot solve this issue without slowing down python. Or I don't know yet.a.fast and secure hash algorithm. I don't really want to slow down Python for one specific issue whereas there are so many other ways to DoS a (web) server. How do other languages (say Perl, Ruby, PHP, Javascript) handle this issue? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14621> _______________________________________ From report at bugs.python.org Sun Oct 21 23:59:37 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 21 Oct 2012 21:59:37 +0000 Subject: [issue16262] srcdir != builddir builds fail, if hg is not installed In-Reply-To: <1350464486.47.0.189031527493.issue16262@psf.upfronthosting.co.za> Message-ID: <1350856777.4.0.505703402765.issue16262@psf.upfronthosting.co.za> R. David Murray added the comment: This change appears to have broken the dmg builders: http://buildbot.python.org/all/builders/bolen-dmg-3.x/builds/19 http://buildbot.python.org/all/builders/bolen-dmg-3.3/builds/17 ---------- nosy: +r.david.murray status: closed -> open _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16262> _______________________________________ From report at bugs.python.org Mon Oct 22 00:03:34 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 21 Oct 2012 22:03:34 +0000 Subject: [issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription()) In-Reply-To: <1350671689.29.0.0409273215418.issue16288@psf.upfronthosting.co.za> Message-ID: <1350857014.78.0.520097151046.issue16288@psf.upfronthosting.co.za> R. David Murray added the comment: Much more likely that you just needed to refresh the page, going by my own experience with this kind of problem (especially seeing as that seems to have fixed it :) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16288> _______________________________________ From report at bugs.python.org Mon Oct 22 00:46:31 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Oct 2012 22:46:31 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1350859591.75.0.252702831995.issue14621@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > $ ./python -m timeit -s "t = 'abcdefgh' * int(1E8)" "hash(t)" I?got another numbers (32-bit Linux, AMD Athlon 64 X2 4600+). Python's current hash algorithm: 10 loops, best of 3: 343 msec per loop V8's algorithm: 10 loops, best of 3: 244 msec per loop ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14621> _______________________________________ From report at bugs.python.org Mon Oct 22 02:32:51 2012 From: report at bugs.python.org (Sam Breese) Date: Mon, 22 Oct 2012 00:32:51 +0000 Subject: [issue16142] ArgumentParser inconsistent with parse_known_args In-Reply-To: <1349448801.58.0.783623579173.issue16142@psf.upfronthosting.co.za> Message-ID: <1350865971.44.0.501171559784.issue16142@psf.upfronthosting.co.za> Sam Breese added the comment: Writing a patch now. Should be ready in a few hours. ---------- nosy: +Sam.Breese _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16142> _______________________________________ From report at bugs.python.org Mon Oct 22 02:55:34 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 22 Oct 2012 00:55:34 +0000 Subject: [issue16250] URLError invoked with reason as filename In-Reply-To: <1350404293.01.0.800497532294.issue16250@psf.upfronthosting.co.za> Message-ID: <1350867334.13.0.417974324048.issue16250@psf.upfronthosting.co.za> Senthil Kumaran added the comment: This patch fixed these URLError wrong invocation issue and adds some tests for testing those it. I noticed that some of these were in the dead-end of the code, like checking if url is not a str (it is always, unwrap makes it a str if otherwise). Those will have to be cleaned and I shall do it next. ---------- keywords: +patch Added file: http://bugs.python.org/file27657/issue16250.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16250> _______________________________________ From report at bugs.python.org Mon Oct 22 02:57:25 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 22 Oct 2012 00:57:25 +0000 Subject: [issue16247] Report failing url in URLError? In-Reply-To: <1350390680.77.0.132205585956.issue16247@psf.upfronthosting.co.za> Message-ID: <1350867445.9.0.90543563722.issue16247@psf.upfronthosting.co.za> Senthil Kumaran added the comment: The URLError changes gone in as part of fix for issue10836 should give e.filename and e.reason. ---------- nosy: +orsenthil _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16247> _______________________________________ From report at bugs.python.org Mon Oct 22 04:03:51 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Oct 2012 02:03:51 +0000 Subject: [issue16250] URLError invoked with reason as filename In-Reply-To: <1350404293.01.0.800497532294.issue16250@psf.upfronthosting.co.za> Message-ID: <3XlLck4xYxzR3w@mail.python.org> Roundup Robot added the comment: New changeset 8fb438e7f738 by Senthil Kumaran in branch 'default': Issue #16250: Fix the invocations of URLError which had misplaced filename attribute for exception http://hg.python.org/cpython/rev/8fb438e7f738 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16250> _______________________________________ From report at bugs.python.org Mon Oct 22 04:06:22 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 22 Oct 2012 02:06:22 +0000 Subject: [issue16250] URLError invoked with reason as filename In-Reply-To: <1350404293.01.0.800497532294.issue16250@psf.upfronthosting.co.za> Message-ID: <1350871582.86.0.610091374119.issue16250@psf.upfronthosting.co.za> Senthil Kumaran added the comment: This is fixed in 3.4. I shall backport to other branches. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16250> _______________________________________ From report at bugs.python.org Mon Oct 22 07:39:05 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 22 Oct 2012 05:39:05 +0000 Subject: [issue9860] Building python outside of source directory fails In-Reply-To: <1284559695.71.0.359508650396.issue9860@psf.upfronthosting.co.za> Message-ID: <1350884345.54.0.227764741151.issue9860@psf.upfronthosting.co.za> ?ric Araujo added the comment: FYI hg -R path_to_repo works, we don't have to cd. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9860> _______________________________________ From report at bugs.python.org Mon Oct 22 08:48:48 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 22 Oct 2012 06:48:48 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <CAMpsgwaqd7ofxeZJbPcBMLWJY0TCg3-j2a577gTRADc3HiGj0w@mail.gmail.com> Message-ID: <5084EC4D.2060807@egenix.com> Marc-Andre Lemburg added the comment: On 21.10.2012 23:42, STINNER Victor wrote: > > STINNER Victor added the comment: > >> It's interesting to note how this whole -R discussion made very long > threads on python-dev, and python-dev has subsequently ignored (for the > past 6 months!) the fact that their "fix" can be worked around in a matter > of minutes. > > No, this issue has no been ignored. Nobody proposed anything to fix this > issue, but we are still working on it (sometimes in private). > > In my opinion, we cannot solve this issue without slowing down python. Or I > don't know yet.a.fast and secure hash algorithm. I don't really want to > slow down Python for one specific issue whereas there are so many other > ways to DoS a (web) server. Well, I did propose a different approach to the whole problem to count collisions. That would have avoided the usability issues you have with the randomization approach, made it possible for the application to detect the attack and not have introduced any significant runtime overhead for applications not being attacked. The proposal was shot down with the argument that it wouldn't fix the problem. It should also be noted that the randomization only applies to strings/bytes, dictionaries with other colliding keys are not protected at all. Perhaps it's time to revisit the collision counting idea ? It would work in much the same way as the stack recursion limit we have in Python. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Oct 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/ ________________________________________________________________________ 2012-09-27: Released eGenix PyRun 1.1.0 ... http://egenix.com/go35 2012-09-26: Released mxODBC.Connect 2.0.1 ... http://egenix.com/go34 2012-09-25: Released mxODBC 3.2.1 ... http://egenix.com/go33 2012-10-23: Python Meeting Duesseldorf ... tomorrow 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 <report at bugs.python.org> <http://bugs.python.org/issue14621> _______________________________________ From report at bugs.python.org Mon Oct 22 09:05:25 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 22 Oct 2012 07:05:25 +0000 Subject: [issue16291] Enable darwin-host cross compilation. Tested with build=linux, host=darwin In-Reply-To: <1350770977.75.0.64501763721.issue16291@psf.upfronthosting.co.za> Message-ID: <1350889525.65.0.300968273109.issue16291@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The patch itself looks fine, but I wonder how useful it will be. A small question about the patch, why this case in the cross_arch function: + x86_64*darwin*) + echo i386 That doesn't look correct. Back to the more important issue of the usefulness of this patch: * Why is cross-compiling to OSX useful at all? You still have to test if the output of the compilation works, and for that you need an OSX system. * The patch will only help with cross-compiling C code, it won't compile resource files (like the NIB file in Python Launcher) This is not a problem right now because that project currently contains older NIB files that can be used for editting and running, but would make it harder to move to the more modern XIB files that were introduced with Xcode 4. * This will make support harder, I already get support questions where the answer depends on the way Python was build and that will likely get worse with cross-compiling. * Where would users get the SDK? I'm not a lawyer (or even familiar with US law), but the Xcode license seems to indicate that it can only be used on Apple systems. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16291> _______________________________________ From report at bugs.python.org Mon Oct 22 10:27:29 2012 From: report at bugs.python.org (tb) Date: Mon, 22 Oct 2012 08:27:29 +0000 Subject: [issue16297] csv.DictReader Message-ID: <1350894449.05.0.527683107859.issue16297@psf.upfronthosting.co.za> New submission from tb: The csv.DictReader contains a setter method for the fieldnames (@fieldnames.setter). However, the __init__ method does not make use of the setter method as it sets _fieldnames directly. To allow users correct/functional overriding of the fieldnames.setter method I would propose changing the line self._fieldnames = fieldnames to self.fieldnames = fieldnames ---------- components: Library (Lib) messages: 173500 nosy: tb priority: normal severity: normal status: open title: csv.DictReader type: behavior versions: Python 3.2 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16297> _______________________________________ From report at bugs.python.org Mon Oct 22 10:41:52 2012 From: report at bugs.python.org (Piotr Dobrogost) Date: Mon, 22 Oct 2012 08:41:52 +0000 Subject: [issue15633] httplib.response is not closed after all data has been read In-Reply-To: <1344821463.76.0.139090148106.issue15633@psf.upfronthosting.co.za> Message-ID: <1350895312.28.0.514427337334.issue15633@psf.upfronthosting.co.za> Changes by Piotr Dobrogost <pd at bugs.python.dobrogost.net>: ---------- nosy: +piotr.dobrogost _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15633> _______________________________________ From report at bugs.python.org Mon Oct 22 12:46:32 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 22 Oct 2012 10:46:32 +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: <1350902792.31.0.631923151091.issue14892@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've just tested this on OSX 10.8.2 and the problem is not present there (that is, 'python -c "import deadline" &' does not hang) The problem is present on OSX 10.6.8, and when using ksh(1) you can see why the process is stopped: [1] + Stopped(SIGTTOU) python -c 'import readline' & That signal is generated when the program generates output to a tty and the TOSTOP option of stty is active. Whether or not that option is active is OS configuration (and can be changed using the stty command). Reading the option: import termios lflags = termios.tcgetattr(0)[3] print (lflags & termios.TOSTOP) != 0 Oddly enough the option off on both OSX 10.6 and 10.8, which point to a bug in OSX 10.6 (or to a misunderstanding of low-level tty programming details on my part which would not be unlikely) Anyway, there is an easy workaround: before importing readline add: import signal signal.signal(signal.SIGTTOU, signal.SIG_IGN) This ignores the SIGTTOU option and allows me to import readline on the background. IMHO This issue can be closed because this behavior is not a Python bug but a platform feature. ---------- resolution: -> invalid status: open -> pending _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14892> _______________________________________ From report at bugs.python.org Mon Oct 22 13:10:37 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 22 Oct 2012 11:10:37 +0000 Subject: [issue16294] 8 space indent in tutorial In-Reply-To: <1350821581.15.0.866474949137.issue16294@psf.upfronthosting.co.za> Message-ID: <1350904237.19.0.0464329408334.issue16294@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: I take care of this. Thanks for pointing it out. ---------- assignee: docs at python -> jcea nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16294> _______________________________________ From report at bugs.python.org Mon Oct 22 13:10:58 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 22 Oct 2012 11:10:58 +0000 Subject: [issue16294] 8 space indent in tutorial In-Reply-To: <1350821581.15.0.866474949137.issue16294@psf.upfronthosting.co.za> Message-ID: <1350904258.93.0.382709517921.issue16294@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- versions: +Python 3.4 -Python 3.1 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16294> _______________________________________ From report at bugs.python.org Mon Oct 22 13:16:26 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Oct 2012 11:16:26 +0000 Subject: [issue16294] 8 space indent in tutorial In-Reply-To: <1350821581.15.0.866474949137.issue16294@psf.upfronthosting.co.za> Message-ID: <3XlZtK63V7zPG2@mail.python.org> Roundup Robot added the comment: New changeset 1a3f48c6ef16 by Jesus Cea in branch '2.7': Closes #16294: 8 space indent in tutorial http://hg.python.org/cpython/rev/1a3f48c6ef16 New changeset 2015db05d954 by Jesus Cea in branch '3.2': Closes #16294: 8 space indent in tutorial http://hg.python.org/cpython/rev/2015db05d954 New changeset 3344c8208662 by Jesus Cea in branch '3.3': MERGE: Closes #16294: 8 space indent in tutorial http://hg.python.org/cpython/rev/3344c8208662 New changeset 4ca40082461c by Jesus Cea in branch 'default': MERGE: Closes #16294: 8 space indent in tutorial http://hg.python.org/cpython/rev/4ca40082461c ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16294> _______________________________________ From report at bugs.python.org Mon Oct 22 13:30:48 2012 From: report at bugs.python.org (Ray Donnelly) Date: Mon, 22 Oct 2012 11:30:48 +0000 Subject: [issue16291] Enable darwin-host cross compilation. Tested with build=linux, host=darwin In-Reply-To: <1350770977.75.0.64501763721.issue16291@psf.upfronthosting.co.za> Message-ID: <1350905448.02.0.695826774235.issue16291@psf.upfronthosting.co.za> Ray Donnelly added the comment: > A small question about the patch, why this case in the cross_arch function: >From a real Mac Book Pro: $ uname -a Darwin MACBOOKPRO.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64 $ /usr/bin/arch i386 $ uname -m x86_64 It would seem arch on OS X can only be used to determine PPC vs Intel (which is all that configure uses it for anyway). > Why is cross-compiling to OSX useful at all? Cross compiling is always useful for build engineers who have to target multiple hosts. > You still have to test if the output of the compilation works, and for that you need an OSX system. Ideally yes, or a Virtual Machine with OSX on it or confidence based on the results of a previous test built with the same sources or maloader (...though maybe not, I've never personally tried maloader). > The patch will only help with cross-compiling C code, it won't compile resource files (like the NIB file in Python Launcher) My personal interest is for having Python embedded in other things (GDB) and using it from the command-line. Python Launcher is not part of the scope. > This will make support harder, I already get support questions where the answer depends on the way Python was build and that will likely get worse with cross-compiling. I'd be happy to do whatever I can to help out with this. If we could identify in the build that it was built via cross compilation somehow or have my email address in the help would that make it more palatable? > * Where would users get the SDK? I'm not a lawyer (or even familiar with US law), but the Xcode license seems to indicate that it can only be used on Apple systems. The users would get the SDK from being registered as a developer with Apple. As for the license, while also not being a lawyer, my interpretation is this: In the Xcode License.rtf file (and the Command Line tools license), the relevant part is "you are granted a limited, non-exclusive license to use the Developer Software on Apple-branded computers to develop and test application and other software". This doesn't say anything about the OS that's running on said Apple-branded computer, and my interpretation is that you could install a Linux distro on an Apple computer or on a VM on an Apple computer and still be compliant with that license. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16291> _______________________________________ From report at bugs.python.org Mon Oct 22 13:32:32 2012 From: report at bugs.python.org (Eran Rundstein) Date: Mon, 22 Oct 2012 11:32:32 +0000 Subject: [issue16298] httplib.HTTPResponse.read could potentially leave the socket opened forever Message-ID: <1350905552.38.0.183421910215.issue16298@psf.upfronthosting.co.za> New submission from Eran Rundstein: When calling HTTPResponse.read() on a response that is: a. not chunked b. contains no content-length header the underlying socket (referenced by self.fp) will never get closed (through self.close()) The offending code is at the bottom of the read() function: s = self.fp.read(amt) if self.length is not None: self.length -= len(s) if not self.length: self.close() return s As seen, if self.length is None, even when the server closes the connection (causing self.fp.read to return ''), the socket will not get closed. btw, this may be the cause of Issue15633 (http://bugs.python.org/issue15633) ---------- components: Library (Lib) messages: 173505 nosy: eranrund priority: normal severity: normal status: open title: httplib.HTTPResponse.read could potentially leave the socket opened forever type: behavior versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16298> _______________________________________ From report at bugs.python.org Mon Oct 22 13:52:34 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Oct 2012 11:52:34 +0000 Subject: [issue16102] uuid._netbios_getnode() is outdated In-Reply-To: <1349112809.97.0.499056156586.issue16102@psf.upfronthosting.co.za> Message-ID: <1350906754.75.0.0103542475762.issue16102@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: As I see in pywin32 sources status.adapter_address is bytes in Python 3. Here is a trivial patch. ---------- keywords: +patch Added file: http://bugs.python.org/file27658/uuid_netbios_getnode.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16102> _______________________________________ From report at bugs.python.org Mon Oct 22 13:53:59 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Oct 2012 11:53:59 +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: <1350906839.56.0.188746766054.issue16053@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If the patch is good, why not commit it? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16053> _______________________________________ From report at bugs.python.org Mon Oct 22 13:59:32 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 22 Oct 2012 11:59:32 +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: <1350907172.75.0.808830836529.issue16290@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16290> _______________________________________ From report at bugs.python.org Mon Oct 22 14:00:55 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 22 Oct 2012 12:00:55 +0000 Subject: [issue16291] Enable darwin-host cross compilation. Tested with build=linux, host=darwin In-Reply-To: <1350770977.75.0.64501763721.issue16291@psf.upfronthosting.co.za> Message-ID: <1350907255.71.0.424231912368.issue16291@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16291> _______________________________________ From report at bugs.python.org Mon Oct 22 14:01:09 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 22 Oct 2012 12:01:09 +0000 Subject: [issue15484] CROSS: use _PYTHON_PROJECT_BASE in distutils sysconfig In-Reply-To: <1343555002.08.0.568710473474.issue15484@psf.upfronthosting.co.za> Message-ID: <1350907269.24.0.769735413043.issue15484@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15484> _______________________________________ From report at bugs.python.org Mon Oct 22 14:01:35 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 22 Oct 2012 12:01:35 +0000 Subject: [issue15483] CROSS: initialise include and library paths in setup.py In-Reply-To: <1343554833.66.0.976178324221.issue15483@psf.upfronthosting.co.za> Message-ID: <1350907295.78.0.409824659549.issue15483@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15483> _______________________________________ From report at bugs.python.org Mon Oct 22 14:01:45 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 22 Oct 2012 12:01:45 +0000 Subject: [issue16292] Cross compilation fixes (general) In-Reply-To: <1350774308.18.0.656262327513.issue16292@psf.upfronthosting.co.za> Message-ID: <1350907305.55.0.585157801313.issue16292@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16292> _______________________________________ From report at bugs.python.org Mon Oct 22 14:16:13 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 22 Oct 2012 12:16:13 +0000 Subject: [issue16295] With VS2010 the select extension links against wsock32 instead of ws2_32 In-Reply-To: <1350840082.43.0.801367725826.issue16295@psf.upfronthosting.co.za> Message-ID: <1350908173.17.0.0536633454744.issue16295@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: See this patch. ---------- keywords: +patch Added file: http://bugs.python.org/file27659/select.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16295> _______________________________________ From report at bugs.python.org Mon Oct 22 14:43:43 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 22 Oct 2012 12:43:43 +0000 Subject: [issue16231] pickle persistent_id return value In-Reply-To: <1350225017.39.0.976217955919.issue16231@psf.upfronthosting.co.za> Message-ID: <1350909823.68.0.548386016515.issue16231@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16231> _______________________________________ From report at bugs.python.org Mon Oct 22 14:46:21 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 22 Oct 2012 12:46:21 +0000 Subject: [issue16295] With VS2010 the select extension links against wsock32 instead of ws2_32 In-Reply-To: <1350840082.43.0.801367725826.issue16295@psf.upfronthosting.co.za> Message-ID: <1350909981.05.0.286607739047.issue16295@psf.upfronthosting.co.za> Martin v. L?wis added the comment: LGTM ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16295> _______________________________________ From report at bugs.python.org Mon Oct 22 14:46:50 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 22 Oct 2012 12:46:50 +0000 Subject: [issue16274] test_asyncore failing on Solaris 10 2.7 (nitrogen/s10) In-Reply-To: <1350547611.85.0.565736375067.issue16274@psf.upfronthosting.co.za> Message-ID: <1350910010.79.0.870690916351.issue16274@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Keeping the issue open until Trent can commit a new patch, according to msg173256. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16274> _______________________________________ From report at bugs.python.org Mon Oct 22 14:51:23 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 22 Oct 2012 12:51:23 +0000 Subject: [issue16274] test_asyncore failing on Solaris 10 2.7 (nitrogen/s10) In-Reply-To: <1350547611.85.0.565736375067.issue16274@psf.upfronthosting.co.za> Message-ID: <1350910283.16.0.705422263646.issue16274@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: This should do it: diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py --- a/Lib/test/test_asyncore.py +++ b/Lib/test/test_asyncore.py @@ -484,8 +484,9 @@ return self.socket.getsockname()[:2] def handle_accept(self): - sock, addr = self.accept() - self.handler(sock) + pair = self.accept() + if pair is not None: + self.handler(pair[0]) def handle_error(self): raise ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16274> _______________________________________ From report at bugs.python.org Mon Oct 22 14:58:08 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 22 Oct 2012 12:58:08 +0000 Subject: [issue16274] test_asyncore failing on Solaris 10 2.7 (nitrogen/s10) In-Reply-To: <1350547611.85.0.565736375067.issue16274@psf.upfronthosting.co.za> Message-ID: <1350910688.64.0.394369785788.issue16274@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Yes, now that I think of it that is how accept() is supposed to be used in 2.7 (back then I did also update doc examples in order to enforce this use case) so this is a test suite issue. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16274> _______________________________________ From report at bugs.python.org Mon Oct 22 15:01:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Oct 2012 13:01:14 +0000 Subject: [issue16295] With VS2010 the select extension links against wsock32 instead of ws2_32 In-Reply-To: <1350840082.43.0.801367725826.issue16295@psf.upfronthosting.co.za> Message-ID: <3XldCF43YtzR9g@mail.python.org> Roundup Robot added the comment: New changeset daad150b4670 by Kristjan Valur Jonsson in branch '3.3': Issue #16295: Link "select" with ws2_32.lib, the winsock2 stub library. http://hg.python.org/cpython/rev/daad150b4670 New changeset a2cd25d434b3 by Kristjan Valur Jonsson in branch 'default': Merge with 3.3: Issue #16295: Link "select" with ws2_32, the winsock2 lib. http://hg.python.org/cpython/rev/a2cd25d434b3 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16295> _______________________________________ From report at bugs.python.org Mon Oct 22 15:18:24 2012 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 22 Oct 2012 13:18:24 +0000 Subject: [issue15968] Incorporate Tcl/Tk/Tix into the Windows build process In-Reply-To: <1347996983.92.0.069726969781.issue15968@psf.upfronthosting.co.za> Message-ID: <1350911904.97.0.135802702041.issue15968@psf.upfronthosting.co.za> Changes by Jeremy Kloth <jeremy.kloth+python-tracker at gmail.com>: ---------- keywords: +patch Added file: http://bugs.python.org/file27660/029d1cdf6422.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15968> _______________________________________ From report at bugs.python.org Mon Oct 22 15:19:39 2012 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 22 Oct 2012 13:19:39 +0000 Subject: [issue15968] Incorporate Tcl/Tk/Tix into the Windows build process In-Reply-To: <1347996983.92.0.069726969781.issue15968@psf.upfronthosting.co.za> Message-ID: <1350911979.52.0.381745535835.issue15968@psf.upfronthosting.co.za> Changes by Jeremy Kloth <jeremy.kloth+python-tracker at gmail.com>: ---------- nosy: +brian.curtin, loewis, tim.golden _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15968> _______________________________________ From report at bugs.python.org Mon Oct 22 15:21:40 2012 From: report at bugs.python.org (Piotr Dobrogost) Date: Mon, 22 Oct 2012 13:21:40 +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: <1350912100.41.0.044039228212.issue16298@psf.upfronthosting.co.za> Changes by Piotr Dobrogost <pd at bugs.python.dobrogost.net>: ---------- nosy: +piotr.dobrogost _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16298> _______________________________________ From report at bugs.python.org Mon Oct 22 15:22:09 2012 From: report at bugs.python.org (Krzysztof Jurewicz) Date: Mon, 22 Oct 2012 13:22:09 +0000 Subject: [issue672115] Assignment to __bases__ of direct object subclasses Message-ID: <1350912129.09.0.276240165985.issue672115@psf.upfronthosting.co.za> Changes by Krzysztof Jurewicz <krzysztof.jurewicz at gmail.com>: ---------- nosy: +krzysiekj _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue672115> _______________________________________ From report at bugs.python.org Mon Oct 22 15:22:47 2012 From: report at bugs.python.org (Nikolaus Rath) Date: Mon, 22 Oct 2012 13:22:47 +0000 Subject: [issue15633] httplib.response is not closed after all data has been read In-Reply-To: <1344821463.76.0.139090148106.issue15633@psf.upfronthosting.co.za> Message-ID: <1350912167.81.0.200607830648.issue15633@psf.upfronthosting.co.za> Nikolaus Rath added the comment: This is just a heads-up that I'm still trying to debug this. So far, the problem doesn't seem to have shown up again (for reference, the original report for this is http://code.google.com/p/s3ql/issues/detail?id=358). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15633> _______________________________________ From report at bugs.python.org Mon Oct 22 15:29:59 2012 From: report at bugs.python.org (Piotr Dobrogost) Date: Mon, 22 Oct 2012 13:29:59 +0000 Subject: [issue15633] httplib.response is not closed after all data has been read In-Reply-To: <1344821463.76.0.139090148106.issue15633@psf.upfronthosting.co.za> Message-ID: <1350912599.1.0.420325320351.issue15633@psf.upfronthosting.co.za> Piotr Dobrogost added the comment: @Nikolaus Issue 16298 was raised today describing what could be the cause of what you observe. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15633> _______________________________________ From report at bugs.python.org Mon Oct 22 15:42:24 2012 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 22 Oct 2012 13:42:24 +0000 Subject: [issue8766] Segmentation fault with empty "encodings" subdirectory of directory in PYTHONPATH In-Reply-To: <1274275642.68.0.971287952925.issue8766@psf.upfronthosting.co.za> Message-ID: <1350913344.26.0.620045527407.issue8766@psf.upfronthosting.co.za> anatoly techtonik added the comment: This is still an issue for Windows. ---------- nosy: +techtonik versions: +Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8766> _______________________________________ From report at bugs.python.org Mon Oct 22 15:46:25 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 22 Oct 2012 13:46:25 +0000 Subject: [issue15772] Unresolved symbols in Windows 64-bit python In-Reply-To: <1345754338.96.0.805254982219.issue15772@psf.upfronthosting.co.za> Message-ID: <1350913585.36.0.505404490553.issue15772@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Closing as works-for-me then. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15772> _______________________________________ From report at bugs.python.org Mon Oct 22 15:49:37 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Oct 2012 13:49:37 +0000 Subject: [issue8766] Segmentation fault with empty "encodings" subdirectory of directory in PYTHONPATH In-Reply-To: <1350913344.26.0.620045527407.issue8766@psf.upfronthosting.co.za> Message-ID: <CAMpsgwaAEH75ghskuiZq5tazF62WDZL8vVNKr=rOWYt92p_p+A@mail.gmail.com> STINNER Victor added the comment: > This is still an issue for Windows. See my message on python-dev: your issue (with an invalid PYTHONHOME, Python exits with abort) is not related to this one, and it's not a bug (abort is not a bug). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8766> _______________________________________ From report at bugs.python.org Mon Oct 22 15:54:06 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 22 Oct 2012 13:54:06 +0000 Subject: [issue13376] readline: pre_input_hook not getting called In-Reply-To: <1320825555.41.0.989618903693.issue13376@psf.upfronthosting.co.za> Message-ID: <1350914046.81.0.682070455721.issue13376@psf.upfronthosting.co.za> Ronald Oussoren added the comment: 1) Issue is still present with libedit on OSX 10.8 2) Libedit on OSX doesn't call rl_pre_input_hook when using the '#if defined(HAVE_RL_CALLBACK) && defined(HAVE_SELECT)' branch in the readline extension (that is, not calling readline(3), but using rl_callback_read_char). 3) When I patch pyconfig.h to enable the code patch that does use readline the callback gets called, but that doesn't affect the readline buffer. Manually ensuring that the pre_input_hook is called at the right time is easy enough, but I don't have time to research why readline.insert_text (and/or readline.redisplay) doesn't work. The source code at <http://www.opensource.apple.com/source/libedit/libedit-31/src/readline.c> looks fine. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13376> _______________________________________ From report at bugs.python.org Mon Oct 22 15:56:49 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Oct 2012 13:56:49 +0000 Subject: [issue8766] Segmentation fault with empty "encodings" subdirectory of directory in PYTHONPATH In-Reply-To: <1274275642.68.0.971287952925.issue8766@psf.upfronthosting.co.za> Message-ID: <1350914209.24.0.451342605465.issue8766@psf.upfronthosting.co.za> Christian Heimes added the comment: I agree with Victor. ---------- nosy: +christian.heimes _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8766> _______________________________________ From report at bugs.python.org Mon Oct 22 15:58:41 2012 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 22 Oct 2012 13:58:41 +0000 Subject: [issue16299] __build__ as a temp build directory for setup.py Message-ID: <1350914321.82.0.675095841484.issue16299@psf.upfronthosting.co.za> New submission from anatoly techtonik: Currently distutils builds files in a temporary directory named 'build' in current dir if not specified otherwise. It will be pythonic to name this directory to be __build__ be default to distinguish it from project specific directories and clarify that this one can be safely removed (much like __pycache__). ---------- assignee: eric.araujo components: Distutils, Distutils2 messages: 173521 nosy: alexis, eric.araujo, tarek, techtonik priority: normal severity: normal status: open title: __build__ as a temp build directory for setup.py versions: Python 3.2, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16299> _______________________________________ From report at bugs.python.org Mon Oct 22 16:06:01 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 22 Oct 2012 14:06:01 +0000 Subject: [issue16297] small fix to csv.DictReader.__init__ In-Reply-To: <1350894449.05.0.527683107859.issue16297@psf.upfronthosting.co.za> Message-ID: <1350914761.2.0.511653390558.issue16297@psf.upfronthosting.co.za> Changes by Ramchandra Apte <maniandram01 at gmail.com>: ---------- title: csv.DictReader -> small fix to csv.DictReader.__init__ versions: +Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16297> _______________________________________ From report at bugs.python.org Mon Oct 22 16:06:34 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 22 Oct 2012 14:06:34 +0000 Subject: [issue16297] make csv.DictReader.__init__ use self.fieldnames In-Reply-To: <1350894449.05.0.527683107859.issue16297@psf.upfronthosting.co.za> Message-ID: <1350914794.95.0.641984781557.issue16297@psf.upfronthosting.co.za> Changes by Ramchandra Apte <maniandram01 at gmail.com>: ---------- title: small fix to csv.DictReader.__init__ -> make csv.DictReader.__init__ use self.fieldnames _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16297> _______________________________________ From report at bugs.python.org Mon Oct 22 16:11:46 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 22 Oct 2012 14:11:46 +0000 Subject: [issue16300] Windows raises ValueError for file:///file/not/exists instead of URLError Message-ID: <1350915106.57.0.374555323258.issue16300@psf.upfronthosting.co.za> New submission from Senthil Kumaran: >From the Buildbot failure - http://buildbot.python.org/all/builders/x86%20XP-4%203.x/builds/7573/steps/test/logs/stdio I remember that we restricted the access for file:// scheme to localhost only for Windows/Cygwin. In terms of exception raised it could either be consistent with other platforms and raise URLError or it could be for good reasons, the tests may need to be tweaked for windows. ---------- assignee: orsenthil keywords: easy messages: 173522 nosy: orsenthil priority: normal severity: normal status: open title: Windows raises ValueError for file:///file/not/exists instead of URLError type: behavior versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16300> _______________________________________ From report at bugs.python.org Mon Oct 22 16:24:00 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 22 Oct 2012 14:24:00 +0000 Subject: [issue16299] __build__ as a temp build directory for setup.py In-Reply-To: <1350914321.82.0.675095841484.issue16299@psf.upfronthosting.co.za> Message-ID: <1350915840.52.0.148973178314.issue16299@psf.upfronthosting.co.za> R. David Murray added the comment: I see no reason to make this change. 'build' is pretty much universally understood to be something that can be blown away, and I think that making Python's naming convention different than that used by other open source software projects in similar contexts would be much more confusing than helpful. ---------- nosy: +r.david.murray resolution: -> rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16299> _______________________________________ From report at bugs.python.org Mon Oct 22 16:33:16 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 22 Oct 2012 14:33:16 +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: <1350916396.32.0.473255623908.issue16053@psf.upfronthosting.co.za> ?ric Araujo added the comment: Because I lack time. Feel free to do it. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16053> _______________________________________ From report at bugs.python.org Mon Oct 22 16:44:47 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Oct 2012 14:44:47 +0000 Subject: [issue10905] zipfile: fix arcname with leading '///' or '..' In-Reply-To: <1295006628.53.0.290414123413.issue10905@psf.upfronthosting.co.za> Message-ID: <1350917087.53.0.159628434242.issue10905@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm going to close this issue as a duplicate of issue6972. Issue6972 is older and has a larger discussion. Thank you for patch and research, Zhigang Wang. I will use it for the new patch. ---------- resolution: -> duplicate status: open -> pending superseder: -> zipfile.ZipFile overwrites files outside destination path _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10905> _______________________________________ From report at bugs.python.org Mon Oct 22 17:00:59 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Oct 2012 15:00:59 +0000 Subject: [issue6972] zipfile.ZipFile overwrites files outside destination path In-Reply-To: <1253657452.09.0.588869541997.issue6972@psf.upfronthosting.co.za> Message-ID: <1350918059.94.0.496476069069.issue6972@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch based on patch for issue10905. Test included (I have removed some old tests as new one supersede them). Please test on Windows. ".." components, leading slashes, drive letter, etc are just dropped, as in unzip or 7-Zip. Thanks Zhigang Wang for original patch and research. ---------- keywords: +needs review stage: needs patch -> versions: +Python 3.4 Added file: http://bugs.python.org/file27661/zipfile_fix_arcname_2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6972> _______________________________________ From report at bugs.python.org Mon Oct 22 17:08:13 2012 From: report at bugs.python.org (Berker Peksag) Date: Mon, 22 Oct 2012 15:08:13 +0000 Subject: [issue16297] make csv.DictReader.__init__ use self.fieldnames In-Reply-To: <1350894449.05.0.527683107859.issue16297@psf.upfronthosting.co.za> Message-ID: <1350918493.38.0.289965863251.issue16297@psf.upfronthosting.co.za> Berker Peksag added the comment: I think this is an invalid request. See the usage of property decorator: http://docs.python.org/py3k/library/functions.html#property ---------- nosy: +berker.peksag _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16297> _______________________________________ From report at bugs.python.org Mon Oct 22 17:14:43 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 22 Oct 2012 15:14:43 +0000 Subject: [issue16297] make csv.DictReader.__init__ use self.fieldnames In-Reply-To: <1350894449.05.0.527683107859.issue16297@psf.upfronthosting.co.za> Message-ID: <1350918883.11.0.882633745008.issue16297@psf.upfronthosting.co.za> R. David Murray added the comment: I think it is not an invalid request. However, what is the use case? Normally a class will manipulate the "real" variable, and the getter/setter is the public API. Without a good use case it doesn't seem worth changing that bit of the init method. ---------- nosy: +r.david.murray _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16297> _______________________________________ From report at bugs.python.org Mon Oct 22 17:21:58 2012 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 22 Oct 2012 15:21:58 +0000 Subject: [issue16299] __build__ as a temp build directory for setup.py In-Reply-To: <1350914321.82.0.675095841484.issue16299@psf.upfronthosting.co.za> Message-ID: <1350919318.36.0.698630920583.issue16299@psf.upfronthosting.co.za> anatoly techtonik added the comment: RDM> 'build' is pretty much universally understood to be something that can be blown away That's not true anymore in 2012. Why follow the bad practice? I also want to know what open source software project are you referring to. From my experience 'build' directory name is an ancient legacy from Unix C compilers of previous century. Java doesn't use it, MSVC never did it, CMake doesn't have it, Go seems to build everything in temp dir. ---------- status: closed -> pending _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16299> _______________________________________ From report at bugs.python.org Mon Oct 22 17:29:05 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 22 Oct 2012 15:29:05 +0000 Subject: [issue16301] localhost() and thishost() in urllib/request.py Message-ID: <1350919745.8.0.0839924289599.issue16301@psf.upfronthosting.co.za> New submission from Senthil Kumaran: localhost() returns a string and thishost() returns tuple. In urllib/request.py, for file:// protocol, there is a verification to check to if the host is in the localhost and check happens: socket.gethostbyname(host) in (localhost() + thishost())): This is clearly wrong for the above mentioned reason. It should be changed to this, wrapping localhost with tuple() or making localhost return a tuple, which will be consistent with thishost socket.gethostbyname(host) in (tuple(localhost()) + thishost())): ---------- assignee: orsenthil messages: 173530 nosy: orsenthil priority: normal severity: normal status: open title: localhost() and thishost() in urllib/request.py type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16301> _______________________________________ From report at bugs.python.org Mon Oct 22 17:29:22 2012 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 22 Oct 2012 15:29:22 +0000 Subject: [issue16299] __build__ as a temp build directory for setup.py In-Reply-To: <1350914321.82.0.675095841484.issue16299@psf.upfronthosting.co.za> Message-ID: <1350919762.17.0.258908559158.issue16299@psf.upfronthosting.co.za> anatoly techtonik added the comment: Another difference from C sources that it is very convenient to use Python packages directly from source. In this case this unrelated 'build' dir will be the source of confusion if user previously tried to install the package. ---------- status: pending -> open _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16299> _______________________________________ From report at bugs.python.org Mon Oct 22 17:46:00 2012 From: report at bugs.python.org (Berker Peksag) Date: Mon, 22 Oct 2012 15:46:00 +0000 Subject: [issue16302] Fix ResourceWarning in Lib/test/test_urllib.py Message-ID: <1350920760.93.0.59056683313.issue16302@psf.upfronthosting.co.za> New submission from Berker Peksag: See the output: test_file_notexists (test.test_urllib.urlopen_HttpTests) ... file:///tmp/tmpmlmjhf /home/berker/hacking/cpython/Lib/test/test_urllib.py:284: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/tmpmlmjhf'> self.assertTrue(urlopen(tmp_fileurl)) ok ---------- components: Tests files: resourcewarning_urllib_test.patch keywords: patch messages: 173532 nosy: berker.peksag priority: normal severity: normal status: open title: Fix ResourceWarning in Lib/test/test_urllib.py versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27662/resourcewarning_urllib_test.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16302> _______________________________________ From report at bugs.python.org Mon Oct 22 17:48:18 2012 From: report at bugs.python.org (Berker Peksag) Date: Mon, 22 Oct 2012 15:48:18 +0000 Subject: [issue13504] Meta-issue for "Invent with Python" IDLE feedback In-Reply-To: <1322613083.36.0.200533745275.issue13504@psf.upfronthosting.co.za> Message-ID: <1350920898.32.0.966861313202.issue13504@psf.upfronthosting.co.za> Changes by Berker Peksag <berker.peksag at gmail.com>: ---------- nosy: -berker.peksag _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13504> _______________________________________ From report at bugs.python.org Mon Oct 22 17:48:50 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 22 Oct 2012 15:48:50 +0000 Subject: [issue16302] Fix ResourceWarning in Lib/test/test_urllib.py In-Reply-To: <1350920760.93.0.59056683313.issue16302@psf.upfronthosting.co.za> Message-ID: <1350920930.2.0.0597154262283.issue16302@psf.upfronthosting.co.za> Senthil Kumaran added the comment: thanks for the bug-report/patch. ---------- nosy: +orsenthil _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16302> _______________________________________ From report at bugs.python.org Mon Oct 22 17:51:44 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Oct 2012 15:51:44 +0000 Subject: [issue16299] __build__ as a temp build directory for setup.py In-Reply-To: <1350914321.82.0.675095841484.issue16299@psf.upfronthosting.co.za> Message-ID: <1350921104.9.0.706899790466.issue16299@psf.upfronthosting.co.za> Christian Heimes added the comment: The bug tracker is the wrong place to discuss your proposal. Please join the distutils-sig [1]. The group coordinates all efforts. [1] http://www.python.org/community/sigs/current/distutils-sig/ ---------- assignee: eric.araujo -> nosy: +christian.heimes status: open -> closed type: -> enhancement versions: +Python 3.4 -Python 3.2, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16299> _______________________________________ From report at bugs.python.org Mon Oct 22 17:57:20 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 22 Oct 2012 15:57:20 +0000 Subject: [issue16300] Windows raises ValueError for file:///file/not/exists instead of URLError In-Reply-To: <1350915106.57.0.374555323258.issue16300@psf.upfronthosting.co.za> Message-ID: <1350921440.5.0.135151130404.issue16300@psf.upfronthosting.co.za> Senthil Kumaran added the comment: The problem is here: if url[:2] == '//' and url[2:3] != '/' and url[2:12].lower() != 'localhost/': raise ValueError("file:// scheme is supported only on localhost") On Unix like systems url[2:3] == '/', that is path starts with '/' and this ValueError is escaped. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16300> _______________________________________ From report at bugs.python.org Mon Oct 22 18:04:59 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Oct 2012 16:04:59 +0000 Subject: [issue16302] Fix ResourceWarning in Lib/test/test_urllib.py In-Reply-To: <1350920760.93.0.59056683313.issue16302@psf.upfronthosting.co.za> Message-ID: <1350921899.96.0.855506852389.issue16302@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You can use contextlib.closing() context manager (if urlopen() already does not return a context manager). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16302> _______________________________________ From report at bugs.python.org Mon Oct 22 18:10:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Oct 2012 16:10:53 +0000 Subject: [issue16301] localhost() and thishost() in urllib/request.py In-Reply-To: <1350919745.8.0.0839924289599.issue16301@psf.upfronthosting.co.za> Message-ID: <1350922253.44.0.66030096045.issue16301@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is wrong too. >>> tuple('abc') ('a', 'b', 'c') Use ((localhost(),) + thishost())) ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16301> _______________________________________ From report at bugs.python.org Mon Oct 22 18:22:45 2012 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 22 Oct 2012 16:22:45 +0000 Subject: [issue8766] Segmentation fault with empty "encodings" subdirectory of directory in PYTHONPATH In-Reply-To: <1274275642.68.0.971287952925.issue8766@psf.upfronthosting.co.za> Message-ID: <1350922965.46.0.62108740846.issue8766@psf.upfronthosting.co.za> anatoly techtonik added the comment: Oh, sorry. I am just testing Python 3.3 and there are so many issues that hardly can test and fill them all. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8766> _______________________________________ From report at bugs.python.org Mon Oct 22 18:24:53 2012 From: report at bugs.python.org (Berker Peksag) Date: Mon, 22 Oct 2012 16:24:53 +0000 Subject: [issue16302] Fix ResourceWarning in Lib/test/test_urllib.py In-Reply-To: <1350920760.93.0.59056683313.issue16302@psf.upfronthosting.co.za> Message-ID: <1350923093.1.0.819329460619.issue16302@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the suggestion, Serhiy. Attached a new patch. ---------- Added file: http://bugs.python.org/file27663/resourcewarning_urllib_test_v2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16302> _______________________________________ From report at bugs.python.org Mon Oct 22 18:37:58 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 22 Oct 2012 16:37:58 +0000 Subject: [issue16301] localhost() and thishost() in urllib/request.py In-Reply-To: <1350919745.8.0.0839924289599.issue16301@psf.upfronthosting.co.za> Message-ID: <1350923878.08.0.81556450515.issue16301@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Serhiy: Yes. I stand corrected. That snippet suggestion was my mistake. I think, wrapping the test is better than changing the return of localhost. It would always return a single value. Thanks. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16301> _______________________________________ From report at bugs.python.org Mon Oct 22 18:42:00 2012 From: report at bugs.python.org (olivier-mattelaer) Date: Mon, 22 Oct 2012 16:42:00 +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: <1350924120.35.0.895211246927.issue14892@psf.upfronthosting.co.za> olivier-mattelaer added the comment: Thanks a lot Ronald. Cheers, Olivier ---------- status: pending -> open _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14892> _______________________________________ From report at bugs.python.org Mon Oct 22 18:43:49 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Oct 2012 16:43:49 +0000 Subject: [issue16301] localhost() and thishost() in urllib/request.py In-Reply-To: <1350919745.8.0.0839924289599.issue16301@psf.upfronthosting.co.za> Message-ID: <3Xlk8451qrzRGj@mail.python.org> Roundup Robot added the comment: New changeset 49de26395d1a by Senthil Kumaran in branch 'default': Issue #16301: Fix the localhost verification in urllib/request.py for file://. Modify tests to use localhost for local temp files, which could make Windows Buildbot (#16300) happy http://hg.python.org/cpython/rev/49de26395d1a ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16301> _______________________________________ From report at bugs.python.org Mon Oct 22 18:43:50 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Oct 2012 16:43:50 +0000 Subject: [issue16300] Windows raises ValueError for file:///file/not/exists instead of URLError In-Reply-To: <1350915106.57.0.374555323258.issue16300@psf.upfronthosting.co.za> Message-ID: <3Xlk853XmmzRGR@mail.python.org> Roundup Robot added the comment: New changeset 49de26395d1a by Senthil Kumaran in branch 'default': Issue #16301: Fix the localhost verification in urllib/request.py for file://. Modify tests to use localhost for local temp files, which could make Windows Buildbot (#16300) happy http://hg.python.org/cpython/rev/49de26395d1a ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16300> _______________________________________ From report at bugs.python.org Mon Oct 22 18:49:57 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Oct 2012 16:49:57 +0000 Subject: [issue12238] Readline module loading in interactive mode In-Reply-To: <1307015860.03.0.129842780518.issue12238@psf.upfronthosting.co.za> Message-ID: <1350924597.12.0.141122465807.issue12238@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This issue was fixed in 3.3, but not in 2.7 or 3.2. $ strace ./python -i </dev/null 2>&1 | grep readline stat64("/home/serhiy/py/cpython3.3/build/lib.linux-i686-3.3/readline.cpython-33m.so", {st_mode=S_IFREG|0755, st_size=52511, ...}) = 0 open("/home/serhiy/py/cpython3.3/build/lib.linux-i686-3.3/readline.cpython-33m.so", O_RDONLY) = 4 open("/lib/libreadline.so.6", O_RDONLY) = 4 ---------- components: +Interpreter Core nosy: +ncoghlan, serhiy.storchaka versions: -Python 2.6, Python 3.1, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12238> _______________________________________ From report at bugs.python.org Mon Oct 22 18:51:27 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 22 Oct 2012 16:51:27 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <1350924687.21.0.574521742975.issue10527@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: A preliminary patch is in attachment. By default it uses select() but looks for ValueError (raised in case FD_SETSIZE gets hit) and falls back on using poll(). This is the failure I get when running tests on Linux. It is related to issue 3321 and I'm not sure what to do with it (remove the test maybe?). ====================================================================== FAIL: test_invalid_handles (__main__.TestInvalidHandle) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_multiprocessing.py", line 2852, in test_invalid_handles self.assertRaises((ValueError, IOError), conn.poll) AssertionError: (<class 'ValueError'>, <class 'OSError'>) not raised by poll ---------- Added file: http://bugs.python.org/file27664/issue10527.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10527> _______________________________________ From report at bugs.python.org Mon Oct 22 19:08:33 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 22 Oct 2012 17:08:33 +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: <1350925713.18.0.647983699747.issue16298@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: ---------- nosy: +orsenthil, pitrou stage: -> needs patch versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16298> _______________________________________ From report at bugs.python.org Mon Oct 22 19:35:11 2012 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 22 Oct 2012 17:35:11 +0000 Subject: [issue15966] concurrent.futures: Executor.submit keyword arguments may not be called 'fn' (or 'self') In-Reply-To: <1347982368.75.0.56994107832.issue15966@psf.upfronthosting.co.za> Message-ID: <1350927311.11.0.831545692352.issue15966@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Did you actually bang into this? No directly, no: I'd hit a similar problem in some of our own code, leading to a signature change from "def do_later(fn, *args, **kwargs)" to "def do_later(fn, arg, kwargs)". Then it occurred to me to wonder how Executor.submit handled the issue. The workaround seems fine; feel free to close as "won't fix". ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15966> _______________________________________ From report at bugs.python.org Mon Oct 22 19:53:07 2012 From: report at bugs.python.org (Sandeep Mathew) Date: Mon, 22 Oct 2012 17:53:07 +0000 Subject: [issue16136] Removal of VMS support In-Reply-To: <1349389263.57.0.925729224322.issue16136@psf.upfronthosting.co.za> Message-ID: <1350928387.34.0.560708226346.issue16136@psf.upfronthosting.co.za> Sandeep Mathew added the comment: Hi , I love VMS very much, I could not concentrate actively on python because other work commitments ate up most of my time. I have left my job at HP and am now a PhD student and university of Nevada , Reno . Now that I do not have any professional commitments , I should be able to work on it in a more timely manner. I had used python for an internal project in HP. The problem now I have is that I need access to a VMS machine. I was not able to setup a build bot because buildbot needed some ports to be open , the machine provided HP did not give privilleges to do that. Another thing was that they wanted me to use gnv to compile python in VMS . I however did not really agree with it , gnv is buggy and you need to enable millions to of hacks to gets programs to compile. Programs written for VMS should be written the VMS way not the unix way. I was able to get Python 3.x to compile using gnv finally but it would not run properly. Is it possible for anyone to provide a VMS box with C Compiler and tools ( MMS) so that I can start working on it again. I will try asking HP , whether they would allow me to start working on it on the old VMS cluster they provided. --Thomas ---------- nosy: +sandman101 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16136> _______________________________________ From report at bugs.python.org Mon Oct 22 20:13:29 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Oct 2012 18:13:29 +0000 Subject: [issue16136] Removal of VMS support In-Reply-To: <1349389263.57.0.925729224322.issue16136@psf.upfronthosting.co.za> Message-ID: <1350929609.37.0.0949367082632.issue16136@psf.upfronthosting.co.za> Changes by Christian Heimes <lists at cheimes.de>: ---------- nosy: +christian.heimes _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16136> _______________________________________ From report at bugs.python.org Mon Oct 22 20:14:54 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 22 Oct 2012 18:14:54 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <1350929694.26.0.844270743012.issue10527@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't like this patch since it makes the implementation poorly testable. Moreover, behaviour might change subtly when the fd becomes > 512. I think that instead the code should always use poll() on platforms where it is available. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10527> _______________________________________ From report at bugs.python.org Mon Oct 22 20:15:23 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 22 Oct 2012 18:15:23 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <1350929723.26.0.915954150737.issue10527@psf.upfronthosting.co.za> Antoine Pitrou added the comment: By the way, I think this is a bug rather than a performance issue. ---------- type: performance -> behavior versions: +Python 3.2, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10527> _______________________________________ From report at bugs.python.org Mon Oct 22 20:18:03 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Oct 2012 18:18:03 +0000 Subject: [issue16136] Removal of VMS support In-Reply-To: <1349389263.57.0.925729224322.issue16136@psf.upfronthosting.co.za> Message-ID: <1350929883.4.0.483722405922.issue16136@psf.upfronthosting.co.za> Christian Heimes added the comment: We don't have any box that is capable of running VMS. Even Trent's Snakebit setup doesn't have VMS although he has lots of exotic hardware and OS, even HP-UX on a PA-RISC machine. It seems to be possible to run VMS on a cluster of RaspberryPi machines [1]. The PSF might help out if you need some official contacts to acquire licenses. [1] http://www.electronicsweekly.com/blogs/gadget-master/2012/07/raspberry-pi-emulates-vax-comp.html ---------- type: -> enhancement _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16136> _______________________________________ From report at bugs.python.org Mon Oct 22 20:23:56 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 22 Oct 2012 18:23:56 +0000 Subject: [issue12238] Readline module loading in interactive mode In-Reply-To: <1307015860.03.0.129842780518.issue12238@psf.upfronthosting.co.za> Message-ID: <1350930236.08.0.393231396636.issue12238@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Serhiy, I don't think it's fixed in 3.3, or perhaps I'm misunderstanding what you mean by "fixed". If you create readline.cpython-33m.so in your cwd and then run python, the fake readline will still be loaded instead of the real one. For example (here with 3.4): $ touch readline.cpython-34dm.so $ ./python Python 3.4.0a0 (default:2a0c9472c89c, Oct 21 2012, 23:24:06) [GCC 4.5.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import readline Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: ./readline.cpython-34dm.so: file too short ---------- versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12238> _______________________________________ From report at bugs.python.org Mon Oct 22 20:27:59 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 22 Oct 2012 18:27:59 +0000 Subject: [issue12238] Readline module loading in interactive mode In-Reply-To: <1307015860.03.0.129842780518.issue12238@psf.upfronthosting.co.za> Message-ID: <1350930479.55.0.464904053449.issue12238@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Regardless, I'm not sure what we should do about this issue. Loading readline is obviously provided as a convenience to make the interpreter prompt easier to use. Several of us would probably like to go a bit further and also add tab-completion (see issue5845). It stands that while the -S and -E option allow to disable any customization a user might have done (which is necessary for e.g. suid scripts), the automatic insertion of '' into sys.path has no way of being undone. ---------- nosy: +loewis _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12238> _______________________________________ From report at bugs.python.org Mon Oct 22 20:31:25 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 22 Oct 2012 18:31:25 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <1350930685.73.0.415118322872.issue10527@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Using poll() by default is controversial for 2 reasons, I think: #1 - a certain slowdown is likely to be introduced (I'll measure it) #2 - current wait() implementation allows to specify a list of file descriptors and/or Connections objects. select() can deal with both while poll() does not (it will return a list of integers rather than a list of Connection instances). I'm not sure how "public" multiprocessing.connection.wait() is considered and how much backward compatibility should matter in this case. > behaviour might change subtly when the fd becomes > 512 What do you mean? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10527> _______________________________________ From report at bugs.python.org Mon Oct 22 20:34:55 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 22 Oct 2012 18:34:55 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <1350930895.84.0.581351744444.issue10527@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > A preliminary patch is in attachment. > By default it uses select() but looks for ValueError (raised in case > FD_SETSIZE gets hit) and falls back on using poll(). > > This is the failure I get when running tests on Linux. > It is related to issue 3321 and I'm not sure what to do with it (remove > the test maybe?). I guess the patch could do if any(x[1] & POLLNVAL for x in ret): raise ValueError('invalid file descriptor') Also, I don't think there is any need to unregister the fds since you are just removing entries from an internal dict which will be garbage collected. I don't know if patching 2.7, 3.2, 3.3 to use/fallback on poll() would be allowed as a bug fix. When, if ever, will the next 2.7 release happen? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10527> _______________________________________ From report at bugs.python.org Mon Oct 22 20:41:40 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 22 Oct 2012 18:41:40 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1350930685.73.0.415118322872.issue10527@psf.upfronthosting.co.za> Message-ID: <1350931179.3366.4.camel@localhost.localdomain> Antoine Pitrou added the comment: > Using poll() by default is controversial for 2 reasons, I think: > > #1 - a certain slowdown is likely to be introduced (I'll measure it) That sounds like premature optimization. If you are concerned about that you could add some caching of the poll object. > #2 - current wait() implementation allows to specify a list of file > descriptors and/or Connections objects. > select() can deal with both while poll() does not (it will return a > list of integers rather than a list of Connection instances). Well, can't you just create a mapping of the fds to the objects? Your patch already has that problem by the way, and it's even worse since it will trigger in random conditions (when some fd is > 512). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10527> _______________________________________ From report at bugs.python.org Mon Oct 22 20:43:20 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 22 Oct 2012 18:43:20 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <1350931400.34.0.325999894934.issue10527@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Still not getting what you refer to when you talk about > 512 fds problem. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10527> _______________________________________ From report at bugs.python.org Mon Oct 22 20:45:04 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Oct 2012 18:45:04 +0000 Subject: [issue5803] email/quoprimime: encode and decode are very slow on large messages In-Reply-To: <1240254091.33.0.632025917195.issue5803@psf.upfronthosting.co.za> Message-ID: <1350931504.23.0.082551888918.issue5803@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: 3.2+ already use StringIO, there is no nonlinearity. On 2.7 I couldn't find the nonlinearity with the texts of up to 100 MB. Therefore the path outdated as bugfix. However it shows 20-30x speedup on 2.7. It would be worth port it to 3.4. This will be a significant enhancement (if the patch can preserve the current semantics). ---------- nosy: +serhiy.storchaka stage: patch review -> needs patch versions: +Python 3.4 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5803> _______________________________________ From report at bugs.python.org Mon Oct 22 20:47:42 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 22 Oct 2012 18:47:42 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <1350931662.34.0.698750620407.issue10527@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > Using poll() by default is controversial for 2 reasons, I think: > > #1 - a certain slowdown is likely to be introduced (I'll measure it) With a single fd poll is a bit faster than select: $ python -m timeit -s 'from select import select' 'select([0],[],[],0)' 100000 loops, best of 3: 2.99 usec per loop $ python -m timeit -s 'from select import poll, POLLIN' 'p=poll();p.register(0,POLLIN);p.poll(0)' 100000 loops, best of 3: 2.8 usec per loop The single fd case is the most important one -- see below. > #2 - current wait() implementation allows to specify a list of file > descriptors and/or Connections objects. > select() can deal with both while poll() does not (it will return a > list of integers rather than a list of Connection instances). > > I'm not sure how "public" multiprocessing.connection.wait() is > considered and how much backward compatibility should matter in this > case. It was introduced in Python 3.3 and is only really there to allow cross platform Windows/Unix multiplexing. It is (now) also used internally by Connection.poll() and Queue.get() with a single fd. In retrospect it would probably have been better to have implemented poll style multiplexing on Windows. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10527> _______________________________________ From report at bugs.python.org Mon Oct 22 20:50:28 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 22 Oct 2012 18:50:28 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <1350931828.55.0.67015600354.issue10527@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Still not getting what you refer to when you talk about > 512 fds problem. By 512 I mean FD_SETSIZE :) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10527> _______________________________________ From report at bugs.python.org Mon Oct 22 20:55:09 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 22 Oct 2012 18:55:09 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <1350932109.21.0.785924772125.issue10527@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > Still not getting what you refer to when you talk about > 512 fds > problem. Whether you get back the original objects or only their fds will depend on whether some fd was larger than FD_SETSIZE. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10527> _______________________________________ From report at bugs.python.org Mon Oct 22 21:10:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Oct 2012 19:10:03 +0000 Subject: [issue12238] Readline module loading in interactive mode In-Reply-To: <1307015860.03.0.129842780518.issue12238@psf.upfronthosting.co.za> Message-ID: <1350933003.98.0.977775519231.issue12238@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I understand what happens. Python 3.3+ uses getdents(), not stat() for module search. Therefore stat() is not called for non-existed files. > It stands that while the -S and -E option allow to disable any customization a user might have done (which is necessary for e.g. suid scripts), the automatic insertion of '' into sys.path has no way of being undone. Python used not only for suid scripts. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12238> _______________________________________ From report at bugs.python.org Mon Oct 22 22:09:28 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Oct 2012 20:09:28 +0000 Subject: [issue15966] concurrent.futures: Executor.submit keyword arguments may not be called 'fn' (or 'self') In-Reply-To: <1347982368.75.0.56994107832.issue15966@psf.upfronthosting.co.za> Message-ID: <1350936568.43.0.361852586429.issue15966@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There are many other cases of such issue: collections.namedtuple, contextlib.contextmanager, profile.Profile.runcall, etc. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15966> _______________________________________ From report at bugs.python.org Mon Oct 22 22:27:21 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 22 Oct 2012 20:27:21 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <1350937641.81.0.478036660017.issue10527@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: See also http://bugs.python.org/issue14635. This problem affects any single use of select(): instead of using an ad-hoc wrapper in each module, it would probably make sense to add a higher level selector class to the select module which would fallback on the right syscall (i.e. poll() if available, or /dev/poll on Solaris-like). ---------- nosy: +neologix _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10527> _______________________________________ From report at bugs.python.org Mon Oct 22 23:02:16 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 22 Oct 2012 21:02:16 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <1350939736.46.0.967163442656.issue10527@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > This problem affects any single use of select(): instead of using an > ad-hoc wrapper in each module, it would probably make sense to add a > higher level selector class to the select module which would fallback on > the right syscall (i.e. poll() if available, or /dev/poll on Solaris- > like). Doesn't Solaris have poll()? If so then I don't see why one would want to use /dev/poll in the single fd case. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10527> _______________________________________ From report at bugs.python.org Mon Oct 22 23:16:29 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 22 Oct 2012 21:16:29 +0000 Subject: [issue16250] URLError invoked with reason as filename In-Reply-To: <1350404293.01.0.800497532294.issue16250@psf.upfronthosting.co.za> Message-ID: <1350940589.74.0.635912774858.issue16250@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This broke the Windows 7 buildbot: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/850 ---------- nosy: +pitrou _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16250> _______________________________________ From report at bugs.python.org Mon Oct 22 23:20:00 2012 From: report at bugs.python.org (Roger Serwy) Date: Mon, 22 Oct 2012 21:20:00 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1346632042.85.0.745944196118.issue15853@psf.upfronthosting.co.za> Message-ID: <1350940800.72.0.201213122876.issue15853@psf.upfronthosting.co.za> Roger Serwy added the comment: The patch works with 3.3.0 and 2.7.3 on Windows 7. +1 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15853> _______________________________________ From report at bugs.python.org Mon Oct 22 23:57:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Oct 2012 21:57:30 +0000 Subject: [issue6972] zipfile.ZipFile overwrites files outside destination path In-Reply-To: <1253657452.09.0.588869541997.issue6972@psf.upfronthosting.co.za> Message-ID: <1350943050.61.0.798558784132.issue6972@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: Removed file: http://bugs.python.org/file27661/zipfile_fix_arcname_2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6972> _______________________________________ From report at bugs.python.org Mon Oct 22 23:58:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Oct 2012 21:58:07 +0000 Subject: [issue6972] zipfile.ZipFile overwrites files outside destination path In-Reply-To: <1253657452.09.0.588869541997.issue6972@psf.upfronthosting.co.za> Message-ID: <1350943087.32.0.638572391807.issue6972@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oh, I forgot docs. ---------- Added file: http://bugs.python.org/file27665/zipfile_fix_arcname_2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6972> _______________________________________ From report at bugs.python.org Tue Oct 23 00:20:45 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Oct 2012 22:20:45 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1346632042.85.0.745944196118.issue15853@psf.upfronthosting.co.za> Message-ID: <3Xlscr2Hk7zRL1@mail.python.org> Roundup Robot added the comment: New changeset d089b8fb0f56 by Ned Deily in branch '2.7': Issue #15853: Prevent IDLE crash on OS X when opening Preferences menu http://hg.python.org/cpython/rev/d089b8fb0f56 New changeset a3d755eaf5fa by Ned Deily in branch '3.2': Issue #15853: Prevent IDLE crash on OS X when opening Preferences menu http://hg.python.org/cpython/rev/a3d755eaf5fa New changeset 36e7da8d3059 by Ned Deily in branch '3.3': Issue #15853: merge 3.2 -> 3.3 http://hg.python.org/cpython/rev/36e7da8d3059 New changeset 8f61d580aca6 by Ned Deily in branch 'default': Issue #15853: merge 3.3 -> default http://hg.python.org/cpython/rev/8f61d580aca6 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15853> _______________________________________ From report at bugs.python.org Tue Oct 23 00:37:21 2012 From: report at bugs.python.org (Ned Deily) Date: Mon, 22 Oct 2012 22:37:21 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1346632042.85.0.745944196118.issue15853@psf.upfronthosting.co.za> Message-ID: <1350945441.04.0.972557440088.issue15853@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for everyone's help on this. To summarize, opening IDLE's Preferences menu when Python is dynamically linking to ActiveTcl 8.5.12.1 (at this writing, the most recent version) causes Tk to crash. The committed patches here avoid the crash by changing Tk calls from IDLE. These fixes will be released in the next set of maintenance releases: 2.7.4, 3.2.4, 3.3.1, and in 3.4.0. Until they are installed, another workaround is to revert to an earlier version of ActiveTcl; 8.5.11.1 is recommended: http://downloads.activestate.com/ActiveTcl/releases/8.5.11.1/ As always, http://www.python.org/download/mac/tcltk/ will be updated with current recommendations. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15853> _______________________________________ From report at bugs.python.org Tue Oct 23 01:09:09 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 22 Oct 2012 23:09:09 +0000 Subject: [issue8766] Segmentation fault with empty "encodings" subdirectory of directory in PYTHONPATH In-Reply-To: <1274275642.68.0.971287952925.issue8766@psf.upfronthosting.co.za> Message-ID: <1350947349.13.0.250313206624.issue8766@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>: ---------- versions: -Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8766> _______________________________________ From report at bugs.python.org Tue Oct 23 01:12:20 2012 From: report at bugs.python.org (Masami HIRATA) Date: Mon, 22 Oct 2012 23:12:20 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 In-Reply-To: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> Message-ID: <1350947540.66.0.698688185618.issue16116@psf.upfronthosting.co.za> Masami HIRATA added the comment: > Could well be a similar problem; I'll look into it. Is there any progress? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16116> _______________________________________ From report at bugs.python.org Tue Oct 23 02:06:50 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 23 Oct 2012 00:06:50 +0000 Subject: [issue16301] localhost() and thishost() in urllib/request.py In-Reply-To: <1350919745.8.0.0839924289599.issue16301@psf.upfronthosting.co.za> Message-ID: <3XlvzF15VZzRNP@mail.python.org> Roundup Robot added the comment: New changeset 478cda291bbc by Senthil Kumaran in branch 'default': Fix the ResourceWarning in test_urllib.py due changes made for #16301. Patch by Berker Peksag http://hg.python.org/cpython/rev/478cda291bbc ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16301> _______________________________________ From report at bugs.python.org Tue Oct 23 02:09:45 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 23 Oct 2012 00:09:45 +0000 Subject: [issue16302] Fix ResourceWarning in Lib/test/test_urllib.py In-Reply-To: <1350920760.93.0.59056683313.issue16302@psf.upfronthosting.co.za> Message-ID: <1350950985.86.0.973667417747.issue16302@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed in 478cda291bbc Berker - with urlopen(tmp_fileurl) as fobj: self.assertTrue(fobj) is enough when using context manager as the fobj gets closed automatically at exiting of context. Thanks. ---------- resolution: -> fixed status: open -> closed versions: -Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16302> _______________________________________ From report at bugs.python.org Tue Oct 23 02:41:43 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 23 Oct 2012 00:41:43 +0000 Subject: [issue16250] URLError invoked with reason as filename In-Reply-To: <1350404293.01.0.800497532294.issue16250@psf.upfronthosting.co.za> Message-ID: <1350952903.24.0.39620362265.issue16250@psf.upfronthosting.co.za> Senthil Kumaran added the comment: The change in 49de26395d1a addresses the buildbot failure. I have given a run again. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16250> _______________________________________ From report at bugs.python.org Tue Oct 23 03:39:10 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Oct 2012 01:39:10 +0000 Subject: [issue16276] OrderedDict constructor do not keep items order In-Reply-To: <1350552813.45.0.500801824963.issue16276@psf.upfronthosting.co.za> Message-ID: <1350956350.4.0.0109172620347.issue16276@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks Ezio. ---------- nosy: +rhettinger _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16276> _______________________________________ From report at bugs.python.org Tue Oct 23 03:42:26 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Oct 2012 01:42:26 +0000 Subject: [issue16279] namedtuple should compare equality with field names taken into account In-Reply-To: <1350590383.92.0.380750579544.issue16279@psf.upfronthosting.co.za> Message-ID: <1350956546.08.0.8679037236.issue16279@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Nick, thanks for closing this one with a clear and accurate explanation. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16279> _______________________________________ From report at bugs.python.org Tue Oct 23 03:56:04 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Oct 2012 01:56:04 +0000 Subject: [issue16286] Optimize a==b and a!=b for bytes and str In-Reply-To: <1350650166.87.0.27478619259.issue16286@psf.upfronthosting.co.za> Message-ID: <1350957364.08.0.0990784388986.issue16286@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Rather than see statistics, I'm curious about what circumstances where the optimization would kick in. Interned strings are pre-hashed but they already benefit from an identity-implies-equality check. Dicts and sets already incorporate a check-hash-before-equality check. That raises the question of what strings ever have had their hash already computed if the string hasn't been interned or has been used in a dict or set? P.S. I rather like the optimization and don't want to discourage it. I'm just curious about what the current optimizations are missing. ---------- nosy: +rhettinger _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16286> _______________________________________ From report at bugs.python.org Tue Oct 23 04:35:44 2012 From: report at bugs.python.org (Roger Serwy) Date: Tue, 23 Oct 2012 02:35:44 +0000 Subject: [issue16233] IDLE: conceptual problems with *Class browser* In-Reply-To: <1350229949.19.0.565182759034.issue16233@psf.upfronthosting.co.za> Message-ID: <1350959744.23.0.840441701107.issue16233@psf.upfronthosting.co.za> Roger Serwy added the comment: Saving the shell to a file allows the class browser to function. However a class browser for a syntax-incorrect file due to prompts and stdout contents can also pose a conceptual problem. I suggest that the error message be modified to include a corrective action: "This buffer has no associated filename. Please save this buffer to a file and try again." ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16233> _______________________________________ From report at bugs.python.org Tue Oct 23 04:39:06 2012 From: report at bugs.python.org (Roger Serwy) Date: Tue, 23 Oct 2012 02:39:06 +0000 Subject: [issue16233] IDLE: conceptual problems with *Class browser* In-Reply-To: <1350229949.19.0.565182759034.issue16233@psf.upfronthosting.co.za> Message-ID: <1350959946.7.0.574898908983.issue16233@psf.upfronthosting.co.za> Roger Serwy added the comment: Attached is a quick patch to change the error message. ---------- keywords: +patch Added file: http://bugs.python.org/file27666/message_fix.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16233> _______________________________________ From report at bugs.python.org Tue Oct 23 06:52:03 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 23 Oct 2012 04:52:03 +0000 Subject: [issue16250] URLError invoked with reason as filename In-Reply-To: <1350404293.01.0.800497532294.issue16250@psf.upfronthosting.co.za> Message-ID: <1350967923.68.0.0468642638618.issue16250@psf.upfronthosting.co.za> Senthil Kumaran added the comment: The change I had made for fixing the windows buildbot had not fixed it. I am skipped (1f92315d9568) the test on windows, investigating the reason for windows behavior and I shall remove the skiptest on windows after fix. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16250> _______________________________________ From report at bugs.python.org Tue Oct 23 08:15:33 2012 From: report at bugs.python.org (Berker Peksag) Date: Tue, 23 Oct 2012 06:15:33 +0000 Subject: [issue16302] Fix ResourceWarning in Lib/test/test_urllib.py In-Reply-To: <1350920760.93.0.59056683313.issue16302@psf.upfronthosting.co.za> Message-ID: <1350972933.96.0.172762398893.issue16302@psf.upfronthosting.co.za> Berker Peksag added the comment: You are right, thanks Senthil. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16302> _______________________________________ From report at bugs.python.org Tue Oct 23 08:20:37 2012 From: report at bugs.python.org (Antoine Dechaume) Date: Tue, 23 Oct 2012 06:20:37 +0000 Subject: [issue16276] OrderedDict constructor do not keep items order In-Reply-To: <1350552813.45.0.500801824963.issue16276@psf.upfronthosting.co.za> Message-ID: <1350973237.53.0.82172622077.issue16276@psf.upfronthosting.co.za> Antoine Dechaume added the comment: I did read the docs before submitting, obviously my brain was not plugged in. I am sorry for the noise. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16276> _______________________________________ From report at bugs.python.org Tue Oct 23 09:38:30 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 23 Oct 2012 07:38:30 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1350939736.46.0.967163442656.issue10527@psf.upfronthosting.co.za> Message-ID: <CAH_1eM2qykdNH65_vuBg8NQTBUVrj78R-Q+njmQg_+tGkLWrsA@mail.gmail.com> Charles-Fran?ois Natali added the comment: >> This problem affects any single use of select(): instead of using an >> ad-hoc wrapper in each module, it would probably make sense to add a >> higher level selector class to the select module which would fallback on >> the right syscall (i.e. poll() if available, or /dev/poll on Solaris- >> like). > > Doesn't Solaris have poll()? If so then I don't see why one would want to use /dev/poll in the single fd case. Because it offers better performance than poll(): you don't have to keep passing the FD at each syscall (note that I'm not talking about the signal FD case, but about a generic polling API). Also note that microbenchmarks with one FD isn't really meaningful, since in real life the FD won't be ready at least part of the time: like Antoine, I think that worrying about performance impact is really a premature optimization (unless real benchmarks prove otherwise). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10527> _______________________________________ From report at bugs.python.org Tue Oct 23 10:39:09 2012 From: report at bugs.python.org (tb) Date: Tue, 23 Oct 2012 08:39:09 +0000 Subject: [issue16297] make csv.DictReader.__init__ use self.fieldnames In-Reply-To: <1350894449.05.0.527683107859.issue16297@psf.upfronthosting.co.za> Message-ID: <1350981549.22.0.118017365998.issue16297@psf.upfronthosting.co.za> tb added the comment: This is my use case: I am creating a custom DictReader class for reading and accessing the columns white space and case insensitive. For this I created a dict subclass (DictInsensitive) with a custom __getitem__ method. DictReaderInsensitive.__next__ overrides the original DictReader.__next__ by returning a DictInsensitive. I also override the DictReader.fieldnames property to lower/strip all fieldnames. See http://stackoverflow.com/a/12970460/1251007 for an example. This is all functional with the current csv.DictReader. All entries in DictReaderInsensitive.fieldnames are in lower case and without white space and by iterating over the lines I get dictionaries where I can access the keys white space/case insensitive. Now, the problem is: If I want the check wether a specific fieldname is present in the input file, I have strip()/lower() "by hand": csv_in = DictReaderInsensitive(open(input_file, 'rU')) if "Fieldname to check".strip().lower() in csv_in.fieldnames To do this automatically, I created a ListInsensitive as a subclass of list: class ListInsensitive(list): def __contains__(self, item): return list.__contains__(self, item.strip().lower()) Now I want csv.DictReader to use that new class. I thought of overwriting the setter method, but here lies the current problem. I can overwrite the setter method, but csv.DictReader does not use the setter method internally. My setter method looks like this: @fieldnames.setter def fieldnames(self, value): if value == None: self._fieldnames = None else: self._fieldnames = ListInsensitive() for name in value: self._fieldnames.append(name.strip().lower()) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16297> _______________________________________ From report at bugs.python.org Tue Oct 23 10:45:13 2012 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 23 Oct 2012 08:45:13 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 In-Reply-To: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> Message-ID: <1350981913.3.0.584911791072.issue16116@psf.upfronthosting.co.za> Vinay Sajip added the comment: Sorry, not yet - I haven't been able to spend much time looking at it, but hopefully I will be able to before too long. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16116> _______________________________________ From report at bugs.python.org Tue Oct 23 11:37:35 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 23 Oct 2012 09:37:35 +0000 Subject: [issue1248658] dir should accept dirproxies for __dict__ Message-ID: <1350985055.36.0.665224027259.issue1248658@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This is not relevant for supported python releases: in python 2.6 and later my usecase can be implemented using the magic method __dir__. I'm therefore closing this issue. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1248658> _______________________________________ From report at bugs.python.org Tue Oct 23 11:58:12 2012 From: report at bugs.python.org (Juho Vuori) Date: Tue, 23 Oct 2012 09:58:12 +0000 Subject: [issue10836] urllib.request.urlretrieve calls URLError with 3 args In-Reply-To: <1294252036.56.0.144119584231.issue10836@psf.upfronthosting.co.za> Message-ID: <1350986292.48.0.0922249181086.issue10836@psf.upfronthosting.co.za> Juho Vuori added the comment: Should the bug be closed as it seems to be fixed now? ---------- nosy: +juho _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10836> _______________________________________ From report at bugs.python.org Tue Oct 23 12:02:13 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 23 Oct 2012 10:02: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: <1350986533.35.0.0397722598678.issue15132@psf.upfronthosting.co.za> Changes by Petri Lehtinen <petri at digip.org>: ---------- nosy: +petri.lehtinen _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15132> _______________________________________ From report at bugs.python.org Tue Oct 23 12:09:45 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 23 Oct 2012 10:09:45 +0000 Subject: [issue9556] Specifying the time a TimedRotatingFileHandler rotates In-Reply-To: <1281441457.15.0.524451784963.issue9556@psf.upfronthosting.co.za> Message-ID: <1350986984.99.0.971663824258.issue9556@psf.upfronthosting.co.za> Ronald Oussoren added the comment: An 'atTime' argument would work. I'm currently using a subclass of BaseRotatingHandler that implements just the 'MIDNIGHT' option of TimedRotatingFileHandler with a rotation hour argument. The attached patch is a first attempt at implementing the 'atTime' option, it is currently lacking documentation and tests for the 'WEEKLY' value for 'when'. ---------- status: pending -> open versions: +Python 3.4 -Python 3.2 Added file: http://bugs.python.org/file27667/issue9556.txt _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9556> _______________________________________ From report at bugs.python.org Tue Oct 23 12:11:15 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Oct 2012 10:11:15 +0000 Subject: [issue16286] Optimize a==b and a!=b for bytes and str In-Reply-To: <1350957364.08.0.0990784388986.issue16286@psf.upfronthosting.co.za> Message-ID: <CAMpsgwbjiKA=-6LFtXUDhtswG+_9L4YVzmtVUwcsP2kXvwLxHA@mail.gmail.com> STINNER Victor added the comment: Oh, I forgot this issue when I did the following commit: -- changeset: 79902:b68be1025c42 user: Victor Stinner <victor.stinner at gmail.com> date: Tue Oct 23 02:48:49 2012 +0200 files: Objects/unicodeobject.c description: Optimize PyUnicode_RichCompare() for Py_EQ and Py_NE: always use memcmp() -- I will benchmark the overhead of memcmp() on short strings. We may check the first and last characters before calling memcmp() to limit the overhead of calling a function. I also read that GCC uses its builtin memcmp() which is slower than the memcmp() of the GNU libc. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16286> _______________________________________ From report at bugs.python.org Tue Oct 23 12:34:43 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 23 Oct 2012 10:34:43 +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: <1350988483.95.0.177792862496.issue16245@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think it's ok to have a separate file rather than patching the existing one (see attached patch). If the old script is not used anymore it could be removed, otherwise we could just leave it there. ---------- stage: needs patch -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16245> _______________________________________ From report at bugs.python.org Tue Oct 23 13:11:18 2012 From: report at bugs.python.org (Kimmo Mustonen) Date: Tue, 23 Oct 2012 11:11:18 +0000 Subject: [issue6975] symlinks incorrectly resolved on Linux In-Reply-To: <1253685313.69.0.648289112505.issue6975@psf.upfronthosting.co.za> Message-ID: <1350990678.44.0.287576189954.issue6975@psf.upfronthosting.co.za> Kimmo Mustonen added the comment: Tried it out and it seemed to fix the issue. Ported the patch to python3. ---------- nosy: +tzimmo Added file: http://bugs.python.org/file27668/issue6975_py3.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6975> _______________________________________ From report at bugs.python.org Tue Oct 23 13:24:40 2012 From: report at bugs.python.org (Marek Suppa) Date: Tue, 23 Oct 2012 11:24:40 +0000 Subject: [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <1350991480.44.0.371607827802.issue16241@psf.upfronthosting.co.za> Marek Suppa added the comment: The appended diff tries to explain the situation a bit and fix this issue. Is it clear enough? ---------- keywords: +patch nosy: +mrshu Added file: http://bugs.python.org/file27669/issue16241.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16241> _______________________________________ From report at bugs.python.org Tue Oct 23 13:26:01 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 23 Oct 2012 11:26:01 +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: <1350991561.66.0.106147590233.issue16245@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: Added file: http://bugs.python.org/file27670/issue16245-2.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16245> _______________________________________ From report at bugs.python.org Tue Oct 23 13:38:52 2012 From: report at bugs.python.org (Pete Sevander) Date: Tue, 23 Oct 2012 11:38:52 +0000 Subject: [issue16210] combine the two type() definitions in built-in function docs In-Reply-To: <1350033139.53.0.10696980819.issue16210@psf.upfronthosting.co.za> Message-ID: <1350992332.62.0.653903988912.issue16210@psf.upfronthosting.co.za> Pete Sevander added the comment: Here's a patch for it. ---------- keywords: +patch nosy: +sevanteri Added file: http://bugs.python.org/file27671/issue16210.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16210> _______________________________________ From report at bugs.python.org Tue Oct 23 13:50:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Oct 2012 11:50:03 +0000 Subject: [issue16297] make csv.DictReader.__init__ use self.fieldnames In-Reply-To: <1350894449.05.0.527683107859.issue16297@psf.upfronthosting.co.za> Message-ID: <1350993003.91.0.533775609241.issue16297@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You can overwrite fieldnames getter. @property def fieldnames(self): if self._fieldnames is None: try: self._fieldnames = next(self.reader) except StopIteration: pass self.line_num = self.reader.line_num if not isinstance(self._fieldnames, ListInsensitive): self._fieldnames = ListInsensitive(name.strip().lower() for name in self._fieldnames) return self._fieldnames ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16297> _______________________________________ From report at bugs.python.org Tue Oct 23 13:53:19 2012 From: report at bugs.python.org (Vladimir Rutsky) Date: Tue, 23 Oct 2012 11:53:19 +0000 Subject: [issue16303] typo in error message in pstats.py Message-ID: <1350993199.31.0.48592557313.issue16303@psf.upfronthosting.co.za> New submission from Vladimir Rutsky: Please see attached patch for details. ---------- files: quote_typo.patch keywords: patch messages: 173594 nosy: vrutsky priority: normal severity: normal status: open title: typo in error message in pstats.py versions: Python 2.7 Added file: http://bugs.python.org/file27672/quote_typo.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16303> _______________________________________ From report at bugs.python.org Tue Oct 23 13:59:09 2012 From: report at bugs.python.org (Vladimir Rutsky) Date: Tue, 23 Oct 2012 11:59:09 +0000 Subject: [issue16304] re: Match Objects always have a boolean value of True Message-ID: <1350993549.54.0.0789320233606.issue16304@psf.upfronthosting.co.za> New submission from Vladimir Rutsky: re module documentation says: Match Objects always have a boolean value of :const:`True`, so that you can test whether e.g. :func:`match` resulted in a match with a simple if statement. which is confusing - matched objects have boolean value True, doesn't matched - False. ---------- assignee: docs at python components: Documentation messages: 173595 nosy: docs at python, vrutsky priority: normal severity: normal status: open title: re: Match Objects always have a boolean value of True versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16304> _______________________________________ From report at bugs.python.org Tue Oct 23 14:03:37 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 23 Oct 2012 12:03:37 +0000 Subject: [issue15040] stdlib compatibility with pypy: mailbox module In-Reply-To: <1339269980.73.0.83333668475.issue15040@psf.upfronthosting.co.za> Message-ID: <3XmCtJ3DXqzRB1@mail.python.org> Roundup Robot added the comment: New changeset 84cd07899baf by Petri Lehtinen in branch '2.7': #15040: Close files in mailbox tests for PyPy compatibility http://hg.python.org/cpython/rev/84cd07899baf ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15040> _______________________________________ From report at bugs.python.org Tue Oct 23 14:04:01 2012 From: report at bugs.python.org (Tuukka Hastrup) Date: Tue, 23 Oct 2012 12:04:01 +0000 Subject: [issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings In-Reply-To: <1347321295.19.0.66061447718.issue15916@psf.upfronthosting.co.za> Message-ID: <1350993841.54.0.253065966566.issue15916@psf.upfronthosting.co.za> Tuukka Hastrup added the comment: I'm attaching a patch that changes DocTestSuite's default behaviour as suggested. ---------- keywords: +patch nosy: +tuukka Added file: http://bugs.python.org/file27673/issue15916.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15916> _______________________________________ From report at bugs.python.org Tue Oct 23 14:04:28 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 23 Oct 2012 12:04:28 +0000 Subject: [issue15040] stdlib compatibility with pypy: mailbox module In-Reply-To: <1339269980.73.0.83333668475.issue15040@psf.upfronthosting.co.za> Message-ID: <1350993868.64.0.414582631102.issue15040@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Applied, thanks! ---------- nosy: +petri.lehtinen resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15040> _______________________________________ From report at bugs.python.org Tue Oct 23 14:06:15 2012 From: report at bugs.python.org (Lucas Maystre) Date: Tue, 23 Oct 2012 12:06:15 +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: <1350993975.09.0.226609173962.issue11175@psf.upfronthosting.co.za> Lucas Maystre added the comment: Here's an attempt at implementing this (my first contribution). Some notes: - I tried to keep `__repr__()` backwards compatible. It would have been easier to inherit from `_AttributeHolder`, but maybe this might break some things... - I added some test cases for `__repr__()`, but that's it. I don't think there's any other sensible test to do, as we're really just passing stuff to `open()` - not sure about the style, especially line breaks... ---------- keywords: +patch nosy: +lum Added file: http://bugs.python.org/file27674/filetype11175.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11175> _______________________________________ From report at bugs.python.org Tue Oct 23 14:07:34 2012 From: report at bugs.python.org (Hieu Nguyen) Date: Tue, 23 Oct 2012 12:07:34 +0000 Subject: [issue12886] datetime.strptime parses input wrong In-Reply-To: <1314974007.55.0.285568781981.issue12886@psf.upfronthosting.co.za> Message-ID: <1350994054.49.0.600642827492.issue12886@psf.upfronthosting.co.za> Hieu Nguyen added the comment: I have attached a patch for this issue, so that if the format of the input argument doesn't match ISO 8601 format, it will return ValueError: time data xxx does not match format xxx. ---------- keywords: +patch nosy: +hieu.nguyen Added file: http://bugs.python.org/file27675/issue12886.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12886> _______________________________________ From report at bugs.python.org Tue Oct 23 14:11:48 2012 From: report at bugs.python.org (Iuliia Proskurnia) Date: Tue, 23 Oct 2012 12:11:48 +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: <1350994308.96.0.843131391764.issue16245@psf.upfronthosting.co.za> Iuliia Proskurnia added the comment: Version with --patch to modify Lib/html/entities.py automatically ---------- nosy: +iuliia.proskurnia Added file: http://bugs.python.org/file27676/issue16245-3.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16245> _______________________________________ From report at bugs.python.org Tue Oct 23 14:13:24 2012 From: report at bugs.python.org (Jyrki Pulliainen) Date: Tue, 23 Oct 2012 12:13:24 +0000 Subject: [issue9351] argparse set_defaults on subcommands should override top level set_defaults In-Reply-To: <1279894012.43.0.0678646409.issue9351@psf.upfronthosting.co.za> Message-ID: <1350994404.19.0.295651242169.issue9351@psf.upfronthosting.co.za> Jyrki Pulliainen added the comment: I've attached a proposed fix where the subparser parses to an empty namespace and that namespace is then merged with the parent namespace ---------- keywords: +patch nosy: +nailor, petri.lehtinen Added file: http://bugs.python.org/file27677/issue9351.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9351> _______________________________________ From report at bugs.python.org Tue Oct 23 14:21:48 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 23 Oct 2012 12:21:48 +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: <1350994908.79.0.035174039327.issue11175@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Lucas: You only added tests for the repr, you should probably test the actual new functionality, too. ---------- nosy: +petri.lehtinen stage: needs patch -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11175> _______________________________________ From report at bugs.python.org Tue Oct 23 14:26:04 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Oct 2012 12:26:04 +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: <1350995164.64.0.775935404701.issue16304@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The documentation is okay. :func:`match` returns a Match object (which have a boolean value of True) if match and None (which have a boolean value of False) if doesn't match. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16304> _______________________________________ From report at bugs.python.org Tue Oct 23 14:40:54 2012 From: report at bugs.python.org (Kimmo Mustonen) Date: Tue, 23 Oct 2012 12:40:54 +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: <1350996054.99.0.692202926278.issue2005@psf.upfronthosting.co.za> Kimmo Mustonen added the comment: Tried to fix uid/gid issues but I didn't have a system with uid/gid larger than long so wasn't able to verify the fix. ---------- keywords: +patch nosy: +tzimmo Added file: http://bugs.python.org/file27678/issue2005_py3.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue2005> _______________________________________ From report at bugs.python.org Tue Oct 23 14:41:10 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 23 Oct 2012 12:41:10 +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: <1350996070.81.0.742101014814.issue16304@psf.upfronthosting.co.za> R. David Murray added the comment: Since the quoted paragraph is distant from where the information about the ``None`` return is documented, the wording of the quoted paragraph can be improved to make this clearer: Match Objects always have a boolean value of ``True``. Since ``None`` (which has a boolean value of ``False``) is returned when there is no match, you can test whether there was a match with a simple ``if`` statement. ---------- nosy: +r.david.murray versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16304> _______________________________________ From report at bugs.python.org Tue Oct 23 14:49:27 2012 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 23 Oct 2012 12:49:27 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 In-Reply-To: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> Message-ID: <1350996567.89.0.73549027805.issue16116@psf.upfronthosting.co.za> Vinay Sajip added the comment: Added fixes in my sandbox repo. Please verify. ---------- hgrepos: +155 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16116> _______________________________________ From report at bugs.python.org Tue Oct 23 14:50:59 2012 From: report at bugs.python.org (=?utf-8?q?Matti_M=C3=A4ki?=) Date: Tue, 23 Oct 2012 12:50:59 +0000 Subject: [issue14897] struct.pack raises unexpected error message In-Reply-To: <1337840519.45.0.558860957014.issue14897@psf.upfronthosting.co.za> Message-ID: <1350996659.51.0.476431105371.issue14897@psf.upfronthosting.co.za> Matti M?ki added the comment: Changed the error message as suggested by http://bugs.python.org/issue14897#msg161493 Also made similar change to struct.pack_into ---------- keywords: +patch nosy: +makimat Added file: http://bugs.python.org/file27679/issue14897.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14897> _______________________________________ From report at bugs.python.org Tue Oct 23 14:55:30 2012 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 23 Oct 2012 12:55:30 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 In-Reply-To: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> Message-ID: <1350996930.25.0.101839211875.issue16116@psf.upfronthosting.co.za> Changes by Vinay Sajip <vinay_sajip at yahoo.co.uk>: ---------- keywords: +patch Added file: http://bugs.python.org/file27680/c89378f64819.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16116> _______________________________________ From report at bugs.python.org Tue Oct 23 15:02:03 2012 From: report at bugs.python.org (Jyrki Pulliainen) Date: Tue, 23 Oct 2012 13:02:03 +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: <1350997323.24.0.947161392061.issue15132@psf.upfronthosting.co.za> Jyrki Pulliainen added the comment: Added a patch for passing everything of not type basestring to tuple constructor and assigns that to testnames. ---------- keywords: +patch nosy: +nailor Added file: http://bugs.python.org/file27681/issue15132_py2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15132> _______________________________________ From report at bugs.python.org Tue Oct 23 15:03:57 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Oct 2012 13:03:57 +0000 Subject: [issue16301] localhost() and thishost() in urllib/request.py In-Reply-To: <1350919745.8.0.0839924289599.issue16301@psf.upfronthosting.co.za> Message-ID: <1350997437.56.0.00880107741186.issue16301@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > + tmp_fileurl = 'file://localhost' + tmp_file tmp_fileurl = 'file://localhost/' + tmp_file.replace(os.path.sep, '/') ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16301> _______________________________________ From report at bugs.python.org Tue Oct 23 15:04:44 2012 From: report at bugs.python.org (Jyrki Pulliainen) Date: Tue, 23 Oct 2012 13:04:44 +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: <1350997484.95.0.839227963066.issue15132@psf.upfronthosting.co.za> Changes by Jyrki Pulliainen <jyrki at dywypi.org>: Added file: http://bugs.python.org/file27682/issue15132_py3.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15132> _______________________________________ From report at bugs.python.org Tue Oct 23 15:11:50 2012 From: report at bugs.python.org (Lucas Maystre) Date: Tue, 23 Oct 2012 13:11:50 +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: <1350997910.51.0.376116241963.issue11175@psf.upfronthosting.co.za> Lucas Maystre added the comment: OK, as discussed offline with Petri I'll put some tests to ensure that open() is called the right way (using unittest.mock.patch). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11175> _______________________________________ From report at bugs.python.org Tue Oct 23 15:17:24 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Tue, 23 Oct 2012 13:17:24 +0000 Subject: [issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior In-Reply-To: <1322574123.12.0.756700598965.issue13498@psf.upfronthosting.co.za> Message-ID: <1350998244.91.0.70515431488.issue13498@psf.upfronthosting.co.za> Hynek Schlawack added the comment: As announced, I hereby present an idea how to solve this problem for 3.4. Please have a look at it. :) ---------- assignee: docs at python -> versions: -Python 3.2, Python 3.3 Added file: http://bugs.python.org/file27683/makedirs-on_wrong_mode-1.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13498> _______________________________________ From report at bugs.python.org Tue Oct 23 15:20:22 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 23 Oct 2012 13:20:22 +0000 Subject: [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <3XmFZs4g0BzR3w@mail.python.org> Roundup Robot added the comment: New changeset 957a6c00d3af by Andrew Svetlov in branch '3.3': Issue #16241: document -X faulthandler command line option. http://hg.python.org/cpython/rev/957a6c00d3af New changeset 665e3be40ad1 by Andrew Svetlov in branch 'default': Issue #16241: document -X faulthandler command line option. http://hg.python.org/cpython/rev/665e3be40ad1 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16241> _______________________________________ From report at bugs.python.org Tue Oct 23 15:23:22 2012 From: report at bugs.python.org (Heikki Partanen) Date: Tue, 23 Oct 2012 13:23:22 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1350998602.44.0.846407549047.issue8913@psf.upfronthosting.co.za> Heikki Partanen added the comment: Added documentation for __format__ for datetime, time and date, and also added example code for using string.format. Seemed to merge cleanly to 3.4 and 2.7. ---------- keywords: +patch nosy: +heikki.partanen Added file: http://bugs.python.org/file27684/issue8913.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8913> _______________________________________ From report at bugs.python.org Tue Oct 23 15:29:13 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 23 Oct 2012 13:29:13 +0000 Subject: [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <1350998953.38.0.306785341841.issue16241@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Looks good to me, committed. Thanks, Marek. Please, fill PSF Contributor Agreement: http://www.python.org/psf/contrib/ ---------- nosy: +asvetlov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16241> _______________________________________ From report at bugs.python.org Tue Oct 23 15:29:41 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 23 Oct 2012 13:29:41 +0000 Subject: [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <1350998981.1.0.121070173413.issue16241@psf.upfronthosting.co.za> Changes by Andrew Svetlov <andrew.svetlov at gmail.com>: ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16241> _______________________________________ From report at bugs.python.org Tue Oct 23 15:33:40 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 23 Oct 2012 13:33:40 +0000 Subject: [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <1350999220.46.0.0432908734188.issue16241@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Andew: Shouldn't Misc/NEWS be updated, too? ---------- nosy: +petri.lehtinen _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16241> _______________________________________ From report at bugs.python.org Tue Oct 23 15:37:09 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 23 Oct 2012 13:37:09 +0000 Subject: [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <1350999429.12.0.762431994739.issue16241@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Do you think so? It was documenting already existed feature. But, if you really want I can do it of course. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16241> _______________________________________ From report at bugs.python.org Tue Oct 23 15:46:42 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 23 Oct 2012 13:46:42 +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: <3XmG9F6P1JzRBc@mail.python.org> Roundup Robot added the comment: New changeset dd8b969d7459 by Ezio Melotti in branch 'default': #16245: add a script to generate the html.entities.html5 dict. http://hg.python.org/cpython/rev/dd8b969d7459 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16245> _______________________________________ From report at bugs.python.org Tue Oct 23 15:54:36 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 23 Oct 2012 13:54:36 +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: <3XmGLM4bRMzRC6@mail.python.org> Roundup Robot added the comment: New changeset 1eb1c6942ac8 by Ezio Melotti in branch '3.3': #16245: Fix the value of a few entities in html.entities.html5. http://hg.python.org/cpython/rev/1eb1c6942ac8 New changeset 70fab10cd542 by Ezio Melotti in branch 'default': #16245: merge with 3.3. http://hg.python.org/cpython/rev/70fab10cd542 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16245> _______________________________________ From report at bugs.python.org Tue Oct 23 17:20:13 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 23 Oct 2012 15:20:13 +0000 Subject: [issue10836] urllib.request.urlretrieve calls URLError with 3 args In-Reply-To: <1350986292.48.0.0922249181086.issue10836@psf.upfronthosting.co.za> Message-ID: <CAPOVWORRAhe48nKgJ12ed_4u2vjT3UD2+sOgmgqQeF_0oPD82Q@mail.gmail.com> Senthil Kumaran added the comment: Nope, I have backport it to other versions. I shall close it then. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10836> _______________________________________ From report at bugs.python.org Tue Oct 23 17:45:43 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 23 Oct 2012 15:45:43 +0000 Subject: [issue16299] __build__ as a temp build directory for setup.py In-Reply-To: <1350914321.82.0.675095841484.issue16299@psf.upfronthosting.co.za> Message-ID: <1351007143.18.0.322480354787.issue16299@psf.upfronthosting.co.za> Changes by ?ric Araujo <merwok at netwok.org>: ---------- stage: -> committed/rejected _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16299> _______________________________________ From report at bugs.python.org Tue Oct 23 17:46:36 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 23 Oct 2012 15:46:36 +0000 Subject: [issue16299] __build__ as a temp build directory for setup.py In-Reply-To: <1350914321.82.0.675095841484.issue16299@psf.upfronthosting.co.za> Message-ID: <1351007196.21.0.836505672162.issue16299@psf.upfronthosting.co.za> ?ric Araujo added the comment: Ronald Oussoren on the mailing list: If the name of the build directory bothers you you can change it by adding two lines to ~/.pydistutils.cfg: [build] build-base = __build__ Agreed, closing. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16299> _______________________________________ From report at bugs.python.org Tue Oct 23 18:05:39 2012 From: report at bugs.python.org (tb) Date: Tue, 23 Oct 2012 16:05:39 +0000 Subject: [issue16297] make csv.DictReader.__init__ use self.fieldnames In-Reply-To: <1350894449.05.0.527683107859.issue16297@psf.upfronthosting.co.za> Message-ID: <1351008339.42.0.26978129711.issue16297@psf.upfronthosting.co.za> tb added the comment: Okay, that makes my use case obsolete. Overwriting the getter method like this seems obvious ... Somehow this hasn't come to my mind. Sorry for bothering. From my point of view, we can close this issue. Or is there another use case? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16297> _______________________________________ From report at bugs.python.org Tue Oct 23 18:38:41 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 23 Oct 2012 16:38:41 +0000 Subject: [issue16301] localhost() and thishost() in urllib/request.py In-Reply-To: <1350997437.56.0.00880107741186.issue16301@psf.upfronthosting.co.za> Message-ID: <CAPOVWOQ9PMgq6RFUydo46QykmPKpr4mABLUK5aTfg73ikvBFkw@mail.gmail.com> Senthil Kumaran added the comment: > Serhiy Storchaka added the comment: > >> + tmp_fileurl = 'file://localhost' + tmp_file > > tmp_fileurl = 'file://localhost/' + tmp_file.replace(os.path.sep, '/') Ok, I realized the mistake. 'file://localhost' + tmpfile is getting expanded to 'file://localhostc:\something\..' Yeah, the final '/' missing was the problem. tmp_file.replace(...) is be better too, initial unwrap was encoding / and url2pathname to //. replacing path sep with '/' would be better. Thanks for the suggestion, Serhiy. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16301> _______________________________________ From report at bugs.python.org Tue Oct 23 18:39:36 2012 From: report at bugs.python.org (Masami HIRATA) Date: Tue, 23 Oct 2012 16:39:36 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 In-Reply-To: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> Message-ID: <1351010375.99.0.423258108917.issue16116@psf.upfronthosting.co.za> Masami HIRATA added the comment: I attached new log file. (generated with 3.3.0 + your patch) ---------- Added file: http://bugs.python.org/file27685/Python33_with_venv_3.txt _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16116> _______________________________________ From report at bugs.python.org Tue Oct 23 18:41:00 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 23 Oct 2012 16:41:00 +0000 Subject: [issue16300] Windows raises ValueError for file:///file/not/exists instead of URLError In-Reply-To: <1350915106.57.0.374555323258.issue16300@psf.upfronthosting.co.za> Message-ID: <3XmL2M6WgZzRCn@mail.python.org> Roundup Robot added the comment: New changeset 00e5e963b7d8 by Senthil Kumaran in branch 'default': Fix issue16300: addressing the buildbot failures on windows http://hg.python.org/cpython/rev/00e5e963b7d8 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16300> _______________________________________ From report at bugs.python.org Tue Oct 23 19:49:20 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 23 Oct 2012 17:49:20 +0000 Subject: [issue16301] localhost() and thishost() in urllib/request.py In-Reply-To: <1350919745.8.0.0839924289599.issue16301@psf.upfronthosting.co.za> Message-ID: <1351014560.51.0.328325754641.issue16301@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Buildbot still failing, but due to different reason. PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'c:\\users\\buildbot\\appdata\\local\\temp\\tmpwwvqao' http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/862/steps/test/logs/stdio fixing. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16301> _______________________________________ From report at bugs.python.org Tue Oct 23 20:06:18 2012 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 23 Oct 2012 18:06:18 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 In-Reply-To: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> Message-ID: <1351015578.54.0.549509977869.issue16116@psf.upfronthosting.co.za> Vinay Sajip added the comment: So you agree that it's working? The include path has the venv's include in it, and the c:\Python33\libs inclusion allows the linking to work. I'll commit the changes to 3.3, 3.4 and close the issue shortly. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16116> _______________________________________ From report at bugs.python.org Tue Oct 23 20:14:45 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 23 Oct 2012 18:14:45 +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: <1351016085.59.0.173066663848.issue15132@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks for the patch. - self.testNames = (self.defaultTest,) + if isinstance(self.defaultTest, str): + self.testNames = (self.defaultTest,) + else: + self.testNames = tuple(self.defaultTest) Is there any reason this is a tuple instead of a list? A list would be more flexible. In contrast, the _convert_names() function used in this line of code sets self.testNames to be a list of test names: self.testNames = _convert_names(args) (from http://hg.python.org/cpython/file/8576bf1c0302/Lib/unittest/main.py#l161 ) By the way, this can only go into Python 3.4 as it is an enhancement. ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15132> _______________________________________ From report at bugs.python.org Tue Oct 23 20:14:54 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 23 Oct 2012 18:14:54 +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: <3XmN6j5ftfzPS5@mail.python.org> Roundup Robot added the comment: New changeset fb80df16c4ff by Ezio Melotti in branch 'default': Add Misc/NEWS entry for dd8b969d7459/#16245. http://hg.python.org/cpython/rev/fb80df16c4ff ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16245> _______________________________________ From report at bugs.python.org Tue Oct 23 20:18:25 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Oct 2012 18:18:25 +0000 Subject: [issue6972] zipfile.ZipFile overwrites files outside destination path In-Reply-To: <1253657452.09.0.588869541997.issue6972@psf.upfronthosting.co.za> Message-ID: <1351016305.44.0.316230759151.issue6972@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: Removed file: http://bugs.python.org/file27665/zipfile_fix_arcname_2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6972> _______________________________________ From report at bugs.python.org Tue Oct 23 20:19:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Oct 2012 18:19:18 +0000 Subject: [issue6972] zipfile.ZipFile overwrites files outside destination path In-Reply-To: <1253657452.09.0.588869541997.issue6972@psf.upfronthosting.co.za> Message-ID: <1351016358.36.0.0477251876831.issue6972@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated. Fixed case '../C:/foo' on Windows. ---------- Added file: http://bugs.python.org/file27686/zipfile_fix_arcname_3.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6972> _______________________________________ From report at bugs.python.org Tue Oct 23 20:22:35 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 23 Oct 2012 18:22:35 +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: <1351016555.97.0.0261851032182.issue16245@psf.upfronthosting.co.za> Ezio Melotti added the comment: I now committed an improved version of the script (thanks Iuliia!) and updated the html.entities.html5 dictionary accordingly. I'm leaving this open because we will have to check if the dictionary is still updated before the release of Python 3.4. ---------- components: +Library (Lib) stage: patch review -> committed/rejected _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16245> _______________________________________ From report at bugs.python.org Tue Oct 23 20:53:57 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 23 Oct 2012 18:53:57 +0000 Subject: [issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings In-Reply-To: <1347321295.19.0.66061447718.issue15916@psf.upfronthosting.co.za> Message-ID: <1351018437.36.0.0664210400945.issue15916@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Hmm. This patch still raises the "has no docstrings" ValueError if "not tests" is True. And because the patch changes the default DocTestFinder, it's possible that the patch changes behavior in non-error use cases. Why not just return an empty TestSuite if not tests is True? IIRC, this was the conclusion of the issue 14649 discussion. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15916> _______________________________________ From report at bugs.python.org Tue Oct 23 21:00:58 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Oct 2012 19:00:58 +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: <1351018858.56.0.557600380184.issue2005@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: uid_t and gid_t converters can not be just typedefs. uid_t and gid_t can be unsigned integral types (but including -1). Also should be fixed Modules/grpmodule.c, Modules/pwdmodule.c and Modules/signalmodule.c. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue2005> _______________________________________ From report at bugs.python.org Tue Oct 23 21:23:07 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 23 Oct 2012 19:23:07 +0000 Subject: [issue16297] make csv.DictReader.__init__ use self.fieldnames In-Reply-To: <1350894449.05.0.527683107859.issue16297@psf.upfronthosting.co.za> Message-ID: <1351020187.21.0.473667332988.issue16297@psf.upfronthosting.co.za> R. David Murray added the comment: It does seem more logical to implement this in the getter, now that Serhiy has pointed it out :) So let's close this. (Aside: if it were me, I'd move the mangling of the fieldnames into the ListInsensitive __init__ method.) ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16297> _______________________________________ From report at bugs.python.org Tue Oct 23 21:27:55 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 23 Oct 2012 19:27:55 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 In-Reply-To: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> Message-ID: <3XmPky4Fr0zR96@mail.python.org> Roundup Robot added the comment: New changeset 43f537339107 by Vinay Sajip in branch '3.3': Issue #16116: Now uses corrected include and library paths when building C extensions in a venv. http://hg.python.org/cpython/rev/43f537339107 New changeset 5e9f656c3d67 by Vinay Sajip in branch 'default': Closes #16116: Merged fix from 3.3. http://hg.python.org/cpython/rev/5e9f656c3d67 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16116> _______________________________________ From report at bugs.python.org Tue Oct 23 22:11:48 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Oct 2012 20:11:48 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 In-Reply-To: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> Message-ID: <1351023108.82.0.831093977632.issue16116@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: >+- Issue #16116: Fix include and library paths to be correctwhen building C Spaces. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16116> _______________________________________ From report at bugs.python.org Tue Oct 23 22:27:18 2012 From: report at bugs.python.org (=?utf-8?q?Marek_=C5=A0uppa?=) Date: Tue, 23 Oct 2012 20:27:18 +0000 Subject: [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <1351024038.82.0.389002364679.issue16241@psf.upfronthosting.co.za> Marek ?uppa added the comment: I already filled and signed the PSF Contributor Agreement thanks to Petri at the PyCon Finland sprint. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16241> _______________________________________ From report at bugs.python.org Tue Oct 23 22:35:39 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 23 Oct 2012 20:35:39 +0000 Subject: [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <1351024539.21.0.654256136772.issue16241@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Thank you, Marek ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16241> _______________________________________ From report at bugs.python.org Tue Oct 23 23:42:51 2012 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 23 Oct 2012 21:42:51 +0000 Subject: [issue9556] Specifying the time a TimedRotatingFileHandler rotates In-Reply-To: <1281441457.15.0.524451784963.issue9556@psf.upfronthosting.co.za> Message-ID: <1351028571.16.0.394173060014.issue9556@psf.upfronthosting.co.za> Vinay Sajip added the comment: Thanks for the patch. I've added the weekly test and the documentation update, can you take a look? ---------- hgrepos: +156 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9556> _______________________________________ From report at bugs.python.org Tue Oct 23 23:43:13 2012 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 23 Oct 2012 21:43:13 +0000 Subject: [issue9556] Specifying the time a TimedRotatingFileHandler rotates In-Reply-To: <1281441457.15.0.524451784963.issue9556@psf.upfronthosting.co.za> Message-ID: <1351028593.44.0.902491434453.issue9556@psf.upfronthosting.co.za> Changes by Vinay Sajip <vinay_sajip at yahoo.co.uk>: ---------- keywords: +patch Added file: http://bugs.python.org/file27687/7b2c68a00118.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9556> _______________________________________ From report at bugs.python.org Tue Oct 23 23:46:05 2012 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 23 Oct 2012 21:46:05 +0000 Subject: [issue9556] Specifying the time a TimedRotatingFileHandler rotates In-Reply-To: <1281441457.15.0.524451784963.issue9556@psf.upfronthosting.co.za> Message-ID: <1351028765.91.0.069197435147.issue9556@psf.upfronthosting.co.za> Changes by Vinay Sajip <vinay_sajip at yahoo.co.uk>: ---------- stage: needs patch -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9556> _______________________________________ From report at bugs.python.org Wed Oct 24 00:14:48 2012 From: report at bugs.python.org (Sam Breese) Date: Tue, 23 Oct 2012 22:14:48 +0000 Subject: [issue16142] ArgumentParser inconsistent with parse_known_args In-Reply-To: <1349448801.58.0.783623579173.issue16142@psf.upfronthosting.co.za> Message-ID: <1351030488.3.0.328047086047.issue16142@psf.upfronthosting.co.za> Sam Breese added the comment: Make that a few days. I fixed the case where the known arg is first, but not the other one. Will get to it soon, hopefully. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16142> _______________________________________ From report at bugs.python.org Wed Oct 24 00:23:26 2012 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 23 Oct 2012 22:23: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: <1351031006.09.0.64673012961.issue16304@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I don't think the relevant information -- that re match and search return None in the case of no match -- is that distant from the paragraph quoted. This fact is already mentioned FOUR times in the page, in each of the re.match, re.search functions and regex.match, regex.search methods, plus implied by the helper function used in the examples. Personally I think no change is required, but if the docs are going to be changed, I recommend going all the way and showing the usual re idiom with an example: Match Objects always have a boolean value of ``True``. Since ``None`` (which has a boolean value of ``False``) is returned when there is no match, you can test whether there was a match with a simple ``if`` statement. For example:: mo = re.search(pattern, string) if mo: process(mo) ---------- nosy: +stevenjd _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16304> _______________________________________ From report at bugs.python.org Wed Oct 24 00:27:38 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 23 Oct 2012 22:27:38 +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: <1351031258.11.0.794927648904.issue16304@psf.upfronthosting.co.za> R. David Murray added the comment: Yeah, distant was a poor choice of words. The issue really comes up if you happen to start reading with that section (say when revisiting the docs with an imperfect memory of what you read before). So, I agree that no change is *required*. But adding the example of "the usual idiom" as you suggest seems like it might be worthwhile. I'm fine with either course of action (or inaction, as the case may be). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16304> _______________________________________ From report at bugs.python.org Wed Oct 24 00:33:28 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 23 Oct 2012 22:33:28 +0000 Subject: [issue16305] possible segfault in math.factorial Message-ID: <1351031608.7.0.419151487248.issue16305@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc: >>> import math, sys >>> math.factorial(sys.maxsize - 1) (Hit Ctrl-C) Segmentation fault The cause is probably in mathmodule.c::factorial_odd_part(): error: Py_DECREF(outer); done: Py_DECREF(inner); return outer; In case of error, the function returns a released reference instead of NULL. ---------- messages: 173643 nosy: amaury.forgeotdarc priority: normal severity: normal status: open title: possible segfault in math.factorial type: crash versions: Python 3.2, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16305> _______________________________________ From report at bugs.python.org Wed Oct 24 00:33:49 2012 From: report at bugs.python.org (Hieu Nguyen) Date: Tue, 23 Oct 2012 22:33:49 +0000 Subject: [issue12886] datetime.strptime parses input wrong In-Reply-To: <1314974007.55.0.285568781981.issue12886@psf.upfronthosting.co.za> Message-ID: <1351031629.62.0.219017793524.issue12886@psf.upfronthosting.co.za> Hieu Nguyen added the comment: Attached another patch for clearer test cases against this fix (as suggested from Ezio). ---------- Added file: http://bugs.python.org/file27688/issue12886.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12886> _______________________________________ From report at bugs.python.org Wed Oct 24 00:40:29 2012 From: report at bugs.python.org (Masami HIRATA) Date: Tue, 23 Oct 2012 22:40:29 +0000 Subject: [issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32 In-Reply-To: <1349255348.78.0.798397625136.issue16116@psf.upfronthosting.co.za> Message-ID: <1351032029.45.0.247595395147.issue16116@psf.upfronthosting.co.za> Masami HIRATA added the comment: > So you agree that it's working? Yes, the patch works correctly. Thank you! ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16116> _______________________________________ From report at bugs.python.org Wed Oct 24 01:09:02 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 23 Oct 2012 23:09:02 +0000 Subject: [issue16305] possible segfault in math.factorial In-Reply-To: <1351031608.7.0.419151487248.issue16305@psf.upfronthosting.co.za> Message-ID: <1351033742.23.0.838592868078.issue16305@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: ---------- nosy: +mark.dickinson, rhettinger _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16305> _______________________________________ From report at bugs.python.org Wed Oct 24 01:39:13 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 23 Oct 2012 23:39:13 +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: <1351035553.74.0.946507060844.issue8713@psf.upfronthosting.co.za> Antoine Pitrou added the comment: A use case for not using fork() is when your parent process opens some system resources of some sort (for example a listening TCP socket). The child will then inherit those resources, which can have all kinds of unforeseen and troublesome consequences (for example that listening TCP socket will be left open in the child when it is closed in the parent, and so trying to bind() to the same port again will fail). Generally, I think having an option for zero-sharing spawning of processes would help code quality. ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8713> _______________________________________ From report at bugs.python.org Wed Oct 24 01:40:56 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 23 Oct 2012 23:40:56 +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: <1351035656.22.0.630767457412.issue8713@psf.upfronthosting.co.za> Antoine Pitrou added the comment: By the way, instead of doing fork() + exec() in pure Python, you probably want to use _posixsubprocess.fork_exec(). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8713> _______________________________________ From report at bugs.python.org Wed Oct 24 01:44:05 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Oct 2012 23:44:05 +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: <1351035845.26.0.13455084617.issue8713@psf.upfronthosting.co.za> Christian Heimes added the comment: +1 I still have to use parallel python (pp) in our application stack because the fork() approach causes a lot of strange issues in our application. It might be the punishment for embedding a Java runtime env into a Python process, too. :) ---------- nosy: +christian.heimes _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8713> _______________________________________ From report at bugs.python.org Wed Oct 24 01:47:11 2012 From: report at bugs.python.org (=?utf-8?q?Thi=C3=A9baud_Weksteen?=) Date: Tue, 23 Oct 2012 23:47:11 +0000 Subject: [issue16306] Multiple error line for unknown command line parameter Message-ID: <1351036031.44.0.0447945169816.issue16306@psf.upfronthosting.co.za> New submission from Thi?baud Weksteen: Hi, I've just came across an insignificant bug in the Python command line interface. When using an unknown parameter, the same error appears more than once: $ python3 -a -z Unknown option: -a Unknown option: -z Unknown option: -a usage: python3 [option] ... [-c cmd | -m mod | file | -] [arg] ... Try `python -h' for more information. $ python -a -z Unknown option: -a Unknown option: -z Unknown option: -a usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ... Try `python -h' for more information. ---------- components: None messages: 173649 nosy: tweksteen priority: normal severity: normal status: open title: Multiple error line for unknown command line parameter type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16306> _______________________________________ From report at bugs.python.org Wed Oct 24 02:36:25 2012 From: report at bugs.python.org (Roger Serwy) Date: Wed, 24 Oct 2012 00:36:25 +0000 Subject: [issue9890] Visual C++ Runtime Library Error is there a fix? In-Reply-To: <1284774877.07.0.1280459876.issue9890@psf.upfronthosting.co.za> Message-ID: <1351038985.27.0.296750943571.issue9890@psf.upfronthosting.co.za> Roger Serwy added the comment: I'm closing this issue as a duplicate of #11288. ---------- resolution: -> duplicate status: open -> closed superseder: -> Python installed from MSI doesn't work _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9890> _______________________________________ From report at bugs.python.org Wed Oct 24 03:09:00 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 24 Oct 2012 01:09:00 +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: <1351040940.71.0.407721227578.issue16306@psf.upfronthosting.co.za> Changes by R. David Murray <rdmurray at bitdance.com>: ---------- components: +Interpreter Core -None keywords: +easy versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16306> _______________________________________ From report at bugs.python.org Wed Oct 24 03:10:26 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 24 Oct 2012 01:10:26 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1351041026.77.0.390156334177.issue8913@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks! Reviewed. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8913> _______________________________________ From report at bugs.python.org Wed Oct 24 08:21:14 2012 From: report at bugs.python.org (=?utf-8?q?Matti_M=C3=A4ki?=) Date: Wed, 24 Oct 2012 06:21:14 +0000 Subject: [issue14897] struct.pack raises unexpected error message In-Reply-To: <1337840519.45.0.558860957014.issue14897@psf.upfronthosting.co.za> Message-ID: <1351059674.51.0.401754813774.issue14897@psf.upfronthosting.co.za> Matti M?ki added the comment: A second try, now taking into account buffer and offset params in pack_into. ---------- Added file: http://bugs.python.org/file27689/issue14897-2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14897> _______________________________________ From report at bugs.python.org Wed Oct 24 09:14:12 2012 From: report at bugs.python.org (Bbb) Date: Wed, 24 Oct 2012 07:14:12 +0000 Subject: [issue16307] multiprocess.pool.map_async callables not working Message-ID: <1351062852.0.0.92760767978.issue16307@psf.upfronthosting.co.za> New submission from Bbb: When using map_async() my callbacks don't get called back. When using apply_async() they do get called. CODE: from multiprocessing import Pool,TimeoutError from time import sleep servers=["s1","s2","s3","s4","s5","s6"] blah = "no callback" def f(x): print("start f(" + x + ")") sleep(5) print("end f(" + x + ")") return "did " + x def mycallback(x): global blah blah = "called back" print("My callback " + str(x)) def myerrorcallback(r): print("My errorcallback " + str(r)) if __name__ == '__main__': pool = Pool(processes=7) results = pool.map_async(f, servers, callback=mycallback, error_callback=myerrorcallback) print(results.get(timeout=11)) pool.close() pool.join() print(blah) OUTPUT: D:\python>f.py start f(s1) start f(s2) start f(s3) start f(s4) start f(s6) start f(s5) end f(s1) end f(s2) end f(s3) end f(s4) end f(s5) end f(s6) ['did s1', 'did s2', 'did s3', 'did s4', 'did s5', 'did s6'] no callback ...whereas replacing the code with this: with Pool(processes=7) as pool: # start 4 worker processes for server in servers: r = pool.apply_async(f, (server,), callback=mycallback, error_callback=myerrorcallback) pool.close() pool.join() print (blah) GIVES: D:\python\f2.py start f(s1) start f(s2) start f(s3) start f(s4) start f(s5) start f(s6) end f(s2) end f(s1) My callback did s2 My callback did s1 end f(s4) My callback did s4 end f(s3) My callback did s3 end f(s5) My callback did s5 end f(s6) My callback did s6 called back This is v3.3 on Windows XP. ---------- components: Library (Lib) messages: 173653 nosy: Bbb priority: normal severity: normal status: open title: multiprocess.pool.map_async callables not working type: behavior versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16307> _______________________________________ From report at bugs.python.org Wed Oct 24 09:58:06 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 24 Oct 2012 07:58:06 +0000 Subject: [issue16305] possible segfault in math.factorial In-Reply-To: <1351031608.7.0.419151487248.issue16305@psf.upfronthosting.co.za> Message-ID: <1351065486.53.0.724490405597.issue16305@psf.upfronthosting.co.za> Mark Dickinson added the comment: I can reproduce this on 3.2 (OS X). I'll take a look tonight. ---------- assignee: -> mark.dickinson components: +Extension Modules priority: normal -> high stage: -> needs patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16305> _______________________________________ From report at bugs.python.org Wed Oct 24 09:58:42 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 24 Oct 2012 07:58:42 +0000 Subject: [issue16305] possible segfault in math.factorial In-Reply-To: <1351031608.7.0.419151487248.issue16305@psf.upfronthosting.co.za> Message-ID: <1351065522.11.0.981065965888.issue16305@psf.upfronthosting.co.za> Changes by Mark Dickinson <dickinsm at gmail.com>: ---------- versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16305> _______________________________________ From report at bugs.python.org Wed Oct 24 10:14:48 2012 From: report at bugs.python.org (Janne Karila) Date: Wed, 24 Oct 2012 08:14:48 +0000 Subject: [issue16307] multiprocess.pool.map_async callables not working In-Reply-To: <1351062852.0.0.92760767978.issue16307@psf.upfronthosting.co.za> Message-ID: <1351066488.98.0.670922072018.issue16307@psf.upfronthosting.co.za> Janne Karila added the comment: Indeed, the current implementation map_async simply ignores the callback arguments: def map_async(self, func, iterable, chunksize=None, callback=None, error_callback=None): ''' Asynchronous version of `map()` method. ''' return self._map_async(func, iterable, mapstar, chunksize) ---------- nosy: +Janne.Karila _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16307> _______________________________________ From report at bugs.python.org Wed Oct 24 10:34:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 08:34:18 +0000 Subject: [issue14897] struct.pack raises unexpected error message In-Reply-To: <1337840519.45.0.558860957014.issue14897@psf.upfronthosting.co.za> Message-ID: <1351067658.69.0.178063598722.issue14897@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- components: +Extension Modules stage: -> commit review versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14897> _______________________________________ From report at bugs.python.org Wed Oct 24 10:54:36 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 08:54:36 +0000 Subject: [issue10182] match_start truncates large values In-Reply-To: <1287859071.54.0.617398147143.issue10182@psf.upfronthosting.co.za> Message-ID: <1351068876.71.0.679569073633.issue10182@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: needs patch -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10182> _______________________________________ From report at bugs.python.org Wed Oct 24 10:55:19 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 08:55:19 +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: <1351068919.44.0.0984396393464.issue2005@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> needs patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue2005> _______________________________________ From report at bugs.python.org Wed Oct 24 10:55:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 08:55:44 +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: <1351068944.69.0.67572319014.issue2005@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue2005> _______________________________________ From report at bugs.python.org Wed Oct 24 10:56:25 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 08:56:25 +0000 Subject: [issue6972] zipfile.ZipFile overwrites files outside destination path In-Reply-To: <1253657452.09.0.588869541997.issue6972@psf.upfronthosting.co.za> Message-ID: <1351068985.37.0.0407972920013.issue6972@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6972> _______________________________________ From report at bugs.python.org Wed Oct 24 10:57:07 2012 From: report at bugs.python.org (Janne Karila) Date: Wed, 24 Oct 2012 08:57:07 +0000 Subject: [issue16307] multiprocess.pool.map_async callables not working In-Reply-To: <1351062852.0.0.92760767978.issue16307@psf.upfronthosting.co.za> Message-ID: <1351069027.83.0.414387594227.issue16307@psf.upfronthosting.co.za> Janne Karila added the comment: Here's a patch that adds the missing arguments to the call to _map_async. The bug seems to originate from enhancement #12708 that added starmap_async to 3.3. ---------- keywords: +patch Added file: http://bugs.python.org/file27690/callback.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16307> _______________________________________ From report at bugs.python.org Wed Oct 24 10:58:24 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 08:58:24 +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: <1351069104.77.0.586742807449.issue16053@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: needs patch -> commit review type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16053> _______________________________________ From report at bugs.python.org Wed Oct 24 10:58:57 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 08:58:57 +0000 Subject: [issue16102] uuid._netbios_getnode() is outdated In-Reply-To: <1349112809.97.0.499056156586.issue16102@psf.upfronthosting.co.za> Message-ID: <1351069137.0.0.410654866637.issue16102@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- keywords: +needs review stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16102> _______________________________________ From report at bugs.python.org Wed Oct 24 10:59:29 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 08:59:29 +0000 Subject: [issue16228] JSON crashes during encoding resized lists In-Reply-To: <1350208578.8.0.440875886805.issue16228@psf.upfronthosting.co.za> Message-ID: <1351069169.54.0.210140993846.issue16228@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16228> _______________________________________ From report at bugs.python.org Wed Oct 24 10:59:46 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 08:59:46 +0000 Subject: [issue16230] select.select crashes on resized lists In-Reply-To: <1350211036.55.0.523850963705.issue16230@psf.upfronthosting.co.za> Message-ID: <1351069186.72.0.59074544671.issue16230@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16230> _______________________________________ From report at bugs.python.org Wed Oct 24 11:02:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:02:12 +0000 Subject: [issue14625] Faster utf-32 decoder In-Reply-To: <1334869197.32.0.159275934867.issue14625@psf.upfronthosting.co.za> Message-ID: <1351069332.87.0.105716024615.issue14625@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14625> _______________________________________ From report at bugs.python.org Wed Oct 24 11:02:24 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:02:24 +0000 Subject: [issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16) Message-ID: <1351069344.82.0.612991330894.issue1470548@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1470548> _______________________________________ From report at bugs.python.org Wed Oct 24 11:02:58 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:02:58 +0000 Subject: [issue15027] Faster UTF-32 encoding In-Reply-To: <1339077451.46.0.686170991807.issue15027@psf.upfronthosting.co.za> Message-ID: <1351069378.56.0.558016122493.issue15027@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15027> _______________________________________ From report at bugs.python.org Wed Oct 24 11:04:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:04:16 +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: <1351069456.05.0.22484037891.issue15872@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> needs patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15872> _______________________________________ From report at bugs.python.org Wed Oct 24 11:04:56 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:04:56 +0000 Subject: [issue15989] Possible integer overflow of PyLong_AsLong() results In-Reply-To: <1348167705.87.0.588220983695.issue15989@psf.upfronthosting.co.za> Message-ID: <1351069496.55.0.189099328068.issue15989@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15989> _______________________________________ From report at bugs.python.org Wed Oct 24 11:05:58 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:05:58 +0000 Subject: [issue14850] The inconsistency of codecs.charmap_decode In-Reply-To: <1337352396.54.0.468921009595.issue14850@psf.upfronthosting.co.za> Message-ID: <1351069558.23.0.779848980724.issue14850@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14850> _______________________________________ From report at bugs.python.org Wed Oct 24 11:08:41 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 24 Oct 2012 09:08:41 +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: <1351069721.43.0.658737678011.issue16255@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Chris, agree with you. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16255> _______________________________________ From report at bugs.python.org Wed Oct 24 11:10:52 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:10:52 +0000 Subject: [issue15379] Charmap decoding of no-BMP characters In-Reply-To: <1342512958.35.0.341191772548.issue15379@psf.upfronthosting.co.za> Message-ID: <1351069852.01.0.480409570799.issue15379@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: committed/rejected -> commit review versions: -Python 3.2, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15379> _______________________________________ From report at bugs.python.org Wed Oct 24 11:15:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:15:18 +0000 Subject: [issue13617] Reject embedded null characters in wchar* strings In-Reply-To: <1324094022.4.0.746327138354.issue13617@psf.upfronthosting.co.za> Message-ID: <1351070118.79.0.701483860752.issue13617@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> needs patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13617> _______________________________________ From report at bugs.python.org Wed Oct 24 11:18:14 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:18:14 +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: <1351070294.43.0.757106331741.issue13572@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- status: open -> pending _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13572> _______________________________________ From report at bugs.python.org Wed Oct 24 11:20:54 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:20:54 +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: <1351070454.55.0.972979536205.issue9290@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9290> _______________________________________ From report at bugs.python.org Wed Oct 24 11:22:33 2012 From: report at bugs.python.org (telmich) Date: Wed, 24 Oct 2012 09:22:33 +0000 Subject: [issue16308] Undocumented (?) behaviour change in argparse from 3.2.3 to 3.3.0 Message-ID: <1351070553.1.0.217274613803.issue16308@psf.upfronthosting.co.za> New submission from telmich: Using argparse with subparsers, the default behaviour if no subparser was selected, was to print help: cdist% git describe 2.0.14-59-g5315c41 cdist% ./bin/cdist usage: cdist [-h] [-d] [-v] [-V] {banner,config} ... cdist: error: too few arguments cdist% python3 -V Python 3.2.3 With python 3.3.0, this changed and thus the so far uncalled code block is executed: cdist% ./bin/cdist Traceback (most recent call last): File "./bin/cdist", line 237, in <module> commandline() File "./bin/cdist", line 104, in commandline args.func(args) AttributeError: 'Namespace' object has no attribute 'func' cdist% git describe 2.0.14-59-g5315c41 cdist% python3 -V Python 3.3.0 Question: What is the correct way now to abort, if no subparser or no option was given (i.e. restore the previous behaviour)? I tried to fix this problem by using parser['main'].set_defaults(func=commandline_main) to setup a default handler for main, but this overwrites the func= parameter for all subparsers as well and thus renders this possibility useless (commits b7a8a84 and 840dbc5 in cdist). The source code for cdist using the subparsers is available at http://git.schottelius.org/?p=cdist ---------- components: Library (Lib) messages: 173659 nosy: telmich priority: normal severity: normal status: open title: Undocumented (?) behaviour change in argparse from 3.2.3 to 3.3.0 versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16308> _______________________________________ From report at bugs.python.org Wed Oct 24 11:23:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:23:08 +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: <1351070588.98.0.922446983889.issue16240@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> needs patch type: behavior -> enhancement _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16240> _______________________________________ From report at bugs.python.org Wed Oct 24 11:25:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:25:12 +0000 Subject: [issue1776674] glob.glob inconsistent Message-ID: <1351070712.33.0.162430208033.issue1776674@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: test needed -> needs patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1776674> _______________________________________ From report at bugs.python.org Wed Oct 24 11:28:10 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:28:10 +0000 Subject: [issue16215] Possible double memory free in str.replace In-Reply-To: <1350081232.49.0.0151935995631.issue16215@psf.upfronthosting.co.za> Message-ID: <1351070890.77.0.461684990343.issue16215@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16215> _______________________________________ From report at bugs.python.org Wed Oct 24 11:28:31 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:28:31 +0000 Subject: [issue16216] Arithmetic operations with NULL In-Reply-To: <1350081908.35.0.947627906901.issue16216@psf.upfronthosting.co.za> Message-ID: <1351070911.42.0.185046988225.issue16216@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16216> _______________________________________ From report at bugs.python.org Wed Oct 24 11:29:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:29:03 +0000 Subject: [issue1634034] Show "expected" token on syntax error Message-ID: <1351070943.06.0.926638548845.issue1634034@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: test needed -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1634034> _______________________________________ From report at bugs.python.org Wed Oct 24 11:32:48 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:32:48 +0000 Subject: [issue15278] UnicodeDecodeError when readline in codecs.py In-Reply-To: <1341674319.29.0.269195397783.issue15278@psf.upfronthosting.co.za> Message-ID: <1351071168.52.0.742374311736.issue15278@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- keywords: +needs review stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15278> _______________________________________ From report at bugs.python.org Wed Oct 24 11:33:19 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:33:19 +0000 Subject: [issue16165] sched.scheduler.run() blocks scheduler In-Reply-To: <1349697924.22.0.927523590696.issue16165@psf.upfronthosting.co.za> Message-ID: <1351071199.82.0.132205523236.issue16165@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16165> _______________________________________ From report at bugs.python.org Wed Oct 24 11:34:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:34:07 +0000 Subject: [issue13451] sched.py: speedup cancel() method In-Reply-To: <1321923822.73.0.49972384361.issue13451@psf.upfronthosting.co.za> Message-ID: <1351071247.1.0.502244604657.issue13451@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13451> _______________________________________ From report at bugs.python.org Wed Oct 24 11:34:51 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:34:51 +0000 Subject: [issue14700] Integer overflow in classic string formatting In-Reply-To: <1335804926.58.0.135059540144.issue14700@psf.upfronthosting.co.za> Message-ID: <1351071291.57.0.0552731608767.issue14700@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Mark, can I help? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14700> _______________________________________ From report at bugs.python.org Wed Oct 24 11:38:56 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:38:56 +0000 Subject: [issue15999] Using new 'bool' format character In-Reply-To: <1348242429.94.0.662282558141.issue15999@psf.upfronthosting.co.za> Message-ID: <1351071536.46.0.498811701302.issue15999@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15999> _______________________________________ From report at bugs.python.org Wed Oct 24 11:39:47 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:39:47 +0000 Subject: [issue15984] Wrong documentation for PyUnicode_FromObject() In-Reply-To: <1348157907.35.0.947782583816.issue15984@psf.upfronthosting.co.za> Message-ID: <1351071587.99.0.739384105686.issue15984@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> needs patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15984> _______________________________________ From report at bugs.python.org Wed Oct 24 11:43:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:43:12 +0000 Subject: [issue15984] Wrong documentation for PyUnicode_FromObject() In-Reply-To: <1348157907.35.0.947782583816.issue15984@psf.upfronthosting.co.za> Message-ID: <1351071792.58.0.700581262276.issue15984@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a bug of 2 -> 3 transition. ---------- type: -> enhancement versions: +Python 3.2, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15984> _______________________________________ From report at bugs.python.org Wed Oct 24 11:43:35 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:43:35 +0000 Subject: [issue15436] __sizeof__ is not documented In-Reply-To: <1343073282.53.0.774447573036.issue15436@psf.upfronthosting.co.za> Message-ID: <1351071815.04.0.537873777495.issue15436@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> needs patch type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15436> _______________________________________ From report at bugs.python.org Wed Oct 24 11:45:17 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 09:45:17 +0000 Subject: [issue4997] xml.sax.saxutils.XMLGenerator should write to io.RawIOBase. In-Reply-To: <1232361357.86.0.976302026477.issue4997@psf.upfronthosting.co.za> Message-ID: <1351071917.9.0.182398514007.issue4997@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue4997> _______________________________________ From report at bugs.python.org Wed Oct 24 11:47:15 2012 From: report at bugs.python.org (=?utf-8?q?Marek_=C5=A0uppa?=) Date: Wed, 24 Oct 2012 09:47:15 +0000 Subject: [issue15948] Unchecked return value of I/O functions In-Reply-To: <1347722947.26.0.499070360065.issue15948@psf.upfronthosting.co.za> Message-ID: <1351072035.74.0.534695336238.issue15948@psf.upfronthosting.co.za> Marek ?uppa added the comment: Since there is probably a lot to work on here I'd also like to participate. I've got one question though. In case these function don't return 0 and the test fails what should happen then? What kind of error should be thrown for let's say fseek() ? ---------- nosy: +mrshu _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15948> _______________________________________ From report at bugs.python.org Wed Oct 24 11:55:38 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Oct 2012 09:55:38 +0000 Subject: [issue15948] Unchecked return value of I/O functions In-Reply-To: <1347722947.26.0.499070360065.issue15948@psf.upfronthosting.co.za> Message-ID: <1351072538.56.0.906300860721.issue15948@psf.upfronthosting.co.za> Christian Heimes added the comment: The functions should set an appropriate errno so it's PyErr_SetFromErrno(PyExc_IOError). You should use the PyErr_SetFromErrnoWithFilename*() variants when a file name (PyObject*, char*, unicode) is available. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15948> _______________________________________ From report at bugs.python.org Wed Oct 24 12:00:09 2012 From: report at bugs.python.org (=?utf-8?q?Marek_=C5=A0uppa?=) Date: Wed, 24 Oct 2012 10:00:09 +0000 Subject: [issue15948] Unchecked return value of I/O functions In-Reply-To: <1351072538.56.0.906300860721.issue15948@psf.upfronthosting.co.za> Message-ID: <783920b4-e739-4e86-91ed-de68cc6ce921@email.android.com> Marek ?uppa added the comment: Thanks for a quick response. Should we also test this somewhere? Christian Heimes <report at bugs.python.org> wrote: > >Christian Heimes added the comment: > >The functions should set an appropriate errno so it's >PyErr_SetFromErrno(PyExc_IOError). You should use the >PyErr_SetFromErrnoWithFilename*() variants when a file name (PyObject*, >char*, unicode) is available. > >---------- > >_______________________________________ >Python tracker <report at bugs.python.org> ><http://bugs.python.org/issue15948> >_______________________________________ Marek, http://marek.suppa.co ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15948> _______________________________________ From report at bugs.python.org Wed Oct 24 12:37:40 2012 From: report at bugs.python.org (Armin Rigo) Date: Wed, 24 Oct 2012 10:37:40 +0000 Subject: [issue16309] "PYTHONPATH=" different from no PYTHONPATH at all Message-ID: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za> New submission from Armin Rigo: On Posix, it is documented that setting PATH to the empty string is equivalent to not setting PATH at all, which is an exception to the rule that in a string like "/bin::/usr/bin" the empty string in the middle gets interpreted as ".". PYTHONPATH does not have this exception: an empty PYTHONPATH is interpreted as equivalent to ".". This difference is not documented. This is a detail, but a possible source of confusion, so I'm reporting it here. How to reproduce: file x/x.py: "import z" file z.py: "print(42)" The following two lines behave differently (Bash syntax): PYTHONPATH= python x/x.py unset PYTHONPATH && python x/x.py For comparison, if "./foo" is an executable, the following two lines behave identically (neither finds "./foo"): PATH= foo unset PATH && foo ---------- components: Interpreter Core keywords: easy messages: 173665 nosy: arigo priority: normal severity: normal status: open title: "PYTHONPATH=" different from no PYTHONPATH at all versions: Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16309> _______________________________________ From report at bugs.python.org Wed Oct 24 12:51:09 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 24 Oct 2012 10:51:09 +0000 Subject: [issue16305] possible segfault in math.factorial In-Reply-To: <1351031608.7.0.419151487248.issue16305@psf.upfronthosting.co.za> Message-ID: <1351075869.05.0.0627853641393.issue16305@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch. ---------- keywords: +patch stage: needs patch -> commit review Added file: http://bugs.python.org/file27691/fix_factorial_segfault.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16305> _______________________________________ From report at bugs.python.org Wed Oct 24 13:35:46 2012 From: report at bugs.python.org (Trent Nelson) Date: Wed, 24 Oct 2012 11:35:46 +0000 Subject: [issue16136] Removal of VMS support In-Reply-To: <1350929883.4.0.483722405922.issue16136@psf.upfronthosting.co.za> Message-ID: <20121024113526.GA5339@snakebite.org> Trent Nelson added the comment: On Mon, Oct 22, 2012 at 11:18:03AM -0700, Christian Heimes wrote: > > Christian Heimes added the comment: > > We don't have any box that is capable of running VMS. Even Trent's > Snakebit setup doesn't have VMS although he has lots of exotic > hardware and OS, even HP-UX on a PA-RISC machine. I actually do have a box set aside for VMS. It's a quad Itanium2 with ~24-32GB of RAM (same hardware as the 'titanium' HP-UX box). I just haven't set it up yet due to lack of interest. First thing I'll need is OpenVMS media/licenses. I'll ping HP and see if they can assist. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16136> _______________________________________ From report at bugs.python.org Wed Oct 24 13:37:35 2012 From: report at bugs.python.org (=?utf-8?q?Marek_=C5=A0uppa?=) Date: Wed, 24 Oct 2012 11:37:35 +0000 Subject: [issue15948] Unchecked return value of I/O functions In-Reply-To: <1347722947.26.0.499070360065.issue15948@psf.upfronthosting.co.za> Message-ID: <1351078655.44.0.288205558853.issue15948@psf.upfronthosting.co.za> Marek ?uppa added the comment: Appended is the patch for _cursesmodule.c Let me know if it's OK. ---------- keywords: +patch Added file: http://bugs.python.org/file27692/issue15948__cursesmodule.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15948> _______________________________________ From report at bugs.python.org Wed Oct 24 13:39:46 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Oct 2012 11:39:46 +0000 Subject: [issue16309] "PYTHONPATH=" different from no PYTHONPATH at all In-Reply-To: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za> Message-ID: <1351078786.3.0.939765305217.issue16309@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Given how confusing it seems, perhaps we should change it to adopt a PATH-like behaviour. ---------- nosy: +pitrou _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16309> _______________________________________ From report at bugs.python.org Wed Oct 24 13:41:45 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Oct 2012 11:41:45 +0000 Subject: [issue12886] datetime.strptime parses input wrong In-Reply-To: <1314974007.55.0.285568781981.issue12886@psf.upfronthosting.co.za> Message-ID: <1351078905.29.0.199190541296.issue12886@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +ezio.melotti stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12886> _______________________________________ From report at bugs.python.org Wed Oct 24 13:42:48 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Oct 2012 11:42:48 +0000 Subject: [issue16307] multiprocess.pool.map_async callables not working In-Reply-To: <1351062852.0.0.92760767978.issue16307@psf.upfronthosting.co.za> Message-ID: <1351078968.68.0.996848093751.issue16307@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: ---------- nosy: +hynek stage: -> patch review versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16307> _______________________________________ From report at bugs.python.org Wed Oct 24 13:56:04 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 24 Oct 2012 11:56:04 +0000 Subject: [issue15111] Wrong ImportError message with importlib In-Reply-To: <1340151446.59.0.121813331775.issue15111@psf.upfronthosting.co.za> Message-ID: <1351079764.35.0.953729728535.issue15111@psf.upfronthosting.co.za> Changes by Andrew Svetlov <andrew.svetlov at gmail.com>: ---------- nosy: +asvetlov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15111> _______________________________________ From report at bugs.python.org Wed Oct 24 14:10:39 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 24 Oct 2012 12:10:39 +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: <1351080639.74.0.640176009677.issue8713@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > A use case for not using fork() is when your parent process opens some > system resources of some sort (for example a listening TCP socket). The > child will then inherit those resources, which can have all kinds of > unforeseen and troublesome consequences (for example that listening TCP > socket will be left open in the child when it is closed in the parent, > and so trying to bind() to the same port again will fail). > > Generally, I think having an option for zero-sharing spawning of > processes would help code quality. The patch as it stands still depends on fd inheritance, so you would need to use FD_CLOEXEC on your listening socket. But yes, it should be possible to use the closefds feature of _posixsubprocess. BTW, I also have working code (which passes the unittests) that starts a helper process at the beginning of the program and which will fork processes on behalf of the other processes. This also solves the issue of unintended inheritance of resources (and the mixing of fork with threads) but is as fast as doing normal forks. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8713> _______________________________________ From report at bugs.python.org Wed Oct 24 14:13:16 2012 From: report at bugs.python.org (Trent Nelson) Date: Wed, 24 Oct 2012 12:13:16 +0000 Subject: [issue16274] test_asyncore failing on Solaris 10 2.7 (nitrogen/s10) In-Reply-To: <1350910283.16.0.705422263646.issue16274@psf.upfronthosting.co.za> Message-ID: <20121024121310.GB5339@snakebite.org> Trent Nelson added the comment: On Mon, Oct 22, 2012 at 05:51:23AM -0700, Giampaolo Rodola' wrote: > > Giampaolo Rodola' added the comment: > > This should do it: > > diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py > --- a/Lib/test/test_asyncore.py > +++ b/Lib/test/test_asyncore.py > @@ -484,8 +484,9 @@ > return self.socket.getsockname()[:2] > > def handle_accept(self): > - sock, addr = self.accept() > - self.handler(sock) > + pair = self.accept() > + if pair is not None: > + self.handler(pair[0]) > > def handle_error(self): > raise Yeah this looks a lot more appropriate than the two changes Jes?s posted. I'll test against my Solaris boxes and report back. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16274> _______________________________________ From report at bugs.python.org Wed Oct 24 14:17:54 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 24 Oct 2012 12:17:54 +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: <1351081074.61.0.460849447175.issue16308@psf.upfronthosting.co.za> R. David Murray added the comment: There was bug fixing/enhancement activity around subparsers, one of them probably had an unexpected side effect for which there are currently no tests. If you can figure out which change set introduced the change, that might speed up resolution of the issue. ---------- nosy: +bethard, r.david.murray _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16308> _______________________________________ From report at bugs.python.org Wed Oct 24 14:18:03 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Wed, 24 Oct 2012 12:18:03 +0000 Subject: [issue16307] multiprocess.pool.map_async callables not working In-Reply-To: <1351062852.0.0.92760767978.issue16307@psf.upfronthosting.co.za> Message-ID: <1351081083.1.0.496009488599.issue16307@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Could you add a test please? Thanks! ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16307> _______________________________________ From report at bugs.python.org Wed Oct 24 14:22:43 2012 From: report at bugs.python.org (Trent Nelson) Date: Wed, 24 Oct 2012 12:22:43 +0000 Subject: [issue16262] srcdir != builddir builds fail, if hg is not installed In-Reply-To: <1350856777.4.0.505703402765.issue16262@psf.upfronthosting.co.za> Message-ID: <20121024122236.GC5339@snakebite.org> Trent Nelson added the comment: On Sun, Oct 21, 2012 at 02:59:37PM -0700, R. David Murray wrote: > > R. David Murray added the comment: > > This change appears to have broken the dmg builders: > > http://buildbot.python.org/all/builders/bolen-dmg-3.x/builds/19 > http://buildbot.python.org/all/builders/bolen-dmg-3.3/builds/17 Ah, relevant error: creating Makefile Traceback (most recent call last): File "/Users/db3l/buildarea.dmg/bolen-dmg-3.x/build/Parser/asdl_c.py", line 1254, in ? main(args[0]) File "/Users/db3l/buildarea.dmg/bolen-dmg-3.x/build/Parser/asdl_c.py", line 1203, in main c = ChainOfVisitors(TypeDefVisitor(f), File "/Users/db3l/buildarea.dmg/bolen-dmg-3.x/build/Parser/asdl_c.py", line 87, in __init__ self.identifiers = set() NameError: global name 'set' is not defined make: *** [Include/Python-ast.h] Error 1 Running make So, it's not that it broke the daily dmg builders per se, it's just that the version of Python being used to generate the ADSL on those boxes is old (and doesn't have set()). I guess that means whatever Python version was picked up is <2.4? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16262> _______________________________________ From report at bugs.python.org Wed Oct 24 14:28:07 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 24 Oct 2012 12:28:07 +0000 Subject: [issue16262] srcdir != builddir builds fail, if hg is not installed In-Reply-To: <1350464486.47.0.189031527493.issue16262@psf.upfronthosting.co.za> Message-ID: <1351081687.07.0.279995453486.issue16262@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, good point. From what I understand, that's entirely possible on that machine. Then the question becomes, do we want to support pre-2.4 for a rebuild? The answer is almost certainly no, but that leaves the DMG builders hosed. Re-closing issue, as this is arguably a problem with the DMG build machine. ---------- status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16262> _______________________________________ From report at bugs.python.org Wed Oct 24 14:33:45 2012 From: report at bugs.python.org (Stefan Holek) Date: Wed, 24 Oct 2012 12:33:45 +0000 Subject: [issue16310] zipfile: allow surrogates in filenames Message-ID: <1351082025.34.0.287428579283.issue16310@psf.upfronthosting.co.za> New submission from Stefan Holek: Please allow for surrogates in the zipfile module like it was done for tarfile in #8390. Currently zipfile breaks when encountering surrogates: Traceback (most recent call last): File "/usr/local/python3.3/lib/python3.3/zipfile.py", line 392, in _encodeFilenameFlags return self.filename.encode('ascii'), self.flag_bits UnicodeEncodeError: 'ascii' codec can't encode character '\udcfc' in position 21: ordinal not in range(128) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "setup.py", line 20, in <module> 'setuptools', File "/usr/local/python3.3/lib/python3.3/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/local/python3.3/lib/python3.3/distutils/dist.py", line 917, in run_commands self.run_command(cmd) File "/usr/local/python3.3/lib/python3.3/distutils/dist.py", line 936, in run_command cmd_obj.run() File "/home/stefan/sandbox/setuptools-git/lib/python3.3/site-packages/distribute-0.6.30-py3.3.egg/setuptools/command/sdist.py", line 161, in run self.make_distribution() File "/usr/local/python3.3/lib/python3.3/distutils/command/sdist.py", line 447, in make_distribution file = self.make_archive(base_name, fmt, base_dir=base_dir) File "/usr/local/python3.3/lib/python3.3/distutils/cmd.py", line 370, in make_archive dry_run=self.dry_run) File "/usr/local/python3.3/lib/python3.3/distutils/archive_util.py", line 178, in make_archive filename = func(base_name, base_dir, **kwargs) File "/usr/local/python3.3/lib/python3.3/distutils/archive_util.py", line 118, in make_zipfile zip.write(path, path) File "/usr/local/python3.3/lib/python3.3/zipfile.py", line 1328, in write self.fp.write(zinfo.FileHeader()) File "/usr/local/python3.3/lib/python3.3/zipfile.py", line 382, in FileHeader filename, flag_bits = self._encodeFilenameFlags() File "/usr/local/python3.3/lib/python3.3/zipfile.py", line 394, in _encodeFilenameFlags return self.filename.encode('utf-8'), self.flag_bits | 0x800 UnicodeEncodeError: 'utf-8' codec can't encode character '\udcfc' in position 21: surrogates not allowed ---------- components: Library (Lib), Unicode messages: 173676 nosy: ezio.melotti, stefanholek priority: normal severity: normal status: open title: zipfile: allow surrogates in filenames versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16310> _______________________________________ From report at bugs.python.org Wed Oct 24 14:36:03 2012 From: report at bugs.python.org (Matthias Klose) Date: Wed, 24 Oct 2012 12:36:03 +0000 Subject: [issue16262] srcdir != builddir builds fail, if hg is not installed In-Reply-To: <1350464486.47.0.189031527493.issue16262@psf.upfronthosting.co.za> Message-ID: <1351082163.64.0.0512433241184.issue16262@psf.upfronthosting.co.za> Matthias Klose added the comment: yes, the test checks with a recent version first, then the older ones. However you can configure with PYTHON=python2.4 configure ... to overwrite these defaults. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16262> _______________________________________ From report at bugs.python.org Wed Oct 24 14:55:58 2012 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 24 Oct 2012 12:55:58 +0000 Subject: [issue9556] Specifying the time a TimedRotatingFileHandler rotates In-Reply-To: <1281441457.15.0.524451784963.issue9556@psf.upfronthosting.co.za> Message-ID: <1351083358.18.0.671385531406.issue9556@psf.upfronthosting.co.za> Changes by Vinay Sajip <vinay_sajip at yahoo.co.uk>: Added file: http://bugs.python.org/file27693/b178bbafd564.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9556> _______________________________________ From report at bugs.python.org Wed Oct 24 14:59:07 2012 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 24 Oct 2012 12:59:07 +0000 Subject: [issue9556] Specifying the time a TimedRotatingFileHandler rotates In-Reply-To: <1281441457.15.0.524451784963.issue9556@psf.upfronthosting.co.za> Message-ID: <1351083547.11.0.562684236462.issue9556@psf.upfronthosting.co.za> Vinay Sajip added the comment: Thanks for the comments on Rietveld - patch updated. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9556> _______________________________________ From report at bugs.python.org Wed Oct 24 14:59:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 12:59:55 +0000 Subject: [issue16310] zipfile: allow surrogates in filenames In-Reply-To: <1351082025.34.0.287428579283.issue16310@psf.upfronthosting.co.za> Message-ID: <1351083595.73.0.600200392759.issue16310@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- nosy: +serhiy.storchaka type: -> enhancement versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16310> _______________________________________ From report at bugs.python.org Wed Oct 24 15:06:45 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 24 Oct 2012 13:06:45 +0000 Subject: [issue16262] srcdir != builddir builds fail, if hg is not installed In-Reply-To: <1350464486.47.0.189031527493.issue16262@psf.upfronthosting.co.za> Message-ID: <1351084005.26.0.174392345191.issue16262@psf.upfronthosting.co.za> R. David Murray added the comment: Wait, does that mean you are explicitly supporting older Python versions? In that case there's still a bug here (either fix the set, or don't accept versions older than 2.4). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16262> _______________________________________ From report at bugs.python.org Wed Oct 24 15:07:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 13:07:38 +0000 Subject: [issue16305] possible segfault in math.factorial In-Reply-To: <1351031608.7.0.419151487248.issue16305@psf.upfronthosting.co.za> Message-ID: <1351084058.73.0.33544734103.issue16305@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16305> _______________________________________ From report at bugs.python.org Wed Oct 24 15:11:18 2012 From: report at bugs.python.org (telmich) Date: Wed, 24 Oct 2012 13:11:18 +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: <1351084278.12.0.378242765231.issue16308@psf.upfronthosting.co.za> telmich added the comment: Having a closer look at the changes using hg diff -r v3.2:v3.3.0 Lib/argparse.py, it seems the following removal could be related to the different behaviour: - # if we didn't use all the Positional objects, there were too few - # arg strings supplied. - if positionals: - self.error(_('too few arguments')) - [15:09] brief:cpython% hg grep "if positionals:" Lib/argparse.py Lib/argparse.py:79016: if positionals: And this seems to be the relevant change: changeset: 70741:cab204a79e09 user: R David Murray <rdmurray at bitdance.com> date: Thu Jun 09 12:34:07 2011 -0400 summary: #10424: argument names are now included in the missing argument message ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16308> _______________________________________ From report at bugs.python.org Wed Oct 24 15:15:01 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 24 Oct 2012 13:15:01 +0000 Subject: [issue16310] zipfile: allow surrogates in filenames In-Reply-To: <1351082025.34.0.287428579283.issue16310@psf.upfronthosting.co.za> Message-ID: <1351084501.5.0.98393595237.issue16310@psf.upfronthosting.co.za> R. David Murray added the comment: The problem you are reporting looks different than the problem addressed in issue 8390. There, the surrogates are being introduced when reading filenames from the archive file. Here, the surrogates presumably arose because the filename on your file system was not utf-8 encoded and so Python introduced the surrogates to preserve the filename. The bug is that zipfile is not handling surrogates when *building* the archive...which may in fact be correct. If I understand correctly there are two encodings supported by zipfile, a Microsoft code page and utf-8. Anything else should probably be rejected as invalid, but with a better error message. If you really need to include invalid filenames in an archive, we would introduce an explict flag for allowing that. But, that's just my opinion. ("Be generous in what you accept, and strict in what you send") ---------- nosy: +r.david.murray _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16310> _______________________________________ From report at bugs.python.org Wed Oct 24 15:20:39 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 24 Oct 2012 13:20:39 +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: <1351084839.58.0.685597851072.issue16308@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks. I've put this on my todo list to look at this weekend during the bug day. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16308> _______________________________________ From report at bugs.python.org Wed Oct 24 15:37:33 2012 From: report at bugs.python.org (Ned Deily) Date: Wed, 24 Oct 2012 13:37:33 +0000 Subject: [issue16262] srcdir != builddir builds fail, if hg is not installed In-Reply-To: <1350464486.47.0.189031527493.issue16262@psf.upfronthosting.co.za> Message-ID: <1351085853.51.0.249812244751.issue16262@psf.upfronthosting.co.za> Changes by Ned Deily <nad at acm.org>: ---------- nosy: +ned.deily _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16262> _______________________________________ From report at bugs.python.org Wed Oct 24 15:44:20 2012 From: report at bugs.python.org (telmich) Date: Wed, 24 Oct 2012 13:44:20 +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: <1351086260.48.0.789018320587.issue16308@psf.upfronthosting.co.za> telmich added the comment: Thanks a lot - let me know when I can help more. After re-reading the documentation, I think the behaviour for subparsers is not specified: It is not specified, whether a subparser is required to be present or not. Attached stripped down version of the cdist code to a bare minimum (subparse.py) which shows the problem more clear: % python3 -V Python 3.2.3 % python3 ~/subparse.py usage: subparse.py [-h] [-V] {banner} ... subparse.py: error: too few arguments versus [15:44] brief:~% python3 -V Python 3.3.0 [15:46] brief:~% python3 subparse.py Traceback (most recent call last): File "subparse.py", line 31, in <module> commandline() File "subparse.py", line 25, in commandline args.func(args) AttributeError: 'Namespace' object has no attribute 'func' ---------- Added file: http://bugs.python.org/file27694/subparse.py _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16308> _______________________________________ From report at bugs.python.org Wed Oct 24 15:44:40 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 24 Oct 2012 13:44:40 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1351086280.26.0.936828335519.issue8913@psf.upfronthosting.co.za> Changes by Andrew Svetlov <andrew.svetlov at gmail.com>: ---------- nosy: +asvetlov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8913> _______________________________________ From report at bugs.python.org Wed Oct 24 16:12:14 2012 From: report at bugs.python.org (telmich) Date: Wed, 24 Oct 2012 14:12:14 +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: <1351087934.17.0.937545947078.issue16308@psf.upfronthosting.co.za> telmich added the comment: I've copy & pasted the example from the documentation and added the following lines to it (attached full file) args = parser.parse_args('') args.func(args) Following the style / way show in the documentation, I'd expect this block to work (3.2.2 behaviour). I do however understand from a logical point that this does not work: * no subparsers are required * no argument is required => args.func is never setup One could check for this situation using getattr: try: a = getattr(args, "func") except AttributeError: parser['main'].print_help() sys.exit(0) Though this look quite manual compared to the usual way of using argparse. ---------- Added file: http://bugs.python.org/file27695/subparse2.py _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16308> _______________________________________ From report at bugs.python.org Wed Oct 24 16:17:18 2012 From: report at bugs.python.org (telmich) Date: Wed, 24 Oct 2012 14:17:18 +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: <1351088238.34.0.83176639032.issue16308@psf.upfronthosting.co.za> telmich added the comment: Assuming 3.3.0 behaviour is correct (as in no subparser specified, args.func not setup), I'd expect to have setup a function on the main parser. Trying this, it prevents the subparsers function from being completly: [16:03] brief:~% python3 subparse3.py main: Namespace(func=<function main at 0x7fdf844b90e0>, x=2, y=1.0) main: Namespace(func=<function main at 0x7fdf844b90e0>, z='XYZYX') main: Namespace(func=<function main at 0x7fdf844b90e0>) Added lines to the original documentation are: def main(args): print('main: %s' % args) ... parser.set_defaults(func=main) ... args = parser.parse_args('') args.func(args) ---------- Added file: http://bugs.python.org/file27696/subparse3.py _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16308> _______________________________________ From report at bugs.python.org Wed Oct 24 16:19:18 2012 From: report at bugs.python.org (Stefan Holek) Date: Wed, 24 Oct 2012 14:19:18 +0000 Subject: [issue16310] zipfile: allow surrogates in filenames In-Reply-To: <1351082025.34.0.287428579283.issue16310@psf.upfronthosting.co.za> Message-ID: <1351088358.34.0.886438747794.issue16310@psf.upfronthosting.co.za> Stefan Holek added the comment: A little more context perhaps: The use-case is building Python distributions containing non-ASCII filenames. These seemingly "invalid" filenames can occur in real-life when the files have been created by, say, a 'git clone' operation. So yes, I have Latin-1 bytes on the filesystem, even though my locale is UTF-8. And yes, Python 3 decodes that filename using surrogates. Creating .tar.gz distributions in this situation appears to work (even re-creating the foreign bytes when the archive is later extracted), whereas .zip archives fail in the way described above. I was hoping zipfile could be made to work the same as tarfile in this regard. Concerns for standards certainly didn't keep tarfile from supporting surrogates. ;-) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16310> _______________________________________ From report at bugs.python.org Wed Oct 24 16:30:25 2012 From: report at bugs.python.org (telmich) Date: Wed, 24 Oct 2012 14:30:25 +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: <1351089025.08.0.374505827358.issue16308@psf.upfronthosting.co.za> telmich added the comment: Proposal / resume from the previous tests: - add a parameter to add_subparsers(): required If required=True, one of the subcommand names need to be present. If required=False (default), allow parse_args() to return successfully, if no subcommand is given. - Change implementation in such a way that using parser.set_defaults() on the main parser does not affect the sub parsers: Sub parsers are not related to the main parser like parent parsers and thus should not be affected by changes in the main parser. The second change would allow catching the case of no subcommands given and can be used to catch the empty arguments case. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16308> _______________________________________ From report at bugs.python.org Wed Oct 24 16:38:34 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 24 Oct 2012 14:38:34 +0000 Subject: [issue16310] zipfile: allow surrogates in filenames In-Reply-To: <1351082025.34.0.287428579283.issue16310@psf.upfronthosting.co.za> Message-ID: <1351089514.62.0.428135302558.issue16310@psf.upfronthosting.co.za> R. David Murray added the comment: I'm guessing that is because (if you read the issue) there are no specified standards for the filenames in tar (other than PAX format). Although I would personally have preferred to need to specify a "yes really use these binary filenames" flag to tar, as well. I'm not sure there are real "standards" for zip, either. I'll have to leave that answer to someone more knowledgeable. As for your immediate issue, can't you just set your locale to latin-1 while building the archive? The filenames should then get encoded to utf-8 in the zip archive, which should do the right thing with respect to the user's locale when extracted. I would think that that would be more portable. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16310> _______________________________________ From report at bugs.python.org Wed Oct 24 16:40:49 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 24 Oct 2012 14:40:49 +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: <1351089649.98.0.701361478453.issue16308@psf.upfronthosting.co.za> R. David Murray added the comment: How does all of this relate to issue 9253? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16308> _______________________________________ From report at bugs.python.org Wed Oct 24 17:06:53 2012 From: report at bugs.python.org (telmich) Date: Wed, 24 Oct 2012 15:06:53 +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: <1351091213.61.0.930923697863.issue16308@psf.upfronthosting.co.za> telmich added the comment: Interesting! The issue 9523 has now somehow become obsolete, as in 3.3.0 subcommands are de-facto optional, which is the problem I am facing. Regarding my last comment, here are the relations: - add a parameter to add_subparsers(): required This is a similar proposal to the original issue 9523, though the other way round: in #9523 the required case was proposed to be the default. As 3.3.0 now defaults to optional, my proposal was to keep this behaviour and allow passing required=True. - Change implementation in such a way that using parser.set_defaults() on the main parser does not affect the sub parsers: As set_defaults() already exists, I think this is the cleaner method to implement this feature instead of using the default='' variant specified in #9523. Besides that I think the current behaviour of set_defaults changing the functions of the sub parsers is definitely a bug on its own. So summarised / compared: - Python 3.3.0 seems to treat subcommands as optional, compared to the original issue 9523 - set_defaults(func=x) on the main parsers affects sub parsers, which renders using set_defaults() useless - If requiring the behaviour of set_defaults() to pass the func= arguments to other parsers, the parents=[] argument already exists - To fix this issue, only correcting the set_defaults() call would be necessary - It makes sense though, to add the 'required' parameter, as the need has also been spotted by others already. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16308> _______________________________________ From report at bugs.python.org Wed Oct 24 17:08:14 2012 From: report at bugs.python.org (telmich) Date: Wed, 24 Oct 2012 15:08:14 +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: <1351091294.43.0.136961132176.issue16308@psf.upfronthosting.co.za> telmich added the comment: s/9523/9253/g in my previous post ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16308> _______________________________________ From report at bugs.python.org Wed Oct 24 17:47:57 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 24 Oct 2012 15:47:57 +0000 Subject: [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1351093677.89.0.529742955499.issue16278@psf.upfronthosting.co.za> Changes by Andrew Svetlov <andrew.svetlov at gmail.com>: ---------- nosy: +asvetlov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16278> _______________________________________ From report at bugs.python.org Wed Oct 24 18:16:09 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 24 Oct 2012 16:16:09 +0000 Subject: [issue16310] zipfile: allow surrogates in filenames In-Reply-To: <1351082025.34.0.287428579283.issue16310@psf.upfronthosting.co.za> Message-ID: <1351095369.11.0.473571875626.issue16310@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>: ---------- nosy: +Arfrever _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16310> _______________________________________ From report at bugs.python.org Wed Oct 24 18:45:58 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 24 Oct 2012 16:45:58 +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: <1351097158.77.0.795408980251.issue16284@psf.upfronthosting.co.za> Richard Oudkerk added the comment: LGTM ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16284> _______________________________________ From report at bugs.python.org Wed Oct 24 18:49:22 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 24 Oct 2012 16:49:22 +0000 Subject: [issue16295] With VS2010 the select extension links against wsock32 instead of ws2_32 In-Reply-To: <1350840082.43.0.801367725826.issue16295@psf.upfronthosting.co.za> Message-ID: <1351097362.22.0.14013942636.issue16295@psf.upfronthosting.co.za> Changes by Richard Oudkerk <shibturn at gmail.com>: ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16295> _______________________________________ From report at bugs.python.org Wed Oct 24 19:48:56 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Oct 2012 17:48:56 +0000 Subject: [issue16310] zipfile: allow surrogates in filenames In-Reply-To: <1351082025.34.0.287428579283.issue16310@psf.upfronthosting.co.za> Message-ID: <1351100936.65.0.0141281419948.issue16310@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: ---------- nosy: +haypo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16310> _______________________________________ From report at bugs.python.org Wed Oct 24 20:33:52 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Wed, 24 Oct 2012 18:33:52 +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: <1351103632.7.0.506466241121.issue2005@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Yeah, it seems that uid_t and gid_t can be signed or unsigned, while pid_t is always signed. Serhiy: What do you suggest? ---------- nosy: +petri.lehtinen _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue2005> _______________________________________ From report at bugs.python.org Wed Oct 24 20:38:22 2012 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2012 18:38:22 +0000 Subject: [issue16311] Use _PyUnicodeWriter API in text decoders Message-ID: <1351103901.39.0.0945105753188.issue16311@psf.upfronthosting.co.za> New submission from STINNER Victor: Attached patch modifies text decoders to use the _PyUnicodeWriter API to factorize the code. It removes unicode_widen() and unicode_putchar() functions. * Don't overallocate by default (except for "raw-unicode-escape" codec), enable overallocation on the first decode error (as done currently) * _PyUnicodeWriter_Prepare() only overallocates 25%, instead of 100% for unicode_decode_call_errorhandler() * Use _PyUnicodeWriter_Prepare() + PyUnicode_WRITE() (two macros) instead of unicode_putchar() (function) * _PyUnicodeWriter structures stores many useful fields, so we don't have to pass multiple parameters to functions, only the writer I wrote the patch to factorize the code, but it might be faster. ---------- files: codecs_writer.patch keywords: patch messages: 173695 nosy: haypo priority: normal severity: normal status: open title: Use _PyUnicodeWriter API in text decoders type: performance versions: Python 3.4 Added file: http://bugs.python.org/file27697/codecs_writer.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16311> _______________________________________ From report at bugs.python.org Wed Oct 24 20:38:53 2012 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2012 18:38:53 +0000 Subject: [issue16311] Use _PyUnicodeWriter API in text decoders In-Reply-To: <1351103901.39.0.0945105753188.issue16311@psf.upfronthosting.co.za> Message-ID: <1351103933.47.0.598363854536.issue16311@psf.upfronthosting.co.za> Changes by STINNER Victor <victor.stinner at gmail.com>: ---------- nosy: +loewis, serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16311> _______________________________________ From report at bugs.python.org Wed Oct 24 21:23:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 19:23:22 +0000 Subject: [issue6975] symlinks incorrectly resolved on Linux In-Reply-To: <1253685313.69.0.648289112505.issue6975@psf.upfronthosting.co.za> Message-ID: <1351106602.9.0.769010170372.issue6975@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Previous patches contain redundant code, are not protected from all symlink loops (link -> link/x; dir/link -> ../dir/link) and when a loop is detected the returned result differs from the current one. The proposed patch solves this issue and some others. Added many new tests. The test for this issue was simplified: dir/self -> ../dir dir/link -> self/self/self resolve dir/link ---------- keywords: -easy nosy: +serhiy.storchaka versions: +Python 3.4 Added file: http://bugs.python.org/file27698/posix_realpath.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6975> _______________________________________ From report at bugs.python.org Wed Oct 24 21:36:34 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 24 Oct 2012 19:36:34 +0000 Subject: [issue16307] multiprocess.pool.map_async callables not working In-Reply-To: <1351062852.0.0.92760767978.issue16307@psf.upfronthosting.co.za> Message-ID: <1351107394.48.0.166280541934.issue16307@psf.upfronthosting.co.za> Changes by Richard Oudkerk <shibturn at gmail.com>: ---------- nosy: +sbt _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16307> _______________________________________ From report at bugs.python.org Wed Oct 24 21:44:32 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 19:44:32 +0000 Subject: [issue16311] Use _PyUnicodeWriter API in text decoders In-Reply-To: <1351103901.39.0.0945105753188.issue16311@psf.upfronthosting.co.za> Message-ID: <1351107872.68.0.0621341106262.issue16311@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Soon I'll post a patch, which speeds up unicode-escape and raw-unicode-escape decoders to 1.5-3x. Also there are not yet reviewed patches for UTF-32 (issue14625) and charmap (issue14850) decoders. Will be merge conflicts. But I will review the patch. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16311> _______________________________________ From report at bugs.python.org Wed Oct 24 21:51:56 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 24 Oct 2012 19:51:56 +0000 Subject: [issue16210] combine the two type() definitions in built-in function docs In-Reply-To: <1350033139.53.0.10696980819.issue16210@psf.upfronthosting.co.za> Message-ID: <1351108316.15.0.952078254832.issue16210@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This patch looks good. Ezio, if you agree, please apply it. ---------- assignee: docs at python -> ezio.melotti nosy: +rhettinger _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16210> _______________________________________ From report at bugs.python.org Wed Oct 24 21:58:35 2012 From: report at bugs.python.org (Piotr Dobrogost) Date: Wed, 24 Oct 2012 19:58:35 +0000 Subject: [issue16312] New command line option supported by unittest.main() for running initialization code before tests Message-ID: <1351108715.95.0.725545714985.issue16312@psf.upfronthosting.co.za> New submission from Piotr Dobrogost: When running tests bundled with a library it would be useful to be able to run some initialization code before tests are being run so that one can configure options pertaining to logging for example. For this reason it would be useful to have a new command line option handled by unittest.main() for running custom Python module before running tests. See http://stackoverflow.com/q/8607767/95735 ---------- components: Library (Lib) messages: 173699 nosy: piotr.dobrogost priority: normal severity: normal status: open title: New command line option supported by unittest.main() for running initialization code before tests type: enhancement versions: Python 3.4, Python 3.5 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16312> _______________________________________ From report at bugs.python.org Wed Oct 24 22:07:54 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 24 Oct 2012 20:07:54 +0000 Subject: [issue16210] combine the two type() definitions in built-in function docs In-Reply-To: <1350033139.53.0.10696980819.issue16210@psf.upfronthosting.co.za> Message-ID: <3Xn2Zd5XLQzMsd@mail.python.org> Roundup Robot added the comment: New changeset 6dde85f2e4af by Ezio Melotti in branch '2.7': #16210: combine the two type() docs. Patch by Pete Sevander. http://hg.python.org/cpython/rev/6dde85f2e4af New changeset 997ab4f1530f by Ezio Melotti in branch '3.2': #16210: combine the two type() docs. Patch by Pete Sevander. http://hg.python.org/cpython/rev/997ab4f1530f New changeset 8f1d72106073 by Ezio Melotti in branch '3.3': #16210: merge with 3.2. http://hg.python.org/cpython/rev/8f1d72106073 New changeset fd69a6d1b0f0 by Ezio Melotti in branch 'default': #16210: merge with 3.3. http://hg.python.org/cpython/rev/fd69a6d1b0f0 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16210> _______________________________________ From report at bugs.python.org Wed Oct 24 22:08:49 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Oct 2012 20:08:49 +0000 Subject: [issue16210] combine the two type() definitions in built-in function docs In-Reply-To: <1350033139.53.0.10696980819.issue16210@psf.upfronthosting.co.za> Message-ID: <1351109329.68.0.735886219962.issue16210@psf.upfronthosting.co.za> Ezio Melotti added the comment: Done, thanks for the patch! ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16210> _______________________________________ From report at bugs.python.org Wed Oct 24 22:23:27 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Oct 2012 20:23:27 +0000 Subject: [issue15569] Doc doc: incorrect description of some roles as format-only In-Reply-To: <1344302647.18.0.307450045197.issue15569@psf.upfronthosting.co.za> Message-ID: <1351110207.65.0.907781724934.issue15569@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- type: -> enhancement versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15569> _______________________________________ From report at bugs.python.org Wed Oct 24 22:38:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 20:38:12 +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: <1351111092.29.0.352422587177.issue2005@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I suggest use PyLong_AsLongAndOverflow/PyLong_AsLongLongAndOverflow and then PyLong_AsUnsignedLong/PyLong_AsUnsignedLongLong in case if positive overflow. Perhaps you need also special converters for "O&" format in PyArg_ParseTuple. This issue is not as easy as it seemed. ;-) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue2005> _______________________________________ From report at bugs.python.org Wed Oct 24 22:41:46 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 20:41:46 +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: <1351111306.51.0.429479347043.issue2005@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Of course PyLong_AsUnsignedLong* should be used only if the type is unsigned. In such case any negative values except -1 are invalid. ---------- keywords: -easy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue2005> _______________________________________ From report at bugs.python.org Wed Oct 24 22:43:21 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 24 Oct 2012 20:43:21 +0000 Subject: [issue16303] typo in error message in pstats.py In-Reply-To: <1350993199.31.0.48592557313.issue16303@psf.upfronthosting.co.za> Message-ID: <3Xn3MX5jNQzNKT@mail.python.org> Roundup Robot added the comment: New changeset ad1cc596bedb by Ezio Melotti in branch '2.7': #16303: remove extra quotes from exception and add (). Initial patch by Vladimir Rutsky. http://hg.python.org/cpython/rev/ad1cc596bedb ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16303> _______________________________________ From report at bugs.python.org Wed Oct 24 22:44:15 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Oct 2012 20:44:15 +0000 Subject: [issue16303] typo in error message in pstats.py In-Reply-To: <1350993199.31.0.48592557313.issue16303@psf.upfronthosting.co.za> Message-ID: <1351111455.84.0.733916950592.issue16303@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch and the report! ---------- assignee: -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16303> _______________________________________ From report at bugs.python.org Wed Oct 24 22:45:36 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Oct 2012 20:45:36 +0000 Subject: [issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings In-Reply-To: <1347321295.19.0.66061447718.issue15916@psf.upfronthosting.co.za> Message-ID: <1351111536.79.0.303659496792.issue15916@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +ezio.melotti _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15916> _______________________________________ From report at bugs.python.org Wed Oct 24 22:57:07 2012 From: report at bugs.python.org (Matthias Klose) Date: Wed, 24 Oct 2012 20:57:07 +0000 Subject: [issue16262] srcdir != builddir builds fail, if hg is not installed In-Reply-To: <1350464486.47.0.189031527493.issue16262@psf.upfronthosting.co.za> Message-ID: <1351112227.49.0.64387703332.issue16262@psf.upfronthosting.co.za> Matthias Klose added the comment: > Wait, does that mean you are explicitly supporting older Python versions? no, that is unchanged. the Parser/asdl_c.py script had a shebang with python. Of course you could replace the python in AC_CHECK_PROCS with the allowed python2.x versions. But then maybe rename it to ASDLGEN_PYTHON, or something like this ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16262> _______________________________________ From report at bugs.python.org Wed Oct 24 23:25:27 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Oct 2012 21:25:27 +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: <1351113927.41.0.0414613585361.issue11175@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +ezio.melotti _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11175> _______________________________________ From report at bugs.python.org Wed Oct 24 23:25:40 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Oct 2012 21:25:40 +0000 Subject: [issue9351] argparse set_defaults on subcommands should override top level set_defaults In-Reply-To: <1279894012.43.0.0678646409.issue9351@psf.upfronthosting.co.za> Message-ID: <1351113940.3.0.58850725087.issue9351@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +ezio.melotti _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9351> _______________________________________ From report at bugs.python.org Wed Oct 24 23:26:00 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Oct 2012 21:26:00 +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: <1351113960.62.0.140787578238.issue2005@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +ezio.melotti _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue2005> _______________________________________ From report at bugs.python.org Wed Oct 24 23:26:07 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Oct 2012 21:26:07 +0000 Subject: [issue14897] struct.pack raises unexpected error message In-Reply-To: <1337840519.45.0.558860957014.issue14897@psf.upfronthosting.co.za> Message-ID: <1351113967.82.0.246818482439.issue14897@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +ezio.melotti _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14897> _______________________________________ From report at bugs.python.org Wed Oct 24 23:26:24 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Oct 2012 21:26:24 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1351113984.66.0.0437205669608.issue8913@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +ezio.melotti _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8913> _______________________________________ From report at bugs.python.org Wed Oct 24 23:26:35 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Oct 2012 21:26:35 +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: <1351113995.7.0.990342588419.issue16306@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +ezio.melotti _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16306> _______________________________________ From report at bugs.python.org Wed Oct 24 23:32:28 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 21:32:28 +0000 Subject: [issue16313] Support xz compression in shutil module Message-ID: <1351114348.5.0.919820105174.issue16313@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch adds xz compression support in additional to gzip and bzip2 in shutil module. ---------- components: Library (Lib) files: shutil-lzma.patch keywords: patch messages: 173707 nosy: hynek, nadeem.vawda, serhiy.storchaka, tarek priority: normal severity: normal status: open title: Support xz compression in shutil module type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27699/shutil-lzma.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16313> _______________________________________ From report at bugs.python.org Wed Oct 24 23:32:50 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 21:32:50 +0000 Subject: [issue16313] Support xz compression in shutil module In-Reply-To: <1351114348.5.0.919820105174.issue16313@psf.upfronthosting.co.za> Message-ID: <1351114370.5.0.751818485247.issue16313@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16313> _______________________________________ From report at bugs.python.org Wed Oct 24 23:32:58 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 21:32:58 +0000 Subject: [issue16314] Support xz compression in distutils Message-ID: <1351114378.64.0.718374634123.issue16314@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch adds xz compression support in additional to gzip, compress and bzip2 in distutils. ---------- assignee: eric.araujo components: Distutils files: distutils-lzma.patch keywords: patch messages: 173708 nosy: eric.araujo, nadeem.vawda, serhiy.storchaka, tarek priority: normal severity: normal stage: patch review status: open title: Support xz compression in distutils type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27700/distutils-lzma.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16314> _______________________________________ From report at bugs.python.org Wed Oct 24 23:35:11 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 24 Oct 2012 21:35:11 +0000 Subject: [issue16314] Support xz compression in distutils In-Reply-To: <1351114378.64.0.718374634123.issue16314@psf.upfronthosting.co.za> Message-ID: <1351114511.32.0.833839658935.issue16314@psf.upfronthosting.co.za> ?ric Araujo added the comment: I think there?s already a report for distutils2. For distutils, if we take the feature freeze seriously, this would have to be rejected. I know it looks innocuous, but distutils is brittle code widely monkey-patched, so I prefer to take no chances. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16314> _______________________________________ From report at bugs.python.org Wed Oct 24 23:38:24 2012 From: report at bugs.python.org (Matthias Klose) Date: Wed, 24 Oct 2012 21:38:24 +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: <1351114704.81.0.0289721772461.issue16235@psf.upfronthosting.co.za> Matthias Klose added the comment: Earlier, we had the shell script, now we have the python implementation, which doesn't work for cross builds. On the other hand, I don't like to have two implementations which need to be kept in sync. So my proposal would be to discard the python implementation in favour of the shell implementation, provided that it works on all platforms (don't know about windows). just did see that the patch doesn't support --configdir for 3.3. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16235> _______________________________________ From report at bugs.python.org Wed Oct 24 23:40:34 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 21:40:34 +0000 Subject: [issue16315] Support xz compression in Mac buil script Message-ID: <1351114834.01.0.950919502981.issue16315@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch adds xz compression support in additional to gzip and bzip2 in Mac buil script. ---------- assignee: ronaldoussoren components: Build, Macintosh files: macbuildscript-lzma.patch keywords: patch messages: 173711 nosy: hynek, nadeem.vawda, ned.deily, ronaldoussoren, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Support xz compression in Mac buil script type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27701/macbuildscript-lzma.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16315> _______________________________________ From report at bugs.python.org Wed Oct 24 23:40:45 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 21:40:45 +0000 Subject: [issue16316] Support xz compression in mimetypes module Message-ID: <1351114845.07.0.378323444057.issue16316@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch adds xz compression support in additional to gzip, compress and bzip2 in mimetypes module. ---------- components: Library (Lib) files: mimetypes-lzma.patch keywords: patch messages: 173712 nosy: nadeem.vawda, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Support xz compression in mimetypes module type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27702/mimetypes-lzma.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16316> _______________________________________ From report at bugs.python.org Wed Oct 24 23:59:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 21:59:12 +0000 Subject: [issue16317] Mention lzma module in tutorial Message-ID: <1351115952.07.0.995218078366.issue16317@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch adds link to lzma module (in additional to zlib, gzip, bz2, and zipfile) in tutorial. ---------- assignee: docs at python components: Documentation files: stdlib-lzma.patch keywords: patch messages: 173713 nosy: docs at python, nadeem.vawda, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Mention lzma module in tutorial type: enhancement versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27703/stdlib-lzma.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16317> _______________________________________ From report at bugs.python.org Wed Oct 24 23:59:46 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 21:59:46 +0000 Subject: [issue16314] Support xz compression in distutils In-Reply-To: <1351114378.64.0.718374634123.issue16314@psf.upfronthosting.co.za> Message-ID: <1351115986.79.0.132233871685.issue16314@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: Removed file: http://bugs.python.org/file27700/distutils-lzma.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16314> _______________________________________ From report at bugs.python.org Thu Oct 25 00:01:21 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 22:01:21 +0000 Subject: [issue16314] Support xz compression in distutils In-Reply-To: <1351114378.64.0.718374634123.issue16314@psf.upfronthosting.co.za> Message-ID: <1351116081.59.0.0898091819584.issue16314@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: OK, I didn't know that distutils are frozen. ---------- Added file: http://bugs.python.org/file27704/distutils-lzma.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16314> _______________________________________ From report at bugs.python.org Thu Oct 25 00:03:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 22:03:23 +0000 Subject: [issue16314] Support xz compression in distutils In-Reply-To: <1351114378.64.0.718374634123.issue16314@psf.upfronthosting.co.za> Message-ID: <1351116203.33.0.0667295973154.issue16314@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- resolution: -> wont fix stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16314> _______________________________________ From report at bugs.python.org Thu Oct 25 00:06:20 2012 From: report at bugs.python.org (Michael Foord) Date: Wed, 24 Oct 2012 22:06:20 +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: <1351116380.93.0.554440850992.issue15132@psf.upfronthosting.co.za> Changes by Michael Foord <michael at voidspace.org.uk>: ---------- assignee: -> michael.foord _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15132> _______________________________________ From report at bugs.python.org Thu Oct 25 00:12:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 22:12:01 +0000 Subject: [issue16315] Support xz compression in Mac build script In-Reply-To: <1351114834.01.0.950919502981.issue16315@psf.upfronthosting.co.za> Message-ID: <1351116721.95.0.797412287596.issue16315@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- title: Support xz compression in Mac buil script -> Support xz compression in Mac build script _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16315> _______________________________________ From report at bugs.python.org Thu Oct 25 00:25:23 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 24 Oct 2012 22:25:23 +0000 Subject: [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1351117523.04.0.020165855565.issue16278@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Chris, maybe you can guess better wording? ---------- nosy: +chris.jerdonek _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16278> _______________________________________ From report at bugs.python.org Thu Oct 25 00:42:15 2012 From: report at bugs.python.org (Hieu Nguyen) Date: Wed, 24 Oct 2012 22:42:15 +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: <1351118535.9.0.976434251585.issue16306@psf.upfronthosting.co.za> Hieu Nguyen added the comment: I've attached the patch for this issue, including the test. ---------- keywords: +patch nosy: +hieu.nguyen Added file: http://bugs.python.org/file27705/issue16306.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16306> _______________________________________ From report at bugs.python.org Thu Oct 25 01:00:18 2012 From: report at bugs.python.org (Ned Deily) Date: Wed, 24 Oct 2012 23:00:18 +0000 Subject: [issue16315] Support xz compression in Mac build script In-Reply-To: <1351114834.01.0.950919502981.issue16315@psf.upfronthosting.co.za> Message-ID: <1351119618.4.0.48015220902.issue16315@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the patch but why are you proposing it? First, there are no xz compressed downloads used in the OS X installer build. Second, OS X currently does not ship with xz library support or with an unxz command. We build libxz for use by Python in the installer job. I don't see a reason to add this. ---------- assignee: ronaldoussoren -> ned.deily _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16315> _______________________________________ From report at bugs.python.org Thu Oct 25 01:08:07 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Oct 2012 23:08:07 +0000 Subject: [issue9517] Make test.script_helper more comprehensive, and use it in the test suite In-Reply-To: <1280962247.74.0.724550733964.issue9517@psf.upfronthosting.co.za> Message-ID: <1351120087.28.0.248553601817.issue9517@psf.upfronthosting.co.za> Ezio Melotti added the comment: > There's already strip_python_stderr() :) This is already used in Lib/test/script_helper.py:42, and a way to call _assert_python() without using -E has also been introduced[0]. The next step would be to check if these functions could be used elsewhere in the other tests. Also note that these functions are not currently documented anywhere. [0]: http://hg.python.org/cpython/diff/f4b7ecf8a5f8/Lib/test/script_helper.py ---------- stage: -> needs patch versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9517> _______________________________________ From report at bugs.python.org Thu Oct 25 01:09:24 2012 From: report at bugs.python.org (Jeremy Brock) Date: Wed, 24 Oct 2012 23:09:24 +0000 Subject: [issue16318] FTP_TLS in ftplib not supporting prot_p storlines in FTP7.5 Message-ID: <1351120164.32.0.969400884781.issue16318@psf.upfronthosting.co.za> New submission from Jeremy Brock: Recently I have been working on a project to utilize the new FTP_TLS library from ftplib in Python 2.7.3. What I found is that no matter what I try, when prot_p() is called prior to transferring files to 2008 Server R2 running FTP7.5, the python client connection no longer is able to transfer files to the FTP7.5 server resulting in *get* '425 Data channel timed out due to not meeting the minimum bandwidth requirement.\r\n' . I have reproduced this in Python 2.7.3 on HPUX and Windows. I am able to successfully transfer files using winscp and Filezilla to the same FTP7.5 server using FTPes with Prot_P in Active Mode. ---------- components: Library (Lib) files: FTP7.5 Issues Documentation.zip messages: 173719 nosy: Jeremy.Brock priority: normal severity: normal status: open title: FTP_TLS in ftplib not supporting prot_p storlines in FTP7.5 type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file27706/FTP7.5 Issues Documentation.zip _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16318> _______________________________________ From report at bugs.python.org Thu Oct 25 01:11:01 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Oct 2012 23:11:01 +0000 Subject: [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1351120261.93.0.0841214562344.issue11015@psf.upfronthosting.co.za> Ezio Melotti added the comment: > There are some other helper modules (such as test.script_helper) > that could also stand to be made easier to find. Documenting script_helper.py would be good too. I seem to remember some discussion about merging it with support.py -- if that happens it can be documented there, otherwise a separate section/file should be created. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11015> _______________________________________ From report at bugs.python.org Thu Oct 25 01:22:22 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Oct 2012 23:22:22 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <1351120942.39.0.173737483204.issue15494@psf.upfronthosting.co.za> Ezio Melotti added the comment: Tonight I was looking for assert_python_failure() in test.support, and it took me a while to figure out it was in script_helper.py instead. As suggested in msg166778 by Antoine, I would rather pick option 1 and merge everything in test.support, rather than further scattering these functions among different files. ---------- keywords: +easy versions: -Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15494> _______________________________________ From report at bugs.python.org Thu Oct 25 01:32:41 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 24 Oct 2012 23:32:41 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1351120942.39.0.173737483204.issue15494@psf.upfronthosting.co.za> Message-ID: <CADiSq7ebc=JSCM+HWf2-N+SYwAnybD61S8_yf5x2FwqsiHzx8Q@mail.gmail.com> Nick Coghlan added the comment: test.support will become a package in 3.3 and trunk after the final 3.2 release goes out. Excessively large source files are a sign of bad software design. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15494> _______________________________________ From report at bugs.python.org Thu Oct 25 01:40:14 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Oct 2012 23:40:14 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <1351122014.57.0.772620958591.issue15494@psf.upfronthosting.co.za> Ezio Melotti added the comment: > Excessively large source files are a sign of bad software design. Are there actual reasons that support this claim? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15494> _______________________________________ From report at bugs.python.org Thu Oct 25 01:54:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Oct 2012 23:54:23 +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: <1351122863.29.0.00844647842369.issue16218@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Test added. ---------- stage: test needed -> patch review Added file: http://bugs.python.org/file27707/pythonrun_filename_decoding_2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16218> _______________________________________ From report at bugs.python.org Thu Oct 25 02:06:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 00:06:03 +0000 Subject: [issue1634034] Show "expected" token on syntax error Message-ID: <1351123563.23.0.232718517148.issue1634034@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated (thanks Benjamin for comments). ---------- Added file: http://bugs.python.org/file27708/syntax-error-hints-3.4_2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1634034> _______________________________________ From report at bugs.python.org Thu Oct 25 02:16:26 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 00:16:26 +0000 Subject: [issue1634034] Show "expected" token on syntax error Message-ID: <1351124186.74.0.815374224935.issue1634034@psf.upfronthosting.co.za> Ezio Melotti added the comment: Looking at the changes in the patch it seems to me that, in at least a few cases, it's better to have a bare "invalid syntax" than a misleading error. For example: >>> dict(a = i for i in range(10)) + SyntaxError: invalid syntax - ')' expected The () are ok, the message is misleading. >>> obj.None = 1 +SyntaxError: invalid syntax - name expected 'name' here is a bit vague. >>> def f(x, None): ... pass +SyntaxError: invalid syntax - ')' expected >>> def f(*None): ... pass +SyntaxError: invalid syntax - ')' expected Here the () are ok too. >>> def f(**None): ... pass +SyntaxError: invalid syntax - name expected Here I would have expected the "')' expected" like in the previous example, but there's "name" instead (which is a bit better, albeit inconsistent). I wouldn't consider this an improvement, but for other situations the error message is probably useful. I see 3 options here: 1) we find a way to show the expected token only when the message is not misleading; 2) if the expected token is useful more often than it is misleading, then we could apply the patch as is; 3) if it is misleading more often than it is useful, it's probably better to reject the patch. ---------- nosy: +ezio.melotti _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1634034> _______________________________________ From report at bugs.python.org Thu Oct 25 02:26:23 2012 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 25 Oct 2012 00:26:23 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1351122014.57.0.772620958591.issue15494@psf.upfronthosting.co.za> Message-ID: <CADiSq7f_uet=chErHEOm_wEcaTVCFb2c4PAARb5x5P5vubVMzg@mail.gmail.com> Nick Coghlan added the comment: Umm, WTF? You're really asking me to justify the basic software engineering principle that modularity is good, and wanting to dump everything in one file is one of the classic signs that your architectural design is non-existent and you have completely failed to adequately decompose your problem into smaller ones? Here it's even worse, because we *have* already done that decomposition, and people are proposing that we *abandon it*. The classic work on the physical design of software is probably Large Scale C++ Software Design from Lakos, and even though much of that is C++ specific (and the technical specifics are now rather dated even in that space), the general principles of understanding your physical dependencies and allowing suitable levels of granularity in your dependency hierarchy holds regardless of your development language. Small is beautiful (but not too small, that way lies madness). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15494> _______________________________________ From report at bugs.python.org Thu Oct 25 02:55:09 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Thu, 25 Oct 2012 00:55:09 +0000 Subject: [issue16309] "PYTHONPATH=" different from no PYTHONPATH at all In-Reply-To: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za> Message-ID: <1351126509.39.0.761140570827.issue16309@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>: ---------- nosy: +Arfrever _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16309> _______________________________________ From report at bugs.python.org Thu Oct 25 03:06:09 2012 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Oct 2012 01:06:09 +0000 Subject: [issue16315] Support xz compression in Mac build script In-Reply-To: <1351114834.01.0.950919502981.issue16315@psf.upfronthosting.co.za> Message-ID: <1351127169.9.0.071077064728.issue16315@psf.upfronthosting.co.za> Ned Deily added the comment: Serhiy, I see that the context for this patch is that you have been providing xz patches for various parts of Python. For the reasons I mentioned, this particular patch is not needed nor will it work as is on OS X. So I am rejecting it for now. ---------- resolution: -> rejected stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16315> _______________________________________ From report at bugs.python.org Thu Oct 25 03:12:04 2012 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Oct 2012 01:12:04 +0000 Subject: [issue16318] FTP_TLS in ftplib not supporting prot_p storlines in FTP7.5 In-Reply-To: <1351120164.32.0.969400884781.issue16318@psf.upfronthosting.co.za> Message-ID: <1351127524.89.0.522804523893.issue16318@psf.upfronthosting.co.za> Changes by Ned Deily <nad at acm.org>: ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16318> _______________________________________ From report at bugs.python.org Thu Oct 25 05:22:49 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 25 Oct 2012 03:22:49 +0000 Subject: [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1351135369.88.0.60030186998.issue16278@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Before we discuss wording, it's not clear to me whether all possibilities have been checked. I count 2*3*2=12 possibilities to check (excluding src and dst being on different filesystems): src: file or directory dst: file, empty directory, or non-empty directory os: Unix or Windows Also, do we have tests for all of these scenarios before we document it? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16278> _______________________________________ From report at bugs.python.org Thu Oct 25 05:32:10 2012 From: report at bugs.python.org (Roger Serwy) Date: Thu, 25 Oct 2012 03:32:10 +0000 Subject: [issue15808] Possibility of setting custom key bindings for "Additional help sources" menu items In-Reply-To: <1346239424.4.0.436515008596.issue15808@psf.upfronthosting.co.za> Message-ID: <1351135930.3.0.261602964434.issue15808@psf.upfronthosting.co.za> Changes by Roger Serwy <roger.serwy at gmail.com>: ---------- nosy: +serwy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15808> _______________________________________ From report at bugs.python.org Thu Oct 25 07:17:18 2012 From: report at bugs.python.org (Chris Rebert) Date: Thu, 25 Oct 2012 05:17:18 +0000 Subject: [issue13510] Clarify that readlines() is not needed to iterate over a file In-Reply-To: <1322674949.97.0.856520026774.issue13510@psf.upfronthosting.co.za> Message-ID: <1351142238.27.0.0963448066306.issue13510@psf.upfronthosting.co.za> Chris Rebert added the comment: file.readlines() (and perhaps dare I say even file.readline()) should not even be mentioned in the tutorial, IMO. It is difficult to imagine a use case where just iterating over the file object isn't superior. I cannot remember the last time that I have used either of these methods. They ought to be relegated to the library docs. Presenting `for line in a_file:` as merely "An alternative approach" in the official tutorial is practically archaic. ---------- nosy: +cvrebert _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13510> _______________________________________ From report at bugs.python.org Thu Oct 25 08:06:38 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Thu, 25 Oct 2012 06:06:38 +0000 Subject: [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <1351145198.77.0.207816775186.issue16241@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Andrew: Generally all changes deserve a Misc/NEWS entry, see: http://docs.python.org/devguide/committing.html#news-entries The feature was new in 3.3, but this change only went in after the release of 3.3.0, so ISTM that a Misc/NEWS entry is required. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16241> _______________________________________ From report at bugs.python.org Thu Oct 25 08:15:53 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 25 Oct 2012 06:15:53 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <CADiSq7ebc=JSCM+HWf2-N+SYwAnybD61S8_yf5x2FwqsiHzx8Q@mail.gmail.com> Message-ID: <1351145628.3330.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > test.support will become a package in 3.3 and trunk after the final 3.2 > release goes out. > > Excessively large source files are a sign of bad software design. Do you weigh in the python-dev discussion about splitting unicodeobject.c? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15494> _______________________________________ From report at bugs.python.org Thu Oct 25 08:17:06 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 25 Oct 2012 06:17:06 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <1351145826.72.0.897677346568.issue15494@psf.upfronthosting.co.za> Antoine Pitrou added the comment: s/Do you weigh in/Do you want to weigh in/, sorry. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15494> _______________________________________ From report at bugs.python.org Thu Oct 25 08:22:47 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 25 Oct 2012 06:22:47 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <1351146167.91.0.162416779274.issue15494@psf.upfronthosting.co.za> Chris Jerdonek added the comment: >> Excessively large source files are a sign of bad software design. > > Do you [want to] weigh in the python-dev discussion about splitting > unicodeobject.c? Nick did weigh in starting here: http://mail.python.org/pipermail/python-dev/2012-October/122391.html ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15494> _______________________________________ From report at bugs.python.org Thu Oct 25 08:24:20 2012 From: report at bugs.python.org (Inyeol Lee) Date: Thu, 25 Oct 2012 06:24:20 +0000 Subject: [issue16319] optional comma inside function argument list triggers syntax error Message-ID: <1351146260.34.0.857834219193.issue16319@psf.upfronthosting.co.za> New submission from Inyeol Lee: Ubuntu 12.04, python 3.2.3 Optional trailing comma causes syntax error if used for keyword-only argument list: These are OK -- def f(a, b,): pass def f(a, b=None,): pass These triggers syntax error -- def f(a, *, b,): pass def f(a, *, b=None,): pass python 3.1 and 3.2 shows this error, not tested for 3.3 yet. ---------- components: Interpreter Core messages: 173735 nosy: Inyeol.Lee priority: normal severity: normal status: open title: optional comma inside function argument list triggers syntax error type: behavior versions: Python 3.2 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16319> _______________________________________ From report at bugs.python.org Thu Oct 25 08:26:31 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 25 Oct 2012 06:26:31 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <1351146391.03.0.151680315652.issue15494@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ah, ok. Perhaps I should read python-dev before talking about it! ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15494> _______________________________________ From report at bugs.python.org Thu Oct 25 08:27:37 2012 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 25 Oct 2012 06:27:37 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <1351146457.49.0.896492344853.issue15494@psf.upfronthosting.co.za> Nick Coghlan added the comment: I already did, that thread 'tis a large part of why I'm somewhat irritable in relation to this topic today. "Huge source files are inherently bad because they provide no hint as to the modular breakdown and encourage excessive coupling between subcomponents" is just such a basic assumption of physical software design that I'm completely dumbfounded that people are questioning it. If the objections were "I think this particular proposed breakdown is bad", it would be one thing, but most of them aren't, they're "I don't think it should be broken up at all for stupidly trivial reasons that have nothing to do with anything". ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15494> _______________________________________ From report at bugs.python.org Thu Oct 25 09:01:26 2012 From: report at bugs.python.org (Janne Karila) Date: Thu, 25 Oct 2012 07:01:26 +0000 Subject: [issue16307] multiprocess.pool.map_async callables not working In-Reply-To: <1351062852.0.0.92760767978.issue16307@psf.upfronthosting.co.za> Message-ID: <1351148486.22.0.548683750007.issue16307@psf.upfronthosting.co.za> Janne Karila added the comment: I'm working on the test. It keeps failing... ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16307> _______________________________________ From report at bugs.python.org Thu Oct 25 09:10:49 2012 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 25 Oct 2012 07:10:49 +0000 Subject: [issue16299] __build__ as a temp build directory for setup.py In-Reply-To: <1350914321.82.0.675095841484.issue16299@psf.upfronthosting.co.za> Message-ID: <1351149049.96.0.483881756792.issue16299@psf.upfronthosting.co.za> anatoly techtonik added the comment: That's not an argument. I am asking about it in general. Another wart of Python. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16299> _______________________________________ From report at bugs.python.org Thu Oct 25 09:28:10 2012 From: report at bugs.python.org (Chris Rebert) Date: Thu, 25 Oct 2012 07:28:10 +0000 Subject: [issue14616] subprocess docs should mention pipes.quote/shlex.quote In-Reply-To: <1334769157.78.0.557014485739.issue14616@psf.upfronthosting.co.za> Message-ID: <1351150090.65.0.826203631969.issue14616@psf.upfronthosting.co.za> Chris Rebert added the comment: No, the thought merely did not occur to me. I don't recall having seen such forward-looking notes in Python's documentation before. Should the pipes.quote() mention be axed from the 3.x patch? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14616> _______________________________________ From report at bugs.python.org Thu Oct 25 09:46:01 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 25 Oct 2012 07:46:01 +0000 Subject: [issue16319] optional comma inside function argument list triggers syntax error In-Reply-To: <1351146260.34.0.857834219193.issue16319@psf.upfronthosting.co.za> Message-ID: <1351151161.29.0.535003008928.issue16319@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I could be misinterpreting the documentation, but it looks to me like the examples given are behaving as documented: parameter_list ::= (defparameter ",")* ( "*" [parameter] ("," defparameter)* [, "**" parameter] | "**" parameter | defparameter [","] ) (from http://docs.python.org/dev/reference/compound_stmts.html#function-definitions ) The relevant clause in the above looks to be the following, which can't give rise to a trailing comma: "*" [parameter] ("," defparameter)* [, "**" parameter] ---------- nosy: +chris.jerdonek _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16319> _______________________________________ From report at bugs.python.org Thu Oct 25 09:51:34 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 25 Oct 2012 07:51:34 +0000 Subject: [issue16319] optional comma inside function argument list triggers syntax error In-Reply-To: <1351146260.34.0.857834219193.issue16319@psf.upfronthosting.co.za> Message-ID: <1351151494.75.0.384389445301.issue16319@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Duplicate of issue 9232 (enhancement request). ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Allow trailing comma in any function argument list. _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16319> _______________________________________ From report at bugs.python.org Thu Oct 25 10:02:16 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 25 Oct 2012 08:02:16 +0000 Subject: [issue16315] Support xz compression in Mac build script In-Reply-To: <1351114834.01.0.950919502981.issue16315@psf.upfronthosting.co.za> Message-ID: <1351152136.29.0.069665562146.issue16315@psf.upfronthosting.co.za> Ronald Oussoren added the comment: For the record: I agree with Ned, the patch is not needed at this time and won't work as is anyway (in particular: tar on OSX does not have an 'J' option, so even if you install the lzma tools the patch won't work) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16315> _______________________________________ From report at bugs.python.org Thu Oct 25 10:38:45 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 25 Oct 2012 08:38:45 +0000 Subject: [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <3XnMF03TvGzPPD@mail.python.org> Roundup Robot added the comment: New changeset e816851fb30d by Andrew Svetlov in branch '3.3': Update NEWS for issue #16241 http://hg.python.org/cpython/rev/e816851fb30d New changeset af93948ca33d by Andrew Svetlov in branch 'default': Update NEWS for issue #16241 http://hg.python.org/cpython/rev/af93948ca33d ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16241> _______________________________________ From report at bugs.python.org Thu Oct 25 10:39:19 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 25 Oct 2012 08:39:19 +0000 Subject: [issue16241] "-X faulthandler" is not documented in -X option docs In-Reply-To: <1350313521.23.0.589479174065.issue16241@psf.upfronthosting.co.za> Message-ID: <1351154359.76.0.211125327035.issue16241@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Well, I have updated the NEWS file. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16241> _______________________________________ From report at bugs.python.org Thu Oct 25 11:00:37 2012 From: report at bugs.python.org (Armin Rigo) Date: Thu, 25 Oct 2012 09:00:37 +0000 Subject: [issue16309] "PYTHONPATH=" different from no PYTHONPATH at all In-Reply-To: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za> Message-ID: <1351155637.08.0.489689071056.issue16309@psf.upfronthosting.co.za> Armin Rigo added the comment: Attached the diff, in case we want to do that. The diff is only about non-Windows platforms, given that it follows a Posix use case about PATH. But do we also need to change PC/getpathp.c? ---------- keywords: +patch Added file: http://bugs.python.org/file27709/pythonpath.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16309> _______________________________________ From report at bugs.python.org Thu Oct 25 11:07:17 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 09:07:17 +0000 Subject: [issue16320] Establish order in bytes/string dependencies Message-ID: <1351156037.64.0.017004315605.issue16320@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch reorganizes the dependencies for bytes and strings. Now object files depended only from needed (and from all needed) headers. This will reduce the compilation time when modifying the bytes implementation. ---------- components: Build, Unicode files: Makefile.pre.in.diff keywords: patch messages: 173747 nosy: ezio.melotti, haypo, serhiy.storchaka priority: normal severity: normal status: open title: Establish order in bytes/string dependencies type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27710/Makefile.pre.in.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16320> _______________________________________ From report at bugs.python.org Thu Oct 25 11:14:19 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 09:14:19 +0000 Subject: [issue16315] Support xz compression in Mac build script In-Reply-To: <1351127169.9.0.071077064728.issue16315@psf.upfronthosting.co.za> Message-ID: <201210251214.06053.storchaka@gmail.com> Serhiy Storchaka added the comment: OK. I thought that xz support was just forgot. The xz compression was very popular in the Linux distributives over the past few years. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16315> _______________________________________ From report at bugs.python.org Thu Oct 25 11:15:51 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 09:15:51 +0000 Subject: [issue16320] Establish order in bytes/string dependencies In-Reply-To: <1351156037.64.0.017004315605.issue16320@psf.upfronthosting.co.za> Message-ID: <1351156551.25.0.0549247995304.issue16320@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16320> _______________________________________ From report at bugs.python.org Thu Oct 25 11:29:39 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 09:29:39 +0000 Subject: [issue16321] Move eq.h out of stringlib Message-ID: <1351157379.02.0.714048258846.issue16321@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The Objects/stringlib directory used for "templates" which instantiates for specified bytes or unicode kinds. Objects/stringlib/eq.h has no relation to this "templates" and should be moved out (as Objects/unicode_eq.h for example). Also it should be removed from Include/Python.h. It used only in Objects/dictobject.c and Objects/setobject.c, and included there directly. ---------- components: Interpreter Core, Unicode messages: 173749 nosy: ezio.melotti, haypo, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Move eq.h out of stringlib type: enhancement versions: Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16321> _______________________________________ From report at bugs.python.org Thu Oct 25 11:44:07 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 25 Oct 2012 09:44:07 +0000 Subject: [issue16318] FTP_TLS in ftplib not supporting prot_p storlines in FTP7.5 In-Reply-To: <1351120164.32.0.969400884781.issue16318@psf.upfronthosting.co.za> Message-ID: <1351158247.1.0.206033942861.issue16318@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Have you tried to see what happens in passive mode (use: ftps.set_pasv(True))? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16318> _______________________________________ From report at bugs.python.org Thu Oct 25 11:52:24 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 25 Oct 2012 09:52:24 +0000 Subject: [issue16305] possible segfault in math.factorial In-Reply-To: <1351031608.7.0.419151487248.issue16305@psf.upfronthosting.co.za> Message-ID: <3XnNsz6jBTzR95@mail.python.org> Roundup Robot added the comment: New changeset 19ed42e84030 by Mark Dickinson in branch '3.3': Issue #16305: Merge fix from 3.2. http://hg.python.org/cpython/rev/19ed42e84030 New changeset cbdd6852a274 by Mark Dickinson in branch 'default': Issue #16305: Merge fix from 3.3. http://hg.python.org/cpython/rev/cbdd6852a274 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16305> _______________________________________ From report at bugs.python.org Thu Oct 25 12:21:27 2012 From: report at bugs.python.org (Janne Karila) Date: Thu, 25 Oct 2012 10:21:27 +0000 Subject: [issue16307] multiprocess.pool.map_async callables not working In-Reply-To: <1351062852.0.0.92760767978.issue16307@psf.upfronthosting.co.za> Message-ID: <1351160487.64.0.983141458184.issue16307@psf.upfronthosting.co.za> Janne Karila added the comment: Three test cases added. The tricky part in writing the tests was to realize that when the tests are run with Manager, the callback goes through a proxy object. ---------- Added file: http://bugs.python.org/file27711/test_callback.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16307> _______________________________________ From report at bugs.python.org Thu Oct 25 12:33:20 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 25 Oct 2012 10:33:20 +0000 Subject: [issue16305] possible segfault in math.factorial In-Reply-To: <1351031608.7.0.419151487248.issue16305@psf.upfronthosting.co.za> Message-ID: <1351161200.8.0.0378623189642.issue16305@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed in 3.2, 3.3 and default. Thanks Amaury for the report and diagnosis! (I forget to add the issue number in the 3.2 commit: the changeset is b4bfcf7a4773.) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16305> _______________________________________ From report at bugs.python.org Thu Oct 25 13:56:45 2012 From: report at bugs.python.org (Stefan Holek) Date: Thu, 25 Oct 2012 11:56:45 +0000 Subject: [issue16310] zipfile: allow surrogates in filenames In-Reply-To: <1351082025.34.0.287428579283.issue16310@psf.upfronthosting.co.za> Message-ID: <1351166205.18.0.468540901885.issue16310@psf.upfronthosting.co.za> Stefan Holek added the comment: What we are trying to do is make distribute work with non-ASCII filenames, and this is one of the things we ran into. Fact 1: Filenames are bytes, whether you like it or not. Treating them as strings is going to give you more trouble than dragging the bytes along. Fact 2: Surrogates are Python 3's way of dealing with bytes. Fact 3: What follows is that surrogates must be supported wherever Python 3 deals with filenames. Fact 4: This is a *bug* since Python breaks its own rules here (I have removed the enhancement marker). The issue is not what ZIP can do, but what Python 3 *must* do. Creating a potentially non-standard ZIP file is fine, exploding in the user's face is not. ---------- type: enhancement -> versions: +Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16310> _______________________________________ From report at bugs.python.org Thu Oct 25 13:56:50 2012 From: report at bugs.python.org (Masami HIRATA) Date: Thu, 25 Oct 2012 11:56:50 +0000 Subject: [issue16322] time.tzname on Python 3.3.0 for Windows is decoded by wrong encoding Message-ID: <1351166210.69.0.0993824857313.issue16322@psf.upfronthosting.co.za> New submission from Masami HIRATA: OS: Windows 7 Starter Edition SP1 (32-bit) Japanese version Python: 3.3.0 for Windows x86 (python-3.3.0.msi) time.tzname on Python 3.3.0 for Windows is decoded by wrong encoding. C:\Python33>python.exe Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (In tel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> time.tzname[0] '\x93\x8c\x8b\x9e (\x95W\x8f\x80\x8e\x9e)' >>> time.tzname[0].encode('iso-8859-1').decode('mbcs') '?? (???)' >>> '?? (???)' means 'Tokyo (Standard Time)' in Japanese. time.tzname on Python 3.2.3 for Windows works correctly. C:\Python32>python.exe Python 3.2.3 (default, Apr 11 2012, 07:15:24) [MSC v.1500 32 bit (Intel)] on win 32 Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> time.tzname[0] '?? (???)' >>> ---------- components: Windows messages: 173755 nosy: msmhrt priority: normal severity: normal status: open title: time.tzname on Python 3.3.0 for Windows is decoded by wrong encoding type: behavior versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16322> _______________________________________ From report at bugs.python.org Thu Oct 25 15:30:57 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 13:30:57 +0000 Subject: [issue16310] zipfile: allow surrogates in filenames In-Reply-To: <1351082025.34.0.287428579283.issue16310@psf.upfronthosting.co.za> Message-ID: <1351171857.42.0.21780083211.issue16310@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If we allow for surrogates in the names, it will not correct UTF-8. This can breaks other software. We should clear 11th flag bit in this case. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16310> _______________________________________ From report at bugs.python.org Thu Oct 25 15:46:59 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 13:46:59 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <1351172819.67.0.911481515079.issue15494@psf.upfronthosting.co.za> Ezio Melotti added the comment: > Umm, WTF? You're really asking me to justify the basic software > engineering principle that modularity is good, I'm aware of the principle -- what I'm asking is what practical advantages this will bring (practicality beats purity). > and wanting to dump everything in one file is one of the classic signs > that your architectural design is non-existent and you have completely > failed to adequately decompose your problem into smaller ones? As I see it, test.support is a module containing miscellaneous helper functions to be used in the tests. Therefore, if I'm looking for an helper function (like assert_python*()), I could just open the file and find it there. This is especially true for *generic* helper functions, like assert_python* (not widely used, see #9517) and temp_dir (duplicated in support.py, see #15376). Both these issues were probably caused by the fact that people didn't know about script_helper.py and ended up implementing their own versions of the functions either in the test files or in support.py. Something similar happened with requires_zlib (and possibly a few others) too -- it was defined in several test modules before being moved to support.py. Having several modules doesn't solve the problem of discoverability -- it actually make it worse by adding another level of indirection (find what files do you have and which one is the right one -> find what you are looking for in the right file). I often look at the code from hg.python.org, and ctrl+f there clearly covers only one file. Similarly inspecting/grepping a single file is easier than doing it for multiple files, especially if you don't know what the other files are. If people are not trying to find a specific function, but rather want an overview of the helper test functions, we could (and should) document them like we did with Doc/library/test.rst and have sections there. For example if I `ls` Lib/test/support/ and see a script_helper.py file, I could hardly guess that it contains functions to run python in a subprocress. This could be easily explained in the doc. That said, I should mention that 1) I'm not sure how many other helper modules there are around, how big they are, and how well things are already divided; 2) I don't know the structure that you want to use for the package. If you are just grouping the existing helper modules in a package and if the namespace is kept flat (so that we don't end up with test.support.whatever.TESTFN), then I agree that it's an improvement. If you are planning to further split support.py, then I'm -1. > "Huge source files are inherently bad because they > provide no hint as to the modular breakdown I can't think off the top of my head of a sensible breakdown for support.py. I can see that the assert/kill/spawn/python functions are all related, but the current module division seems to me quite arbitrary. Why import(_fresh)_module and related functions are not on their own module even if they have more code than all the assert/kill/spawn_python functions? Should all the skip/require decorators in support.py get their own module? What about the context manages like run_with_locale, temp_dir, temp_umask, EnvironmentVarGuard, etc.? Why script_helper contains helper functions to run python in a subprocess and also helper functions for scripts? > If the objections were "I think this particular proposed > breakdown is bad" If you suggest a breakdown I can provide better objections, however I think it's already broken down enough (and maybe even too much). > I already did, that thread 'tis a large part of why > I'm somewhat irritable in relation to this topic today. Same here, just in the opposite directions ;) P.S. incidentally the other day someone asked me where unittest.main was defined because he couldn't find it using "Find in files". We tried looking in __main__.py and __init__.py for "def main" and it wasn't there, but we noticed a "from .main import TestProgram, main". So we looked in main.py for a "def main" and still couldn't find it, so we looked for just "main". Eventually we found a "main = TestProgram" at the very bottom of main.py. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15494> _______________________________________ From report at bugs.python.org Thu Oct 25 15:47:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 13:47:12 +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: <1351172832.86.0.722561540902.issue16322@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I see in 3.3 PyUnicode_DecodeFSDefaultAndSize() was replaced by PyUnicode_DecodeLocale(). What show sys.getdefaultencoding(), sys.getfilesystemencoding(), and locale.getpreferredencoding()? ---------- components: +Extension Modules keywords: +3.3regression nosy: +serhiy.storchaka versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16322> _______________________________________ From report at bugs.python.org Thu Oct 25 15:51:29 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 25 Oct 2012 13:51:29 +0000 Subject: [issue14616] subprocess docs should mention pipes.quote/shlex.quote In-Reply-To: <1334769157.78.0.557014485739.issue14616@psf.upfronthosting.co.za> Message-ID: <1351173089.96.0.401190255081.issue14616@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I think patch for 3.3 should mention only shlex.quote. I don't care about 2.7 patch but it looks good to me. ---------- nosy: +asvetlov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14616> _______________________________________ From report at bugs.python.org Thu Oct 25 15:56:33 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 25 Oct 2012 13:56:33 +0000 Subject: [issue16272] C-API documentation clarification for tp_dictoffset In-Reply-To: <1350520063.61.0.687481658196.issue16272@psf.upfronthosting.co.za> Message-ID: <1351173393.22.0.604210962627.issue16272@psf.upfronthosting.co.za> Changes by Andrew Svetlov <andrew.svetlov at gmail.com>: ---------- nosy: +asvetlov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16272> _______________________________________ From report at bugs.python.org Thu Oct 25 15:57:35 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 13:57:35 +0000 Subject: [issue16323] Wrong C API documentation for locale encoding Message-ID: <1351173455.0.0.737976146006.issue16323@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The documentation for PyUnicode_DecodeLocale() and PyUnicode_EncodeLocale() are wrong. The second parameter described as "int surrogateescape", but actually it is "const char *errors". ---------- assignee: docs at python components: Documentation, Unicode messages: 173760 nosy: docs at python, ezio.melotti, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Wrong C API documentation for locale encoding type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16323> _______________________________________ From report at bugs.python.org Thu Oct 25 16:36:53 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 25 Oct 2012 14:36:53 +0000 Subject: [issue13510] Clarify that readlines() is not needed to iterate over a file In-Reply-To: <1322674949.97.0.856520026774.issue13510@psf.upfronthosting.co.za> Message-ID: <1351175813.95.0.539699828268.issue13510@psf.upfronthosting.co.za> ?ric Araujo added the comment: readlines might be discouraged; readline has its use cases (two days ago I used it to get one line to pass to csv.Sniffer.sniff), but next(file) works too, so it could be de-emphasized. There may be a difference with respect to the trailing newline however; I don?t remember if __iter__ or readline keep it or not. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13510> _______________________________________ From report at bugs.python.org Thu Oct 25 16:40:01 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 14:40:01 +0000 Subject: [issue13510] Clarify that readlines() is not needed to iterate over a file In-Reply-To: <1322674949.97.0.856520026774.issue13510@psf.upfronthosting.co.za> Message-ID: <1351176001.48.0.204657603585.issue13510@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- keywords: +easy versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13510> _______________________________________ From report at bugs.python.org Thu Oct 25 16:50:52 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 25 Oct 2012 14:50:52 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <1351176652.23.0.6249361886.issue15494@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Since "basic software engineering principles" have been invoked, I'd like to point out that many of the standard motivations to modularization don't apply in this case. So it is fair to ask what *specific* benefits such a restructuring may have. Such a description is necessary in advance in order to determine whether a specific restructuring actually achieves the stated objectives. In the Wikipedia article on "Modular programming", the main advantage (as in "top-down design") is that you can decompose a yet-to-be-built system upfront, and split the work into several teams, which then can develop the system independently, and only need to integrate at the end. This is less relevant as the system in question is already built. Another motivation given in Wikipedia is reuse in different systems. There isn't really any reuse planned for the code in question, but perhaps reuse in other Python implementations would make a point. If that is the motivation, the split should be to separate CPython support code from other support code. The wikipedia article also claims that the code is easier to debug, update, and modify. Easier modification may come from the notion of abstract interfaces: the module implementation can be changed without affecting module use (if the interfaces are unchanged. For this case, the code is already at a module boundary (of the support module); I fail to see why further modularization would improve anything. Easier debugging may come from less code being involved in a certain code path. Mere refactoring cannot improve that. You have to rewrite the functions, but that would be possible even without splitting the module. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15494> _______________________________________ From report at bugs.python.org Thu Oct 25 17:42:19 2012 From: report at bugs.python.org (Armin Rigo) Date: Thu, 25 Oct 2012 15:42:19 +0000 Subject: [issue16309] "PYTHONPATH=" different from no PYTHONPATH at all In-Reply-To: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za> Message-ID: <1351179739.32.0.347255756796.issue16309@psf.upfronthosting.co.za> Armin Rigo added the comment: Attached another simpler diff (only one "+" line instead of two...). ---------- Added file: http://bugs.python.org/file27712/pythonpath2.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16309> _______________________________________ From report at bugs.python.org Thu Oct 25 17:49:32 2012 From: report at bugs.python.org (Claude Paroz) Date: Thu, 25 Oct 2012 15:49:32 +0000 Subject: [issue16324] MIMEText __init__ does not support Charset instance Message-ID: <1351180172.93.0.972082460953.issue16324@psf.upfronthosting.co.za> New submission from Claude Paroz: When initializing a MIMEText instance, it might be desirable to set the _charset parameter to a real Charset instance, not only a charset identifier (for example to pass a Charset with customized body_encoding). Unfortunately, this is failing: File ".../django/core/mail/message.py", line 128, in __init__ MIMEText.__init__(self, text, subtype, charset) File "/usr/lib/python3.2/email/mime/text.py", line 29, in __init__ **{'charset': _charset}) File "/usr/lib/python3.2/email/mime/base.py", line 25, in __init__ self.add_header('Content-Type', ctype, **_params) File "/usr/lib/python3.2/email/message.py", line 475, in add_header parts.append(_formatparam(k.replace('_', '-'), v)) File "/usr/lib/python3.2/email/message.py", line 67, in _formatparam if value is not None and len(value) > 0: TypeError: object of type 'Charset' has no len() It is possible to later call set_charset, but the payload is already encoded (and 'Content-Transfer-Encoding' is set). Did I miss anything? ---------- components: email messages: 173764 nosy: barry, claudep, r.david.murray priority: normal severity: normal status: open title: MIMEText __init__ does not support Charset instance type: behavior versions: Python 3.2 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16324> _______________________________________ From report at bugs.python.org Thu Oct 25 18:17:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 16:17:30 +0000 Subject: [issue11160] ZipFile.comment expects bytes In-Reply-To: <1297264140.97.0.306129367766.issue11160@psf.upfronthosting.co.za> Message-ID: <1351181850.16.0.15208403656.issue11160@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The ZIP specification says: """ If general purpose bit 11 is unset, the file name and comment should conform to the original ZIP character encoding. If general purpose bit 11 is set, the filename and comment must support The Unicode Standard, Version 4.1.0 or greater using the character encoding form defined by the UTF-8 storage specification. The Unicode Standard is published by the The Unicode Consortium (www.unicode.org). UTF-8 encoded data stored within ZIP files is expected to not include a byte order mark (BOM). """ Also there is extension for UTF-8 encoded file comment. All this means the file comment should be interpreted as an unicode string. However the specification says nothing about .ZIP file comment (except that encryption or data authentication is applied to it). Since changeset 4186f20d9fa4 ZipFile.comment raises TypeError on try to assign non-bytes. I think the documentation should be clarified. ---------- components: -Library (Lib) nosy: +serhiy.storchaka stage: -> needs patch type: -> enhancement versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11160> _______________________________________ From report at bugs.python.org Thu Oct 25 18:26:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 16:26:18 +0000 Subject: [issue16310] zipfile: allow surrogates in filenames In-Reply-To: <1351082025.34.0.287428579283.issue16310@psf.upfronthosting.co.za> Message-ID: <1351182378.62.0.923140947143.issue16310@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Related issues: issue10614, issue10757, issue10972. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16310> _______________________________________ From report at bugs.python.org Thu Oct 25 18:32:44 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 16:32:44 +0000 Subject: [issue11009] urllib.splituser is not documented In-Reply-To: <1295987078.02.0.421774194417.issue11009@psf.upfronthosting.co.za> Message-ID: <1351182764.38.0.369718334628.issue11009@psf.upfronthosting.co.za> Ezio Melotti added the comment: Doing that now will be backward incompatible, because people might be using these functions already even if they are not documented. An alias could be created, but I'm not sure it's worth doing it. ---------- nosy: +ezio.melotti status: pending -> open _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11009> _______________________________________ From report at bugs.python.org Thu Oct 25 18:34:40 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 16:34:40 +0000 Subject: [issue16216] Arithmetic operations with NULL In-Reply-To: <1350081908.35.0.947627906901.issue16216@psf.upfronthosting.co.za> Message-ID: <1351182880.02.0.0509786886713.issue16216@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- type: -> behavior _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16216> _______________________________________ From report at bugs.python.org Thu Oct 25 18:36:05 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 16:36:05 +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: <1351182965.36.0.247845326132.issue16217@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- components: +Library (Lib) nosy: +ezio.melotti stage: -> needs patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16217> _______________________________________ From report at bugs.python.org Thu Oct 25 18:44:46 2012 From: report at bugs.python.org (Eric Snow) Date: Thu, 25 Oct 2012 16:44:46 +0000 Subject: [issue16309] "PYTHONPATH=" different from no PYTHONPATH at all In-Reply-To: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za> Message-ID: <1351183486.68.0.4356942066.issue16309@psf.upfronthosting.co.za> Eric Snow added the comment: > Given how confusing it seems, perhaps we should change it to > adopt a PATH-like behaviour. Wouldn't that introduce a backward-compatibility issue? FWIW, otherwise I agree that it makes a lot of sense to conform to the same behavior as PATH. ---------- nosy: +eric.snow _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16309> _______________________________________ From report at bugs.python.org Thu Oct 25 18:48:39 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 16:48:39 +0000 Subject: [issue16219] segfault when using xml.etree.ElementTree.XMLTreeBuilder In-Reply-To: <1350148941.07.0.23902695609.issue16219@psf.upfronthosting.co.za> Message-ID: <1351183719.36.0.508527520572.issue16219@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +eli.bendersky status: pending -> open _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16219> _______________________________________ From report at bugs.python.org Thu Oct 25 18:58:35 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 16:58: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: <1351184315.92.0.372460839156.issue16309@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16309> _______________________________________ From report at bugs.python.org Thu Oct 25 18:59:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 16:59:27 +0000 Subject: [issue16309] "PYTHONPATH=" different from no PYTHONPATH at all In-Reply-To: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za> Message-ID: <1351184367.86.0.422202364051.issue16309@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: -> commit review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16309> _______________________________________ From report at bugs.python.org Thu Oct 25 19:20:17 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 17:20:17 +0000 Subject: [issue16239] PEP8 arithmetic operator examples In-Reply-To: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> Message-ID: <1351185617.38.0.56111608403.issue16239@psf.upfronthosting.co.za> Ezio Melotti added the comment: Attached a patch that modifies some of the example in the section. - x = x * 2 - 1 - hypot2 = x * x + y * y + x = x*2 - 1 + hypot2 = x*x + y*y Here I used more space around operators with lower priority. - x = x*2 - 1 - hypot2 = x*x + y*y - c = (a+b) * (a-b) + x = x * 2-1 + hypot2 = x*x + y * y + c = a+b * a-b These 3 examples in the "No" section show respectively: 1) more space around the operator with higher priority; 2) inconsistent spacing around operators with the same priority; 3) misleading spacing (similar to 1); I don't think it's necessary to mention 'x * 2 - 1' in either sections, because it's not wrong, but otoh 'x*2 - 1' is a better alternative. ---------- assignee: docs at python -> ezio.melotti keywords: +patch nosy: +ezio.melotti stage: -> patch review Added file: http://bugs.python.org/file27713/issue16239.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16239> _______________________________________ From report at bugs.python.org Thu Oct 25 19:25:10 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 17:25:10 +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: <1351185910.03.0.450994999895.issue16240@psf.upfronthosting.co.za> Ezio Melotti added the comment: I would use "It is possible to remove" rather than "One can remove", but otherwise the patch LGTM. ---------- nosy: +eric.araujo, ezio.melotti, terry.reedy stage: needs patch -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16240> _______________________________________ From report at bugs.python.org Thu Oct 25 19:27:57 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 17:27:57 +0000 Subject: [issue16271] weird dual behavior with changing __qualname__; different values observed through attribute and descriptor In-Reply-To: <1350517386.42.0.0716657058677.issue16271@psf.upfronthosting.co.za> Message-ID: <1351186077.34.0.295162706957.issue16271@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +ezio.melotti, pitrou type: -> behavior versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16271> _______________________________________ From report at bugs.python.org Thu Oct 25 19:28:33 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 17:28:33 +0000 Subject: [issue16285] Update urllib to RFC 3986 In-Reply-To: <1350644168.93.0.364254038155.issue16285@psf.upfronthosting.co.za> Message-ID: <1351186113.91.0.232570829171.issue16285@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +ezio.melotti _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16285> _______________________________________ From report at bugs.python.org Thu Oct 25 19:29:43 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 17:29:43 +0000 Subject: [issue16286] Optimize a==b and a!=b for bytes and str In-Reply-To: <1350650166.87.0.27478619259.issue16286@psf.upfronthosting.co.za> Message-ID: <1351186183.88.0.597346271368.issue16286@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +ezio.melotti stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16286> _______________________________________ From report at bugs.python.org Thu Oct 25 19:31:57 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 25 Oct 2012 17:31: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: <1351186317.98.0.470951959283.issue16322@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Looking at the CRT source code, tznames should be decoded with mbcs. See also http://mail.python.org/pipermail/python-3000/2007-August/009290.html ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16322> _______________________________________ From report at bugs.python.org Thu Oct 25 19:32:47 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 17:32:47 +0000 Subject: =?utf-8?q?=5Bissue16325=5D_PEP=C2=A08_refers_to_reference_to_PEP_8?= Message-ID: <1351186367.56.0.154772018317.issue16325@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: PEP?8 refers to Guido's original Python Style Guide essay (http://www.python.org/doc/essays/styleguide.html), but the essay was removed, only link to PEP?8 (and PEP 257) left. ---------- assignee: docs at python components: Documentation messages: 173773 nosy: docs at python, serhiy.storchaka priority: normal severity: normal status: open title: PEP?8 refers to reference to PEP 8 type: behavior _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16325> _______________________________________ From report at bugs.python.org Thu Oct 25 19:35:43 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 17:35:43 +0000 Subject: =?utf-8?q?=5Bissue16325=5D_PEP=C2=A08_refers_to_reference_to_PEP_8?= In-Reply-To: <1351186367.56.0.154772018317.issue16325@psf.upfronthosting.co.za> Message-ID: <1351186543.69.0.325312015885.issue16325@psf.upfronthosting.co.za> Ezio Melotti added the comment: The link might still be OK, otherwise we could copy the note directly in the PEP. ---------- nosy: +ezio.melotti _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16325> _______________________________________ From report at bugs.python.org Thu Oct 25 19:40:13 2012 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Thu, 25 Oct 2012 17:40:13 +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: <1351186813.62.0.110274364871.issue16240@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: Better (IMO): Wrap the meta-characters in brackets for a literal match. For example, ``'[?]'`` matches the character ``'?'``. ---------- nosy: +fdrake _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16240> _______________________________________ From report at bugs.python.org Thu Oct 25 19:41:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 17:41:16 +0000 Subject: [issue16239] PEP8 arithmetic operator examples In-Reply-To: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> Message-ID: <1351186876.4.0.833591007325.issue16239@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: >- x = x * 2 - 1 >- hypot2 = x * x + y * y Why you remove this? >- c = (a+b) * (a-b) >+ c = a+b * a-b This changes the semantic. >but otoh 'x*2 - 1' is a better alternative. Can you justify this? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16239> _______________________________________ From report at bugs.python.org Thu Oct 25 19:44:08 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 17:44:08 +0000 Subject: [issue14616] subprocess docs should mention pipes.quote/shlex.quote In-Reply-To: <1334769157.78.0.557014485739.issue14616@psf.upfronthosting.co.za> Message-ID: <1351187048.37.0.418479712073.issue14616@psf.upfronthosting.co.za> Ezio Melotti added the comment: > I think patch for 3.3 should mention only shlex.quote. +1 I'm not sure what's the best thing to do about pipes.quote. Pointing to an undocumented function that is available in 3.3 in a different module doesn't sound like a really good idea. Maybe we could document pipes.quote as an internal/deprecated function so that people that follow the link from the subprocess docs will be aware that the function is available under a different name in 3.3+. Otherwise we could just document shlex.quote() in 3.3+. ---------- nosy: +ezio.melotti _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14616> _______________________________________ From report at bugs.python.org Thu Oct 25 19:50:21 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 17:50:21 +0000 Subject: [issue16239] PEP8 arithmetic operator examples In-Reply-To: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> Message-ID: <1351187421.67.0.142747290225.issue16239@psf.upfronthosting.co.za> Ezio Melotti added the comment: > >- x = x * 2 - 1 > >- hypot2 = x * x + y * y > > Why you remove this? As I explained in my previous message, even if valid, these are IMHO less clear than x*2 - 1 and x*x + y*y. > >- c = (a+b) * (a-b) > >+ c = a+b * a-b > > This changes the semantic. It does indeed, but I think it's worth pointing out that misleading spacing should be avoided. Maybe a different example could be used. > >but otoh 'x*2 - 1' is a better alternative. > > Can you justify this? x*2 - 1 gives a visual hint of what gets executed first, x * 2-1 gives a wrong/misleading hint of what gets executed first, x * 2 - 1 gives no hint at all. I think that providing the correct hint is better than not providing any hints (and clearly better than providing the wrong hint!). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16239> _______________________________________ From report at bugs.python.org Thu Oct 25 19:51:37 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 17:51:37 +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: <1351187497.91.0.190808060791.issue16240@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: My patch was only example. Commit what you feel is better. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16240> _______________________________________ From report at bugs.python.org Thu Oct 25 19:55:24 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 17:55:24 +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: <1351187724.65.0.260919975215.issue16240@psf.upfronthosting.co.za> Ezio Melotti added the comment: For a literal match, wrap the meta-characters in brackets. For example, ``'[?]'`` matches the character ``'?'``. Stating the goal at the beginning of the sentence will make this easier to find while skimming through the doc. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16240> _______________________________________ From report at bugs.python.org Thu Oct 25 19:57:06 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 17:57:06 +0000 Subject: =?utf-8?q?=5Bissue16325=5D_PEP=C2=A08_refers_to_reference_to_PEP_8?= In-Reply-To: <1351186367.56.0.154772018317.issue16325@psf.upfronthosting.co.za> Message-ID: <1351187826.44.0.919236426264.issue16325@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think there is no sense to refer to removed document. If Guido's original essay saved somewhere, than PEP 8 should refer to this copy. Otherwise meaningless link should be removed. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16325> _______________________________________ From report at bugs.python.org Thu Oct 25 20:03:22 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 18:03:22 +0000 Subject: =?utf-8?q?=5Bissue16325=5D_PEP=C2=A08_refers_to_reference_to_PEP_8?= In-Reply-To: <1351186367.56.0.154772018317.issue16325@psf.upfronthosting.co.za> Message-ID: <1351188202.47.0.254839621192.issue16325@psf.upfronthosting.co.za> Ezio Melotti added the comment: Do you think something like the attached patch would be OK? ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file27714/issue16325.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16325> _______________________________________ From report at bugs.python.org Thu Oct 25 20:04:05 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 18:04:05 +0000 Subject: [issue16239] PEP8 arithmetic operator examples In-Reply-To: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> Message-ID: <1351188244.99.0.491635990084.issue16239@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > As I explained in my previous message, even if valid, these are IMHO less clear than x*2 - 1 and x*x + y*y. I don't feel this. Anyone else feel this? It seems to me, this is a serious change in the Style Guide. > It does indeed, but I think it's worth pointing out that misleading spacing should be avoided I think this example shows that even without misleading such spacing is not good. The destructiveness of misleading spacing is evident for all. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16239> _______________________________________ From report at bugs.python.org Thu Oct 25 20:06:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 18:06:07 +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: <1351188367.26.0.623281332754.issue16322@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: As I understand, OP has UTF-8 locale. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16322> _______________________________________ From report at bugs.python.org Thu Oct 25 20:11:41 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 18:11:41 +0000 Subject: [issue16239] PEP8 arithmetic operator examples In-Reply-To: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> Message-ID: <1351188701.88.0.806836625841.issue16239@psf.upfronthosting.co.za> Ezio Melotti added the comment: As I see it: For c = (a + b) * (a - b) the hint (and the actual priority) is given by the (), the spaces around the +/- are not necessary but don't affect readability. For c = (a+b) * (a-b) the hints are given both by the () and the spacing, the lack of spaces around the +/- is not necessary but doesn't affect readability. For c = a+b * a-b the hints are given both by the spacing and they are wrong. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16239> _______________________________________ From report at bugs.python.org Thu Oct 25 20:16:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 18:16:44 +0000 Subject: =?utf-8?q?=5Bissue16325=5D_PEP=C2=A08_refers_to_reference_to_PEP_8?= In-Reply-To: <1351186367.56.0.154772018317.issue16325@psf.upfronthosting.co.za> Message-ID: <1351189004.29.0.952827588375.issue16325@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM, but I'm not well competent to assess these changes. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16325> _______________________________________ From report at bugs.python.org Thu Oct 25 20:18:01 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 25 Oct 2012 18:18:01 +0000 Subject: [issue14799] Tkinter ttk tests hang on linux In-Reply-To: <1336935343.12.0.855604727116.issue14799@psf.upfronthosting.co.za> Message-ID: <1351189081.72.0.947206368428.issue14799@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Update: test_ttk_guionly hangs on Ubuntu with Unity. It passed on Arch as well as on Ubuntu via xvfb-run. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14799> _______________________________________ From report at bugs.python.org Thu Oct 25 20:20:17 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 25 Oct 2012 18:20:17 +0000 Subject: [issue14799] Tkinter ttk tests hang on linux In-Reply-To: <1336935343.12.0.855604727116.issue14799@psf.upfronthosting.co.za> Message-ID: <1351189217.16.0.681601029837.issue14799@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fir Unity it hangs on Tcl_ConditionWait inside Tcl_DoOneEvent function. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14799> _______________________________________ From report at bugs.python.org Thu Oct 25 20:37:36 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 18:37:36 +0000 Subject: [issue14799] Tkinter ttk tests hang on linux In-Reply-To: <1336935343.12.0.855604727116.issue14799@psf.upfronthosting.co.za> Message-ID: <1351190256.14.0.968691867182.issue14799@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: For me it passed with Openbox and Compiz, but fails with KWin. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14799> _______________________________________ From report at bugs.python.org Thu Oct 25 20:44:02 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 25 Oct 2012 18:44:02 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <1351190642.32.0.929837951021.issue15494@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > If you are planning to further split support.py, then I'm -1. Ezio, this issue is not to split up support.py. Nick already responded to you to this effect in the fourth comment above. Also, in the second comment to this issue, I said that this issue was to move support.py as is into support/__init__.py, and then to move script_helper.py as is into the package. > Having several modules doesn't solve the problem of discoverability We already have more than one module. This issue helps discoverability by grouping them in one place so people know what support modules there are. In other words, this issue addresses the following problem you mentioned: "Both these issues were probably caused by the fact that people didn't know about script_helper.py and ended up implementing their own versions of the functions either in the test files or in support.py. Something similar happened with requires_zlib (and possibly a few others)..." > So it is fair to ask what *specific* benefits such a restructuring may have. Martin, see the paragraph above. In addition, this change makes it easier to search whatever support modules we have. It also provides a place to put new support modules to avoid further exacerbating the discoverability problem stated above. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15494> _______________________________________ From report at bugs.python.org Thu Oct 25 20:52:40 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 18:52:40 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <1351191160.42.0.720409267967.issue15494@psf.upfronthosting.co.za> Ezio Melotti added the comment: > Ezio, this issue is not to split up support.py. Nick already responded > to you to this effect in the fourth comment above. Indeed, I should have re-read the messages more carefully. > Also, in the second comment to this issue, I said that this issue was > to move support.py as is into support/__init__.py, and then to move > script_helper.py as is into the package. > > We already have more than one module. Are there other modules except these two? Because if the package will only group these two, I think it's better/easier to merge script_helper.py in support.py. As I said in the previous message I don't see why the spawn/kill/assert_python functions should be in a separate file and the import_fresh_module ones shouldn't. Even if having these two files in the same package will make discoverability easier it still seems an arbitrary division. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15494> _______________________________________ From report at bugs.python.org Thu Oct 25 20:59:56 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 25 Oct 2012 18:59:56 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <1351191596.33.0.100284920978.issue15494@psf.upfronthosting.co.za> R. David Murray added the comment: Every sizeable (and some not-so-sizeable) Python projects I've worked on have one or more 'utils' modules that collect stuff that doesn't logically fit elsewhere. That's what test.support is for the test infrastructure. I agree that we should not talk in generalities. As Martin has indicated, appeal to authority in the form of "basic software engineering principles" is not enough by itself. We should look at specific proposals and decide based on specific arguments whether they will improve matters. And yes, their status as good engineering principles is meaningful, but only if the reasons for those specific principles actually apply in the specific case. Certainly making the functions in script_helpers more discoverable is a laudable goal. As an aside: I've worked on a project that is well modularized if you judge by the number and size of the source files (if you ignore a few single-class files created by former java programmers)...but it didn't follow any of the logical reasons Martin quoted for modularization: finding things in the source base was a pain, and different responsibility groups were responsible for files spread across the source tree and wound up stepping on each other's toes, and debugging was not aided by the source structure because while the APIs started out reasonably well defined they did not stay that way...because the responsibility areas were not well defined or maintained. *Why* you modularize, and *how* you modularize, are much more important than file size. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15494> _______________________________________ From report at bugs.python.org Thu Oct 25 21:08:31 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 25 Oct 2012 19:08:31 +0000 Subject: [issue16324] MIMEText __init__ does not support Charset instance In-Reply-To: <1351180172.93.0.972082460953.issue16324@psf.upfronthosting.co.za> Message-ID: <1351192111.09.0.148873386102.issue16324@psf.upfronthosting.co.za> R. David Murray added the comment: I don't think you missed anything. It doesn't look like this has ever worked, but you'd certainly think it would. The documentation doesn't claim anything about it one way or another. That probably means we should treat it as an enhancement rather than a bug fix, but I'm open to argument on that. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16324> _______________________________________ From report at bugs.python.org Thu Oct 25 21:10:34 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 25 Oct 2012 19:10:34 +0000 Subject: [issue16155] Some minor doc fixes in Doc/faq In-Reply-To: <1349562552.07.0.641735051076.issue16155@psf.upfronthosting.co.za> Message-ID: <1351192234.44.0.929828150121.issue16155@psf.upfronthosting.co.za> Changes by Andrew Svetlov <andrew.svetlov at gmail.com>: ---------- nosy: +asvetlov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16155> _______________________________________ From report at bugs.python.org Thu Oct 25 21:12:46 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 25 Oct 2012 19:12:46 +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: <1351192366.19.0.516731940705.issue16322@psf.upfronthosting.co.za> Changes by R. David Murray <rdmurray at bitdance.com>: ---------- nosy: +belopolsky, haypo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16322> _______________________________________ From report at bugs.python.org Thu Oct 25 21:16:55 2012 From: report at bugs.python.org (Claude Paroz) Date: Thu, 25 Oct 2012 19:16:55 +0000 Subject: [issue16324] MIMEText __init__ does not support Charset instance In-Reply-To: <1351180172.93.0.972082460953.issue16324@psf.upfronthosting.co.za> Message-ID: <1351192615.72.0.0623384274418.issue16324@psf.upfronthosting.co.za> Claude Paroz added the comment: It's fine for me to consider it as an enhancement. The fix might be as simple as replacing **{'charset': _charset} by **{'charset': str(_charset)} in MIMEText __init__. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16324> _______________________________________ From report at bugs.python.org Thu Oct 25 21:38:33 2012 From: report at bugs.python.org (Antonio Chay) Date: Thu, 25 Oct 2012 19:38:33 +0000 Subject: [issue15066] make install error: ImportError: No module named _struct In-Reply-To: <1339684582.74.0.731857257466.issue15066@psf.upfronthosting.co.za> Message-ID: <1351193913.86.0.604321703165.issue15066@psf.upfronthosting.co.za> Antonio Chay added the comment: Hello there! I have the same issue, using CentOS 5.8, I *reversed* this patch: http://bugs.python.org/issue8205 and now "make install" works. A side note: before it failed to compile _multiprocessing, with the patch reversed now is included. HTH. Regards! ---------- nosy: +chay _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15066> _______________________________________ From report at bugs.python.org Thu Oct 25 21:44:24 2012 From: report at bugs.python.org (Andy Salnikov) Date: Thu, 25 Oct 2012 19:44:24 +0000 Subject: [issue16326] distutils build_ext fails to set library_dirs in 2.7.2 on Linux Message-ID: <1351194264.28.0.869819451271.issue16326@psf.upfronthosting.co.za> New submission from Andy Salnikov: Hi, when trying to build extension modules with distutils I ran into a problem that linking fails with an errors like: gcc -pthread -shared -L build/temp.linux-x86_64-2.7/h5py/defs.o -L/reg/g/psdm/sw/external/hdf5/1.8.4p1/x86_64-rhel6-gcc44-opt/lib -L. -Wl,-R/reg/g/psdm/sw/external/hdf5/1.8.4p1/x86_64-rhel6-gcc44-opt/lib -lhdf5 -lpython2.7 -o build/lib.linux-x86_64-2.7/h5py/defs.so /usr/bin/ld: cannot find -lpython2.7 collect2: ld returned 1 exit status For some reason location of the python library is not added to the command line with -L option. I tracked the reason down to a particular environment that we have, in out environment python executable found in a $PATH is a symbolic link to a binary installed in some non-standard location. I believe this piece of code in build_ext.py fails to realize this: if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) else: # building python standard extensions self.library_dirs.append('.') apparently sys.executable in our case refers to a symlink path, while sys.exec_prefix refers to actual installation directory. I think fix for our case should be easy (I can't say about other cases which may be broken by this logic), one just need to apply os.path.realpath() to sys.executable before comparing it to sys.exec_prefix. Andy ---------- assignee: eric.araujo components: Distutils messages: 173796 nosy: Andy.Salnikov, eric.araujo, tarek priority: normal severity: normal status: open title: distutils build_ext fails to set library_dirs in 2.7.2 on Linux type: compile error versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16326> _______________________________________ From report at bugs.python.org Thu Oct 25 21:56:59 2012 From: report at bugs.python.org (Roger Serwy) Date: Thu, 25 Oct 2012 19:56:59 +0000 Subject: [issue15392] Create a unittest framework for IDLE In-Reply-To: <1342673080.97.0.671694156374.issue15392@psf.upfronthosting.co.za> Message-ID: <1351195019.21.0.927485454477.issue15392@psf.upfronthosting.co.za> Roger Serwy added the comment: Issue7883 also has a test. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15392> _______________________________________ From report at bugs.python.org Thu Oct 25 22:30:20 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2012 20:30:20 +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: <1351197020.2.0.858120322209.issue16322@psf.upfronthosting.co.za> STINNER Victor added the comment: >I see in 3.3 PyUnicode_DecodeFSDefaultAndSize() was replaced > by PyUnicode_DecodeLocale(). Related changes: - 8620e6901e58 for the issue #5905 - 279b0aee0cfb for the issue #13560 I wrote 8620e6901e58 for Linux, when the wcsftime() function is missing. The problem is the changeset 279b0aee0cfb: it introduces a regression on Windows. It looks like PyUnicode_DecodeFSDefault() and PyUnicode_DecodeFSDefault() use a different encoding on Windows. I suppose that we need to add an #ifdef MS_WINDOWS to use PyUnicode_DecodeFSDefault() on Windows, and PyUnicode_DecodeFSDefault() on Linux. See also the issue #10653: time.strftime() uses strftime() (bytes) instead of wcsftime() (unicode) on Windows, because wcsftime() and tzname format the timezone differently. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16322> _______________________________________ From report at bugs.python.org Thu Oct 25 22:43:53 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 25 Oct 2012 20:43:53 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <1351197833.66.0.7521685809.issue15494@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This may increasingly get off-topic, so I'll stop with generalities after this post. I find the effect of modularization on discoverability to be two-sided. On the one hand, splitting functionality into groups helps discoverability, since you don't have to wade through tons of API, and the risk "to see but not to recognize" is reduced. OTOH, the risk of entirely ignoring some functionality because it is placed somehwere where you wouldn't expect it is increased. The classical example is the the gethostname() function, which many people wouldn't expect in the socket module. I have personally given up on expecting "logical" grouping when trying to find functionality (not just in Python, but in general). Instead, I rely on full-text search, which works reasonably well these days. I do use modularity when studying "close friends" related to some API I already know. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15494> _______________________________________ From report at bugs.python.org Thu Oct 25 23:12:20 2012 From: report at bugs.python.org (Jeremy Brock) Date: Thu, 25 Oct 2012 21:12:20 +0000 Subject: [issue16318] FTP_TLS in ftplib not supporting prot_p storlines in FTP7.5 In-Reply-To: <1351120164.32.0.969400884781.issue16318@psf.upfronthosting.co.za> Message-ID: <1351199540.52.0.259871797731.issue16318@psf.upfronthosting.co.za> Jeremy Brock added the comment: Hello Giampaolo, It is the same timeout in PASV with Prot_P, please see attached documentation. Something I did not mention before is that the file being written shows up on the server but I can't view it because it is being used by another process. When the timeout occurs the file disappears - see attached images. ~Jeremy ---------- Added file: http://bugs.python.org/file27715/FTP7.5 Issues Documentation - PASV.zip _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16318> _______________________________________ From report at bugs.python.org Thu Oct 25 23:29:44 2012 From: report at bugs.python.org (Hieu Nguyen) Date: Thu, 25 Oct 2012 21:29:44 +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: <1351200584.8.0.616630484726.issue16306@psf.upfronthosting.co.za> Hieu Nguyen added the comment: Submitted another patchs for py3k and python 2.7 ---------- Added file: http://bugs.python.org/file27716/issue16306_py3.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16306> _______________________________________ From report at bugs.python.org Thu Oct 25 23:29:55 2012 From: report at bugs.python.org (Hieu Nguyen) Date: Thu, 25 Oct 2012 21:29:55 +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: <1351200595.63.0.0832408329407.issue16306@psf.upfronthosting.co.za> Changes by Hieu Nguyen <ndhieu88 at gmail.com>: Added file: http://bugs.python.org/file27717/issue16306_py27.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16306> _______________________________________ From report at bugs.python.org Thu Oct 25 23:34:44 2012 From: report at bugs.python.org (Hieu Nguyen) Date: Thu, 25 Oct 2012 21:34:44 +0000 Subject: [issue9192] Add a a way to determine float format In-Reply-To: <1278527159.47.0.497382000521.issue9192@psf.upfronthosting.co.za> Message-ID: <1351200884.38.0.31701830211.issue9192@psf.upfronthosting.co.za> Changes by Hieu Nguyen <ndhieu88 at gmail.com>: ---------- nosy: +hieu.nguyen _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9192> _______________________________________ From report at bugs.python.org Thu Oct 25 23:38:16 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Oct 2012 21:38:16 +0000 Subject: [issue9192] Add a a way to determine float format In-Reply-To: <1278527159.47.0.497382000521.issue9192@psf.upfronthosting.co.za> Message-ID: <1351201096.11.0.676585980952.issue9192@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +ezio.melotti stage: -> needs patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9192> _______________________________________ From report at bugs.python.org Thu Oct 25 23:44:02 2012 From: report at bugs.python.org (Berker Peksag) Date: Thu, 25 Oct 2012 21:44:02 +0000 Subject: [issue16243] Add example for inspect module doc In-Reply-To: <1350343185.48.0.60485336671.issue16243@psf.upfronthosting.co.za> Message-ID: <1351201442.6.0.276094891594.issue16243@psf.upfronthosting.co.za> Berker Peksag added the comment: Here's a patch that adds an example of using `inspect.formatargspec`. ---------- keywords: +patch nosy: +berker.peksag Added file: http://bugs.python.org/file27718/inspect-formatargspec-example.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16243> _______________________________________ From report at bugs.python.org Thu Oct 25 23:45:03 2012 From: report at bugs.python.org (Berker Peksag) Date: Thu, 25 Oct 2012 21:45:03 +0000 Subject: [issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant In-Reply-To: <1296312944.75.0.70099754625.issue11060@psf.upfronthosting.co.za> Message-ID: <1351201503.04.0.360198822237.issue11060@psf.upfronthosting.co.za> Changes by Berker Peksag <berker.peksag at gmail.com>: ---------- nosy: -berker.peksag _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11060> _______________________________________ From report at bugs.python.org Thu Oct 25 23:45:25 2012 From: report at bugs.python.org (Berker Peksag) Date: Thu, 25 Oct 2012 21:45:25 +0000 Subject: [issue11880] add a {dist-info} category to distutils2 In-Reply-To: <1303231865.42.0.936595329467.issue11880@psf.upfronthosting.co.za> Message-ID: <1351201525.82.0.247053560205.issue11880@psf.upfronthosting.co.za> Changes by Berker Peksag <berker.peksag at gmail.com>: ---------- nosy: -berker.peksag _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11880> _______________________________________ From report at bugs.python.org Fri Oct 26 00:06:02 2012 From: report at bugs.python.org (Berker Peksag) Date: Thu, 25 Oct 2012 22:06:02 +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: <1351202762.14.0.313317083429.issue16163@psf.upfronthosting.co.za> Berker Peksag added the comment: Chris, did you have a chance to review the patch I submitted? The only usage of `iter_importers` function in stdlib is in `iter_modules` function: http://hg.python.org/cpython/file/cbdd6852a274/Lib/pkgutil.py#l139 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16163> _______________________________________ From report at bugs.python.org Fri Oct 26 00:31:03 2012 From: report at bugs.python.org (Mark Gius) Date: Thu, 25 Oct 2012 22:31:03 +0000 Subject: [issue16327] subprocess.Popen leaks file descriptors on os.fork() failure Message-ID: <1351204263.29.0.689540716038.issue16327@psf.upfronthosting.co.za> New submission from Mark Gius: When subprocess.Popen is called with subprocess.PIPE and os.fork() fails (due to insufficient memory for example), the pipes created by _get_handles() are not closed. Steps to reproduce: 1) Launch a python shell, import subprocess 2) Create a situation where os.fork() will fail (I ran a program to eat up nearly all of the memory on a system) 3) subprocess.Popen('/bin/echo', stdin=subprocess.PIPE) 4) OSError(12, 'Cannot allocate memory') 5) ls /proc/$pid/fd , There are now extra pipes. I tested on Ubuntu 11.10 python (2.7.2-5ubuntu1). My reading of the 2.7 and 3.3 development trees suggest that this is an issue with both of those branches, but I don't have a 3.3 installation to confirm with. I've attached a snippet that fixes it for my version of Python on Ubuntu. No idea what ramifications it will have for other versions/OS/etc. No automated testing included because I'm not entirely sure how to replicate this without eating up a ton of ram or doing something naughty with ulimit. ---------- components: Library (Lib) files: fd_leak_fix.diff keywords: patch messages: 173804 nosy: Mark.Gius priority: normal severity: normal status: open title: subprocess.Popen leaks file descriptors on os.fork() failure type: resource usage versions: Python 2.7 Added file: http://bugs.python.org/file27719/fd_leak_fix.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Fri Oct 26 00:32:12 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 25 Oct 2012 22:32:12 +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: <1351204332.11.0.55922116925.issue16327@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: ---------- nosy: +gregory.p.smith, neologix stage: -> patch review versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Fri Oct 26 00:50:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2012 22:50:41 +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: <1351205441.55.0.453723505873.issue16306@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- nosy: +serhiy.storchaka stage: -> commit review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16306> _______________________________________ From report at bugs.python.org Fri Oct 26 00:55:46 2012 From: report at bugs.python.org (Masami HIRATA) Date: Thu, 25 Oct 2012 22:55:46 +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: <1351205746.62.0.224574632039.issue16322@psf.upfronthosting.co.za> Masami HIRATA added the comment: > What show sys.getdefaultencoding(), sys.getfilesystemencoding(), and locale.getpreferredencoding()? C:\Python33>python.exe Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (In tel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.getdefaultencoding() 'utf-8' >>> sys.getfilesystemencoding() 'mbcs' >>> import locale >>> locale.getpreferredencoding() 'cp932' >>> 'cp932' is the same as 'mbcs' in the Japanese environment. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16322> _______________________________________ From report at bugs.python.org Fri Oct 26 00:57:16 2012 From: report at bugs.python.org (Hieu Nguyen) Date: Thu, 25 Oct 2012 22:57:16 +0000 Subject: [issue12317] inspect.getabsfile() is not documented In-Reply-To: <1308351508.86.0.88677303291.issue12317@psf.upfronthosting.co.za> Message-ID: <1351205836.29.0.0164349137542.issue12317@psf.upfronthosting.co.za> Changes by Hieu Nguyen <ndhieu88 at gmail.com>: ---------- nosy: +hieu.nguyen _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12317> _______________________________________ From report at bugs.python.org Fri Oct 26 00:59:10 2012 From: report at bugs.python.org (Hieu Nguyen) Date: Thu, 25 Oct 2012 22:59:10 +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: <1351205950.36.0.580989766715.issue14266@psf.upfronthosting.co.za> Changes by Hieu Nguyen <ndhieu88 at gmail.com>: ---------- nosy: +hieu.nguyen _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14266> _______________________________________ From report at bugs.python.org Fri Oct 26 00:59:30 2012 From: report at bugs.python.org (Mark Gius) Date: Thu, 25 Oct 2012 22:59:30 +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: <1351205970.18.0.156617005636.issue16327@psf.upfronthosting.co.za> Mark Gius added the comment: Just read the docs for stdin and stdout. This patch will indtroduce a bug where a provided file descriptor can be closed. This definitely shouldn't close a file descriptor that isn't created by _get_handles(). I'll update. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Fri Oct 26 01:10:02 2012 From: report at bugs.python.org (Mark Gius) Date: Thu, 25 Oct 2012 23:10:02 +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: <1351206602.81.0.766518074079.issue16327@psf.upfronthosting.co.za> Mark Gius added the comment: Patch now only closes pipe fds created by Popen ---------- Added file: http://bugs.python.org/file27720/fd_leak_fix_v2.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Fri Oct 26 01:23:50 2012 From: report at bugs.python.org (Winston451) Date: Thu, 25 Oct 2012 23:23:50 +0000 Subject: [issue4202] Multiple interpreters and readline module hook functions. In-Reply-To: <1224903164.25.0.50876142409.issue4202@psf.upfronthosting.co.za> Message-ID: <1351207430.22.0.76306512133.issue4202@psf.upfronthosting.co.za> Winston451 added the comment: Hi, I'm currently developping an application which runs sub interpreters in threads (one sub interpreter per thread). When I try to use readline completion in these sub interpreters it fails because it's not possible to import the "keyword" module (PyEval_GetRestricted() returns true). I think it is due to the fact that readline's on_completion() use PyGILState_Ensure(). It should be possible to use PyEval_RestoreThread with _PyOS_ReadlineTState instead. ---------- nosy: +Winston451 status: pending -> open _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue4202> _______________________________________ From report at bugs.python.org Fri Oct 26 02:01:31 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 26 Oct 2012 00:01:31 +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: <1351209691.93.0.347471470123.issue16327@psf.upfronthosting.co.za> Changes by Gregory P. Smith <greg at krypto.org>: ---------- assignee: -> gregory.p.smith _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Fri Oct 26 02:04:45 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 26 Oct 2012 00:04:45 +0000 Subject: [issue1336] subprocess.Popen hangs when child writes to stderr In-Reply-To: <1193407452.43.0.999665750675.issue1336@psf.upfronthosting.co.za> Message-ID: <1351209885.67.0.658355686634.issue1336@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1336> _______________________________________ From report at bugs.python.org Fri Oct 26 02:16:09 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 26 Oct 2012 00:16:09 +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: <1351210569.78.0.479942699021.issue16327@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: I would catch ALL exceptions, not only "OSError". An easy way to test this would be to test a subclass of Popen with "_execute_child()" method overrided for always raising an exception. On Unix the test could just open six fds, close them taking note of the values, call this code forcing an exception, catch it, open six new fds and verify that the numbers are the same. So we verify that neither of the six fds created "inside" are leaked. What should we do for Windows? Maybe the easier and more portable approach for exception cleanup would be to do "_execute_child()" AFTER the "fdopen()" dance, so we can just do "close()" if any exception is raised. Also, the cleanup MUST be done ONLY if the fds were created inside the function (PIPE), not if the fd came from the caller. ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Fri Oct 26 02:19:13 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 26 Oct 2012 00:19:13 +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: <1351210753.96.0.179760136392.issue16327@psf.upfronthosting.co.za> Gregory P. Smith added the comment: python 3 already catches all exceptions and handles closing of p2cwrite, c2pread and errread here. i don't know which branch this patch is against. Regardless, it makes sense that the other fd's, if created by us, also need to be cleaned up. The code also needs to ignore exceptions from the close() call. http://hg.python.org/cpython/file/cbdd6852a274/Lib/subprocess.py#l811 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Fri Oct 26 02:39:04 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 26 Oct 2012 00:39:04 +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: <1351211944.3.0.654914888351.issue16163@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Nick would be a better person to review the patch since IIRC he worked a bunch on that module (e.g. in the changeset you mentioned). But if I get a chance I will take a look. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16163> _______________________________________ From report at bugs.python.org Fri Oct 26 02:42:29 2012 From: report at bugs.python.org (Mark Gius) Date: Fri, 26 Oct 2012 00:42:29 +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: <1351212149.87.0.176246859144.issue16327@psf.upfronthosting.co.za> Mark Gius added the comment: attachment against 2.7 if I understand this code correctly, the fix shouldn't need to be fixed separately on windows and Linux, since the thing handled by init is just a file descriptor. Good idea on the testing. I'll give that a shot tomorrow. I think 3.3 will need some extra cleanup too. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Fri Oct 26 02:47:42 2012 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 26 Oct 2012 00:47:42 +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: <1351212462.66.0.457988702974.issue16163@psf.upfronthosting.co.za> Changes by Nick Coghlan <ncoghlan at gmail.com>: ---------- assignee: -> ncoghlan _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16163> _______________________________________ From report at bugs.python.org Fri Oct 26 02:48:10 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 26 Oct 2012 00:48: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: <1351212490.31.0.389134988434.issue16327@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: The cleanup code in python 3 validates my idea of simplifying cleanup moving "_execute_child()" after the platform specific code. I wonder what "raise" will actually raise if this cleanup code catches & ignores "close()" exception :-). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Fri Oct 26 02:49:32 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 26 Oct 2012 00:49:32 +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: <1351212572.73.0.365725435127.issue16327@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Mark, could you consider to fill&send a contributor form agreement? http://www.python.org/psf/contrib/ ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Fri Oct 26 03:18:07 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 26 Oct 2012 01:18:07 +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: <1351214287.23.0.662885928297.issue16327@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: In fact, nested exception management in python 2 and python 3 actually diverges. BEWARE: (Python 3 does the right thing, once again :-) """ Python 2.7.3 (default, Apr 12 2012, 13:11:53) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> try : ... 1/0 ... except : ... try : ... raise RuntimeError("TEST") ... except : ... pass ... raise ... Traceback (most recent call last): File "<stdin>", line 5, in <module> RuntimeError: TEST """ """ 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. >>> try : ... 1/0 ... except : ... try : ... raise RuntimeError("TEST") ... except : ... pass ... raise ... Traceback (most recent call last): File "<stdin>", line 2, in <module> ZeroDivisionError: division by zero """ ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Fri Oct 26 03:24:31 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 26 Oct 2012 01:24:31 +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: <1351214671.72.0.0544351470874.issue16327@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: http://stackoverflow.com/questions/8997431/is-there-any-way-to-access-nested-or-re-raised-exceptions-in-python """ This is known as Exception Chaining and is suported in Python 3. PEP 3134: http://www.python.org/dev/peps/pep-3134/ In Python 2, the old exception is lost when you raise a new one, unless you save it in the except block. """ ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Fri Oct 26 03:34:56 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 26 Oct 2012 01:34:56 +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: <1351215296.23.0.825444028415.issue16327@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Python2 management should be something like: """ Python 2.7.3 (default, Apr 12 2012, 13:11:53) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> try : ... 1/0 ... except BaseException as e : ... try : ... raise ... finally : ... try : ... raise RuntimeError("TEST") ... except : ... pass ... Traceback (most recent call last): File "<stdin>", line 2, in <module> ZeroDivisionError: integer division or modulo by zero """ Sorry, UGLY. Idea from http://www.doughellmann.com/articles/how-tos/python-exception-handling/index.html ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Fri Oct 26 03:36:23 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 26 Oct 2012 01:36:23 +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: <1351215383.92.0.943731621543.issue16327@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Replace "except BaseException as e :" with just "except:". It was a remnant of my tests. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Fri Oct 26 07:32:12 2012 From: report at bugs.python.org (Todd Rovito) Date: Fri, 26 Oct 2012 05:32:12 +0000 Subject: [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1351229532.37.0.204305206804.issue16278@psf.upfronthosting.co.za> Todd Rovito added the comment: Thanks for the feedback! Over the weekend I will make sure the documentation and test cases cover all possibilities. I have not worked with test suite but I will do my best. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16278> _______________________________________ From report at bugs.python.org Fri Oct 26 08:04:14 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 26 Oct 2012 06:04:14 +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: <CAH_1eM0d8LM72b30Nq45cbSiBvYmZmmZRqeNFD-9JeJHZdZ9Lg@mail.gmail.com> Charles-Fran?ois Natali added the comment: > No automated testing included because I'm not entirely sure how to replicate this without eating up a ton of ram or doing something naughty with ulimit. Simply use RLIMIT_NPROC, from a subprocess: """ $ cat /tmp/test.py import subprocess ps = [ ] for i in range(1024): p = subprocess.Popen(['sleep', '10']) ps.append(p) $ python /tmp/test.py Traceback (most recent call last): File "/tmp/test.py", line 7, in ? p = subprocess.Popen(['sleep', '10']) File "/usr/lib64/python2.4/subprocess.py", line 550, in __init__ errread, errwrite) File "/usr/lib64/python2.4/subprocess.py", line 919, in _execute_child self.pid = os.fork() OSError: [Errno 11] Resource temporarily unavailable $ ulimit -u 1024 """ Not POSIX, but supported by Linux and BSD, which should be enough. The problem with monkey-ptching is that you don't test the real codepath, and it may break in a future version (especially since here it would be using a preivate API). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Fri Oct 26 08:40:49 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 26 Oct 2012 06:40:49 +0000 Subject: [issue16271] weird dual behavior with changing __qualname__; different values observed through attribute and descriptor In-Reply-To: <1350517386.42.0.0716657058677.issue16271@psf.upfronthosting.co.za> Message-ID: <1351233649.68.0.757276979583.issue16271@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Here's a patch for 3.4. __qualname__ ought to have been implemented this way in the first place. I'll have to think about what can be done about 3.3. Maybe just the same fix without the removal of PyHeapType.ht_qualname. We can hope no one has written extensions relying on its value actually being correct. ---------- keywords: +patch nosy: +benjamin.peterson Added file: http://bugs.python.org/file27721/qualname-in-dict.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16271> _______________________________________ From report at bugs.python.org Fri Oct 26 09:02:57 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 26 Oct 2012 07:02:57 +0000 Subject: [issue16271] weird dual behavior with changing __qualname__; different values observed through attribute and descriptor In-Reply-To: <1350517386.42.0.0716657058677.issue16271@psf.upfronthosting.co.za> Message-ID: <1351234977.42.0.30143292907.issue16271@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm not sure why this would be the correct way to do it. First you are removing the unicode check, which looks wrong to me. Second, if ht_name works, perhaps ht_qualname can be made to work as well? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16271> _______________________________________ From report at bugs.python.org Fri Oct 26 09:06:56 2012 From: report at bugs.python.org (Chris Rebert) Date: Fri, 26 Oct 2012 07:06:56 +0000 Subject: [issue16285] Update urllib to RFC 3986 In-Reply-To: <1350644168.93.0.364254038155.issue16285@psf.upfronthosting.co.za> Message-ID: <1351235216.52.0.422821581361.issue16285@psf.upfronthosting.co.za> Changes by Chris Rebert <pybugs at rebertia.com>: ---------- nosy: +cvrebert _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16285> _______________________________________ From report at bugs.python.org Fri Oct 26 09:07:48 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2012 07:07:48 +0000 Subject: [issue16322] time.tzname on Python 3.3.0 for Windows is decoded by wrong encoding In-Reply-To: <1351205746.62.0.224574632039.issue16322@psf.upfronthosting.co.za> Message-ID: <CAMpsgwazqVnaKf98UPgS0iJ2UuhMB0e9AXPmf-kRY49eBTU_gA@mail.gmail.com> STINNER Victor added the comment: > >>> sys.getfilesystemencoding() > 'mbcs' > >>> import locale > >>> locale.getpreferredencoding() > 'cp932' > >>> > > 'cp932' is the same as 'mbcs' in the Japanese environment. And what is the value.of locale.getpreferredencoding(False)? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16322> _______________________________________ From report at bugs.python.org Fri Oct 26 09:07:59 2012 From: report at bugs.python.org (Chris Rebert) Date: Fri, 26 Oct 2012 07:07:59 +0000 Subject: [issue16309] "PYTHONPATH=" different from no PYTHONPATH at all In-Reply-To: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za> Message-ID: <1351235279.81.0.378734285913.issue16309@psf.upfronthosting.co.za> Changes by Chris Rebert <pybugs at rebertia.com>: ---------- nosy: +cvrebert _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16309> _______________________________________ From report at bugs.python.org Fri Oct 26 09:30:05 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 26 Oct 2012 07:30:05 +0000 Subject: [issue16327] subprocess.Popen leaks file descriptors on os.fork() failure In-Reply-To: <CAH_1eM0d8LM72b30Nq45cbSiBvYmZmmZRqeNFD-9JeJHZdZ9Lg@mail.gmail.com> Message-ID: <CAH_1eM38DOXgFU+KSU5tGNf7mYTvGwQEcFqBisgQyeDwvi24FA@mail.gmail.com> Charles-Fran?ois Natali added the comment: Also, I didn't check, but if the problems also occurs on execve() failure, then it's much simpler: simply call Popen() with an invalid/nonexisting executable. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Fri Oct 26 10:04:56 2012 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 26 Oct 2012 08:04:56 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <1351238696.05.0.0882706151511.issue15494@psf.upfronthosting.co.za> Nick Coghlan added the comment: This whole refactoring project grew out of the fact that Chris and I were looking for somewhere to put common helpers for package testing. Specfically, I wrote a heap of helpers for test_runpy that I wanted to use for the new pkgutil tests. The short term hack (because 3.3 was imminent) is that a couple of the pkgutil tests are *in* test_runpy, not because they belong there, but so they can use those helper utilities. We knew when we did it that wasn't a viable long term solution, but we didn't have a good place to put the helpers so test_pkgutil could get at them - they're packaging specific, so junking up test.support with them would be bad, and we knew from experience that a separate helper module (like script_helper) sucked for discoverability. So, the idea of making test.support a subpackage was born. The current contents of support.py go into the new __init__.py, script_helper moves there to make it more discoverable, and the utilities for packaging tests can move out of test_runpy and into test.support.pkg_helper. Both script_helper and pkg_helper can also be easily covered in the docs under the existing "test.support" caveat. We didn't start down this road on a whim - we did it because we ran up hard against a clear and obvious problem in the structure of the test suite's support modules. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15494> _______________________________________ From report at bugs.python.org Fri Oct 26 11:08:31 2012 From: report at bugs.python.org (Masami HIRATA) Date: Fri, 26 Oct 2012 09:08:31 +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: <1351242511.83.0.597237621613.issue16322@psf.upfronthosting.co.za> Masami HIRATA added the comment: > And what is the value.of locale.getpreferredencoding(False)? >>> import locale >>> locale.getpreferredencoding(False) 'cp932' >>> ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16322> _______________________________________ From report at bugs.python.org Fri Oct 26 11:17:32 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 26 Oct 2012 09:17:32 +0000 Subject: [issue15498] Eliminate the use of deprecated OS X APIs in getpath.c In-Reply-To: <1343633664.98.0.256476653975.issue15498@psf.upfronthosting.co.za> Message-ID: <1351243052.78.0.576495467216.issue15498@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Apple seems to have switched to using dlopen in their version of getpath.c (see <http://www.opensource.apple.com/source/python/python-60.3/2.7/fix/getpath.c.ed>, this is the version in OSX 10.8.2) This causes a problem for some people, as noticed on the pythonmac mailing list. This is something we should test before applying my patch to avoid regressions. Message-Id: <508951D3.7080805 at llnl.gov> says: I am trying to work with Apple Mountain Lion's install of Python 2.7. I have a language interoperability tool, Babel http://www.llnl.gov/CASC/components/, that used embedded Python when other languages are calling Python (c.g., C++ calling Python). My fundamental problem is that sys.path is not being initialized the same when I dlopen(libpython2.7.dylib) and initialize Python compared with how the sys.path is set when the Python executable is called directly. This causes Python to fail to load the numpy module used by Babel. bash-3.2$ /usr/bin/python2.7 -c "import sys; print sys.path; import numpy"> /tmp/out1 bash-3.2$ /usr/bin/python -c "import sys; print sys.path; import numpy" /tmp/out2 bash-3.2$ cat /tmp/out1 ['', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Python/2.7/site-packages'] bash-3.2$ diff /tmp/out1 /tmp/out2 bash-3.2$ ls -al /usr/bin/python2.7 lrwxr-xr-x 1 root wheel 75 Aug 23 11:10 /usr/bin/python2.7 -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 Presumably, this C program that uses dlopen(), Py_Initialize, and Py_SimpleString should have exactly the same output. /** foo.c */ #include<dlfcn.h> #include<stdio.h> int main(int argc, char **argv) { // void *lptr = dlopen("/System/Library/Frameworks/Python.framework/Python", RTLD_NOW | RTLD_GLOBAL); void *lptr = dlopen("/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib", RTLD_NOW | RTLD_GLOBAL); if (lptr) { void (*pyinit)(void) = dlsym(lptr, "Py_Initialize"); if (pyinit) { int (*runSimple)(const char *); (*pyinit)(); /* initialize Python */ runSimple = dlsym(lptr, "PyRun_SimpleString"); if (runSimple) { (*runSimple)("import sys ; print sys.path; import numpy"); } } else { fprintf(stderr, "Unable to locate Py_Initialize: %s\n", dlerror()); } } else { fprintf(stderr, "Error loading Python shared library: %s\n", dlerror()); } } bash-3.2$ gcc foo.c ; ./a.out ['/usr/lib/python27.zip', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-darwin', '/usr/lib/python2.7/plat-mac', '/usr/lib/python2.7/plat-mac/lib-scriptpackages', '/usr/Extras/lib/python', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload'] Traceback (most recent call last): File "<string>", line 1, in<module> ImportError: No module named numpy However as you see, it has a completely different sys.path. I can't seem to find a way to get it to initialize Python with the same sys.path. It seems like the libpython2.7.dylib is broken. I am at a loss on how to fix this or even who to ask for help. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15498> _______________________________________ From report at bugs.python.org Fri Oct 26 11:52:47 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Fri, 26 Oct 2012 09:52:47 +0000 Subject: [issue16313] Support xz compression in shutil module In-Reply-To: <1351114348.5.0.919820105174.issue16313@psf.upfronthosting.co.za> Message-ID: <1351245167.94.0.325019076761.issue16313@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Isn?t this a dupe of #5411? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16313> _______________________________________ From report at bugs.python.org Fri Oct 26 12:15:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2012 10:15:26 +0000 Subject: [issue16313] Support xz compression in shutil module In-Reply-To: <1351114348.5.0.919820105174.issue16313@psf.upfronthosting.co.za> Message-ID: <1351246526.37.0.350093021976.issue16313@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, this is actually a dupe of #5411? Thanks. ---------- resolution: -> duplicate stage: patch review -> committed/rejected status: open -> closed superseder: -> Add xz support to shutil _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16313> _______________________________________ From report at bugs.python.org Fri Oct 26 12:21:43 2012 From: report at bugs.python.org (Berker Peksag) Date: Fri, 26 Oct 2012 10:21:43 +0000 Subject: [issue9856] Change object.__format__(s) where s is non-empty to a TypeError In-Reply-To: <1284485218.75.0.159147258754.issue9856@psf.upfronthosting.co.za> Message-ID: <1351246903.26.0.245652557028.issue9856@psf.upfronthosting.co.za> Changes by Berker Peksag <berker.peksag at gmail.com>: ---------- nosy: -berker.peksag _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9856> _______________________________________ From report at bugs.python.org Fri Oct 26 12:26:39 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2012 10:26:39 +0000 Subject: [issue5411] Add xz support to shutil In-Reply-To: <1236081386.1.0.884971889723.issue5411@psf.upfronthosting.co.za> Message-ID: <1351247199.58.0.953055831131.issue5411@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have not seen this issue and was created a new issue16313 with almost same patch as Eric's one (only I have changed the documentation too). Here's the patch. I wonder that it was not committed yet to 3.3. I think it would be better first to add xz support and the code cleanup to do then (if it takes so much time). ---------- nosy: +serhiy.storchaka versions: +Python 3.4 -Python 3.3 Added file: http://bugs.python.org/file27722/shutil-lzma.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5411> _______________________________________ From report at bugs.python.org Fri Oct 26 12:27:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2012 10:27:01 +0000 Subject: [issue5411] Add xz support to shutil In-Reply-To: <1236081386.1.0.884971889723.issue5411@psf.upfronthosting.co.za> Message-ID: <1351247221.25.0.634434105178.issue5411@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: needs patch -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5411> _______________________________________ From report at bugs.python.org Fri Oct 26 12:29:56 2012 From: report at bugs.python.org (Berker Peksag) Date: Fri, 26 Oct 2012 10:29:56 +0000 Subject: [issue11468] Improve unittest basic example in the doc In-Reply-To: <1299867342.41.0.388080450116.issue11468@psf.upfronthosting.co.za> Message-ID: <1351247396.81.0.469875033943.issue11468@psf.upfronthosting.co.za> Changes by Berker Peksag <berker.peksag at gmail.com>: ---------- nosy: -berker.peksag _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11468> _______________________________________ From report at bugs.python.org Fri Oct 26 12:37:28 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 26 Oct 2012 10:37:28 +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: <1351247848.69.0.50082867268.issue16327@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: The problem with using RLIMIT is that the testsuite could be executing several tests in parallel using independent threads, for instance. You don't want to influence unrelated tests. Overiding private methods is ugly, but if the code evolves the test would break, and the programmer just have to update it. I think that "sometimes" we have to be "practical". There are plenty of examples of this in the testsuite, using implementation details, etc. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Fri Oct 26 12:44:10 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2012 10:44:10 +0000 Subject: [issue5411] Add xz support to shutil In-Reply-To: <1236081386.1.0.884971889723.issue5411@psf.upfronthosting.co.za> Message-ID: <1351248249.99.0.405335070245.issue5411@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: Removed file: http://bugs.python.org/file27722/shutil-lzma.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5411> _______________________________________ From report at bugs.python.org Fri Oct 26 12:45:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2012 10:45:23 +0000 Subject: [issue5411] Add xz support to shutil In-Reply-To: <1236081386.1.0.884971889723.issue5411@psf.upfronthosting.co.za> Message-ID: <1351248323.63.0.933575119062.issue5411@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oh, I see the '.bz2' bug. Patch updated. ---------- Added file: http://bugs.python.org/file27723/shutil-lzma_2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5411> _______________________________________ From report at bugs.python.org Fri Oct 26 12:56:38 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Fri, 26 Oct 2012 10:56:38 +0000 Subject: [issue16307] multiprocess.pool.map_async callables not working In-Reply-To: <1351062852.0.0.92760767978.issue16307@psf.upfronthosting.co.za> Message-ID: <1351248998.09.0.615752630609.issue16307@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Thanks for taking the time! I remember my frustrations when trying to grok how the mp test suite works. :) A small nit-pick first: you have a lot of extra white space in your patches. Just run 'make patchcheck' first, that should warn you about that. Not sure, but the tests look rather complex to me. I?d humbly propose the the simplified test attached, which also ensures that error_callback get only called on errors and callback on success. Opinions? ---------- Added file: http://bugs.python.org/file27724/map-async-fix-with-tests.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16307> _______________________________________ From report at bugs.python.org Fri Oct 26 13:29:57 2012 From: report at bugs.python.org (lilydjwg) Date: Fri, 26 Oct 2012 11:29:57 +0000 Subject: [issue15222] mailbox.mbox writes without empty line after each message In-Reply-To: <1340948825.65.0.977158180544.issue15222@psf.upfronthosting.co.za> Message-ID: <1351250997.74.0.319025336794.issue15222@psf.upfronthosting.co.za> lilydjwg added the comment: My system has updated to Python 3.3.0 and this bugs me again :-( I don't see the changes in Python 3.3.0. So when will this be merged into 3.3? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15222> _______________________________________ From report at bugs.python.org Fri Oct 26 13:54:09 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Fri, 26 Oct 2012 11:54:09 +0000 Subject: [issue15222] mailbox.mbox writes without empty line after each message In-Reply-To: <1340948825.65.0.977158180544.issue15222@psf.upfronthosting.co.za> Message-ID: <1351252449.39.0.25186678305.issue15222@psf.upfronthosting.co.za> Petri Lehtinen added the comment: The fix was committed when 3.3.0 was in release candidate mode, and wasn't considered important enough to be included in 3.3.0 anymore. It will be included in 3.3.1, which is to be released next month. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15222> _______________________________________ From report at bugs.python.org Fri Oct 26 14:11:18 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 26 Oct 2012 12:11:18 +0000 Subject: [issue16327] subprocess.Popen leaks file descriptors on os.fork() failure In-Reply-To: <1351247848.69.0.50082867268.issue16327@psf.upfronthosting.co.za> Message-ID: <CAH_1eM1zoUzFrCnONB0h3A_tpMVEwNPxAD1bKp4FU0CnMeY4nQ@mail.gmail.com> Charles-Fran?ois Natali added the comment: > The problem with using RLIMIT is that the testsuite could be executing several tests in parallel using independent threads, for instance. You don't want to influence unrelated tests. That's why I suggested to run it in a subprocess: this is used frequently, e.g. for signal or deadlock tests. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Fri Oct 26 14:12:09 2012 From: report at bugs.python.org (Janne Karila) Date: Fri, 26 Oct 2012 12:12:09 +0000 Subject: [issue16307] multiprocess.pool.map_async callables not working In-Reply-To: <1351062852.0.0.92760767978.issue16307@psf.upfronthosting.co.za> Message-ID: <1351253529.33.0.248194386047.issue16307@psf.upfronthosting.co.za> Janne Karila added the comment: Otherwise I agree, but what if one of the callbacks is not called? The test case would fail on assertEqual(2, len(call_args)) but you wouldn't know which callback is the problem. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16307> _______________________________________ From report at bugs.python.org Fri Oct 26 14:17:41 2012 From: report at bugs.python.org (Winston451) Date: Fri, 26 Oct 2012 12:17:41 +0000 Subject: [issue4202] Multiple interpreters and readline module hook functions. In-Reply-To: <1224903164.25.0.50876142409.issue4202@psf.upfronthosting.co.za> Message-ID: <1351253861.01.0.0896774632208.issue4202@psf.upfronthosting.co.za> Winston451 added the comment: I attached a patch that solve the problem ---------- keywords: +patch Added file: http://bugs.python.org/file27725/readline.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue4202> _______________________________________ From report at bugs.python.org Fri Oct 26 14:18:40 2012 From: report at bugs.python.org (Claude Paroz) Date: Fri, 26 Oct 2012 12:18:40 +0000 Subject: [issue16324] MIMEText __init__ does not support Charset instance In-Reply-To: <1351180172.93.0.972082460953.issue16324@psf.upfronthosting.co.za> Message-ID: <1351253920.96.0.131457227976.issue16324@psf.upfronthosting.co.za> Changes by Claude Paroz <claude at 2xlibre.net>: ---------- keywords: +patch Added file: http://bugs.python.org/file27726/issue16324-1.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16324> _______________________________________ From report at bugs.python.org Fri Oct 26 14:19:40 2012 From: report at bugs.python.org (Winston451) Date: Fri, 26 Oct 2012 12:19:40 +0000 Subject: [issue4202] Multiple interpreters and readline module hook functions. In-Reply-To: <1224903164.25.0.50876142409.issue4202@psf.upfronthosting.co.za> Message-ID: <1351253980.04.0.603769561996.issue4202@psf.upfronthosting.co.za> Changes by Winston451 <montag451 at laposte.net>: ---------- type: -> behavior versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue4202> _______________________________________ From report at bugs.python.org Fri Oct 26 14:24:31 2012 From: report at bugs.python.org (Winston451) Date: Fri, 26 Oct 2012 12:24:31 +0000 Subject: [issue4202] Multiple interpreters and readline module hook functions. In-Reply-To: <1224903164.25.0.50876142409.issue4202@psf.upfronthosting.co.za> Message-ID: <1351254271.74.0.894298527924.issue4202@psf.upfronthosting.co.za> Changes by Winston451 <montag451 at laposte.net>: Added file: http://bugs.python.org/file27727/readline.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue4202> _______________________________________ From report at bugs.python.org Fri Oct 26 14:24:47 2012 From: report at bugs.python.org (Winston451) Date: Fri, 26 Oct 2012 12:24:47 +0000 Subject: [issue4202] Multiple interpreters and readline module hook functions. In-Reply-To: <1224903164.25.0.50876142409.issue4202@psf.upfronthosting.co.za> Message-ID: <1351254287.01.0.285304013393.issue4202@psf.upfronthosting.co.za> Changes by Winston451 <montag451 at laposte.net>: Removed file: http://bugs.python.org/file27725/readline.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue4202> _______________________________________ From report at bugs.python.org Fri Oct 26 14:41:22 2012 From: report at bugs.python.org (Emil Styrke) Date: Fri, 26 Oct 2012 12:41:22 +0000 Subject: [issue16328] win_add2path.py sets wrong user path Message-ID: <1351255282.63.0.930970476961.issue16328@psf.upfronthosting.co.za> New submission from Emil Styrke: OS: Windows 7 Ultimate x64 Python version: 2.7.3 x64 win_add2path.py in the scripts directory is supposed to add the Scripts directory according to its source. However, it tries to add $PYTHONPATH/Scripts, when in fact the Scripts directory is at $PYTHONPATH/Tools/Scripts in 2.7. However, it seems like e.g. Setuptools still installs itself in $PYTHONPATH/Scripts, so maybe the right solution is to add both directories. Furthermore, the script sets the default user path to %PATH%, which is not correct at least on windows 7. I have to manually delete this part of the user path to get the user path merged correctly with the system path in cmd.exe. ---------- components: Demos and Tools, Windows messages: 173840 nosy: Emil.Styrke priority: normal severity: normal status: open title: win_add2path.py sets wrong user path type: behavior versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16328> _______________________________________ From report at bugs.python.org Fri Oct 26 14:59:15 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Fri, 26 Oct 2012 12:59:15 +0000 Subject: [issue16307] multiprocess.pool.map_async callables not working In-Reply-To: <1351062852.0.0.92760767978.issue16307@psf.upfronthosting.co.za> Message-ID: <1351256355.07.0.77144969118.issue16307@psf.upfronthosting.co.za> Hynek Schlawack added the comment: True, it makes sense to push this assert to the end. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16307> _______________________________________ From report at bugs.python.org Fri Oct 26 15:02:22 2012 From: report at bugs.python.org (Berker Peksag) Date: Fri, 26 Oct 2012 13:02:22 +0000 Subject: [issue4202] Multiple interpreters and readline module hook functions. In-Reply-To: <1224903164.25.0.50876142409.issue4202@psf.upfronthosting.co.za> Message-ID: <1351256542.19.0.918544990558.issue4202@psf.upfronthosting.co.za> Changes by Berker Peksag <berker.peksag at gmail.com>: ---------- versions: -Python 2.6, Python 2.7, Python 3.0, Python 3.1, Python 3.2, Python 3.3, Python 3.5 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue4202> _______________________________________ From report at bugs.python.org Fri Oct 26 15:25:54 2012 From: report at bugs.python.org (Tim Golden) Date: Fri, 26 Oct 2012 13:25:54 +0000 Subject: [issue16328] win_add2path.py sets wrong user path In-Reply-To: <1351255282.63.0.930970476961.issue16328@psf.upfronthosting.co.za> Message-ID: <1351257954.85.0.617019697892.issue16328@psf.upfronthosting.co.za> Changes by Tim Golden <mail at timgolden.me.uk>: ---------- nosy: +christian.heimes _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16328> _______________________________________ From report at bugs.python.org Fri Oct 26 15:26:38 2012 From: report at bugs.python.org (Tim Golden) Date: Fri, 26 Oct 2012 13:26:38 +0000 Subject: [issue16328] win_add2path.py sets wrong user path In-Reply-To: <1351255282.63.0.930970476961.issue16328@psf.upfronthosting.co.za> Message-ID: <1351257998.43.0.579634845467.issue16328@psf.upfronthosting.co.za> Tim Golden added the comment: [this response appears to have got lost in an email black hole somewhere] I assume that "$PYTHONPATH" is actually referring to sys.exec_prefix (and not the PYTHONPATH env var which has nothing to do with this). In any case c:\python27\scripts is still the place for scripts. There is a c:\python27\tools\scripts (which you're welcome to add to your %PATH% if you find the scripts useful) but that's not the place where user-installed packages are expected to install their executable helper scripts. Without looking closely, I think I agree about default the user path to %PATH%. I'll add Christian Heimes to this call who, I think, wrote the original code. ---------- nosy: +tim.golden _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16328> _______________________________________ From mail at timgolden.me.uk Fri Oct 26 14:47:50 2012 From: mail at timgolden.me.uk (Tim Golden) Date: Fri, 26 Oct 2012 13:47:50 +0100 Subject: [issue16328] win_add2path.py sets wrong user path In-Reply-To: <1351255282.63.0.930970476961.issue16328@psf.upfronthosting.co.za> References: <1351255282.63.0.930970476961.issue16328@psf.upfronthosting.co.za> Message-ID: <508A8676.9080803@timgolden.me.uk> I assume that "$PYTHONPATH" is actually referring to sys.exec_prefix (and not the PYTHONPATH env var which has nothing to do with this). In any case c:\python27\scripts is still the place for scripts. There is a c:\python27\tools\scripts (which you're welcome to add to your %PATH% if you find the scripts useful) but that's not the place where user-installed packages are expected to install their executable helper scripts. Without looking closely, I think I agree about default the user path to %PATH%. I'll add Christian Heimes to this call who, I think, wrote the original code. From report at bugs.python.org Fri Oct 26 15:34:58 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 26 Oct 2012 13:34:58 +0000 Subject: [issue16329] mimetypes does not support webm type Message-ID: <1351258498.52.0.166970519729.issue16329@psf.upfronthosting.co.za> New submission from Giampaolo Rodola': http://www.webmproject.org/docs/container/#naming ---------- components: Library (Lib) files: webm.diff keywords: patch messages: 173843 nosy: giampaolo.rodola priority: normal severity: normal status: open title: mimetypes does not support webm type versions: Python 3.4 Added file: http://bugs.python.org/file27728/webm.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16329> _______________________________________ From report at bugs.python.org Fri Oct 26 15:35:15 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 26 Oct 2012 13:35:15 +0000 Subject: [issue16329] mimetypes does not support webm type In-Reply-To: <1351258498.52.0.166970519729.issue16329@psf.upfronthosting.co.za> Message-ID: <1351258515.83.0.537318124587.issue16329@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: (patch in attachment) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16329> _______________________________________ From report at bugs.python.org Fri Oct 26 15:44:07 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 26 Oct 2012 13:44:07 +0000 Subject: [issue16329] mimetypes does not support webm type In-Reply-To: <1351258498.52.0.166970519729.issue16329@psf.upfronthosting.co.za> Message-ID: <1351259047.6.0.543228268385.issue16329@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: How do we know if the "webm" file is video+audio or audio only?. Mimetypes are different. :-? ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16329> _______________________________________ From report at bugs.python.org Fri Oct 26 15:51:04 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 26 Oct 2012 13:51:04 +0000 Subject: [issue16329] mimetypes does not support webm type In-Reply-To: <1351258498.52.0.166970519729.issue16329@psf.upfronthosting.co.za> Message-ID: <1351259464.5.0.428652532446.issue16329@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I'd say we can't but I suppose the same problem might exist for other mime types as well. Given that we can't inspect file content the only choice we have is either decide to not support a certain mime type or assume the most common scenario, which in case of webm is "video". ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16329> _______________________________________ From report at bugs.python.org Fri Oct 26 16:11:09 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 26 Oct 2012 14:11:09 +0000 Subject: [issue16329] mimetypes does not support webm type In-Reply-To: <1351258498.52.0.166970519729.issue16329@psf.upfronthosting.co.za> Message-ID: <1351260669.46.0.0257341305061.issue16329@psf.upfronthosting.co.za> R. David Murray added the comment: I suppose this is a flaw in the mimetype API. At some point perhaps we should fix it, but in the meantime....does anyone have a pointer to an actual IANA submission for this mime type? I think we can probably no longer wait for official IANA approval, but it would be nice to have some sort of documentation that a given type is more than just in de-facto existence. ---------- nosy: +r.david.murray _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16329> _______________________________________ From report at bugs.python.org Fri Oct 26 16:21:33 2012 From: report at bugs.python.org (=?utf-8?q?Daniel_O=C5=BAminkowski?=) Date: Fri, 26 Oct 2012 14:21:33 +0000 Subject: [issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express In-Reply-To: <1260858478.84.0.495655867168.issue7511@psf.upfronthosting.co.za> Message-ID: <1351261293.84.0.966536201531.issue7511@psf.upfronthosting.co.za> Daniel O?minkowski added the comment: Python 2.7.3 WinXP Professional 2002 + SP3 Visual Studio C++ Express 2008 I bumped into this error trying to install fabric. One of the installation steps is compiling pycrypto. After looking into C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat I saw: "%VS90COMNTOOLS%vsvars32.bat" so I run: set VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools directly before pip install fabric and it compiled successfully. Still need to see if it works. ---------- nosy: +Daniel.Ozminkowski _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue7511> _______________________________________ From report at bugs.python.org Fri Oct 26 16:32:05 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Oct 2012 14:32:05 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <1351261925.18.0.387360020681.issue15494@psf.upfronthosting.co.za> Ezio Melotti added the comment: So IIUC the package will contain __init__.py (what is now support.py), script_helper, and pkg_helper. One reason why I proposed to merge script_helper with support.py is that functions like assert_python*() are used in several modules already, and are generic enough to belong in support.py IMHO (that's also why I was looking for them there). I count almost 20 modules that are currently using these functions, and there might be more that could benefit from them. In script_helper I also see two functions that seem to deal with packages: make_pkg and make_zip_pkg. If these get moved to pkg_helper, script_helper will be left with just an handful of generic functions. In addition, if the functions you want to add in pkg_helper are also generic enough, it might still be better to put everything in support.py. To summarize I think that adding a package with 3 modules is still better than having modules around in test/, but merging everything in support.py might be even better (this depends on the functions that will end up in each module, how generic they are, and how the modules are divide). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15494> _______________________________________ From report at bugs.python.org Fri Oct 26 16:48:39 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Fri, 26 Oct 2012 14:48:39 +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: <1351262919.93.0.227760752256.issue8713@psf.upfronthosting.co.za> Richard Oudkerk added the comment: For updated code see http://hg.python.org/sandbox/sbt#spawn This uses _posixsubprocess and closefds=True. ---------- hgrepos: +157 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8713> _______________________________________ From report at bugs.python.org Fri Oct 26 17:11:45 2012 From: report at bugs.python.org (Lucas Maystre) Date: Fri, 26 Oct 2012 15:11:45 +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: <1351264305.14.0.239107969979.issue11175@psf.upfronthosting.co.za> Lucas Maystre added the comment: Alright, here's a version with more tests (unittest.mock is awesome!). I think it tests exactly what it should (and no more), i.e. that the arguments are correctly passed to `open`. ---------- Added file: http://bugs.python.org/file27729/filetype11175.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11175> _______________________________________ From report at bugs.python.org Fri Oct 26 17:15:30 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Fri, 26 Oct 2012 15:15: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: <1351264530.45.0.81052398687.issue11175@psf.upfronthosting.co.za> Petri Lehtinen added the comment: LGTM. Let's wait for Steven's comments as he's the maintainer of argparse. ---------- keywords: +needs review stage: patch review -> commit review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11175> _______________________________________ From report at bugs.python.org Fri Oct 26 17:28:20 2012 From: report at bugs.python.org (Emil Styrke) Date: Fri, 26 Oct 2012 15:28:20 +0000 Subject: [issue16328] win_add2path.py sets wrong user path In-Reply-To: <1351255282.63.0.930970476961.issue16328@psf.upfronthosting.co.za> Message-ID: <1351265300.5.0.608801990731.issue16328@psf.upfronthosting.co.za> Emil Styrke added the comment: Ok, thanks for clearing that up. And yes, I meant the pythonpath variable in the script, which seems to be derived from sys.executable. But in that case, it's unfortunate that the c:\python27\scripts dir is not created during install. I did win_add2path right after install, and then it didn't add the scripts path because it didn't exist. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16328> _______________________________________ From report at bugs.python.org Fri Oct 26 17:28:46 2012 From: report at bugs.python.org (Berker Peksag) Date: Fri, 26 Oct 2012 15:28:46 +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: <1351265326.8.0.9768016951.issue11175@psf.upfronthosting.co.za> Changes by Berker Peksag <berker.peksag at gmail.com>: ---------- nosy: -berker.peksag _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11175> _______________________________________ From report at bugs.python.org Fri Oct 26 17:40:53 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 26 Oct 2012 15:40:53 +0000 Subject: [issue16271] weird dual behavior with changing __qualname__; different values observed through attribute and descriptor In-Reply-To: <1350517386.42.0.0716657058677.issue16271@psf.upfronthosting.co.za> Message-ID: <1351266053.92.0.0742581044226.issue16271@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Was does qualname need to be on the struct? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16271> _______________________________________ From report at bugs.python.org Fri Oct 26 17:42:57 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2012 15:42:57 +0000 Subject: [issue16330] Use surrogate-related macros Message-ID: <1351266176.96.0.911861478569.issue16330@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: A set of macros to work with surrogates was introduced in 3.3: Py_UNICODE_IS_SURROGATE, Py_UNICODE_IS_HIGH_SURROGATE, Py_UNICODE_IS_LOW_SURROGATE, Py_UNICODE_JOIN_SURROGATES, Py_UNICODE_HIGH_SURROGATE, and Py_UNICODE_LOW_SURROGATE. Using this macros makes a code more readable, protect from errors, and allows use the one most effective implementation. But not all surrogate-related code uses this macros. I suppose this is done inadvertently, somewhere the macro and naked code used in neighboring lines. The proposed patch replaces a naked surrogate code to macros in all places except expat (which is a foreign code). ---------- components: Interpreter Core, Unicode files: use_surrogate_macros.patch keywords: patch messages: 173855 nosy: ezio.melotti, haypo, pitrou, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use surrogate-related macros type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27730/use_surrogate_macros.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16330> _______________________________________ From report at bugs.python.org Fri Oct 26 17:46:56 2012 From: report at bugs.python.org (=?utf-8?q?Peter_W=C3=BCrtz?=) Date: Fri, 26 Oct 2012 15:46:56 +0000 Subject: [issue16239] PEP8 arithmetic operator examples In-Reply-To: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> Message-ID: <1351266416.87.0.762204404639.issue16239@psf.upfronthosting.co.za> Peter W?rtz added the comment: >> x * 2 - 1 is less clear than x*2 - 1 > I don't feel this. Anyone else feel this? I strongly feel so. And if you don't take my word for it, just open any math book or look at any formula and recognize that it is the general consensus that the elements of a product are written close together whereas the spacing between two summands is considerably larger. Typically, the dots between products are omitted to reduce the spacing even further. Trying to educate people to do otherwise is just weird, isn't it? > It seems to me, this is a serious change in the Style Guide. Actually it isn't. Even the current style guide says that there should be an increased amount of spacing around operators of low(est) priority. The serious change happened when the old rule "always use exactly one space around all arithmetic operators" fell, which certainly was a good call. I've seen arguments on mailing lists whether to use x ** 2 + 1 instead of x**2 + 1 based on that rule. I hardly doubt that anyone prefers x ** 2 + 1 over x**2 + 1, so neither should the style guide. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16239> _______________________________________ From report at bugs.python.org Fri Oct 26 17:53:12 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 26 Oct 2012 15:53:12 +0000 Subject: [issue16271] weird dual behavior with changing __qualname__; different values observed through attribute and descriptor In-Reply-To: <1350517386.42.0.0716657058677.issue16271@psf.upfronthosting.co.za> Message-ID: <1351266792.59.0.566402402492.issue16271@psf.upfronthosting.co.za> Benjamin Peterson added the comment: s/Was/Why/ ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16271> _______________________________________ From report at bugs.python.org Fri Oct 26 18:16:07 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 26 Oct 2012 16:16:07 +0000 Subject: [issue16206] dict() docs should display multiple signatures In-Reply-To: <1350025773.95.0.890132868145.issue16206@psf.upfronthosting.co.za> Message-ID: <3Xp9LG04bPzPBj@mail.python.org> Roundup Robot added the comment: New changeset 361beec678e1 by Ezio Melotti in branch '2.7': #16206: Improve examples about dict construction. http://hg.python.org/cpython/rev/361beec678e1 New changeset eb999002916c by Ezio Melotti in branch '3.2': #16206: Improve examples about dict construction. http://hg.python.org/cpython/rev/eb999002916c New changeset 2c1fff6f8956 by Ezio Melotti in branch '3.3': #16206: merge with 3.2. http://hg.python.org/cpython/rev/2c1fff6f8956 New changeset 46ce82b4c1fa by Ezio Melotti in branch 'default': #16206: merge with 3.3. http://hg.python.org/cpython/rev/46ce82b4c1fa ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16206> _______________________________________ From report at bugs.python.org Fri Oct 26 18:19:44 2012 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 26 Oct 2012 16:19:44 +0000 Subject: [issue16264] test_logging failure on Windows 7 buildbot In-Reply-To: <1350471646.28.0.767525471529.issue16264@psf.upfronthosting.co.za> Message-ID: <1351268384.7.0.995367408943.issue16264@psf.upfronthosting.co.za> Vinay Sajip added the comment: > (note: SocketHandler's implementation looks grotesque. Enough said). Care to be a little more constructive in your criticism? I'm quite open to improving it, if you have any suggestions for doing so. It's a very basic exponential back-off approach - the only intent was not to keep trying to frequently connect to a server which might be offline or unreachable. ---------- nosy: +vinay.sajip _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16264> _______________________________________ From report at bugs.python.org Fri Oct 26 18:29:55 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Oct 2012 16:29:55 +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: <1351268995.1.0.0498025358769.issue16304@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- keywords: +easy nosy: +ezio.melotti stage: -> needs patch type: -> enhancement _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16304> _______________________________________ From report at bugs.python.org Fri Oct 26 18:30:34 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Oct 2012 16:30:34 +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: <1351269034.29.0.298219159383.issue16312@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +ezio.melotti, michael.foord _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16312> _______________________________________ From report at bugs.python.org Fri Oct 26 18:35:13 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 26 Oct 2012 16:35:13 +0000 Subject: [issue16317] Mention lzma module in tutorial In-Reply-To: <1351115952.07.0.995218078366.issue16317@psf.upfronthosting.co.za> Message-ID: <3Xp9mJ2VD9zMVN@mail.python.org> Roundup Robot added the comment: New changeset 2fc18ba8ca4a by Ezio Melotti in branch '3.3': #16317: mention lzma in the tutorial. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/2fc18ba8ca4a New changeset f2f615b5718a by Ezio Melotti in branch 'default': #16317: merge with 3.3. http://hg.python.org/cpython/rev/f2f615b5718a ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16317> _______________________________________ From report at bugs.python.org Fri Oct 26 18:35:42 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Oct 2012 16:35:42 +0000 Subject: [issue16317] Mention lzma module in tutorial In-Reply-To: <1351115952.07.0.995218078366.issue16317@psf.upfronthosting.co.za> Message-ID: <1351269342.58.0.218870968699.issue16317@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: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16317> _______________________________________ From report at bugs.python.org Fri Oct 26 19:14:24 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 26 Oct 2012 17:14:24 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351271664.1.0.625630356765.issue8040@psf.upfronthosting.co.za> Changes by Chris Jerdonek <chris.jerdonek at gmail.com>: ---------- nosy: +chris.jerdonek title: It would be nice if documentation pages linked to other versions of the same document -> documentation pages should link to other versions of the same page _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Fri Oct 26 19:20:47 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 26 Oct 2012 17:20:47 +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: <1351272047.17.0.0770282614721.issue16312@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Can you give an example of what you would like the API to look like (i.e. what you would like to be able to type from the command-line if, say, configuring logging as in the SO post)? I'm not sure I understand why a wrapper script isn't a good enough solution, as described in the accepted answer on SO. ---------- nosy: +chris.jerdonek _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16312> _______________________________________ From report at bugs.python.org Fri Oct 26 19:22:31 2012 From: report at bugs.python.org (Michael Foord) Date: Fri, 26 Oct 2012 17:22:31 +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: <1351272151.78.0.533606480373.issue16312@psf.upfronthosting.co.za> Michael Foord added the comment: I would do this with a module level (global) flag as to whether the initial set up has been done and a BaseTestCase class that checks this flag and calls a set up function if it hasn't been done yet (and then sets the flag). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16312> _______________________________________ From report at bugs.python.org Fri Oct 26 19:22:44 2012 From: report at bugs.python.org (Michael Foord) Date: Fri, 26 Oct 2012 17:22:44 +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: <1351272164.7.0.75176381354.issue16312@psf.upfronthosting.co.za> Changes by Michael Foord <michael at voidspace.org.uk>: ---------- assignee: -> michael.foord _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16312> _______________________________________ From report at bugs.python.org Fri Oct 26 19:34:20 2012 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 26 Oct 2012 17:34:20 +0000 Subject: [issue16331] Add a version switcher to python docs site Message-ID: <1351272860.89.0.664706637925.issue16331@psf.upfronthosting.co.za> New submission from Yury Selivanov: This patch adds a dropdown to python documentation top toolbar: https://dl.dropbox.com/u/21052/python/p3_doc_dd.png This patch version is for python 3.3 & 3.4 docs theme, but I can quickly make patches for 3.2-style and below. JavaScript that monitors dropdown events is smart enough to: 1) Redirect users to the same documentation section, i.e. if the user is on 'atexit' module doc page for 3.3, and decides to switch to '2.7', he'll see 'atexit' module doc page for 2.7 2) Before making a redirect, is checks that the doc page exists for the selected python version, and if not, then it simply redirects to 'http://docs.python.org/{version}' 3) Users with JS disabled will see a plain-text current version (no drop down) ---------- assignee: docs at python components: Documentation files: py3_version_switch.patch keywords: patch messages: 173864 nosy: docs at python, georg.brandl, rhettinger, yselivanov priority: normal severity: normal status: open title: Add a version switcher to python docs site versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27731/py3_version_switch.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16331> _______________________________________ From report at bugs.python.org Fri Oct 26 19:34:31 2012 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 26 Oct 2012 17:34:31 +0000 Subject: [issue16331] Add a version switcher to python docs site In-Reply-To: <1351272860.89.0.664706637925.issue16331@psf.upfronthosting.co.za> Message-ID: <1351272871.35.0.733760048431.issue16331@psf.upfronthosting.co.za> Changes by Yury Selivanov <yselivanov.ml at gmail.com>: ---------- type: -> enhancement _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16331> _______________________________________ From report at bugs.python.org Fri Oct 26 19:37:25 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Oct 2012 17:37:25 +0000 Subject: [issue16331] Add a version switcher to python docs site In-Reply-To: <1351272860.89.0.664706637925.issue16331@psf.upfronthosting.co.za> Message-ID: <1351273045.07.0.0847635714042.issue16331@psf.upfronthosting.co.za> Ezio Melotti added the comment: Thanks for the patch. What happens if the module doesn't exist in a previous version or if it has a different name? It's probably not necessary to include all those versions. ---------- nosy: +ezio.melotti stage: -> patch review versions: +Python 2.7 -Python 3.1 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16331> _______________________________________ From report at bugs.python.org Fri Oct 26 19:39:12 2012 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 26 Oct 2012 17:39:12 +0000 Subject: [issue16331] Add a version switcher to python docs site In-Reply-To: <1351272860.89.0.664706637925.issue16331@psf.upfronthosting.co.za> Message-ID: <1351273152.8.0.142616638021.issue16331@psf.upfronthosting.co.za> Yury Selivanov added the comment: > What happens if the module doesn't exist in a previous version or if it has a different name? As I said in the first message: """ 2) Before making a redirect, is checks that the doc page exists for the selected python version, and if not, then it simply redirects to 'http://docs.python.org/{version}' """ That's the most sane method I can imagine. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16331> _______________________________________ From report at bugs.python.org Fri Oct 26 19:55:45 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 26 Oct 2012 17:55:45 +0000 Subject: [issue9192] Add a a way to determine float format In-Reply-To: <1278527159.47.0.497382000521.issue9192@psf.upfronthosting.co.za> Message-ID: <1351274145.34.0.28744257428.issue9192@psf.upfronthosting.co.za> Mark Dickinson added the comment: What use-cases did you have in mind for this? (I assume that something motivated this report.) It seems to me that there's not actually much to say about the float format: the only format that Python realistically supports these days is the IEEE 754 binary64 format. (In theory we still support whatever C uses, but in practice I suspect that if we were ever to manage to run Python on a machine whose C doubles *weren't* in binary64 format, we'd see quite a lot of breakage.) So the only variation that we'll see is little-endian versus big-endian. We don't even support the ARM OABI mixed-endian format. Should endianness be considered an important part of the format? ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9192> _______________________________________ From report at bugs.python.org Fri Oct 26 19:56:56 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Oct 2012 17:56:56 +0000 Subject: [issue16331] Add a version switcher to python docs site In-Reply-To: <1351272860.89.0.664706637925.issue16331@psf.upfronthosting.co.za> Message-ID: <1351274216.32.0.887691579916.issue16331@psf.upfronthosting.co.za> Ezio Melotti added the comment: I left a review on rietveld. FWIW we discussed this already somewhere, and IIRC the two main issues were: 1) mapping new/renamed/delete files between versions; 2) making this work while building the docs locally; Redirecting to 'http://docs.python.org/{version}' might be an acceptable solution for 1) if we don't want to keep lists of module names. Regarding 2) it depends on the local directory layout, so it would need to be configurable. These are just further enhancements though, I think it would be good to have something similar even if it doesn't cover all the possible cases. ---------- nosy: +eric.araujo, r.david.murray _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16331> _______________________________________ From report at bugs.python.org Fri Oct 26 20:00:56 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Oct 2012 18:00:56 +0000 Subject: [issue16331] Add a version switcher to python docs site In-Reply-To: <1351272860.89.0.664706637925.issue16331@psf.upfronthosting.co.za> Message-ID: <1351274456.95.0.767079320144.issue16331@psf.upfronthosting.co.za> Ezio Melotti added the comment: See #8040. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16331> _______________________________________ From report at bugs.python.org Fri Oct 26 20:03:24 2012 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 26 Oct 2012 18:03:24 +0000 Subject: [issue16331] Add a version switcher to python docs site In-Reply-To: <1351272860.89.0.664706637925.issue16331@psf.upfronthosting.co.za> Message-ID: <1351274604.1.0.2383523861.issue16331@psf.upfronthosting.co.za> Yury Selivanov added the comment: > 1) mapping new/renamed/delete files between versions; I think that this dropdown is mostly like to be used to switch between somewhat recent python versions, like '3.2' -> '3.3', '2.7' -> '3.3', and not between '2.4' -> '3.4' And most of the internet links point to plain 'docs.python.org', without version at all. > 2) making this work while building the docs locally; I think we need to make this JS dropdown to be off by default; so local users won't notice a thing. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16331> _______________________________________ From report at bugs.python.org Fri Oct 26 20:09:55 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Oct 2012 18:09:55 +0000 Subject: [issue16331] Add a version switcher to python docs site In-Reply-To: <1351272860.89.0.664706637925.issue16331@psf.upfronthosting.co.za> Message-ID: <1351274995.24.0.0334044024694.issue16331@psf.upfronthosting.co.za> Ezio Melotti added the comment: > I think that this dropdown is mostly like to be used to switch between > somewhat recent python versions, like '3.2' -> '3.3', '2.7' -> '3.3', > and not between '2.4' -> '3.4' I mostly want to switch between 2.x and 3.x, and several modules got renamed between these versions. There are also new modules on each release (5 new ones in 3.3). > I think we need to make this JS dropdown to be off by default; > so local users won't notice a thing. Even better would be to make it work -- while fixing the docs I often have to apply a patch on each version and then check that it works. If that's not implemented, disabling it sounds OK. By now I'm used to just change the URLs (I do the same even on docs.python.org), but it would be a nice addition. These are just further improvements though, they don't necessarily prevent the current patch to be accepted. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16331> _______________________________________ From report at bugs.python.org Fri Oct 26 20:11:31 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Oct 2012 18:11:31 +0000 Subject: [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1351275091.75.0.823180444003.issue14901@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- keywords: +easy versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14901> _______________________________________ From report at bugs.python.org Fri Oct 26 20:12:33 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Oct 2012 18:12:33 +0000 Subject: [issue10936] Simple CSS fix for left margin at docs.python.org In-Reply-To: <1295377924.0.0.902429691003.issue10936@psf.upfronthosting.co.za> Message-ID: <1351275153.5.0.534888922845.issue10936@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- versions: +Python 3.4 -Python 3.1 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10936> _______________________________________ From report at bugs.python.org Fri Oct 26 20:16:00 2012 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 26 Oct 2012 18:16:00 +0000 Subject: [issue16331] Add a version switcher to python docs site In-Reply-To: <1351272860.89.0.664706637925.issue16331@psf.upfronthosting.co.za> Message-ID: <1351275360.47.0.0885331229478.issue16331@psf.upfronthosting.co.za> Yury Selivanov added the comment: > I mostly want to switch between 2.x and 3.x, and several modules got renamed between these versions. There are also new modules on each release (5 new ones in 3.3). To make that work we'll need to have a modules mapping between 2nd and 3rd versions. It will also make URL parsing/changing logic more complicated and error prone... ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16331> _______________________________________ From report at bugs.python.org Fri Oct 26 20:17:27 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Oct 2012 18:17:27 +0000 Subject: =?utf-8?q?=5Bissue16325=5D_PEP=C2=A08_refers_to_reference_to_PEP_8?= In-Reply-To: <1351186367.56.0.154772018317.issue16325@psf.upfronthosting.co.za> Message-ID: <1351275447.09.0.571085369375.issue16325@psf.upfronthosting.co.za> Terry J. Reedy added the comment: "Where there's conflict, Guido's style rules for the purposes of this PEP." I think this sentence should go. The only way that I can make sense of it is that Guido's and Barry's documents have rules that are not in PEP 8 and that if they conflict, Guido's wins. (Sort of incorporation by reference.) But if Guido's does not exist, then that also makes sense. In any case, PEP8 should say everything we want it to say without reference to other docs. "This PEP may still be incomplete (in fact, it may never be finished <wink>)" This should either be deleted or modified. "This PEP is subject to modification." or "This PEP will always be subject to modification." is sufficient. ---------- nosy: +terry.reedy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16325> _______________________________________ From report at bugs.python.org Fri Oct 26 20:17:33 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 26 Oct 2012 18:17:33 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351275453.73.0.557542150786.issue8040@psf.upfronthosting.co.za> ?ric Araujo added the comment: > If you want to work on this you should also consider that the URLs used on docs.python.org don't necessary > match the directory structure present when building the doc locally. I think this is irrelevant; this feature is intended for the web site, not for developers building the docs. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Fri Oct 26 20:18:00 2012 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 26 Oct 2012 18:18:00 +0000 Subject: [issue16331] Add a version switcher to python docs site In-Reply-To: <1351272860.89.0.664706637925.issue16331@psf.upfronthosting.co.za> Message-ID: <1351275480.9.0.741638874101.issue16331@psf.upfronthosting.co.za> Yury Selivanov added the comment: Eric, I'm not sure what we should do with #8040. I searched for the existing issue before creating a new one, but obviously failed. Should we just close #8040 and point it to #16331? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16331> _______________________________________ From report at bugs.python.org Fri Oct 26 20:19:48 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 26 Oct 2012 18:19:48 +0000 Subject: [issue16331] Add a version switcher to python docs site In-Reply-To: <1351272860.89.0.664706637925.issue16331@psf.upfronthosting.co.za> Message-ID: <1351275588.04.0.358927324067.issue16331@psf.upfronthosting.co.za> ?ric Araujo added the comment: Typically we close the newer issue as duplicate of the existing one, unless the new has much more discussion or patches. I would close this one. About renamed modules: there?s a mapping in lib2to3 that contains the info. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16331> _______________________________________ From report at bugs.python.org Fri Oct 26 20:24:12 2012 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 26 Oct 2012 18:24:12 +0000 Subject: [issue16331] Add a version switcher to python docs site In-Reply-To: <1351272860.89.0.664706637925.issue16331@psf.upfronthosting.co.za> Message-ID: <1351275852.96.0.966316444258.issue16331@psf.upfronthosting.co.za> Yury Selivanov added the comment: Eric, Ezio, This one has a patch attached with a relevant discussion & review, so I'd close #8040. But if you guys decide to close this one and switch to #8040 - i'm fine. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16331> _______________________________________ From report at bugs.python.org Fri Oct 26 20:25:05 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Oct 2012 18:25:05 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351275905.74.0.177809229489.issue8040@psf.upfronthosting.co.za> Ezio Melotti added the comment: As I said on #16331, it would be nice to have it, but it shouldn't block a patch that works for the website only (having it there is still better than not having it at all). What I meant to say is that taking this into account while writing the code is a good idea, and having configurable paths might also turn out to be useful in case we change the configuration of docs.python.org. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Fri Oct 26 20:56:54 2012 From: report at bugs.python.org (Berker Peksag) Date: Fri, 26 Oct 2012 18:56:54 +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: <1351277814.05.0.363220392879.issue6478@psf.upfronthosting.co.za> Berker Peksag added the comment: Here is the second patch with Alexander Belopolsky's comments addressed. ---------- nosy: +berker.peksag versions: +Python 3.3, Python 3.4 -Python 3.1 Added file: http://bugs.python.org/file27732/issue6478.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6478> _______________________________________ From report at bugs.python.org Fri Oct 26 21:04:08 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 26 Oct 2012 19:04:08 +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: <1351278248.63.0.360392843638.issue6478@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The patch looks good, but I have a few comments on the test: 1. Does it work on Windows? It seems to rely on Olson's TZ names. 2. Please use @run_with_tz decorator. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6478> _______________________________________ From report at bugs.python.org Fri Oct 26 22:03:29 2012 From: report at bugs.python.org (Berker Peksag) Date: Fri, 26 Oct 2012 20:03:29 +0000 Subject: [issue16332] Use new exception handling syntax in Subprocess documentation Message-ID: <1351281808.98.0.372067988973.issue16332@psf.upfronthosting.co.za> New submission from Berker Peksag: See: http://docs.python.org/whatsnew/2.6.html#pep-3110-exception-handling-changes Patch attached. ---------- assignee: docs at python components: Documentation files: subprocess-exception-2.7.patch keywords: patch messages: 173881 nosy: berker.peksag, docs at python priority: normal severity: normal status: open title: Use new exception handling syntax in Subprocess documentation versions: Python 2.7 Added file: http://bugs.python.org/file27733/subprocess-exception-2.7.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16332> _______________________________________ From report at bugs.python.org Fri Oct 26 22:10:17 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 26 Oct 2012 20:10:17 +0000 Subject: [issue16332] Use new exception handling syntax in Subprocess documentation In-Reply-To: <1351281808.98.0.372067988973.issue16332@psf.upfronthosting.co.za> Message-ID: <3XpGXT1M2fzPb4@mail.python.org> Roundup Robot added the comment: New changeset 7a69b4077afb by Ezio Melotti in branch '2.7': #16332: use "except OSError as e" in subprocess docs. Patch by Berker Peksag. http://hg.python.org/cpython/rev/7a69b4077afb ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16332> _______________________________________ From report at bugs.python.org Fri Oct 26 22:10:46 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Oct 2012 20:10:46 +0000 Subject: [issue16332] Use new exception handling syntax in Subprocess documentation In-Reply-To: <1351281808.98.0.372067988973.issue16332@psf.upfronthosting.co.za> Message-ID: <1351282246.86.0.505524612937.issue16332@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: -> committed/rejected status: open -> pending type: -> enhancement _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16332> _______________________________________ From report at bugs.python.org Fri Oct 26 22:10:58 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 26 Oct 2012 20:10:58 +0000 Subject: [issue16331] Add a version switcher to python docs site In-Reply-To: <1351272860.89.0.664706637925.issue16331@psf.upfronthosting.co.za> Message-ID: <1351282258.18.0.712085677012.issue16331@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I recommend closing this as a duplicate. ---------- nosy: +chris.jerdonek _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16331> _______________________________________ From report at bugs.python.org Fri Oct 26 22:11:02 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Oct 2012 20:11:02 +0000 Subject: [issue16332] Use new exception handling syntax in Subprocess documentation In-Reply-To: <1351281808.98.0.372067988973.issue16332@psf.upfronthosting.co.za> Message-ID: <1351282262.12.0.303456092611.issue16332@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- status: pending -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16332> _______________________________________ From report at bugs.python.org Fri Oct 26 22:14:41 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 26 Oct 2012 20:14:41 +0000 Subject: [issue16331] Add a version switcher to python docs site In-Reply-To: <1351272860.89.0.664706637925.issue16331@psf.upfronthosting.co.za> Message-ID: <1351282481.53.0.911397778939.issue16331@psf.upfronthosting.co.za> Martin v. L?wis added the comment: yselivanov: please resubmit the patch to the original issue. ---------- nosy: +loewis resolution: -> duplicate status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16331> _______________________________________ From report at bugs.python.org Fri Oct 26 22:15:13 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 26 Oct 2012 20:15:13 +0000 Subject: [issue16331] Add a version switcher to python docs site In-Reply-To: <1351272860.89.0.664706637925.issue16331@psf.upfronthosting.co.za> Message-ID: <1351282513.01.0.225588508629.issue16331@psf.upfronthosting.co.za> Changes by Martin v. L?wis <martin at v.loewis.de>: ---------- superseder: -> documentation pages should link to other versions of the same page _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16331> _______________________________________ From report at bugs.python.org Fri Oct 26 22:16:08 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 26 Oct 2012 20:16:08 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351282568.47.0.0698432425347.issue8040@psf.upfronthosting.co.za> Martin v. L?wis added the comment: [on yselivanov's patch] I think the menu should drop versions that are not maintained anymore, i.e. anything older than 2.5 (including). If that sounds too harsh, a single item "older" could be added that always navigates to the version selection page. With that, navigating to non-existing pages becomes mostly a non-issue, except for the renaming from 2.x to 3.x. If the list is trimmed in that way, I propose to add the links to the side menu, rather than as a separate drop-down menu. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Fri Oct 26 22:18:05 2012 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 26 Oct 2012 20:18:05 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351282685.06.0.549265345377.issue8040@psf.upfronthosting.co.za> Yury Selivanov added the comment: Eric, Ezio, I'd like to make the version dropdown to be configurable. The question is--I can add an option (set to False by default) to conf.py. Will you have a way to override it on the 'docs.python.org'? ---------- nosy: +yselivanov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Fri Oct 26 22:22:21 2012 From: report at bugs.python.org (Janne Karila) Date: Fri, 26 Oct 2012 20:22:21 +0000 Subject: [issue16307] multiprocess.pool.map_async callables not working In-Reply-To: <1351062852.0.0.92760767978.issue16307@psf.upfronthosting.co.za> Message-ID: <1351282941.06.0.666256332288.issue16307@psf.upfronthosting.co.za> Janne Karila added the comment: The length assertion protects the test from breaking with IndexError. How about this? Though, it looks like two test cases to me. + self.pool.map_async(int, ['1'], + callback=call_args.append, + error_callback=call_args.append).wait() + self.assertEqual(1, len(call_args)) + self.assertEqual([1], call_args[0]) + self.pool.map_async(int, ['a'], + callback=call_args.append, + error_callback=call_args.append).wait() + self.assertEqual(2, len(call_args)) + self.assertIsInstance(call_args[1], ValueError) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16307> _______________________________________ From report at bugs.python.org Fri Oct 26 23:04:06 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 26 Oct 2012 21:04:06 +0000 Subject: [issue16271] weird dual behavior with changing __qualname__; different values observed through attribute and descriptor In-Reply-To: <1350517386.42.0.0716657058677.issue16271@psf.upfronthosting.co.za> Message-ID: <1351285446.72.0.32050853119.issue16271@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Here's the other option. ---------- Added file: http://bugs.python.org/file27734/qualname2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16271> _______________________________________ From report at bugs.python.org Fri Oct 26 23:22:42 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 26 Oct 2012 21:22:42 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351286562.23.0.210390203015.issue8040@psf.upfronthosting.co.za> Georg Brandl added the comment: A few comments: * If the issue with patch is closed as duplicate, the patch should be attached to the superseder. * The patch looks awfully long for such a simple option list. (e.g., get_version() is just lambda x: x[:3], no need for a function to do that.) * Keep in mind that you can't easily support 2.5 and down anyway, since their URLs are completely different. I call YAGNI on including anything older than 2.6. * Please make it configurable, as indicated. You can add an option recognized by Sphinx in Doc/tools/sphinxext/pyspecific.py, with app.add_config_value. I will then set it properly in the script that rebuilds the docs on docs.python.org. That said, the result looks nice. If we can work out the specifics, +1 for something like it. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Fri Oct 26 23:25:12 2012 From: report at bugs.python.org (Zach Mathew) Date: Fri, 26 Oct 2012 21:25:12 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent Message-ID: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> New submission from Zach Mathew: When using the indent option in json.JSONEncoder, extra trailing whitespace (preceding the newline) is added to list and dict items. For example: >>> import json >>> json.dumps(['foo', 'bar'], indent=1) '[\n "foo", \n "bar"\n]' Notice the blank space between "foo", and \n EXPECTED OUTPUT: '[\n "foo",\n "bar"\n]' ---------- components: Library (Lib) files: fix_json_trailing_space_and_tests.patch keywords: patch messages: 173891 nosy: zmathew priority: normal severity: normal status: open title: Trailing whitespace in json dump when using indent type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file27735/fix_json_trailing_space_and_tests.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16333> _______________________________________ From report at bugs.python.org Fri Oct 26 23:28:59 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 26 Oct 2012 21:28:59 +0000 Subject: [issue16243] Add example for inspect module doc In-Reply-To: <1350343185.48.0.60485336671.issue16243@psf.upfronthosting.co.za> Message-ID: <3XpJHG5zrczQvL@mail.python.org> Roundup Robot added the comment: New changeset 9d3b616fc702 by Andrew Svetlov in branch '3.3': Issue #16243: add example for inspect.formatargspec http://hg.python.org/cpython/rev/9d3b616fc702 New changeset a0337031a6b7 by Andrew Svetlov in branch 'default': Merge issue #16243: add example for inspect.formatargspec http://hg.python.org/cpython/rev/a0337031a6b7 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16243> _______________________________________ From report at bugs.python.org Fri Oct 26 23:31:00 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 26 Oct 2012 21:31:00 +0000 Subject: [issue16243] Add example for inspect module doc In-Reply-To: <1350343185.48.0.60485336671.issue16243@psf.upfronthosting.co.za> Message-ID: <1351287060.1.0.781636861927.issue16243@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Thanks, Berker. I feel the patch is good enough to close the issue. If anybody want to add some value please reopen. ---------- nosy: +asvetlov resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16243> _______________________________________ From report at bugs.python.org Fri Oct 26 23:39:35 2012 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 26 Oct 2012 21:39:35 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351287575.02.0.618031447609.issue8040@psf.upfronthosting.co.za> Yury Selivanov added the comment: > If the issue with patch is closed as duplicate, the patch should be attached to the superseder. Attached now. Although, please don't use it. I'll upload an updated version soon. > The patch looks awfully long for such a simple option list. (e.g., get_version() is just lambda x: x[:3], no need for a function to do that.) Well, I've tried to make it readable. I can uglify it, but it won't save too much. Right now it's about ~2.5kb. > Please make it configurable, as indicated. You can add an option recognized by Sphinx in Doc/tools/sphinxext/pyspecific.py, with app.add_config_value. I will then set it properly in the script that rebuilds the docs on docs.python.org. Is it OK if I make it configurable via theme config property? And if not - how to make a config option declared via 'app.add_config_value' accessible in templates? ---------- keywords: +patch Added file: http://bugs.python.org/file27736/py3_version_switch.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 00:05:58 2012 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 26 Oct 2012 22:05:58 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351289158.47.0.98535731422.issue8040@psf.upfronthosting.co.za> Yury Selivanov added the comment: Attaching a new patch, with all previous issues resolved. Version dropdown can be enabled by the new 'pydoc_versionswitcher' config property (False by default). Please review and test (I've done lots of testing by injecting the JS on live python docs site, but maybe missed something.) ---------- Added file: http://bugs.python.org/file27737/py3_version_switch.2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 00:11:59 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 26 Oct 2012 22:11:59 +0000 Subject: [issue9767] Failures in json doc examples In-Reply-To: <1283549572.36.0.344374385965.issue9767@psf.upfronthosting.co.za> Message-ID: <1351289519.59.0.730243265067.issue9767@psf.upfronthosting.co.za> R. David Murray added the comment: See issue 16333 for the bug report against the json trailing whitespace. ---------- nosy: +r.david.murray _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9767> _______________________________________ From report at bugs.python.org Sat Oct 27 00:13:49 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 26 Oct 2012 22:13:49 +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: <1351289629.02.0.251127109658.issue16333@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the report and patch. I think we'll need a fix for the C version, too (unless it doesn't have the bug). ---------- nosy: +r.david.murray stage: -> patch review versions: -Python 2.6, Python 3.1, Python 3.5 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16333> _______________________________________ From report at bugs.python.org Sat Oct 27 00:27:48 2012 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 26 Oct 2012 22:27:48 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351290468.18.0.125267350347.issue8040@psf.upfronthosting.co.za> Yury Selivanov added the comment: Adding 'py2_version_switch.patch' patch. Applies on 2.7 ---------- Added file: http://bugs.python.org/file27738/py2_version_switch.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 00:28:47 2012 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 26 Oct 2012 22:28:47 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351290527.44.0.758169286908.issue8040@psf.upfronthosting.co.za> Yury Selivanov added the comment: Adding 'py3_2_version_switch.patch'. Applies on 3.2 Both patches (for 2.7 & 3.2) are almost the same as the original patch. Conflicts were trivial. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 00:28:59 2012 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 26 Oct 2012 22:28:59 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351290539.83.0.528264618322.issue8040@psf.upfronthosting.co.za> Changes by Yury Selivanov <yselivanov.ml at gmail.com>: Added file: http://bugs.python.org/file27739/py3_2_version_switch.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 00:29:30 2012 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 26 Oct 2012 22:29:30 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351290570.9.0.398601817876.issue8040@psf.upfronthosting.co.za> Yury Selivanov added the comment: And 'py3_version_switch.2.patch' is for 3.3/master. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 00:48:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2012 22:48:26 +0000 Subject: [issue16334] Faster unicode-escape and raw-unicode-escape codecs Message-ID: <1351291705.86.0.638624862326.issue16334@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch optimizes unicode-escape and raw-unicode-escape codecs. Coders still slower than in 3.2, but much faster than in 3.3. Further speedup is possible with the use of stringlib, but I think that this is enough. The code unified and simplified (251 insertions, 345 deletions). Benchmark results (on AMD Athlon 64 X2 4600+): Py2.7 Py3.2 Py3.3 Py3.4+patch 193 (+11%) 325 (-34%) 66 (+224%) 214 decode unicode-escape 'A'*10000 138 (+72%) 241 (-1%) 154 (+55%) 238 decode unicode-escape '\x80'*10000 193 (+10%) 323 (-34%) 72 (+194%) 212 decode unicode-escape '\x80'+'A'*9999 160 (+59%) 273 (-7%) 169 (+51%) 255 decode unicode-escape '\u0100'*10000 193 (-7%) 324 (-44%) 61 (+195%) 180 decode unicode-escape '\u0100'+'A'*9999 138 (+67%) 242 (-5%) 135 (+71%) 231 decode unicode-escape '\u0100'+'\x80'*9999 160 (+59%) 274 (-7%) 169 (+51%) 255 decode unicode-escape '\u8000'*10000 193 (-7%) 323 (-44%) 61 (+195%) 180 decode unicode-escape '\u8000'+'A'*9999 138 (+67%) 242 (-5%) 135 (+71%) 231 decode unicode-escape '\u8000'+'\x80'*9999 160 (+60%) 276 (-7%) 169 (+51%) 256 decode unicode-escape '\u8000'+'\u0100'*9999 178 (+42%) 275 (-8%) 177 (+43%) 253 decode unicode-escape '\U00010000'*10000 192 (+30%) 323 (-23%) 61 (+310%) 250 decode unicode-escape '\U00010000'+'A'*9999 139 (+35%) 243 (-23%) 119 (+57%) 187 decode unicode-escape '\U00010000'+'\x80'*9999 161 (+38%) 273 (-19%) 150 (+48%) 222 decode unicode-escape '\U00010000'+'\u0100'*9999 161 (+38%) 273 (-19%) 150 (+48%) 222 decode unicode-escape '\U00010000'+'\u8000'*9999 558 (-62%) 427 (-50%) 82 (+161%) 214 decode raw-unicode-escape 'A'*10000 560 (-62%) 425 (-50%) 75 (+183%) 212 decode raw-unicode-escape '\x80'*10000 558 (-62%) 425 (-50%) 75 (+183%) 212 decode raw-unicode-escape '\x80'+'A'*9999 178 (+75%) 235 (+32%) 108 (+188%) 311 decode raw-unicode-escape '\u0100'*10000 555 (-62%) 424 (-50%) 61 (+248%) 212 decode raw-unicode-escape '\u0100'+'A'*9999 559 (-62%) 424 (-50%) 61 (+248%) 212 decode raw-unicode-escape '\u0100'+'\x80'*9999 179 (+74%) 235 (+32%) 108 (+188%) 311 decode raw-unicode-escape '\u8000'*10000 555 (-62%) 424 (-50%) 61 (+248%) 212 decode raw-unicode-escape '\u8000'+'A'*9999 558 (-62%) 425 (-50%) 61 (+248%) 212 decode raw-unicode-escape '\u8000'+'\x80'*9999 178 (+75%) 235 (+32%) 108 (+188%) 311 decode raw-unicode-escape '\u8000'+'\u0100'*9999 200 (+18%) 249 (-5%) 132 (+79%) 236 decode raw-unicode-escape '\U00010000'*10000 554 (-58%) 423 (-46%) 61 (+277%) 230 decode raw-unicode-escape '\U00010000'+'A'*9999 558 (-59%) 424 (-46%) 61 (+277%) 230 decode raw-unicode-escape '\U00010000'+'\x80'*9999 178 (+46%) 235 (+11%) 100 (+160%) 260 decode raw-unicode-escape '\U00010000'+'\u0100'*9999 178 (+44%) 235 (+9%) 100 (+157%) 257 decode raw-unicode-escape '\U00010000'+'\u8000'*9999 182 (+137%) 215 (+101%) 148 (+192%) 432 encode unicode-escape 'A'*10000 582 (-10%) 617 (-16%) 470 (+11%) 521 encode unicode-escape '\x80'*10000 182 (+131%) 215 (+96%) 148 (+184%) 421 encode unicode-escape '\x80'+'A'*9999 624 (-7%) 967 (-40%) 558 (+4%) 579 encode unicode-escape '\u0100'*10000 183 (-19%) 215 (-31%) 132 (+12%) 148 encode unicode-escape '\u0100'+'A'*9999 584 (-23%) 617 (-27%) 464 (-3%) 451 encode unicode-escape '\u0100'+'\x80'*9999 627 (-8%) 968 (-40%) 557 (+4%) 579 encode unicode-escape '\u8000'*10000 183 (-19%) 215 (-31%) 148 (+0%) 148 encode unicode-escape '\u8000'+'A'*9999 584 (-23%) 617 (-27%) 490 (-8%) 451 encode unicode-escape '\u8000'+'\x80'*9999 629 (-8%) 969 (-40%) 555 (+4%) 578 encode unicode-escape '\u8000'+'\u0100'*9999 931 (-39%) 939 (-39%) 602 (-5%) 572 encode unicode-escape '\U00010000'*10000 183 (+7%) 215 (-9%) 180 (+9%) 196 encode unicode-escape '\U00010000'+'A'*9999 584 (-9%) 617 (-13%) 482 (+11%) 534 encode unicode-escape '\U00010000'+'\x80'*9999 630 (-14%) 962 (-43%) 565 (-4%) 544 encode unicode-escape '\U00010000'+'\u0100'*9999 630 (-14%) 964 (-44%) 565 (-4%) 544 encode unicode-escape '\U00010000'+'\u8000'*9999 332 (+1459%) 330 (+1468%) 333 (+1454%) 5175 encode raw-unicode-escape 'A'*10000 332 (+1589%) 329 (+1604%) 333 (+1584%) 5607 encode raw-unicode-escape '\x80'*10000 336 (+1569%) 334 (+1579%) 333 (+1584%) 5607 encode raw-unicode-escape '\x80'+'A'*9999 904 (-38%) 911 (-39%) 557 (+0%) 558 encode raw-unicode-escape '\u0100'*10000 336 (+15%) 335 (+16%) 197 (+97%) 388 encode raw-unicode-escape '\u0100'+'A'*9999 335 (+16%) 335 (+16%) 197 (+97%) 388 encode raw-unicode-escape '\u0100'+'\x80'*9999 904 (-38%) 913 (-39%) 557 (+0%) 558 encode raw-unicode-escape '\u8000'*10000 335 (+16%) 335 (+16%) 197 (+96%) 387 encode raw-unicode-escape '\u8000'+'A'*9999 335 (+16%) 335 (+16%) 196 (+98%) 388 encode raw-unicode-escape '\u8000'+'\x80'*9999 912 (-39%) 909 (-39%) 554 (+1%) 558 encode raw-unicode-escape '\u8000'+'\u0100'*9999 966 (-40%) 997 (-42%) 584 (-0%) 583 encode raw-unicode-escape '\U00010000'*10000 336 (-42%) 335 (-41%) 213 (-8%) 196 encode raw-unicode-escape '\U00010000'+'A'*9999 336 (-42%) 335 (-41%) 213 (-8%) 196 encode raw-unicode-escape '\U00010000'+'\x80'*9999 911 (-43%) 911 (-43%) 570 (-8%) 522 encode raw-unicode-escape '\U00010000'+'\u0100'*9999 911 (-43%) 913 (-43%) 570 (-8%) 522 encode raw-unicode-escape '\U00010000'+'\u8000'*9999 ---------- components: Interpreter Core, Unicode files: faster_unicode_escape.patch keywords: 3.3regression, patch messages: 173901 nosy: benjamin.peterson, ezio.melotti, haypo, lemburg, pitrou, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Faster unicode-escape and raw-unicode-escape codecs type: performance versions: Python 3.4 Added file: http://bugs.python.org/file27740/faster_unicode_escape.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16334> _______________________________________ From report at bugs.python.org Sat Oct 27 00:55:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2012 22:55:22 +0000 Subject: [issue16335] Integer overflow in unicode-escape decoder Message-ID: <1351292121.99.0.943463007307.issue16335@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Size of parsed Unicode character name casted to int in unicode-escape decoder. This can cause integer overflow. ---------- components: Interpreter Core, Unicode files: decode_unicode_escape_overflow.patch keywords: patch messages: 173902 nosy: benjamin.peterson, ezio.melotti, haypo, lemburg, mark.dickinson, pitrou, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Integer overflow in unicode-escape decoder type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27741/decode_unicode_escape_overflow.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16335> _______________________________________ From report at bugs.python.org Sat Oct 27 00:55:40 2012 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 26 Oct 2012 22:55:40 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351292140.09.0.31775431387.issue8040@psf.upfronthosting.co.za> Changes by Yury Selivanov <yselivanov.ml at gmail.com>: ---------- versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 00:58:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2012 22: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: <1351292289.67.0.828040792327.issue16333@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16333> _______________________________________ From report at bugs.python.org Sat Oct 27 01:22:27 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Oct 2012 23:22: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: <1351293747.82.0.742492371672.issue16333@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +ezio.melotti _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16333> _______________________________________ From report at bugs.python.org Sat Oct 27 01:28:29 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 26 Oct 2012 23:28:29 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351294109.05.0.563674123195.issue8040@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Both patches (for 2.7 & 3.2) are almost the same as the original patch. Conflicts were trivial. For future reference, it's okay (and perhaps preferable) to upload a patch just for the default branch when no substantive changes are needed for other branches. This is especially true early in the review process when multiple iterations may be uploaded. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 01:32:07 2012 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 26 Oct 2012 23:32:07 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351294327.76.0.66559772603.issue8040@psf.upfronthosting.co.za> Yury Selivanov added the comment: Found a bug: documentation pages have two toolbars - top and bottom, and as I hadn't noticed the latter, I used a placeholder with #id. This is now fixed. I'm attaching a new version of patch: 'py3_version_switch.3.patch'. I also have updated patches for 3.2 & 2.7, so if this iteration is OK, I'll upload them as well. ---------- Added file: http://bugs.python.org/file27742/py3_version_switch.3.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 01:33:39 2012 From: report at bugs.python.org (Berker Peksag) Date: Fri, 26 Oct 2012 23:33:39 +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: <1351294419.07.0.999507538792.issue6478@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the review. > 1. Does it work on Windows? It seems to rely on Olson's TZ names. Is `time.tzset()` function only available on Unix? See: http://docs.python.org/dev/library/time.html#time.tzset > 2. Please use @run_with_tz decorator. I will update my patch to use @run_with_tz decorator. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6478> _______________________________________ From report at bugs.python.org Sat Oct 27 01:54:09 2012 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 26 Oct 2012 23:54:09 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1351261925.18.0.387360020681.issue15494@psf.upfronthosting.co.za> Message-ID: <CADiSq7d2R0uuMM-nKy=K7p869UGHC1NRDL0pW__bx12GvPZLZQ@mail.gmail.com> Nick Coghlan added the comment: Whereas I actively want to avoid *deliberately* making test.support even more of an incoherent mess. I'm still utterly astonished you're actively promoting the idea. Please stop telling me to write awful code. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15494> _______________________________________ From report at bugs.python.org Sat Oct 27 02:27:42 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 27 Oct 2012 00:27:42 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <1351297662.83.0.932172514156.issue15494@psf.upfronthosting.co.za> Ezio Melotti added the comment: > Please stop telling me to write awful code. I'm not telling you to write awful code, I'm telling you that IME having to deal with a single file is easier, so that's what I would personally prefer. Clearly if other developers disagree and/or if there is too much unrelated code (for some definition of "much") in the same file, then the package can be still done. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15494> _______________________________________ From report at bugs.python.org Sat Oct 27 02:55:52 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 27 Oct 2012 00:55:52 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <1351299352.32.0.00529022357758.issue15494@psf.upfronthosting.co.za> R. David Murray added the comment: Let's not argue over generalities. Let's wait and argue over a specific patch proposal. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15494> _______________________________________ From report at bugs.python.org Sat Oct 27 04:16:27 2012 From: report at bugs.python.org (Mike Hoy) Date: Sat, 27 Oct 2012 02:16:27 +0000 Subject: [issue13510] Clarify that readlines() is not needed to iterate over a file In-Reply-To: <1322674949.97.0.856520026774.issue13510@psf.upfronthosting.co.za> Message-ID: <1351304187.26.0.880080902349.issue13510@psf.upfronthosting.co.za> Changes by Mike Hoy <mhoy09 at gmail.com>: ---------- nosy: +mikehoy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13510> _______________________________________ From report at bugs.python.org Sat Oct 27 04:21:53 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Oct 2012 02:21:53 +0000 Subject: [issue16274] test_asyncore failing on Solaris 10 2.7 (nitrogen/s10) In-Reply-To: <1350547611.85.0.565736375067.issue16274@psf.upfronthosting.co.za> Message-ID: <3XpQnD2HcYzR8y@mail.python.org> Roundup Robot added the comment: New changeset 937fa81500e2 by Trent Nelson in branch '2.7': Issue #16274: Fix test_asyncore on Solaris. http://hg.python.org/cpython/rev/937fa81500e2 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16274> _______________________________________ From report at bugs.python.org Sat Oct 27 04:23:55 2012 From: report at bugs.python.org (Trent Nelson) Date: Sat, 27 Oct 2012 02:23:55 +0000 Subject: [issue15746] test_winsound bombing out on 2003 buildslave In-Reply-To: <1345515472.32.0.153802141999.issue15746@psf.upfronthosting.co.za> Message-ID: <1351304635.84.0.993355969453.issue15746@psf.upfronthosting.co.za> Trent Nelson added the comment: We avoided this by adding -u-audio to the affected slave. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15746> _______________________________________ From report at bugs.python.org Sat Oct 27 04:24:38 2012 From: report at bugs.python.org (Trent Nelson) Date: Sat, 27 Oct 2012 02:24:38 +0000 Subject: [issue16274] test_asyncore failing on Solaris 10 2.7 (nitrogen/s10) In-Reply-To: <1350547611.85.0.565736375067.issue16274@psf.upfronthosting.co.za> Message-ID: <1351304678.02.0.682587643086.issue16274@psf.upfronthosting.co.za> Changes by Trent Nelson <trent at snakebite.org>: ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16274> _______________________________________ From report at bugs.python.org Sat Oct 27 05:46:16 2012 From: report at bugs.python.org (Martin Panter) Date: Sat, 27 Oct 2012 03:46:16 +0000 Subject: [issue3132] implement PEP 3118 struct changes In-Reply-To: <1213741832.59.0.0620778602246.issue3132@psf.upfronthosting.co.za> Message-ID: <1351309576.23.0.339545462051.issue3132@psf.upfronthosting.co.za> Changes by Martin Panter <vadmium+py at gmail.com>: ---------- nosy: +vadmium _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue3132> _______________________________________ From report at bugs.python.org Sat Oct 27 06:17:52 2012 From: report at bugs.python.org (Martin Panter) Date: Sat, 27 Oct 2012 04:17:52 +0000 Subject: [issue2909] struct.Struct.unpack to return a namedtuple for easier attribute access In-Reply-To: <1211141600.93.0.483393592548.issue2909@psf.upfronthosting.co.za> Message-ID: <1351311472.12.0.405663932429.issue2909@psf.upfronthosting.co.za> Changes by Martin Panter <vadmium+py at gmail.com>: ---------- nosy: +vadmium _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue2909> _______________________________________ From report at bugs.python.org Sat Oct 27 09:30:09 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 27 Oct 2012 07:30:09 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351323009.62.0.151372343819.issue8040@psf.upfronthosting.co.za> Georg Brandl added the comment: > For future reference, it's okay (and perhaps preferable) to upload a > patch just for the default branch when no substantive changes are > needed for other branches. This is especially true early in the > review process when multiple iterations may be uploaded. Definitely preferable. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 09:55:46 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 27 Oct 2012 07:55:46 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351324546.89.0.526692939944.issue8040@psf.upfronthosting.co.za> Georg Brandl added the comment: Attaching a simplified version of the patch. ---------- Added file: http://bugs.python.org/file27743/versionswitcher.4.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 11:28:17 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Sat, 27 Oct 2012 09:28:17 +0000 Subject: [issue16307] multiprocess.pool.map_async callables not working In-Reply-To: <1351062852.0.0.92760767978.issue16307@psf.upfronthosting.co.za> Message-ID: <1351330097.09.0.330694181328.issue16307@psf.upfronthosting.co.za> Hynek Schlawack added the comment: LGTM. Presuming you want to submit more patches in future, please take the time to sign a Python contributor agreement: http://www.python.org/psf/contrib/ . You'll get a pretty star next to your name in the bug tracker in return. ;) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16307> _______________________________________ From report at bugs.python.org Sat Oct 27 11:51:21 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Oct 2012 09:51:21 +0000 Subject: [issue16250] URLError invoked with reason as filename In-Reply-To: <1350404293.01.0.800497532294.issue16250@psf.upfronthosting.co.za> Message-ID: <3Xpcls1sHTzRB9@mail.python.org> Roundup Robot added the comment: New changeset 5e71f2712076 by Senthil Kumaran in branch '3.2': Issue #16250: Fix URLError invocation with proper args. http://hg.python.org/cpython/rev/5e71f2712076 New changeset 30547e2cd04d by Senthil Kumaran in branch '3.3': Issue #16250: Fix URLError invocation with proper args http://hg.python.org/cpython/rev/30547e2cd04d ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16250> _______________________________________ From report at bugs.python.org Sat Oct 27 12:06:10 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Oct 2012 10:06:10 +0000 Subject: [issue16336] Check input in surrogatepass error handler Message-ID: <1351332370.82.0.307074271772.issue16336@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch fixes input checking in surrogatepass error handler. Also it fixes 10% speed regression introduced by changeset 74d65c746f63. ---------- components: Interpreter Core, Unicode files: codecs_surrogatepass_2.patch keywords: patch messages: 173915 nosy: ezio.melotti, pjenvey, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Check input in surrogatepass error handler type: behavior versions: Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27744/codecs_surrogatepass_2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16336> _______________________________________ From report at bugs.python.org Sat Oct 27 12:48:57 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Oct 2012 10:48:57 +0000 Subject: [issue16250] URLError invoked with reason as filename In-Reply-To: <1350404293.01.0.800497532294.issue16250@psf.upfronthosting.co.za> Message-ID: <3Xpf2K0h3mzRBV@mail.python.org> Roundup Robot added the comment: New changeset 3fb84c1da8c5 by Senthil Kumaran in branch '2.7': Add some tests in 2.7 for Issue #16250 http://hg.python.org/cpython/rev/3fb84c1da8c5 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16250> _______________________________________ From report at bugs.python.org Sat Oct 27 12:50:08 2012 From: report at bugs.python.org (Piotr Dobrogost) Date: Sat, 27 Oct 2012 10:50:08 +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: <1351335008.33.0.690961257922.issue16312@psf.upfronthosting.co.za> Piotr Dobrogost added the comment: @Chris The example given by Holger Krekel (http://stackoverflow.com/a/13094042/95735) showing how it can be done with pytest is exactly the thing I had in mind. It would be good to have this feature incorporated into unittest. @Michael I guess checking this flag must be protected by a lock in case test cases are run in parallel. If so wouldn't this be kind of a bottleneck? Is this flag necessary? Can't we just assume that initialization code had already run when any testcase runs? There's interesting question how would initialization code be run in case of auto discovery. In the simplest form it would be run just once before all modules with tests are run. But it would be interesting to allow running initialization per test module. To support this unittest should somehow pass name of test module to be executed to initialization code. Alternatively there could be some special named init files which would be run before running test modules. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16312> _______________________________________ From report at bugs.python.org Sat Oct 27 12:51:11 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 27 Oct 2012 10:51:11 +0000 Subject: [issue16301] localhost() and thishost() in urllib/request.py In-Reply-To: <1350919745.8.0.0839924289599.issue16301@psf.upfronthosting.co.za> Message-ID: <1351335071.18.0.553179520808.issue16301@psf.upfronthosting.co.za> Senthil Kumaran added the comment: This is fixed in 3.3 and 3.2 3.2 5e71f2712076 3.3 30547e2cd04d ---------- resolution: -> fixed status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16301> _______________________________________ From report at bugs.python.org Sat Oct 27 12:52:27 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 27 Oct 2012 10:52:27 +0000 Subject: [issue16250] URLError invoked with reason as filename In-Reply-To: <1350404293.01.0.800497532294.issue16250@psf.upfronthosting.co.za> Message-ID: <1351335147.73.0.484074306531.issue16250@psf.upfronthosting.co.za> Senthil Kumaran added the comment: This is fixed in all versions now. ---------- assignee: -> orsenthil resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16250> _______________________________________ From report at bugs.python.org Sat Oct 27 12:54:13 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 27 Oct 2012 10:54:13 +0000 Subject: [issue16300] Windows raises ValueError for file:///file/not/exists instead of URLError In-Reply-To: <1350915106.57.0.374555323258.issue16300@psf.upfronthosting.co.za> Message-ID: <1351335253.7.0.0951574125881.issue16300@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Buildbot issues are taken care. They are green for while. Tests have been backported 3.3 and 3.2 as well. 3.2 5e71f2712076 3.3 30547e2cd04d ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16300> _______________________________________ From report at bugs.python.org Sat Oct 27 12:55:40 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 27 Oct 2012 10:55:40 +0000 Subject: [issue10836] urllib.request.urlretrieve calls URLError with 3 args In-Reply-To: <1294252036.56.0.144119584231.issue10836@psf.upfronthosting.co.za> Message-ID: <1351335340.77.0.325173461001.issue10836@psf.upfronthosting.co.za> Senthil Kumaran added the comment: This has been backported. 3.2 5e71f2712076 3.3 30547e2cd04d ---------- assignee: -> orsenthil resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10836> _______________________________________ From report at bugs.python.org Sat Oct 27 12:58:12 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Oct 2012 10:58:12 +0000 Subject: [issue16307] multiprocess.pool.map_async callables not working In-Reply-To: <1351062852.0.0.92760767978.issue16307@psf.upfronthosting.co.za> Message-ID: <3XpfDz5pBszMXy@mail.python.org> Roundup Robot added the comment: New changeset 1bccec4ff980 by Hynek Schlawack in branch '3.3': #16307: Fix multiprocessing.Pool.map_async not calling its callbacks http://hg.python.org/cpython/rev/1bccec4ff980 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16307> _______________________________________ From report at bugs.python.org Sat Oct 27 13:00:09 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Sat, 27 Oct 2012 11:00:09 +0000 Subject: [issue16307] multiprocess.pool.map_async callables not working In-Reply-To: <1351062852.0.0.92760767978.issue16307@psf.upfronthosting.co.za> Message-ID: <1351335609.48.0.18684730756.issue16307@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Applied. Thank you for your contribution! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16307> _______________________________________ From report at bugs.python.org Sat Oct 27 14:15:47 2012 From: report at bugs.python.org (Winfried Plappert) Date: Sat, 27 Oct 2012 12:15:47 +0000 Subject: [issue16337] typo in documentation regarding "Bytearray Objects", chapter 4.8.2 Message-ID: <1351340147.76.0.113530855942.issue16337@psf.upfronthosting.co.za> New submission from Winfried Plappert: In the online documentation at http://docs.python.org/py3k/library/stdtypes.html?highlight=bytearray%20objects%20copying%20existing%20binary%20data%20via%20buffer%20protocol and the PDF version 3.3.0, page 46, both in chapter 4.8.2: Bullet 4 is "bytearray(b'Hi!)" but should be "bytearray(b'Hi!')" ---------- assignee: docs at python components: Documentation messages: 173924 nosy: docs at python, wplappert priority: normal severity: normal status: open title: typo in documentation regarding "Bytearray Objects", chapter 4.8.2 type: enhancement versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16337> _______________________________________ From report at bugs.python.org Sat Oct 27 14:27:53 2012 From: report at bugs.python.org (Michael Foord) Date: Sat, 27 Oct 2012 12:27:53 +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: <1351340872.99.0.205116807205.issue16312@psf.upfronthosting.co.za> Michael Foord added the comment: @piotr Yes, protecting the set up with a lock would be easy, although unittest doesn't directly support running tests in parallel anyway. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16312> _______________________________________ From report at bugs.python.org Sat Oct 27 17:35:08 2012 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 27 Oct 2012 15:35:08 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351352108.23.0.410668969136.issue8040@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Attaching a simplified version of the patch. I'm OK, but you actually reduced the functionality with saving those 500 bytes. In 'py3_version_switch.3.patch', JS sets the current selected option text to show the the *full* release number. I.e. if you are on the 3.3 doc site, 3.3.0 will be selected and shown in the dropdown (and 3.4.0a1 for /dev/ etc) I think that was a useful thing. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 17:48:33 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 27 Oct 2012 15:48:33 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351352913.02.0.0050850331355.issue8040@psf.upfronthosting.co.za> Georg Brandl added the comment: My bad, you're right. Next try attached. ---------- Added file: http://bugs.python.org/file27745/versionswitcher.5.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 17:51:42 2012 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 27 Oct 2012 15:51:42 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351353102.45.0.697385194088.issue8040@psf.upfronthosting.co.za> Yury Selivanov added the comment: Georg, Are you sure you've attached the right one? I don't see a change in the version_switch.js... ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 17:53:49 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 27 Oct 2012 15:53:49 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351353229.34.0.455727821606.issue8040@psf.upfronthosting.co.za> Changes by Georg Brandl <georg at python.org>: Removed file: http://bugs.python.org/file27745/versionswitcher.5.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 17:54:01 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 27 Oct 2012 15:54:01 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351353241.09.0.104024654423.issue8040@psf.upfronthosting.co.za> Georg Brandl added the comment: Now it should be the right one. ---------- Added file: http://bugs.python.org/file27746/versionswitcher.5.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 17:55:11 2012 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 27 Oct 2012 15:55:11 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351353311.95.0.0290584181979.issue8040@psf.upfronthosting.co.za> Yury Selivanov added the comment: Looks good, let's commit it? ;) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 18:09:05 2012 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 27 Oct 2012 16:09:05 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351354145.19.0.601194563477.issue8040@psf.upfronthosting.co.za> Yury Selivanov added the comment: Maybe it's a good idea to modify `url_re` from /\.org\/(py3k|dev|((release\/)?\d\.\d[\w\d\.]*))\// to /\.org\/(\d|py3k|dev|((release\/)?\d\.\d[\w\d\.]*))\// To be prepared for PEP 430. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 18:18:46 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Oct 2012 16:18:46 +0000 Subject: [issue16107] distutils2.version doesn't str() "1.0.post1" correctly In-Reply-To: <1349137981.25.0.324290338592.issue16107@psf.upfronthosting.co.za> Message-ID: <3XpnLs5jBvzN6x@mail.python.org> Roundup Robot added the comment: New changeset 6e98237abde9 by ?ric Araujo in branch 'default': Fix stringification of final versions (#16107). http://hg.python.org/distutils2/rev/6e98237abde9 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16107> _______________________________________ From report at bugs.python.org Sat Oct 27 18:20:52 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 27 Oct 2012 16:20:52 +0000 Subject: [issue16107] distutils2.version doesn't str() "1.0.post1" correctly In-Reply-To: <1349137981.25.0.324290338592.issue16107@psf.upfronthosting.co.za> Message-ID: <1351354852.49.0.826326292789.issue16107@psf.upfronthosting.co.za> ?ric Araujo added the comment: Fixed. Vinay, you probably want to apply this to your forked version module too. ---------- nosy: +vinay.sajip resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16107> _______________________________________ From report at bugs.python.org Sat Oct 27 18:26:46 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 27 Oct 2012 16:26:46 +0000 Subject: [issue16108] Include maintainer information in register/upload In-Reply-To: <1349154240.01.0.151032575778.issue16108@psf.upfronthosting.co.za> Message-ID: <1351355206.28.0.489963245127.issue16108@psf.upfronthosting.co.za> ?ric Araujo added the comment: Would that result in displaying both author and maintainer info on the PyPI page? For what cases is it useful? Questions about author/maintainer come up from time to time. The way I understand it, the goal of these fields is to give contact information to the users; if only author is specified, distutils sends that info to PyPI, but if maintainer is given, distutils uses that and ignores author. That way, credit can be preserved with the author field, and the current contact is given by maintainer. If this thinking is correct (PEPs aren?t explicit about that), then only one of maintaine and author should be sent. What do you think? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16108> _______________________________________ From report at bugs.python.org Sat Oct 27 18:27:31 2012 From: report at bugs.python.org (Berker Peksag) Date: Sat, 27 Oct 2012 16:27:31 +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: <1351355251.09.0.463741115265.issue16163@psf.upfronthosting.co.za> Berker Peksag added the comment: I've attached a new patch. ---------- Added file: http://bugs.python.org/file27747/pkgutil-name-with-test_v2.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16163> _______________________________________ From report at bugs.python.org Sat Oct 27 18:28:00 2012 From: report at bugs.python.org (Berker Peksag) Date: Sat, 27 Oct 2012 16:28:00 +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: <1351355280.91.0.592546729307.issue16163@psf.upfronthosting.co.za> Changes by Berker Peksag <berker.peksag at gmail.com>: Removed file: http://bugs.python.org/file27487/pkgutil-name.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16163> _______________________________________ From report at bugs.python.org Sat Oct 27 18:34:31 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 27 Oct 2012 16:34:31 +0000 Subject: [issue8996] Add a default role to allow writing bare `len` instead of :func:`len` In-Reply-To: <1276528152.92.0.60611534239.issue8996@psf.upfronthosting.co.za> Message-ID: <1351355671.07.0.847771680715.issue8996@psf.upfronthosting.co.za> ?ric Araujo added the comment: Unless Georg would still like this, I retract the proposal. Ezio: > Disabling `...` sounds OK to me (I don't think we have many left, if any). I think some of them crept up in logging and unittest docs, but they are easy to find with Doc/tools/rst-lint.py ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8996> _______________________________________ From report at bugs.python.org Sat Oct 27 18:37:16 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Oct 2012 16:37:16 +0000 Subject: [issue15957] README.txt points to broken "contributing" url in python wiki In-Reply-To: <1347901195.54.0.476141478032.issue15957@psf.upfronthosting.co.za> Message-ID: <3XpnmC5YpSzR7q@mail.python.org> Roundup Robot added the comment: New changeset 421e74040326 by ?ric Araujo in branch 'default': Fix link in README (#15957). Patch by Cliff Dyer. http://hg.python.org/distutils2/rev/421e74040326 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15957> _______________________________________ From report at bugs.python.org Sat Oct 27 18:37:59 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 27 Oct 2012 16:37:59 +0000 Subject: [issue15957] README.txt points to broken "contributing" url in python wiki In-Reply-To: <1347901195.54.0.476141478032.issue15957@psf.upfronthosting.co.za> Message-ID: <1351355879.94.0.828762730659.issue15957@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15957> _______________________________________ From report at bugs.python.org Sat Oct 27 18:42:48 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 27 Oct 2012 16:42:48 +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: <1351356168.74.0.645924259576.issue15043@psf.upfronthosting.co.za> R. David Murray added the comment: It does seem to be possible to do this at command invocation. Patch attached. ---------- keywords: +patch nosy: +r.david.murray status: closed -> open Added file: http://bugs.python.org/file27748/test_gdb_security.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15043> _______________________________________ From report at bugs.python.org Sat Oct 27 18:45:00 2012 From: report at bugs.python.org (Trenton Craig) Date: Sat, 27 Oct 2012 16:45:00 +0000 Subject: [issue16338] pysnmp/asyncore - timeout ineffective? Message-ID: <1351356300.75.0.420247508313.issue16338@psf.upfronthosting.co.za> New submission from Trenton Craig: I have an application that is set to use pysnmp to obtain sysDescription and system names from devices on our network. Currently, we are using python 2.6.2, due to the limitations of the box (solaris), and it works fine. However, our new environment uses python2.7.3, and ubuntu, and the timeout attribute appears to be failing. Not sure if this is a bug with pysnmp or asyncore. I apologize for the brevity of the situation, but will be happy to provide more details upon request. ---------- components: None messages: 173940 nosy: Trenton.Craig priority: normal severity: normal status: open title: pysnmp/asyncore - timeout ineffective? type: behavior versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16338> _______________________________________ From report at bugs.python.org Sat Oct 27 18:45:05 2012 From: report at bugs.python.org (Berker Peksag) Date: Sat, 27 Oct 2012 16:45:05 +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: <1351356305.22.0.949846213011.issue6478@psf.upfronthosting.co.za> Berker Peksag added the comment: > 2. Please use @run_with_tz decorator. Done. Patch attached. ---------- Added file: http://bugs.python.org/file27749/issue6478_v2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6478> _______________________________________ From report at bugs.python.org Sat Oct 27 18:59:14 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 27 Oct 2012 16:59:14 +0000 Subject: [issue3636] Managing dual 2.x and 3.0 installations on Windows In-Reply-To: <1219350265.84.0.067322027975.issue3636@psf.upfronthosting.co.za> Message-ID: <1351357154.52.0.949335642276.issue3636@psf.upfronthosting.co.za> ?ric Araujo added the comment: Now fixed thanks to PEP 397. http://docs.python.org/py3k/whatsnew/3.3.html#pep-397-python-launcher-for-windows ---------- nosy: +eric.araujo resolution: -> out of date stage: needs patch -> committed/rejected status: open -> closed versions: +Python 3.3 -Python 3.2 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue3636> _______________________________________ From report at bugs.python.org Sat Oct 27 19:02:01 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 27 Oct 2012 17:02:01 +0000 Subject: [issue1492704] distinct error type if shutil.copyfile() fails because of src and dst are the same file Message-ID: <1351357321.39.0.0148966643122.issue1492704@psf.upfronthosting.co.za> ?ric Araujo added the comment: I think it should be documented and tested that this change is backward-compatible, as the new error class inherits from the one previously used. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1492704> _______________________________________ From report at bugs.python.org Sat Oct 27 19:15:22 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 27 Oct 2012 17:15:22 +0000 Subject: [issue15961] Missing return value in ``system_message`` In-Reply-To: <1347968090.6.0.249587654203.issue15961@psf.upfronthosting.co.za> Message-ID: <1351358122.7.0.677775156475.issue15961@psf.upfronthosting.co.za> ?ric Araujo added the comment: Found it! I will backport the fix to distutils now. ---------- resolution: -> duplicate stage: test needed -> committed/rejected status: open -> closed superseder: -> setup.py register fails if long_description contains ReST _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15961> _______________________________________ From report at bugs.python.org Sat Oct 27 19:15:58 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 27 Oct 2012 17:15:58 +0000 Subject: [issue13614] setup.py register fails if long_description contains ReST In-Reply-To: <1324069250.69.0.136486094973.issue13614@psf.upfronthosting.co.za> Message-ID: <1351358158.35.0.287649742078.issue13614@psf.upfronthosting.co.za> Changes by ?ric Araujo <merwok at netwok.org>: ---------- nosy: +malthe _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13614> _______________________________________ From report at bugs.python.org Sat Oct 27 19:20:44 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Oct 2012 17:20:44 +0000 Subject: [issue16107] distutils2.version doesn't str() "1.0.post1" correctly In-Reply-To: <1349137981.25.0.324290338592.issue16107@psf.upfronthosting.co.za> Message-ID: <3XppkN1TDhzN6x@mail.python.org> Roundup Robot added the comment: New changeset d328dcd07449 by ?ric Araujo in branch 'python3': Merge fixes for #16107 and #15957 from default http://hg.python.org/distutils2/rev/d328dcd07449 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16107> _______________________________________ From report at bugs.python.org Sat Oct 27 19:20:45 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Oct 2012 17:20:45 +0000 Subject: [issue15957] README.txt points to broken "contributing" url in python wiki In-Reply-To: <1347901195.54.0.476141478032.issue15957@psf.upfronthosting.co.za> Message-ID: <3XppkN73CyzN6x@mail.python.org> Roundup Robot added the comment: New changeset d328dcd07449 by ?ric Araujo in branch 'python3': Merge fixes for #16107 and #15957 from default http://hg.python.org/distutils2/rev/d328dcd07449 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15957> _______________________________________ From report at bugs.python.org Sat Oct 27 19:31:07 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 27 Oct 2012 17:31:07 +0000 Subject: [issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2? Message-ID: <1351359067.41.0.359232821509.issue16339@psf.upfronthosting.co.za> New submission from Mark Dickinson: In Python 2, the 'exec' statement supports 'exec'-ing a (statement, globals, locals) tuple: >>> exec("print 2", {}, {}) 2 This doesn't seem to be documented at http://docs.python.org/reference/simple_stmts.html#the-exec-statement. If I understand correctly, the 'exec tuple' form was originally there for backwards compatibility with ancient versions of Python; however, it now also conveniently provides the semblance of forwards compatibility with Python 3. It appears to be supported by current versions of Jython (though judging by issue 403345 that wasn't always the case) and PyPy. Is this omission intentional? Is this form of exec an official, supported part of the Python 2 language? ---------- assignee: docs at python components: Documentation messages: 173947 nosy: docs at python, mark.dickinson priority: normal severity: normal stage: needs patch status: open title: Document "exec(stmt, global_dict, local_dict)" form in Python 2? versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16339> _______________________________________ From report at bugs.python.org Sat Oct 27 19:32:52 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 27 Oct 2012 17:32:52 +0000 Subject: [issue8996] Add a default role to allow writing bare `len` instead of :func:`len` In-Reply-To: <1276528152.92.0.60611534239.issue8996@psf.upfronthosting.co.za> Message-ID: <1351359172.42.0.560973738796.issue8996@psf.upfronthosting.co.za> Georg Brandl added the comment: I'm not very attached to it, so I'm fine with closing. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8996> _______________________________________ From report at bugs.python.org Sat Oct 27 19:37:58 2012 From: report at bugs.python.org (Berker Peksag) Date: Sat, 27 Oct 2012 17:37:58 +0000 Subject: [issue16323] Wrong C API documentation for locale encoding In-Reply-To: <1351173455.0.0.737976146006.issue16323@psf.upfronthosting.co.za> Message-ID: <1351359478.98.0.293105915939.issue16323@psf.upfronthosting.co.za> Berker Peksag added the comment: Also, the documentation for PyUnicode_DecodeLocaleAndSize() is wrong. Patch attached. Related changeset: http://hg.python.org/cpython/rev/07802351ccad ---------- keywords: +patch nosy: +berker.peksag Added file: http://bugs.python.org/file27750/issue16323.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16323> _______________________________________ From report at bugs.python.org Sat Oct 27 19:38:08 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Oct 2012 17:38:08 +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: <3Xpq6R5BybzPbC@mail.python.org> Roundup Robot added the comment: New changeset b71cda2f48c6 by R David Murray in branch '3.2': #15043: Improve test_gdb support of gdb >= 7.4. http://hg.python.org/cpython/rev/b71cda2f48c6 New changeset 6f064689b8c0 by R David Murray in branch '3.3': merge #15043: Improve test_gdb support of gdb >= 7.4. http://hg.python.org/cpython/rev/6f064689b8c0 New changeset b9141239a5b4 by R David Murray in branch 'default': merge #15043: Improve test_gdb support of gdb >= 7.4. http://hg.python.org/cpython/rev/b9141239a5b4 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15043> _______________________________________ From report at bugs.python.org Sat Oct 27 19:48:07 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Oct 2012 17:48:07 +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: <3XpqKz0XPWzPV6@mail.python.org> Roundup Robot added the comment: New changeset 1b1ead5cecae by R David Murray in branch '2.7': #15043: Improve test_gdb support of gdb >= 7.4. http://hg.python.org/cpython/rev/1b1ead5cecae ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15043> _______________________________________ From report at bugs.python.org Sat Oct 27 19:56:24 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 27 Oct 2012 17:56:24 +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: <1351360584.4.0.281360706336.issue15043@psf.upfronthosting.co.za> R. David Murray added the comment: Committed. Also deleted the paragraph from the devguide faq, since it is no longer needed. ---------- status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15043> _______________________________________ From report at bugs.python.org Sat Oct 27 20:04:11 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 27 Oct 2012 18:04:11 +0000 Subject: [issue16326] distutils build_ext fails to set library_dirs in 2.7.2 on Linux In-Reply-To: <1351194264.28.0.869819451271.issue16326@psf.upfronthosting.co.za> Message-ID: <1351361051.51.0.296988583739.issue16326@psf.upfronthosting.co.za> ?ric Araujo added the comment: Would you like to work on a patch? ---------- stage: -> test needed versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16326> _______________________________________ From report at bugs.python.org Sat Oct 27 20:08:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Oct 2012 18:08:13 +0000 Subject: [issue16323] Wrong C API documentation for locale encoding In-Reply-To: <1351173455.0.0.737976146006.issue16323@psf.upfronthosting.co.za> Message-ID: <1351361293.89.0.368684549877.issue16323@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Victor, you forgot to update the documentation. ---------- nosy: +haypo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16323> _______________________________________ From report at bugs.python.org Sat Oct 27 20:18:27 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 27 Oct 2012 18:18:27 +0000 Subject: [issue8996] Add a default role to allow writing bare `len` instead of :func:`len` In-Reply-To: <1276528152.92.0.60611534239.issue8996@psf.upfronthosting.co.za> Message-ID: <1351361907.69.0.0709831401018.issue8996@psf.upfronthosting.co.za> Changes by ?ric Araujo <merwok at netwok.org>: ---------- resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8996> _______________________________________ From report at bugs.python.org Sat Oct 27 20:42:48 2012 From: report at bugs.python.org (Konstantin Zemlyak) Date: Sat, 27 Oct 2012 18:42:48 +0000 Subject: [issue16340] Error: 'utf-8' codec can't decode byte 0x9e in position 0: invalid start byte Message-ID: <1351363368.32.0.193110558396.issue16340@psf.upfronthosting.co.za> New submission from Konstantin Zemlyak: When installing python 3.3 under windows and checking "Compile .py files to byte code after installation" Lib/venv/scripts/nt/pydoc.py gets precompiled as well. This causes venv module to abort with "Error: 'utf-8' codec can't decode byte 0x9e in position 0: invalid start byte" while copying scripts from Lib/venv/scripts/nt since only .exe files are copied verbatim, and rest are treated as utf-8 text: http://hg.python.org/cpython/file/b20e473157b8/Lib/venv/__init__.py#l314 The solution is to add another exception to compileargs at Tools/msi/msi.py: http://hg.python.org/cpython/file/b20e473157b8/Tools/msi/msi.py#l419 This issue doesn't affect non-windows systems, since Lib/venv/scripts/posix doesn't contain .py files. ---------- components: Installation messages: 173955 nosy: zart priority: normal severity: normal status: open title: Error: 'utf-8' codec can't decode byte 0x9e in position 0: invalid start byte type: behavior versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16340> _______________________________________ From report at bugs.python.org Sat Oct 27 20:50:13 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 27 Oct 2012 18:50:13 +0000 Subject: [issue16340] Decoding error in venv when byte-compiling stdlib In-Reply-To: <1351363368.32.0.193110558396.issue16340@psf.upfronthosting.co.za> Message-ID: <1351363813.41.0.60999522863.issue16340@psf.upfronthosting.co.za> ?ric Araujo added the comment: Which file exactly causes the error? If it?s pydoc.py, it?s strange because the source is ASCII. Are you installing in a path with non-ASCII characters? ---------- nosy: +eric.araujo, vinay.sajip title: Error: 'utf-8' codec can't decode byte 0x9e in position 0: invalid start byte -> Decoding error in venv when byte-compiling stdlib versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16340> _______________________________________ From report at bugs.python.org Sat Oct 27 20:56:10 2012 From: report at bugs.python.org (Konstantin Zemlyak) Date: Sat, 27 Oct 2012 18:56:10 +0000 Subject: [issue16340] Decoding error in venv when byte-compiling stdlib In-Reply-To: <1351363368.32.0.193110558396.issue16340@psf.upfronthosting.co.za> Message-ID: <1351364170.14.0.428035447127.issue16340@psf.upfronthosting.co.za> Konstantin Zemlyak added the comment: If option to precompile python files is checked in installer, pydoc.py gets compiled into binary files Lib\venv\scripts\nt\__pycache__\pydoc.cpython33.pyc and Lib\venv\scripts\nt\__pycache__\pydoc.cpython33.pyo. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16340> _______________________________________ From report at bugs.python.org Sat Oct 27 20:57:37 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Oct 2012 18:57:37 +0000 Subject: [issue12890] cgitb displays <p> tags when executed in text mode In-Reply-To: <1315016521.13.0.175763253408.issue12890@psf.upfronthosting.co.za> Message-ID: <3Xprt91cFFzPQZ@mail.python.org> Roundup Robot added the comment: New changeset 715e5b337c91 by R David Murray in branch '2.7': #12890: don't emit <p> tags in text mode when logdir specified. http://hg.python.org/cpython/rev/715e5b337c91 New changeset abbfb89055d3 by R David Murray in branch '3.2': #12890: don't emit <p> tags in text mode when logdir specified. http://hg.python.org/cpython/rev/abbfb89055d3 New changeset 45764e4bb504 by R David Murray in branch '3.3': merge #12890: don't emit <p> tags in text mode when logdir specified. http://hg.python.org/cpython/rev/45764e4bb504 New changeset b21c28258d3c by R David Murray in branch 'default': merge #12890: don't emit <p> tags in text mode when logdir specified. http://hg.python.org/cpython/rev/b21c28258d3c ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12890> _______________________________________ From report at bugs.python.org Sat Oct 27 20:59:26 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 27 Oct 2012 18:59:26 +0000 Subject: [issue12890] cgitb displays <p> tags when executed in text mode In-Reply-To: <1315016521.13.0.175763253408.issue12890@psf.upfronthosting.co.za> Message-ID: <1351364366.84.0.343761574075.issue12890@psf.upfronthosting.co.za> R. David Murray added the comment: Committed with Ezio's <\p> and with simplification of the tests by using script_helper. Thanks, Jeff! ---------- nosy: +r.david.murray resolution: -> fixed status: open -> closed versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12890> _______________________________________ From report at bugs.python.org Sat Oct 27 21:01:06 2012 From: report at bugs.python.org (Konstantin Zemlyak) Date: Sat, 27 Oct 2012 19:01:06 +0000 Subject: [issue16340] Decoding error in venv when byte-compiling stdlib In-Reply-To: <1351363368.32.0.193110558396.issue16340@psf.upfronthosting.co.za> Message-ID: <1351364466.61.0.609885113445.issue16340@psf.upfronthosting.co.za> Konstantin Zemlyak added the comment: Also current title is a bit wrong, since decoding error happens in runtime each time venv is invoked, while the source of the problem happens while byte-compiling stdlib at install time once. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16340> _______________________________________ From report at bugs.python.org Sat Oct 27 21:06:49 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 27 Oct 2012 19:06:49 +0000 Subject: [issue16340] Decoding error at install time when byte-compiling venv scripts In-Reply-To: <1351363368.32.0.193110558396.issue16340@psf.upfronthosting.co.za> Message-ID: <1351364809.73.0.472785224764.issue16340@psf.upfronthosting.co.za> ?ric Araujo added the comment: Are you installing in a path with non-ASCII characters? ---------- title: Decoding error in venv when byte-compiling stdlib -> Decoding error at install time when byte-compiling venv scripts _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16340> _______________________________________ From report at bugs.python.org Sat Oct 27 21:06:53 2012 From: report at bugs.python.org (STINNER Victor) Date: Sat, 27 Oct 2012 19:06:53 +0000 Subject: [issue16323] Wrong C API documentation for locale encoding In-Reply-To: <1351173455.0.0.737976146006.issue16323@psf.upfronthosting.co.za> Message-ID: <1351364813.66.0.347961292819.issue16323@psf.upfronthosting.co.za> STINNER Victor added the comment: "Encode a Unicode object to the current locale encoding. The encoder is strict if *errors* is equal to ``strict``, otherwise it uses the ``'surrogateescape'`` error handler (:pep:`383`)." Hum, this is not correct. There are three valid values: - NULL: strict - "strict": strict - "surrogateescape": use PEP 383 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16323> _______________________________________ From report at bugs.python.org Sat Oct 27 21:09:34 2012 From: report at bugs.python.org (Konstantin Zemlyak) Date: Sat, 27 Oct 2012 19:09:34 +0000 Subject: [issue16340] Decoding error at install time when byte-compiling venv scripts In-Reply-To: <1351363368.32.0.193110558396.issue16340@psf.upfronthosting.co.za> Message-ID: <1351364974.57.0.712409262434.issue16340@psf.upfronthosting.co.za> Konstantin Zemlyak added the comment: Not at all. I have installed Python into "C:\Program Files (x86)\Python33". Also made a copy into "D:\Python33" and got the same results. The problem is in file contents (pyc/pyo files are binary, utf-8 fails to decode them), not in filenames. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16340> _______________________________________ From report at bugs.python.org Sat Oct 27 21:12:16 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Oct 2012 19:12:16 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <3XpsC40hntzPGh@mail.python.org> Roundup Robot added the comment: New changeset 006f9ade82f2 by Ezio Melotti in branch '2.7': #8040: add a version switcher to the documentation. Patch by Yury Selivanov. http://hg.python.org/cpython/rev/006f9ade82f2 New changeset 35a2a0e166d0 by Ezio Melotti in branch '3.2': #8040: add a version switcher to the documentation. Patch by Yury Selivanov. http://hg.python.org/cpython/rev/35a2a0e166d0 New changeset 9505a34b4484 by Ezio Melotti in branch '3.3': #8040: merge with 3.2. http://hg.python.org/cpython/rev/9505a34b4484 New changeset 9552d8b90683 by Ezio Melotti in branch 'default': #8040: merge with 3.3. http://hg.python.org/cpython/rev/9552d8b90683 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 21:30:23 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Oct 2012 19:30:23 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <3Xpsby2w9rzMsd@mail.python.org> Roundup Robot added the comment: New changeset c3adbe20bb4b by Ezio Melotti in branch '2.7': #8040: enable the versionswitcher for the autobuild-dev target. http://hg.python.org/cpython/rev/c3adbe20bb4b New changeset 740be7346c92 by Ezio Melotti in branch '3.2': #8040: enable the versionswitcher for the autobuild-dev target. http://hg.python.org/cpython/rev/740be7346c92 New changeset 5c30f8fdd896 by Ezio Melotti in branch '3.3': #8040: merge with 3.2. http://hg.python.org/cpython/rev/5c30f8fdd896 New changeset 75bff8c947d0 by Ezio Melotti in branch 'default': #8040: merge with 3.3. http://hg.python.org/cpython/rev/75bff8c947d0 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 22:10:28 2012 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 27 Oct 2012 20:10:28 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351368628.4.0.637267992322.issue8040@psf.upfronthosting.co.za> Yury Selivanov added the comment: Ezio, Georg's modification introduced one more bug: 1. Documentation for py2 seems to be missing DOCUMENTATION_OPTIONS.RELEASE 2. DOCUMENTATION_OPTIONS.VERSION is in a wrong format for the rest of the script, i.e. 3.3.0 and not 3.3. Before, in my version there was a code that worked around this. Please apply attached patch that fixes all that. ---------- Added file: http://bugs.python.org/file27751/switcher_js.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 22:13:48 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Oct 2012 20:13:48 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <3XptZ33ykgzPdK@mail.python.org> Roundup Robot added the comment: New changeset 7ca30af90c11 by Ezio Melotti in branch '2.7': #8040: fix the version. http://hg.python.org/cpython/rev/7ca30af90c11 New changeset 36a35b86e3b0 by Ezio Melotti in branch '3.2': #8040: fix the version. http://hg.python.org/cpython/rev/36a35b86e3b0 New changeset 7cabdb58fb23 by Ezio Melotti in branch '3.3': #8040: merge with 3.2. http://hg.python.org/cpython/rev/7cabdb58fb23 New changeset 9a97b6d2e24a by Ezio Melotti in branch 'default': #8040: merge with 3.3. http://hg.python.org/cpython/rev/9a97b6d2e24a ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 22:15:32 2012 From: report at bugs.python.org (Philip Zerull) Date: Sat, 27 Oct 2012 20:15:32 +0000 Subject: [issue1294] Management of KeyboardInterrupt in cmd.py In-Reply-To: <1192711916.5.0.235687394478.issue1294@psf.upfronthosting.co.za> Message-ID: <1351368932.48.0.111682520954.issue1294@psf.upfronthosting.co.za> Philip Zerull added the comment: Hello, Being of a similar mindset to draghuram on the do_KeyboardInterrupt idea and thought I'd implement it as a subclass. While this probably wasn't fully implemented correctly, I think it provides an interesting solution to stephbul's frustrations and won't break anything. I'm not suggesting that this be included in the standard library but just thought you all might find it interesting. ---------- nosy: +Philip.Zerull Added file: http://bugs.python.org/file27752/keyboardcmd.py _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1294> _______________________________________ From report at bugs.python.org Sat Oct 27 22:15:57 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 27 Oct 2012 20:15:57 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351368957.23.0.883396806792.issue8040@psf.upfronthosting.co.za> Georg Brandl added the comment: Indeed RELEASE is not defined anywhere. I was confusing JS variables and Jinja template variables: DOCUMENTATION_OPTIONS.VERSION is in fact what Sphinx calls "release". So the fix should be to use VERSION as release and VERSION[:3] as version. Thanks for catching that. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 22:18:45 2012 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 27 Oct 2012 20:18:45 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351369125.4.0.0616241338726.issue8040@psf.upfronthosting.co.za> Yury Selivanov added the comment: I think we should also apply patch for 2.6, right? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 22:19:21 2012 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 27 Oct 2012 20:19:21 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351369161.97.0.933454817609.issue8040@psf.upfronthosting.co.za> Yury Selivanov added the comment: And last bit - are you sure we shouldn't add the switch for 2.5? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 22:22:34 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 27 Oct 2012 20:22:34 +0000 Subject: [issue16239] PEP8 arithmetic operator examples In-Reply-To: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> Message-ID: <1351369354.18.0.399957611958.issue16239@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +gvanrossum _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16239> _______________________________________ From report at bugs.python.org Sat Oct 27 22:23:01 2012 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 27 Oct 2012 20:23:01 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351369381.33.0.503969057164.issue8040@psf.upfronthosting.co.za> Yury Selivanov added the comment: And if you guys can - please re-run the docs generation script manually... As it's showing an incorrect version everywhere. Thanks! ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 22:25:48 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Oct 2012 20:25:48 +0000 Subject: [issue16337] typo in documentation regarding "Bytearray Objects", chapter 4.8.2 In-Reply-To: <1351340147.76.0.113530855942.issue16337@psf.upfronthosting.co.za> Message-ID: <3Xptqw036fzPXD@mail.python.org> Roundup Robot added the comment: New changeset a0e206000051 by Ezio Melotti in branch '3.3': #16337: fix typo. http://hg.python.org/cpython/rev/a0e206000051 New changeset fd3bc0323505 by Ezio Melotti in branch 'default': #16337: merge with 3.3. http://hg.python.org/cpython/rev/fd3bc0323505 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16337> _______________________________________ From report at bugs.python.org Sat Oct 27 22:26:15 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 27 Oct 2012 20:26:15 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351369575.64.0.720670131876.issue8040@psf.upfronthosting.co.za> Georg Brandl added the comment: 2.5 is neither supported anymore, nor should we make it look like it is :) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sat Oct 27 22:26:21 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 27 Oct 2012 20:26:21 +0000 Subject: [issue16337] typo in documentation regarding "Bytearray Objects", chapter 4.8.2 In-Reply-To: <1351340147.76.0.113530855942.issue16337@psf.upfronthosting.co.za> Message-ID: <1351369581.42.0.177227380821.issue16337@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 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16337> _______________________________________ From report at bugs.python.org Sat Oct 27 22:27:37 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 27 Oct 2012 20:27:37 +0000 Subject: [issue15749] cgitb prints html for text when display disabled. In-Reply-To: <1345523795.76.0.397222969623.issue15749@psf.upfronthosting.co.za> Message-ID: <1351369657.93.0.336382089027.issue15749@psf.upfronthosting.co.za> R. David Murray added the comment: Issue 12890 fix is now committed. Perhaps I should have worked with yours instead...but I didn't. The test solution in that patch, calling python in a separate process, is conceptually simpler but will take more time to run. I'm on the fence as to which one I prefer, having looked at your patch now...but I'm not sure that your patch cleans up properly, and that fact that that is difficult to figure out argues a bit for the cleaner subprocess solution. I much prefer tests that run fast, though... ---------- nosy: +r.david.murray _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15749> _______________________________________ From report at bugs.python.org Sat Oct 27 22:27:56 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 27 Oct 2012 20:27:56 +0000 Subject: [issue15749] cgitb prints html for text when display disabled. In-Reply-To: <1345523795.76.0.397222969623.issue15749@psf.upfronthosting.co.za> Message-ID: <1351369676.46.0.439332758176.issue15749@psf.upfronthosting.co.za> Changes by R. David Murray <rdmurray at bitdance.com>: ---------- versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15749> _______________________________________ From report at bugs.python.org Sat Oct 27 23:10:22 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Oct 2012 21:10:22 +0000 Subject: [issue15889] regrtest --start option raises AttributeError in many scenarios In-Reply-To: <1347193219.18.0.453057488599.issue15889@psf.upfronthosting.co.za> Message-ID: <3XpvqL1RSpzPBj@mail.python.org> Roundup Robot added the comment: New changeset f6d04f5cff31 by R David Murray in branch '3.2': #15889: make regrtest --start succeed in more cases. http://hg.python.org/cpython/rev/f6d04f5cff31 New changeset 19f205e3111c by R David Murray in branch '3.3': merge #15889: make regrtest --start succeed in more cases. http://hg.python.org/cpython/rev/19f205e3111c New changeset f9bd7633316c by R David Murray in branch 'default': merge #15889: make regrtest --start succeed in more cases. http://hg.python.org/cpython/rev/f9bd7633316c ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15889> _______________________________________ From report at bugs.python.org Sat Oct 27 23:11:09 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 27 Oct 2012 21:11:09 +0000 Subject: [issue15889] regrtest --start option raises AttributeError in many scenarios In-Reply-To: <1347193219.18.0.453057488599.issue15889@psf.upfronthosting.co.za> Message-ID: <1351372269.28.0.029649500902.issue15889@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Chris. ---------- nosy: +r.david.murray resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15889> _______________________________________ From report at bugs.python.org Sat Oct 27 23:27:18 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 27 Oct 2012 21:27:18 +0000 Subject: [issue9017] doctest option flag to enable/disable some chunk of doctests? In-Reply-To: <1276778533.38.0.325280903618.issue9017@psf.upfronthosting.co.za> Message-ID: <1351373238.94.0.168773273692.issue9017@psf.upfronthosting.co.za> Ezio Melotti added the comment: I'm going to close this as rejected, because the feature doesn't seem too useful, there are available workarounds, and the addition of the ENABLE/DISABLE flags might add confusions. ---------- nosy: +ezio.melotti resolution: -> rejected stage: needs patch -> committed/rejected status: open -> closed versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9017> _______________________________________ From report at bugs.python.org Sat Oct 27 23:33:18 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 27 Oct 2012 21:33:18 +0000 Subject: [issue12890] cgitb displays <p> tags when executed in text mode In-Reply-To: <1315016521.13.0.175763253408.issue12890@psf.upfronthosting.co.za> Message-ID: <1351373598.55.0.442346434037.issue12890@psf.upfronthosting.co.za> R. David Murray added the comment: The tests fail on Widows7 on the buildbots. (They work fine in my XP Windows VM.) ---------- assignee: eric.araujo -> status: closed -> open _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12890> _______________________________________ From report at bugs.python.org Sat Oct 27 23:36:26 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 27 Oct 2012 21:36:26 +0000 Subject: =?utf-8?q?=5Bissue16325=5D_PEP=C2=A08_refers_to_reference_to_PEP_8?= In-Reply-To: <1351186367.56.0.154772018317.issue16325@psf.upfronthosting.co.za> Message-ID: <1351373786.5.0.697121678548.issue16325@psf.upfronthosting.co.za> Ezio Melotti added the comment: I applied the patch and removed the two sentences: http://hg.python.org/peps/rev/be77365934e7 ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: behavior -> enhancement _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16325> _______________________________________ From report at bugs.python.org Sat Oct 27 23:40:08 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Oct 2012 21:40:08 +0000 Subject: [issue12890] cgitb displays <p> tags when executed in text mode In-Reply-To: <1315016521.13.0.175763253408.issue12890@psf.upfronthosting.co.za> Message-ID: <3XpwTg6G6CzMqf@mail.python.org> Roundup Robot added the comment: New changeset 0e4574595674 by R David Murray in branch '3.3': #12890: skip tests which fail on windows until fixed or rewritten. http://hg.python.org/cpython/rev/0e4574595674 New changeset 57a33af85407 by R David Murray in branch 'default': merge #12890: skip tests which fail on windows until fixed or rewritten. http://hg.python.org/cpython/rev/57a33af85407 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12890> _______________________________________ From report at bugs.python.org Sat Oct 27 23:40:09 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Oct 2012 21:40:09 +0000 Subject: [issue15749] cgitb prints html for text when display disabled. In-Reply-To: <1345523795.76.0.397222969623.issue15749@psf.upfronthosting.co.za> Message-ID: <3XpwTh4rBSzM1p@mail.python.org> Roundup Robot added the comment: New changeset 0e4574595674 by R David Murray in branch '3.3': #12890: skip tests which fail on windows until fixed or rewritten. http://hg.python.org/cpython/rev/0e4574595674 New changeset 57a33af85407 by R David Murray in branch 'default': merge #12890: skip tests which fail on windows until fixed or rewritten. http://hg.python.org/cpython/rev/57a33af85407 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15749> _______________________________________ From report at bugs.python.org Sat Oct 27 23:41:01 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 27 Oct 2012 21:41:01 +0000 Subject: [issue12890] cgitb displays <p> tags when executed in text mode In-Reply-To: <1315016521.13.0.175763253408.issue12890@psf.upfronthosting.co.za> Message-ID: <1351374061.26.0.197606054198.issue12890@psf.upfronthosting.co.za> R. David Murray added the comment: I put in a skip until we either fix the tests or rewrite them as suggested in issue 15749. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12890> _______________________________________ From report at bugs.python.org Sat Oct 27 23:57:06 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 27 Oct 2012 21:57:06 +0000 Subject: [issue8401] Strange behavior of bytearray slice assignment In-Reply-To: <1271259710.42.0.373058487219.issue8401@psf.upfronthosting.co.za> Message-ID: <1351375026.77.0.974737440335.issue8401@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: Removed file: http://bugs.python.org/file16945/issue8401.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8401> _______________________________________ From report at bugs.python.org Sun Oct 28 00:00:54 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 27 Oct 2012 22:00:54 +0000 Subject: [issue8401] Strange behavior of bytearray slice assignment In-Reply-To: <1271259710.42.0.373058487219.issue8401@psf.upfronthosting.co.za> Message-ID: <1351375254.74.0.0832117213345.issue8401@psf.upfronthosting.co.za> Ezio Melotti added the comment: Updated patch against default. ---------- keywords: +needs review Added file: http://bugs.python.org/file27753/issue8401.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8401> _______________________________________ From report at bugs.python.org Sun Oct 28 01:27:59 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 27 Oct 2012 23:27:59 +0000 Subject: [issue16316] Support xz compression in mimetypes module In-Reply-To: <1351114845.07.0.378323444057.issue16316@psf.upfronthosting.co.za> Message-ID: <1351380479.56.0.562499059212.issue16316@psf.upfronthosting.co.za> ?ric Araujo added the comment: LGTM. ---------- nosy: +eric.araujo, r.david.murray versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16316> _______________________________________ From report at bugs.python.org Sun Oct 28 02:32:48 2012 From: report at bugs.python.org (Jeff McNeil) Date: Sun, 28 Oct 2012 01:32:48 +0000 Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups In-Reply-To: <1232404142.93.0.545475464378.issue5004@psf.upfronthosting.co.za> Message-ID: <1351387968.74.0.0689742933113.issue5004@psf.upfronthosting.co.za> Jeff McNeil added the comment: Gave this a go myself... $ ./python Python 3.4.0a0 (default:57a33af85407, Oct 27 2012, 21:26:30) [GCC 4.4.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> socket.getfqdn() 'host.domain.com' >>> $ hostname -f host.domain.com $ cat /etc/hosts 127.0.0.1 localhost.localdomain localhost # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters Linux host 3.5.2-x86_64 #1 SMP Wed Aug 15 14:31:07 EDT 2012 x86_64 GNU/Linux According to strace, both rely on DNS: recvfrom(3, "Wj\201\200\0\1\0\1\0\5\0\0\00219\003134\003230\003173\7in-a"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("1.2.3.4")}, [16]) = 176 Same behavior on both 2.6 & hg tip. I think this is a non-issue. ---------- nosy: +mcjeff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5004> _______________________________________ From report at bugs.python.org Sun Oct 28 02:58:40 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sun, 28 Oct 2012 01:58:40 +0000 Subject: [issue16341] In examples, "except:" should use new syntax Message-ID: <1351389520.62.0.621289823852.issue16341@psf.upfronthosting.co.za> New submission from Jes?s Cea Avi?n: In python 2.7 documentation, doing "grep -i 'except.*,.*:' *rst" shows quite a few "old style" "except:". I think that "except X, e:" should be transformed to "except X as e:", for clarity, as done in issue #16332. The only thing is that this syntax, used in examples, would be incompatible with old python releases. Opinions? ---------- keywords: easy messages: 173988 nosy: jcea priority: normal severity: normal status: open title: In examples, "except:" should use new syntax versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16341> _______________________________________ From report at bugs.python.org Sun Oct 28 02:59:05 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sun, 28 Oct 2012 01:59:05 +0000 Subject: [issue16332] Use new exception handling syntax in Subprocess documentation In-Reply-To: <1351281808.98.0.372067988973.issue16332@psf.upfronthosting.co.za> Message-ID: <1351389545.72.0.374053887888.issue16332@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Related issue #16341. ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16332> _______________________________________ From report at bugs.python.org Sun Oct 28 02:59:46 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sun, 28 Oct 2012 01:59:46 +0000 Subject: [issue16341] In examples, "except:" should use new syntax In-Reply-To: <1351389520.62.0.621289823852.issue16341@psf.upfronthosting.co.za> Message-ID: <1351389586.93.0.502098794358.issue16341@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- components: +Library (Lib) nosy: +docs at python _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16341> _______________________________________ From report at bugs.python.org Sun Oct 28 02:59:57 2012 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 28 Oct 2012 01:59:57 +0000 Subject: [issue16239] PEP8 arithmetic operator examples In-Reply-To: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> Message-ID: <1351389597.66.0.556883602615.issue16239@psf.upfronthosting.co.za> Guido van Rossum added the comment: Wow. Someone edited that to be completely against my guidance. I'll fix it according to my intentions. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16239> _______________________________________ From report at bugs.python.org Sun Oct 28 03:00:15 2012 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 28 Oct 2012 02:00:15 +0000 Subject: [issue16239] PEP8 arithmetic operator examples In-Reply-To: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> Message-ID: <1351389615.37.0.156100220893.issue16239@psf.upfronthosting.co.za> Changes by Guido van Rossum <guido at python.org>: ---------- assignee: ezio.melotti -> gvanrossum _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16239> _______________________________________ From report at bugs.python.org Sun Oct 28 03:05:13 2012 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 28 Oct 2012 02:05:13 +0000 Subject: [issue16239] PEP8 arithmetic operator examples In-Reply-To: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> Message-ID: <1351389913.51.0.249318387195.issue16239@psf.upfronthosting.co.za> Guido van Rossum added the comment: Corrected to: Yes:: i = i + 1 submitted += 1 x = x*2 - 1 hypot2 = x*x + y*y c = (a+b) * (a-b) No:: i=i+1 submitted +=1 x = x * 2 - 1 hypot2 = x * x + y * y c = (a + b) * (a - b) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16239> _______________________________________ From report at bugs.python.org Sun Oct 28 03:32:19 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 28 Oct 2012 02:32:19 +0000 Subject: [issue16342] setup.py not compiling with NDEBUG in non-debug builds Message-ID: <1351391539.96.0.993483572486.issue16342@psf.upfronthosting.co.za> New submission from Brett Cannon: Discovered on OS X 10.8 with clang 3.1, I'm having build failures for _json, _md5, _sha1, _sha256, _sha3, and _sha512 because _PyUnicode_CheckConsistency() is only defined when defined(Py_DEBUG) && !defined(Py_LIMITED_API) even though it is only used in assert() calls (like the one below). If you read the comment in Include/Python.h where assert.h is included it explicitly says that: /* CAUTION: Build setups should ensure that NDEBUG is defined on the * compiler command line when building Python in release mode; else * assert() calls won't be removed. */ Based on the output below that is not currently happening in setup.py. Not sure if that is a failure of setup.py or distutils of not specifying the flag. building '_json' extension /Users/bcannon/Developer/bin/clang -Wno-unused-result -g -O0 -Wall -Wstrict-prototypes -Wno-unused-value -Wno-empty-body -Qunused-arguments -Wno-unused-value -Wno-empty-body -Qunused-arguments -I./Include -I. -I/Users/bcannon/Developer/include -I/Users/bcannon/Developer/Cellar/readline/6.2.2/include -I/Users/bcannon/Developer/repo/cpython/py3.3/Include -I/Users/bcannon/Developer/repo/cpython/py3.3 -c /Users/bcannon/Developer/repo/cpython/py3.3/Modules/_json.c -o build/temp.macosx-10.8-x86_64-3.3/Users/bcannon/Developer/repo/cpython/py3.3/Modules/_json.o /Users/bcannon/Developer/repo/cpython/py3.3/Modules/_json.c:249:12: warning: implicit declaration of function '_PyUnicode_CheckConsistency' is invalid in C99 [-Wimplicit-function-declaration] assert(_PyUnicode_CheckConsistency(rval, 1)); ^ /usr/include/assert.h:93:25: note: expanded from macro 'assert' (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0) ^ 1 warning generated. /Users/bcannon/Developer/bin/clang -bundle -undefined dynamic_lookup -L /Users/bcannon/Developer/lib -L/Users/bcannon/Developer/Cellar/readline/6.2.2/lib -L /Users/bcannon/Developer/lib -L/Users/bcannon/Developer/Cellar/readline/6.2.2/lib -L /Users/bcannon/Developer/lib -L/Users/bcannon/Developer/Cellar/readline/6.2.2/lib -Wno-unused-value -Wno-empty-body -Qunused-arguments -I /Users/bcannon/Developer/include -I/Users/bcannon/Developer/Cellar/readline/6.2.2/include build/temp.macosx-10.8-x86_64-3.3/Users/bcannon/Developer/repo/cpython/py3.3/Modules/_json.o -L/Users/bcannon/Developer/lib -L/Users/bcannon/Developer/Cellar/readline/6.2.2/lib -o build/lib.macosx-10.8-x86_64-3.3/_json.so *** WARNING: renaming "_json" since importing it failed: dlopen(build/lib.macosx-10.8-x86_64-3.3/_json.so, 2): Symbol not found: __PyUnicode_CheckConsistency Referenced from: build/lib.macosx-10.8-x86_64-3.3/_json.so Expected in: flat namespace in build/lib.macosx-10.8-x86_64-3.3/_json.so ---------- components: Build keywords: 3.3regression messages: 173992 nosy: brett.cannon, eric.araujo priority: normal severity: normal stage: needs patch status: open title: setup.py not compiling with NDEBUG in non-debug builds type: compile error versions: Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16342> _______________________________________ From report at bugs.python.org Sun Oct 28 03:35:51 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sun, 28 Oct 2012 02:35:51 +0000 Subject: [issue16341] In examples, "except:" should use new syntax In-Reply-To: <1351389520.62.0.621289823852.issue16341@psf.upfronthosting.co.za> Message-ID: <1351391751.26.0.146870661158.issue16341@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- assignee: -> docs at python components: +Documentation -Library (Lib) _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16341> _______________________________________ From report at bugs.python.org Sun Oct 28 03:54:33 2012 From: report at bugs.python.org (Ned Deily) Date: Sun, 28 Oct 2012 02:54:33 +0000 Subject: [issue16342] setup.py not compiling with NDEBUG in non-debug builds In-Reply-To: <1351391539.96.0.993483572486.issue16342@psf.upfronthosting.co.za> Message-ID: <1351392873.75.0.256660560939.issue16342@psf.upfronthosting.co.za> Ned Deily added the comment: I can't reproduce this on 10.8 with Apple clang 4.1. Your compile options look a little funky, including a missing -fwrapv. It looks like that option and -DNDEBUG are normally passed from ./configure into the Makefile through the OPT variable. Are you by any chance overriding $OPT? ---------- nosy: +ned.deily _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16342> _______________________________________ From report at bugs.python.org Sun Oct 28 04:51:57 2012 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 28 Oct 2012 03:51:57 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351396317.09.0.999927427323.issue8040@psf.upfronthosting.co.za> Yury Selivanov added the comment: It seems that the docs site has old jquery - 1.4, and current JS script uses $.get, which got support for 'error' callbacks only in 1.5 So right now, if a URL doesn't exist for the version the user is about to switch to, it just fails with a JS error. I'm attaching one more (hopefully last!) patch to fix that. Thanks. ---------- Added file: http://bugs.python.org/file27754/switcher_js.ajax.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sun Oct 28 04:55:38 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sun, 28 Oct 2012 03:55:38 +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: <1351396538.98.0.207204794362.issue16322@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16322> _______________________________________ From report at bugs.python.org Sun Oct 28 04:56:19 2012 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 28 Oct 2012 03:56:19 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351396579.9.0.393154149877.issue8040@psf.upfronthosting.co.za> Yury Selivanov added the comment: (I'd fix it myself if I could ;) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sun Oct 28 05:06:11 2012 From: report at bugs.python.org (Mariano Reingart) Date: Sun, 28 Oct 2012 04:06:11 +0000 Subject: [issue16343] PyUnicode_FromFormatV() doesn't support utf-8 text Message-ID: <1351397171.27.0.117750740634.issue16343@psf.upfronthosting.co.za> New submission from Mariano Reingart: Working in an internationalization proposal <http://python.org.ar/pyar/TracebackInternationalizationProposal> I've stopped at #9769 where multi byte encodings (like utf-8) is not supported by PyUnicode_FromFormatV() Beside my proposal, I think utf-8 should be supported for consistency with the other unicode functions, like PyUnicode_FromString() or even unicode_fromformat_arg() Attached is a patch that: - enhanced the iterator to detect multibyte sequences, with sanity checks about start & continuation bytes - replaced unicode_write_cstr with PyUnicode_DecodeUTF8Stateful - tests Hope it helps, this is my first patch for cpython and my C skills are a bit rusty, so excuse me if there is any newbie glitch ---------- components: Interpreter Core, Unicode files: pyunicode_fromformat_utf8.patch keywords: patch messages: 173996 nosy: ezio.melotti, reingart priority: normal severity: normal status: open title: PyUnicode_FromFormatV() doesn't support utf-8 text type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27755/pyunicode_fromformat_utf8.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16343> _______________________________________ From report at bugs.python.org Sun Oct 28 05:42:27 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 28 Oct 2012 04:42:27 +0000 Subject: [issue16343] PyUnicode_FromFormatV() doesn't support utf-8 text In-Reply-To: <1351397171.27.0.117750740634.issue16343@psf.upfronthosting.co.za> Message-ID: <1351399347.81.0.986088787101.issue16343@psf.upfronthosting.co.za> Changes by R. David Murray <rdmurray at bitdance.com>: ---------- nosy: +haypo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16343> _______________________________________ From report at bugs.python.org Sun Oct 28 06:17:04 2012 From: report at bugs.python.org (Chris Rebert) Date: Sun, 28 Oct 2012 05:17:04 +0000 Subject: [issue16341] In examples, "except:" should use new syntax In-Reply-To: <1351389520.62.0.621289823852.issue16341@psf.upfronthosting.co.za> Message-ID: <1351401424.6.0.584490547108.issue16341@psf.upfronthosting.co.za> Changes by Chris Rebert <pybugs at rebertia.com>: ---------- nosy: +cvrebert _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16341> _______________________________________ From report at bugs.python.org Sun Oct 28 07:10:28 2012 From: report at bugs.python.org (Chris Rebert) Date: Sun, 28 Oct 2012 06:10:28 +0000 Subject: [issue16329] mimetypes does not support webm type In-Reply-To: <1351258498.52.0.166970519729.issue16329@psf.upfronthosting.co.za> Message-ID: <1351404628.62.0.558980593506.issue16329@psf.upfronthosting.co.za> Chris Rebert added the comment: AFAICT, there is currently no entry for WebM in IANA's registry (http://www.iana.org/assignments/media-types/index.html ). A bug in WebM's tracker regarding its MIME type(s) was closed over a year ago as WONTFIX (http://code.google.com/p/webm/issues/detail?id=15 ). Giampaolo has already pointed out the relevant part of the WebM spec. WebM itself has no RFCs (there are 2 relating to VP8, its video codec, but they don't have anything that's relevant here). To independently corroborate the existence of the MIME type, we have the following: Mozilla, Microsoft, and Opera all acknowledge the MIME type in question: https://developer.mozilla.org/en-US/docs/Media_formats_supported_by_the_audio_and_video_elements http://msdn.microsoft.com/en-us/library/ff975073%28v=VS.85%29.aspx http://dev.opera.com/articles/view/opera-supports-webm-video/ The de-facto *nix MIME type database/package maintained by freedesktop.org includes it: http://cgit.freedesktop.org/xdg/shared-mime-info/tree/NEWS?id=391ae76f6a2f3af93406ac31bc8735695f41d07d#n92 ---------- nosy: +cvrebert _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16329> _______________________________________ From report at bugs.python.org Sun Oct 28 07:57:37 2012 From: report at bugs.python.org (Mariano Reingart) Date: Sun, 28 Oct 2012 06:57:37 +0000 Subject: [issue16344] Traceback Internationalization Proposal Message-ID: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> New submission from Mariano Reingart: I'm opening this ticket to organize patches for a proposal of a GETTEXT-based message translation for exception/tracebacks as described in: <http://python.org.ar/pyar/TracebackInternationalizationProposal> This requires the patch in issue #16343 Attached is a patch for a proof of concept, it includes: - pyi18n.h: header for Py_GETTEXT macro definition - Locale/es.po: sample Spanish language messages translation file - test_i18n.py: basic tests - errors.c: patched PyErr_SetString(), PyErr_Format() - traceback.c: patched tb_displayline(), PyTraceBack_Print() - pythonrun.c: patched _Py_InitializeEx_Private() - site.py: patched main() and added seti18n() ---------- components: Interpreter Core, Unicode files: traceback_internationalization_proposal.patch keywords: patch messages: 173998 nosy: ezio.melotti, reingart priority: normal severity: normal status: open title: Traceback Internationalization Proposal type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27756/traceback_internationalization_proposal.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Sun Oct 28 08:04:58 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Oct 2012 07:04:58 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <3Xq91P2QyZzR8b@mail.python.org> Roundup Robot added the comment: New changeset 4a17784f2fee by Georg Brandl in branch '2.6': #8040: port versionswitcher patch to 2.6. http://hg.python.org/cpython/rev/4a17784f2fee ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sun Oct 28 08:05:29 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Oct 2012 07:05:29 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <3Xq9206fxLzMFl@mail.python.org> Roundup Robot added the comment: New changeset e02d49db3f5b by Georg Brandl in branch '3.2': #8040: fix jQuery incompatibility http://hg.python.org/cpython/rev/e02d49db3f5b ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sun Oct 28 08:29:37 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 28 Oct 2012 07:29:37 +0000 Subject: [issue16262] srcdir != builddir builds fail, if hg is not installed In-Reply-To: <1350464486.47.0.189031527493.issue16262@psf.upfronthosting.co.za> Message-ID: <1351409377.89.0.25985811708.issue16262@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: The following syntax is broken: if $PYTHON = not-found; then ... checking for python3.4... python3.4 python3.4: can't open file '=': [Errno 2] No such file or directory checking for a BSD-compatible install... /usr/bin/install -c ... You probably want to use 'if test $PYTHON = not-found'. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16262> _______________________________________ From report at bugs.python.org Sun Oct 28 08:30:41 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 28 Oct 2012 07:30:41 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351409441.0.0.616969720421.issue8040@psf.upfronthosting.co.za> Georg Brandl added the comment: OK, with the latest patch it seems to work fine for me. I've run the autobuild for 2.7/3.3/3.4 and put custom built versions of 2.6/3.2 on dinsdale, so everything should look and work fine. I've also added todo items to PEP 101, in order to make sure the version list in version_switcher.js is properly updated on new feature versions. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sun Oct 28 08:31:09 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 28 Oct 2012 07:31:09 +0000 Subject: [issue8040] documentation pages should link to other versions of the same page In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1351409469.63.0.525693028479.issue8040@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks Yury for the work! ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8040> _______________________________________ From report at bugs.python.org Sun Oct 28 08:39:06 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 28 Oct 2012 07:39:06 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351409946.09.0.173106214754.issue16344@psf.upfronthosting.co.za> Georg Brandl added the comment: Has this been discussed on python-dev before? I see that your proposal is in PEP form; it would be a good idea to post it to python-dev since this is not a change that can be done without a PEP. ---------- nosy: +georg.brandl _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Sun Oct 28 08:39:08 2012 From: report at bugs.python.org (Konstantin Zemlyak) Date: Sun, 28 Oct 2012 07:39:08 +0000 Subject: [issue16340] Decoding error due to byte-compiling venv scripts at install time In-Reply-To: <1351363368.32.0.193110558396.issue16340@psf.upfronthosting.co.za> Message-ID: <1351409948.41.0.762455650209.issue16340@psf.upfronthosting.co.za> Changes by Konstantin Zemlyak <zart at zartsoft.ru>: ---------- title: Decoding error at install time when byte-compiling venv scripts -> Decoding error due to byte-compiling venv scripts at install time _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16340> _______________________________________ From report at bugs.python.org Sun Oct 28 08:41:10 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 28 Oct 2012 07:41:10 +0000 Subject: [issue16239] PEP8 arithmetic operator examples In-Reply-To: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> Message-ID: <1351410070.31.0.150155728.issue16239@psf.upfronthosting.co.za> Ezio Melotti added the comment: Thanks! FTR, this is the changeset: http://hg.python.org/peps/rev/16dd63848921 ---------- stage: patch review -> committed/rejected _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16239> _______________________________________ From report at bugs.python.org Sun Oct 28 08:47:40 2012 From: report at bugs.python.org (Mariano Reingart) Date: Sun, 28 Oct 2012 07:47:40 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351410460.64.0.0316042339244.issue16344@psf.upfronthosting.co.za> Mariano Reingart added the comment: This has been discussed in python-ideas two years ago (I've resurrected the thread there) Sadly I didn't have time for this before, but as in 15 days we have a sprint on cpython at PyCon Argetina 2012, maybe it would be a good idea discuss this again. Sorry if I've made any mistake, this is my second patch here, and my C skills are rusty as I've mentioned in the other issue. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Sun Oct 28 08:59:19 2012 From: report at bugs.python.org (Mariano Reingart) Date: Sun, 28 Oct 2012 07:59:19 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351411159.56.0.166353533478.issue16344@psf.upfronthosting.co.za> Mariano Reingart added the comment: BTW, I'd write a draft PEP for this (attached), the online version is at <http://python.org.ar/pyar/TracebackInternationalizationProposal> Just let me know if it has to be uploaded/discussed elsewere ---------- Added file: http://bugs.python.org/file27757/pep_i18n_traceback.txt _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Sun Oct 28 09:04:26 2012 From: report at bugs.python.org (Armin Rigo) Date: Sun, 28 Oct 2012 08:04:26 +0000 Subject: [issue16345] dict.fromkeys() assumes 'self' is empty Message-ID: <1351411466.77.0.264436866601.issue16345@psf.upfronthosting.co.za> New submission from Armin Rigo: The implementation of dict.fromkeys() assumes that the new dictionary is empty. That's not the case if we tweak __new__. Attached example shows 'dictresize(mp, 0)' being called with 'mp' being dictionary of 10 items. This causes an infinite uninterruptible loop. ---------- components: Interpreter Core files: x.py messages: 174009 nosy: arigo priority: normal severity: normal status: open title: dict.fromkeys() assumes 'self' is empty versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27758/x.py _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16345> _______________________________________ From report at bugs.python.org Sun Oct 28 09:10:42 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 28 Oct 2012 08:10:42 +0000 Subject: [issue16345] dict.fromkeys() assumes 'self' is empty In-Reply-To: <1351411466.77.0.264436866601.issue16345@psf.upfronthosting.co.za> Message-ID: <1351411842.98.0.429459422237.issue16345@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +benjamin.peterson, ezio.melotti stage: -> needs patch type: -> behavior versions: -Python 3.1 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16345> _______________________________________ From report at bugs.python.org Sun Oct 28 09:15:53 2012 From: report at bugs.python.org (Chris Rebert) Date: Sun, 28 Oct 2012 08:15:53 +0000 Subject: [issue14570] Document json "sort_keys" parameter properly In-Reply-To: <1334284947.71.0.88941407788.issue14570@psf.upfronthosting.co.za> Message-ID: <1351412153.88.0.548042794511.issue14570@psf.upfronthosting.co.za> Chris Rebert added the comment: Per Chris Jerdonek, here's a combined patch that also makes the docs changes comply with the antiquated line length limit. ---------- Added file: http://bugs.python.org/file27759/issue14570.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14570> _______________________________________ From report at bugs.python.org Sun Oct 28 09:16:42 2012 From: report at bugs.python.org (Alex Gaynor) Date: Sun, 28 Oct 2012 08:16:42 +0000 Subject: [issue16345] dict.fromkeys() assumes 'self' is empty In-Reply-To: <1351411466.77.0.264436866601.issue16345@psf.upfronthosting.co.za> Message-ID: <1351412202.49.0.797763952823.issue16345@psf.upfronthosting.co.za> Changes by Alex Gaynor <alex.gaynor at gmail.com>: ---------- nosy: +alex _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16345> _______________________________________ From report at bugs.python.org Sun Oct 28 09:33:24 2012 From: report at bugs.python.org (Chris Rebert) Date: Sun, 28 Oct 2012 08:33:24 +0000 Subject: [issue14616] subprocess docs should mention pipes.quote/shlex.quote In-Reply-To: <1334769157.78.0.557014485739.issue14616@psf.upfronthosting.co.za> Message-ID: <1351413204.8.0.50591045343.issue14616@psf.upfronthosting.co.za> Chris Rebert added the comment: Here's a revised patch against the default branch (3.4 I presume?). ---------- Added file: http://bugs.python.org/file27760/subprocess.rst-default.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14616> _______________________________________ From report at bugs.python.org Sun Oct 28 09:48:55 2012 From: report at bugs.python.org (Mathieu Dutour Sikiric) Date: Sun, 28 Oct 2012 08:48:55 +0000 Subject: [issue16346] readline problem Message-ID: <1351414135.83.0.205698336567.issue16346@psf.upfronthosting.co.za> New submission from Mathieu Dutour Sikiric: Dear all, I tried to install Python 2.7.3 in a home directory for simplicity. On the Ubuntu platform that I had, the readline-dev was not installed. So, I I tried to install the readline package either by "pip install readline" or "python setup.py install" and what I got was following behavior: ------------------------------------------------------------------ . . . File "/home/dutour/opt/Python-2.7.3/lib/python2.7/distutils/dist.py", line 1118, in write_pkg_file self._write_field(file, 'Metadata-Version', version) File "/home/dutour/opt/Python-2.7.3/lib/python2.7/distutils/dist.py", line 1145, in _write_field file.write('%s: %s\n' % (name, self._encode_field(value))) File "/home/dutour/opt/Python-2.7.3/lib/python2.7/distutils/dist.py", line 1154, in _encode_field if isinstance(value, unicode): RuntimeError: maximum recursion depth exceeded while calling a Python object ---------------------------------------------------------------------- So, the install went into an infinite loop and crashed. Instead the correct error message that should have been shown at some point is missing .h file. I am a beginner on Python, I asked on help at python.org and Matthew Dixon Cowles indicated me that I should report the problem here. ---------- components: Build messages: 174012 nosy: mathieu37 priority: normal severity: normal status: open title: readline problem type: compile error versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16346> _______________________________________ From report at bugs.python.org Sun Oct 28 09:49:24 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 28 Oct 2012 08:49:24 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351414164.68.0.487442882249.issue16344@psf.upfronthosting.co.za> Ezio Melotti added the comment: I'm -1 on the idea for the following reasons: * any "serious" developer is expected to know English, and novice developers should be encouraged to learn it, rather than being confined to a localized environment; * even if the error messages are translated, all the keywords and names would still be in English, and the result will be even more confusing; * even if the feature might be useful for a small subset of people, I think it's not big enough and the feature shouldn't be included in Python by default (OTOH I'm not sure how easy it is to provide it as an external module); * translating and maintaining translations of all the error messages requires lot of work and we will be forced to either commit patches without translations or to hold them until all the translations are available; * I personally prefer to use English for "technical" stuff, because either the translations keep many English word or they end up translating them with something improbable and result in something that is even more cryptic; * a set of available languages should be defined and maintained; * googling and/or reporting localized errors doesn't work too well, and the mechanism proposed in the PEP to restore the language is somewhat cumbersome IMHO; * people might come across a localized version of Python and have to know how to restore the language before being able to use it; * this will also make debugging more difficult if it happens in places where the user can't easily change the language (e.g. server logs); ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Sun Oct 28 09:50:27 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 28 Oct 2012 08:50:27 +0000 Subject: [issue16346] readline problem In-Reply-To: <1351414135.83.0.205698336567.issue16346@psf.upfronthosting.co.za> Message-ID: <1351414227.89.0.301575556679.issue16346@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- assignee: -> eric.araujo components: +Distutils, Distutils2 nosy: +alexis, eric.araujo, tarek type: compile error -> behavior _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16346> _______________________________________ From report at bugs.python.org Sun Oct 28 10:04:15 2012 From: report at bugs.python.org (Chris Rebert) Date: Sun, 28 Oct 2012 09:04:15 +0000 Subject: [issue14616] subprocess docs should mention pipes.quote/shlex.quote In-Reply-To: <1334769157.78.0.557014485739.issue14616@psf.upfronthosting.co.za> Message-ID: <1351415055.25.0.929115915437.issue14616@psf.upfronthosting.co.za> Changes by Chris Rebert <pybugs at rebertia.com>: Removed file: http://bugs.python.org/file27197/subprocess.rst-3.3.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14616> _______________________________________ From report at bugs.python.org Sun Oct 28 10:10:30 2012 From: report at bugs.python.org (Chris Rebert) Date: Sun, 28 Oct 2012 09:10:30 +0000 Subject: [issue14616] subprocess docs should mention pipes.quote/shlex.quote In-Reply-To: <1334769157.78.0.557014485739.issue14616@psf.upfronthosting.co.za> Message-ID: <1351415430.51.0.905286499027.issue14616@psf.upfronthosting.co.za> Chris Rebert added the comment: Just to keep the ball rolling, in case it ends up being the solution ultimately chosen, here is a patch against 2.7 to document pipes.quote(). The text is yanked straight from shlex.quote(), the differences being: - qualify shlex.split() references - print function -> print statement - add deprecation note (currently backdated to when `pipes` was added to the std lib; mentions what happens in 3.3) ---------- versions: +Python 3.4, Python 3.5 Added file: http://bugs.python.org/file27761/pipes.rst.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14616> _______________________________________ From report at bugs.python.org Sun Oct 28 10:12:02 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Oct 2012 09:12:02 +0000 Subject: [issue16340] Decoding error due to byte-compiling venv scripts at install time In-Reply-To: <1351363368.32.0.193110558396.issue16340@psf.upfronthosting.co.za> Message-ID: <3XqCr12GN7zR9w@mail.python.org> Roundup Robot added the comment: New changeset 06a5fe86d87c by Vinay Sajip in branch '3.3': Issue #16340: exclude venv/scripts from byte-compilation at installation time on Windows. http://hg.python.org/cpython/rev/06a5fe86d87c New changeset e8619f015ab9 by Vinay Sajip in branch 'default': Issue #16340: Merged fix from 3.3. http://hg.python.org/cpython/rev/e8619f015ab9 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16340> _______________________________________ From report at bugs.python.org Sun Oct 28 10:16:39 2012 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 28 Oct 2012 09:16:39 +0000 Subject: [issue16340] Decoding error due to byte-compiling venv scripts at install time In-Reply-To: <1351363368.32.0.193110558396.issue16340@psf.upfronthosting.co.za> Message-ID: <1351415799.44.0.394405641868.issue16340@psf.upfronthosting.co.za> Vinay Sajip added the comment: I've made the msi.py change. Perhaps I should also catch the exception in the venv script-copying code? Leaving issue open for now. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16340> _______________________________________ From report at bugs.python.org Sun Oct 28 10:40:48 2012 From: report at bugs.python.org (Chris Rebert) Date: Sun, 28 Oct 2012 09:40:48 +0000 Subject: [issue13238] Add shell command helpers to subprocess module In-Reply-To: <1319176813.33.0.203455355645.issue13238@psf.upfronthosting.co.za> Message-ID: <1351417248.17.0.602141949693.issue13238@psf.upfronthosting.co.za> Chris Rebert added the comment: Even more libraries in this vein: http://plumbum.readthedocs.org/en/latest/ http://amoffat.github.com/sh/ ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13238> _______________________________________ From report at bugs.python.org Sun Oct 28 10:43:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Oct 2012 09:43:14 +0000 Subject: [issue14616] subprocess docs should mention pipes.quote/shlex.quote In-Reply-To: <1334769157.78.0.557014485739.issue14616@psf.upfronthosting.co.za> Message-ID: <3XqDX15PbNzR2P@mail.python.org> Roundup Robot added the comment: New changeset f9d11ca3ccd1 by Andrew Svetlov in branch '3.3': Issue #14616: Mention shlex.quote in subprocess docs. http://hg.python.org/cpython/rev/f9d11ca3ccd1 New changeset 72672cf5d850 by Andrew Svetlov in branch 'default': Merge issue #14616: Mention shlex.quote in subprocess docs. http://hg.python.org/cpython/rev/72672cf5d850 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14616> _______________________________________ From report at bugs.python.org Sun Oct 28 10:48:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Oct 2012 09:48:14 +0000 Subject: [issue14616] subprocess docs should mention pipes.quote/shlex.quote In-Reply-To: <1334769157.78.0.557014485739.issue14616@psf.upfronthosting.co.za> Message-ID: <3XqDdp1yS1zR6Z@mail.python.org> Roundup Robot added the comment: New changeset d9ca966cd116 by Andrew Svetlov in branch '2.7': Issue #14616: Document pipes.quote and mention this one in subprocess docs. http://hg.python.org/cpython/rev/d9ca966cd116 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14616> _______________________________________ From report at bugs.python.org Sun Oct 28 10:49:29 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 28 Oct 2012 09:49:29 +0000 Subject: [issue14616] subprocess docs should mention pipes.quote/shlex.quote In-Reply-To: <1334769157.78.0.557014485739.issue14616@psf.upfronthosting.co.za> Message-ID: <1351417769.15.0.879456912824.issue14616@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I have applied all patches. Thanks, Chris. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14616> _______________________________________ From report at bugs.python.org Sun Oct 28 11:01:05 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Oct 2012 10:01:05 +0000 Subject: [issue14700] Integer overflow in classic string formatting In-Reply-To: <1335804926.58.0.135059540144.issue14700@psf.upfronthosting.co.za> Message-ID: <3XqDwd2R1vzR0m@mail.python.org> Roundup Robot added the comment: New changeset 21fb1767e185 by Mark Dickinson in branch '2.7': Issue #14700: Fix buggy overflow checks for large precision and width in new-style and old-style formatting. http://hg.python.org/cpython/rev/21fb1767e185 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14700> _______________________________________ From report at bugs.python.org Sun Oct 28 11:02:16 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 28 Oct 2012 10:02:16 +0000 Subject: [issue16343] PyUnicode_FromFormatV() doesn't support utf-8 text In-Reply-To: <1351397171.27.0.117750740634.issue16343@psf.upfronthosting.co.za> Message-ID: <1351418536.17.0.685130365712.issue16343@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Shouldn't this patch be attached to the referenced issue 9769 instead of creating a new issue? Even the issue title is nearly the same: 9769: PyUnicode_FromFormatV() doesn't handle non-ascii text correctly 16343: PyUnicode_FromFormatV() doesn't support utf-8 text ---------- nosy: +chris.jerdonek _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16343> _______________________________________ From report at bugs.python.org Sun Oct 28 11:23:28 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Oct 2012 10:23:28 +0000 Subject: [issue14700] Integer overflow in classic string formatting In-Reply-To: <1335804926.58.0.135059540144.issue14700@psf.upfronthosting.co.za> Message-ID: <3XqFQS1jwkzRBd@mail.python.org> Roundup Robot added the comment: New changeset 102df748572d by Mark Dickinson in branch '3.2': Issue #14700: Fix buggy overflow checks for large precision and width in new-style and old-style formatting. http://hg.python.org/cpython/rev/102df748572d New changeset 79ea0c84152a by Mark Dickinson in branch '3.3': Issue #14700: merge tests from 3.2. http://hg.python.org/cpython/rev/79ea0c84152a New changeset 22c8e6d71529 by Mark Dickinson in branch 'default': Issue #14700: merge tests from 3.3. http://hg.python.org/cpython/rev/22c8e6d71529 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14700> _______________________________________ From report at bugs.python.org Sun Oct 28 11:27:58 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 28 Oct 2012 10:27:58 +0000 Subject: [issue14700] Integer overflow in classic string formatting In-Reply-To: <1335804926.58.0.135059540144.issue14700@psf.upfronthosting.co.za> Message-ID: <1351420078.29.0.421237481127.issue14700@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed in 2.7 and 3.2; extra tests ported to 3.3 and default. Reclosing. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14700> _______________________________________ From report at bugs.python.org Sun Oct 28 11:29:59 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 28 Oct 2012 10:29:59 +0000 Subject: [issue7098] g formatting for decimal types should always strip trailing zeros. In-Reply-To: <1255198932.03.0.979291900289.issue7098@psf.upfronthosting.co.za> Message-ID: <1351420199.48.0.309944495339.issue7098@psf.upfronthosting.co.za> Mark Dickinson added the comment: Closing as invalid. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue7098> _______________________________________ From report at bugs.python.org Sun Oct 28 11:31:12 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 28 Oct 2012 10:31:12 +0000 Subject: [issue8613] Decimal module flags undetermined when a signal is trapped. In-Reply-To: <1272984841.0.0.906657038884.issue8613@psf.upfronthosting.co.za> Message-ID: <1351420272.79.0.825798727034.issue8613@psf.upfronthosting.co.za> Mark Dickinson added the comment: Unassigning. ---------- assignee: mark.dickinson -> _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8613> _______________________________________ From report at bugs.python.org Sun Oct 28 11:33:24 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 28 Oct 2012 10:33:24 +0000 Subject: [issue16096] Get rid of dangerous integer overflow tricks In-Reply-To: <1349030051.26.0.323672452753.issue16096@psf.upfronthosting.co.za> Message-ID: <1351420404.48.0.0741652898727.issue16096@psf.upfronthosting.co.za> Changes by Mark Dickinson <dickinsm at gmail.com>: ---------- assignee: mark.dickinson -> _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16096> _______________________________________ From report at bugs.python.org Sun Oct 28 11:35:12 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 28 Oct 2012 10:35:12 +0000 Subject: [issue2813] No float formatting in PyString_FromFormat In-Reply-To: <1210453747.33.0.971608840544.issue2813@psf.upfronthosting.co.za> Message-ID: <1351420512.91.0.0754312413906.issue2813@psf.upfronthosting.co.za> Mark Dickinson added the comment: Okay, I've failed to take this forward. Reclosing as out of date. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue2813> _______________________________________ From report at bugs.python.org Sun Oct 28 11:52:33 2012 From: report at bugs.python.org (Antonio Cavallo) Date: Sun, 28 Oct 2012 10:52:33 +0000 Subject: [issue16347] configure.ac patch Message-ID: <1351421553.76.0.859904155942.issue16347@psf.upfronthosting.co.za> New submission from Antonio Cavallo: I've noticed that linux distros have a set of patch to fix a hardcoded lib in their makefiles: eg. Makefile.pre.in: .... INCLUDEDIR=?@includedir@ CONFINCLUDEDIR=?$(exec_prefix)/include SCRIPTDIR=??$(prefix)/lib <== HARDCODED This is due to the fact on the 64 bit they split lib and lib64 directories. I understand that removing such hardcoded values will be a very long task (multiple places where lib is hardcoded). To make it into incremental steps I think a good idea would be to introduce two simple modification into the configure.ac script: they are transparent (eg. won't affect in anyway the current code) but will provide the base infrastructure to build upon. Please find patch attached (mercurial ref 3fb84c1da8c5 / 79960) I'm using a build infrastructure for testing the whole patch set (I've applied them in full in the past) at https://build.opensuse.org/project/packages?project=home%3Acavallo71%3Aopt-python-interpreters. This tracks 2.7 but the patches should be easily ported in 3.x as well. I hope this helps, Antonio PS. Would be possible to remove "tabs" from cofigure.ac? ---------- components: Build, Cross-Build files: autoconfigure.dif messages: 174028 nosy: cavallo71, doko, georg.brandl, larry, skrah, trent priority: normal severity: normal status: open title: configure.ac patch versions: Python 2.7 Added file: http://bugs.python.org/file27762/autoconfigure.dif _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16347> _______________________________________ From report at bugs.python.org Sun Oct 28 11:58:24 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 28 Oct 2012 10:58:24 +0000 Subject: [issue16347] configure.ac patch In-Reply-To: <1351421553.76.0.859904155942.issue16347@psf.upfronthosting.co.za> Message-ID: <1351421904.58.0.446548917701.issue16347@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: ---------- nosy: +loewis _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16347> _______________________________________ From report at bugs.python.org Sun Oct 28 12:39:35 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 28 Oct 2012 11:39:35 +0000 Subject: [issue16341] In examples, "except:" should use new syntax In-Reply-To: <1351389520.62.0.621289823852.issue16341@psf.upfronthosting.co.za> Message-ID: <1351424375.77.0.0131379766316.issue16341@psf.upfronthosting.co.za> Andrew Svetlov added the comment: +1. Patch for 2.7 is attached. ---------- keywords: +patch nosy: +asvetlov Added file: http://bugs.python.org/file27763/issue16341.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16341> _______________________________________ From report at bugs.python.org Sun Oct 28 12:42:57 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 28 Oct 2012 11:42:57 +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: <1351424577.36.0.62119813891.issue16290@psf.upfronthosting.co.za> Changes by Mark Dickinson <dickinsm at gmail.com>: ---------- nosy: +antocuni _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16290> _______________________________________ From report at bugs.python.org Sun Oct 28 12:45:31 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 28 Oct 2012 11:45:31 +0000 Subject: [issue16341] In examples, "except:" should use new syntax In-Reply-To: <1351389520.62.0.621289823852.issue16341@psf.upfronthosting.co.za> Message-ID: <1351424731.66.0.112599237858.issue16341@psf.upfronthosting.co.za> Changes by Andrew Svetlov <andrew.svetlov at gmail.com>: ---------- stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16341> _______________________________________ From report at bugs.python.org Sun Oct 28 12:46:51 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 28 Oct 2012 11:46:51 +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: <1351424811.39.0.0286953913133.issue16290@psf.upfronthosting.co.za> Mark Dickinson added the comment: I've been convinced by the python-dev discussion that Antonio was right: it's complex_new that's in error rather than the cmath functions. Even so, it would be unsafe to change the behaviour in the maintenance releases. Attaching a new patch that disallows 'float'-type returns from the __complex__ method. ---------- Added file: http://bugs.python.org/file27764/issue16290v2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16290> _______________________________________ From report at bugs.python.org Sun Oct 28 12:50:12 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 28 Oct 2012 11:50:12 +0000 Subject: [issue9530] integer undefined behaviors In-Reply-To: <1281075386.13.0.164742828093.issue9530@psf.upfronthosting.co.za> Message-ID: <1351425012.81.0.00804551314783.issue9530@psf.upfronthosting.co.za> Mark Dickinson added the comment: It looks as though all the issues found by John's tool have now been fixed, with the exception of the ctypes issue. There's a separate issue open for that, so I'm closing this issue as fixed. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9530> _______________________________________ From report at bugs.python.org Sun Oct 28 12:51:09 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 28 Oct 2012 11:51:09 +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: <1351425069.68.0.318609526974.issue9742@psf.upfronthosting.co.za> Mark Dickinson added the comment: Unassigning, since I don't plan to work on this any time soon. ---------- assignee: mark.dickinson -> _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9742> _______________________________________ From report at bugs.python.org Sun Oct 28 13:08:38 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 28 Oct 2012 12:08:38 +0000 Subject: [issue9742] Python 2.7: math module fails to build on Solaris 9 In-Reply-To: <1351425069.68.0.318609526974.issue9742@psf.upfronthosting.co.za> Message-ID: <20121028120839.GA22593@sleipnir.bytereef.org> Stefan Krah added the comment: FWIW, Solaris 9 has EOL status: http://www.oracle.com/technetwork/server-storage/solaris10/overview/index-138972.html I suspect we might as well close this issue, since the motivation to work on it will be pretty low in general. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9742> _______________________________________ From report at bugs.python.org Sun Oct 28 13:12:17 2012 From: report at bugs.python.org (Trent Nelson) Date: Sun, 28 Oct 2012 12:12:17 +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: <1351426337.56.0.152787317171.issue9742@psf.upfronthosting.co.za> Changes by Trent Nelson <trent at snakebite.org>: ---------- nosy: +trent _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9742> _______________________________________ From report at bugs.python.org Sun Oct 28 13:13:24 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Oct 2012 12:13:24 +0000 Subject: [issue14570] Document json "sort_keys" parameter properly In-Reply-To: <1334284947.71.0.88941407788.issue14570@psf.upfronthosting.co.za> Message-ID: <3XqHsJ0m2jzRCQ@mail.python.org> Roundup Robot added the comment: New changeset 40aedc7da30f by Andrew Svetlov in branch '3.2': Issue #14570: Document json sort_keys parameter properly. http://hg.python.org/cpython/rev/40aedc7da30f New changeset 090484ccba7d by Andrew Svetlov in branch '3.3': Merge issue #14570: Document json sort_keys parameter properly. http://hg.python.org/cpython/rev/090484ccba7d New changeset 27ce005372a5 by Andrew Svetlov in branch 'default': Merge issue #14570: Document json sort_keys parameter properly. http://hg.python.org/cpython/rev/27ce005372a5 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14570> _______________________________________ From report at bugs.python.org Sun Oct 28 13:15:10 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 28 Oct 2012 12:15:10 +0000 Subject: [issue14570] Document json "sort_keys" parameter properly In-Reply-To: <1334284947.71.0.88941407788.issue14570@psf.upfronthosting.co.za> Message-ID: <1351426510.0.0.957899666848.issue14570@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Thanks, Chris! I have pushed the patch for 3.2-3.4 It cannot be applied to 2.7, please make separate patch for this version. ---------- nosy: +asvetlov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14570> _______________________________________ From report at bugs.python.org Sun Oct 28 13:17:54 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 28 Oct 2012 12:17:54 +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: <1351426674.3.0.917035422371.issue9742@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks, Stefan. Closing. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9742> _______________________________________ From report at bugs.python.org Sun Oct 28 13:18:05 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 28 Oct 2012 12:18:05 +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: <1351426685.1.0.923156620518.issue16298@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Please publish patch for the issue. ---------- nosy: +asvetlov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16298> _______________________________________ From report at bugs.python.org Sun Oct 28 13:20:39 2012 From: report at bugs.python.org (Trent Nelson) Date: Sun, 28 Oct 2012 12:20:39 +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: <1351426839.61.0.0233029605665.issue9742@psf.upfronthosting.co.za> Trent Nelson added the comment: Snakebite's got a Solaris 9 SPARC instance up and running. It's available via the s9 alias. Regarding EOL, this indicates October 2014 for 9: http://en.wikipedia.org/wiki/Solaris_(operating_system)#Version_history If it's as simple as suggested, I don't mind taking ownership of this. I'm going to run into it anyway as soon as I set up a Solaris 9 slave. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9742> _______________________________________ From report at bugs.python.org Sun Oct 28 13:20:53 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 28 Oct 2012 12:20:53 +0000 Subject: [issue16348] Decimal.remainder_near documentation incorrect. Message-ID: <1351426853.23.0.197083736305.issue16348@psf.upfronthosting.co.za> New submission from Mark Dickinson: The documentation for Decimal.remainder_near is incorrect. It states: "If both are equally close, the one chosen will have the same sign as self." That's incorrect: instead, the chosen remainder has the property that it makes the corresponding quotient even rather than odd. E.g., >>> Decimal(25).remainder_near(Decimal(10)) Decimal('5') >>> Decimal(35).remainder_near(Decimal(10)) Decimal('-5') ---------- assignee: docs at python components: Documentation messages: 174039 nosy: docs at python, mark.dickinson priority: normal severity: normal stage: needs patch status: open title: Decimal.remainder_near documentation incorrect. versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16348> _______________________________________ From report at bugs.python.org Sun Oct 28 13:29:39 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 28 Oct 2012 12:29:39 +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: <1351427379.29.0.861120611524.issue16308@psf.upfronthosting.co.za> Changes by Andrew Svetlov <andrew.svetlov at gmail.com>: ---------- nosy: +asvetlov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16308> _______________________________________ From report at bugs.python.org Sun Oct 28 13:30:07 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 28 Oct 2012 12:30:07 +0000 Subject: [issue16310] zipfile: allow surrogates in filenames In-Reply-To: <1351082025.34.0.287428579283.issue16310@psf.upfronthosting.co.za> Message-ID: <1351427407.79.0.349019908652.issue16310@psf.upfronthosting.co.za> Changes by Andrew Svetlov <andrew.svetlov at gmail.com>: ---------- nosy: +asvetlov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16310> _______________________________________ From report at bugs.python.org Sun Oct 28 13:42:43 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Oct 2012 12:42:43 +0000 Subject: [issue16340] Decoding error due to byte-compiling venv scripts at install time In-Reply-To: <1351363368.32.0.193110558396.issue16340@psf.upfronthosting.co.za> Message-ID: <3XqJW71pcJzMkD@mail.python.org> Roundup Robot added the comment: New changeset adefc83c1128 by Vinay Sajip in branch '3.3': Closes #16340: Handle exception while copying script to venv. http://hg.python.org/cpython/rev/adefc83c1128 New changeset fb969187ecc2 by Vinay Sajip in branch 'default': Closes #16340: Merged fix from 3.3. http://hg.python.org/cpython/rev/fb969187ecc2 ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16340> _______________________________________ From report at bugs.python.org Sun Oct 28 13:43:23 2012 From: report at bugs.python.org (Chris Rebert) Date: Sun, 28 Oct 2012 12:43:23 +0000 Subject: [issue14570] Document json "sort_keys" parameter properly In-Reply-To: <1334284947.71.0.88941407788.issue14570@psf.upfronthosting.co.za> Message-ID: <1351428203.28.0.0521321467844.issue14570@psf.upfronthosting.co.za> Chris Rebert added the comment: Patch for 2.7. This assumes that changing the parameter notation is permissible. ---------- Added file: http://bugs.python.org/file27765/issue14570-2.7.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14570> _______________________________________ From report at bugs.python.org Sun Oct 28 13:43:42 2012 From: report at bugs.python.org (Thomas Kluyver) Date: Sun, 28 Oct 2012 12:43:42 +0000 Subject: [issue16349] Document whether it's safe to use bytes for struct format string Message-ID: <1351428222.6.0.656645524198.issue16349@psf.upfronthosting.co.za> New submission from Thomas Kluyver: At least in CPython, format strings can be given as bytes, as an alternative to str. E.g. >>> struct.unpack(b'>hhl', b'\x00\x01\x00\x02\x00\x00\x00\x03') (1, 2, 3) Looking at the source code [1], this appears to be consciously accounted for. But it doesn't seem to be mentioned in the documentation. I think the docs should either say it's a possibility, or warn that it's an implementation detail. [1] http://hg.python.org/cpython/file/cde4b66699fe/Modules/_struct.c#l1340 ---------- components: Library (Lib) messages: 174042 nosy: takluyver priority: normal severity: normal status: open title: Document whether it's safe to use bytes for struct format string _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16349> _______________________________________ From report at bugs.python.org Sun Oct 28 13:49:07 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 28 Oct 2012 12:49:07 +0000 Subject: [issue16348] Decimal.remainder_near documentation incorrect. In-Reply-To: <1351426853.23.0.197083736305.issue16348@psf.upfronthosting.co.za> Message-ID: <1351428547.67.0.97307008184.issue16348@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a doc patch. ---------- keywords: +patch Added file: http://bugs.python.org/file27766/issue16348.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16348> _______________________________________ From report at bugs.python.org Sun Oct 28 13:52:51 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 28 Oct 2012 12:52:51 +0000 Subject: [issue9742] Python 2.7: math module fails to build on Solaris 9 In-Reply-To: <1351426839.61.0.0233029605665.issue9742@psf.upfronthosting.co.za> Message-ID: <20121028125252.GA23007@sleipnir.bytereef.org> Stefan Krah added the comment: Right, they distinguish between EOL and "Extended Support Phase": http://www.oracle.com/technetwork/server-storage/solaris10/overview/general-137378.html ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9742> _______________________________________ From report at bugs.python.org Sun Oct 28 13:59:00 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Oct 2012 12:59:00 +0000 Subject: [issue14570] Document json "sort_keys" parameter properly In-Reply-To: <1334284947.71.0.88941407788.issue14570@psf.upfronthosting.co.za> Message-ID: <3XqJsw0wXTzPXf@mail.python.org> Roundup Robot added the comment: New changeset 7784008e9ade by Andrew Svetlov in branch '2.7': Issue #14570: Document json sort_keys parameter properly. http://hg.python.org/cpython/rev/7784008e9ade ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14570> _______________________________________ From report at bugs.python.org Sun Oct 28 13:59:51 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 28 Oct 2012 12:59:51 +0000 Subject: [issue14570] Document json "sort_keys" parameter properly In-Reply-To: <1334284947.71.0.88941407788.issue14570@psf.upfronthosting.co.za> Message-ID: <1351429191.8.0.427583500274.issue14570@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed, thanks again! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14570> _______________________________________ From report at bugs.python.org Sun Oct 28 14:00:36 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Oct 2012 13:00:36 +0000 Subject: [issue1492704] distinct error type if shutil.copyfile() fails because of src and dst are the same file Message-ID: <3XqJvl33dXzRG2@mail.python.org> Roundup Robot added the comment: New changeset e59e274551e0 by Hynek Schlawack in branch 'default': #1492704: Ensure and document backward compatibility of the change http://hg.python.org/cpython/rev/e59e274551e0 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1492704> _______________________________________ From report at bugs.python.org Sun Oct 28 14:39:31 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 28 Oct 2012 13:39:31 +0000 Subject: [issue16309] "PYTHONPATH=" different from no PYTHONPATH at all In-Reply-To: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za> Message-ID: <1351431571.83.0.694783634094.issue16309@psf.upfronthosting.co.za> Changes by Andrew Svetlov <andrew.svetlov at gmail.com>: ---------- nosy: +asvetlov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16309> _______________________________________ From report at bugs.python.org Sun Oct 28 14:42:03 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 28 Oct 2012 13:42:03 +0000 Subject: [issue16309] "PYTHONPATH=" different from no PYTHONPATH at all In-Reply-To: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za> Message-ID: <1351431723.59.0.933760531405.issue16309@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I would to see some unittest if possible. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16309> _______________________________________ From report at bugs.python.org Sun Oct 28 14:53:04 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Oct 2012 13:53:04 +0000 Subject: [issue16316] Support xz compression in mimetypes module In-Reply-To: <1351114845.07.0.378323444057.issue16316@psf.upfronthosting.co.za> Message-ID: <3XqL4H6cHkzR9J@mail.python.org> Roundup Robot added the comment: New changeset a3ba5fe9bfd3 by Nadeem Vawda in branch 'default': Issue #16316: mimetypes now recognizes the .xz and .txz (.tar.xz) extensions. http://hg.python.org/cpython/rev/a3ba5fe9bfd3 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16316> _______________________________________ From report at bugs.python.org Sun Oct 28 14:53:37 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Sun, 28 Oct 2012 13:53:37 +0000 Subject: [issue16316] Support xz compression in mimetypes module In-Reply-To: <1351114845.07.0.378323444057.issue16316@psf.upfronthosting.co.za> Message-ID: <1351432417.28.0.964992159039.issue16316@psf.upfronthosting.co.za> Changes by Nadeem Vawda <nadeem.vawda at gmail.com>: ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16316> _______________________________________ From report at bugs.python.org Sun Oct 28 15:42:12 2012 From: report at bugs.python.org (Andy Salnikov) Date: Sun, 28 Oct 2012 14:42:12 +0000 Subject: [issue16326] distutils build_ext fails to set library_dirs in 2.7.2 on Linux In-Reply-To: <1351194264.28.0.869819451271.issue16326@psf.upfronthosting.co.za> Message-ID: <1351435332.2.0.830686480458.issue16326@psf.upfronthosting.co.za> Andy Salnikov added the comment: I never submitted any patch to Python, but unless somebody more experienced wants to contribute I can try. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16326> _______________________________________ From report at bugs.python.org Sun Oct 28 15:51:45 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 28 Oct 2012 14:51:45 +0000 Subject: [issue16342] setup.py not compiling with NDEBUG in non-debug builds In-Reply-To: <1351391539.96.0.993483572486.issue16342@psf.upfronthosting.co.za> Message-ID: <1351435905.29.0.967617951561.issue16342@psf.upfronthosting.co.za> Brett Cannon added the comment: Just to double-check I didn't screw up, I ran ``make distclean; ./configure; make -j8`` and the problem persists. It is *only* files compiled through setup.py and not by the Makefile. I do not have OPT set, but I do have CFLAGS defined. But even if I explicitly unset CFLAGS, OPT,CPPFLAGS, LDFLAGS, and use a different shell the problem persists. Something compiled by the Makefile: /Users/bcannon/Developer/bin/clang -c -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -I /Users/bcannon/Developer/include -I/Users/bcannon/Developer/Cellar/readline/6.2.2/include -I /Users/bcannon/Developer/include -I/Users/bcannon/Developer/Cellar/readline/6.2.2/include -DPy_BUILD_CORE -o Python/frozen.o Python/frozen.c Something compiled by setup.py: /Users/bcannon/Developer/bin/clang -Wno-unused-result -g -O0 -Wall -Wstrict-prototypes -Wno-unused-value -Wno-empty-body -Qunused-arguments -Wno-unused-value -Wno-empty-body -Qunused-arguments -I./Include -I. -I/Users/bcannon/Developer/include -I/Users/bcannon/Developer/Cellar/readline/6.2.2/include -I/Users/bcannon/Developer/repo/cpython/py3.3/Include -I/Users/bcannon/Developer/repo/cpython/py3.3 -c /Users/bcannon/Developer/repo/cpython/py3.3/Modules/sha512module.c -o build/temp.macosx-10.8-x86_64-3.3/Users/bcannon/Developer/repo/cpython/py3.3/Modules/sha512module.o /Users/bcannon/Developer/repo/cpython/py3.3/Modules/sha512module.c:535:12: warning: implicit declaration of function '_PyUnicode_CheckConsistency' is invalid in C99 [-Wimplicit-function-declaration] assert(_PyUnicode_CheckConsistency(retval, 1)); ^ /usr/include/assert.h:93:25: note: expanded from macro 'assert' (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0) ^ 1 warning generated. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16342> _______________________________________ From report at bugs.python.org Sun Oct 28 16:21:06 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 28 Oct 2012 15:21:06 +0000 Subject: [issue16342] setup.py not compiling with NDEBUG in non-debug builds In-Reply-To: <1351391539.96.0.993483572486.issue16342@psf.upfronthosting.co.za> Message-ID: <1351437666.9.0.766152553155.issue16342@psf.upfronthosting.co.za> Brett Cannon added the comment: I managed to fix it, but I did such a large swath of fixes that I need a little time to narrow down what did it. Report back later. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16342> _______________________________________ From report at bugs.python.org Sun Oct 28 16:49:12 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Oct 2012 15:49:12 +0000 Subject: [issue16342] setup.py not compiling with NDEBUG in non-debug builds In-Reply-To: <1351391539.96.0.993483572486.issue16342@psf.upfronthosting.co.za> Message-ID: <3XqNfJ2LjJzNFG@mail.python.org> Roundup Robot added the comment: New changeset a2b7a3e1ce66 by Brett Cannon in branch '3.3': Issue #16342: Lib/_sysconfigdata.py is no longer put into Lib, so http://hg.python.org/cpython/rev/a2b7a3e1ce66 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16342> _______________________________________ From report at bugs.python.org Sun Oct 28 16:50:27 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 28 Oct 2012 15:50:27 +0000 Subject: [issue16342] setup.py not compiling with NDEBUG in non-debug builds In-Reply-To: <1351391539.96.0.993483572486.issue16342@psf.upfronthosting.co.za> Message-ID: <1351439427.44.0.694503651589.issue16342@psf.upfronthosting.co.za> Brett Cannon added the comment: Well that was extremely frustrating to find out. Turns out a copy of Lib/_sysconfigdata.py was lingering in my checkout and .hgignore was hiding that fact from me. Fixed .hgignore, deleted the wayward file, and everything is now fine. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16342> _______________________________________ From report at bugs.python.org Sun Oct 28 17:14:16 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 28 Oct 2012 16:14:16 +0000 Subject: [issue16329] mimetypes does not support webm type In-Reply-To: <1351258498.52.0.166970519729.issue16329@psf.upfronthosting.co.za> Message-ID: <1351440856.44.0.703084779679.issue16329@psf.upfronthosting.co.za> R. David Murray added the comment: Interesting. So we have two choices: leave it to the platform mime types file to define because it is not even on track to be an official IANA standard, or include it with a comment that it is a de-facto standard. The question, I guess, is how fluid the definition is likely to be. It doesn't seem like the filetype mapping for the existing definitions is going to change, and since we don't (currently) have content-detection of any sort, the impact of a change in the definitions to users of our code seems minimal. So I guess I'd be OK with adding it as a de-facto standard, though I'm not entirely comfortable with it. But that would represent a change in policy, so others may want to weigh in. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16329> _______________________________________ From report at bugs.python.org Sun Oct 28 17:25:19 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Sun, 28 Oct 2012 16:25:19 +0000 Subject: [issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data Message-ID: <1351441519.18.0.51487757055.issue16350@psf.upfronthosting.co.za> New submission from Nadeem Vawda: >From issue 5210: amaury.forgeotdarc wrote: > Hm, I tried a modified version of your first test, and I found another > problem with the current zlib library; > starting with the input: > x = x1 + x2 + HAMLET_SCENE # both compressed and uncompressed data > > The following scenario is OK: > dco.decompress(x) # returns HAMLET_SCENE > dco.unused_data # returns HAMLET_SCENE > > But this one: > for c in x: > dco.decompress(x) # will return HAMLET_SCENE, in several pieces > dco.unused_data # only one character, the last of (c in x)! > > This is a bug IMO: unused_data should accumulate all the extra uncompressed > data. Ideally, I would prefer to raise an EOFError if decompress() is called after end-of-stream is reached (for consistency with BZ2Decompressor). However, accumulating the data in unused_data is closer to being backward- compatible, so it's probably the better approach to take. ---------- components: Library (Lib) files: zlib_unused_data_test.py messages: 174056 nosy: amaury.forgeotdarc, nadeem.vawda priority: normal severity: normal stage: needs patch status: open title: zlib.Decompress.decompress() after EOF discards existing value of unused_data type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27767/zlib_unused_data_test.py _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16350> _______________________________________ From report at bugs.python.org Sun Oct 28 17:26:20 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Sun, 28 Oct 2012 16:26:20 +0000 Subject: [issue5210] zlib does not indicate end of compressed stream properly In-Reply-To: <1234295180.57.0.273384677161.issue5210@psf.upfronthosting.co.za> Message-ID: <1351441580.81.0.0706519828562.issue5210@psf.upfronthosting.co.za> Nadeem Vawda added the comment: This bug (zlib not providing a way to detect end-of-stream) has already been fixed - see issue 12646. I've opened issue 16350 for the unused_data problem. ---------- resolution: -> out of date stage: test needed -> committed/rejected status: open -> closed superseder: -> zlib.Decompress.decompress/flush do not raise any exceptions when given truncated input streams _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5210> _______________________________________ From report at bugs.python.org Sun Oct 28 18:13:52 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Oct 2012 17:13:52 +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: <1351444432.81.0.267181641792.issue16350@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, accumulating the data will be backward-compatible. But what if add a special flag for zlib.decompress, which makes bz2 and lzma compatible decoder? I.e.: 1) unconsumed_tail is always empty (the unconsumed data accumulated in internal buffer, no need manually add it to next chunk of data). Or even non-existent. 2) EOFError raised if decompress() is called after end-of-stream is reached. Of course, it is a new feature. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16350> _______________________________________ From report at bugs.python.org Sun Oct 28 18:29:12 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Sun, 28 Oct 2012 17:29: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: <1351445352.78.0.373632816843.issue16350@psf.upfronthosting.co.za> Nadeem Vawda added the comment: Interesting idea, but I'm not sure it would be worth the effort. It would make the code and API more complicated, so it wouldn't really help users, and would be an added maintenance burden. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16350> _______________________________________ From report at bugs.python.org Sun Oct 28 18:30:20 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 28 Oct 2012 17:30:20 +0000 Subject: [issue16351] Add a function to get GC statistics Message-ID: <1351445420.88.0.605881847233.issue16351@psf.upfronthosting.co.za> New submission from Antoine Pitrou: This patch adds a function named gc.get_stats() which returns a list of dictionaries containing per-generation statistics: >>> import pprint, gc >>> pprint.pprint(gc.get_stats()) [{'collected': 0, 'collections': 12, 'uncollectable': 0}, {'collected': 0, 'collections': 1, 'uncollectable': 0}, {'collected': 0, 'collections': 0, 'uncollectable': 0}] ---------- components: Library (Lib) files: gc_get_stats.patch keywords: patch messages: 174060 nosy: benjamin.peterson, gregory.p.smith, pitrou priority: low severity: normal stage: patch review status: open title: Add a function to get GC statistics type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27768/gc_get_stats.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16351> _______________________________________ From report at bugs.python.org Sun Oct 28 18:42:25 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 28 Oct 2012 17:42:25 +0000 Subject: [issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input In-Reply-To: <1236786647.39.0.745171492116.issue5476@psf.upfronthosting.co.za> Message-ID: <1351446145.92.0.205584502973.issue5476@psf.upfronthosting.co.za> Mark Dickinson added the comment: I created http://projects.scipy.org/numpy/ticket/2235 to track this. Closing this issue. ---------- status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5476> _______________________________________ From report at bugs.python.org Sun Oct 28 18:42:43 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 28 Oct 2012 17:42:43 +0000 Subject: [issue16351] Add a function to get GC statistics In-Reply-To: <1351445420.88.0.605881847233.issue16351@psf.upfronthosting.co.za> Message-ID: <1351446163.66.0.744901383774.issue16351@psf.upfronthosting.co.za> Christian Heimes added the comment: What are the possible performance implications of the statistics? ---------- nosy: +christian.heimes _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16351> _______________________________________ From report at bugs.python.org Sun Oct 28 18:44:44 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 28 Oct 2012 17:44:44 +0000 Subject: [issue16351] Add a function to get GC statistics In-Reply-To: <1351445420.88.0.605881847233.issue16351@psf.upfronthosting.co.za> Message-ID: <1351446284.47.0.85199469303.issue16351@psf.upfronthosting.co.za> Antoine Pitrou added the comment: You mean negative implications? None :-) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16351> _______________________________________ From report at bugs.python.org Sun Oct 28 19:03:11 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Oct 2012 18:03:11 +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: <1351447391.56.0.272701963031.issue16350@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch for your suggestion. ---------- keywords: +patch Added file: http://bugs.python.org/file27769/zlib_accum_unused_data.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16350> _______________________________________ From report at bugs.python.org Sun Oct 28 19:03:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Oct 2012 18:03:23 +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: <1351447403.15.0.724503177741.issue16350@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: needs patch -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16350> _______________________________________ From report at bugs.python.org Sun Oct 28 19:10:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Oct 2012 18:10: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: <1351447838.67.0.342536403251.issue16350@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Actually the current code contains a bug. If memory allocation for unused_data fails then unused_data will become NULL and using this properties can crash. The patch fixes this. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16350> _______________________________________ From report at bugs.python.org Sun Oct 28 19:16:14 2012 From: report at bugs.python.org (Berker Peksag) Date: Sun, 28 Oct 2012 18:16:14 +0000 Subject: [issue16323] Wrong C API documentation for locale encoding In-Reply-To: <1351173455.0.0.737976146006.issue16323@psf.upfronthosting.co.za> Message-ID: <1351448174.11.0.52685803515.issue16323@psf.upfronthosting.co.za> Berker Peksag added the comment: > Hum, this is not correct. There are three valid values: > - NULL: strict > - "strict": strict > - "surrogateescape": use PEP 383 Thanks for the correction, Victor. Here's the updated patch. ---------- Added file: http://bugs.python.org/file27770/issue16323_v2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16323> _______________________________________ From report at bugs.python.org Sun Oct 28 19:18:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Oct 2012 18:18:07 +0000 Subject: [issue16351] Add a function to get GC statistics In-Reply-To: <1351445420.88.0.605881847233.issue16351@psf.upfronthosting.co.za> Message-ID: <1351448287.0.0.84805023433.issue16351@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Why dictionaries and not struct sequences? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16351> _______________________________________ From report at bugs.python.org Sun Oct 28 19:30:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Oct 2012 18:30:53 +0000 Subject: [issue16351] Add a function to get GC statistics In-Reply-To: <1351445420.88.0.605881847233.issue16351@psf.upfronthosting.co.za> Message-ID: <1351449053.97.0.170237624315.issue16351@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oh, I understand. GC callbacks receive a dict. For avoid confusion with gc.DEBUG_STATS and to conform with callbacks argument name, may be better to name this function as gc.get_infos([generation])? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16351> _______________________________________ From report at bugs.python.org Sun Oct 28 19:32:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Oct 2012 18:32:55 +0000 Subject: [issue16351] Add a function to get GC statistics In-Reply-To: <1351445420.88.0.605881847233.issue16351@psf.upfronthosting.co.za> Message-ID: <1351449175.59.0.0282593899255.issue16351@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I.e. gc.get_info([generation]). Returns the info for specified generation or total if the parameter omitted. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16351> _______________________________________ From report at bugs.python.org Sun Oct 28 19:39:28 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 28 Oct 2012 18:39:28 +0000 Subject: [issue16351] Add a function to get GC statistics In-Reply-To: <1351448287.0.0.84805023433.issue16351@psf.upfronthosting.co.za> Message-ID: <1351449550.3456.1.camel@localhost.localdomain> Antoine Pitrou added the comment: > Why dictionaries and not struct sequences? Because it's much simpler like that. > For avoid confusion with gc.DEBUG_STATS and to conform with callbacks > argument name, may be better to name this function as > gc.get_infos([generation])? Well, this is really about statistics, not general information. Furthermore, it is not related to the callbacks functionality. As for the generation parameter, I don't think it's useful: the result list is only 3 elements long. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16351> _______________________________________ From report at bugs.python.org Sun Oct 28 19:50:50 2012 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 28 Oct 2012 18:50:50 +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: <1351450250.81.0.09480434221.issue16312@psf.upfronthosting.co.za> Vinay Sajip added the comment: Is there any common use case other than logging? For example, logging could be covered by an additional command-line argument for unittest.main(), e.g. --logconfig /path/to/logging-config.json which would cause unittest.main() to load the JSON in the specified file (expected to be a suitable dict) and pass it to logging.config.dictConfig(). That would handle a perhaps not uncommon use case without the user having to write any code, but rather just provide a suitable logging configuration. ---------- nosy: +vinay.sajip _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16312> _______________________________________ From report at bugs.python.org Sun Oct 28 21:01:20 2012 From: report at bugs.python.org (Mariano Reingart) Date: Sun, 28 Oct 2012 20:01:20 +0000 Subject: [issue16343] PyUnicode_FromFormatV() doesn't support utf-8 text In-Reply-To: <1351397171.27.0.117750740634.issue16343@psf.upfronthosting.co.za> Message-ID: <1351454480.85.0.682485995521.issue16343@psf.upfronthosting.co.za> Mariano Reingart added the comment: I thought #9769 was closed (in fact, that patch was already applied). Now, PyUnicode_FromFormatV() doesn't handle non-ascii text at all. Maybe I misread the part telling to open a new issue in the comments, sorry for that. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16343> _______________________________________ From report at bugs.python.org Sun Oct 28 21:14:48 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 28 Oct 2012 20:14:48 +0000 Subject: [issue16343] PyUnicode_FromFormatV() doesn't support utf-8 text In-Reply-To: <1351397171.27.0.117750740634.issue16343@psf.upfronthosting.co.za> Message-ID: <1351455288.06.0.604739387912.issue16343@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Issue 9769 is still open. It looks like there was some disagreement in the comments between Alexander and Victor as to whether a new issue should be created (since Victor had a different idea when first opening the issue), but it looks like Victor deferred to Alexander in his final comment. I will close this issue as a duplicate, and if you could repost your patch on the other issue, that would be great. The discussion there is relevant to your patch. ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> PyUnicode_FromFormatV() doesn't handle non-ascii text correctly _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16343> _______________________________________ From report at bugs.python.org Sun Oct 28 21:18:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 28 Oct 2012 20:18:19 +0000 Subject: [issue9769] PyUnicode_FromFormatV() doesn't handle non-ascii text correctly In-Reply-To: <1283557981.28.0.85027629308.issue9769@psf.upfronthosting.co.za> Message-ID: <1351455499.42.0.975021722074.issue9769@psf.upfronthosting.co.za> Changes by Chris Jerdonek <chris.jerdonek at gmail.com>: ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9769> _______________________________________ From report at bugs.python.org Sun Oct 28 21:26:13 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 28 Oct 2012 20:26:13 +0000 Subject: [issue1492704] distinct error type if shutil.copyfile() fails because of src and dst are the same file Message-ID: <1351455973.71.0.8259704436.issue1492704@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thank you! ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1492704> _______________________________________ From report at bugs.python.org Sun Oct 28 21:28:19 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 28 Oct 2012 20:28:19 +0000 Subject: [issue16341] In examples, "except:" should use new syntax In-Reply-To: <1351389520.62.0.621289823852.issue16341@psf.upfronthosting.co.za> Message-ID: <1351456099.02.0.779866288295.issue16341@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?m of two minds about this. On one hand this syntax avoids silent bugs and is compatible with 3.x, on the other hand if people use the 2.7 docs and use Python 2.4 or 2.5 the examples won?t work. Raymond, what?s your opinion? ---------- nosy: +eric.araujo, rhettinger _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16341> _______________________________________ From report at bugs.python.org Sun Oct 28 21:32:17 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 28 Oct 2012 20:32:17 +0000 Subject: [issue16239] PEP8 arithmetic operator examples In-Reply-To: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> Message-ID: <1351456337.72.0.0983051119572.issue16239@psf.upfronthosting.co.za> ?ric Araujo added the comment: One idiom is not covered by the examples: value = seq[something+1] IMO it feels weird to put spaces in an index/slice notation. ---------- nosy: +eric.araujo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16239> _______________________________________ From report at bugs.python.org Sun Oct 28 21:38:24 2012 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 28 Oct 2012 20:38:24 +0000 Subject: [issue16239] PEP8 arithmetic operator examples In-Reply-To: <1350305738.94.0.323061453439.issue16239@psf.upfronthosting.co.za> Message-ID: <1351456704.11.0.3759938747.issue16239@psf.upfronthosting.co.za> Guido van Rossum added the comment: That example doesn't feel strong enough to me to include in the style guide. I am fine with leaving that up to the individual contributor to decide. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16239> _______________________________________ From report at bugs.python.org Sun Oct 28 21:44:35 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 28 Oct 2012 20:44:35 +0000 Subject: [issue16341] In examples, "except:" should use new syntax In-Reply-To: <1351389520.62.0.621289823852.issue16341@psf.upfronthosting.co.za> Message-ID: <1351457075.72.0.288531809899.issue16341@psf.upfronthosting.co.za> Ezio Melotti added the comment: The patch LGTM, and there are only 21 changes. ---------- nosy: +ezio.melotti type: -> enhancement _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16341> _______________________________________ From report at bugs.python.org Sun Oct 28 21:55:53 2012 From: report at bugs.python.org (Catalin Iacob) Date: Sun, 28 Oct 2012 20:55:53 +0000 Subject: [issue8745] zipimport is a bit slow In-Reply-To: <1274162892.24.0.612432614461.issue8745@psf.upfronthosting.co.za> Message-ID: <1351457753.96.0.884128452325.issue8745@psf.upfronthosting.co.za> Changes by Catalin Iacob <iacobcatalin at gmail.com>: ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8745> _______________________________________ From report at bugs.python.org Sun Oct 28 22:07:41 2012 From: report at bugs.python.org (Piotr Dobrogost) Date: Sun, 28 Oct 2012 21:07:41 +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: <1351458461.43.0.697207859703.issue16312@psf.upfronthosting.co.za> Piotr Dobrogost added the comment: @Vinay I don't see other use cases but maybe guys behind py.test, where there is such a feature could come up with other use cases. The solution with passing config dict in a new command line parameter seems to be enough as long as logging is concerned. However it's not as versatile as custom initialization code of course. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16312> _______________________________________ From report at bugs.python.org Sun Oct 28 22:22:44 2012 From: report at bugs.python.org (Mariano Reingart) Date: Sun, 28 Oct 2012 21:22:44 +0000 Subject: [issue9769] PyUnicode_FromFormatV() doesn't handle non-ascii text correctly In-Reply-To: <1283557981.28.0.85027629308.issue9769@psf.upfronthosting.co.za> Message-ID: <1351459364.0.0.828109783108.issue9769@psf.upfronthosting.co.za> Mariano Reingart added the comment: (moved from issue #16343) Working in an internationalization proposal <http://python.org.ar/pyar/TracebackInternationalizationProposal> (issue #16344) I've stopped at this problem (#9769) where multi byte encodings (like utf-8) is not supported by PyUnicode_FromFormatV() Beside my proposal, I think utf-8 should be supported for consistency with the other unicode functions, like PyUnicode_FromString() or even unicode_fromformat_arg() Attached is a patch that: - enhanced the iterator to detect multibyte sequences, with sanity checks about start & continuation bytes - replaced unicode_write_cstr with PyUnicode_DecodeUTF8Stateful - tests Hope it helps, this is my first patch for cpython and my C skills are a bit rusty, so excuse me if there is any newbie glitch ---------- nosy: +reingart Added file: http://bugs.python.org/file27771/pyunicode_fromformat_utf8.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9769> _______________________________________ From report at bugs.python.org Sun Oct 28 22:46:56 2012 From: report at bugs.python.org (Mariano Reingart) Date: Sun, 28 Oct 2012 21:46:56 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351460816.08.0.174276262902.issue16344@psf.upfronthosting.co.za> Mariano Reingart added the comment: "serious" developers? sorry but I think that is a unfortunate phrase that goes against the Python Diversity Statement What about young pupil? What about non-programmers (i.e. accountants)? In some places (like my country, public schools), English is not teach formally until the University. And I don't think non-English speakers are just a subset of users. Come on, English is not even the top native tongue (that is Chinese Mandarin). English can be one of the most spoken languages, but even that metric only reach 1/7th of the total world population. Other languages like Spanish or Portuguese are also rising. http://en.wikipedia.org/wiki/Language#Linguistic_diversity BTW, as the draft says, Python is the offender here, as other error messages are already translated (including the OS ones, even inside Python!): C:\Python32>python Python 3.2.2 (default, Sep 4 2011, 09:51:08) [MSC v.1500 32 bit (Intel)] on win 32 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.listdir("J:\\") Traceback (most recent call last): File "<stdin>", line 1, in <module> WindowsError: [Error 3] El sistema no puede encontrar la ruta especificada: 'J:\\*.*' PostgreSQL already translates error messages too: C:\Program Files\PostgreSQL\9.0\bin>psql psql (9.0.3) Digite ?help? para obtener ayuda. Mariano=> SELECT * FROM nowhere; ERROR: no existe la relaci??n ??nowhere?? L?NEA 1: SELECT * FROM nowhere; ^ And Bash too: reingart at desktop:~/cpython$ ls /nowhere ls: no se puede acceder a /nowhere: No existe el archivo o el directorio Of course, there is no need to translate keywords or libraries (as SQL sentences and bash command are not translated, just messages are), I don't see why this could cause confusion, instead that, I think python would become more consistent with other tools and thus more easy to use. The mechanism to restore the language is the common one (used by almost every other application that support i18n): >>> locale.setlocale(locale.LC_MESSAGES, "C") It should be not difficult for "serious" programmers to handle that :-) If that is a concern, it could be implemented a command line parameter, a environment variable or a shortcut in locale module. Anyway, people will not necessarily be faced by default with the localized version, an if for example, a teacher has to jump to an student machine, surely it could use it as messages will be probably in the spoken language of the country (BTW, probably most of the operating system components will be localized, not only Python) For advanced users or logging, it could be disabled at all! Finally, you're correct about that translation is not easy job, and this proposal (traceback internationalization) is just the tip of the iceberg (even more work will be needed in other aspects to get a full localization). If PostgreSQL and other tools could do that, why Python could not? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Sun Oct 28 23:20:10 2012 From: report at bugs.python.org (Michael Foord) Date: Sun, 28 Oct 2012 22:20:10 +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: <1351462810.68.0.130307185817.issue16312@psf.upfronthosting.co.za> Michael Foord added the comment: I always solve the logging problem with test-development-production configuratins and ensuring that running tests imports the logging setup. I've never wanted / needed to configure logging from the command line. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16312> _______________________________________ From report at bugs.python.org Sun Oct 28 23:36:28 2012 From: report at bugs.python.org (Martin Panter) Date: Sun, 28 Oct 2012 22:36:28 +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: <1351463788.74.0.0285916359946.issue16349@psf.upfronthosting.co.za> Martin Panter added the comment: Also it would be nice to clarify if struct.Struct.format is meant to be a byte string. Reading the documentation and examples I expected a character string. It was an issue for me when embedding one structure within another: HSF_VOL_DESC = Struct("< B 5s B") # Python 3.2.3's "Struct.format" is actually a byte string NSR_DESC = Struct(HSF_VOL_DESC.format.decode() + "B") ---------- nosy: +vadmium _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16349> _______________________________________ From report at bugs.python.org Sun Oct 28 23:39:50 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 28 Oct 2012 22:39:50 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351463990.55.0.900686150766.issue16344@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think the PEP should be proposed on python-dev or python-ideas. Also, it's probably better if the PEP is encoded in utf-8, not latin-1. ---------- nosy: +pitrou _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Sun Oct 28 23:50:49 2012 From: report at bugs.python.org (Mark Gius) Date: Sun, 28 Oct 2012 22:50:49 +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: <1351464649.58.0.0668670997444.issue16327@psf.upfronthosting.co.za> Mark Gius added the comment: Doesn't exhibit when execve fails, because by the time execve has been reached we've closed the pipes that we're supposed to close on the parent process, and the pipes that are meant to remain open on the parent process get caught by existing cleanup code. It's unfortunately got to fail somewhere in the vicinity of the fork to fake it using the actual _execute_child. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Mon Oct 29 00:18:19 2012 From: report at bugs.python.org (James Lu) Date: Sun, 28 Oct 2012 23:18:19 +0000 Subject: [issue16352] Error call Message-ID: <1351466299.78.0.336914696558.issue16352@psf.upfronthosting.co.za> New submission from James Lu: >>>x="y" >>>y=x >>>x=y >>>print x x >>>print y x It should raise a RuntimeError ---------- components: None messages: 174086 nosy: James.Lu priority: normal severity: normal status: open title: Error call type: performance versions: Python 2.6 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16352> _______________________________________ From report at bugs.python.org Mon Oct 29 00:19:47 2012 From: report at bugs.python.org (James Lu) Date: Sun, 28 Oct 2012 23:19:47 +0000 Subject: [issue16352] Error call In-Reply-To: <1351466299.78.0.336914696558.issue16352@psf.upfronthosting.co.za> Message-ID: <1351466387.13.0.882790268068.issue16352@psf.upfronthosting.co.za> Changes by James Lu <jamtlu at gmail.com>: ---------- versions: -Python 2.6 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16352> _______________________________________ From report at bugs.python.org Mon Oct 29 00:34:55 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 28 Oct 2012 23:34:55 +0000 Subject: [issue16352] Error call In-Reply-To: <1351466299.78.0.336914696558.issue16352@psf.upfronthosting.co.za> Message-ID: <1351467295.68.0.0581638859124.issue16352@psf.upfronthosting.co.za> R. David Murray added the comment: It should print 'y'. And it does for me. If you have questions about this, you might want to try the python-tutors list. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed type: performance -> _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16352> _______________________________________ From report at bugs.python.org Mon Oct 29 00:42:51 2012 From: report at bugs.python.org (James Lu) Date: Sun, 28 Oct 2012 23:42:51 +0000 Subject: [issue16352] Error call In-Reply-To: <1351466299.78.0.336914696558.issue16352@psf.upfronthosting.co.za> Message-ID: <1351467771.34.0.382152848353.issue16352@psf.upfronthosting.co.za> James Lu added the comment: srry ---------- resolution: invalid -> rejected _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16352> _______________________________________ From report at bugs.python.org Mon Oct 29 00:57:44 2012 From: report at bugs.python.org (Berker Peksag) Date: Sun, 28 Oct 2012 23:57:44 +0000 Subject: [issue15948] Unchecked return value of I/O functions In-Reply-To: <1347722947.26.0.499070360065.issue15948@psf.upfronthosting.co.za> Message-ID: <1351468664.84.0.281396427527.issue15948@psf.upfronthosting.co.za> Berker Peksag added the comment: There is a typo in the command: s/fwite/fwrite/. ./Objects/object.c: fwrite(PyBytes_AS_STRING(s), 1, ./Objects/object.c: fwrite(PyBytes_AS_STRING(t), 1, ./PC/bdist_wininst/install.c: fwrite(arc_data, exe_size, 1, fp); ./Python/marshal.c: fwrite(s, 1, n, p->fp); ---------- nosy: +berker.peksag _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15948> _______________________________________ From report at bugs.python.org Mon Oct 29 01:12:27 2012 From: report at bugs.python.org (Jeff McNeil) Date: Mon, 29 Oct 2012 00:12:27 +0000 Subject: [issue13403] Option for XMLPRC Server to support HTTPS In-Reply-To: <1321291767.37.0.486686259371.issue13403@psf.upfronthosting.co.za> Message-ID: <1351469547.71.0.646440432576.issue13403@psf.upfronthosting.co.za> Jeff McNeil added the comment: I've hacked this support in myself a few times with a simple socket wrap call in SimpleXMLRPCServer's __init__. I'd be happy to put a quick patch together if that's a viable approach. Is there any desire to support client authentication or advanced features like that? Or, are we simply looking for encryption? ---------- nosy: +mcjeff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13403> _______________________________________ From report at bugs.python.org Mon Oct 29 01:15:30 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 29 Oct 2012 00:15:30 +0000 Subject: [issue16352] Error call In-Reply-To: <1351466299.78.0.336914696558.issue16352@psf.upfronthosting.co.za> Message-ID: <1351469730.43.0.724550052635.issue16352@psf.upfronthosting.co.za> Changes by R. David Murray <rdmurray at bitdance.com>: ---------- resolution: rejected -> invalid _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16352> _______________________________________ From report at bugs.python.org Mon Oct 29 01:38:25 2012 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 29 Oct 2012 00:38:25 +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: <1351471105.29.0.0105942095916.issue16312@psf.upfronthosting.co.za> Vinay Sajip added the comment: @Michael: When unit testing one's own projects, I agree with you. But I think Piotr's use case is when you download some new library from PyPI or clone it from GitHub/BitBucket/etc., and you want to run tests on that code without changing any of it, as you're just exploring at this point. Now ideally you'd just be able to do e.g. python setup.py test --logconfig filename.json or, if it isn't set up to do that, at least look for a test folder with scripts that have 'if __name__ == "__main__": unittest.main()', which I can then run. In either of these cases, even if the library I'm testing uses logging, I can't readily make use of it to look at DEBUG messages, say, unless I write some code (not much code, I grant you). Of course, once you get to the point where you've decided to use that library in your project, you would integrate its logging setup with the logging setup of your own code, in your tests. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16312> _______________________________________ From report at bugs.python.org Mon Oct 29 02:09:20 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Oct 2012 01:09:20 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351472960.5.0.839484794547.issue16344@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am sympathetic with non-English speakers wanting a native-language translation. But I think the interpreter should *always* emit the standard message and that any translation should be an addition, not a replacement. This would maintain discoverablity and help people learn the English version, not hinder it. The real question to me is how deep in the interpreter such support should go. Third party shells can (and sometimes do) intercept tracebacks and reformat (and translate) as they wish. But there would be advantages and disadvanteges is adding the translation sooner. ---------- nosy: +terry.reedy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Mon Oct 29 02:19:20 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 29 Oct 2012 01:19:20 +0000 Subject: [issue16353] add function to os module for getting path to default shell Message-ID: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> New submission from Chris Jerdonek: This issue is to add a function to the os module for getting the path to the default shell (e.g. os.getdefaultshell()). In issue 16255, it was reported that on Android, the path to the default shell is "/system/bin/sh" rather than "/bin/sh" which it is on other Unix systems. Such a function in the os module would implement the necessary detection logic which could then be used, for example, by the subprocess module when invoking Popen() with shell=True (e.g. for issue 16255). ---------- components: Library (Lib) messages: 174093 nosy: chris.jerdonek priority: normal severity: normal status: open title: add function to os module for getting path to default shell type: enhancement versions: Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16353> _______________________________________ From report at bugs.python.org Mon Oct 29 02:27:47 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 29 Oct 2012 01:27:47 +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: <1351474067.67.0.76194863965.issue16255@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I created issue 16353 for adding a function to the os module for getting the path to the default shell. The current issue 16255 could be addressed in 3.4 by calling such a function from the subprocess module. For earlier versions (since enhancements are not allowed), the current issue could perhaps be addressed by backporting the logic in such a function directly into the subprocess module (i.e. without adding a new function to the os module). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16255> _______________________________________ From report at bugs.python.org Mon Oct 29 02:39:06 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 29 Oct 2012 01:39:06 +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: <1351474746.27.0.157372942868.issue16290@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Mark, for the sake of keeping a reference in this bug entry, could you possibly post the URL of the archived python-dev thread? Thanks. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16290> _______________________________________ From report at bugs.python.org Mon Oct 29 02:52:35 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 29 Oct 2012 01:52:35 +0000 Subject: [issue16351] Add a function to get GC statistics In-Reply-To: <1351445420.88.0.605881847233.issue16351@psf.upfronthosting.co.za> Message-ID: <1351475555.0.0.243492925175.issue16351@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16351> _______________________________________ From report at bugs.python.org Mon Oct 29 02:59:25 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 29 Oct 2012 01:59:25 +0000 Subject: [issue16326] distutils build_ext fails to set library_dirs in 2.7.2 on Linux In-Reply-To: <1351194264.28.0.869819451271.issue16326@psf.upfronthosting.co.za> Message-ID: <1351475965.81.0.0661811580896.issue16326@psf.upfronthosting.co.za> ?ric Araujo added the comment: Great! http://docs.python.org/devguide contains all the info needed to get the code and make a patch. If you apply your suggestion to the code and it fixes your build, I will commit it. A small unit test to check the new behavior of build_ext and avoid regressions will be needed, but it?s not always easy to write these tests, so depending on your time I will be able to provide guidance or write the test myself. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16326> _______________________________________ From report at bugs.python.org Mon Oct 29 03:08:34 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 29 Oct 2012 02:08:34 +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: <1351476514.14.0.0381229191023.issue16333@psf.upfronthosting.co.za> ?ric Araujo added the comment: I think the patch adds tests to a mixin class used to test the Python and the C code, so if it passes then no fix is needed in C. ---------- nosy: +eric.araujo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16333> _______________________________________ From report at bugs.python.org Mon Oct 29 03:08:51 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 29 Oct 2012 02:08:51 +0000 Subject: [issue16327] subprocess.Popen leaks file descriptors on os.fork() failure In-Reply-To: <1351464649.58.0.0668670997444.issue16327@psf.upfronthosting.co.za> Message-ID: <CAGE7PNJSZugXZFFFBRK9eUXs+XHVB-o58ditTeaBGf7904VTKQ@mail.gmail.com> Gregory P. Smith added the comment: Stubbing _execute_child out for a test is easiest. No need to craft ways to cause an actual fork failure. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Mon Oct 29 03:55:58 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 29 Oct 2012 02:55:58 +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: <1351479358.89.0.95729160923.issue16333@psf.upfronthosting.co.za> Ezio Melotti added the comment: It does, and the C accelerator doesn't seem to be used for this. The patch looks good to me, however: 1) it now strips spaces even when explicitly specified in the separator (this might be ok though -- I don't see why someone would need them); 2) I'm not sure if this can be considered a bug fix and applied to all branches or if it should go on 3.4 only; ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16333> _______________________________________ From report at bugs.python.org Mon Oct 29 04:16:47 2012 From: report at bugs.python.org (Zach Mathew) Date: Mon, 29 Oct 2012 03:16:47 +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: <1351480607.6.0.133078329903.issue16333@psf.upfronthosting.co.za> Zach Mathew added the comment: To Ezio's first point ... yes, I was wondering if trailing whitespace should be left alone in the case of an explicitly defined separator. However, this behavior seems a little odd to me as I don't see a use case for it (happy to change the patch if there are differing opinions on this). Keep in mind that the patch does retain the *leading* white space (for both default and explicit separators) - only trailing whitespace is removed prior to newlines. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16333> _______________________________________ From report at bugs.python.org Mon Oct 29 04:36:02 2012 From: report at bugs.python.org (George Peristerakis) Date: Mon, 29 Oct 2012 03:36:02 +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: <1351481762.49.0.241544459978.issue9674@psf.upfronthosting.co.za> George Peristerakis added the comment: Here's a patch to the problem. I refactored the code to work the same way on posix, nt, os2 environments. Plus a unit test for the posix environment that the bug was initially for. ---------- nosy: +George.Peristerakis Added file: http://bugs.python.org/file27772/issue9674.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9674> _______________________________________ From report at bugs.python.org Mon Oct 29 04:38:48 2012 From: report at bugs.python.org (Jeff McNeil) Date: Mon, 29 Oct 2012 03:38:48 +0000 Subject: [issue13403] Option for XMLPRC Server to support HTTPS In-Reply-To: <1321291767.37.0.486686259371.issue13403@psf.upfronthosting.co.za> Message-ID: <1351481928.91.0.746479426998.issue13403@psf.upfronthosting.co.za> Jeff McNeil added the comment: Attached... worked in the way I've done it in the past and updated documents. ---------- keywords: +patch Added file: http://bugs.python.org/file27773/ssl_xmlrpc_server.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13403> _______________________________________ From report at bugs.python.org Mon Oct 29 07:00:09 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Mon, 29 Oct 2012 06:00:09 +0000 Subject: [issue1492704] distinct error type if shutil.copyfile() fails because of src and dst are the same file In-Reply-To: <1351455973.71.0.8259704436.issue1492704@psf.upfronthosting.co.za> Message-ID: <97B87012-BBB8-4D58-BE42-990394FC3D0B@ox.cx> Hynek Schlawack added the comment: You're welcome. :) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1492704> _______________________________________ From report at bugs.python.org Mon Oct 29 07:10:10 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 29 Oct 2012 06:10: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: <1351491010.63.0.84869587562.issue16353@psf.upfronthosting.co.za> Changes by Chris Jerdonek <chris.jerdonek at gmail.com>: ---------- nosy: +asvetlov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16353> _______________________________________ From report at bugs.python.org Mon Oct 29 08:00:29 2012 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 29 Oct 2012 07:00:29 +0000 Subject: [issue8604] Adding an atomic FS write API In-Reply-To: <1272890639.26.0.821067455807.issue8604@psf.upfronthosting.co.za> Message-ID: <1351494029.97.0.207516444331.issue8604@psf.upfronthosting.co.za> Nick Coghlan added the comment: Since it may not be clear from the rest of the thread, the os.replace() cross-platform atomic renaming building block was added in 3.3 (in #8828, which Victor linked above) Another stdlib use case now also exists in importlib (see http://hg.python.org/cpython/file/3.3/Lib/importlib/_bootstrap.py#l121). However, due to bootstrapping issues, importlib would not be able to use a version that was provided in a module like shutil. ---------- nosy: +ncoghlan versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8604> _______________________________________ From report at bugs.python.org Mon Oct 29 09:05:33 2012 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Oct 2012 08:05:33 +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: <1351497933.98.0.568522853211.issue16290@psf.upfronthosting.co.za> Mark Dickinson added the comment: Jes?s: see the first message. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16290> _______________________________________ From report at bugs.python.org Mon Oct 29 10:36:54 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 29 Oct 2012 09:36:54 +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: <1351503414.21.0.473600690453.issue15650@psf.upfronthosting.co.za> Changes by Andrew Svetlov <andrew.svetlov at gmail.com>: Added file: http://bugs.python.org/file27774/Issue15650_v2.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15650> _______________________________________ From report at bugs.python.org Mon Oct 29 11:16:07 2012 From: report at bugs.python.org (Wichert Akkerman) Date: Mon, 29 Oct 2012 10:16:07 +0000 Subject: [issue16354] Remember python version choice on docs.python.org Message-ID: <1351505767.0.0.302833012175.issue16354@psf.upfronthosting.co.za> New submission from Wichert Akkerman: docs.python.org was recently change to redirect http://docs.python.org/ to http://docs.python.org/3/ , with an option to switch to documentation for a different version using both (why two ways?) a dropdown and links in the left column. Would it be possible to remember the selection and honour that in the docs.python.org redirect? That would remove the minor annoyance of always ending up at the Python 3 documentation and having to switch back to 2.7. ---------- assignee: docs at python components: Documentation messages: 174106 nosy: docs at python, wichert priority: normal severity: normal status: open title: Remember python version choice on docs.python.org _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16354> _______________________________________ From report at bugs.python.org Mon Oct 29 12:03:26 2012 From: report at bugs.python.org (Michael Foord) Date: Mon, 29 Oct 2012 11:03:26 +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: <1351508606.4.0.394105696397.issue16312@psf.upfronthosting.co.za> Michael Foord added the comment: Is this logging specific issue an actual problem or a theoretical problem? It's not a problem I've ever seen (myself), nor the one the issue was opened for. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16312> _______________________________________ From report at bugs.python.org Mon Oct 29 12:58:50 2012 From: report at bugs.python.org (Marco Buttu) Date: Mon, 29 Oct 2012 11:58:50 +0000 Subject: [issue16355] inspect.getcomments() does not work in the interactive shell Message-ID: <1351511930.82.0.59071323276.issue16355@psf.upfronthosting.co.za> New submission from Marco Buttu: The documentation for `inspect.getcomments()` says that it returns the "lines of comments immediately preceding an object's source code". It works fine for the comments that immediately preceded an object defined in a module: $ more foo.py import inspect # A dummy comment def foo(): pass print(inspect.getcomments(foo)) $ python3.3 foo.py # A dummy comment But it does not work if we define an object interactively: $ python3.3 Python 3.3.0 (default, Oct 9 2012, 18:20:32) [GCC 4.5.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import inspect >>> # A dummy comment ... def foo(): ... pass ... >>> inspect.getcomments(foo) >>> # A dummy comment ... >>> def foo(): ... pass ... >>> inspect.getcomments(foo) >>> ---------- components: Library (Lib) messages: 174108 nosy: marco.buttu priority: normal severity: normal status: open title: inspect.getcomments() does not work in the interactive shell type: behavior versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16355> _______________________________________ From report at bugs.python.org Mon Oct 29 13:11:33 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Oct 2012 12:11:33 +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: <1351512693.66.0.999890034907.issue16350@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: >From Nadeem Vawda's mail: > I wasn't suggesting that you try to resize the existing unused_data > object; I agree that this would be a bad idea. What I was thinking of > was something like this: > > size_t old_unused_size = PyBytes_GET_SIZE(self->unused_data); > size_t new_unused_size = old_unused_size + self->zst.avail_in; > PyObject *new_unused_data = PyBytes_FromStringAndSize(NULL, 0); > if (_PyBytes_Resize(&new_unused_data, new_unused_size) < 0) { > Py_DECREF(RetVal); > goto error; > } > memcpy(PyBytes_AS_STRING(new_unused_data), > PyBytes_AS_STRING(self->unused_data), > old_unused_size); > memcpy(PyBytes_AS_STRING(new_unused_data) + old_unused_size, > self->zst.next_in, self->zst.avail_in); > Py_DECREF(self->unused_data); > self->unused_data = new_unused_data; > > Basically, hacking around the fact that (AFAICT) there's no direct way to > allocate an uninitialized bytes object. That way we only do one allocation, > and only copy the new data once. This hacking is not needed, if first argument of PyBytes_FromStringAndSize() is NULL, the contents of the bytes object are uninitialized. And more, this hacking is invalid, because empty bytes object shared and can't be resized. Patch updated. The concatenation optimized as you suggested, one bug fixed. ---------- Added file: http://bugs.python.org/file27775/zlib_accum_unused_data_2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16350> _______________________________________ From report at bugs.python.org Mon Oct 29 13:12:13 2012 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 29 Oct 2012 12:12:13 +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: <1351512733.92.0.285341851245.issue16312@psf.upfronthosting.co.za> Vinay Sajip added the comment: Not an actual problem (for me), and although the issue was opened for more general functionality, logging is the only specific use case that was actually cited. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16312> _______________________________________ From report at bugs.python.org Mon Oct 29 13:24:09 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 29 Oct 2012 12:24:09 +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: <1351513449.49.0.681607514391.issue16355@psf.upfronthosting.co.za> R. David Murray added the comment: That's because inspecting source code requires that there be a source file to inspect. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16355> _______________________________________ From report at bugs.python.org Mon Oct 29 13:25:17 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 29 Oct 2012 12:25:17 +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: <1351513517.46.0.144435323966.issue16355@psf.upfronthosting.co.za> R. David Murray added the comment: Hmm. Reopening in case someone wants to see if we can generate an appropriate error message when there is no source file to inspect. ---------- status: closed -> open versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16355> _______________________________________ From report at bugs.python.org Mon Oct 29 13:34:10 2012 From: report at bugs.python.org (Marco Buttu) Date: Mon, 29 Oct 2012 12:34:10 +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: <1351514050.56.0.698475690017.issue16355@psf.upfronthosting.co.za> Marco Buttu added the comment: If inspect.getcomments() requires a source file to inspect, I think it would be better to indicate it in the doc. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16355> _______________________________________ From report at bugs.python.org Mon Oct 29 14:02:36 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 29 Oct 2012 13:02:36 +0000 Subject: [issue16345] dict.fromkeys() assumes 'self' is empty In-Reply-To: <1351411466.77.0.264436866601.issue16345@psf.upfronthosting.co.za> Message-ID: <1351515756.64.0.611852607728.issue16345@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16345> _______________________________________ From report at bugs.python.org Mon Oct 29 15:21:13 2012 From: report at bugs.python.org (Richard Delorenzi) Date: Mon, 29 Oct 2012 14:21:13 +0000 Subject: [issue16356] cjson dose not decode \/ properly Message-ID: <1351520473.63.0.0215534885564.issue16356@psf.upfronthosting.co.za> New submission from Richard Delorenzi: This code produces the wrong result import cjson cjson.decode(cjson.encode('/')) It produces '\\/', it should produce '/' using /usr/lib/pymodules/python2.7/cjson.so cjson version 1.0.5-4build1 ---------- components: None messages: 174114 nosy: Richard.Delorenzi priority: normal severity: normal status: open title: cjson dose not decode \/ properly type: behavior versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16356> _______________________________________ From report at bugs.python.org Mon Oct 29 15:24:23 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Oct 2012 14:24:23 +0000 Subject: [issue16356] cjson dose not decode \/ properly In-Reply-To: <1351520473.63.0.0215534885564.issue16356@psf.upfronthosting.co.za> Message-ID: <1351520663.3.0.710930180751.issue16356@psf.upfronthosting.co.za> Christian Heimes added the comment: cjson is a third party module and not part of Python's standard library. Please report the error to the author of the cjson package. Python 2.7 has a builtin json encoder and decoder. The package is called 'json'. http://docs.python.org/2.7/library/json.html#module-json ---------- nosy: +christian.heimes resolution: -> invalid status: open -> closed versions: +3rd party -Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16356> _______________________________________ From report at bugs.python.org Mon Oct 29 15:36:47 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 29 Oct 2012 14:36:47 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351521407.14.0.497887511601.issue16344@psf.upfronthosting.co.za> Ezio Melotti added the comment: > "serious" developers? sorry but I think that is a unfortunate phrase > that goes against the Python Diversity Statement With "serious" I just mean anyone that wants to continue programming, as opposed as someone doing e.g. a one-off course at university (hence the quotes). The whole ecosystem around Python and most of the other programming languages is mostly in English, and anyone that doesn't know English will have to face many other problems later on (e.g. no localized documentation and blog posts). There are two solutions to this problem: 1) adapt the language to the users; 2) teach the users English; While the first (i.e. what you are proposing) works as a short term solution, I believe the second is a much better long term solution, because IMHO users will anyway have to learn English sooner or later. > In some places (like my country, public schools), English is not > teach formally until the University. This is very unfortunate -- I was under the impression that teaching English in middle/high schools was already common in most of the countries. > And I don't think non-English speakers are just a subset of users. Do you mean people that aren't native English speakers or people who don't even grasp enough English to understand the error messages? > BTW, as the draft says, Python is the offender here, as other error > messages are already translated (including the OS ones, even inside > Python!): This is another thing that I dislike, for the aforementioned reasons. I've seen buildbots reporting unintelligible error messages in German, and just a few days ago I even came across a mercurial version in Russian. It makes somewhat sense to translate OS error messages, because they are read by regular users that have a localized OS and expect localized messages. The same could be said for bash, even if the distinction between "regular users" and "developers" starts to fade a bit here. > I don't see why this could cause confusion, instead that, I think > python would become more consistent with other tools and thus more > easy to use. For example the other day I saw a student confused by this error message: >>> a, b = 1, 2, 3 ValueError: too many values to unpack (expected 2) The offender here is most likely the word "unpack". "Unpack" is closely related to the concept of tuple unpacking, so if the student is aware of what tuple unpacking is, he might fail to associate the problem with it if the error uses another word. In addition, I can not think of any word that might be a suitable translation for "unpack" in my native language. In Spanish "desempaquetar" could maybe be used, but I'm not sure how well it works. > The mechanism to restore the language is the common one (used by > almost every other application that support i18n): > >>> locale.setlocale(locale.LC_MESSAGES, "C") > It should be not difficult for "serious" programmers to handle that :-) > If that is a concern, it could be implemented a command line > parameter, a environment variable or a shortcut in locale module. It's not difficult to change, but you would have to remember how to do it and what LC_* variable you should change. Assuming this gets implemented it would most likely require a command line parameter and an envvar too. > Anyway, people will not necessarily be faced by default with the > localized version, an if for example, a teacher has to jump to an > student machine, surely it could use it as messages will be probably > in the spoken language of the country (BTW, probably most of the > operating system components will be localized, not only Python) FWIW I've been in the situation where neither my students nor I could understand the local language -- luckily all the machines were using English. > If PostgreSQL and other tools could do that, why Python could not? Does any other popular programming language do it? And if so, how? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Mon Oct 29 15:41:45 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 29 Oct 2012 14:41:45 +0000 Subject: [issue16356] cjson dose not decode \/ properly In-Reply-To: <1351520473.63.0.0215534885564.issue16356@psf.upfronthosting.co.za> Message-ID: <1351521705.3.0.885718144645.issue16356@psf.upfronthosting.co.za> Ezio Melotti added the comment: This works fine with the standard json module. >>> json.loads(json.dumps('/')) '/' FWIW 'json' also has C accelerations. ---------- nosy: +ezio.melotti stage: -> committed/rejected _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16356> _______________________________________ From report at bugs.python.org Mon Oct 29 15:47:21 2012 From: report at bugs.python.org (Dale E. Moore) Date: Mon, 29 Oct 2012 14:47:21 +0000 Subject: [issue15869] IDLE: Include .desktop file and icon In-Reply-To: <1346929874.07.0.220677915984.issue15869@psf.upfronthosting.co.za> Message-ID: <1351522041.14.0.302278900991.issue15869@psf.upfronthosting.co.za> Dale E. Moore added the comment: On Ubuntu 12.10 with Unity the task icon is a question mark. And when locked to launcher the button does not start idle. ---------- nosy: +DaleEMoore _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15869> _______________________________________ From report at bugs.python.org Mon Oct 29 16:01:57 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 29 Oct 2012 15:01:57 +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: <1351522917.51.0.590622393205.issue16355@psf.upfronthosting.co.za> R. David Murray added the comment: Yeah, this should be a doc bug. After I thought about it some more I realized that changing the behavior to raise an error would not be a good idea. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16355> _______________________________________ From report at bugs.python.org Mon Oct 29 16:09:00 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 29 Oct 2012 15:09:00 +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: <1351523340.82.0.960700266627.issue16355@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- keywords: +easy nosy: +ezio.melotti stage: committed/rejected -> needs patch type: behavior -> enhancement versions: +Python 3.2 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16355> _______________________________________ From report at bugs.python.org Mon Oct 29 16:19:17 2012 From: report at bugs.python.org (Marco Buttu) Date: Mon, 29 Oct 2012 15:19:17 +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: <1351523957.42.0.744095565727.issue16355@psf.upfronthosting.co.za> Marco Buttu added the comment: I saw there is the same lack of clarity in the doc of `inspect.getsource()`: >>> import inspect >>> print(inspect.getsource.__doc__) Return the text of the source code for an object. The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a single string. An IOError is raised if the source code cannot be retrieved. >>> def foo(): ... pass ... >>> inspect.getsource(foo) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.3/inspect.py", line 726, in getsource lines, lnum = getsourcelines(object) File "/usr/local/lib/python3.3/inspect.py", line 715, in getsourcelines lines, lnum = findsource(object) File "/usr/local/lib/python3.3/inspect.py", line 563, in findsource raise IOError('could not get source code') OSError: could not get source code ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16355> _______________________________________ From report at bugs.python.org Mon Oct 29 16:53:59 2012 From: report at bugs.python.org (Jeff McNeil) Date: Mon, 29 Oct 2012 15:53:59 +0000 Subject: [issue16357] SSLSocket created from SSLContext.wrap_socket doesn't include cert/keyfile Message-ID: <1351526039.51.0.105215109749.issue16357@psf.upfronthosting.co.za> New submission from Jeff McNeil: mcjeff at martian:~/cpython$ ./python -V Python 3.4.0a0 When an SSLSocket is created via SSLContext.wrap_socket, it is passed a _context parameter directly. SSLSocket.__init__ sets self.context at this point, but it does not set self.keyfile or self.certfile. However, in SSLSocket.accept, both keyfile & certfile are passed when creating a new, wrapped SSLSocket, from socket.accept's newsock. The result is an attribute error. >>> import ssl >>> c = ssl.SSLContext(ssl.PROTOCOL_SSLv23) >>> c.load_cert_chain('Lib/test/keycert.pem') >>> import socket >>> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) >>> s.bind(('127.0.0.1', 5050)) >>> s.listen(5) >>> s.accept() # nc localhost 5050 in another term. Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/google/home/mcjeff/cpython/Lib/ssl.py", line 557, in accept keyfile=self.keyfile, certfile=self.certfile, AttributeError: 'SSLSocket' object has no attribute 'keyfile' >>> Attached one-liner addresses it by passing in the context rather than the keyfile & certfile. >>> s.accept() (<socket.socket object, fd=4, family=2, type=1, proto=0>, ('127.0.0.1', 37306)) >>> ---------- components: Library (Lib) files: ssl_context.patch keywords: patch messages: 174121 nosy: mcjeff priority: normal severity: normal status: open title: SSLSocket created from SSLContext.wrap_socket doesn't include cert/keyfile versions: Python 3.4 Added file: http://bugs.python.org/file27776/ssl_context.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16357> _______________________________________ From report at bugs.python.org Mon Oct 29 17:07:39 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 29 Oct 2012 16: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: <1351526859.88.0.50258758666.issue16355@psf.upfronthosting.co.za> Ezio Melotti added the comment: > After I thought about it some more I realized that changing > the behavior to raise an error would not be a good idea. Can you elaborate more? Failing silently doesn't seem much better than raising an error, especially if similar functions already raise. ---------- components: +Library (Lib) resolution: invalid -> type: enhancement -> behavior _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16355> _______________________________________ From report at bugs.python.org Mon Oct 29 17:20:11 2012 From: report at bugs.python.org (Elwyn Davies) Date: Mon, 29 Oct 2012 16:20:11 +0000 Subject: [issue16358] Enhancement for mmap_read: Consistency with standard file read Message-ID: <1351527611.16.0.402353331604.issue16358@psf.upfronthosting.co.za> New submission from Elwyn Davies: Enhancement requested for module mmap: Alter the interface of mmap.read from mmap.read(num) to mmap.read([num]) reading the whole file if no argument provided. The read function in the mmap module (Modules/mmapmodule.c) *requires* an argument whereas for the standard file read function the argument is optional and the function reads the remainder of the file if absent. The mmap module knows how big the file is, so it should be no problem to internally use the remaining length if no argument is supplied. This would avoid having to write (for example) f = mmap.mmap(file_desc, file_size) b = f.read(file_size) j = json.loads(b) instead of f = mmap.mmap(file_desc, file_size) j = json.load(f) ---------- components: Library (Lib) messages: 174123 nosy: elwynd priority: normal severity: normal status: open title: Enhancement for mmap_read: Consistency with standard file read type: enhancement versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16358> _______________________________________ From report at bugs.python.org Mon Oct 29 17:26:53 2012 From: report at bugs.python.org (Trenton Craig) Date: Mon, 29 Oct 2012 16:26:53 +0000 Subject: [issue16338] pysnmp/asyncore - timeout ineffective? In-Reply-To: <1351356300.75.0.420247508313.issue16338@psf.upfronthosting.co.za> Message-ID: <1351528013.37.0.201085590451.issue16338@psf.upfronthosting.co.za> Trenton Craig added the comment: So, in testing, we reset retries to 1 instead of 0, and on our ubuntu environment this allows it to function. So issue is not with timeout, but with the retries variable. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16338> _______________________________________ From report at bugs.python.org Mon Oct 29 17:28:13 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 29 Oct 2012 16:28:13 +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: <1351528093.06.0.158207872278.issue16355@psf.upfronthosting.co.za> R. David Murray added the comment: If similar functions already raise, then changing it for 3.4 would be OK. But to change it for earlier versions would risk breaking working programs. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16355> _______________________________________ From report at bugs.python.org Mon Oct 29 17:28:35 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 29 Oct 2012 16:28:35 +0000 Subject: [issue8401] Strange behavior of bytearray slice assignment In-Reply-To: <1271259710.42.0.373058487219.issue8401@psf.upfronthosting.co.za> Message-ID: <1351528115.88.0.860087603174.issue8401@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: Added file: http://bugs.python.org/file27777/issue8401-2.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8401> _______________________________________ From report at bugs.python.org Mon Oct 29 17:28:41 2012 From: report at bugs.python.org (jose gregorio fernandez trincado) Date: Mon, 29 Oct 2012 16:28:41 +0000 Subject: [issue16359] can't print figures 08 and 09 Message-ID: <1351528121.94.0.0812523965219.issue16359@psf.upfronthosting.co.za> New submission from jose gregorio fernandez trincado: In [2]: 09 File "<ipython-input-2-7010843e6b42>", line 1 09 ^ SyntaxError: invalid token Using str() produce SyntaxError too. The same for 08. Figures like 01 and 02 produce the appropriate output. Hardware: Lenovo 3000 N200, 80Gb of HD, 4Gb of RAM, Core-Duo 2.6GHz OS: Ubuntu 12.04, 64bits. ---------- components: None messages: 174126 nosy: jose.gregorio.fernandez.trincado priority: normal severity: normal status: open title: can't print figures 08 and 09 type: behavior versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16359> _______________________________________ From report at bugs.python.org Mon Oct 29 17:31:15 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 29 Oct 2012 16:31:15 +0000 Subject: [issue16358] Enhancement for mmap_read: Consistency with standard file read In-Reply-To: <1351527611.16.0.402353331604.issue16358@psf.upfronthosting.co.za> Message-ID: <1351528275.34.0.451500336536.issue16358@psf.upfronthosting.co.za> Changes by R. David Murray <rdmurray at bitdance.com>: ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> mmap.read requires an argument _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16358> _______________________________________ From report at bugs.python.org Mon Oct 29 17:32:40 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 29 Oct 2012 16:32:40 +0000 Subject: [issue16359] can't print figures 08 and 09 In-Reply-To: <1351528121.94.0.0812523965219.issue16359@psf.upfronthosting.co.za> Message-ID: <1351528360.18.0.143111541249.issue16359@psf.upfronthosting.co.za> Ezio Melotti added the comment: Those are invalid octal literals, since the digits 8 and 9 don't exist in octal. See http://docs.python.org/2/reference/lexical_analysis.html#grammar-token-octinteger ---------- nosy: +ezio.melotti resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16359> _______________________________________ From report at bugs.python.org Mon Oct 29 17:38:40 2012 From: report at bugs.python.org (Ben Gamari) Date: Mon, 29 Oct 2012 16:38:40 +0000 Subject: [issue10782] Not possible to cross-compile due to poor detection of %lld support in printf In-Reply-To: <1293473376.4.0.265613686073.issue10782@psf.upfronthosting.co.za> Message-ID: <1351528720.36.0.572672385492.issue10782@psf.upfronthosting.co.za> Changes by Ben Gamari <bgamari at gmail.com>: ---------- status: open -> languishing _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10782> _______________________________________ From report at bugs.python.org Mon Oct 29 17:41:07 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 29 Oct 2012 16:41:07 +0000 Subject: [issue16348] Decimal.remainder_near documentation incorrect. In-Reply-To: <1351426853.23.0.197083736305.issue16348@psf.upfronthosting.co.za> Message-ID: <1351528867.53.0.74089525758.issue16348@psf.upfronthosting.co.za> Andrew Svetlov added the comment: LGTM ---------- nosy: +asvetlov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16348> _______________________________________ From report at bugs.python.org Mon Oct 29 17:44:11 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 29 Oct 2012 16:44:11 +0000 Subject: [issue16345] dict.fromkeys() assumes 'self' is empty In-Reply-To: <1351411466.77.0.264436866601.issue16345@psf.upfronthosting.co.za> Message-ID: <1351529051.39.0.0526866120267.issue16345@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I wonder what the semantics should be. I would like to just clear the dictionary that is returned from __new__ but you're also allowed to return custom classes from __new__ which we might not know how to clear. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16345> _______________________________________ From report at bugs.python.org Mon Oct 29 17:49:08 2012 From: report at bugs.python.org (Ben Gamari) Date: Mon, 29 Oct 2012 16:49:08 +0000 Subject: [issue16360] argparse: comma in metavar causes assertion failure when formatting long usage message Message-ID: <1351529348.85.0.0475227022594.issue16360@psf.upfronthosting.co.za> New submission from Ben Gamari: argparse suffers from a failing assertion when formatting a long usage message with an option whose metavar contains a comma. This can be seen in the attached testcase, which fails with, Traceback (most recent call last): File "/home/ben/hi.py", line 24, in <module> args = parser.parse_args() File "/usr/lib/python2.7/argparse.py", line 1688, in parse_args args, argv = self.parse_known_args(args, namespace) File "/usr/lib/python2.7/argparse.py", line 1720, in parse_known_args namespace, args = self._parse_known_args(args, namespace) File "/usr/lib/python2.7/argparse.py", line 1937, in _parse_known_args self.error(_('too few arguments')) File "/usr/lib/python2.7/argparse.py", line 2360, in error self.print_usage(_sys.stderr) File "/usr/lib/python2.7/argparse.py", line 2322, in print_usage self._print_message(self.format_usage(), file) File "/usr/lib/python2.7/argparse.py", line 2278, in format_usage return formatter.format_help() File "/usr/lib/python2.7/argparse.py", line 279, in format_help help = self._root_section.format_help() File "/usr/lib/python2.7/argparse.py", line 209, in format_help func(*args) File "/usr/lib/python2.7/argparse.py", line 330, in _format_usage assert ' '.join(opt_parts) == opt_usage AssertionError This failure is apparently due to a regular expression used to wrap the usage message. The solution to this is unclear, but it seems to me using a regular expression here is a hack at best. ---------- components: Library (Lib) files: hi.py messages: 174130 nosy: bgamari priority: normal severity: normal status: open title: argparse: comma in metavar causes assertion failure when formatting long usage message type: crash versions: Python 2.7 Added file: http://bugs.python.org/file27778/hi.py _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16360> _______________________________________ From report at bugs.python.org Mon Oct 29 17:50:50 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Oct 2012 16:50:50 +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: <1351529450.55.0.478247493767.issue16350@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There is yet one memory management bug (with unconsumed_tail). 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'' What should unconsumed_tail be equal after EOF? b'' or unused_data? >>> import zlib >>> x = zlib.compress(b'abcdefghijklmnopqrstuvwxyz') + b'0123456789' >>> dco = zlib.decompressobj() >>> dco.decompress(x) b'abcdefghijklmnopqrstuvwxyz' >>> dco.flush() b'' >>> dco.unconsumed_tail b'' >>> dco.unused_data b'0123456789' >>> dco = zlib.decompressobj() >>> dco.decompress(x, 1000) b'abcdefghijklmnopqrstuvwxyz' >>> dco.flush() b'' >>> dco.unconsumed_tail b'0123456789' >>> dco.unused_data b'0123456789' ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16350> _______________________________________ From report at bugs.python.org Mon Oct 29 18:01:25 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 29 Oct 2012 17:01:25 +0000 Subject: [issue8401] Strange behavior of bytearray slice assignment In-Reply-To: <1271259710.42.0.373058487219.issue8401@psf.upfronthosting.co.za> Message-ID: <1351530085.08.0.724612916873.issue8401@psf.upfronthosting.co.za> Ezio Melotti added the comment: The new patch further improve tests and error message, checking for both numbers and strings: >>> b = bytearray(b'fooooooo') >>> b[3:4] = 'foo' TypeError: can assign only bytes, buffers, or iterables of ints in range(0, 256) >>> b[3:4] = 5 TypeError: can assign only bytes, buffers, or iterables of ints in range(0, 256) >>> b[3:4] = 5.2 TypeError: can assign only bytes, buffers, or iterables of ints in range(0, 256) >>> b[3:4] = None TypeError: 'NoneType' object is not iterable Before the patch these errors were reported instead: >>> b = bytearray(b'fooooooo') >>> b[3:4] = 'foo' # can't provide encoding here TypeError: string argument without an encoding >>> b[3:4] = 5 # this "worked" >>> b[3:4] = 5.2 TypeError: 'float' object is not iterable >>> b[3:4] = None TypeError: 'NoneType' object is not iterable ---------- Added file: http://bugs.python.org/file27779/issue8401-3.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8401> _______________________________________ From report at bugs.python.org Mon Oct 29 18:06:55 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 29 Oct 2012 17:06:55 +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: <1351530415.72.0.0372152616739.issue16355@psf.upfronthosting.co.za> Ezio Melotti added the comment: Not sure if they can be considered "working" programs if the function fails silently. Do you have some specific example in mind? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16355> _______________________________________ From report at bugs.python.org Mon Oct 29 18:18:30 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 29 Oct 2012 17:18:30 +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: <1351531110.0.0.772161092387.issue16355@psf.upfronthosting.co.za> R. David Murray added the comment: Not a specific package, but a specific use case (assuming getcomments is in use at all :) Consider a program that uses getcomments to look for a pragma-like comment before a function, but one that is not critical to the program's function (perhaps it has to do with testing or tracing infrastructure...). If the source file does not exist, then that is equivalent to their being no pragma. So the program would work fine even if the source is deleted...until this getcomments starts to raise an error, when it promptly crashes (probably in a production system, since that is the most likely place for source to be absent...) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16355> _______________________________________ From report at bugs.python.org Mon Oct 29 18:42:37 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 29 Oct 2012 17:42:37 +0000 Subject: [issue16262] srcdir != builddir builds fail, if hg is not installed In-Reply-To: <1350464486.47.0.189031527493.issue16262@psf.upfronthosting.co.za> Message-ID: <3Xr36h27QdzPf7@mail.python.org> Roundup Robot added the comment: New changeset c6787a4c544e by Ross Lagerwall in branch '3.2': Fix regression from issue #16262 http://hg.python.org/cpython/rev/c6787a4c544e New changeset b82a4f8a4c67 by Ross Lagerwall in branch '3.3': Merge with 3.2 for issue #16262 http://hg.python.org/cpython/rev/b82a4f8a4c67 New changeset 1bee1a176306 by Ross Lagerwall in branch 'default': Merge with 3.3 for issue #16262 http://hg.python.org/cpython/rev/1bee1a176306 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16262> _______________________________________ From report at bugs.python.org Mon Oct 29 18:42:50 2012 From: report at bugs.python.org (Georg Brandl) Date: Mon, 29 Oct 2012 17: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: <1351532570.84.0.404325611628.issue16354@psf.upfronthosting.co.za> Georg Brandl added the comment: If you always want to end up on Python 2 docs, why don't you go to docs.python.org/2 in the first place? ---------- nosy: +georg.brandl _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16354> _______________________________________ From report at bugs.python.org Mon Oct 29 19:24:27 2012 From: report at bugs.python.org (Mark Gius) Date: Mon, 29 Oct 2012 18:24:27 +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: <1351535067.83.0.155270359371.issue16327@psf.upfronthosting.co.za> Mark Gius added the comment: Patch fixes and tests fd leak on Python 3.3. Test fails without fix, passes with fix. I found an existing test looking for fd leaks for another bug. Borrowed the verification bits from it. There were some other test failures when I ran the subprocess suite on my laptop, but it more like I had some environmental issue rather than having genuinely broken anything. If somebody else (or the test bots?) could run the tests I would appreciate it. ---------- Added file: http://bugs.python.org/file27780/fix_16327_on_3.3.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Mon Oct 29 19:29:05 2012 From: report at bugs.python.org (Mark Gius) Date: Mon, 29 Oct 2012 18:29:05 +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: <1351535345.63.0.597099627449.issue16327@psf.upfronthosting.co.za> Mark Gius added the comment: Here's more or less the same fix and test on 2.7. I jumped through the hoop to preserve the original exception and traceback even if os.close() raises an exception. This follows the 3.3 branch's cleanup behavior of silently suppressing errors in the cleanup code. ---------- Added file: http://bugs.python.org/file27781/fix_16327_on_2.7.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Mon Oct 29 19:30:41 2012 From: report at bugs.python.org (Mark Gius) Date: Mon, 29 Oct 2012 18:30:41 +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: <1351535441.53.0.85509707719.issue16327@psf.upfronthosting.co.za> Mark Gius added the comment: I've also submitted the contributor form requested. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16327> _______________________________________ From report at bugs.python.org Mon Oct 29 19:49:47 2012 From: report at bugs.python.org (Armin Rigo) Date: Mon, 29 Oct 2012 18:49:47 +0000 Subject: [issue16345] dict.fromkeys() assumes 'self' is empty In-Reply-To: <1351411466.77.0.264436866601.issue16345@psf.upfronthosting.co.za> Message-ID: <1351536587.74.0.0120681982668.issue16345@psf.upfronthosting.co.za> Armin Rigo added the comment: In case of doubt, see the source code of PyPy :-) w_dict = space.call_function(w_type) for w_key in space.listview(w_keys): space.setitem(w_dict, w_key, w_fill) (Seriously more compact.) No clear there... ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16345> _______________________________________ From report at bugs.python.org Mon Oct 29 19:56:21 2012 From: report at bugs.python.org (Armin Rigo) Date: Mon, 29 Oct 2012 18:56:21 +0000 Subject: [issue16345] dict.fromkeys() assumes 'self' is empty In-Reply-To: <1351411466.77.0.264436866601.issue16345@psf.upfronthosting.co.za> Message-ID: <1351536981.75.0.105749132601.issue16345@psf.upfronthosting.co.za> Armin Rigo added the comment: Joke apart, you could check and complain if the object returned is an instance of 'dict' and is not empty. Otherwise just accept it. I think complaining is better than picking either of the two behaviors in this case. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16345> _______________________________________ From report at bugs.python.org Mon Oct 29 20:08:50 2012 From: report at bugs.python.org (Ross Lagerwall) Date: Mon, 29 Oct 2012 19:08:50 +0000 Subject: [issue16262] srcdir != builddir builds fail, if hg is not installed In-Reply-To: <1350464486.47.0.189031527493.issue16262@psf.upfronthosting.co.za> Message-ID: <1351537730.99.0.169000093064.issue16262@psf.upfronthosting.co.za> Changes by Ross Lagerwall <rosslagerwall at gmail.com>: ---------- assignee: -> rosslagerwall nosy: +rosslagerwall resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.2, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16262> _______________________________________ From report at bugs.python.org Mon Oct 29 20:25:36 2012 From: report at bugs.python.org (Philip Jenvey) Date: Mon, 29 Oct 2012 19:25:36 +0000 Subject: [issue16336] Check input in surrogatepass error handler In-Reply-To: <1351332370.82.0.307074271772.issue16336@psf.upfronthosting.co.za> Message-ID: <1351538736.78.0.460358922847.issue16336@psf.upfronthosting.co.za> Philip Jenvey added the comment: Thanks for picking this and the warning/slowdown up, Serhiy. The patch LGTM, for whatever that's worth =] ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16336> _______________________________________ From report at bugs.python.org Mon Oct 29 20:29:05 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 29 Oct 2012 19:29:05 +0000 Subject: [issue14897] struct.pack raises unexpected error message In-Reply-To: <1337840519.45.0.558860957014.issue14897@psf.upfronthosting.co.za> Message-ID: <3Xr5TX6JVzzPh2@mail.python.org> Roundup Robot added the comment: New changeset 626ed0e06fd6 by Petri Lehtinen in branch '2.7': #14897: Enhance error messages of struct.pack and struct.pack_into http://hg.python.org/cpython/rev/626ed0e06fd6 New changeset a555bd4026b0 by Petri Lehtinen in branch '3.2': #14897: Enhance error messages of struct.pack and struct.pack_into http://hg.python.org/cpython/rev/a555bd4026b0 New changeset 70d5906e0461 by Petri Lehtinen in branch '3.3': #14897: Enhance error messages of struct.pack and struct.pack_into http://hg.python.org/cpython/rev/70d5906e0461 New changeset ebc588a3db51 by Petri Lehtinen in branch 'default': #14897: Enhance error messages of struct.pack and struct.pack_into http://hg.python.org/cpython/rev/ebc588a3db51 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14897> _______________________________________ From report at bugs.python.org Mon Oct 29 20:29:52 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Mon, 29 Oct 2012 19:29:52 +0000 Subject: [issue14897] struct.pack raises unexpected error message In-Reply-To: <1337840519.45.0.558860957014.issue14897@psf.upfronthosting.co.za> Message-ID: <1351538992.97.0.979976114083.issue14897@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Applied, thanks! ---------- nosy: +petri.lehtinen resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14897> _______________________________________ From report at bugs.python.org Mon Oct 29 20:38:44 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Mon, 29 Oct 2012 19:38:44 +0000 Subject: [issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings In-Reply-To: <1347321295.19.0.66061447718.issue15916@psf.upfronthosting.co.za> Message-ID: <1351539524.06.0.193908283058.issue15916@psf.upfronthosting.co.za> Petri Lehtinen added the comment: + for key in vars(subnamespace): + setattr(namespace, key, getattr(subnamespace, key)) There might be even more clever ways to achieve this, but what about at least saying "for key, value in vars(subnamespace).items()", and then using the value accordingly, to avoid the getattr() call? ---------- nosy: +petri.lehtinen _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15916> _______________________________________ From report at bugs.python.org Mon Oct 29 20:39:20 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Mon, 29 Oct 2012 19:39:20 +0000 Subject: [issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings In-Reply-To: <1347321295.19.0.66061447718.issue15916@psf.upfronthosting.co.za> Message-ID: <1351539560.9.0.497646940599.issue15916@psf.upfronthosting.co.za> Petri Lehtinen added the comment: And that comment was meant for totally separate issue, sorry. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15916> _______________________________________ From report at bugs.python.org Mon Oct 29 20:39:38 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Mon, 29 Oct 2012 19:39:38 +0000 Subject: [issue9351] argparse set_defaults on subcommands should override top level set_defaults In-Reply-To: <1279894012.43.0.0678646409.issue9351@psf.upfronthosting.co.za> Message-ID: <1351539578.46.3.13636798315e-05.issue9351@psf.upfronthosting.co.za> Petri Lehtinen added the comment: + for key in vars(subnamespace): + setattr(namespace, key, getattr(subnamespace, key)) There might be even more clever ways to achieve this, but what about at least saying "for key, value in vars(subnamespace).items()", and then using the value accordingly, to avoid the getattr() call? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9351> _______________________________________ From report at bugs.python.org Mon Oct 29 20:43:51 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Mon, 29 Oct 2012 19:43:51 +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: <1351539831.15.0.967922912047.issue2005@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Checking whether a type is unsigned in configure.ac might be cumbersome... ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue2005> _______________________________________ From report at bugs.python.org Mon Oct 29 20:51:42 2012 From: report at bugs.python.org (Heikki Partanen) Date: Mon, 29 Oct 2012 19:51:42 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1351540302.14.0.240294462498.issue8913@psf.upfronthosting.co.za> Heikki Partanen added the comment: Thanks for the comments, Eric! I reworded the docs and improved the examples too (being stuck in 2.6 I didn't even know about the cool autonumbering :) ---------- Added file: http://bugs.python.org/file27782/issue8913-2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8913> _______________________________________ From report at bugs.python.org Mon Oct 29 21:38:52 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 29 Oct 2012 20:38: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: <1351543132.36.0.924401417723.issue16354@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Or set a bookmark. :) ---------- nosy: +chris.jerdonek _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16354> _______________________________________ From report at bugs.python.org Mon Oct 29 21:43:50 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 29 Oct 2012 20:43:50 +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: <1351543430.26.0.930820804324.issue16357@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't understand your code snippet: you don't seem to wrap the socket anywhere (paste error?). As for the patch, it would be nice to add a corresponding test in Lib/test/test_ssl.py. ---------- nosy: +pitrou stage: -> patch review type: -> behavior versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16357> _______________________________________ From report at bugs.python.org Mon Oct 29 22:01:32 2012 From: report at bugs.python.org (Bradley Froehle) Date: Mon, 29 Oct 2012 21:01:32 +0000 Subject: [issue16268] dir(closure) does not find __dir__ In-Reply-To: <1350500710.5.0.876584221442.issue16268@psf.upfronthosting.co.za> Message-ID: <1351544492.49.0.566969528386.issue16268@psf.upfronthosting.co.za> Bradley Froehle added the comment: This rather obscure bug seems to be caused by a failure to properly initialize PyCell_Type. Running with GDB, we see that _PyType_Lookup(<class 'cell'>, "__dir__") fails in: /* Look in tp_dict of types in MRO */ mro = type->tp_mro; /* If mro is NULL, the type is either not yet initialized by PyType_Ready(), or already cleared by type_clear(). Either way the safest thing to do is to return NULL. */ if (mro == NULL) return NULL; Since: (gdb) print PyCell_Type->tp_mro $9 = (PyObject *) 0x0 Searching the code base shows that we never call PyType_Ready(&PyCell_Type). A patch is attached. ---------- keywords: +patch nosy: +bfroehle Added file: http://bugs.python.org/file27783/init_cell_type.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16268> _______________________________________ From report at bugs.python.org Mon Oct 29 22:07:51 2012 From: report at bugs.python.org (Bradley Froehle) Date: Mon, 29 Oct 2012 21:07:51 +0000 Subject: [issue16268] dir(closure) does not find __dir__ In-Reply-To: <1350500710.5.0.876584221442.issue16268@psf.upfronthosting.co.za> Message-ID: <1351544871.68.0.78697938196.issue16268@psf.upfronthosting.co.za> Bradley Froehle added the comment: Note that we fail to initialize PyCell_Type in all versions of Python, even if there aren't any visible ramifications in earlier versions. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16268> _______________________________________ From report at bugs.python.org Mon Oct 29 22:17:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Oct 2012 21:17:18 +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: <1351545438.45.0.796633248986.issue2005@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Checking whether a type is unsigned in configure.ac might be cumbersome... This can be done in compile time. Something like: if ((uid_t)-1 > 0) ... ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue2005> _______________________________________ From report at bugs.python.org Mon Oct 29 22:23:47 2012 From: report at bugs.python.org (Jeff McNeil) Date: Mon, 29 Oct 2012 21:23:47 +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: <1351545827.59.0.063766379086.issue16357@psf.upfronthosting.co.za> Jeff McNeil added the comment: Ak! Yes, cut and paste error. Python 3.4.0a0 (default:57a33af85407, Oct 27 2012, 21:26:30) [GCC 4.4.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ssl >>> c = ssl.SSLContext(ssl.PROTOCOL_SSLv23) >>> c.load_cert_chain('Lib/test/keycert.pem') >>> import socket >>> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) >>> s.bind(('127.0.0.1', 5050)) >>> s = c.wrap_socket(s) >>> s.listen(5) >>> s.accept() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jeff/cpython/Lib/ssl.py", line 557, in accept keyfile=self.keyfile, certfile=self.certfile, AttributeError: 'SSLSocket' object has no attribute 'keyfile' >>> I'll add a corresponding test, sure thing. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16357> _______________________________________ From report at bugs.python.org Mon Oct 29 23:22:20 2012 From: report at bugs.python.org (Jeff McNeil) Date: Mon, 29 Oct 2012 22:22:20 +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: <1351549340.44.0.809288558655.issue16357@psf.upfronthosting.co.za> Jeff McNeil added the comment: Updated to pass in the parent context only actually, as it doesn't look like all of the attributes on SSLSocket will be set if a context was initially passed in. ---------- Added file: http://bugs.python.org/file27784/ssl_context_2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16357> _______________________________________ From report at bugs.python.org Mon Oct 29 23:45:34 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Mon, 29 Oct 2012 22:45:34 +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: <1351550734.49.0.224400371804.issue11566@psf.upfronthosting.co.za> V?clav ?milauer added the comment: I would like to second Ralf here. I am having the same issue with mingw's gcc 4.7 and -std=c++11. ---------- nosy: +eudoxos _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11566> _______________________________________ From report at bugs.python.org Mon Oct 29 23:52:02 2012 From: report at bugs.python.org (Phil) Date: Mon, 29 Oct 2012 22:52:02 +0000 Subject: [issue16361] HTTPS/TLS Problem in Python 3.3 Message-ID: <1351551122.11.0.0678496091034.issue16361@psf.upfronthosting.co.za> New submission from Phil: I had converted some code for a scraper from 2.7.3 to 3.3.0 on Windows 7 and suddenly the code stopped working. Now the https fetch results in: Traceback (most recent call last): File "D:\Users\Phil\Desktop\demo.py", line 67, in <module> page=getWebData() File "D:\Users\Phil\Desktop\demo.py", line 59, in getWebData response=urllib.request.urlopen(req, cadefault=False) File "D:\Program Files\Python33\lib\urllib\request.py", line 160, in urlopen return opener.open(url, data, timeout) File "D:\Program Files\Python33\lib\urllib\request.py", line 473, in open response = self._open(req, data) File "D:\Program Files\Python33\lib\urllib\request.py", line 491, in _open '_open', req) File "D:\Program Files\Python33\lib\urllib\request.py", line 451, in _call_chain result = func(*args) File "D:\Program Files\Python33\lib\urllib\request.py", line 1287, in https_open context=self._context, check_hostname=self._check_hostname) File "D:\Program Files\Python33\lib\urllib\request.py", line 1255, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [WinError 10054] An existing connection was forcibly closed by the remote host> I have run Wireshark using Python 2.7.3 and Python 3.3.0 (see attached files) ---------- components: Library (Lib) files: demo.py messages: 174158 nosy: pventura priority: normal severity: normal status: open title: HTTPS/TLS Problem in Python 3.3 type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file27785/demo.py _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16361> _______________________________________ From report at bugs.python.org Mon Oct 29 23:53:11 2012 From: report at bugs.python.org (Phil) Date: Mon, 29 Oct 2012 22:53:11 +0000 Subject: [issue16361] HTTPS/TLS Problem in Python 3.3 In-Reply-To: <1351551122.11.0.0678496091034.issue16361@psf.upfronthosting.co.za> Message-ID: <1351551191.71.0.13449105093.issue16361@psf.upfronthosting.co.za> Changes by Phil <pventura at broward.edu>: Added file: http://bugs.python.org/file27786/py2-filtered.pcapng _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16361> _______________________________________ From report at bugs.python.org Mon Oct 29 23:53:36 2012 From: report at bugs.python.org (Phil) Date: Mon, 29 Oct 2012 22:53:36 +0000 Subject: [issue16361] HTTPS/TLS Problem in Python 3.3 In-Reply-To: <1351551122.11.0.0678496091034.issue16361@psf.upfronthosting.co.za> Message-ID: <1351551216.72.0.400448178984.issue16361@psf.upfronthosting.co.za> Changes by Phil <pventura at broward.edu>: Added file: http://bugs.python.org/file27787/py3-filtered.pcapng _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16361> _______________________________________ From report at bugs.python.org Mon Oct 29 23:55:33 2012 From: report at bugs.python.org (Phil) Date: Mon, 29 Oct 2012 22:55:33 +0000 Subject: [issue16361] HTTPS/TLS Problem in Python 3.3 In-Reply-To: <1351551122.11.0.0678496091034.issue16361@psf.upfronthosting.co.za> Message-ID: <1351551333.83.0.525396155635.issue16361@psf.upfronthosting.co.za> Phil added the comment: You will notice that in the Python 3.3.0 version after packet 54 (Client Hello), there seems to be no response from the server. Today, I was able to verify that the code worked under Python 3.2.3. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16361> _______________________________________ From report at bugs.python.org Tue Oct 30 00:05:13 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 29 Oct 2012 23:05:13 +0000 Subject: [issue16345] dict.fromkeys() assumes 'self' is empty In-Reply-To: <1351411466.77.0.264436866601.issue16345@psf.upfronthosting.co.za> Message-ID: <1351551913.82.0.90574410991.issue16345@psf.upfronthosting.co.za> Benjamin Peterson added the comment: That's still inconsistent, though, since we wouldn't complain if __new__ returns a user defined object. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16345> _______________________________________ From report at bugs.python.org Tue Oct 30 00:19:11 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2012 23:19:11 +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: <1351552751.49.0.635657888065.issue16322@psf.upfronthosting.co.za> STINNER Victor added the comment: See also the issue #836035. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16322> _______________________________________ From report at bugs.python.org Tue Oct 30 00:21:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 29 Oct 2012 23:21:10 +0000 Subject: [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <3XrBdK2GHxzR0m@mail.python.org> Roundup Robot added the comment: New changeset b9e14b89199b by Brian Curtin in branch '3.2': Fix #16197. Update docstrings and documentation to match winreg code. http://hg.python.org/cpython/rev/b9e14b89199b ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16197> _______________________________________ From report at bugs.python.org Tue Oct 30 00:22:52 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 29 Oct 2012 23:22:52 +0000 Subject: [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <1351552972.52.0.709235437316.issue16197@psf.upfronthosting.co.za> Brian Curtin added the comment: Pushed fixes for 3.2+ Thanks for the patch! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16197> _______________________________________ From report at bugs.python.org Tue Oct 30 00:58:02 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 29 Oct 2012 23:58:02 +0000 Subject: [issue16358] Enhancement for mmap_read: Consistency with standard file read In-Reply-To: <1351527611.16.0.402353331604.issue16358@psf.upfronthosting.co.za> Message-ID: <1351555082.29.0.836912273164.issue16358@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16358> _______________________________________ From report at bugs.python.org Tue Oct 30 00:58:19 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 29 Oct 2012 23:58:19 +0000 Subject: [issue12021] mmap.read requires an argument In-Reply-To: <1304711654.25.0.661798385399.issue12021@psf.upfronthosting.co.za> Message-ID: <1351555099.29.0.237704755342.issue12021@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12021> _______________________________________ From report at bugs.python.org Tue Oct 30 00:59:23 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2012 23:59:23 +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: <1351555163.21.0.711514549738.issue16322@psf.upfronthosting.co.za> STINNER Victor added the comment: According to CRT source code: - tzset() uses WideCharToMultiByte(lc_cp, 0, tzinfo.StandardName, -1, tzname[0], _TZ_STRINGS_SIZE - 1, NULL, &defused) with lc_cp = ___lc_codepage_func(). - wcsftime("%z") and wcsftime("%Z") use _mbstowcs_s_l() to decode the time zone name I tried to call ___lc_codepage_func(): it returns 0. I suppose that it means that mbstowcs() and wcstombs() use the ANSI code page. Instead of trying to bet what is the correct encoding, it would be simpler (and safer) to read the Unicode version of the tzname array: StandardName and DaylightName of GetTimeZoneInformation(). If anything is changed, time.strftime(), time.strptime(), datetime.datetime.strftime() and time.tzname must be checked (with "%Z" format). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16322> _______________________________________ From report at bugs.python.org Tue Oct 30 01:28:26 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2012 00:28:26 +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: <1351556906.15.0.348554843083.issue16322@psf.upfronthosting.co.za> STINNER Victor added the comment: "Instead of trying to bet what is the correct encoding, it would be simpler (and safer) to read the Unicode version of the tzname array: StandardName and DaylightName of GetTimeZoneInformation()." GetTimeZoneInformation() formats correctly timezone names, but it reintroduces #10653 issue: time.strftime("%Z") formats the timezone name differently. See also issue #13029 which is a duplicate of #10653, but contains useful information. -- Example on Windows 7 with a french setup configured to Tokyo's timezone. Using GetTimeZoneInformation(), time.tzname is ("Tokyo", "Tokyo (heure d\u2019\xe9t\xe9)"). U+2019 is the "RIGHT SINGLE QUOTATION MARK". This character is usually replaced with U+0027 (APOSTROPHE) in ASCII. time.strftime("%Z") gives "Tokyo (heure d'\x81\x66ete)" (if it is implemented using strftime() or wcsftime()). -- If I understood correctly, Python 3.3 has two issues on Windows: * time.tzname is decoded from the wrong encoding * time.strftime("%Z") gives an invalid output The real blocker issue is a bug in strftime() and wcsftime() in Windows CRT. A solution is to replace "%Z" with the timezone name before calling strftime() or wcsftime(), aka working around the Windows CRT bug. ---------- nosy: +ocean-city _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16322> _______________________________________ From report at bugs.python.org Tue Oct 30 01:37:31 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2012 00:37:31 +0000 Subject: [issue16310] zipfile: allow surrogates in filenames In-Reply-To: <1351082025.34.0.287428579283.issue16310@psf.upfronthosting.co.za> Message-ID: <1351557451.24.0.701823412729.issue16310@psf.upfronthosting.co.za> STINNER Victor added the comment: > The use-case is building Python distributions containing > non-ASCII filenames. It's possible to distribute Python packages with non-ASCII filenames. > So yes, I have Latin-1 bytes on the filesystem, > even though my locale is UTF-8. You system is not configured correctly. If you would like to distribute such invalid filename, how do you plan to access it on other platforms where the filename is decoded differently? It would be safer to build your project on a well configured system. See issues mentionned in msg173766 to support: creating a ZIP archive with invalid filenames, and be able to specify the encoding of filenames when decoding a ZIP archive. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16310> _______________________________________ From report at bugs.python.org Tue Oct 30 01:43:27 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Oct 2012 00:43:27 +0000 Subject: [issue16330] Use surrogate-related macros In-Reply-To: <1351266176.96.0.911861478569.issue16330@psf.upfronthosting.co.za> Message-ID: <3XrDSG4dQmzR90@mail.python.org> Roundup Robot added the comment: New changeset 13dd8199c112 by Victor Stinner in branch 'default': Issue #16330: Use surrogate-related macros http://hg.python.org/cpython/rev/13dd8199c112 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16330> _______________________________________ From report at bugs.python.org Tue Oct 30 01:44:13 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2012 00:44:13 +0000 Subject: [issue16330] Use surrogate-related macros In-Reply-To: <1351266176.96.0.911861478569.issue16330@psf.upfronthosting.co.za> Message-ID: <1351557853.57.0.596255119235.issue16330@psf.upfronthosting.co.za> STINNER Victor added the comment: "But not all surrogate-related code uses this macros. I suppose this is done inadvertently, somewhere the macro and naked code used in neighboring lines." Yeah, I forgot to use the new macros in these files. Thanks for your patch, I applied it. I also fixed *IS*() macros to add parenthesis around the argument. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16330> _______________________________________ From report at bugs.python.org Tue Oct 30 01:48:09 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2012 00:48:09 +0000 Subject: [issue16335] Integer overflow in unicode-escape decoder In-Reply-To: <1351292121.99.0.943463007307.issue16335@psf.upfronthosting.co.za> Message-ID: <1351558089.01.0.970317132061.issue16335@psf.upfronthosting.co.za> STINNER Victor added the comment: If I understood correctly, (b'\\N{' + b'x' * (INT_MAX+1)) + '}').decode('unicode-decode') may crash? Did you try such string? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16335> _______________________________________ From report at bugs.python.org Tue Oct 30 01:59:28 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2012 00:59:28 +0000 Subject: [issue14625] Faster utf-32 decoder In-Reply-To: <1334869197.32.0.159275934867.issue14625@psf.upfronthosting.co.za> Message-ID: <1351558768.81.0.0171848183601.issue14625@psf.upfronthosting.co.za> STINNER Victor added the comment: > I suggest apply patch A to 3.3 as it fixes performance > regression (2x) and is very simple. ASCII and UTF-8 are the two most common codecs in the world, so it's justified to have heavily optimized encoders and decoders. I don't know any application using UTF-32-LE or UTF-32-BE. So I don't want to waste Python memory/code size with a heavily optimized decoder. The patch A looks to be enough. -- 32 bit units is commonly used with wchar_t, but this format already has a fast decoder, PyUnicode_FromWideChar(), which uses memcpy() or _PyUnicode_CONVERT_BYTES(). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14625> _______________________________________ From report at bugs.python.org Tue Oct 30 02:02:32 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2012 01:02:32 +0000 Subject: [issue16311] Use _PyUnicodeWriter API in text decoders In-Reply-To: <1351103901.39.0.0945105753188.issue16311@psf.upfronthosting.co.za> Message-ID: <1351558952.83.0.460277416214.issue16311@psf.upfronthosting.co.za> STINNER Victor added the comment: "Soon I'll post a patch, which speeds up unicode-escape and raw-unicode-escape decoders to 1.5-3x. Also there are not yet reviewed patches for UTF-32 (issue14625) and charmap (issue14850) decoders. Will be merge conflicts." codecs_writer.patch doesn't change too much the core of decoders, but mostly the code before and after the loop, and error handling. You can still use PyUnicode_WRITE, PyUnicode_READ, memcpy(), etc. "But I will review the patch." If you review the patch, please check that how the buffer is allocated. It should not be overallocated by default, only on the first error. Overallocation can kill performances when it is not necessary (especially on Windows). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16311> _______________________________________ From report at bugs.python.org Tue Oct 30 02:18:55 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Oct 2012 01:18:55 +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: <3XrFF718WPzR9g@mail.python.org> Roundup Robot added the comment: New changeset 67d69f943b7f by Victor Stinner in branch 'default': Issue #15478: Raising an OSError doesn't decode or encode the filename anymore http://hg.python.org/cpython/rev/67d69f943b7f ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15478> _______________________________________ From report at bugs.python.org Tue Oct 30 02:21:15 2012 From: report at bugs.python.org (Stephen Tonkin) Date: Tue, 30 Oct 2012 01:21:15 +0000 Subject: [issue12890] cgitb displays <p> tags when executed in text mode In-Reply-To: <1315016521.13.0.175763253408.issue12890@psf.upfronthosting.co.za> Message-ID: <1351560075.21.0.539236765073.issue12890@psf.upfronthosting.co.za> Stephen Tonkin added the comment: Uploaded a patch which fixes the failing on Windows 7. It was essentially an issue with the Windows path returned by temp_dir() containing unescaped backslashes. A repr() fixed this. ---------- nosy: +sptonkin Added file: http://bugs.python.org/file27788/p12890-2.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12890> _______________________________________ From report at bugs.python.org Tue Oct 30 02:22:06 2012 From: report at bugs.python.org (Aaron Iles) Date: Tue, 30 Oct 2012 01:22:06 +0000 Subject: [issue12890] cgitb displays <p> tags when executed in text mode In-Reply-To: <1315016521.13.0.175763253408.issue12890@psf.upfronthosting.co.za> Message-ID: <1351560126.69.0.0458097486523.issue12890@psf.upfronthosting.co.za> Aaron Iles added the comment: Patch successfully tested on Mac OSX 10.8. No regressions. ---------- nosy: +aliles _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12890> _______________________________________ From report at bugs.python.org Tue Oct 30 02:27:13 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Oct 2012 01:27:13 +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: <3XrFQm68hHzRJ3@mail.python.org> Roundup Robot added the comment: New changeset 27a3b19ee792 by Victor Stinner in branch 'default': Issue #15478: Fix compilation on Windows http://hg.python.org/cpython/rev/27a3b19ee792 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15478> _______________________________________ From report at bugs.python.org Tue Oct 30 02:30:32 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Oct 2012 01:30:32 +0000 Subject: [issue16330] Use surrogate-related macros In-Reply-To: <1351266176.96.0.911861478569.issue16330@psf.upfronthosting.co.za> Message-ID: <3XrFVc0Q77zRD0@mail.python.org> Roundup Robot added the comment: New changeset 812f5c379188 by Victor Stinner in branch 'default': Issue #16330: Fix compilation on Windows http://hg.python.org/cpython/rev/812f5c379188 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16330> _______________________________________ From report at bugs.python.org Tue Oct 30 02:31:00 2012 From: report at bugs.python.org (Michael Dorman) Date: Tue, 30 Oct 2012 01:31:00 +0000 Subject: [issue12890] cgitb displays <p> tags when executed in text mode In-Reply-To: <1315016521.13.0.175763253408.issue12890@psf.upfronthosting.co.za> Message-ID: <1351560660.7.0.501312791302.issue12890@psf.upfronthosting.co.za> Michael Dorman added the comment: Patch (p12890-2.diff) successfully tested on Windows 7 64. No regressions. ---------- nosy: +mjdorma _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12890> _______________________________________ From report at bugs.python.org Tue Oct 30 02:42:02 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2012 01:42:02 +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: <1351561322.89.0.163565030559.issue15478@psf.upfronthosting.co.za> STINNER Victor added the comment: The commit is incomplete, there are some remaining functions that need to be patched: here is a new (untested) patch for more Windows functions. ---------- Added file: http://bugs.python.org/file27789/oserror_filename_windows.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15478> _______________________________________ From report at bugs.python.org Tue Oct 30 05:28:06 2012 From: report at bugs.python.org (Aaron Iles) Date: Tue, 30 Oct 2012 04:28:06 +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: <1351571286.52.0.685607350374.issue13266@psf.upfronthosting.co.za> Aaron Iles added the comment: I've updated the patch for the current default branch (to be Python 3.4) and added documentation to the inspect module for the new unwraps function. Functionally unwraps and it's tests are unchanged. ---------- Added file: http://bugs.python.org/file27790/p13266-2.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13266> _______________________________________ From report at bugs.python.org Tue Oct 30 05:33:29 2012 From: report at bugs.python.org (Todd Rovito) Date: Tue, 30 Oct 2012 04:33:29 +0000 Subject: [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1351571609.8.0.527550166219.issue16278@psf.upfronthosting.co.za> Todd Rovito added the comment: Over the weekend I verified the test cases are incomplete for Python 3.4. Inside of Lib/test/test_os.py is a class FileTests that contains a single function test_rename which seems to only check to make sure that the reference count for the first argument is not mis-handeled. Nothing exists for the use case destination is a directory as described in the original bug. I will attempt to create suggested test cases but as I am not the most familiar with Python's unit test framework it might take me some time, I estimate as long as 11/6/2012. If somebody comes along with more experience that can fix the bug please feel free to proceed. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16278> _______________________________________ From report at bugs.python.org Tue Oct 30 05:53:17 2012 From: report at bugs.python.org (Stephen Tonkin) Date: Tue, 30 Oct 2012 04:53:17 +0000 Subject: [issue15436] __sizeof__ is not documented In-Reply-To: <1343073282.53.0.774447573036.issue15436@psf.upfronthosting.co.za> Message-ID: <1351572797.25.0.724035318193.issue15436@psf.upfronthosting.co.za> Changes by Stephen Tonkin <sptonkin at outlook.com>: ---------- nosy: +sptonkin _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15436> _______________________________________ From report at bugs.python.org Tue Oct 30 05:54:19 2012 From: report at bugs.python.org (Michael Dorman) Date: Tue, 30 Oct 2012 04:54:19 +0000 Subject: [issue15436] __sizeof__ is not documented In-Reply-To: <1343073282.53.0.774447573036.issue15436@psf.upfronthosting.co.za> Message-ID: <1351572859.36.0.518306774999.issue15436@psf.upfronthosting.co.za> Changes by Michael Dorman <mjdorma at gmail.com>: ---------- nosy: +mjdorma _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15436> _______________________________________ From report at bugs.python.org Tue Oct 30 06:34:59 2012 From: report at bugs.python.org (Heikki Partanen) Date: Tue, 30 Oct 2012 05:34:59 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1351575299.97.0.176121727405.issue8913@psf.upfronthosting.co.za> Heikki Partanen added the comment: Grammar fixed ---------- Added file: http://bugs.python.org/file27791/issue8913-3.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8913> _______________________________________ From report at bugs.python.org Tue Oct 30 07:28:21 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 30 Oct 2012 06:28:21 +0000 Subject: [issue2005] posixmodule expects sizeof(pid_t/gid_t/uid_t) <= sizeof(long) In-Reply-To: <1351545438.45.0.796633248986.issue2005@psf.upfronthosting.co.za> Message-ID: <20121030062817.GA1349@p29> Petri Lehtinen added the comment: Serhiy Storchaka wrote: > This can be done in compile time. Something like: > > if ((uid_t)-1 > 0) ... Ah, neat. I would have expected that to issue a compiler warning, though, because the comparison is always true if the type is unsigned, but at least gcc doesn't seem to warn. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue2005> _______________________________________ From report at bugs.python.org Tue Oct 30 08:07:29 2012 From: report at bugs.python.org (Simon Blanchard) Date: Tue, 30 Oct 2012 07:07:29 +0000 Subject: [issue16362] _LegalCharsPatt in cookies.py includes illegal characters Message-ID: <1351580849.36.0.343039143633.issue16362@psf.upfronthosting.co.za> New submission from Simon Blanchard: _LegalCharsPatt = r"[\w\d!#%&'~_`><@,:/\$\*\+\-\.\^\|\)\(\?\}\{\=]" The above regex in cookies.py includes the the comma character but RFC 6265 https://tools.ietf.org/html/rfc6265 section 4.1.1 says: cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E ; US-ASCII characters excluding CTLs, ; whitespace DQUOTE, comma, semicolon, ; and backslash That is, no comma. ---------- components: Library (Lib) messages: 174183 nosy: Simon.Blanchard priority: normal severity: normal status: open title: _LegalCharsPatt in cookies.py includes illegal characters type: behavior versions: Python 2.7, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16362> _______________________________________ From report at bugs.python.org Tue Oct 30 09:07:59 2012 From: report at bugs.python.org (Ronny Pfannschmidt) Date: Tue, 30 Oct 2012 08:07:59 +0000 Subject: [issue16363] super cannot invoke descriptors Message-ID: <1351584479.14.0.539937815992.issue16363@psf.upfronthosting.co.za> New submission from Ronny Pfannschmidt: this means its much harder to have a mixin to change the behaviour of a property instead of super(Mixin, self).prop = foo the code is super(Mixin, type(self)).prop.__set__(self, foo) which is way harder to understand the attached file demonstrates the problem and has a proof of concept for an extended super allowing descriptor invocations ---------- components: Interpreter Core files: test_super.py messages: 174184 nosy: Ronny.Pfannschmidt priority: normal severity: normal status: open title: super cannot invoke descriptors type: enhancement versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file27792/test_super.py _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16363> _______________________________________ From report at bugs.python.org Tue Oct 30 10:06:59 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2012 09:06:59 +0000 Subject: [issue14897] struct.pack raises unexpected error message In-Reply-To: <3Xr5TX6JVzzPh2@mail.python.org> Message-ID: <201210301106.42801.storchaka@gmail.com> Serhiy Storchaka added the comment: Matti M?ki, can you please submit a contributor form? http://python.org/psf/contrib/contrib-form/ http://python.org/psf/contrib/ ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14897> _______________________________________ From report at bugs.python.org Tue Oct 30 10:23:11 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 30 Oct 2012 09:23:11 +0000 Subject: [issue16361] HTTPS/TLS Problem in Python 3.3 In-Reply-To: <1351551122.11.0.0678496091034.issue16361@psf.upfronthosting.co.za> Message-ID: <1351588991.53.0.692317160963.issue16361@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Well, the first difference that jumps out is that with python 2.7, the protocol used is SSLv2, whereas it's bare SSL on Python 3.3.0. But another interesting thing is the presence, in Python 2.3, of many extenstions (elliptic_curves, heartbeat, server_name, etc). It's likely that the server doesn't support one of these extensions (but I guess it should answer accordingly instead of ignoring the hello). ---------- nosy: +neologix, pitrou _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16361> _______________________________________ From report at bugs.python.org Tue Oct 30 10:23:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2012 09:23:12 +0000 Subject: [issue16330] Use surrogate-related macros In-Reply-To: <1351266176.96.0.911861478569.issue16330@psf.upfronthosting.co.za> Message-ID: <1351588992.7.0.679429256211.issue16330@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks. > Issue #16330: Fix compilation on Windows Oh, how could I miss this? ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16330> _______________________________________ From report at bugs.python.org Tue Oct 30 10:29:56 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2012 09:29:56 +0000 Subject: [issue14625] Faster utf-32 decoder In-Reply-To: <1334869197.32.0.159275934867.issue14625@psf.upfronthosting.co.za> Message-ID: <1351589396.37.0.952885479987.issue14625@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I don't know any application using UTF-32-LE or UTF-32-BE. So I don't want to waste Python memory/code size with a heavily optimized decoder. The patch A looks to be enough. Agree. I had the same doubts. That's why I proposed two patches for your choice. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14625> _______________________________________ From report at bugs.python.org Tue Oct 30 10:33:59 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 30 Oct 2012 09:33:59 +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: <1351589639.82.0.897347260228.issue11566@psf.upfronthosting.co.za> Changes by Mark Dickinson <dickinsm at gmail.com>: ---------- nosy: +mark.dickinson _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11566> _______________________________________ From report at bugs.python.org Tue Oct 30 10:36:31 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 30 Oct 2012 09:36:31 +0000 Subject: [issue14897] struct.pack raises unexpected error message In-Reply-To: <1337840519.45.0.558860957014.issue14897@psf.upfronthosting.co.za> Message-ID: <1351589791.94.0.25255956107.issue14897@psf.upfronthosting.co.za> Mark Dickinson added the comment: > "Enhance error messages of struct.pack and struct.pack_into" You probably should have used the word 'fix' rather than 'enhance' here: else it smells like you're putting new features into a maintenance release. :-) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14897> _______________________________________ From report at bugs.python.org Tue Oct 30 10:39:05 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2012 09:39:05 +0000 Subject: [issue16335] Integer overflow in unicode-escape decoder In-Reply-To: <1351292121.99.0.943463007307.issue16335@psf.upfronthosting.co.za> Message-ID: <1351589945.02.0.149166081166.issue16335@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: (b'\\N{WHITE SMILING FACE' + b'x' *?2**32 + '}').decode('unicode-escape') may pass on platform with 32-bit int and more than 32-bit size_t if there is enough memory. I don't have so much memory. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16335> _______________________________________ From report at bugs.python.org Tue Oct 30 10:44:36 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 30 Oct 2012 09:44:36 +0000 Subject: [issue14897] struct.pack raises unexpected error message In-Reply-To: <1351589791.94.0.25255956107.issue14897@psf.upfronthosting.co.za> Message-ID: <20121030094433.GE1349@p29> Petri Lehtinen added the comment: > You probably should have used the word 'fix' rather than 'enhance' here: else it smells like you're putting new features into a maintenance release. :-) Ah, true. But unfixable now :( ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14897> _______________________________________ From report at bugs.python.org Tue Oct 30 10:56:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2012 09:56: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: <1351590969.44.0.563251939852.issue15478@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue16074. > The patch changes also os.link(), os.rename() and os.replace() to use the source, not the destination, in the error message. It is maybe a mistake because these functions can also fail in the directory of the destination does not exist. Yes, in different cases it can be the source, the destination, both, unknown or none of them. ---------- nosy: +serhiy.storchaka type: -> behavior _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15478> _______________________________________ From report at bugs.python.org Tue Oct 30 11:00:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2012 10:00:41 +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: <1351591241.33.0.966827393922.issue16306@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Hieu Nguyen, can you please submit a contributor form? http://python.org/psf/contrib/contrib-form/ http://python.org/psf/contrib/ ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16306> _______________________________________ From report at bugs.python.org Tue Oct 30 11:03:14 2012 From: report at bugs.python.org (=?utf-8?q?Matti_M=C3=A4ki?=) Date: Tue, 30 Oct 2012 10:03:14 +0000 Subject: [issue14897] struct.pack raises unexpected error message In-Reply-To: <1337840519.45.0.558860957014.issue14897@psf.upfronthosting.co.za> Message-ID: <1351591394.78.0.397398844547.issue14897@psf.upfronthosting.co.za> Matti M?ki added the comment: I filled up the contributor form and gave it to Petri Lehtinen 2012-10-22 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14897> _______________________________________ From report at bugs.python.org Tue Oct 30 11:03:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2012 10:03:40 +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: <1351591420.55.0.94719282418.issue16322@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- nosy: -serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16322> _______________________________________ From report at bugs.python.org Tue Oct 30 11:05:05 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 30 Oct 2012 10:05:05 +0000 Subject: [issue14897] struct.pack raises unexpected error message In-Reply-To: <1351591394.78.0.397398844547.issue14897@psf.upfronthosting.co.za> Message-ID: <20121030100502.GH1349@p29> Petri Lehtinen added the comment: Matti M?ki wrote: > I filled up the contributor form and gave it to Petri Lehtinen 2012-10-22 Yeah, and I posted it (along with 14 other contributor forms received at PyCon Finland) to the PSF last week. They just seem to be a bit slow to process them. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14897> _______________________________________ From report at bugs.python.org Tue Oct 30 11:06:21 2012 From: report at bugs.python.org (Stefan Holek) Date: Tue, 30 Oct 2012 10:06:21 +0000 Subject: [issue16310] zipfile: allow surrogates in filenames In-Reply-To: <1351082025.34.0.287428579283.issue16310@psf.upfronthosting.co.za> Message-ID: <1351591581.98.0.957725964626.issue16310@psf.upfronthosting.co.za> Stefan Holek added the comment: > It's possible to distribute Python packages with non-ASCII filenames. Well, it wasn't until very recently (distribute 0.6.29): https://bitbucket.org/tarek/distribute/issue/303/no-support-for-unicode-manifest-files Unless we are not talking about the same thing, which is possible. ;-) >> So yes, I have Latin-1 bytes on the filesystem, >> even though my locale is UTF-8. > You system is not configured correctly. If you would like to distribute such invalid filename, > how do you plan to access it on other platforms where the filename is decoded differently? > It would be safer to build your project on a well configured system. This was done on purpose, to test how Python fares. Such files can easily come into existence, e.g. when cloning a Git repo created on a different system. I am not after "correct" ZIP files in this case, I am after Python not raising UnicodeErrors when it is supposed to a) support non-ASCII module names and b) support surrogates. python setup.py sdist --formats=gztar -> works python setup.py sdist --formats=zip -> UnicodeError If I am the only one to think this is wrong, then so be it. Our current workaround is to disallow surrogates in the manifest. /me shrugs. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16310> _______________________________________ From report at bugs.python.org Tue Oct 30 11:16:11 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 30 Oct 2012 10:16:11 +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: <1351592171.58.0.759577950129.issue11566@psf.upfronthosting.co.za> Mark Dickinson added the comment: I think there's something generally smelly about the way hypot is handled; this isn't the only hypot-related build issue that's turned up. I'm wondering whether the code can be reworked to deal with hypot in the same way that functions like log1p, etc. are dealt with in the math module---i.e., define a _Py_hypot wrapper function, and use that everywhere internally. One difference is that log1p is only used in cmath and math, while hypot is also needed in the Python core. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11566> _______________________________________ From report at bugs.python.org Tue Oct 30 11:19:42 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Tue, 30 Oct 2012 10:19:42 +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: <1351592382.34.0.269601106018.issue11566@psf.upfronthosting.co.za> V?clav ?milauer added the comment: Just for the record: a workaround (mentioned at http://boost.2283326.n4.nabble.com/Boost-Python-Compile-Error-s-GCC-via-MinGW-w64-td3165793.html#a3166760) is to always include <cmath> before <Python.h>. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11566> _______________________________________ From report at bugs.python.org Tue Oct 30 11:25:01 2012 From: report at bugs.python.org (Hieu Nguyen) Date: Tue, 30 Oct 2012 10:25: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: <1351592701.23.0.593907529455.issue16306@psf.upfronthosting.co.za> Hieu Nguyen added the comment: Serhiy, actually I have submitted my contributor form to Petri Lehtinen in a sprint here in Finland. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16306> _______________________________________ From report at bugs.python.org Tue Oct 30 11:56:40 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2012 10:56:40 +0000 Subject: [issue16330] Use surrogate-related macros In-Reply-To: <1351588992.7.0.679429256211.issue16330@psf.upfronthosting.co.za> Message-ID: <CAMpsgwaryGDZqh5WEUV6HbKpSKrrf230T-75ySKqgcrjC-goSw@mail.gmail.com> STINNER Victor added the comment: > Oh, how could I miss this? The code does compile with error on Linux with GCC. I don't understand how. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16330> _______________________________________ From report at bugs.python.org Tue Oct 30 11:59:18 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2012 10:59:18 +0000 Subject: [issue16310] zipfile: allow surrogates in filenames In-Reply-To: <1351591581.98.0.957725964626.issue16310@psf.upfronthosting.co.za> Message-ID: <CAMpsgwaMMVBaxfF8Pz8qPNZUj_qbWwhGx=PRjPzJfap-puMzgw@mail.gmail.com> STINNER Victor added the comment: > If I am the only one to think this is wrong, then so be it. > Our current workaround is to disallow surrogates in the manifest. /me shrugs. You are not alone, that's why there are 3 open issues. But someone should finish the different proposition and write a new fully functionnal patch to support bytes filenames. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16310> _______________________________________ From report at bugs.python.org Tue Oct 30 12:30:54 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2012 11:30:54 +0000 Subject: [issue16330] Use surrogate-related macros In-Reply-To: <CAMpsgwaryGDZqh5WEUV6HbKpSKrrf230T-75ySKqgcrjC-goSw@mail.gmail.com> Message-ID: <201210301330.41148.storchaka@gmail.com> Serhiy Storchaka added the comment: It was a rhetorical question. This code compiled only if Py_UNICODE_SIZE == 2. But I should be more careful. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16330> _______________________________________ From report at bugs.python.org Tue Oct 30 13:10:57 2012 From: report at bugs.python.org (jamesf) Date: Tue, 30 Oct 2012 12:10:57 +0000 Subject: [issue16364] datetime.strftime and locale.getdefaultlocale conflict on Windows ? Message-ID: <1351599057.52.0.790355581015.issue16364@psf.upfronthosting.co.za> New submission from jamesf: on windows(windows 7), python 2.7.3 compiled with VS 2008 and code page "cp936". locale.getdefaultlocale call Win32 API GetACP and return "cp936", but a small test program return "C" from 'getlocale' CRT function. I am not sure if this behaviour is expected or bug? It seems that datetime.strftime call the CRT function strftime to do the real work, since the CRT locale is C, it use that to format locale dependent directive like "%B" and "%x"; But since locale.getdefaultlocale return "cp936", so i expect datetime.strftime to return locale formatted string. ---------- components: Library (Lib) messages: 174203 nosy: jwfang priority: normal severity: normal status: open title: datetime.strftime and locale.getdefaultlocale conflict on Windows ? type: behavior versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16364> _______________________________________ From report at bugs.python.org Tue Oct 30 13:22:03 2012 From: report at bugs.python.org (jamesf) Date: Tue, 30 Oct 2012 12:22:03 +0000 Subject: [issue16364] datetime.strftime and locale.getdefaultlocale conflict on Windows ? In-Reply-To: <1351599057.52.0.790355581015.issue16364@psf.upfronthosting.co.za> Message-ID: <1351599723.68.0.940224371364.issue16364@psf.upfronthosting.co.za> jamesf added the comment: i just found that locale.getlocale does return (None, None), maybe defaultlocale just return the DEFAULT, which is the hints. i will use locale.setlocale in my app, so close this issue. ---------- status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16364> _______________________________________ From report at bugs.python.org Tue Oct 30 13:49:11 2012 From: report at bugs.python.org (Berker Peksag) Date: Tue, 30 Oct 2012 12:49:11 +0000 Subject: [issue16363] super cannot invoke descriptors In-Reply-To: <1351584479.14.0.539937815992.issue16363@psf.upfronthosting.co.za> Message-ID: <1351601351.99.0.418843096179.issue16363@psf.upfronthosting.co.za> Changes by Berker Peksag <berker.peksag at gmail.com>: ---------- versions: -Python 3.1, Python 3.5 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16363> _______________________________________ From report at bugs.python.org Tue Oct 30 13:58:47 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 30 Oct 2012 12:58:47 +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: <1351601927.5.0.460976073556.issue2005@psf.upfronthosting.co.za> Christian Heimes added the comment: AFAIK C89 doesn't specify integer overflows: If an exceptional condition occurs during the evaluation of an expression (that is, if the result is not mathematically defined or not in the range of representable values for its type), the behavior is undefined. With GCC and -fwrapv integer overflow work as you have expected. But other (and mostly older) compilers can fail. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue2005> _______________________________________ From report at bugs.python.org Tue Oct 30 14:00:45 2012 From: report at bugs.python.org (Jyrki Pulliainen) Date: Tue, 30 Oct 2012 13:00:45 +0000 Subject: [issue9351] argparse set_defaults on subcommands should override top level set_defaults In-Reply-To: <1279894012.43.0.0678646409.issue9351@psf.upfronthosting.co.za> Message-ID: <1351602045.79.0.109986195399.issue9351@psf.upfronthosting.co.za> Jyrki Pulliainen added the comment: Yeah, I tried figuring out something more clever, as this, in the current form, has a bit too hackish feeling in it, but I couldn't find a proper tool for the job. Anyway, attached a patch with the getattr removed. ---------- Added file: http://bugs.python.org/file27793/issue9351.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9351> _______________________________________ From report at bugs.python.org Tue Oct 30 14:01:12 2012 From: report at bugs.python.org (Jyrki Pulliainen) Date: Tue, 30 Oct 2012 13:01:12 +0000 Subject: [issue9351] argparse set_defaults on subcommands should override top level set_defaults In-Reply-To: <1279894012.43.0.0678646409.issue9351@psf.upfronthosting.co.za> Message-ID: <1351602072.05.0.372587987278.issue9351@psf.upfronthosting.co.za> Changes by Jyrki Pulliainen <jyrki at dywypi.org>: Added file: http://bugs.python.org/file27794/issue9351.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9351> _______________________________________ From report at bugs.python.org Tue Oct 30 14:01:17 2012 From: report at bugs.python.org (Jyrki Pulliainen) Date: Tue, 30 Oct 2012 13:01:17 +0000 Subject: [issue9351] argparse set_defaults on subcommands should override top level set_defaults In-Reply-To: <1279894012.43.0.0678646409.issue9351@psf.upfronthosting.co.za> Message-ID: <1351602077.88.0.690984865761.issue9351@psf.upfronthosting.co.za> Changes by Jyrki Pulliainen <jyrki at dywypi.org>: Removed file: http://bugs.python.org/file27793/issue9351.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9351> _______________________________________ From report at bugs.python.org Tue Oct 30 14:01:36 2012 From: report at bugs.python.org (Jyrki Pulliainen) Date: Tue, 30 Oct 2012 13:01:36 +0000 Subject: [issue9351] argparse set_defaults on subcommands should override top level set_defaults In-Reply-To: <1279894012.43.0.0678646409.issue9351@psf.upfronthosting.co.za> Message-ID: <1351602096.59.0.897813567419.issue9351@psf.upfronthosting.co.za> Changes by Jyrki Pulliainen <jyrki at dywypi.org>: Removed file: http://bugs.python.org/file27677/issue9351.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9351> _______________________________________ From report at bugs.python.org Tue Oct 30 14:01:39 2012 From: report at bugs.python.org (Jyrki Pulliainen) Date: Tue, 30 Oct 2012 13:01:39 +0000 Subject: [issue9351] argparse set_defaults on subcommands should override top level set_defaults In-Reply-To: <1279894012.43.0.0678646409.issue9351@psf.upfronthosting.co.za> Message-ID: <1351602099.93.0.077328259832.issue9351@psf.upfronthosting.co.za> Changes by Jyrki Pulliainen <jyrki at dywypi.org>: Removed file: http://bugs.python.org/file27794/issue9351.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9351> _______________________________________ From report at bugs.python.org Tue Oct 30 14:01:47 2012 From: report at bugs.python.org (Jyrki Pulliainen) Date: Tue, 30 Oct 2012 13:01:47 +0000 Subject: [issue9351] argparse set_defaults on subcommands should override top level set_defaults In-Reply-To: <1279894012.43.0.0678646409.issue9351@psf.upfronthosting.co.za> Message-ID: <1351602107.37.0.301729876731.issue9351@psf.upfronthosting.co.za> Changes by Jyrki Pulliainen <jyrki at dywypi.org>: Added file: http://bugs.python.org/file27795/issue9351.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9351> _______________________________________ From report at bugs.python.org Tue Oct 30 14:10:41 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 30 Oct 2012 13:10:41 +0000 Subject: [issue2005] posixmodule expects sizeof(pid_t/gid_t/uid_t) <= sizeof(long) In-Reply-To: <1351601927.5.0.460976073556.issue2005@psf.upfronthosting.co.za> Message-ID: <20121030131038.GU1349@p29> Petri Lehtinen added the comment: Christian Heimes wrote: > AFAIK C89 doesn't specify integer overflows: Casting a signed integer to an unsigned integer is always defined, if that's what you're talking about. See http://flash-gordon.me.uk/ansi.c.txt, section 3.2.1.2. If you're talking about PyLong_AsLongWithOverflow() and friends, they do bitshift magic to detect overflows. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue2005> _______________________________________ From report at bugs.python.org Tue Oct 30 14:12:45 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 30 Oct 2012 13:12:45 +0000 Subject: [issue9351] argparse set_defaults on subcommands should override top level set_defaults In-Reply-To: <1279894012.43.0.0678646409.issue9351@psf.upfronthosting.co.za> Message-ID: <1351602765.73.0.770581636782.issue9351@psf.upfronthosting.co.za> Petri Lehtinen added the comment: LGTM. Steven? ---------- stage: needs patch -> commit review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9351> _______________________________________ From report at bugs.python.org Tue Oct 30 14:12:46 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Tue, 30 Oct 2012 13:12:46 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351602766.33.0.62817486217.issue16344@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Unless Python's grammar is translated into other languages I'm -1 on this. I don't see any use of this. You anyway have to know English to understand the docs and Python's grammar is English. @Ezio melotti >> In some places (like my country, public schools), English is not >> teach formally until the University. > This is very unfortunate -- I was under the impression that teaching > English in middle/high schools was already common in most of the > countries. English is actually oppressing other languages. Schools put a priority on English but not on native languages. Languages must be preserved because they contain culture (in one language, the future is behind because you can't see it and the past is in front of you.) ---------- nosy: +ramchandra.apte _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Tue Oct 30 14:37:31 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 30 Oct 2012 13:37:31 +0000 Subject: [issue16362] _LegalCharsPatt in cookies.py includes illegal characters In-Reply-To: <1351580849.36.0.343039143633.issue16362@psf.upfronthosting.co.za> Message-ID: <1351604251.83.0.86246868834.issue16362@psf.upfronthosting.co.za> R. David Murray added the comment: This is a pragmatic choice. Try searching the tracker for 'cookie comma', and read about the lack of adherence to cookie RFCs by the major browsers. Specifically, I think issue 1210326 is relevant here, and am closing this as a duplicate of that issue. If you disagree, I think we'll need examples from real-world browser/server situations where this is an incorrect choice in order to consider changing it. You will note that the comment block before that equate mentions that it does not follow the RFCs for pragmatic reasons. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> comma separated cookie values _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16362> _______________________________________ From report at bugs.python.org Tue Oct 30 14:40:51 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Tue, 30 Oct 2012 13:40:51 +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: <1351604451.04.0.686307120979.issue16261@psf.upfronthosting.co.za> Changes by Ramchandra Apte <maniandram01 at gmail.com>: ---------- type: -> behavior _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16261> _______________________________________ From report at bugs.python.org Tue Oct 30 14:42:37 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 30 Oct 2012 13:42:37 +0000 Subject: [issue16363] super cannot invoke descriptors In-Reply-To: <1351584479.14.0.539937815992.issue16363@psf.upfronthosting.co.za> Message-ID: <1351604557.6.0.757000178277.issue16363@psf.upfronthosting.co.za> R. David Murray added the comment: I believe this is a duplicate of issue 14965. If you agree please add yourself to nosy there and review the proposed patch and/or make your own proposal. If you think your issue is different you can reopen this one. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> super() and property inheritance behavior _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16363> _______________________________________ From report at bugs.python.org Tue Oct 30 18:58:15 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 30 Oct 2012 17:58:15 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351619895.96.0.381905183819.issue16344@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > Schools put a priority on English but not on native languages. Languages must be preserved because they contain culture Of course, but the main goal of a language is to communicate. As it stand, English is the language which is the most likely to be understood by Python users and developers (I don't count Esperanto ;-). It'll get tricky if in a couple months, we start getting bug reports with traceback in Finnish or French... ---------- nosy: +neologix _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Tue Oct 30 19:30:02 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 30 Oct 2012 18:30:02 +0000 Subject: [issue16338] pysnmp/asyncore - timeout ineffective? In-Reply-To: <1351356300.75.0.420247508313.issue16338@psf.upfronthosting.co.za> Message-ID: <1351621802.18.0.878495874038.issue16338@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: It's a little too vague :-) You should probably report this on pysnmp mailing list. If you want to debug this, you should perform a tcpdump/wireshark capture while running your script, and see what happens (according to your description, it may simply be that the remote snmp agent takes too long to answer, maybe because of a loaded machine, crappy network, of NFS mounts timeouts on the target host). ---------- nosy: +neologix _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16338> _______________________________________ From report at bugs.python.org Tue Oct 30 19:38:16 2012 From: report at bugs.python.org (Brett Cannon) Date: Tue, 30 Oct 2012 18:38:16 +0000 Subject: [issue10966] eliminate use of ImportError implicitly representing SkipTest In-Reply-To: <1295566830.75.0.786153857799.issue10966@psf.upfronthosting.co.za> Message-ID: <1351622296.1.0.578597461389.issue10966@psf.upfronthosting.co.za> Changes by Brett Cannon <brett at python.org>: ---------- assignee: -> brett.cannon _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10966> _______________________________________ From report at bugs.python.org Tue Oct 30 19:38:19 2012 From: report at bugs.python.org (Brett Cannon) Date: Tue, 30 Oct 2012 18:38:19 +0000 Subject: [issue10966] eliminate use of ImportError implicitly representing SkipTest In-Reply-To: <1295566830.75.0.786153857799.issue10966@psf.upfronthosting.co.za> Message-ID: <1351622299.99.0.0954204632575.issue10966@psf.upfronthosting.co.za> Changes by Brett Cannon <brett at python.org>: ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue10966> _______________________________________ From report at bugs.python.org Tue Oct 30 19:52:15 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Oct 2012 18:52:15 +0000 Subject: [issue16361] HTTPS/TLS Problem in Python 3.3 In-Reply-To: <1351551122.11.0.0678496091034.issue16361@psf.upfronthosting.co.za> Message-ID: <1351623135.08.0.180525544837.issue16361@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Your script works for me under Linux with Python 3.2, 3.3 and 3.4. Perhaps the problem has to do with the version of OpenSSL that we package Windows binaries with? My OpenSSL version here (as given by ssl.OPENSSL_VERSION) is 'OpenSSL 1.0.0d 8 Feb 2011'. ---------- components: +Windows nosy: +loewis versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16361> _______________________________________ From report at bugs.python.org Tue Oct 30 19:52:44 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Oct 2012 18:52:44 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351623164.92.0.458244591011.issue16344@psf.upfronthosting.co.za> Terry J. Reedy added the comment: >It'll get tricky if in a couple months, we start getting bug reports with traceback in Finnish or French... That is another reason to *always* output the standard English message first. I think this was discussed a couple of years ago on PyDev, or maybe another issue. I think the proposal to *replace* English messages should be rejected. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Tue Oct 30 20:18:10 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Oct 2012 19:18:10 +0000 Subject: [issue16361] HTTPS/TLS Problem in Python 3.3 In-Reply-To: <1351551122.11.0.0678496091034.issue16361@psf.upfronthosting.co.za> Message-ID: <1351624690.08.0.250036025335.issue16361@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It looks like we use OpenSSL 1.0.1c for Python 3.3 Windows builds, which would explain the different Client Hello. In your capture, the client identifies itself as TLS 1.2, while on my Linux box it's TLS 1.0. I'm uploading the decoded protocol tree of the two handshakes. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16361> _______________________________________ From report at bugs.python.org Tue Oct 30 20:18:17 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Oct 2012 19:18:17 +0000 Subject: [issue16361] HTTPS/TLS Problem in Python 3.3 In-Reply-To: <1351551122.11.0.0678496091034.issue16361@psf.upfronthosting.co.za> Message-ID: <1351624697.73.0.0404506396946.issue16361@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: Added file: http://bugs.python.org/file27796/linux-tls10-handshake.txt _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16361> _______________________________________ From report at bugs.python.org Tue Oct 30 20:18:24 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Oct 2012 19:18:24 +0000 Subject: [issue16361] HTTPS/TLS Problem in Python 3.3 In-Reply-To: <1351551122.11.0.0678496091034.issue16361@psf.upfronthosting.co.za> Message-ID: <1351624704.09.0.933836195735.issue16361@psf.upfronthosting.co.za> Changes by Antoine Pitrou <pitrou at free.fr>: Added file: http://bugs.python.org/file27797/windows-tls12-handshake.txt _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16361> _______________________________________ From report at bugs.python.org Tue Oct 30 20:21:39 2012 From: report at bugs.python.org (Abhijeet Joshi) Date: Tue, 30 Oct 2012 19:21:39 +0000 Subject: [issue16365] IDLE for Windows 8 Message-ID: <1351624899.92.0.657222579655.issue16365@psf.upfronthosting.co.za> New submission from Abhijeet Joshi: Hello, I have installed Idle for python 3.3 on windows 8 and trying to open the GUI but unable to open anything. The screen doesn't show up on monitor. Please help me here. Thanks Abhijeet ---------- components: IDLE messages: 174217 nosy: jabhijeet priority: normal severity: normal status: open title: IDLE for Windows 8 type: behavior versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16365> _______________________________________ From report at bugs.python.org Tue Oct 30 20:24:57 2012 From: report at bugs.python.org (Zachary Ware) Date: Tue, 30 Oct 2012 19:24:57 +0000 Subject: [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <1351625097.84.0.468331867865.issue16197@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks for the commit! 3.2 looks good now. 3.3 and default still need a little work, though; the docstrings still say "WindowsError" instead of "OSError" and the docs say "a OSError" instead of "an OSError". The attached patch cleans up both issues, as well as consolidating all the versionchanged notices about WindowsError == OSError. ---------- resolution: fixed -> status: closed -> open Added file: http://bugs.python.org/file27798/winreg_3.3+.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16197> _______________________________________ From report at bugs.python.org Tue Oct 30 20:44:25 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Oct 2012 19:44:25 +0000 Subject: [issue16361] HTTPS/TLS Problem in Python 3.3 In-Reply-To: <1351551122.11.0.0678496091034.issue16361@psf.upfronthosting.co.za> Message-ID: <1351626265.66.0.556843609113.issue16361@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Note that you could work around the issue by forcing a lower SSL version: ssl_context = ssl.SSLContext(ssl.PROTOCOL_SSLv3) opener = urllib.request.build_opener( urllib.request.HTTPCookieProcessor(cj), urllib.request.HTTPSHandler(context=ssl_context)) urllib.request.install_opener(opener) (I would suggest doing this only for this particular HTTPS site, not globally, since using a lower SSL version may make the exchanges potentially less secure) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16361> _______________________________________ From report at bugs.python.org Tue Oct 30 20:50:42 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Oct 2012 19:50:42 +0000 Subject: [issue1553375] Add traceback.print_full_exception() Message-ID: <1351626642.93.0.529952488612.issue1553375@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I recently re-wrote something like this, so I think this is useful. I wonder if it wouldn't be nice to add a caret or some similar marker indicating the frame where the exception was caught, e.g.: Traceback (most recent call last, catch point highlighted): File "testmod.py", line 13, in <module> upper() > File "testmod.py", line 11, in upper foo() File "testmod.py", line 6, in foo raise Exception Exception ---------- nosy: +pitrou versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1553375> _______________________________________ From report at bugs.python.org Tue Oct 30 20:56:56 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Oct 2012 19:56:56 +0000 Subject: [issue16341] In examples, "except:" should use new syntax In-Reply-To: <1351389520.62.0.621289823852.issue16341@psf.upfronthosting.co.za> Message-ID: <3Xrk3C6QRpzRHj@mail.python.org> Roundup Robot added the comment: New changeset 4e9617d3c514 by Andrew Svetlov in branch '2.7': Issue #16341: convert examples to use except ... as ... syntax. http://hg.python.org/cpython/rev/4e9617d3c514 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16341> _______________________________________ From report at bugs.python.org Tue Oct 30 20:57:23 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 30 Oct 2012 19:57:23 +0000 Subject: [issue16341] In examples, "except:" should use new syntax In-Reply-To: <1351389520.62.0.621289823852.issue16341@psf.upfronthosting.co.za> Message-ID: <1351627043.02.0.973699730169.issue16341@psf.upfronthosting.co.za> Changes by Andrew Svetlov <andrew.svetlov at gmail.com>: ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16341> _______________________________________ From report at bugs.python.org Tue Oct 30 21:00:29 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Oct 2012 20:00:29 +0000 Subject: [issue16366] _handleError not very informative Message-ID: <1351627229.78.0.21301171659.issue16366@psf.upfronthosting.co.za> New submission from Antoine Pitrou: logging's _handleError will tell you in which code line the error happened, but it's not very useful when application code has its own logging wrappers. You need more of the stack to get useful information. The attached script showcases this, along with a possible solution. ---------- components: Library (Lib) files: log.py messages: 174222 nosy: pitrou, vinay.sajip priority: normal severity: normal status: open title: _handleError not very informative type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27799/log.py _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16366> _______________________________________ From report at bugs.python.org Tue Oct 30 21:07:03 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 30 Oct 2012 20:07:03 +0000 Subject: [issue1553375] Add traceback.print_full_exception() Message-ID: <1351627623.61.0.537036129327.issue1553375@psf.upfronthosting.co.za> Changes by Andrew Svetlov <andrew.svetlov at gmail.com>: ---------- nosy: +asvetlov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue1553375> _______________________________________ From report at bugs.python.org Tue Oct 30 21:21:14 2012 From: report at bugs.python.org (Ronny Pfannschmidt) Date: Tue, 30 Oct 2012 20:21:14 +0000 Subject: [issue14965] super() and property inheritance behavior In-Reply-To: <1338433441.66.0.975494137492.issue14965@psf.upfronthosting.co.za> Message-ID: <1351628474.47.0.0893802841052.issue14965@psf.upfronthosting.co.za> Changes by Ronny Pfannschmidt <ronny.pfannschmidt at gmail.com>: ---------- nosy: +Ronny.Pfannschmidt _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14965> _______________________________________ From report at bugs.python.org Tue Oct 30 21:29:34 2012 From: report at bugs.python.org (Roger Serwy) Date: Tue, 30 Oct 2012 20:29:34 +0000 Subject: [issue16365] IDLE for Windows 8 In-Reply-To: <1351624899.92.0.657222579655.issue16365@psf.upfronthosting.co.za> Message-ID: <1351628974.73.0.469288282524.issue16365@psf.upfronthosting.co.za> Roger Serwy added the comment: Can you launch Python from a command line and then launch IDLE from there? cd c:\python33 python After python starts, enter the following: import idlelib.idle ---------- nosy: +serwy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16365> _______________________________________ From report at bugs.python.org Tue Oct 30 21:36:19 2012 From: report at bugs.python.org (Abhijeet Joshi) Date: Tue, 30 Oct 2012 20:36:19 +0000 Subject: [issue16365] IDLE for Windows 8 In-Reply-To: <1351624899.92.0.657222579655.issue16365@psf.upfronthosting.co.za> Message-ID: <1351629379.88.0.248932510097.issue16365@psf.upfronthosting.co.za> Abhijeet Joshi added the comment: Thanks for your reply. I have tried re-installing it 3-4 times and it started working now. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16365> _______________________________________ From report at bugs.python.org Tue Oct 30 21:46:31 2012 From: report at bugs.python.org (Andy Salnikov) Date: Tue, 30 Oct 2012 20:46:31 +0000 Subject: [issue16326] distutils build_ext fails to set library_dirs in 2.7.2 on Linux In-Reply-To: <1351194264.28.0.869819451271.issue16326@psf.upfronthosting.co.za> Message-ID: <1351629991.22.0.0461042036667.issue16326@psf.upfronthosting.co.za> Andy Salnikov added the comment: Hi ?ric, I am attaching a patch that fixes the problem. The patch is tiny, basically 1-line. This replaces the direct use of sys.executable with the symlink-resolved version of the same path. I made the change for linux/unix platforms and also for cygwin/atheos (I'm sure cygwin has symlinks, not sure if atheos does but resolving symlinks can't hurt in general). The patch was created from default hg branch (3.4.0a0 I guess), I have built it and tested in my simple setup. The problem that we have (in 2.7) is indeed reproducible without this patch and it is fixed with this patch applied. Concerning the unit test - I'm not sure how to write one but if you have suggestions I could try. The complications in this case are that python needs to be installed in its configured location and the symlink needs to be created outside python install directory which points to the installed interpreter. If unit test could handle this then it might be possible. I did not update any documentation, could not find any place to mention this change. Sure you will know better what else is needed to be updated. I'd be happy to help you with whatever else is necessary to commit this patch. Cheers, Andy ---------- keywords: +patch Added file: http://bugs.python.org/file27800/distutils-sysexecutable.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16326> _______________________________________ From report at bugs.python.org Tue Oct 30 21:48:21 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 30 Oct 2012 20:48:21 +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: <1351630101.64.0.432924011481.issue15721@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Amaury, you are right: PyTclObject_Type_slots[3].pfunc = PyObject_GenericGetAttr; is not required. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15721> _______________________________________ From report at bugs.python.org Tue Oct 30 21:49:29 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Oct 2012 20:49:29 +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: <3XrlCr3RwVzRKc@mail.python.org> Roundup Robot added the comment: New changeset 4eb6e07e8171 by Andrew Svetlov in branch 'default': Issue #15721: apply PEP 384 Refactoring to tkinter module. http://hg.python.org/cpython/rev/4eb6e07e8171 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15721> _______________________________________ From report at bugs.python.org Tue Oct 30 22:15:03 2012 From: report at bugs.python.org (Roger Serwy) Date: Tue, 30 Oct 2012 21:15:03 +0000 Subject: [issue16365] IDLE for Windows 8 In-Reply-To: <1351624899.92.0.657222579655.issue16365@psf.upfronthosting.co.za> Message-ID: <1351631703.69.0.350035410919.issue16365@psf.upfronthosting.co.za> Roger Serwy added the comment: I wonder if there is a bug in the Python installer on the new Windows 8 platform, though it is unlikely. I will leave this issue open for Windows 8 developers to comment. (I don't have Win8 for testing just yet.) Feel free to close. ---------- components: +Installation, Windows nosy: +brian.curtin, tim.golden _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16365> _______________________________________ From report at bugs.python.org Tue Oct 30 22:28:44 2012 From: report at bugs.python.org (Abhijeet Joshi) Date: Tue, 30 Oct 2012 21:28:44 +0000 Subject: [issue16365] IDLE for Windows 8 In-Reply-To: <1351624899.92.0.657222579655.issue16365@psf.upfronthosting.co.za> Message-ID: <1351632524.23.0.431315300274.issue16365@psf.upfronthosting.co.za> Abhijeet Joshi added the comment: will leave it open so that some win8 developer will check it out. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16365> _______________________________________ From report at bugs.python.org Tue Oct 30 22:46:56 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Oct 2012 21:46:56 +0000 Subject: [issue16351] Add a function to get GC statistics In-Reply-To: <1351445420.88.0.605881847233.issue16351@psf.upfronthosting.co.za> Message-ID: <3XrmV74p1rzRG4@mail.python.org> Roundup Robot added the comment: New changeset 43d87cdf9457 by Antoine Pitrou in branch 'default': Issue #16351: New function gc.get_stats() returns per-generation collection statistics. http://hg.python.org/cpython/rev/43d87cdf9457 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16351> _______________________________________ From report at bugs.python.org Tue Oct 30 22:47:16 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Oct 2012 21:47:16 +0000 Subject: [issue16351] Add a function to get GC statistics In-Reply-To: <1351445420.88.0.605881847233.issue16351@psf.upfronthosting.co.za> Message-ID: <1351633636.81.0.819850273139.issue16351@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Now committed. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16351> _______________________________________ From report at bugs.python.org Tue Oct 30 22:56:24 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Oct 2012 21:56:24 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351634184.91.0.215775778144.issue16344@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > You anyway have to know English to understand the docs and Python's > grammar is English. I don't think Python's grammar is relevant. I took my first steps in programming when I was around 10 and I barely knew English at the time, it didn't stop me from mastering "FOR i = 1 TO N ;... NEXT i" :-) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Tue Oct 30 23:24:09 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Oct 2012 22:24:09 +0000 Subject: [issue14625] Faster utf-32 decoder In-Reply-To: <1334869197.32.0.159275934867.issue14625@psf.upfronthosting.co.za> Message-ID: <3XrnK51DvJzRG8@mail.python.org> Roundup Robot added the comment: New changeset 9badfe3a31a7 by Victor Stinner in branch 'default': Close #14625: Rewrite the UTF-32 decoder. It is now 3x to 4x faster http://hg.python.org/cpython/rev/9badfe3a31a7 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14625> _______________________________________ From report at bugs.python.org Tue Oct 30 23:26:24 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2012 22:26:24 +0000 Subject: [issue14625] Faster utf-32 decoder In-Reply-To: <1334869197.32.0.159275934867.issue14625@psf.upfronthosting.co.za> Message-ID: <1351635984.21.0.136503278323.issue14625@psf.upfronthosting.co.za> STINNER Victor added the comment: I applied the patch "A" with minor changes: replace multiple goto with classic break/continue and if/else. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14625> _______________________________________ From report at bugs.python.org Tue Oct 30 23:28:58 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 30 Oct 2012 22:28:58 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351636138.29.0.0152211790858.issue16344@psf.upfronthosting.co.za> Changes by R. David Murray <rdmurray at bitdance.com>: ---------- nosy: +r.david.murray _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Tue Oct 30 23:42:26 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Oct 2012 22:42:26 +0000 Subject: [issue16086] tp_flags: Undefined behaviour with 32 bits long In-Reply-To: <1348934655.6.0.704339106877.issue16086@psf.upfronthosting.co.za> Message-ID: <3Xrnk94fRlzRDc@mail.python.org> Roundup Robot added the comment: New changeset 10795aac6df7 by Victor Stinner in branch 'default': Issue #16086: PyTypeObject.tp_flags and PyType_Spec.flags are now unsigned http://hg.python.org/cpython/rev/10795aac6df7 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16086> _______________________________________ From report at bugs.python.org Tue Oct 30 23:56:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2012 22:56:01 +0000 Subject: [issue16351] Add a function to get GC statistics In-Reply-To: <1351445420.88.0.605881847233.issue16351@psf.upfronthosting.co.za> Message-ID: <1351637761.92.0.831994903299.issue16351@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Because it's much simpler like that. Well, I wrote a patch with structure sequences, it is really much more expansive. I have some comments. 1. You can allocate list of NUM_GENERATIONS elements and then use PyList_SET_ITEM(result, i, stat). This is 4 lines shorter. 2. And may be return the tuple? get_count() and get_threshold() return tuples. 3. You forgot to add get_stats() to the module docstring. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16351> _______________________________________ From report at bugs.python.org Wed Oct 31 00:00:21 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 30 Oct 2012 23:00:21 +0000 Subject: [issue16268] dir(closure) does not find __dir__ In-Reply-To: <1350500710.5.0.876584221442.issue16268@psf.upfronthosting.co.za> Message-ID: <1351638021.04.0.893582845542.issue16268@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The same fix, but with a unit test. Note that object.__dir__ did not exist in previous versions, but I found a similar failure with __format__, which also applies to 2.7. ---------- nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file27801/init_cell_type-2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16268> _______________________________________ From report at bugs.python.org Wed Oct 31 00:00:30 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 30 Oct 2012 23:00:30 +0000 Subject: [issue16268] dir(closure) does not find __dir__ In-Reply-To: <1350500710.5.0.876584221442.issue16268@psf.upfronthosting.co.za> Message-ID: <1351638030.85.0.123846946958.issue16268@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc <amauryfa at gmail.com>: ---------- stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16268> _______________________________________ From report at bugs.python.org Wed Oct 31 00:13:14 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2012 23:13:14 +0000 Subject: [issue16086] tp_flags: Undefined behaviour with 32 bits long In-Reply-To: <1348934655.6.0.704339106877.issue16086@psf.upfronthosting.co.za> Message-ID: <1351638794.22.0.848557023369.issue16086@psf.upfronthosting.co.za> Changes by STINNER Victor <victor.stinner at gmail.com>: ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16086> _______________________________________ From report at bugs.python.org Wed Oct 31 00:17:20 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2012 23:17:20 +0000 Subject: [issue16311] Use _PyUnicodeWriter API in text decoders In-Reply-To: <1351558952.83.0.460277416214.issue16311@psf.upfronthosting.co.za> Message-ID: <201210310117.04396.storchaka@gmail.com> Serhiy Storchaka added the comment: I will do some experiments and review tomorrow. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16311> _______________________________________ From report at bugs.python.org Wed Oct 31 00:27:45 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2012 23:27:45 +0000 Subject: [issue14625] Faster utf-32 decoder In-Reply-To: <1351635984.21.0.136503278323.issue14625@psf.upfronthosting.co.za> Message-ID: <201210310127.32672.storchaka@gmail.com> Serhiy Storchaka added the comment: > I applied the patch "A" with minor changes: replace multiple goto with > classic break/continue and if/else. Looks good. Thanks. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14625> _______________________________________ From report at bugs.python.org Wed Oct 31 00:28:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2012 23:28:30 +0000 Subject: [issue16086] tp_flags: Undefined behaviour with 32 bits long In-Reply-To: <1348934655.6.0.704339106877.issue16086@psf.upfronthosting.co.za> Message-ID: <1351639710.8.0.405265984338.issue16086@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Note that Py_TPFLAGS_INT_SUBCLASS already not used in Python 3.x. One bit of tp_flags can be freed. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16086> _______________________________________ From report at bugs.python.org Wed Oct 31 00:30:51 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2012 23:30:51 +0000 Subject: [issue16086] tp_flags: Undefined behaviour with 32 bits long In-Reply-To: <1348934655.6.0.704339106877.issue16086@psf.upfronthosting.co.za> Message-ID: <1351639851.85.0.0892087996831.issue16086@psf.upfronthosting.co.za> STINNER Victor added the comment: > Note that Py_TPFLAGS_INT_SUBCLASS already not used in Python 3.x. One bit of tp_flags can be freed. Please open a new issue if you consider this issue important enough. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16086> _______________________________________ From report at bugs.python.org Wed Oct 31 00:31:56 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2012 23:31:56 +0000 Subject: [issue16086] tp_flags: Undefined behaviour with 32 bits long In-Reply-To: <1348934655.6.0.704339106877.issue16086@psf.upfronthosting.co.za> Message-ID: <1351639916.75.0.591590524422.issue16086@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue9307. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16086> _______________________________________ From report at bugs.python.org Wed Oct 31 00:39:12 2012 From: report at bugs.python.org (Mariano Reingart) Date: Tue, 30 Oct 2012 23:39:12 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351640352.62.0.184930926213.issue16344@psf.upfronthosting.co.za> Mariano Reingart added the comment: Sorry for taking so long to replying, and for this long follow up... > Antoine Pitrou added the comment: > I think the PEP should be proposed on python-dev or python-ideas. > Also, it's probably better if the PEP is encoded in utf-8, not > latin-1. Ok, I'll update, polish, encode in utf-8 and send to python-dev It was already discussed in Python-ideas (maybe not in particular/detail), but it seems that no one have more to add there, or they are bussy with the Async API :-). > Terry J. Reedy added the comment: > I am sympathetic with non-English speakers wanting a native-language > translation. Sympathetic is a kind of compassion? It may be a correct meaning here. Just read that almost every of you complain arguing that you'll hesitate because you can/could receive a message in a foreign language that could not understand. Well, that's is what is already happening to non-English speakers of the python language IMHO. And it is not just frustrating, sometimes it is also a wasting of time because of the distractions and delays it produces. > But I think the interpreter should *always* emit the standard message > and that any translation should be an addition, not a replacement. > This would maintain discoverablity and help people learn the English > version, not hinder it. I'll explore the alternatives to show both messages (original and translated), but I think that would be more confusing. I do not think that it hinders the meaning, it just translates it, and I didn't see any other language / tool that puts both messages, but I'll investigate more (maybe the exception name -that is untranslated- plus an error code like in PostgreSQL would be more helpful to discoverablity) Learning English by showing both messages may be a interesting experiment, but, for me, it's like traditional education focus on "memorizing" things instead of understanding them, and depending on the context, it can be lead to good results or misleading repetition. > The real question to me is how deep in the interpreter such support > should go. Third party shells can (and sometimes do) intercept > tracebacks and reformat (and translate) as they wish. But there would > be advantages and disadvanteges is adding the translation sooner. About except hook approach, it doesn't work very reliable because you don't have the original unformatted message, so you have to interpolate the results to find the correct translation. Beside that it will be slower and it could be error prone, the main problem is not technical, but "social", as it could lead to translation effort duplication, segregation and proliferation of custom tools, with the aggravation that in some scenarios except hook is not honoured: http://bugs.python.org/issue12643 (just an example) You can take a look at one of my attempt trying to translate using interpolation (my algorithm is some kind of brute force "guessing" using regular expressions just to test the idea): http://code.google.com/p/pydiversity/source/browse/__diversity__/__init__.py I think that approach "left in the wild" (and/or "do it yourself") is not only more complex, also it could be more dangerous that having a unified translation resources, where all messages all listed, a common infrastructure is used and general rules are agreed. > Ezio Melotti added the comment: > There are two solutions to this problem: > 1) adapt the language to the users; > 2) teach the users English; > > While the first (i.e. what you are proposing) works as a short term > solution, I believe the second is a much better long term solution, > because IMHO users will anyway have to learn English sooner or later. Teach the users English may be an altruist goal in the long term, but for many teachers (like my case) it a barrier right now that can tip the balance to other "more friendly languages" Anyway, and don't get me wrong, but, force novice users to learn a second language, aside it is likely impractical, it may sound at least rude, ethnocentric or as a neocolonialism in some contexts (if we want to go further...). Education takes a lot of resources, I don't think it would happen just showing some English messages (BTW, English may be one of the most difficult languages to learn as a second tongue, depending on the part of the world you live... at least in my country you only can archive an acceptable skill before 6 to 9 years, depending your age and other socio-economical factors) IMHO, it would be more encouraging a message like "we can help you in your first programming steps with python localized for your language, but please consider to learn English to better communicate in the international community" > I've seen buildbots reporting unintelligible error messages in > German, and just a few days ago I even came across a mercurial > version in Russian. Well, I think this only reinforces my point. Ignoring that many people out there are localizing their products/projects will not solve that problem either. Being more aware of internationalization tools could do the trick, not only for python tracebacks, also for third-party modules/libraries that are currently translating their messages. > It makes somewhat sense to translate OS error messages, because they > are read by regular users that have a localized OS and expect > localized messages. The same could be said for bash, even if the > distinction between "regular users" and "developers" starts to fade a > bit here. Exact. Please, consider that 11-year old pupils learning to program a Robot or or 16-year old students trying to understand a simple algorithm, are users too. Many maybe will continue with the IT / CS career, if we do a good work ;-) Those that continues working on programming will surely be exposed sooner or later to formal technical English course at University or similar. But, if they don't continue their studies, or choose a different career, maybe their English skill will never be enough. > For example the other day I saw a student confused by this error message: >>>> a, b = 1, 2, 3 > ValueError: too many values to unpack (expected 2) > > The offender here is most likely the word "unpack". "Unpack" is > closely related to the concept of tuple unpacking, so if the student > is aware of what tuple unpacking is, he might fail to associate the > problem with it if the error uses another word. In addition, I can > not think of any word that might be a suitable translation for > "unpack" in my native language. In Spanish "desempaquetar" could > maybe be used, but I'm not sure how well it works. Enhancing some cryptic exception messages can be a parallel job and could be beneficed from the different points of view that opens internationalization in different languages. Here, as you point, translation poses a new perspective, why take that as a threat instead of an opportunity to bring better messages? I don't agree that this is a beginner-only problem. I remember an occasion where finishing a coding-dojo, a syntax error was raised and the attendee could not complete their work. We (a University Teacher, a Teaching Assistant and a Core Developer!) spent a lot of time to discover that it was caused by changing 07 to 08. Of course, the "SyntaxError: invalid token" was not helpful because the nice editor didn't printed the traceback in a correct monoespaced font (btw, it take a while to understand why the ^ was pointing the 8)... Anyway, a better error like "SyntaxError: invalid token for octal representation" would be more helpful, even in English ;-) So the argument "the exception must be in English" to be able to google it may be weak at least (apart from some incompleteness, exception message depends on its context and is just a part of the whole traceback, they change over the time on some occasions, and they may be difficult to copy&paste correctly...). In the other hand, localized error messages could eventually produce better search results for non-English speakers if there is enough material written in they language. You can take a look at this and other nice examples I've recollected so far (incomplete, of course): http://python.org.ar/pyar/MensajesExcepcionales >> The mechanism to restore the language is the common one ... > > It's not difficult to change, but you would have to remember how to > do it and what LC_* variable you should change. Assuming this gets > implemented it would most likely require a command line parameter > and an envvar too. First: this proposal doesn't enables translation per default Second: if this proposal get implemented, you don't need even to install the translation files! (so translation cannot be turned on by accident) Third: isn't this a small price to pay for advanced users (just changing a locale setting, if ever are required to do so), in comparison that it could open/enhance python to new languages and users? >> If PostgreSQL and other tools could do that, why Python could not? > > Does any other popular programming language do it? And if so, how? Does other popular language uses indentation instead of brackets? I doubt topics like this can be compared directly (due some differences in communities, goals, etc.), but I've did a quick search and I found this: .NET support internationalization with a special mechanism called Culture (similar to locale/gettext) AFAIK it is done by default and embedded in the platform and system libraries. They even have a "exception message design guideline" where they says "Localizing the error message helps non-English speakers feel more comfortable on our platform. " Some argues that is not easy to disable this feature to get English only message. Other pitfalls are that if the resource file is missing, it can produce incorrect error messages instead of showing the English one (both things should not happen here as gettext is somewhat more manageable) Other benefits/objections presented are similar to the ones discussed here, for example: http://blogs.msdn.com/b/brada/archive/2004/01/28/64255.aspx Java has a Throwable.getLocalizedMessage(), hence, the dual approach, but AFAIK it is mainly unimplemented (at least for system libraries and internal exceptions). It is not an automatic approach (its depend on ResourceBundle, MessageFormat, etc) so it is not easy to implement anyway. > Ramchandra Apte added the comment: > Unless Python's grammar is translated into other languages I'm -1 > on this. I think python grammar is not comparable to English grammar. I've already pointed, for example, a similar approach like in PostgreSQL where SQL sentences were not translated. > I don't see any use of this. You anyway have to know English > to understand the docs and Python's grammar is English. Keywords are similar to English words, but that is all (some are even not English words like __rmul__) You don't need to know how to write correct English sentences to write python code, or am I missing something? Punctuation is different too. That most of documentation is not translated is not an excuse to me. At least some part should be translated too, as for example, the Python Tutorial was translated by the local community to Spanish: http://docs.python.org.ar/tutorial/contenido.html > Terry J. Reedy added the comment: > >>It'll get tricky if in a couple months, we start getting bug reports >>with traceback in Finnish or French... > > That is another reason to *always* output the standard English message > first. I think this was discussed a couple of years ago on PyDev, or > maybe another issue. I think the proposal to *replace* English > messages should be rejected. I think it is unlikely to receive a bug report from any person that turns on translation because he doesn't understand the language. How could he/she even write the email/issue in the first place? Again, this can be seen as an opportunity to foster local/regional users groups, not as a disadvantageousness. It will be easier for an non-English speaker to communicate in their own tongue with regional advanced users, and then they can find a way to help him to submit the bug report in English, if appropriate. IMHO this can improve the language and their international community via cooperation and diversity. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Wed Oct 31 00:43:07 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2012 23:43:07 +0000 Subject: [issue16367] io.FileIO.readall() is not 64-bit safe on Windows Message-ID: <1351640587.41.0.234658150745.issue16367@psf.upfronthosting.co.za> New submission from STINNER Victor: The changeset 374dc910db33 fixed FileIO.readinto(), FileIO.write() and os.write() on Windows for issues #9015, #9611, but FileIO.readall() was not fixed and it has a similar bug. It uses "int n;" to store the result of read(), so FileIO.readall() may also fail to read a file longer than 2 GB on other platforms. Attached patch should fix both issues. ---------- components: Library (Lib) files: fileio_readall.patch keywords: patch messages: 174244 nosy: haypo, pitrou priority: normal severity: normal status: open title: io.FileIO.readall() is not 64-bit safe on Windows versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27802/fileio_readall.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16367> _______________________________________ From report at bugs.python.org Wed Oct 31 01:07:07 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 00:07:07 +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: <3Xrqbt6cSdzR75@mail.python.org> Roundup Robot added the comment: New changeset 01cc9fb52887 by Victor Stinner in branch 'default': Issue #15478: Fix test_os on Windows (os.chown is missing) http://hg.python.org/cpython/rev/01cc9fb52887 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15478> _______________________________________ From report at bugs.python.org Wed Oct 31 01:07:08 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 00:07:08 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <3Xrqbv4zGzzR75@mail.python.org> Roundup Robot added the comment: New changeset 96fc87997ce9 by Victor Stinner in branch 'default': Issue #9566: Explicit downcast to fix compiler warnings on Win64 http://hg.python.org/cpython/rev/96fc87997ce9 New changeset dabe2486e2ce by Victor Stinner in branch 'default': Issue #9566: Use the right type to fix a compiler warnings on Win64 http://hg.python.org/cpython/rev/dabe2486e2ce ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9566> _______________________________________ From report at bugs.python.org Wed Oct 31 01:09:15 2012 From: report at bugs.python.org (Tom Kuiper) Date: Wed, 31 Oct 2012 00:09:15 +0000 Subject: [issue16368] error when logging message Message-ID: <1351642153.65.0.00343224829929.issue16368@psf.upfronthosting.co.za> New submission from Tom Kuiper: This error comes from the logging module when a message is logged, but only when I also import another module which does use logging at all: Traceback (most recent call last): File "/usr/lib/python2.6/logging/__init__.py", line 776, in emit msg = self.format(record) File "/usr/lib/python2.6/logging/__init__.py", line 654, in format return fmt.format(record) File "/usr/lib/python2.6/logging/__init__.py", line 437, in format if string.find(self._fmt,"%(asctime)") >= 0: File "/usr/lib/python2.6/string.py", line 361, in find return s.find(*args) AttributeError: 'int' object has no attribute 'find' The module source is attached. Some of it's submodules were built with f2py. ---------- components: Library (Lib) files: __init__.py messages: 174247 nosy: kuiper priority: normal severity: normal status: open title: error when logging message type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file27803/__init__.py _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16368> _______________________________________ From report at bugs.python.org Wed Oct 31 01:13:03 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 00:13:03 +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: <3Xrqkk4pWjzPk0@mail.python.org> Roundup Robot added the comment: New changeset ef87bd0797de by Victor Stinner in branch 'default': Issue #15478: Fix test_os on FreeBSD http://hg.python.org/cpython/rev/ef87bd0797de ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15478> _______________________________________ From report at bugs.python.org Wed Oct 31 01:21:26 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 00:21:26 +0000 Subject: [issue12890] cgitb displays <p> tags when executed in text mode In-Reply-To: <1315016521.13.0.175763253408.issue12890@psf.upfronthosting.co.za> Message-ID: <3XrqwP53KCzR4V@mail.python.org> Roundup Robot added the comment: New changeset 7648b7ed6d91 by R David Murray in branch '3.3': #12890: fix test on windows http://hg.python.org/cpython/rev/7648b7ed6d91 New changeset d24befb680d6 by R David Murray in branch 'default': #12890: fix test on windows http://hg.python.org/cpython/rev/d24befb680d6 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12890> _______________________________________ From report at bugs.python.org Wed Oct 31 01:22:24 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 31 Oct 2012 00:22:24 +0000 Subject: [issue12890] cgitb displays <p> tags when executed in text mode In-Reply-To: <1315016521.13.0.175763253408.issue12890@psf.upfronthosting.co.za> Message-ID: <1351642944.21.0.762848468202.issue12890@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks everyone. ---------- stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12890> _______________________________________ From report at bugs.python.org Wed Oct 31 01:29:38 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 31 Oct 2012 00:29:38 +0000 Subject: [issue16368] error when logging message In-Reply-To: <1351642153.65.0.00343224829929.issue16368@psf.upfronthosting.co.za> Message-ID: <1351643378.18.0.563956014627.issue16368@psf.upfronthosting.co.za> R. David Murray added the comment: Do none of those submodules import logging? It is unlikely that this is a Python bug. Somewhere _fmt is getting set to an integer. The way to prove this one way or another is to start deleting things until you find the code that is triggering the issue. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> pending _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16368> _______________________________________ From report at bugs.python.org Wed Oct 31 01:36:19 2012 From: report at bugs.python.org (Tom Kuiper) Date: Wed, 31 Oct 2012 00:36:19 +0000 Subject: [issue16368] error when logging message In-Reply-To: <1351643378.18.0.563956014627.issue16368@psf.upfronthosting.co.za> Message-ID: <5090727D.2000706@jpl.nasa.gov> Tom Kuiper added the comment: Give me a few moments to dig further. I may have found the submodule culprit. Checking. Tom On 10/30/2012 05:29 PM, R. David Murray wrote: > R. David Murray added the comment: > > Do none of those submodules import logging? > > It is unlikely that this is a Python bug. Somewhere _fmt is getting set to an integer. The way to prove this one way or another is to start deleting things until you find the code that is triggering the issue. > > ---------- > nosy: +r.david.murray > resolution: -> invalid > stage: -> committed/rejected > status: open -> pending > > _______________________________________ > Python tracker<report at bugs.python.org> > <http://bugs.python.org/issue16368> > _______________________________________ > ---------- status: pending -> open _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16368> _______________________________________ From report at bugs.python.org Wed Oct 31 01:44:59 2012 From: report at bugs.python.org (Tom Kuiper) Date: Wed, 31 Oct 2012 00:44:59 +0000 Subject: [issue16368] error when logging message In-Reply-To: <1351643378.18.0.563956014627.issue16368@psf.upfronthosting.co.za> Message-ID: <50907486.30800@jpl.nasa.gov> Tom Kuiper added the comment: On 10/30/2012 05:29 PM, R. David Murray wrote: > R. David Murray added the comment: > > Do none of those submodules import logging? > > It is unlikely that this is a Python bug. Somewhere _fmt is getting set to an integer. The way to prove this one way or another is to start deleting things until you find the code that is triggering the issue. > After tortuous digging I found a subsubmodule that does this: import logging logging_options = [logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR, logging.CRITICAL] logging_level = logging_options[2] logging.basicConfig(format=logging_level) Commenting out that last line fixed the problem. I've now cleared out all the code shown here. Thanks for the tip. Tom > ---------- > nosy: +r.david.murray > resolution: -> invalid > stage: -> committed/rejected > status: open -> pending > > _______________________________________ > Python tracker<report at bugs.python.org> > <http://bugs.python.org/issue16368> > _______________________________________ > ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16368> _______________________________________ From report at bugs.python.org Wed Oct 31 02:37:11 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 31 Oct 2012 01:37:11 +0000 Subject: [issue16368] error when logging message In-Reply-To: <1351642153.65.0.00343224829929.issue16368@psf.upfronthosting.co.za> Message-ID: <1351647431.9.0.822877237621.issue16368@psf.upfronthosting.co.za> R. David Murray added the comment: Yep, that would do it. format is supposed to be a format string. ---------- status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16368> _______________________________________ From report at bugs.python.org Wed Oct 31 02:49:25 2012 From: report at bugs.python.org (Bradley Froehle) Date: Wed, 31 Oct 2012 01:49:25 +0000 Subject: [issue16369] Global PyTypeObjects not initialized with PyType_Ready(...) Message-ID: <1351648165.77.0.167977661694.issue16369@psf.upfronthosting.co.za> New submission from Bradley Froehle: In Python 3.3.0, several global `PyTypeObject`s are not initialized using PyType_Ready(...). The list of uninitialized type objects:: PyCapsule_Type PyLongRangeIter_Type PyFieldNameIter_Type PyFormatterIter_Type PySTEntry_Type PyCell_Type PyInstanceMethod_Type PyClassMethodDescr_Type PyMethodDescr_Type PyCallIter_Type PySeqIter_Type PyDictDummy_Type Each of these can be verified using gdb:: $ gdb -quiet python3.3 Reading symbols from /opt/python/3.3.0/bin/python3.3...done. (gdb) break Py_Finalize Breakpoint 1 at 0x4a40a0: file Python/pythonrun.c, line 478. (gdb) run -c "pass" Starting program: /opt/python/3.3.0/bin/python3.3 -c "pass" [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Breakpoint 1, Py_Finalize () at Python/pythonrun.c:478 478 if (!initialized) (gdb) print PyCell_Type->tp_mro $1 = (PyObject *) 0x0 (The list of uninitialized types was built by searching "info variables" in gdb to produce a list of PyTypeObjects. Those with <name>->tp_mro != NULL were treated as properly initialized. The remainder were further inspected by hand to throw out additional false positives, like those from modules which had been statically compiled into the Python binary). I'm not sure if any of these actually need fixing, but for PyCell_Type this issue already resulted in one obscure bug: #16268. ---------- components: Interpreter Core messages: 174255 nosy: bfroehle priority: normal severity: normal status: open title: Global PyTypeObjects not initialized with PyType_Ready(...) type: behavior versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16369> _______________________________________ From report at bugs.python.org Wed Oct 31 02:50:41 2012 From: report at bugs.python.org (Bradley Froehle) Date: Wed, 31 Oct 2012 01:50:41 +0000 Subject: [issue16268] dir(closure) does not find __dir__ In-Reply-To: <1350500710.5.0.876584221442.issue16268@psf.upfronthosting.co.za> Message-ID: <1351648241.48.0.220930738329.issue16268@psf.upfronthosting.co.za> Bradley Froehle added the comment: Your patch looks good to me, and I can verify that it properly tests for the issue in Python 3.3. On a related note, I've found that PyType_Ready(...) isn't called for a few other core PyTypeObjects... see #16369. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16268> _______________________________________ From report at bugs.python.org Wed Oct 31 04:19:56 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 31 Oct 2012 03:19:56 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351653596.42.0.728591467856.issue16344@psf.upfronthosting.co.za> Ramchandra Apte added the comment: I said >> Schools put a priority on English but not on native languages. Languages must be preserved because they contain culture Charles-Fran?ois Natali said > Of course, but the main goal of a language is to communicate. > As it stand, English is the language which is the most likely to be understood by Python users and developers (I don't count Esperanto ;-). >It'll get tricky if in a couple months, we start getting bug reports with traceback in Finnish or French... I was saying in general. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Wed Oct 31 04:34:46 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 03:34:46 +0000 Subject: [issue16369] Global PyTypeObjects not initialized with PyType_Ready(...) In-Reply-To: <1351648165.77.0.167977661694.issue16369@psf.upfronthosting.co.za> Message-ID: <3XrwCT20vWzNJQ@mail.python.org> Roundup Robot added the comment: New changeset eec0cafe171d by Benjamin Peterson in branch '3.2': initialize more global type objects (closes #16369) http://hg.python.org/cpython/rev/eec0cafe171d New changeset 9371bf2287c4 by Benjamin Peterson in branch '3.3': merge 3.2 (#16369) http://hg.python.org/cpython/rev/9371bf2287c4 New changeset aa52d8559ce5 by Benjamin Peterson in branch 'default': merge 3.3 (#16369) http://hg.python.org/cpython/rev/aa52d8559ce5 New changeset 315bd0ceb97a by Benjamin Peterson in branch '2.7': initialize more global type objects (closes #16369) http://hg.python.org/cpython/rev/315bd0ceb97a ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16369> _______________________________________ From report at bugs.python.org Wed Oct 31 04:35:08 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 31 Oct 2012 03:35:08 +0000 Subject: [issue16268] dir(closure) does not find __dir__ In-Reply-To: <1350500710.5.0.876584221442.issue16268@psf.upfronthosting.co.za> Message-ID: <1351654508.74.0.00555552962794.issue16268@psf.upfronthosting.co.za> Changes by Benjamin Peterson <benjamin at python.org>: ---------- resolution: -> duplicate status: open -> closed superseder: -> Global PyTypeObjects not initialized with PyType_Ready(...) _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16268> _______________________________________ From report at bugs.python.org Wed Oct 31 05:03:05 2012 From: report at bugs.python.org (Todd Rovito) Date: Wed, 31 Oct 2012 04:03:05 +0000 Subject: [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1351656185.51.0.0533999868266.issue16278@psf.upfronthosting.co.za> Todd Rovito added the comment: While writing test cases I discovered another conflict with the documentation. The phrase "On Unix, if dst exists and is a file, it will be replaced silently if the user has permission and src is a file." is not correct. According to the test cases I wrote in the attached patch see the method test_rename_src_file_dest_file_exists in the class FileTests the destination file is not replaced and the source file actually is removed. I will seek advice from Python Core Mentorship to see if this is a bug or normal behavior. First time writing test cases so I hope I am on the right track. ---------- Added file: http://bugs.python.org/file27804/OSRename_test_os.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16278> _______________________________________ From report at bugs.python.org Wed Oct 31 05:06:14 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 31 Oct 2012 04:06:14 +0000 Subject: [issue13659] Add a help() viewer for IDLE's Shell. In-Reply-To: <1324707815.11.0.534121320744.issue13659@psf.upfronthosting.co.za> Message-ID: <1351656374.45.0.656354036853.issue13659@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Bump. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13659> _______________________________________ From report at bugs.python.org Wed Oct 31 05:08:12 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 04:08:12 +0000 Subject: [issue16271] weird dual behavior with changing __qualname__; different values observed through attribute and descriptor In-Reply-To: <1350517386.42.0.0716657058677.issue16271@psf.upfronthosting.co.za> Message-ID: <3Xrwy34D7tzMV6@mail.python.org> Roundup Robot added the comment: New changeset 1d700e1aff33 by Benjamin Peterson in branch '3.3': don't shadow the __qualname__ descriptor with __qualname__ in the class's __dict__ (closes #16271) http://hg.python.org/cpython/rev/1d700e1aff33 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16271> _______________________________________ From report at bugs.python.org Wed Oct 31 05:28:54 2012 From: report at bugs.python.org (Simon Blanchard) Date: Wed, 31 Oct 2012 04:28:54 +0000 Subject: [issue16362] _LegalCharsPatt in cookies.py includes illegal characters In-Reply-To: <1351580849.36.0.343039143633.issue16362@psf.upfronthosting.co.za> Message-ID: <1351657734.2.0.391733618349.issue16362@psf.upfronthosting.co.za> Simon Blanchard added the comment: I have a real world example. Using Apache, mod_wsgi and Django. Given this in the META dict: 'HTTP_COOKIE': 'yaean_djsession=23ab7bf8b260cbb2f2bc80b1c1fd98fa, yaean_yasession=ff2a3030ee3f428f91c6f554a63b459c', Django via the Python cookie api gives this: COOKIES:{'yaean_djsession': '23ab7bf8b260cbb2f2bc80b1c1fd98fa,', 'yaean_yasession': 'ff2a3030ee3f428f91c6f554a63b459c'}, Note the comma on the end of the cookie named yaean_djsession in COOKIES. It should not be there. In this case session lookup fails. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16362> _______________________________________ From report at bugs.python.org Wed Oct 31 05:38:30 2012 From: report at bugs.python.org (Graham Dumpleton) Date: Wed, 31 Oct 2012 04:38:30 +0000 Subject: [issue16362] _LegalCharsPatt in cookies.py includes illegal characters In-Reply-To: <1351580849.36.0.343039143633.issue16362@psf.upfronthosting.co.za> Message-ID: <1351658310.41.0.905778542826.issue16362@psf.upfronthosting.co.za> Graham Dumpleton added the comment: For that cookie string to be valid in the first place, shouldn't it have been sent as: 'HTTP_COOKIE': 'yaean_djsession=23ab7bf8b260cbb2f2bc80b1c1fd98fa; yaean_yasession=ff2a3030ee3f428f91c6f554a63b459c' IOW, semicolon as separator. What client generated that HTTP Cookie header with commas in it? Only way I could see you ending up with that, if client isn't broken, is if when sent by application originally it sent it as only one Set-Cookie response header and had tried to set both values at same time with comma as separator. Then when it has come back from client like that to application, the cookie parser has then done the wrong thing on it. If this is a browser client, check the browser cookie cache to see what it is stored as in there. ---------- nosy: +grahamd _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16362> _______________________________________ From report at bugs.python.org Wed Oct 31 06:04:15 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 31 Oct 2012 05:04:15 +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: <1351659855.77.0.550105367553.issue16261@psf.upfronthosting.co.za> Ramchandra Apte added the comment: This seems quite difficult for one person;there are 589 lines having "except:" I'll work on the Tools directory. If anybody wants to help, please tell which folder you will do. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16261> _______________________________________ From report at bugs.python.org Wed Oct 31 06:10:02 2012 From: report at bugs.python.org (Todd Rovito) Date: Wed, 31 Oct 2012 05:10:02 +0000 Subject: [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1351660202.84.0.48722096862.issue16278@psf.upfronthosting.co.za> Changes by Todd Rovito <rovitotv at gmail.com>: Removed file: http://bugs.python.org/file27804/OSRename_test_os.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16278> _______________________________________ From report at bugs.python.org Wed Oct 31 06:10:45 2012 From: report at bugs.python.org (Todd Rovito) Date: Wed, 31 Oct 2012 05:10:45 +0000 Subject: [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1351660245.0.0.328846365324.issue16278@psf.upfronthosting.co.za> Todd Rovito added the comment: False alarm my test case was buggy. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16278> _______________________________________ From report at bugs.python.org Wed Oct 31 09:00:34 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 31 Oct 2012 08:00:34 +0000 Subject: [issue16365] IDLE for Windows 8 In-Reply-To: <1351624899.92.0.657222579655.issue16365@psf.upfronthosting.co.za> Message-ID: <1351670434.46.0.395038658751.issue16365@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Unfortunately, there is not much to check now that you got it working. Doing what Roger first asked for might have given insights, but we can now not determine the issue anymore. So closing this as "works for me". ---------- nosy: +loewis resolution: -> works for me status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16365> _______________________________________ From report at bugs.python.org Wed Oct 31 09:02:56 2012 From: report at bugs.python.org (Simon Blanchard) Date: Wed, 31 Oct 2012 08:02:56 +0000 Subject: [issue16362] _LegalCharsPatt in cookies.py includes illegal characters In-Reply-To: <1351580849.36.0.343039143633.issue16362@psf.upfronthosting.co.za> Message-ID: <1351670576.83.0.611782770038.issue16362@psf.upfronthosting.co.za> Simon Blanchard added the comment: 'HTTP_USER_AGENT': 'Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)', It's the Baidu spider according to the user agent string. (Baidu is the biggest search engine in China.) The serving app is Django + mod_wsgi + Apache - which I think must be OK. I guess the Baidu spider is broken? Thanks ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16362> _______________________________________ From report at bugs.python.org Wed Oct 31 09:29:48 2012 From: report at bugs.python.org (alon horev) Date: Wed, 31 Oct 2012 08:29:48 +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: <1351672188.22.0.741786471753.issue7317@psf.upfronthosting.co.za> alon horev added the comment: Hi Antoine, can you please have a look at the patch? It's been over a year since it's submitted. (-: thanks! ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue7317> _______________________________________ From report at bugs.python.org Wed Oct 31 11:50:51 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 31 Oct 2012 10:50:51 +0000 Subject: [issue16370] Regarding embedding Python in Another Application Message-ID: <1351680651.66.0.846831134298.issue16370@psf.upfronthosting.co.za> New submission from Andrew Svetlov: On Fri, Oct 26, 2012 at 12:02 AM, Tom Epperly <epperly2 at llnl.gov> wrote: Regarding this section, http://docs.python.org/extending/embedding.html#very-high-level-embedding, according to http://docs.python.org/c-api/init.html Py_SetProgramName() should be called before Py_Initialize() (see the comment for Py_SetProgramName()). This matters for the particular case of Mac OS X (see http://mail.python.org/pipermail/pythonmac-sig/2012-October/023746.html). I recommend adding a Py_SetProgramName() to the example. Regards, Tom Epperly ---------- assignee: docs at python components: Documentation keywords: easy messages: 174269 nosy: asvetlov, docs at python priority: normal severity: normal status: open title: Regarding embedding Python in Another Application versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16370> _______________________________________ From report at bugs.python.org Wed Oct 31 11:58:34 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 31 Oct 2012 10:58:34 +0000 Subject: [issue16370] Regarding embedding Python in Another Application In-Reply-To: <1351680651.66.0.846831134298.issue16370@psf.upfronthosting.co.za> Message-ID: <1351681114.24.0.991139964726.issue16370@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Patch for 2.7 applied, the same text should be for 3.2+ Chris, please check my wording as native English speaker. ---------- keywords: +patch nosy: +chris.jerdonek Added file: http://bugs.python.org/file27805/issue16370.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16370> _______________________________________ From report at bugs.python.org Wed Oct 31 12:00:25 2012 From: report at bugs.python.org (Phil Elson) Date: Wed, 31 Oct 2012 11:00:25 +0000 Subject: [issue13598] string.Formatter doesn't support empty curly braces "{}" In-Reply-To: <1323835162.4.0.792542335688.issue13598@psf.upfronthosting.co.za> Message-ID: <1351681225.87.0.00436565671374.issue13598@psf.upfronthosting.co.za> Changes by Phil Elson <pelson.pub at gmail.com>: ---------- nosy: +pelson _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13598> _______________________________________ From report at bugs.python.org Wed Oct 31 12:15:47 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 31 Oct 2012 11:15:47 +0000 Subject: [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <1351682147.35.0.762639111083.issue16197@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Not sure consolidating is good idea, ok with other changes. ---------- nosy: +asvetlov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16197> _______________________________________ From report at bugs.python.org Wed Oct 31 13:08:19 2012 From: report at bugs.python.org (Phil Elson) Date: Wed, 31 Oct 2012 12:08:19 +0000 Subject: [issue13598] string.Formatter doesn't support empty curly braces "{}" In-Reply-To: <1323835162.4.0.792542335688.issue13598@psf.upfronthosting.co.za> Message-ID: <1351685299.03.0.691508795385.issue13598@psf.upfronthosting.co.za> Phil Elson added the comment: The current patch fails to catch the fact that auto vs manual numbering has been used in following corner case: from string import Formatter print(Formatter().format("{0:{}}", 'foo', 5)) To fix this, without adding state to the formatter instance, some more information is going to need to be passed to the _vformat method. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13598> _______________________________________ From report at bugs.python.org Wed Oct 31 13:18:45 2012 From: report at bugs.python.org (Yongzhi Pan) Date: Wed, 31 Oct 2012 12:18:45 +0000 Subject: [issue6829] Frendly error message when inheriting from function In-Reply-To: <1251962419.95.0.109154121907.issue6829@psf.upfronthosting.co.za> Message-ID: <1351685925.03.0.368964487755.issue6829@psf.upfronthosting.co.za> Changes by Yongzhi Pan <fossilet at users.sourceforge.net>: ---------- nosy: +fossilet _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6829> _______________________________________ From report at bugs.python.org Wed Oct 31 13:50:05 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2012 12:50:05 +0000 Subject: [issue16311] Use _PyUnicodeWriter API in text decoders In-Reply-To: <1351103901.39.0.0945105753188.issue16311@psf.upfronthosting.co.za> Message-ID: <1351687805.78.0.618409102134.issue16311@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I updated the patch to resolve the conflict with issue14625. ---------- Added file: http://bugs.python.org/file27806/codecs_writer_2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16311> _______________________________________ From report at bugs.python.org Wed Oct 31 14:10:19 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2012 13:10:19 +0000 Subject: [issue16311] Use _PyUnicodeWriter API in text decoders In-Reply-To: <1351103901.39.0.0945105753188.issue16311@psf.upfronthosting.co.za> Message-ID: <1351689019.69.0.552902561013.issue16311@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: Added file: http://bugs.python.org/file27807/codecs_writer_2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16311> _______________________________________ From report at bugs.python.org Wed Oct 31 14:10:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2012 13:10:30 +0000 Subject: [issue16311] Use _PyUnicodeWriter API in text decoders In-Reply-To: <1351103901.39.0.0945105753188.issue16311@psf.upfronthosting.co.za> Message-ID: <1351689030.29.0.330276818124.issue16311@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: Removed file: http://bugs.python.org/file27806/codecs_writer_2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16311> _______________________________________ From report at bugs.python.org Wed Oct 31 14:14:31 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2012 13:14:31 +0000 Subject: [issue16311] Use _PyUnicodeWriter API in text decoders In-Reply-To: <1351103901.39.0.0945105753188.issue16311@psf.upfronthosting.co.za> Message-ID: <1351689271.24.0.558479057243.issue16311@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: Added file: http://bugs.python.org/file27808/decodebench.res _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16311> _______________________________________ From report at bugs.python.org Wed Oct 31 14:36:24 2012 From: report at bugs.python.org (Matt Jones) Date: Wed, 31 Oct 2012 13:36:24 +0000 Subject: [issue16370] Regarding embedding Python in Another Application In-Reply-To: <1351680651.66.0.846831134298.issue16370@psf.upfronthosting.co.za> Message-ID: <1351690584.13.0.565941224713.issue16370@psf.upfronthosting.co.za> Matt Jones added the comment: Andrew, below is a revision of your comment with a few corrections made by a native english speaker. ******************** Function :c:func:`Py_SetProgramName` should be called before :c:func:`Py_Initialize` to inform the interpreter about paths to Python run-time libraries. Next initialize the Python interpreter with :c:func:`Py_Initialize`, followed by the execution of a hard-coded Python script that prints the date and time. Afterwards, the :c:func:`Py_Finalize` call shuts the interpreter down, followed by the end of the program. In a real program, you may want to get the Python script from another source, perhaps a text-editor routine, a file, or a database. Getting the Python code from a file can better be done by using the :c:func:`PyRun_SimpleFile` function, which saves you the trouble of allocating memory space and loading the file contents. ---------- nosy: +Matt.Jones _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16370> _______________________________________ From report at bugs.python.org Wed Oct 31 14:58:45 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2012 13:58:45 +0000 Subject: [issue16311] Use _PyUnicodeWriter API in text decoders In-Reply-To: <1351103901.39.0.0945105753188.issue16311@psf.upfronthosting.co.za> Message-ID: <1351691925.51.0.209663807894.issue16311@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: With the patch UTF-8 decoder 20% slower for some data. UTF-16 decoder 20% faster for some data and 20% slower for other data. UTF-32 decoder slower for many data (even after some optimization, naive code was up to 50% slower). Standard charmap decoder 10% slower. Only UTF-7, unicode-escape and raw-unicode-escape have become much faster (unicode-escape and raw-unicode-escape as with issue16334 patch). A well optimized decoders do not benefit from the _PyUnicodeWriter, only a slight slowdown. The patch requires some optimization (as for UTF-32 decoder) to reduce the negative effect. Non-optimized decoders will receive the great benefit. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16311> _______________________________________ From report at bugs.python.org Wed Oct 31 15:02:16 2012 From: report at bugs.python.org (George Yoshida) Date: Wed, 31 Oct 2012 14:02:16 +0000 Subject: [issue16371] typo in ctypes Message-ID: <1351692136.49.6.31679171602e-05.issue16371@psf.upfronthosting.co.za> New submission from George Yoshida: In the following sentence: http://docs.python.org/3.3/library/ctypes.html > 16.17.1.19. Surprises > There are some edges in ctypes where you may be expect something else than what actually happens. "you may be expect" should read "you may expect" ---------- assignee: docs at python components: Documentation messages: 174276 nosy: docs at python, quiver priority: low severity: normal status: open title: typo in ctypes _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16371> _______________________________________ From report at bugs.python.org Wed Oct 31 15:04:35 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 14:04:35 +0000 Subject: [issue16370] Regarding embedding Python in Another Application In-Reply-To: <1351680651.66.0.846831134298.issue16370@psf.upfronthosting.co.za> Message-ID: <3XsBBB752kzM2W@mail.python.org> Roundup Robot added the comment: New changeset 6e24eb832fb2 by Andrew Svetlov in branch '2.7': Issue #16370: Mention Py_SetProgramName in example for very high level embedding. http://hg.python.org/cpython/rev/6e24eb832fb2 New changeset 4c35f5ec6acf by Andrew Svetlov in branch '3.2': Issue #16370: Mention Py_SetProgramName in example for very high level embedding. http://hg.python.org/cpython/rev/4c35f5ec6acf New changeset b6a5f54e0a34 by Andrew Svetlov in branch '3.3': Merge issue #16370: Mention Py_SetProgramName in example for very high level embedding. http://hg.python.org/cpython/rev/b6a5f54e0a34 New changeset 0c1b81465d9c by Andrew Svetlov in branch 'default': Merge issue #16370: Mention Py_SetProgramName in example for very high level embedding. http://hg.python.org/cpython/rev/0c1b81465d9c ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16370> _______________________________________ From report at bugs.python.org Wed Oct 31 15:05:39 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 31 Oct 2012 14:05:39 +0000 Subject: [issue16370] Mention Py_SetProgramName in example for very high level embedding In-Reply-To: <1351680651.66.0.846831134298.issue16370@psf.upfronthosting.co.za> Message-ID: <1351692339.1.0.728582530292.issue16370@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Thanks, Matt! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed title: Regarding embedding Python in Another Application -> Mention Py_SetProgramName in example for very high level embedding type: -> enhancement _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16370> _______________________________________ From report at bugs.python.org Wed Oct 31 15:12:34 2012 From: report at bugs.python.org (Zachary Ware) Date: Wed, 31 Oct 2012 14:12:34 +0000 Subject: [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <1351692754.06.0.670154211524.issue16197@psf.upfronthosting.co.za> Zachary Ware added the comment: The thought on consolidating is to match Doc/library/msvcrt.rst which does the same thing. Also, when I started reading this page shortly before opening this issue, I was reading most of the page at once and was frankly pretty annoyed by seeing the same notice over and over. Although I could see the point of having a much shorter blurb on each affected function in addition to an explanatory note at the top. So instead of ''' .. versionchanged:: 3.3 This function used to raise a :exc:`WindowsError`, which is now an alias of :exc:`OSError`. ''' on each one, something like ''' .. versionchanged:: 3.3 :exc:`WindowsError` is :exc:`OSError` ''' perhaps? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16197> _______________________________________ From report at bugs.python.org Wed Oct 31 15:18:19 2012 From: report at bugs.python.org (Wojciech Danilo) Date: Wed, 31 Oct 2012 14:18:19 +0000 Subject: [issue16372] Initialization strange behavior Message-ID: <1351693099.3.0.330906676323.issue16372@psf.upfronthosting.co.za> New submission from Wojciech Danilo: Hi! I'm using Python for several years and now I'm writing in Python 3 for the first time. I think I found a strange bug in it. Lets concider the code in the attachement. In the 33 line there is construction of new instance of class Result: print('!!!',Result().value) what is strange, the class is defined as: class Result: def __init__(self, value=[], start=0, end=0): self.value = value ... and what I get as a result is: "!!! ['a', 'b']" Where the array was somehow magically stored from previous initialization (take a look at the code for full listing). ---------- components: Interpreter Core files: test.py messages: 174280 nosy: wdanilo priority: normal severity: normal status: open title: Initialization strange behavior versions: Python 3.3 Added file: http://bugs.python.org/file27809/test.py _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16372> _______________________________________ From report at bugs.python.org Wed Oct 31 15:21:47 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 14:21:47 +0000 Subject: [issue16371] typo in ctypes In-Reply-To: <1351692136.49.6.31679171602e-05.issue16371@psf.upfronthosting.co.za> Message-ID: <3XsBZ32KmxzPSl@mail.python.org> Roundup Robot added the comment: New changeset ee13dc0793df by Andrew Svetlov in branch '3.2': Issue #16371: fix typo in ctypes documentation. http://hg.python.org/cpython/rev/ee13dc0793df New changeset 8badb59fd35e by Andrew Svetlov in branch '3.3': Merge issue #16371: fix typo in ctypes documentation. http://hg.python.org/cpython/rev/8badb59fd35e New changeset 0dac3e07ee8b by Andrew Svetlov in branch 'default': Merge issue #16371: fix typo in ctypes documentation. http://hg.python.org/cpython/rev/0dac3e07ee8b ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16371> _______________________________________ From report at bugs.python.org Wed Oct 31 15:22:42 2012 From: report at bugs.python.org (Phil Elson) Date: Wed, 31 Oct 2012 14:22:42 +0000 Subject: [issue13598] string.Formatter doesn't support empty curly braces "{}" In-Reply-To: <1323835162.4.0.792542335688.issue13598@psf.upfronthosting.co.za> Message-ID: <1351693362.11.0.42033320996.issue13598@psf.upfronthosting.co.za> Phil Elson added the comment: Ramchandra's fix looks fairly good, although there is at least one remaining issue (see my last comment). I have attached a patch which addresses (and tests) this. I'd be happy to pick this up if there are any remaining issues that need to be addressed, otherwise: I hope this helps. Thanks, ---------- Added file: http://bugs.python.org/file27810/pelson_issue13598.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13598> _______________________________________ From report at bugs.python.org Wed Oct 31 15:23:35 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 31 Oct 2012 14:23:35 +0000 Subject: [issue16372] Initialization strange behavior In-Reply-To: <1351693099.3.0.330906676323.issue16372@psf.upfronthosting.co.za> Message-ID: <1351693415.87.0.990407985877.issue16372@psf.upfronthosting.co.za> Mark Dickinson added the comment: This is a feature, not a bug. :-) See http://docs.python.org/2/faq/design.html#why-are-default-values-shared-between-objects for more information. ---------- nosy: +mark.dickinson resolution: -> invalid status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16372> _______________________________________ From report at bugs.python.org Wed Oct 31 15:25:01 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 31 Oct 2012 14:25:01 +0000 Subject: [issue16372] Initialization strange behavior In-Reply-To: <1351693099.3.0.330906676323.issue16372@psf.upfronthosting.co.za> Message-ID: <1351693501.51.0.206165135139.issue16372@psf.upfronthosting.co.za> Mark Dickinson added the comment: Actually, since you're using Python 3, I should have linked to the Python 3 documentation. Try this one: http://docs.python.org/3/faq/design.html#why-are-default-values-shared-between-objects ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16372> _______________________________________ From report at bugs.python.org Wed Oct 31 15:25:29 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 31 Oct 2012 14:25:29 +0000 Subject: [issue16371] typo in ctypes In-Reply-To: <1351692136.49.6.31679171602e-05.issue16371@psf.upfronthosting.co.za> Message-ID: <1351693529.65.0.352914206677.issue16371@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Thanks, George. ---------- nosy: +asvetlov resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16371> _______________________________________ From report at bugs.python.org Wed Oct 31 15:33:20 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 31 Oct 2012 14:33:20 +0000 Subject: [issue16373] Recursion error comparing set() and MutableMapping.keys() Message-ID: <1351694000.44.0.179883669733.issue16373@psf.upfronthosting.co.za> New submission from Nick Coghlan: Try these in 3.3 (or Python 3.2 for the latter): set() < collections.ChainMap().keys() set() < collections.UserDict().keys() Both fail with max recursion depth exceeded. Given that both exhibit this behaviour, the core of the problem is quite possibly in MutableMapping. (Uncovered while attempting to find a tidier ChainMap-based way to implement __subclasshook__ checks for ducktyping based on multiple methods) ---------- messages: 174286 nosy: ncoghlan priority: normal severity: normal status: open title: Recursion error comparing set() and MutableMapping.keys() versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16373> _______________________________________ From report at bugs.python.org Wed Oct 31 15:53:38 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 14:53:38 +0000 Subject: [issue16371] typo in ctypes In-Reply-To: <1351692136.49.6.31679171602e-05.issue16371@psf.upfronthosting.co.za> Message-ID: <3XsCGn31l8zQy5@mail.python.org> Roundup Robot added the comment: New changeset f0b22e314975 by R David Murray in branch '3.2': #16371: fix up the English a bit more. http://hg.python.org/cpython/rev/f0b22e314975 New changeset 85504242d0ce by R David Murray in branch '3.3': merge #16371: fix up the English a bit more. http://hg.python.org/cpython/rev/85504242d0ce New changeset f5dec8c57715 by R David Murray in branch 'default': merge #16371: fix up the English a bit more. http://hg.python.org/cpython/rev/f5dec8c57715 New changeset fa959dc5c61d by R David Murray in branch '2.7': #16371: fix up the English. http://hg.python.org/cpython/rev/fa959dc5c61d ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16371> _______________________________________ From report at bugs.python.org Wed Oct 31 16:01:51 2012 From: report at bugs.python.org (Daniel Gordon) Date: Wed, 31 Oct 2012 15:01:51 +0000 Subject: [issue16374] ConfigParser: Passing a semicolon as a value Message-ID: <1351695710.99.0.421343064251.issue16374@psf.upfronthosting.co.za> New submission from Daniel Gordon: I have a configuration file containing a key and value: delimiter=; Using ConfigParser, the resulting value of the key delimiter is empty. Expected behavior should be a semicolon as the value. This behavior occurred on Linux (Ubuntu 12.04) but not on Windows 7. ---------- components: Library (Lib) messages: 174288 nosy: Daniel.Gordon priority: normal severity: normal status: open title: ConfigParser: Passing a semicolon as a value type: behavior versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16374> _______________________________________ From report at bugs.python.org Wed Oct 31 16:10:16 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 31 Oct 2012 15:10:16 +0000 Subject: [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <1351696216.18.0.198756384981.issue16197@psf.upfronthosting.co.za> Andrew Svetlov added the comment: What's about compromise from attached file? ---------- Added file: http://bugs.python.org/file27811/winreg_3.3+v2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16197> _______________________________________ From report at bugs.python.org Wed Oct 31 16:11:16 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 31 Oct 2012 15:11:16 +0000 Subject: [issue16371] typo in ctypes In-Reply-To: <1351692136.49.6.31679171602e-05.issue16371@psf.upfronthosting.co.za> Message-ID: <1351696276.92.0.555069368361.issue16371@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Thanks, David. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16371> _______________________________________ From report at bugs.python.org Wed Oct 31 16:25:20 2012 From: report at bugs.python.org (Zachary Ware) Date: Wed, 31 Oct 2012 15:25:20 +0000 Subject: [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <1351697120.26.0.273525312454.issue16197@psf.upfronthosting.co.za> Zachary Ware added the comment: Not bad, but with that scheme we could even go as far as cutting out the 'WindowsError is OSError' bit and make it just """ ..versionchanged:: 3.3 See :ref:`above <exception-changed>`. """ ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16197> _______________________________________ From report at bugs.python.org Wed Oct 31 16:25:42 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2012 15:25:42 +0000 Subject: [issue16375] Warning in Parser/grammar1.c Message-ID: <1351697142.55.0.339745885879.issue16375@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The changeset 7e0e15d9957f causes annoying GCC warning in Parser/grammar1.c. Possible solutions: 1. Revert this changes back. 2. Prohibit this type of warnings by the compiler flags. 3. Explicitly cast _PyParser_TokenNames to "char *" in PyGrammar_LabelRepr(). 4. Make PyGrammar_LabelRepr() returns "const char *". ---------- components: Interpreter Core messages: 174292 nosy: benjamin.peterson, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Warning in Parser/grammar1.c type: compile error versions: Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16375> _______________________________________ From report at bugs.python.org Wed Oct 31 16:30:41 2012 From: report at bugs.python.org (STINNER Victor) Date: Wed, 31 Oct 2012 15:30:41 +0000 Subject: [issue16311] Use _PyUnicodeWriter API in text decoders In-Reply-To: <1351691925.51.0.209663807894.issue16311@psf.upfronthosting.co.za> Message-ID: <CAMpsgwaaMJkY-M8nyVoU2=u4-fEYFaKk8jsskxRGPpZb9Qp_GA@mail.gmail.com> STINNER Victor added the comment: I ran decodebench.py and bench-diff.py scripts from #14624, I just replaced repeat=10 with repeat=100 to get more reliable numbers. I only see some performance regressions between -5% and -1%, but there are some speedup on UTF-8 and UTF-32 (between +11% and +14%). On a microbenchmark, numbers in the -10..10% range just means "no change". Using _PyUnicodeWriter should not change anything to performances on valid data, only performances of handling decoding errors between the overallocation factor is different, the code to widen the buffer and the code to write replacement characters. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16311> _______________________________________ From report at bugs.python.org Wed Oct 31 16:34:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2012 15:34:22 +0000 Subject: [issue16373] Recursion error comparing set() and MutableMapping.keys() In-Reply-To: <1351694000.44.0.179883669733.issue16373@psf.upfronthosting.co.za> Message-ID: <1351697662.06.0.545852905282.issue16373@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Also: {}.keys() < collections.UserDict().keys() {}.items() < collections.UserDict().keys() {}.items() < collections.UserDict().items() ... ---------- components: +Library (Lib) nosy: +serhiy.storchaka type: -> behavior _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16373> _______________________________________ From report at bugs.python.org Wed Oct 31 16:43:05 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 31 Oct 2012 15:43:05 +0000 Subject: [issue16369] Global PyTypeObjects not initialized with PyType_Ready(...) In-Reply-To: <1351648165.77.0.167977661694.issue16369@psf.upfronthosting.co.za> Message-ID: <1351698185.26.0.688068466801.issue16369@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16369> _______________________________________ From report at bugs.python.org Wed Oct 31 16:46:04 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2012 15:46:04 +0000 Subject: [issue16373] Recursion error comparing set() and MutableMapping.keys() In-Reply-To: <1351694000.44.0.179883669733.issue16373@psf.upfronthosting.co.za> Message-ID: <1351698364.18.0.877660319675.issue16373@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The core of the problem is in Set. import collections.abc class S(collections.abc.Set): def __contains__(self, key): return False def __iter__(self): return iter(()) def __len__(self): return 0 S() < set() is False. set() < S() fails. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16373> _______________________________________ From report at bugs.python.org Wed Oct 31 16:52:15 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 31 Oct 2012 15:52:15 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <1351698735.84.0.506367042719.issue13701@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Buuuump --- sent by an 11-year old ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13701> _______________________________________ From report at bugs.python.org Wed Oct 31 16:52:37 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 31 Oct 2012 15:52:37 +0000 Subject: [issue14675] make distutils.ccompiler.CCompiler an abstract class In-Reply-To: <1335451065.7.0.113076491662.issue14675@psf.upfronthosting.co.za> Message-ID: <1351698757.8.0.840171203185.issue14675@psf.upfronthosting.co.za> Ramchandra Apte added the comment: buump. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14675> _______________________________________ From report at bugs.python.org Wed Oct 31 16:53:29 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 31 Oct 2012 15:53:29 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351698809.5.0.324469902351.issue16344@psf.upfronthosting.co.za> Ezio Melotti added the comment: > Teach the users English may be an altruist goal in the long term, but > for many teachers (like my case) it a barrier right now that can tip > the balance to other "more friendly languages" Students are not required to learn English and English grammar before programming -- learning a few words is already enough to grasp the meaning of many error messages (and it's anyway already necessary for keywords, functions, methods, classes, modules, etc.). > Those that continues working on programming will surely be exposed > sooner or later to formal technical English course at University or > similar. The sooner they get exposed to English the better it is. The best way to learn a language is by using it, and IMHO technical English is even easier than "normal" English (and often even than native language). > But, if they don't continue their studies, or choose a different > career, maybe their English skill will never be enough. I think that nowadays anyone should learn English anyway, and the more you translate the more you make their lives difficult, because you confine them to a restricted subset of all the available information (this is getting off-topic though). > Here, as you point, translation poses a new perspective, why take > that as a threat instead of an opportunity to bring better messages? This is a different problem though. Python (and programming in general) has its own jargon, and the jargon provides a concise way to refer to specific concepts (e.g. tuple-unpacking). While it certainly shouldn't be abused, it's often more convenient to use it. Creating a new localized jargon also doesn't help, and it only makes things more complicated. For example you mentioned the "invalid token" error message, that on the page you linked is translated as "token inv?lido". AFAIK "token" is not a Spanish word, so either you end up leaving the jargon untranslated, or you translated in something that doesn't make much sense and doesn't match with other names (e.g. the tokenize module). While improving the message is a good idea (if/when possible), translating it doesn't make things much better. > localized error messages could eventually produce better search > results for non-English speakers if there is enough material written > in they language. IME experience it's the opposite. This might work a bit better for widespread languages like Spanish, but otherwise I often come across to fairly bad results. First of all localized documentations are not as updated as the official one (that gets updated daily), and the translation might not be accurate. Given that the English community is the biggest one, it's also easier to find answers in English than it is in any other language. People that are not using English resources are often inexperienced users, and the solutions they provide are not always good (of course there are exceptions). > At least some part should be translated too, as for example, the > Python Tutorial was translated by the local community to Spanish: > http://docs.python.org.ar/tutorial/contenido.html But this is just a part, has not been updated in over 2 years, and doesn't even cover Python 3. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Wed Oct 31 16:55:37 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 31 Oct 2012 15:55: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: <1351698937.89.0.116482352157.issue16248@psf.upfronthosting.co.za> Ramchandra Apte added the comment: It is possible with this bug to make a sudo IDLE edit a root-file. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16248> _______________________________________ From report at bugs.python.org Wed Oct 31 16:56:30 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 31 Oct 2012 15:56:30 +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: <1351698990.73.0.0278624547019.issue16248@psf.upfronthosting.co.za> Ramchandra Apte added the comment: oops ignore last msg ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16248> _______________________________________ From report at bugs.python.org Wed Oct 31 16:56:48 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2012 15:56:48 +0000 Subject: [issue16373] Recursion error comparing set() and MutableMapping.keys() In-Reply-To: <1351694000.44.0.179883669733.issue16373@psf.upfronthosting.co.za> Message-ID: <1351699008.52.0.251455765912.issue16373@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Related (if not superseder) issue is issue8743. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16373> _______________________________________ From report at bugs.python.org Wed Oct 31 16:57:11 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2012 15:57:11 +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: <1351699031.47.0.760483370036.issue8743@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- nosy: +serhiy.storchaka versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8743> _______________________________________ From report at bugs.python.org Wed Oct 31 16:57:25 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 31 Oct 2012 15:57:25 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <1351699045.84.0.663073260654.issue13701@psf.upfronthosting.co.za> Ezio Melotti added the comment: Can you provide a patch? ---------- nosy: +ezio.melotti stage: -> needs patch type: -> enhancement versions: +Python 3.4 -Python 3.2, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13701> _______________________________________ From report at bugs.python.org Wed Oct 31 16:59:28 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 31 Oct 2012 15:59:28 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <1351699168.67.0.891056592335.issue13701@psf.upfronthosting.co.za> Ramchandra Apte added the comment: I'll give one now. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13701> _______________________________________ From report at bugs.python.org Wed Oct 31 17:01:54 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 31 Oct 2012 16:01:54 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <1351699314.77.0.422326424071.issue13701@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Do you think this should be fixed - the comments say "This module is currently Py2.3 compatible and should be kept that way unless a major compelling advantage arises. IOW, 2.3 compatibility is strongly preferred, but not guaranteed." ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13701> _______________________________________ From report at bugs.python.org Wed Oct 31 17:02:31 2012 From: report at bugs.python.org (Sandeep Mathew) Date: Wed, 31 Oct 2012 16:02:31 +0000 Subject: [issue16136] Removal of VMS support In-Reply-To: <1349389263.57.0.925729224322.issue16136@psf.upfronthosting.co.za> Message-ID: <1351699351.78.0.152168782803.issue16136@psf.upfronthosting.co.za> Sandeep Mathew added the comment: I have asked HP for access to a VMS box so that I restart my work. I initially checked with the university to see if I can get hold of an Itanium box. @Trent : If you have HP - UX already running, you may make use of Hyper-V to get vms running without changing the existing the HP-UX installation. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16136> _______________________________________ From report at bugs.python.org Wed Oct 31 17:03:52 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 31 Oct 2012 16:03:52 +0000 Subject: [issue16259] Replace exec() in test.regrtest with __import__ In-Reply-To: <1350444394.63.0.4278126209.issue16259@psf.upfronthosting.co.za> Message-ID: <1351699432.69.0.750837907492.issue16259@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Bump. ---------- type: -> behavior versions: +Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16259> _______________________________________ From report at bugs.python.org Wed Oct 31 17:05:04 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 31 Oct 2012 16:05:04 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <1351699504.85.0.346591333919.issue13701@psf.upfronthosting.co.za> Ezio Melotti added the comment: That might be true for 2.7, but for 3.4 it can probably be changed. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13701> _______________________________________ From report at bugs.python.org Wed Oct 31 17:05:29 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 31 Oct 2012 16:05:29 +0000 Subject: [issue16374] ConfigParser: Passing a semicolon as a value In-Reply-To: <1351695710.99.0.421343064251.issue16374@psf.upfronthosting.co.za> Message-ID: <1351699529.62.0.603329445787.issue16374@psf.upfronthosting.co.za> Changes by R. David Murray <rdmurray at bitdance.com>: ---------- nosy: +lukasz.langa _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16374> _______________________________________ From report at bugs.python.org Wed Oct 31 17:07:42 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 31 Oct 2012 16:07:42 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <1351699662.3.0.520637219189.issue13701@psf.upfronthosting.co.za> Mark Dickinson added the comment: It seems fine to me to change it for 3.4, assuming that the diff isn't huge. Spec updates don't seem likely, and even if they did occur I'd expect them to be small tweaks rather than major additions. +0 from me. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13701> _______________________________________ From report at bugs.python.org Wed Oct 31 17:10:47 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 31 Oct 2012 16:10:47 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <1351699847.72.0.189855585418.issue13701@psf.upfronthosting.co.za> Mark Dickinson added the comment: BTW, in an earlier comment you said: "now threading imports dummy_threading when threading is not available". Do you mean that 'import threading' will always succeed, even on platforms built without thread support? Is this documented somewhere? The docs at http://docs.python.org/3.3/library/dummy_threading.html seem to say rather that dummy_threading still has to be imported explicitly. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13701> _______________________________________ From report at bugs.python.org Wed Oct 31 17:11:06 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 16:11:06 +0000 Subject: [issue16369] Global PyTypeObjects not initialized with PyType_Ready(...) In-Reply-To: <1351648165.77.0.167977661694.issue16369@psf.upfronthosting.co.za> Message-ID: <3XsF0946RNzM3Z@mail.python.org> Roundup Robot added the comment: New changeset abe8a2908f08 by Jesus Cea in branch '2.7': Closes #16369: Global PyTypeObjects not initialized with PyType_Ready(...). DOCUMENT IT! http://hg.python.org/cpython/rev/abe8a2908f08 New changeset e9ea7f6a7107 by Jesus Cea in branch '3.2': Closes #16369: Global PyTypeObjects not initialized with PyType_Ready(...). DOCUMENT IT! http://hg.python.org/cpython/rev/e9ea7f6a7107 New changeset 9a4e2d394ba0 by Jesus Cea in branch '3.3': MERGE: Closes #16369: Global PyTypeObjects not initialized with PyType_Ready(...). DOCUMENT IT! http://hg.python.org/cpython/rev/9a4e2d394ba0 New changeset e5f39546989f by Jesus Cea in branch 'default': MERGE: Closes #16369: Global PyTypeObjects not initialized with PyType_Ready(...). DOCUMENT IT! http://hg.python.org/cpython/rev/e5f39546989f ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16369> _______________________________________ From report at bugs.python.org Wed Oct 31 17:12:39 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 31 Oct 2012 16:12:39 +0000 Subject: [issue16369] Global PyTypeObjects not initialized with PyType_Ready(...) In-Reply-To: <1351648165.77.0.167977661694.issue16369@psf.upfronthosting.co.za> Message-ID: <1351699959.82.0.2732134413.issue16369@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Benjamin, 3.3/3.4 "PyDictDummy_Type" initialization is missing too. That code was introduced in """ changeset: 76485:6e5855854a2e user: Benjamin Peterson <benjamin at python.org> date: Mon Apr 23 11:24:50 2012 -0400 summary: Implement PEP 412: Key-sharing dictionaries (closes #13903) """ Reopening and assigning to you :-) (if you don't want to work on this, let me know) ---------- assignee: -> benjamin.peterson nosy: +benjamin.peterson resolution: fixed -> status: closed -> open versions: +Python 2.7, Python 3.2, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16369> _______________________________________ From report at bugs.python.org Wed Oct 31 17:12:43 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 31 Oct 2012 16:12:43 +0000 Subject: [issue14675] make distutils.ccompiler.CCompiler an abstract class In-Reply-To: <1335451065.7.0.113076491662.issue14675@psf.upfronthosting.co.za> Message-ID: <1351699963.94.0.709035927152.issue14675@psf.upfronthosting.co.za> Changes by ?ric Araujo <merwok at netwok.org>: ---------- resolution: -> wont fix stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14675> _______________________________________ From report at bugs.python.org Wed Oct 31 17:16:13 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 31 Oct 2012 16:16:13 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <1351700173.27.0.9249646201.issue13701@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Is there an equivalent of _dummy_thread for threading? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13701> _______________________________________ From report at bugs.python.org Wed Oct 31 17:16:37 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 31 Oct 2012 16:16:37 +0000 Subject: [issue16268] dir(closure) does not find __dir__ In-Reply-To: <1350500710.5.0.876584221442.issue16268@psf.upfronthosting.co.za> Message-ID: <1351700197.74.0.808544816704.issue16268@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16268> _______________________________________ From report at bugs.python.org Wed Oct 31 17:17:46 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 31 Oct 2012 16:17:46 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <1351700266.42.0.140950470726.issue13701@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Ignore earlier message. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13701> _______________________________________ From report at bugs.python.org Wed Oct 31 17:18:49 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 31 Oct 2012 16:18:49 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <1351700329.67.0.0262483286706.issue13701@psf.upfronthosting.co.za> Ramchandra Apte added the comment: @Mark >BTW, in an earlier comment you said: "now threading imports dummy_threading when threading is not available". My comment only applies to _thread. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13701> _______________________________________ From report at bugs.python.org Wed Oct 31 17:19:06 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 31 Oct 2012 16:19:06 +0000 Subject: [issue16369] Global PyTypeObjects not initialized with PyType_Ready(...) In-Reply-To: <1351648165.77.0.167977661694.issue16369@psf.upfronthosting.co.za> Message-ID: <1351700346.4.0.318240061184.issue16369@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Any option of having a test? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16369> _______________________________________ From report at bugs.python.org Wed Oct 31 17:19:09 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 31 Oct 2012 16:19:09 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <1351700349.76.0.455979287819.issue13701@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Sorry it doesn't apply to anything at all. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13701> _______________________________________ From report at bugs.python.org Wed Oct 31 17:19:43 2012 From: report at bugs.python.org (Guilherme Polo) Date: Wed, 31 Oct 2012 16:19:43 +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: <1351700383.39.0.507377162098.issue16248@psf.upfronthosting.co.za> Guilherme Polo added the comment: I can ignore it, but let us be honest. If you got sudo privilege already, why are you bothering to break (or whatever else) the system using IDLE ? The issue here did not give you the sudo privilege. If it did, then we have an actual security bug. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16248> _______________________________________ From report at bugs.python.org Wed Oct 31 17:27:31 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 31 Oct 2012 16:27:31 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <1351700851.95.0.823272417489.issue13701@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Odd.. I download decimal.py from http://hg.python.org/cpython/file/fa959dc5c61d/Lib/decimal.py but it uses "1L" (isn't py3k compliant) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13701> _______________________________________ From report at bugs.python.org Wed Oct 31 17:30:14 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 31 Oct 2012 16:30: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: <1351701014.31.0.95417348343.issue16248@psf.upfronthosting.co.za> Ramchandra Apte added the comment: I think this is a legitimate security bug. the malicious program needs to create a file with a certain name in the home dir. If a user runs say IDLE (or another tk app) with root priveleges using sudo, the file will be run with root priveleges. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16248> _______________________________________ From report at bugs.python.org Wed Oct 31 17:30:43 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 31 Oct 2012 16:30:43 +0000 Subject: [issue16369] Global PyTypeObjects not initialized with PyType_Ready(...) In-Reply-To: <1351648165.77.0.167977661694.issue16369@psf.upfronthosting.co.za> Message-ID: <1351701043.14.0.963591672819.issue16369@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>: ---------- nosy: +Arfrever _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16369> _______________________________________ From report at bugs.python.org Wed Oct 31 17:34:54 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 31 Oct 2012 16:34:54 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <1351701294.27.0.634178945596.issue13701@psf.upfronthosting.co.za> Mark Dickinson added the comment: Revision fa959dc5c61d comes from the 2.7 maintenance branch. Try: http://hg.python.org/cpython/file/e5f39546989f/Lib/decimal.py instead. Better still, get a clone of the Python repository. :-) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13701> _______________________________________ From report at bugs.python.org Wed Oct 31 17:36:09 2012 From: report at bugs.python.org (Zachary Ware) Date: Wed, 31 Oct 2012 16:36:09 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <1351701369.44.0.705655001527.issue13701@psf.upfronthosting.co.za> Zachary Ware added the comment: > Odd.. I download decimal.py from http://hg.python.org/cpython/file/fa959dc5c61d/Lib/decimal.py but it uses "1L" (isn't py3k compliant) Try http://hg.python.org/cpython/file/default/Lib/decimal.py Clicking 'browse' from http://hg.python.org/cpython/ shows the source tree as it is in 'tip', which is sometimes 2.7 instead of default. ---------- nosy: +zach.ware _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13701> _______________________________________ From report at bugs.python.org Wed Oct 31 17:37:23 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 31 Oct 2012 16:37:23 +0000 Subject: [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <1351701443.27.0.617814128887.issue16197@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I have updated patch. ---------- Added file: http://bugs.python.org/file27812/winreg_3.3+v3.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16197> _______________________________________ From report at bugs.python.org Wed Oct 31 17:38:09 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 31 Oct 2012 16:38:09 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1351701294.27.0.634178945596.issue13701@psf.upfronthosting.co.za> Message-ID: <CAExgZOhxpGMyNKm0Yj1swzyGmbBMzO-zRC_Rw64oixMmk44X6Q@mail.gmail.com> Ramchandra Apte added the comment: On 31 October 2012 22:04, Mark Dickinson <report at bugs.python.org> wrote: > > Mark Dickinson added the comment: > > Revision fa959dc5c61d comes from the 2.7 maintenance branch. Try: > > http://hg.python.org/cpython/file/e5f39546989f/Lib/decimal.py > > instead. Better still, get a clone of the Python repository. :-) > > ---------- > > _______________________________________ > Python tracker <report at bugs.python.org> > <http://bugs.python.org/issue13701> > _______________________________________ > clone is quite big (~300 MB->half an hour) I know about the way to download the repo's tip as .tar.bz2 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13701> _______________________________________ From report at bugs.python.org Wed Oct 31 17:43:53 2012 From: report at bugs.python.org (Wojciech Danilo) Date: Wed, 31 Oct 2012 16:43:53 +0000 Subject: [issue16372] Initialization strange behavior In-Reply-To: <1351693099.3.0.330906676323.issue16372@psf.upfronthosting.co.za> Message-ID: <1351701833.59.0.335308191056.issue16372@psf.upfronthosting.co.za> Wojciech Danilo added the comment: Wow, I was using Python so long and I didn't know about it. Is there any paper discussing why this feature is better than storing "cache" as global variable / as class "private" parameter? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16372> _______________________________________ From report at bugs.python.org Wed Oct 31 17:44:49 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 31 Oct 2012 16:44:49 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <1351701889.53.0.435369041004.issue13701@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Attached is a patch. I haven't tested it. ---------- keywords: +patch Added file: http://bugs.python.org/file27813/decimal.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13701> _______________________________________ From report at bugs.python.org Wed Oct 31 17:45:47 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 31 Oct 2012 16:45:47 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <1351701947.49.0.0557537070353.issue13701@psf.upfronthosting.co.za> Ramchandra Apte added the comment: I'm not sure whether the patch fixes everything. Gone to sleep. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13701> _______________________________________ From report at bugs.python.org Wed Oct 31 17:50:50 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 31 Oct 2012 16:50:50 +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: <1351702250.27.0.320214862437.issue8743@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8743> _______________________________________ From report at bugs.python.org Wed Oct 31 17:53:40 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 31 Oct 2012 16:53:40 +0000 Subject: [issue16373] Recursion error comparing set() and MutableMapping.keys() In-Reply-To: <1351694000.44.0.179883669733.issue16373@psf.upfronthosting.co.za> Message-ID: <1351702420.95.0.580090380428.issue16373@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n <jcea at jcea.es>: ---------- nosy: +jcea _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16373> _______________________________________ From report at bugs.python.org Wed Oct 31 17:56:36 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 31 Oct 2012 16:56:36 +0000 Subject: [issue16372] Initialization strange behavior In-Reply-To: <1351693099.3.0.330906676323.issue16372@psf.upfronthosting.co.za> Message-ID: <1351702596.4.0.0692181305853.issue16372@psf.upfronthosting.co.za> Mark Dickinson added the comment: There's plenty of discussion of this feature of Python around the web, but this isn't the place to rehash it. :-) Google for "python mutable default argument". ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16372> _______________________________________ From report at bugs.python.org Wed Oct 31 17:57:20 2012 From: report at bugs.python.org (Wojciech Danilo) Date: Wed, 31 Oct 2012 16:57:20 +0000 Subject: [issue16372] Initialization strange behavior In-Reply-To: <1351693099.3.0.330906676323.issue16372@psf.upfronthosting.co.za> Message-ID: <1351702640.4.0.819439780977.issue16372@psf.upfronthosting.co.za> Wojciech Danilo added the comment: Thank you! ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16372> _______________________________________ From report at bugs.python.org Wed Oct 31 18:00:06 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2012 17:00:06 +0000 Subject: [issue16373] Recursion error comparing set() and MutableMapping.keys() In-Reply-To: <1351694000.44.0.179883669733.issue16373@psf.upfronthosting.co.za> Message-ID: <1351702806.63.0.511007529392.issue16373@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which fixes this particular issue. Now recursion avoided. The specified operations raises TypeError. Fixing this error (if it should be fixed) is the problem of issue8743. ---------- stage: -> patch review _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16373> _______________________________________ From report at bugs.python.org Wed Oct 31 18:00:43 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 31 Oct 2012 17:00:43 +0000 Subject: [issue16369] Global PyTypeObjects not initialized with PyType_Ready(...) In-Reply-To: <1351648165.77.0.167977661694.issue16369@psf.upfronthosting.co.za> Message-ID: <1351702843.49.0.666144530634.issue16369@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It doesn't need to be initialized. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16369> _______________________________________ From report at bugs.python.org Wed Oct 31 18:01:25 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2012 17:01:25 +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: <1351702885.85.0.464933143514.issue16373@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- keywords: +patch title: Recursion error comparing set() and MutableMapping.keys() -> Recursion error comparing set() and collections.Set instances Added file: http://bugs.python.org/file27814/abc_set_issuperset_recursion.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16373> _______________________________________ From report at bugs.python.org Wed Oct 31 18:02:55 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 31 Oct 2012 17:02:55 +0000 Subject: [issue16376] wrong type for wintypes.BYTE Message-ID: <1351702975.6.0.783969996516.issue16376@psf.upfronthosting.co.za> New submission from anatoly techtonik: Windows BYTE type is unsigned char, but ctypes defines it as signed. {{{ BYTE A byte (8 bits). This type is declared in WinDef.h as follows: typedef unsigned char BYTE; typedef unsigned char BYTE; }}} http://msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v=vs.85).aspx http://hg.python.org/cpython/file/e5f39546989f/Lib/ctypes/wintypes.py#l4 ---------- components: ctypes messages: 174331 nosy: techtonik priority: normal severity: normal status: open title: wrong type for wintypes.BYTE versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16376> _______________________________________ From report at bugs.python.org Wed Oct 31 18:05:21 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 31 Oct 2012 17:05:21 +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: <1351703121.66.0.570393293397.issue16373@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Serhiy Storchaka, I was wondering if you could provide a test for the testsuite too. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16373> _______________________________________ From report at bugs.python.org Wed Oct 31 18:07:49 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 31 Oct 2012 17:07:49 +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: <1351703269.92.0.219646008147.issue8743@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Heads up, Issue #16373. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8743> _______________________________________ From report at bugs.python.org Wed Oct 31 18:10:08 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 31 Oct 2012 17:10:08 +0000 Subject: [issue16369] Global PyTypeObjects not initialized with PyType_Ready(...) In-Reply-To: <1351648165.77.0.167977661694.issue16369@psf.upfronthosting.co.za> Message-ID: <1351703408.29.0.618703253648.issue16369@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Even if not "needed" to be initialize, we might do it for regularity (no special cases are special enough :-). Or, if left alone, at least document it in the code. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16369> _______________________________________ From report at bugs.python.org Wed Oct 31 18:14:59 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 31 Oct 2012 17:14:59 +0000 Subject: [issue12782] Multiple context expressions do not support parentheses for continuation across lines In-Reply-To: <1313719817.79.0.828403712604.issue12782@psf.upfronthosting.co.za> Message-ID: <1351703699.12.0.24323178841.issue12782@psf.upfronthosting.co.za> Changes by Ezio Melotti <ezio.melotti at gmail.com>: ---------- nosy: +barry versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue12782> _______________________________________ From report at bugs.python.org Wed Oct 31 18:15:08 2012 From: report at bugs.python.org (Zachary Ware) Date: Wed, 31 Oct 2012 17:15:08 +0000 Subject: [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <1351703708.58.0.210773115462.issue16197@psf.upfronthosting.co.za> Zachary Ware added the comment: v3 looks fine to me! ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16197> _______________________________________ From report at bugs.python.org Wed Oct 31 18:23:29 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2012 17:23:29 +0000 Subject: [issue16373] Recursion error comparing set() and collections.Set instances In-Reply-To: <1351703121.66.0.570393293397.issue16373@psf.upfronthosting.co.za> Message-ID: <201210311923.12632.storchaka@gmail.com> Serhiy Storchaka added the comment: issue15246 should add a place for such test. I'm not sure that possible wrong behavior (which can be changed in issue8743) should be perpetuated in the tests. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16373> _______________________________________ From report at bugs.python.org Wed Oct 31 18:30:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 17:30:10 +0000 Subject: [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <3XsGlQ1dn8zPLQ@mail.python.org> Roundup Robot added the comment: New changeset 2e7da832219d by Andrew Svetlov in branch '3.3': Issue #16197: Fix several small errors in winreg documentation. http://hg.python.org/cpython/rev/2e7da832219d New changeset f1310219c702 by Andrew Svetlov in branch 'default': Merge issue #16197: Fix several small errors in winreg documentation. http://hg.python.org/cpython/rev/f1310219c702 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16197> _______________________________________ From report at bugs.python.org Wed Oct 31 18:31:41 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 31 Oct 2012 17:31:41 +0000 Subject: [issue16197] Several small errors in winreg documentation In-Reply-To: <1349971931.7.0.721708893114.issue16197@psf.upfronthosting.co.za> Message-ID: <1351704701.82.0.0774537787638.issue16197@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Committed. Thanks, Zachary! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16197> _______________________________________ From report at bugs.python.org Wed Oct 31 18:33:23 2012 From: report at bugs.python.org (flying sheep) Date: Wed, 31 Oct 2012 17:33:23 +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: <1351704803.03.0.0390121946339.issue15873@psf.upfronthosting.co.za> flying sheep added the comment: there is a module that parses those strings pretty nicely, it?s called pyiso8601: http://code.google.com/p/pyiso8601/ in the context of writing a better plistlib, i also needed the capability to parse those strings, and decided not to use the sucky incomplete implementation of plistlib, but the one mentioned above. i py3ified it, eliminating quite some code, and the result is pretty terse, check it out: https://github.com/flying-sheep/plist/blob/master/iso8601.py note that that implementation returns utc-datetimes for timezoneless strings, instead of naive ones. (l.30) ---------- nosy: +flying sheep _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15873> _______________________________________ From report at bugs.python.org Wed Oct 31 18:36:28 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 17:36:28 +0000 Subject: [issue16369] Global PyTypeObjects not initialized with PyType_Ready(...) In-Reply-To: <1351648165.77.0.167977661694.issue16369@psf.upfronthosting.co.za> Message-ID: <3XsGtg6tXXzPVD@mail.python.org> Roundup Robot added the comment: New changeset e87d617cef23 by Benjamin Peterson in branch 'default': make PyGrammar_LabelRepr return a const char * (closes #16369) http://hg.python.org/cpython/rev/e87d617cef23 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16369> _______________________________________ From report at bugs.python.org Wed Oct 31 18:39:40 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 31 Oct 2012 17:39:40 +0000 Subject: [issue16369] Global PyTypeObjects not initialized with PyType_Ready(...) In-Reply-To: <1351648165.77.0.167977661694.issue16369@psf.upfronthosting.co.za> Message-ID: <1351705180.64.0.245410119706.issue16369@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Oops, that was supposed to go to #16375. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16369> _______________________________________ From report at bugs.python.org Wed Oct 31 18:39:53 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 31 Oct 2012 17:39:53 +0000 Subject: [issue16375] Warning in Parser/grammar1.c In-Reply-To: <1351697142.55.0.339745885879.issue16375@psf.upfronthosting.co.za> Message-ID: <1351705193.54.0.558142817254.issue16375@psf.upfronthosting.co.za> Benjamin Peterson added the comment: e87d617cef23 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16375> _______________________________________ From report at bugs.python.org Wed Oct 31 18:44:06 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Oct 2012 17:44:06 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351698809.5.0.324469902351.issue16344@psf.upfronthosting.co.za> Message-ID: <97372105.203413240.1351705439536.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > > Those that continues working on programming will surely be exposed > > sooner or later to formal technical English course at University or > > similar. > > The sooner they get exposed to English the better it is. The best > way to learn a language is by using it, and IMHO technical English > is even easier than "normal" English (and often even than native > language). This sounds like wishful thinking to me. Regardless of whether it's *better* for a fledgling programmer to learn and improve their English, we can still improve Python right now for those who don't master English. > > But, if they don't continue their studies, or choose a different > > career, maybe their English skill will never be enough. > > I think that nowadays anyone should learn English anyway, and the > more you translate the more you make their lives difficult, because > you confine them to a restricted subset of all the available > information (this is getting off-topic though). That will be true if translations are enabled by default, not if they need some explicit configuration switch to be enabled. > > Here, as you point, translation poses a new perspective, why take > > that as a threat instead of an opportunity to bring better > > messages? > > This is a different problem though. Python (and programming in > general) has its own jargon, and the jargon provides a concise way > to refer to specific concepts (e.g. tuple-unpacking). While it > certainly shouldn't be abused, it's often more convenient to use it. > Creating a new localized jargon also doesn't help, and it only > makes things more complicated. Well, even technical tools like gcc or Mercurial have translations these days (not always very good ones, admittedly, but I don't see anyone advocating for these translations to be removed). > > At least some part should be translated too, as for example, the > > Python Tutorial was translated by the local community to Spanish: > > http://docs.python.org.ar/tutorial/contenido.html > > But this is just a part, has not been updated in over 2 years, and > doesn't even cover Python 3. That's not really a problem. People teaching Python in a language other than English can certainly create their own teaching resources (and, ideally, share them on the Internet :-)). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Wed Oct 31 18:44:33 2012 From: report at bugs.python.org (Trent Nelson) Date: Wed, 31 Oct 2012 17:44:33 +0000 Subject: [issue16136] Removal of VMS support In-Reply-To: <1349389263.57.0.925729224322.issue16136@psf.upfronthosting.co.za> Message-ID: <1351705473.36.0.311972740787.issue16136@psf.upfronthosting.co.za> Trent Nelson added the comment: Ah, I forgot about the VOE stuff. That will work a lot better. I'll still need to acquire VMS media though. You're not a committer are you? I can sort you out with access to Snakebite anyway -- email me your ssh key if you're interested (trent at snakebite.org). I'd recommend dropping by #python-dev on irc.freenode.net too. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16136> _______________________________________ From report at bugs.python.org Wed Oct 31 18:51:12 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 31 Oct 2012 17:51:12 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351705872.54.0.937949526972.issue16344@psf.upfronthosting.co.za> Ezio Melotti added the comment: > This sounds like wishful thinking to me. Regardless of whether it's > *better* for a fledgling programmer to learn and improve their English, > we can still improve Python right now for those who don't master English. True, but my point is that while this has some short term benefits, it's worse on the long term, and potentially even more confusing. > That will be true if translations are enabled by default, not if they > need some explicit configuration switch to be enabled. They usually are (at least for other tools like mercurial). I can see OS vendors enabling this by default. > Well, even technical tools like gcc or Mercurial have translations > these days (not always very good ones, admittedly, but I don't see > anyone advocating for these translations to be removed). Maybe someone advocated for them not to be added? :) > That's not really a problem. People teaching Python in a language > other than English can certainly create their own teaching resources > (and, ideally, share them on the Internet :-)). Or use the already existing resources found on Internet (mostly in English :))? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Wed Oct 31 18:54:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2012 17:54:07 +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: <1351706047.7.0.577559910939.issue16373@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated with test which does not rely on set behaviour. ---------- Added file: http://bugs.python.org/file27815/abc_set_issuperset_recursion_2.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16373> _______________________________________ From report at bugs.python.org Wed Oct 31 18:54:58 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 17:54:58 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <3XsHJ22tmYzPYp@mail.python.org> Roundup Robot added the comment: New changeset 7ada0faded9b by Mark Dickinson in branch 'default': Issue #13701: Fix decorator avoidance (due to desire for Python 2.3 compatibility) in decimal module. http://hg.python.org/cpython/rev/7ada0faded9b ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13701> _______________________________________ From report at bugs.python.org Wed Oct 31 18:58:15 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2012 17:58:15 +0000 Subject: [issue16375] Warning in Parser/grammar1.c In-Reply-To: <1351697142.55.0.339745885879.issue16375@psf.upfronthosting.co.za> Message-ID: <1351706295.92.0.880997721637.issue16375@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- stage: needs patch -> committed/rejected _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16375> _______________________________________ From report at bugs.python.org Wed Oct 31 18:58:43 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2012 17:58:43 +0000 Subject: [issue16375] Warning in Parser/grammar1.c In-Reply-To: <1351697142.55.0.339745885879.issue16375@psf.upfronthosting.co.za> Message-ID: <1351706323.04.0.220953513533.issue16375@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16375> _______________________________________ From report at bugs.python.org Wed Oct 31 18:59:55 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 31 Oct 2012 17:59:55 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <1351706395.33.0.744400978394.issue13701@psf.upfronthosting.co.za> 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 <report at bugs.python.org> <http://bugs.python.org/issue13701> _______________________________________ From report at bugs.python.org Wed Oct 31 19:06:17 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 31 Oct 2012 18:06:17 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351706777.63.0.626172394319.issue16344@psf.upfronthosting.co.za> R. David Murray added the comment: It seems to me that if as Terry suggests both the English and the translation are output then most of Ezio's concerns would be addressed. Maybe we could even start a new trend in error message internationalization :) An important question that needs to be addressed is what additional burden this places on maintaining Python (keep in mind that it looks like we'd be the first programming language to do this), and who is going to do the maintenance. Mariano, how committed are you to maintaining it long term? This is clearly going to need a PEP, so if the python-ideas discussion has already happened, that is really the next step. We aren't going to resolve the yes or no question (not to mention the details) for something this fundamental without a PEP, I think. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Wed Oct 31 19:13:01 2012 From: report at bugs.python.org (Georg Brandl) Date: Wed, 31 Oct 2012 18:13:01 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351707181.33.0.346676058352.issue16344@psf.upfronthosting.co.za> Georg Brandl added the comment: How do you propose to output both versions? It will make tracebacks twice as long. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Wed Oct 31 19:14:19 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 18:14:19 +0000 Subject: [issue16345] dict.fromkeys() assumes 'self' is empty In-Reply-To: <1351411466.77.0.264436866601.issue16345@psf.upfronthosting.co.za> Message-ID: <3XsHkL50Y3zPZm@mail.python.org> Roundup Robot added the comment: New changeset a965eac352ec by Benjamin Peterson in branch '3.2': only fast-path fromkeys() when the constructor returns a empty dict (closes #16345) http://hg.python.org/cpython/rev/a965eac352ec New changeset b68da8f2ed95 by Benjamin Peterson in branch '3.3': merge 3.2 (#16345) http://hg.python.org/cpython/rev/b68da8f2ed95 New changeset 411d52192062 by Benjamin Peterson in branch 'default': merge 3.3 (#16345) http://hg.python.org/cpython/rev/411d52192062 New changeset 6a582cdfee41 by Benjamin Peterson in branch '2.7': only fast-path fromkeys() when the constructor returns a empty dict (closes #16345) http://hg.python.org/cpython/rev/6a582cdfee41 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16345> _______________________________________ From report at bugs.python.org Wed Oct 31 19:27:38 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 31 Oct 2012 18:27:38 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351708058.77.0.40015859857.issue16344@psf.upfronthosting.co.za> Ezio Melotti added the comment: If only the error gets translated it might look more or less like: Traceback (most recent call last): File "form.py", line 78, in <module> f = Form("factura.csv") File "form.py", line 12, in __init__ for linea in open(infile).readlines(): IOError: [Errno 2] No such file or directory: 'factura.csv' [Errno 2] No existe el archivo o directorio: 'factura.csv' @RDM The PEP is already attached to the issue :) @Mariano Do you think it's possible to make this an external module? Otherwise we could provide some hooks, and have language packages maintained by the community on PyPI. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Wed Oct 31 19:33:07 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 31 Oct 2012 18:33:07 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351708387.19.0.492009435965.issue16344@psf.upfronthosting.co.za> R. David Murray added the comment: I didn't look at the patch...I assumed we were only talking about the message. There seems little point in translating any other part of the traceback, other than maybe the boilerplate between traceback sections. My thought was that the translation text for a message X would look something like X (translatedX) or vice versa. Note that I'm not advocating in favor of either doing this at all, or doing the dual message display. I'm currently neutral on both. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Wed Oct 31 19:34:15 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 31 Oct 2012 18:34:15 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351708455.47.0.388556986492.issue16344@psf.upfronthosting.co.za> R. David Murray added the comment: Ezio: ah. I guess I don't read the Description column of attachments, only the filename :) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Wed Oct 31 20:33:18 2012 From: report at bugs.python.org (Aaron Train) Date: Wed, 31 Oct 2012 19:33:18 +0000 Subject: [issue15795] Zipfile.extractall does not preserve file permissions In-Reply-To: <1346106964.12.0.723201722432.issue15795@psf.upfronthosting.co.za> Message-ID: <1351711998.61.0.826702379449.issue15795@psf.upfronthosting.co.za> Aaron Train added the comment: Thanks for the patch. Is this going to be resolved soon? ---------- nosy: +Aaron.Train _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15795> _______________________________________ From report at bugs.python.org Wed Oct 31 20:45:37 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 19:45:37 +0000 Subject: [issue16348] Decimal.remainder_near documentation incorrect. In-Reply-To: <1351426853.23.0.197083736305.issue16348@psf.upfronthosting.co.za> Message-ID: <3XsKlh5rczzMXH@mail.python.org> Roundup Robot added the comment: New changeset 1122f5bfc957 by Mark Dickinson in branch '2.7': Issue #16348: Fix incorrect documentation for Decimal.remainder_near. http://hg.python.org/cpython/rev/1122f5bfc957 New changeset 8570943ad5a2 by Mark Dickinson in branch '3.2': Issue #16348: Fix incorrect documentation for Decimal.remainder_near. http://hg.python.org/cpython/rev/8570943ad5a2 New changeset 9dc587378874 by Mark Dickinson in branch '3.3': Issue #16348: merge fix from 3.2. http://hg.python.org/cpython/rev/9dc587378874 New changeset 7b36ed59738c by Mark Dickinson in branch 'default': Issue #16348: merge fix from 3.3. http://hg.python.org/cpython/rev/7b36ed59738c ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16348> _______________________________________ From report at bugs.python.org Wed Oct 31 20:47:34 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 31 Oct 2012 19:47:34 +0000 Subject: [issue16348] Decimal.remainder_near documentation incorrect. In-Reply-To: <1351426853.23.0.197083736305.issue16348@psf.upfronthosting.co.za> Message-ID: <1351712854.1.0.197490771994.issue16348@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks for reviewing, Andrew. ---------- assignee: docs at python -> mark.dickinson resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16348> _______________________________________ From report at bugs.python.org Wed Oct 31 20:48:02 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 31 Oct 2012 19:48:02 +0000 Subject: [issue15795] Zipfile.extractall does not preserve file permissions In-Reply-To: <1346106964.12.0.723201722432.issue15795@psf.upfronthosting.co.za> Message-ID: <1351712882.27.0.403128105.issue15795@psf.upfronthosting.co.za> R. David Murray added the comment: OK, so this is an enhancement to specifically allow preservation of "unsafe" permissions? Adding the nosy list from issue 3394. ---------- nosy: +cbrannon, pitrou, swarren type: behavior -> enhancement versions: -Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15795> _______________________________________ From report at bugs.python.org Wed Oct 31 20:58:30 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Oct 2012 19:58:30 +0000 Subject: [issue16367] io.FileIO.readall() is not 64-bit safe on Windows In-Reply-To: <1351640587.41.0.234658150745.issue16367@psf.upfronthosting.co.za> Message-ID: <1351713510.0.0.0475310378425.issue16367@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Looks ok to me. Perhaps we could add a bigmem test for that (in test_fileio)? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16367> _______________________________________ From report at bugs.python.org Wed Oct 31 21:03:19 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 31 Oct 2012 20:03:19 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351713799.13.0.750793356566.issue16344@psf.upfronthosting.co.za> Terry J. Reedy added the comment: What Ezio suggested, plus maybe the error name -- but people must learn those to write exception statements, and a translation of the exceptions section of the lib manual is really needed to understand them. The boilerplate lines "Traceback (most recent call last):" and "File {}, line {}, in {}" can be learned" (or even translated, though 'traceback', 'call', 'file', 'line', and 'in' pretty much need to be learned anyway). Once a hook is added and a file format is defined, if such are, then I think core-developer responsibility ends and language-specific files should be on pypi and maintained by language-specific groups. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Wed Oct 31 21:06:54 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 20:06:54 +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: <3XsLDF4tsWzNgn@mail.python.org> Roundup Robot added the comment: New changeset f263a84871de by Andrew Svetlov in branch '2.7': Issue #14900: document added sort keys for profile stats. http://hg.python.org/cpython/rev/f263a84871de New changeset 52d6974fa05b by Andrew Svetlov in branch '3.2': Issue #14900: document added sort keys for profile stats. http://hg.python.org/cpython/rev/52d6974fa05b New changeset 78963f00d4ad by Andrew Svetlov in branch '3.3': Merge issue #14900: document added sort keys for profile stats. http://hg.python.org/cpython/rev/78963f00d4ad New changeset dd4783955353 by Andrew Svetlov in branch 'default': Issue #14900: document added sort keys for profile stats. http://hg.python.org/cpython/rev/dd4783955353 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14900> _______________________________________ From report at bugs.python.org Wed Oct 31 21:08:54 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 31 Oct 2012 20:08:54 +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: <1351714134.42.0.689540794076.issue14900@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. For future improvements please open new issue. Thanks. ---------- components: +Documentation resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14900> _______________________________________ From report at bugs.python.org Wed Oct 31 21:15:48 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 31 Oct 2012 20:15:48 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351714548.74.0.04928344381.issue16344@psf.upfronthosting.co.za> Terry J. Reedy added the comment: An additional reason to keep English error messages always is that they are not just printed. They are part of the args tuple attribute of exception objects. Code that processes exception messages could break if the English version is replaced. Doctests are only one example. This consideration suggests that translations, if done at exception creation, should be an optional last member of args or an optional attribute, such as .altmsg. I agree than any change should follow PEP approval. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16344> _______________________________________ From report at bugs.python.org Wed Oct 31 21:31:30 2012 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 31 Oct 2012 20:31:30 +0000 Subject: [issue16377] Fix bisect unittest Message-ID: <1351715490.4.0.45923656466.issue16377@psf.upfronthosting.co.za> New submission from Yury Selivanov: TestInsort.test_vsBuiltinSort is a bit broken, as it doesn't test insorting `list` objects. Patch attached. ---------- files: test_bisect.patch keywords: patch messages: 174365 nosy: christian.heimes, georg.brandl, rhettinger, yselivanov priority: normal severity: normal status: open title: Fix bisect unittest versions: Python 3.3 Added file: http://bugs.python.org/file27816/test_bisect.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16377> _______________________________________ From report at bugs.python.org Wed Oct 31 21:33:35 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 31 Oct 2012 20:33:35 +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: <1351715615.71.0.328107035958.issue11566@psf.upfronthosting.co.za> Mark Dickinson added the comment: Is this also an issue for Python 3.x? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11566> _______________________________________ From report at bugs.python.org Wed Oct 31 21:39:22 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 20:39:22 +0000 Subject: [issue16377] Fix bisect unittest In-Reply-To: <1351715490.4.0.45923656466.issue16377@psf.upfronthosting.co.za> Message-ID: <3XsLxj49KZzMCY@mail.python.org> Roundup Robot added the comment: New changeset 838e2b19489e by Andrew Svetlov in branch '3.2': Issue #16377: Fix bisect unittest. http://hg.python.org/cpython/rev/838e2b19489e New changeset f3dd84feeb58 by Andrew Svetlov in branch '3.3': Merge issue #16377: Fix bisect unittest. http://hg.python.org/cpython/rev/f3dd84feeb58 New changeset 016d1a1fd601 by Andrew Svetlov in branch 'default': Merge issue #16377: Fix bisect unittest. http://hg.python.org/cpython/rev/016d1a1fd601 ---------- nosy: +python-dev _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16377> _______________________________________ From report at bugs.python.org Wed Oct 31 21:40:23 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 31 Oct 2012 20:40:23 +0000 Subject: [issue16377] Fix bisect unittest In-Reply-To: <1351715490.4.0.45923656466.issue16377@psf.upfronthosting.co.za> Message-ID: <1351716023.51.0.399481755617.issue16377@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks, Yury. ---------- components: +Library (Lib) nosy: +asvetlov resolution: -> fixed status: open -> closed type: -> enhancement versions: +Python 3.2, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16377> _______________________________________ From report at bugs.python.org Wed Oct 31 21:40:45 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 31 Oct 2012 20:40:45 +0000 Subject: [issue16377] Fix bisect unittest In-Reply-To: <1351715490.4.0.45923656466.issue16377@psf.upfronthosting.co.za> Message-ID: <1351716045.58.0.866668173176.issue16377@psf.upfronthosting.co.za> Changes by Andrew Svetlov <andrew.svetlov at gmail.com>: ---------- stage: -> committed/rejected _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16377> _______________________________________ From report at bugs.python.org Wed Oct 31 21:41:12 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 20:41:12 +0000 Subject: [issue16377] Fix bisect unittest In-Reply-To: <1351715490.4.0.45923656466.issue16377@psf.upfronthosting.co.za> Message-ID: <3XsLzr0kLBzPb9@mail.python.org> Roundup Robot added the comment: New changeset 8296b686c6de by Mark Dickinson in branch '2.7': Issue #16377: fix missed test due to incorrect indentation in test_bisect. Thanks Yury Selivanov. http://hg.python.org/cpython/rev/8296b686c6de ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16377> _______________________________________ From report at bugs.python.org Wed Oct 31 21:41:34 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 31 Oct 2012 20:41:34 +0000 Subject: [issue16377] Fix bisect unittest In-Reply-To: <1351715490.4.0.45923656466.issue16377@psf.upfronthosting.co.za> Message-ID: <1351716094.2.0.626073977156.issue16377@psf.upfronthosting.co.za> Mark Dickinson added the comment: (also in 2.7 :-) ---------- nosy: +mark.dickinson _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16377> _______________________________________ From report at bugs.python.org Wed Oct 31 21:49:23 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 31 Oct 2012 20:49:23 +0000 Subject: [issue16377] Fix bisect unittest In-Reply-To: <1351715490.4.0.45923656466.issue16377@psf.upfronthosting.co.za> Message-ID: <1351716563.11.0.722913886776.issue16377@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Thanks, Mark. I've missed it. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16377> _______________________________________ From report at bugs.python.org Wed Oct 31 22:15:29 2012 From: report at bugs.python.org (Roger Serwy) Date: Wed, 31 Oct 2012 21:15:29 +0000 Subject: [issue13659] Add a help() viewer for IDLE's Shell. In-Reply-To: <1324707815.11.0.534121320744.issue13659@psf.upfronthosting.co.za> Message-ID: <1351718129.97.0.434833902789.issue13659@psf.upfronthosting.co.za> Roger Serwy added the comment: The attached patch ("issue13659.patch") adds a configuration option for selecting the output of help() as being in the shell or in the pager. It is an enhancement against 3.4. Another possibility involves adding a checkable menu item under "Options" or "Help" to enable/disable the help pager. Please review. ---------- stage: needs patch -> patch review versions: +Python 3.4 -Python 3.3 Added file: http://bugs.python.org/file27817/issue13659.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue13659> _______________________________________ From report at bugs.python.org Wed Oct 31 22:25:37 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 21:25:37 +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: <3XsMz46qBjzPh5@mail.python.org> Roundup Robot added the comment: New changeset 13ebaa36d87d by Victor Stinner in branch 'default': Issue #15478: Use path_error() in more posix functions, especially in Windows http://hg.python.org/cpython/rev/13ebaa36d87d New changeset 9f696742dbda by Victor Stinner in branch 'default': Issue #15478: Fix again to fix test_os on Windows http://hg.python.org/cpython/rev/9f696742dbda ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15478> _______________________________________ From report at bugs.python.org Wed Oct 31 22:47:23 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 31 Oct 2012 21:47:23 +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: <1351720043.35.0.580690171224.issue9742@psf.upfronthosting.co.za> Mark Dickinson added the comment: Looking back at the discussion, I think I got this bit wrong: "the round function is needed, and used, in Objects/floatobject.c (that is, if PY_NO_SHORT_FLOAT_REPR is *not* defined;" In fact, the round function is used if PY_NO_SHORT_FLOAT_REPR *is* defined, and is unused otherwise. So indeed nothing from pymath.o is used in the rest of the Python core. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9742> _______________________________________ From report at bugs.python.org Wed Oct 31 22:48:02 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 21:48:02 +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: <3XsNSx4Mg8zS6w@mail.python.org> Roundup Robot added the comment: New changeset 6903f5214e99 by Victor Stinner in branch 'default': Issue #15478: Use source filename in OSError, not destination filename http://hg.python.org/cpython/rev/6903f5214e99 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15478> _______________________________________ From report at bugs.python.org Wed Oct 31 22:50:00 2012 From: report at bugs.python.org (Dwayne Litzenberger) Date: Wed, 31 Oct 2012 21:50:00 +0000 Subject: [issue14894] distutils.LooseVersion fails to compare number and a word In-Reply-To: <1337805749.61.0.661955519892.issue14894@psf.upfronthosting.co.za> Message-ID: <1351720199.99.0.822328568903.issue14894@psf.upfronthosting.co.za> Dwayne Litzenberger added the comment: As far as a real-world example is concerned, if you're using git-describe to generate your version numbers, you can pretty easily end up with something like "ab25c6fe95ee92fac3187dcd90e0560ccacb084a". ---------- nosy: +DLitz _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14894> _______________________________________ From report at bugs.python.org Wed Oct 31 22:50:35 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 31 Oct 2012 21:50:35 +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: <1351720235.76.0.125971608922.issue8743@psf.upfronthosting.co.za> Changes by Andrew Svetlov <andrew.svetlov at gmail.com>: ---------- nosy: +asvetlov _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8743> _______________________________________ From report at bugs.python.org Wed Oct 31 22:54:09 2012 From: report at bugs.python.org (STINNER Victor) Date: Wed, 31 Oct 2012 21:54: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: <1351720449.38.0.879642511652.issue15478@psf.upfronthosting.co.za> STINNER Victor added the comment: All issues should now be fixed. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15478> _______________________________________ From report at bugs.python.org Wed Oct 31 23:01:33 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 22:01:33 +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: <3XsNmX54XxzNvl@mail.python.org> Roundup Robot added the comment: New changeset b3434c1ae503 by Victor Stinner in branch 'default': Issue #15441, #15478: Reenable test_nonascii_abspath() on Windows http://hg.python.org/cpython/rev/b3434c1ae503 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15478> _______________________________________ From report at bugs.python.org Wed Oct 31 23:01:34 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 22:01:34 +0000 Subject: [issue15441] test_posixpath fails on Japanese edition of Windows In-Reply-To: <1343143448.49.0.0362298873842.issue15441@psf.upfronthosting.co.za> Message-ID: <3XsNmY3bw3zPNp@mail.python.org> Roundup Robot added the comment: New changeset b3434c1ae503 by Victor Stinner in branch 'default': Issue #15441, #15478: Reenable test_nonascii_abspath() on Windows http://hg.python.org/cpython/rev/b3434c1ae503 ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15441> _______________________________________ From report at bugs.python.org Wed Oct 31 23:03:47 2012 From: report at bugs.python.org (STINNER Victor) Date: Wed, 31 Oct 2012 22:03:47 +0000 Subject: [issue15441] test_posixpath fails on Japanese edition of Windows In-Reply-To: <1343143448.49.0.0362298873842.issue15441@psf.upfronthosting.co.za> Message-ID: <1351721027.73.0.365910349102.issue15441@psf.upfronthosting.co.za> STINNER Victor added the comment: > If a file name was invalid byte character, > os.chdir() raises UnicodeDecodeError() instead of WindowsError. I believe this case is not handled correctly in Python 3.4 (version under development) thanks to my work on issue #15478. Thanks for the report Atsuo Ishimoto! Don't hesitate to report other similar issue ;-) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15441> _______________________________________ From report at bugs.python.org Wed Oct 31 23:08:32 2012 From: report at bugs.python.org (STINNER Victor) Date: Wed, 31 Oct 2012 22:08:32 +0000 Subject: [issue16335] Integer overflow in unicode-escape decoder In-Reply-To: <1351292121.99.0.943463007307.issue16335@psf.upfronthosting.co.za> Message-ID: <1351721312.44.0.922371522929.issue16335@psf.upfronthosting.co.za> STINNER Victor added the comment: I have 12 GB of RAM. Let's test. $ ./python Python 3.4.0a0 (default:8573a86c11b5+, Oct 31 2012, 22:17:00) [GCC 4.6.3 20120306 (Red Hat 4.6.3-2)] on linux >>> x=(b'\\N{WHITE SMILING FACE' + b'x' * 2**32 + b'}') >>> len(x) 4294967318 >>> y=x.decode('unicode-escape') Traceback (most recent call last): File "<stdin>", line 1, in <module> MemoryError There is no crash, but it would be better to get a SyntaxError("(unicode error) 'unicodeescape' codec can't decode bytes in position 0-6: unknown Unicode character name") instead. I propose to only fix this issue in Python 3.4. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16335> _______________________________________ From report at bugs.python.org Wed Oct 31 23:19:58 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 31 Oct 2012 22:19:58 +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: <1351721998.26.0.278921812036.issue9742@psf.upfronthosting.co.za> Mark Dickinson added the comment: Reopening because I think I may have an easy solution. Is there anyone who can reproduce the problem who could test the attached patch (against 2.7) to see if it solves the issue? ---------- assignee: -> mark.dickinson resolution: out of date -> status: closed -> open Added file: http://bugs.python.org/file27818/issue9742.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue9742> _______________________________________ From report at bugs.python.org Wed Oct 31 23:35:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2012 22:35:49 +0000 Subject: [issue16335] Integer overflow in unicode-escape decoder In-Reply-To: <1351292121.99.0.943463007307.issue16335@psf.upfronthosting.co.za> Message-ID: <1351722949.25.0.540628270876.issue16335@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > MemoryError It's because you need >4GB for source bytes + at least >8GB (>12GB on Windows) for temporary UCS2 string. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16335> _______________________________________