From report at bugs.python.org Tue Oct 1 00:44:21 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 30 Sep 2013 22:44:21 +0000 Subject: [issue16040] nntplib: unlimited readline() from connection In-Reply-To: <1380577428.9.0.315939703111.issue16040@psf.upfronthosting.co.za> Message-ID: <20130930184419.3c5b4617@anarchist> Barry A. Warsaw added the comment: On Sep 30, 2013, at 09:43 PM, Jyrki Pulliainen wrote: >I also wonder if there should be data error risen instead? Current docstrings >of the errors are not that well fit. I guess a data error makes the least nonsense here, so I'll change it over to that. I'm happy to entertain other thoughts (except for introducing a new exception of course) before 2.6.9 final. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 01:10:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 30 Sep 2013 23:10:13 +0000 Subject: [issue16040] nntplib: unlimited readline() from connection In-Reply-To: <1348569525.38.0.219080768405.issue16040@psf.upfronthosting.co.za> Message-ID: <3cpfTc4gVbz7LkG@mail.python.org> Roundup Robot added the comment: New changeset 731abf7834c4 by Barry Warsaw in branch '2.6': - Issue #16040: CVE-2013-1752: nntplib: Limit maximum line lengths to 2048 to http://hg.python.org/cpython/rev/731abf7834c4 New changeset 36680a7c0e22 by Barry Warsaw in branch '2.7': - Issue #16040: CVE-2013-1752: nntplib: Limit maximum line lengths to 2048 to http://hg.python.org/cpython/rev/36680a7c0e22 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 01:11:23 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 30 Sep 2013 23:11:23 +0000 Subject: [issue16040] nntplib: unlimited readline() from connection In-Reply-To: <1348569525.38.0.219080768405.issue16040@psf.upfronthosting.co.za> Message-ID: <1380582683.22.0.418257125817.issue16040@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 01:11:57 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 30 Sep 2013 23:11:57 +0000 Subject: [issue16040] nntplib: unlimited readline() from connection In-Reply-To: <1348569525.38.0.219080768405.issue16040@psf.upfronthosting.co.za> Message-ID: <1380582717.14.0.598674192989.issue16040@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 01:29:09 2013 From: report at bugs.python.org (Musashi Tamura) Date: Mon, 30 Sep 2013 23:29:09 +0000 Subject: [issue19099] struct.pack fails first time with unicode fmt In-Reply-To: <1380270487.08.0.885911184861.issue19099@psf.upfronthosting.co.za> Message-ID: <1380583749.84.0.30125721654.issue19099@psf.upfronthosting.co.za> Musashi Tamura added the comment: Thanks for feedback. I think it should be fixed with allowing unicode. "from __future__ import unicode_literals" may break existing code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 01:30:11 2013 From: report at bugs.python.org (Eric Snow) Date: Mon, 30 Sep 2013 23:30:11 +0000 Subject: [issue19081] zipimport behaves badly when the zip file changes while the process is running In-Reply-To: <1379995203.41.0.89812771706.issue19081@psf.upfronthosting.co.za> Message-ID: <1380583811.81.0.407403244.issue19081@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +brett.cannon, eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 01:44:03 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 30 Sep 2013 23:44:03 +0000 Subject: [issue19052] Python's CGIHTTPServer does not handle Expect: 100-continue gracefully which results in some Post requests being handled slowly. In-Reply-To: <1379604416.32.0.462048261907.issue19052@psf.upfronthosting.co.za> Message-ID: <1380584643.55.0.547663956849.issue19052@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 01:46:02 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 30 Sep 2013 23:46:02 +0000 Subject: [issue1491] BaseHTTPServer incorrectly implements response code 100 In-Reply-To: <1195822360.07.0.215272908737.issue1491@psf.upfronthosting.co.za> Message-ID: <1380584762.75.0.302376490756.issue1491@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 01:46:24 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 30 Sep 2013 23:46:24 +0000 Subject: [issue19053] read1() from zipfile returns empty data In-Reply-To: <1379604556.3.0.19871630565.issue19053@psf.upfronthosting.co.za> Message-ID: <1380584784.95.0.44616750247.issue19053@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 05:48:08 2013 From: report at bugs.python.org (Eric Snow) Date: Tue, 01 Oct 2013 03:48:08 +0000 Subject: [issue11620] winsound.PlaySound() with SND_MEMORY should accept bytes instead of strings In-Reply-To: <1300667681.04.0.269037633009.issue11620@psf.upfronthosting.co.za> Message-ID: <1380599288.34.0.214777485952.issue11620@psf.upfronthosting.co.za> Eric Snow added the comment: I ran into this today. Can't we just change the "Z" to "z#" in the format string (or "z*")? Other than that, Tim's patch makes sense. ---------- nosy: +eric.snow versions: +Python 3.3, Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 05:52:42 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Tue, 01 Oct 2013 03:52:42 +0000 Subject: [issue19099] struct.pack fails first time with unicode fmt In-Reply-To: <1380270487.08.0.885911184861.issue19099@psf.upfronthosting.co.za> Message-ID: <1380599562.55.0.553264454023.issue19099@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Refactor test to clear the cache before using unicode format. ---------- Added file: http://bugs.python.org/file31930/handle_ascii_range_unicode_in_struct_pack_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:07:45 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 01 Oct 2013 05:07:45 +0000 Subject: [issue19094] urljoin should raise a TypeError if URL is not a string In-Reply-To: <1380142541.83.0.560775690833.issue19094@psf.upfronthosting.co.za> Message-ID: <1380604065.72.0.221611577959.issue19094@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I have provided my comments in the review tool. Please check them out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 09:05:14 2013 From: report at bugs.python.org (Andre M. Descombes) Date: Tue, 01 Oct 2013 07:05:14 +0000 Subject: [issue19135] Check out my profile on LinkedIn Message-ID: <966608683.31805291.1380611111380.JavaMail.app@ela4-bed84.prod> New submission from Andre M. Descombes: LinkedIn ------------ I'd like to include you in my network to share updates and stay in touch. - Andre Andre Descombes DQM at Coheris Paris Area, France Confirm that you know Andre Descombes: https://www.linkedin.com/e/-3qcne3-hm8s7jcj-8/isd/16969775744/B54_m0Jy/?hs=false&tok=0vJyT35US96RY1 -- You are receiving Invitation to Connect emails. Click to unsubscribe: http://www.linkedin.com/e/-3qcne3-hm8s7jcj-8/z2oU7dKDzpt2G7xQz2FC2SclHmnUGzmsk0c/goo/report%40bugs%2Epython%2Eorg/20061/I5638997180_1/?hs=false&tok=2uJc6djm696RY1 (c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA. ---------- messages: 198751 nosy: amdescombes priority: normal severity: normal status: open title: Check out my profile on LinkedIn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 09:14:23 2013 From: report at bugs.python.org (Graham Wideman) Date: Tue, 01 Oct 2013 07:14:23 +0000 Subject: [issue19136] CSV, builtin open(), newline arg. Docs broken again. Message-ID: <1380611663.89.0.558350750014.issue19136@psf.upfronthosting.co.za> New submission from Graham Wideman: The docs appear to be incorrect for CSV at: http://docs.python.org/3.3/library/csv.html. Per issue http://bugs.python.org/issue7198 , there's a long history of contention between os.open and csv.writer, in which, on Windows, the default result is an unwanted additional '\r'. That was 'fixed' by using the newline='' argument to open(). This is reflected in the docs at the above link: with open('eggs.csv', 'w', newline='') as csvfile: spamwriter = csv.writer(csvfile, delimiter=...) However, in python 3.3.2 use of the newline argument returns: "TypeError: 'newline' is an invalid keyword argument for this function." In brief testing, it appears that a correct result can be obtain by calling open as follows: with open(somepath, 'wb') as writerfile: writer = csv.writer(writerfile, delimiter=...) Note: binary mode, not text as previously needed and currently documented. ---------- assignee: docs at python components: Documentation messages: 198752 nosy: docs at python, gwideman priority: normal severity: normal status: open title: CSV, builtin open(), newline arg. Docs broken again. type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 09:15:00 2013 From: report at bugs.python.org (Berker Peksag) Date: Tue, 01 Oct 2013 07:15:00 +0000 Subject: [issue19135] Spam In-Reply-To: <966608683.31805291.1380611111380.JavaMail.app@ela4-bed84.prod> Message-ID: <1380611700.92.0.0938869598258.issue19135@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: -amdescombes resolution: -> invalid stage: -> committed/rejected status: open -> closed title: Check out my profile on LinkedIn -> Spam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 09:15:10 2013 From: report at bugs.python.org (Berker Peksag) Date: Tue, 01 Oct 2013 07:15:10 +0000 Subject: [issue19135] Spam Message-ID: <1380611710.82.0.689134279513.issue19135@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- Removed message: http://bugs.python.org/msg198751 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 10:01:14 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 01 Oct 2013 08:01:14 +0000 Subject: [issue18594] C accelerator for collections.Counter is slow In-Reply-To: <1375166960.42.0.521563124847.issue18594@psf.upfronthosting.co.za> Message-ID: <3cptGK4hLwz7Ljh@mail.python.org> Roundup Robot added the comment: New changeset 6aef095fdb30 by Raymond Hettinger in branch '3.3': Issue #18594: Fix the fast path for collections.Counter(). http://hg.python.org/cpython/rev/6aef095fdb30 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 10:27:30 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 01 Oct 2013 08:27:30 +0000 Subject: [issue19099] struct.pack fails first time with unicode fmt In-Reply-To: <1380270487.08.0.885911184861.issue19099@psf.upfronthosting.co.za> Message-ID: <1380616050.2.0.207895635041.issue19099@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: struct.Struct() should be changed instead of struct.pack(). Here is a patch. ---------- stage: -> patch review type: behavior -> enhancement Added file: http://bugs.python.org/file31931/struct_unicode_fmt.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 10:39:30 2013 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 01 Oct 2013 08:39:30 +0000 Subject: [issue19108] Benchmark runner tries to execute external Python command and fails on error reporting In-Reply-To: <1380297636.45.0.339184347104.issue19108@psf.upfronthosting.co.za> Message-ID: <1380616770.96.0.370553248416.issue19108@psf.upfronthosting.co.za> Stefan Behnel added the comment: Antoine, I really don't like this attitude of adding code and then saying "well, it's there, I won't change it" when others complain about breakage. Please undo your change that broke the ability of using (non-trivial) wrapper scripts for the Python runtimes. If you think that that change provides an important feature, then please implement that feature in a way that does not break existing usages of the benchmark runner. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 10:45:57 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 01 Oct 2013 08:45:57 +0000 Subject: [issue18594] C accelerator for collections.Counter is slow In-Reply-To: <1375166960.42.0.521563124847.issue18594@psf.upfronthosting.co.za> Message-ID: <1380617157.41.0.559451703199.issue18594@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Attaching a patch for the slow path. Makes the code exactly match the pure python version. This kicks in whether someone has subclassed Counter and overridden either __getitem__ or __setitem__. ---------- Added file: http://bugs.python.org/file31932/fix_counter2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 10:53:23 2013 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 01 Oct 2013 08:53:23 +0000 Subject: [issue18594] C accelerator for collections.Counter is slow In-Reply-To: <1375166960.42.0.521563124847.issue18594@psf.upfronthosting.co.za> Message-ID: <1380617603.08.0.93855294673.issue18594@psf.upfronthosting.co.za> Stefan Behnel added the comment: Can you update the benchmark numbers to show what the difference is compared to pure Python (and to the fastpath) now? One more thing: the fastpath depends on .__getitem__() and friends, whereas the fallback path depends on .get(). What if someone overrides .get() but not .__getitem__()? (Might be a hypothetical case...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 10:57:48 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Tue, 01 Oct 2013 08:57:48 +0000 Subject: [issue19099] struct.pack fails first time with unicode fmt In-Reply-To: <1380270487.08.0.885911184861.issue19099@psf.upfronthosting.co.za> Message-ID: <1380617868.9.0.681414910162.issue19099@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Serhiy, you don't want to clear the cache in the test to simulate the bug? struct._clearcache() Other than that, should we raise struct.error instead of ValueError? Right now, the current behaviour in python 2.7 is: >>> struct.pack('\x80', 3) Traceback (most recent call last): File "", line 1, in struct.error: bad char in struct format But you are right. Struct() should have been changed instead of struct.pack. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 11:03:57 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Tue, 01 Oct 2013 09:03:57 +0000 Subject: [issue19099] struct.pack fails first time with unicode fmt In-Reply-To: <1380270487.08.0.885911184861.issue19099@psf.upfronthosting.co.za> Message-ID: <1380618237.0.0.98077569398.issue19099@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Nevermind about my comment about clearing cache. It only happens if we use struct.pack not struct.Struct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 11:12:56 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 01 Oct 2013 09:12:56 +0000 Subject: [issue19108] Benchmark runner tries to execute external Python command and fails on error reporting In-Reply-To: <1380616770.96.0.370553248416.issue19108@psf.upfronthosting.co.za> Message-ID: <1292751624.38632817.1380618769612.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > Antoine, I really don't like this attitude of adding code and then > saying "well, it's there, I won't change it" when others complain > about breakage. Well, I don't care whether you "like this attitude". Your own attitude has irked several developers enough that they're more or less ignoring you. That includes me. If you're not willing to be respectful and constructive, the situation won't improve. As for the present issue, the benchmark suite is meant to work with an actual Python interpreter. Not a wrapper script that can pretend to be one for a single invocation mode. If you think otherwise, you can of course provide evidence, and a patch to fix things. (and hope for someone to apply the patch) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 11:13:54 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 01 Oct 2013 09:13:54 +0000 Subject: [issue19108] Benchmark runner tries to execute external Python command and fails on error reporting In-Reply-To: <1380297636.45.0.339184347104.issue19108@psf.upfronthosting.co.za> Message-ID: <1380618834.52.0.806153791588.issue19108@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Brett, I'm leaving you with this, if you're wanting to do anything about it :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 11:13:59 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 01 Oct 2013 09:13:59 +0000 Subject: [issue19108] Benchmark runner tries to execute external Python command and fails on error reporting In-Reply-To: <1380297636.45.0.339184347104.issue19108@psf.upfronthosting.co.za> Message-ID: <1380618839.67.0.0414036587496.issue19108@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: -pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 11:37:48 2013 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 01 Oct 2013 09:37:48 +0000 Subject: [issue19108] Benchmark runner tries to execute external Python command and fails on error reporting In-Reply-To: <1380297636.45.0.339184347104.issue19108@psf.upfronthosting.co.za> Message-ID: <1380620268.85.0.22006254193.issue19108@psf.upfronthosting.co.za> Stefan Behnel added the comment: > I'm leaving you with this, if you're wanting to do anything about it Sorry, but weren't you just asking *me* to be constructive? I'm aware that getting this change right isn't trivial. But that doesn't mean we should happily break other people's code and then leave the cleanup to them. This isn't a green-field project, the code is actually being used by other projects than CPython. In fact, the whole purpose of this code is to be used by other projects as well. That means that there may be some additional restrictions on what we should expect from a benchmarked runtime. Previously, the requirements were "can run a Python script from the command line". Now, the additional requirements are "accepts the -c switch" and "can execute a line of Python code passed on the command line". That is substantially harder to handle in a script. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 11:43:29 2013 From: report at bugs.python.org (Gabi Davar) Date: Tue, 01 Oct 2013 09:43:29 +0000 Subject: [issue18040] SIGINT catching regression on windows in 2.7 In-Reply-To: <1369278066.93.0.310534523814.issue18040@psf.upfronthosting.co.za> Message-ID: <1380620609.84.0.459461577719.issue18040@psf.upfronthosting.co.za> Changes by Gabi Davar : ---------- nosy: +Gabi.Davar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 12:21:22 2013 From: report at bugs.python.org (Oscar Benjamin) Date: Tue, 01 Oct 2013 10:21:22 +0000 Subject: [issue12641] Remove -mno-cygwin from distutils In-Reply-To: <1380573031.67.0.772345108207.issue12641@psf.upfronthosting.co.za> Message-ID: Oscar Benjamin added the comment: Thanks Antoine! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 12:40:38 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 01 Oct 2013 10:40:38 +0000 Subject: [issue19108] Benchmark runner tries to execute external Python command and fails on error reporting In-Reply-To: <1380620268.85.0.22006254193.issue19108@psf.upfronthosting.co.za> Message-ID: <524AA6A2.7040000@egenix.com> Marc-Andre Lemburg added the comment: Wouldn't it be possible to use the old version as fallback solution in case the -c switch approach fails or have a command line option to pass in the version in order to bypass all of this ? Stefan: Why don't you propose a patch which implements this ? ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 13:49:51 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2013 11:49:51 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1380628191.9.0.493631918046.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: The issue #16742 must be fixed to be able to trace memory blocks allocated by PyMem_RawMalloc(). ---------- dependencies: +PyOS_Readline drops GIL and calls PyOS_StdioReadline, which isn't thread safe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 13:57:27 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2013 11:57:27 +0000 Subject: [issue18948] deliberately crashing tests should prevent core dumps In-Reply-To: <1378493765.27.0.466855736327.issue18948@psf.upfronthosting.co.za> Message-ID: <1380628647.33.0.127459642047.issue18948@psf.upfronthosting.co.za> STINNER Victor added the comment: > Perhaps it would be best to either combine SuppressCoreFiles > and suppress_crash_popup Yes, these two tools must be merged into one unique portable tool. Example of names: * ignore_fatal_errors() * dont_report_crashes() * ignore_crashes() Doc: "On Windows, don't display the Windows Error Reporting dialog. On UNIX, disable the creation of coredump file." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 13:57:47 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2013 11:57:47 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1380628667.57.0.10320073992.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: For the development, it would also be nice to fix #18948. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 13:59:51 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2013 11:59:51 +0000 Subject: [issue18948] deliberately crashing tests should prevent core dumps In-Reply-To: <1378493765.27.0.466855736327.issue18948@psf.upfronthosting.co.za> Message-ID: <1380628791.06.0.827132227485.issue18948@psf.upfronthosting.co.za> STINNER Victor added the comment: test.support.SuppressCoreFiles was added by #18623. I implemented a similar tool in my tracemalloc fork: http://hg.python.org/features/tracemalloc/rev/b91450e51388 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 14:55:19 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 01 Oct 2013 12:55:19 +0000 Subject: [issue19099] struct.pack fails first time with unicode fmt In-Reply-To: <1380270487.08.0.885911184861.issue19099@psf.upfronthosting.co.za> Message-ID: <1380632119.8.0.0590101278431.issue19099@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Other than that, should we raise struct.error instead of ValueError? Python 3 raises UnicodeEncodeError. And Python 2 raises UnicodeEncodeError when coerce non-ASCII unicode to str. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 15:13:55 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 01 Oct 2013 13:13:55 +0000 Subject: [issue15964] SyntaxError in asdl when building 2.7 with system Python 3 In-Reply-To: <1347978379.29.0.810502621141.issue15964@psf.upfronthosting.co.za> Message-ID: <3cq1C64R2Yz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 56ed149e597a by Eli Bendersky in branch 'default': Mention 'make touch' in the devguide. http://hg.python.org/devguide/rev/56ed149e597a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 15:13:55 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 01 Oct 2013 13:13:55 +0000 Subject: [issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots In-Reply-To: <1380295557.39.0.230281055925.issue19106@psf.upfronthosting.co.za> Message-ID: <3cq1C72YVTz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 56ed149e597a by Eli Bendersky in branch 'default': Mention 'make touch' in the devguide. http://hg.python.org/devguide/rev/56ed149e597a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 15:15:08 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 01 Oct 2013 13:15:08 +0000 Subject: [issue19092] ExitStack.__exit__ incorrectly suppresses exceptions in __exit__ callbacks of inner context managers In-Reply-To: <1380136187.37.0.729796109014.issue19092@psf.upfronthosting.co.za> Message-ID: <1380633308.13.0.617686834885.issue19092@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 15:27:41 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 01 Oct 2013 13:27:41 +0000 Subject: [issue15964] SyntaxError in asdl when building 2.7 with system Python 3 In-Reply-To: <1347978379.29.0.810502621141.issue15964@psf.upfronthosting.co.za> Message-ID: <1380634061.38.0.284457480756.issue15964@psf.upfronthosting.co.za> Eli Bendersky added the comment: `make touch` was added to the bots in #19106 and is now also recommended in the devguide for folks running into this problem. IMHO this is all we need here, because there's no point toiling to make the auto-generation scripts in every version to work with any other version of Python. It's error prone and keeps us back (there's no reason not to use modern Python practices in the ASDL generator of 3.4, say, and instead cling to Python 2.4). So I'm going to close this issue in a few days unless new feedback emerges. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 15:28:18 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 01 Oct 2013 13:28:18 +0000 Subject: [issue19092] ExitStack.__exit__ incorrectly suppresses exceptions in __exit__ callbacks of inner context managers In-Reply-To: <1380136187.37.0.729796109014.issue19092@psf.upfronthosting.co.za> Message-ID: <3cq1Wj3Q72z7LjN@mail.python.org> Roundup Robot added the comment: New changeset 423736775f6b by Nick Coghlan in branch '3.3': Close #19092: ExitStack now reraises exceptions from __exit__ http://hg.python.org/cpython/rev/423736775f6b New changeset 451f5f6151f5 by Nick Coghlan in branch 'default': Merge #19092 from 3.3 http://hg.python.org/cpython/rev/451f5f6151f5 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 15:30:04 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 01 Oct 2013 13:30:04 +0000 Subject: [issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots In-Reply-To: <1380295557.39.0.230281055925.issue19106@psf.upfronthosting.co.za> Message-ID: <1380634204.81.0.939141972164.issue19106@psf.upfronthosting.co.za> Eli Bendersky added the comment: I've updated the devguide about `make touch`. As for the buildbot configuration, I agree we shouldn't document a static snapshot and also there's the passwords problem. I was talking to Antoine about this the other day, and maybe there's sense to create an "infrastructure" section in the devguide that will explain how to log into the buildbot server and look at the configuration. This should be enough for folks who really need to figure it out and is also safe w.r.t. getting out of date and exposing passwords. Also, IMHO #15964 can be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 15:38:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 01 Oct 2013 13:38:28 +0000 Subject: [issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots In-Reply-To: <1380634204.81.0.939141972164.issue19106@psf.upfronthosting.co.za> Message-ID: <112370102.39349543.1380634702085.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > I was talking to Antoine about this the other day, and maybe there's > sense to create an "infrastructure" section in the devguide that > will explain how to log into the buildbot server and look at the > configuration. IMHO it would make more sense to create a separate "infrastructure guide". There's no need to bloat the devguide with such information, which could quickly become quite complicated. ---------- title: Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots -> Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 15:44:52 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 01 Oct 2013 13:44:52 +0000 Subject: [issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots In-Reply-To: <1380295557.39.0.230281055925.issue19106@psf.upfronthosting.co.za> Message-ID: <1380635092.97.0.399543036773.issue19106@psf.upfronthosting.co.za> Eli Bendersky added the comment: I'm not sure a separate document is right here because that's one more repository to have. The devguide already contains sections for somewhat more esoteric things like compiler internals guide, coverity scans. Besides, section 18 already has some material about the buildbots. But I don't feel strongly enough about this to argue :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 15:44:54 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 01 Oct 2013 13:44:54 +0000 Subject: [issue16040] nntplib: unlimited readline() from connection In-Reply-To: <1348569525.38.0.219080768405.issue16040@psf.upfronthosting.co.za> Message-ID: <1380635094.25.0.828191612787.issue16040@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: > New changeset 731abf7834c4 by Barry Warsaw in branch '2.6': > - Issue #16040: CVE-2013-1752: nntplib: Limit maximum line lengths to 2048 to > http://hg.python.org/cpython/rev/731abf7834c4 > > New changeset 36680a7c0e22 by Barry Warsaw in branch '2.7': > - Issue #16040: CVE-2013-1752: nntplib: Limit maximum line lengths to 2048 to > http://hg.python.org/cpython/rev/36680a7c0e22 s/lenght/length/ in new comment in Lib/nntplib.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 15:54:05 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 Oct 2013 13:54:05 +0000 Subject: [issue19136] CSV, builtin open(), newline arg. Docs broken again. In-Reply-To: <1380611663.89.0.558350750014.issue19136@psf.upfronthosting.co.za> Message-ID: <1380635645.75.0.809645885995.issue19136@psf.upfronthosting.co.za> R. David Murray added the comment: You must have a different 'open' in your namespace when you execute that. Dropping a keyword argument like that is something we would never do without a deprecation period. Your example works fine for me. ---------- nosy: +r.david.murray resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 16:00:19 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 01 Oct 2013 14:00:19 +0000 Subject: [issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots In-Reply-To: <1380635092.97.0.399543036773.issue19106@psf.upfronthosting.co.za> Message-ID: <1605047839.39400816.1380636013283.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > I'm not sure a separate document is right here because that's one > more repository to have. The devguide already contains sections for > somewhat more esoteric things like compiler internals guide, > coverity scans. Besides, section 18 already has some material about > the buildbots. Well, ideally the more esoteric things wouldn't really be there. Perhaps other people have different opinions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 16:02:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 01 Oct 2013 14:02:25 +0000 Subject: [issue10042] functools.total_ordering fails to handle NotImplemented correctly In-Reply-To: <1286440012.74.0.624864175042.issue10042@psf.upfronthosting.co.za> Message-ID: <3cq2H44Zs3z7LmX@mail.python.org> Roundup Robot added the comment: New changeset ad9f207645ab by Nick Coghlan in branch 'default': Close #10042: functools.total_ordering now handles NotImplemented http://hg.python.org/cpython/rev/ad9f207645ab ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 16:04:19 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 01 Oct 2013 14:04:19 +0000 Subject: [issue10042] functools.total_ordering fails to handle NotImplemented correctly In-Reply-To: <1286440012.74.0.624864175042.issue10042@psf.upfronthosting.co.za> Message-ID: <1380636259.22.0.0236151202591.issue10042@psf.upfronthosting.co.za> Nick Coghlan added the comment: The committed patched was based directly on Katie's last version, without my enum changes. Raymond - feel free to tweak the wording on the docs notes or the explanatory comment if you see anything that could be improved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 16:09:30 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 01 Oct 2013 14:09:30 +0000 Subject: [issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots In-Reply-To: <1605047839.39400816.1380636013283.JavaMail.root@zimbra10-e2.priv.proxad.net> Message-ID: Eli Bendersky added the comment: On Tue, Oct 1, 2013 at 7:00 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > > I'm not sure a separate document is right here because that's one > > more repository to have. The devguide already contains sections for > > somewhat more esoteric things like compiler internals guide, > > coverity scans. Besides, section 18 already has some material about > > the buildbots. > > Well, ideally the more esoteric things wouldn't really be there. > I still see the current situation better than the previous one, where this was scattered around PEPs, Wikis and just random web pages. Having it all in the same repository is not ideal from a taxonomical point of view, perhaps, but as a single collection of "everything related to the development *of* Python" it's not too bad since keeping it in a single place makes it easier to maintain and review; mostly, there's a somewhat smaller chance that things will be forgotten and rot. To put it differently, maintaining the devguide is kind-of a chore for devs as it is; splitting it into multiple topical repositories will just make the burden higher so we'll end up not maintaining it at all :) > Perhaps other people have different opinions? > ---------- title: Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots -> Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 16:10:45 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 01 Oct 2013 14:10:45 +0000 Subject: [issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots In-Reply-To: <1380295557.39.0.230281055925.issue19106@psf.upfronthosting.co.za> Message-ID: <1380636645.06.0.552259102069.issue19106@psf.upfronthosting.co.za> Eli Bendersky added the comment: +nick,guido,benjamin: in case you're interested in the discussion that takes place in the most recent messages of this issue ---------- nosy: +benjamin.peterson, gvanrossum, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 16:11:39 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Tue, 01 Oct 2013 14:11:39 +0000 Subject: [issue19094] urljoin should raise a TypeError if URL is not a string In-Reply-To: <1380142541.83.0.560775690833.issue19094@psf.upfronthosting.co.za> Message-ID: <1380636699.14.0.805975780251.issue19094@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Okay, attached the patch based on your comment, Senthil Kumaran. Thanks. The reason I use isinstance to check the type is because I want to support the inheritance as much as possible. >>> class new_str(str): ... pass >>> urljoin(new_str('http://python.org') + new_str('hehe')) will not work with the newest patch. Also, in Lib/urllib/parse.py, most of the time, we use isinstance(x, str) not type(x) == str. But I don't know. Maybe it does not matter. ---------- Added file: http://bugs.python.org/file31933/urljoin_throws_type_error_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 16:17:03 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 01 Oct 2013 14:17:03 +0000 Subject: [issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots In-Reply-To: <1380295557.39.0.230281055925.issue19106@psf.upfronthosting.co.za> Message-ID: <1380637023.09.0.242274574371.issue19106@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Documenting the pydotorg setup is a field of ongoing discussions. If you ask three people involved, you get three answers where this should be documented, with no chance for consensus. >From an infrastructure point of view, it is up to the infrastructure head (i.e. Noah Kantrowitz) to rule on where this should be documented. I can see the python-dev view, to, although the documentation might be as short as "ask Noah". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 16:25:00 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 01 Oct 2013 14:25:00 +0000 Subject: [issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots In-Reply-To: <1380295557.39.0.230281055925.issue19106@psf.upfronthosting.co.za> Message-ID: <1380637500.07.0.599937547848.issue19106@psf.upfronthosting.co.za> Nick Coghlan added the comment: Where to document the infrastructure setup (including the buildbots) is up to Noah/infrastructure-sig, as the devguide just covers CPython development, while the PSF infrastructure team covers a lot more than that. A pointer from the devguide docs to the appropriate infrastructure docs would make sense, but it isn't the right home for the docs themselves. The interim solution I use is "ask on python-dev" or "ask on python-committers" :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 16:42:00 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 01 Oct 2013 14:42:00 +0000 Subject: [issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots In-Reply-To: Message-ID: <307153141.39499564.1380638513812.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > I still see the current situation better than the previous one, where > this > was scattered around PEPs, Wikis and just random web pages. Having it > all > in the same repository is not ideal from a taxonomical point of view, > perhaps, but as a single collection of "everything related to the > development *of* Python" it's not too bad since keeping it in a > single > place makes it easier to maintain and review; Well, precisely, it's putting everything in a single collection that I find bad, because it could become dreadful for beginner contributors. The devguide is primarily meant to ensure contributors don't get lost, even though it can serve as a reminder for core developers too. ---------- title: Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots -> Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 16:55:31 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 01 Oct 2013 14:55:31 +0000 Subject: [issue19137] pprint wrongly format set and frozenset subclasses Message-ID: <1380639331.5.0.0634997889933.issue19137@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Example: >>> import pprint >>> class S(set): pass ... >>> S('abc') S({'a', 'b', 'c'}) >>> pprint.pprint(S('abc')) S({'a', 'b', 'c'}) >>> pprint.pprint(S('abc'), width=1) {'a', 'b', 'c'} And same for frozenset. Here is a patch which fixes this issue. With a patch: >>> pprint.pprint(S('abc'), width=1) S({'a', 'b', 'c'}) ---------- files: pprint_set_subclass.patch keywords: patch messages: 198788 nosy: fdrake, pitrou, rhettinger, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: pprint wrongly format set and frozenset subclasses type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file31934/pprint_set_subclass.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 17:05:32 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 01 Oct 2013 15:05:32 +0000 Subject: [issue19132] Add compact mode to pprint In-Reply-To: <1380485149.97.0.648520685176.issue19132@psf.upfronthosting.co.za> Message-ID: <1380639932.02.0.757697447258.issue19132@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > As noted in the review, I'm not as keen on having dictionaries displayed > in compact form. Agreed with David. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 17:17:24 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 01 Oct 2013 15:17:24 +0000 Subject: [issue19132] Add compact mode to pprint In-Reply-To: <1380485149.97.0.648520685176.issue19132@psf.upfronthosting.co.za> Message-ID: <1380640644.67.0.585027452657.issue19132@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch doesn't compactify dicts. ---------- Added file: http://bugs.python.org/file31935/pprint_compact_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 17:17:59 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 01 Oct 2013 15:17:59 +0000 Subject: [issue19137] pprint wrongly formats set and frozenset subclasses In-Reply-To: <1380639331.5.0.0634997889933.issue19137@psf.upfronthosting.co.za> Message-ID: <1380640679.37.0.537105125457.issue19137@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: pprint wrongly format set and frozenset subclasses -> pprint wrongly formats set and frozenset subclasses _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 17:25:26 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 01 Oct 2013 15:25:26 +0000 Subject: [issue7434] general pprint rewrite In-Reply-To: <1259944363.21.0.149882342014.issue7434@psf.upfronthosting.co.za> Message-ID: <1380641126.81.0.946773377104.issue7434@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 17:40:03 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 01 Oct 2013 15:40:03 +0000 Subject: [issue16040] nntplib: unlimited readline() from connection In-Reply-To: <1380635094.25.0.828191612787.issue16040@psf.upfronthosting.co.za> Message-ID: <20131001114000.448c1de5@anarchist> Barry A. Warsaw added the comment: On Oct 01, 2013, at 01:44 PM, Arfrever Frehtes Taifersar Arahesis wrote: >s/lenght/length/ in new comment in Lib/nntplib.py Fixed, thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 17:54:51 2013 From: report at bugs.python.org (John Murphy) Date: Tue, 01 Oct 2013 15:54:51 +0000 Subject: [issue19138] doctest.IGNORE_EXCEPTION_DETAIL doesn't match when no detail exists Message-ID: <1380642891.76.0.189533758192.issue19138@psf.upfronthosting.co.za> New submission from John Murphy: The doctest.IGNORE_EXCEPTION_DETAIL optionflag does not seem to have the desired behavior when the exception does not provide a message, due to the regular expressions in doctest.DocTestRunner.__run expecting a colon in the second group:: elif self.optionflags & IGNORE_EXCEPTION_DETAIL: m1 = re.match(r'(?:[^:]*\.)?([^:]*:)', example.exc_msg) m2 = re.match(r'(?:[^:]*\.)?([^:]*:)', exc_msg) if m1 and m2 and check(m1.group(1), m2.group(1), self.optionflags): outcome = SUCCESS Normally this wouldn't matter, as there's no need to ignore the exception detail if there is no detail to normalize, but since http://bugs.python.org/issue7490 it looks like the blessed method of normalizing Python 2 and 3 exceptions in doctests is to use IGNORE_EXCEPTION_DETAIL. This doesn't work for any exceptions which do not have a message. Example:: >>> def f(x): ... r''' ... >>> from http.client import HTTPException ... >>> raise HTTPException() #doctest: +IGNORE_EXCEPTION_DETAIL ... Traceback (most recent call last): ... foo.bar.HTTPException ... ''' >>> test = doctest.DocTestFinder().find(f)[0] >>> doctest.DocTestRunner(verbose=True).run(test) Failed example: raise HTTPException() #doctest: +IGNORE_EXCEPTION_DETAIL Expected: Traceback (most recent call last): foo.bar.HTTPException Got: Traceback (most recent call last): ... http.client.HTTPException I've attached a test and a very naive fix of the regular expression. ---------- components: Tests files: exception_normalize.patch keywords: patch messages: 198792 nosy: jamur2 priority: normal severity: normal status: open title: doctest.IGNORE_EXCEPTION_DETAIL doesn't match when no detail exists type: behavior versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file31936/exception_normalize.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 19:05:43 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 01 Oct 2013 17:05:43 +0000 Subject: [issue19137] pprint wrongly formats set and frozenset subclasses In-Reply-To: <1380639331.5.0.0634997889933.issue19137@psf.upfronthosting.co.za> Message-ID: <1380647143.47.0.782159934433.issue19137@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Added an additional test to check the output layout for set/frozenset subclasses as Antoine suggested. ---------- Added file: http://bugs.python.org/file31937/pprint_set_subclass_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 19:21:35 2013 From: report at bugs.python.org (Tom Gross) Date: Tue, 01 Oct 2013 17:21:35 +0000 Subject: [issue18092] Python 2.7.5 installation broken on OpenSuse 12.2 In-Reply-To: <1369808700.25.0.570015045706.issue18092@psf.upfronthosting.co.za> Message-ID: <1380648095.42.0.253183782382.issue18092@psf.upfronthosting.co.za> Tom Gross added the comment: I guess you are on a 64bit os an the issue is a variant of issue1294959. Some of the components (scripts) are installed in the $PREFIX/lib folder and some are (libs) installed in the $PREFIX/lib64 folder. a workaround which worked for me (on OpenSuse 12.3 which faced the same issue) is specifying a lib directory on configure like this: > ./configure --prefix=/opt/Python275 --libdir=/opt/Python275/lib All components (scripts & libs) are in the $PREFIX/lib folder then. ---------- nosy: +Tom.Gross _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 19:58:33 2013 From: report at bugs.python.org (Paul Moore) Date: Tue, 01 Oct 2013 17:58:33 +0000 Subject: [issue19139] In venv, __VENV_NAME__ is the prompt, not the name Message-ID: <1380650313.1.0.884499965527.issue19139@psf.upfronthosting.co.za> New submission from Paul Moore: The documentation for venv states that __VENV_NAME__ in scripts is replaced by the name of the virtualenv. In fact, it is replaced by context.prompt, which is the prompt, rather than the name. The various activate scripts are not consistent with this behaviour. Most seem to expect a prompt, but activate.csh does not. I would prefer __VENV_NAME__ to actually *be* the name, and either have an extra substitution variable __VENV_PROMPT__ or just leave it to the scripts themselves to format the prompt using the name. I could supply a patch (it's not hard) but would need agreement on the right approach. ---------- assignee: vinay.sajip components: Library (Lib) messages: 198795 nosy: pmoore, vinay.sajip priority: normal severity: normal status: open title: In venv, __VENV_NAME__ is the prompt, not the name versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 20:06:26 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 01 Oct 2013 18:06:26 +0000 Subject: [issue19097] bool(cgi.FieldStorage(...)) may be False unexpectedly In-Reply-To: <1380239682.41.0.674159694258.issue19097@psf.upfronthosting.co.za> Message-ID: <1380650786.73.0.158048535065.issue19097@psf.upfronthosting.co.za> Senthil Kumaran added the comment: FieldStorage("foo", "bar") is invalid because the first argument is supposed to be file-like object and second one headers. Here we are sending invalid headers. By default, if the headers is none, the content-type is urlencoded. The right way of using FieldStorage is either using the keyword arguments in a tightly couple manner. Or use it as default instance (fs = cgi.FieldStorage()) So the expectation could be: >>>fs = cgi.FieldStorage() >>>bool(fs) False >>> # sending correct fs, env >>> # http://hg.python.org/cpython/file/32de3923bb94/Lib/test/test_cgi.py#l259 >>> fs = cgi.FieldStorage(fs, environ=env) >>> bool(fs) True The TypeError failure in python3 for bool(fs) is, in the absence of __bool__, it is trying to do a len() and which ultimately ends up calling keys(): http://hg.python.org/cpython/file/32de3923bb94/Lib/cgi.py#l579 The proper fix in Python3 IMO is the just define __bool__ instead of __nonzero__ and that will be return False instead of TypeError. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 20:16:34 2013 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 01 Oct 2013 18:16:34 +0000 Subject: [issue19139] In venv, __VENV_NAME__ is the prompt, not the name In-Reply-To: <1380650313.1.0.884499965527.issue19139@psf.upfronthosting.co.za> Message-ID: <1380651394.13.0.386967703565.issue19139@psf.upfronthosting.co.za> Vinay Sajip added the comment: Makes sense to me. Adding Carl Meyer to nosy, to see if he has a different view. ---------- nosy: +carljm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 20:22:41 2013 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 01 Oct 2013 18:22:41 +0000 Subject: [issue19109] 'TestTCPServer' is not defined In-Reply-To: <1380307824.33.0.292776020503.issue19109@psf.upfronthosting.co.za> Message-ID: <1380651761.77.0.481184790799.issue19109@psf.upfronthosting.co.za> Vinay Sajip added the comment: >From the fact that 3.4a3 is out I assume it's OK to close this issue. The buildbots are no longer showing this error. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 20:23:35 2013 From: report at bugs.python.org (Carl Meyer) Date: Tue, 01 Oct 2013 18:23:35 +0000 Subject: [issue19139] In venv, __VENV_NAME__ is the prompt, not the name In-Reply-To: <1380650313.1.0.884499965527.issue19139@psf.upfronthosting.co.za> Message-ID: <1380651815.8.0.912728773752.issue19139@psf.upfronthosting.co.za> Carl Meyer added the comment: Makes sense to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 20:28:39 2013 From: report at bugs.python.org (Paul Moore) Date: Tue, 01 Oct 2013 18:28:39 +0000 Subject: [issue19139] In venv, __VENV_NAME__ is the prompt, not the name In-Reply-To: <1380650313.1.0.884499965527.issue19139@psf.upfronthosting.co.za> Message-ID: <1380652119.77.0.281675592792.issue19139@psf.upfronthosting.co.za> Paul Moore added the comment: Cool. Patch attached (this fixes __VENV_NAME__ and implements __VENV_PROMPT__) ---------- keywords: +patch Added file: http://bugs.python.org/file31938/venv_prompt.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 21:24:20 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 01 Oct 2013 19:24:20 +0000 Subject: [issue18468] re.group() should never return a bytearray In-Reply-To: <1373931432.85.0.594082146564.issue18468@psf.upfronthosting.co.za> Message-ID: <1380655460.78.0.820264640787.issue18468@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file31737/re_group_type.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 21:25:31 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 01 Oct 2013 19:25:31 +0000 Subject: [issue18468] re.group() should never return a bytearray In-Reply-To: <1373931432.85.0.594082146564.issue18468@psf.upfronthosting.co.za> Message-ID: <1380655531.54.0.938285027588.issue18468@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Fixed a typo. Could anyone please make a review? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 21:26:56 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 01 Oct 2013 19:26:56 +0000 Subject: [issue18468] re.group() should never return a bytearray In-Reply-To: <1373931432.85.0.594082146564.issue18468@psf.upfronthosting.co.za> Message-ID: <1380655616.2.0.706523711999.issue18468@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file31939/re_group_type.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 21:29:45 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 01 Oct 2013 19:29:45 +0000 Subject: [issue19097] bool(cgi.FieldStorage(...)) may be False unexpectedly In-Reply-To: <1380239682.41.0.674159694258.issue19097@psf.upfronthosting.co.za> Message-ID: <1380655785.11.0.583478096259.issue19097@psf.upfronthosting.co.za> Guido van Rossum added the comment: I believe you that the example invocation is wrong. But then shouldn't it raise an exception? I still think that if len() raises KeyError, bool() should raise KeyError too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 22:19:57 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 01 Oct 2013 20:19:57 +0000 Subject: [issue13153] IDLE crashes when pasting non-BMP unicode char on Py3 In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1380658797.83.0.84050073656.issue13153@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Unicode _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 22:22:26 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 01 Oct 2013 20:22:26 +0000 Subject: [issue13153] IDLE crashes when pasting non-BMP unicode char on Py3 In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1380658946.91.0.388876840456.issue13153@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 22:24:21 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 01 Oct 2013 20:24:21 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <1380659061.29.0.425255186835.issue12892@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could you please make a review Ezio? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 22:26:16 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 01 Oct 2013 20:26:16 +0000 Subject: [issue18512] sys.stdout.write does not allow bytes in Python 3.x In-Reply-To: <1374287481.36.0.643885131326.issue18512@psf.upfronthosting.co.za> Message-ID: <1380659176.81.0.621097803071.issue18512@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 22:27:04 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 01 Oct 2013 20:27:04 +0000 Subject: [issue19020] Regression: Windows-tkinter-idle, unicode, and 0xxx filename In-Reply-To: <1379196682.03.0.147663616291.issue19020@psf.upfronthosting.co.za> Message-ID: <1380659224.33.0.438004908123.issue19020@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What would you say about this patch Terry? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 22:29:03 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 01 Oct 2013 20:29:03 +0000 Subject: [issue19020] Regression: Windows-tkinter-idle, unicode, and 0xxx filename In-Reply-To: <1379196682.03.0.147663616291.issue19020@psf.upfronthosting.co.za> Message-ID: <1380659343.19.0.420278475724.issue19020@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What would you say about this patch Terry? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 22:49:12 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 01 Oct 2013 20:49:12 +0000 Subject: [issue19020] Regression: Windows-tkinter-idle, unicode, and 0xxx filename In-Reply-To: <1379196682.03.0.147663616291.issue19020@psf.upfronthosting.co.za> Message-ID: <1380660552.68.0.485485054407.issue19020@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- Removed message: http://bugs.python.org/msg198805 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 22:50:06 2013 From: report at bugs.python.org (Yann Kaiser) Date: Tue, 01 Oct 2013 20:50:06 +0000 Subject: [issue19140] inspect.Signature.bind() inaccuracies Message-ID: <1380660606.62.0.855384003289.issue19140@psf.upfronthosting.co.za> New submission from Yann Kaiser: A pair of inconsistencies I've found using Signature.bind: (=0).bind() -*> TypeError Letting the default value of a positional-only parameter be used raises a TypeError with message that 'a' was passed by name. (a, *args).bind(a=0, args=1) -> BoundArguments({'a': 0, 'args': 1}) Should positional arguments not be enough for bind() to reach the parameter before *args, bind() will process the *args parameter while looking for named arguments, and eventually bind the *args parameter to any named argument for it, instead of leaving that named argument for **kwargs or erroring out. I've attached a patch that tests and fixes both issues. I've taken the liberty of extending test_inspect.TestSignatureBind.test_signature_bind_positional_only as it already did all the setup needed but overlooked to check the condition where a defaulted positional-only parameter is left out. ---------- components: Library (Lib) files: sig_bind_posodefa_varargs.patch keywords: patch messages: 198806 nosy: epsy priority: normal severity: normal status: open title: inspect.Signature.bind() inaccuracies type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file31940/sig_bind_posodefa_varargs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 22:58:29 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 01 Oct 2013 20:58:29 +0000 Subject: [issue19130] PCbuild/readme.txt not up-to-date In-Reply-To: <1380473921.46.0.878582120992.issue19130@psf.upfronthosting.co.za> Message-ID: <1380661109.56.0.628441749653.issue19130@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks Christian! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 22:58:58 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 01 Oct 2013 20:58:58 +0000 Subject: [issue19140] inspect.Signature.bind() inaccuracies In-Reply-To: <1380660606.62.0.855384003289.issue19140@psf.upfronthosting.co.za> Message-ID: <1380661138.52.0.364552662435.issue19140@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 23:14:06 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 01 Oct 2013 21:14:06 +0000 Subject: [issue19094] urljoin should raise a TypeError if URL is not a string In-Reply-To: <1380142541.83.0.560775690833.issue19094@psf.upfronthosting.co.za> Message-ID: <1380662046.12.0.483735824842.issue19094@psf.upfronthosting.co.za> Jason R. Coombs added the comment: Vajrasky, you're right. Comparing against type(obj) is an anti-pattern. isinstance is better. Duck typing is even better (in many cases). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 23:31:17 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 01 Oct 2013 21:31:17 +0000 Subject: [issue18468] re.group() should never return a bytearray In-Reply-To: <1373931432.85.0.594082146564.issue18468@psf.upfronthosting.co.za> Message-ID: <1380663077.36.0.316637255083.issue18468@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch addressed Antoine's comments. ---------- Added file: http://bugs.python.org/file31941/re_group_type_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 23:43:44 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 01 Oct 2013 21:43:44 +0000 Subject: [issue18037] 2to3 passes through string literal which causes SyntaxError in 3.x In-Reply-To: <1369259204.14.0.48841389768.issue18037@psf.upfronthosting.co.za> Message-ID: <1380663824.94.0.611029372186.issue18037@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 23:48:18 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 01 Oct 2013 21:48:18 +0000 Subject: [issue17839] base64 module should use memoryview In-Reply-To: <1366875154.79.0.0782227735295.issue17839@psf.upfronthosting.co.za> Message-ID: <1380664098.23.0.977359696387.issue17839@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Allow memoryview.cast() for empty views _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 00:01:08 2013 From: report at bugs.python.org (Graham Wideman) Date: Tue, 01 Oct 2013 22:01:08 +0000 Subject: [issue19136] CSV, builtin open(), newline arg. Docs broken again. In-Reply-To: <1380611663.89.0.558350750014.issue19136@psf.upfronthosting.co.za> Message-ID: <1380664868.37.0.637252798374.issue19136@psf.upfronthosting.co.za> Graham Wideman added the comment: David: Yes, as it turns out you are absolutely right, in a manner of speaking. I have retested this exhaustively today, and here's the root cause. It turns out that in testing, I must have activate a particular simplified test script by invoking only scriptname.py rather than invoking 'python scriptname.py'. (And then repeating that mistake by reinvoking via console history... doh!) The latter reliably invokes python 3.3.2, because that's the only python in my PATH. The former, it turns out, invokes the Windows Python Launcher, which finds a previously installed Python 2.7.1, despite that not being on the PATH. So, in my mind, the possibility of launching any version other than Python 3.3.2 did not enter the picture. Prior to this, I was only vaguely aware that Windows Python Launcher existed. Ironically, it was probably installed by Python 3.3.2. Sorry for the bogus bug alert. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 00:34:46 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 01 Oct 2013 22:34:46 +0000 Subject: [issue19020] Regression: Windows-tkinter-idle, unicode, and 0xxx filename In-Reply-To: <1379196682.03.0.147663616291.issue19020@psf.upfronthosting.co.za> Message-ID: <1380666886.44.0.823318649495.issue19020@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I cannot say much since I do not know what .split and .splitlist do or are supposed to do. They have no docstrings. They are methods of tkinter.Tk().tk, the app or 'interpreter' returned by _tkinter.create. Modules/_tkinker.c maps then to the C functions TkappSplit(List), which have no comments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 01:16:49 2013 From: report at bugs.python.org (Graham Wideman) Date: Tue, 01 Oct 2013 23:16:49 +0000 Subject: [issue19141] Windows Launcher fails to respect PATH Message-ID: <1380669409.4.0.896421919729.issue19141@psf.upfronthosting.co.za> New submission from Graham Wideman: Python Launcher for Windows provides some important value for Windows users, but its ability to invoke python versions not on the PATH is a problem. py.exe chooses a version of Python to invoke, in more or less this order of decreasing priority; it is the *last* one that occurs by default in a new install of python 3.3.x: 1. Shebang line in myscript.py 2. py.exe -n argument (n can be 2, 3, 3.2 etc). Launcher chooses the latest installed version so specified. 3. PY_PYTHON environment variable 4. py.ini in C:\WINDOWS or user's %LOCALAPPDATA% directory 5. Launcher hunts through registry for ALL previously installed pythons, and picks the latest version in the 2.x series. DEFAULT. The first issue to note is that, to my knowledge, the exact precedence order is not documented... it would greatly help if this were done. That said, the focus in this report is case 5, which as noted is the default behavior when python 3.3.2 is installed (and py.exe invoked with scripts having no launcher-aware shebang line). In case 5, py.exe completely ignores the PATH environment variable. So, whereas PATH is used to find py.exe, or when the user invokes 'python' on the command line, py.exe ignores PATH and launches a version of python that is not necessarily in the PATH. In case 2 where the user supplies a value for 'n', finding a non-PATH version of python is excusable on the basis that the user deliberately requests a version. However, in case 5, the user is not invoking py explicitly, and is not necessarily aware of py's algorithm for finding all installed versions. The user might reasonably expect that invoking a script or double clicking it would just invoke 'python' the same as the 'python' command, using PATH. In particular, if the user understands how PATH works (as reviewed in the docs here: http://docs.python.org/3/using/windows.html#finding-the-python-executable), then upon installing 3.3.x, he or she might explicitly *remove* python 2.x from PATH in the expectation that this will disable python 2.x. It is surprising and potentially harmful that py.exe does not abide by that choice. A potential improvement is to interpose an item '4.5' in the above list, in which py.exe looks for a version of python on the PATH before falling back to searching for latest 2.x python ever installed. (It is not clear that py.exe should *ever* fallback to just picking the latest 2.x in the registry (item 5). It is conceivable that a user may have configured one of those pythons to do something destructive or insecure on startup, and it will be a great surprise if py.exe "randomly" invokes it just because it has the highest version number.) ---------- components: Windows messages: 198812 nosy: gwideman priority: normal severity: normal status: open title: Windows Launcher fails to respect PATH type: behavior versions: Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 01:41:38 2013 From: report at bugs.python.org (Trevor Bowen) Date: Tue, 01 Oct 2013 23:41:38 +0000 Subject: [issue19142] Cross-compile fails trying to execute foreign pgen on build host Message-ID: <1380670898.69.0.308819053325.issue19142@psf.upfronthosting.co.za> New submission from Trevor Bowen: FWIW, I'm using a Freescale cross-compile tool-chain on a Linux x86-64 build host, although I have duplicated the cross-compile error on an x86 Ubunutu 10.04 build host. Steps to reproduce: $ wget http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tar.bz2 $ tar -jxf Python-2.7.5.tar.bz2 $ cd Python-2.7.5 $ export PATH="/opt/freescale/usr/local/gcc-4.3.74-eglibc-2.8.74-dp-2/powerpc-none-linux-gnuspe/bin:${PATH}" # For info only: $ ls -l /opt/freescale/usr/local/gcc-4.3.74-eglibc-2.8.74-dp-2/powerpc-none-linux-gnuspe/bin total 10472 -rwxrwxrwx 1 root root 590485 Mar 5 2012 powerpc-none-linux-gnuspe-addr2line -rwxrwxrwx 1 root root 614647 Mar 5 2012 powerpc-none-linux-gnuspe-ar -rwxrwxrwx 1 root root 897161 Mar 5 2012 powerpc-none-linux-gnuspe-as -rwxrwxrwx 1 root root 235382 Mar 5 2012 powerpc-none-linux-gnuspe-c++ -rwxrwxrwx 1 root root 589227 Mar 5 2012 powerpc-none-linux-gnuspe-c++filt -rwxrwxrwx 1 root root 234277 Mar 5 2012 powerpc-none-linux-gnuspe-cpp -rwxrwxrwx 1 root root 8503 Mar 5 2012 powerpc-none-linux-gnuspe-embedspu -rwxrwxrwx 1 root root 235382 Mar 5 2012 powerpc-none-linux-gnuspe-g++ -rwxrwxrwx 1 root root 233126 Mar 5 2012 powerpc-none-linux-gnuspe-gcc -rwxrwxrwx 1 root root 233126 Mar 5 2012 powerpc-none-linux-gnuspe-gcc-4.3.2 -rwxrwxrwx 1 root root 16512 Mar 5 2012 powerpc-none-linux-gnuspe-gccbug -rwxrwxrwx 1 root root 28017 Mar 5 2012 powerpc-none-linux-gnuspe-gcov -rwxrwxrwx 1 root root 655127 Mar 5 2012 powerpc-none-linux-gnuspe-gprof -rwxrwxrwx 1 root root 1036372 Mar 5 2012 powerpc-none-linux-gnuspe-ld -rwxrwxrwx 1 root root 603678 Mar 5 2012 powerpc-none-linux-gnuspe-nm -rwxrwxrwx 1 root root 750617 Mar 5 2012 powerpc-none-linux-gnuspe-objcopy -rwxrwxrwx 1 root root 895336 Mar 5 2012 powerpc-none-linux-gnuspe-objdump -rwxrwxrwx 1 root root 614647 Mar 5 2012 powerpc-none-linux-gnuspe-ranlib -rwxrwxrwx 1 root root 264063 Mar 5 2012 powerpc-none-linux-gnuspe-readelf -rwxrwxrwx 1 root root 593901 Mar 5 2012 powerpc-none-linux-gnuspe-size -rwxrwxrwx 1 root root 591853 Mar 5 2012 powerpc-none-linux-gnuspe-strings -rwxrwxrwx 1 root root 750617 Mar 5 2012 powerpc-none-linux-gnuspe-strip $ ./configure --host=powerpc-none-linux-gnuspe \ --build=i586-linux-gnu --prefix=/ \ --disable-ipv6 ac_cv_file__dev_ptmx=no \ ac_cv_file__dev_ptc=no $ make Make fails because the foreign (powerpc, in this case) pgen binary is used to build the $(GRAMMAR_H). Instead, a native version of the python interpreter (preferrable) and pgen (essential) need to be built first using the host's toolchain. Then, these tools can be used to build the full foreign suite. FWIW, This 2 step process is well documented here: http://randomsplat.com/id5-cross-compiling-python-for-embedded-linux.html However, the cross-compile fixes from Issue17086 may have helped this process. (It's hard for me to determine how to take advantage of these updates.) Certainly, they changed the above process dramatically. Incidentally, Python 3.3.2 exhibits almost the exact same build error, if not the same. Build log on an x86-64 host for Python-2.7.5 for a PowerPC-linux target is attached. Tail of log: make Parser/pgen make[1]: Entering directory `/home/user/Python-2.7.5' powerpc-none-linux-gnuspe-gcc -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/mysnprintf.o Python/mysnprintf.c powerpc-none-linux-gnuspe-gcc -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/pyctype.o Python/pyctype.c powerpc-none-linux-gnuspe-gcc -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Parser/tokenizer_pgen.o Parser/tokenizer_pgen.c powerpc-none-linux-gnuspe-gcc -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Parser/printgrammar.o Parser/printgrammar.c powerpc-none-linux-gnuspe-gcc -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Parser/pgenmain.o Parser/pgenmain.c powerpc-none-linux-gnuspe-gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o Parser/parsetok.o Parser/bitset.o Parser/metagrammar.o Parser/firstsets.o Parser/grammar.o Parser/pgen.o Objects/obmalloc.o Python/mysnprintf.o Python/pyctype.o Parser/tokenizer_pgen.o Parser/printgrammar.o Parser/pgenmain.o -lpthread -ldl -lpthread -lutil -o Parser/pgen make[1]: Leaving directory `/home/user/Python-2.7.5' Parser/pgen ./Grammar/Grammar Include/graminit.h Python/graminit.c Parser/pgen: Parser/pgen: cannot execute binary file make: *** [Include/graminit.h] Error 126 make Parser/pgen make[1]: Entering directory `/home/user/Python-2.7.5' make[1]: `Parser/pgen' is up to date. make[1]: Leaving directory `/home/user/Python-2.7.5' Parser/pgen ./Grammar/Grammar Include/graminit.h Python/graminit.c Parser/pgen: Parser/pgen: cannot execute binary file make: *** [Include/graminit.h] Error 126 ---------- components: Cross-Build files: cross-compile.log messages: 198813 nosy: Trevor.Bowen priority: normal severity: normal status: open title: Cross-compile fails trying to execute foreign pgen on build host type: compile error versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file31942/cross-compile.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 02:50:04 2013 From: report at bugs.python.org (Tim Peters) Date: Wed, 02 Oct 2013 00:50:04 +0000 Subject: [issue19143] Finding the Windows version getting messier Message-ID: <1380675004.25.0.239416620624.issue19143@psf.upfronthosting.co.za> New submission from Tim Peters: This question: http://stackoverflow.com/questions/19128219/detect-windows-8-1-in-python reports that Python is returning incorrect version info under Windows 8.1. Alas, it appears MS is "deprecating" `GetVersionEx()`: http://msdn.microsoft.com/en-us/library/windows/desktop/ms724451(v=vs.85).aspx and replacing it with a whole slew of annoying "yes or no?" functions: http://msdn.microsoft.com/en-us/library/windows/desktop/dn424972(v=vs.85).aspx Heh ;-) ---------- components: Interpreter Core, Windows messages: 198814 nosy: tim.peters priority: normal severity: normal status: open title: Finding the Windows version getting messier versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 03:38:11 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Oct 2013 01:38:11 +0000 Subject: [issue19142] Cross-compile fails trying to execute foreign pgen on build host In-Reply-To: <1380670898.69.0.308819053325.issue19142@psf.upfronthosting.co.za> Message-ID: <1380677891.73.0.323755382116.issue19142@psf.upfronthosting.co.za> R. David Murray added the comment: It is a known issue that the Python build infrastructure does not currently support cross compiling. There are a number of issues and patches in this tracker that address pieces of this puzzle. Help sorting it all out will be welcome. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 05:14:51 2013 From: report at bugs.python.org (Trevor Bowen) Date: Wed, 02 Oct 2013 03:14:51 +0000 Subject: [issue19142] Cross-compile fails trying to execute foreign pgen on build host In-Reply-To: <1380670898.69.0.308819053325.issue19142@psf.upfronthosting.co.za> Message-ID: <1380683691.3.0.724999548907.issue19142@psf.upfronthosting.co.za> Trevor Bowen added the comment: Sorry, I do not mean to compound an already open and complex problem. I thought that the fixes in 2.7.4 were meant in part to help alleviate this problem. I had not found any feedback or tutorials, so I wanted to provide a status update of sorts. I'm sure there is some. I just have not been able to find it myself. If the configure script passed in the cross-compile tool-chain *and* the build-host tool-chain, could the Makefile be enhanced to build pgen and python first with the build-host and then use them to build the full cross-compiled versions? Or, would there be a better general approach? I am not familiar with the MINGW requirements. Would this satisfy their needs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 06:38:48 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 02 Oct 2013 04:38:48 +0000 Subject: [issue18594] C accelerator for collections.Counter is slow In-Reply-To: <1375166960.42.0.521563124847.issue18594@psf.upfronthosting.co.za> Message-ID: <3cqPkH5NxNz7LkX@mail.python.org> Roundup Robot added the comment: New changeset 1ee6f8a96fb9 by Raymond Hettinger in branch '3.3': Issue #18594: Fix the fallback path in collections.Counter(). http://hg.python.org/cpython/rev/1ee6f8a96fb9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 06:43:05 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 02 Oct 2013 04:43:05 +0000 Subject: [issue10042] functools.total_ordering fails to handle NotImplemented correctly In-Reply-To: <1286440012.74.0.624864175042.issue10042@psf.upfronthosting.co.za> Message-ID: <1380688985.25.0.565163030197.issue10042@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks Nick and Katie. This looks great. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 06:44:43 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 02 Oct 2013 04:44:43 +0000 Subject: [issue18594] C accelerator for collections.Counter is slow In-Reply-To: <1375166960.42.0.521563124847.issue18594@psf.upfronthosting.co.za> Message-ID: <1380689083.48.0.432036713936.issue18594@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 08:37:35 2013 From: report at bugs.python.org (Jeremy Kloth) Date: Wed, 02 Oct 2013 06:37:35 +0000 Subject: [issue19143] Finding the Windows version getting messier In-Reply-To: <1380675004.25.0.239416620624.issue19143@psf.upfronthosting.co.za> Message-ID: <1380695855.52.0.732842305654.issue19143@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 08:40:24 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 02 Oct 2013 06:40:24 +0000 Subject: [issue19143] Finding the Windows version getting messier In-Reply-To: <1380675004.25.0.239416620624.issue19143@psf.upfronthosting.co.za> Message-ID: <1380696024.96.0.0131194894252.issue19143@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +brian.curtin, tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 09:54:51 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 02 Oct 2013 07:54:51 +0000 Subject: [issue19143] Finding the Windows version getting messier In-Reply-To: <1380675004.25.0.239416620624.issue19143@psf.upfronthosting.co.za> Message-ID: <524BD128.7090809@timgolden.me.uk> Tim Golden added the comment: I was surprised that GetVersionEx would lie. But sure enough. Here: http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/c471de52-611f-435d-ab44-56064e5fd7d5/windows-81-preview-getversionex-reports-629200 (Including a heartfelt comment by long-time Python developer Tim Roberts) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 10:45:44 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 02 Oct 2013 08:45:44 +0000 Subject: [issue19137] pprint wrongly formats set and frozenset subclasses In-Reply-To: <1380639331.5.0.0634997889933.issue19137@psf.upfronthosting.co.za> Message-ID: <3cqWCC5N1Gz7Ln4@mail.python.org> Roundup Robot added the comment: New changeset fcd889046ee1 by Serhiy Storchaka in branch '2.7': Issue #19137: The pprint module now correctly formats empty set and frozenset http://hg.python.org/cpython/rev/fcd889046ee1 New changeset 65943dc15afc by Serhiy Storchaka in branch '3.3': Issue #19137: The pprint module now correctly formats instances of set and http://hg.python.org/cpython/rev/65943dc15afc New changeset 2d21239a5205 by Serhiy Storchaka in branch 'default': Issue #19137: The pprint module now correctly formats instances of set and http://hg.python.org/cpython/rev/2d21239a5205 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 10:57:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Oct 2013 08:57:14 +0000 Subject: [issue19137] pprint wrongly formats set and frozenset subclasses In-Reply-To: <1380639331.5.0.0634997889933.issue19137@psf.upfronthosting.co.za> Message-ID: <1380704234.96.0.99792156036.issue19137@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 10:57:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 02 Oct 2013 08:57:38 +0000 Subject: [issue19132] Add compact mode to pprint In-Reply-To: <1380485149.97.0.648520685176.issue19132@psf.upfronthosting.co.za> Message-ID: <3cqWSx738dz7LjP@mail.python.org> Roundup Robot added the comment: New changeset ae0306c8f7a3 by Serhiy Storchaka in branch 'default': Issue #19132: The pprint module now supports compact mode. http://hg.python.org/cpython/rev/ae0306c8f7a3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 10:58:22 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Oct 2013 08:58:22 +0000 Subject: [issue19132] Add compact mode to pprint In-Reply-To: <1380485149.97.0.648520685176.issue19132@psf.upfronthosting.co.za> Message-ID: <1380704302.3.0.931637947436.issue19132@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 11:55:33 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 02 Oct 2013 09:55:33 +0000 Subject: [issue19143] Finding the Windows version getting messier In-Reply-To: <1380675004.25.0.239416620624.issue19143@psf.upfronthosting.co.za> Message-ID: <524BED53.3020009@timgolden.me.uk> Tim Golden added the comment: I've just installed a Win 8.1 VM and can (unsurprisingly) confirm the report: The "ver" command shows 6.3.9600 while GetVersionEx and consequently sys.getwindowsversion report 6.2.9200 We do use GetVersionEx in a few other places (timemodule.c, unicodeobject.c, install.c) but they're limited to checking that we're running at least XP or at least Vista which will continue work as such. I'm not really sure what to propose: we could simply sit back and say "We're telling you what Windows tells us". It's unappealing, but I'm not sure there's a clear alternative. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 12:09:17 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 02 Oct 2013 10:09:17 +0000 Subject: [issue19143] Finding the Windows version getting messier In-Reply-To: <1380675004.25.0.239416620624.issue19143@psf.upfronthosting.co.za> Message-ID: <1380708557.2.0.477429288236.issue19143@psf.upfronthosting.co.za> Tim Golden added the comment: platform.platform & platform.uname are also affected although they already use "ver"-parsing in some circumstances so could presumably fallback to that approach here as well. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 12:30:27 2013 From: report at bugs.python.org (Stefan Krah) Date: Wed, 02 Oct 2013 10:30:27 +0000 Subject: [issue19078] Allow reversed(memoryview), like memoryview In-Reply-To: <1380475681.96.0.942759567302.issue19078@psf.upfronthosting.co.za> Message-ID: <20131002103028.GA16717@sleipnir.bytereef.org> Stefan Krah added the comment: > Stefan, what do you think about Claudiu's patch? Should a test be added to test_buffer as well? I think the patch is good. We can add more tests when (if?) multi-dimensional support is added to memoryview. In that case we should probably do the same as NumPy and return a list of subviews. So testing against tolist() like in the test case will only work for one-dimensional views. I can't commit right now (the machine with my ssh-key won't have Internet access for some time), so if someone has time to do it ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 12:36:33 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 02 Oct 2013 10:36:33 +0000 Subject: [issue19139] In venv, __VENV_NAME__ is the prompt, not the name In-Reply-To: <1380650313.1.0.884499965527.issue19139@psf.upfronthosting.co.za> Message-ID: <3cqYg449Rbz7Lk9@mail.python.org> Roundup Robot added the comment: New changeset 7f913c6ada03 by Vinay Sajip in branch 'default': Closes #19139: Changed usage of __VENV_NAME__ and added __VENV_PROMPT__. http://hg.python.org/cpython/rev/7f913c6ada03 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 13:28:38 2013 From: report at bugs.python.org (Stefan Krah) Date: Wed, 02 Oct 2013 11:28:38 +0000 Subject: [issue19001] test_gdb fails on Fedora buildbot In-Reply-To: <1378841773.14.0.068562621875.issue19001@psf.upfronthosting.co.za> Message-ID: <1380713318.18.0.295168175832.issue19001@psf.upfronthosting.co.za> Stefan Krah added the comment: Well, I got tired of the OS gdb with an almost transcendental version number and installed gdb from gnu.org. The problem seems to have disappeared. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 13:33:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 02 Oct 2013 11:33:28 +0000 Subject: [issue19143] Finding the Windows version getting messier In-Reply-To: <1380675004.25.0.239416620624.issue19143@psf.upfronthosting.co.za> Message-ID: <1380713608.51.0.871512662707.issue19143@psf.upfronthosting.co.za> Antoine Pitrou added the comment: (One explanation is they did it for the enjoyment of non-Windows programmers) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 13:53:20 2013 From: report at bugs.python.org (Stefan Krah) Date: Wed, 02 Oct 2013 11:53:20 +0000 Subject: [issue19144] test_inspect: failure without threads Message-ID: <1380714800.29.0.936969806599.issue19144@psf.upfronthosting.co.za> New submission from Stefan Krah: On the Fedora 16 buildbot: ====================================================================== ERROR: test_qualname_source (test.test_inspect.TestMain) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/test/test_inspect.py", line 2414, in test_qualname_source module = importlib.import_module('concurrent.futures') File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/importlib/__init__.py", line 95, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1613, in _gcd_import File "", line 1594, in _find_and_load File "", line 1561, in _find_and_load_unlocked File "", line 607, in _check_name_wrapper File "", line 1056, in load_module File "", line 926, in load_module File "", line 274, in _call_with_frames_removed File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/concurrent/futures/__init__.py", line 8, in from concurrent.futures._base import (FIRST_COMPLETED, File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/concurrent/futures/_base.py", line 8, in import threading File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/threading.py", line 4, in import _thread ImportError: No module named '_thread' ---------- messages: 198828 nosy: skrah priority: normal severity: normal status: open title: test_inspect: failure without threads _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 14:00:51 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 02 Oct 2013 12:00:51 +0000 Subject: [issue19078] Allow reversed(memoryview), like memoryview In-Reply-To: <1379953636.3.0.684645872717.issue19078@psf.upfronthosting.co.za> Message-ID: <1380715251.01.0.20277129687.issue19078@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 14:07:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 02 Oct 2013 12:07:06 +0000 Subject: [issue19078] Allow reversed(memoryview), like memoryview In-Reply-To: <1379953636.3.0.684645872717.issue19078@psf.upfronthosting.co.za> Message-ID: <3cqbgZ1SJVz7LqD@mail.python.org> Roundup Robot added the comment: New changeset 0dc604d58949 by Nick Coghlan in branch 'default': Close #19078: memoryview now supports reversed http://hg.python.org/cpython/rev/0dc604d58949 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 14:23:46 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 02 Oct 2013 12:23:46 +0000 Subject: [issue18690] memoryview not considered a sequence In-Reply-To: <1375994306.09.0.288774044914.issue18690@psf.upfronthosting.co.za> Message-ID: <1380716626.05.0.85053271162.issue18690@psf.upfronthosting.co.za> Nick Coghlan added the comment: There's no ducktyping for this due to the Sequence/Mapping confusion so it's a simple missing explicit registration. ---------- assignee: -> ncoghlan nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 14:32:17 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 02 Oct 2013 12:32:17 +0000 Subject: [issue18690] memoryview not considered a sequence In-Reply-To: <1375994306.09.0.288774044914.issue18690@psf.upfronthosting.co.za> Message-ID: <3cqcDb5jmsz7Lpv@mail.python.org> Roundup Robot added the comment: New changeset 95badf936353 by Nick Coghlan in branch 'default': Close #18690: register memoryview with Sequence ABC http://hg.python.org/cpython/rev/95badf936353 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 14:54:56 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 02 Oct 2013 12:54:56 +0000 Subject: [issue17839] base64 module should use memoryview In-Reply-To: <1366875154.79.0.0782227735295.issue17839@psf.upfronthosting.co.za> Message-ID: <1380718496.14.0.863837963036.issue17839@psf.upfronthosting.co.za> Nick Coghlan added the comment: binascii already only supports simple C contiguous buffers, expanding it and the base64 module to handle anything else should be a separate RFE. ---------- dependencies: -Allow memoryview.cast() for empty views _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 14:57:55 2013 From: report at bugs.python.org (Remi Pointel) Date: Wed, 02 Oct 2013 12:57:55 +0000 Subject: [issue19134] test_inspect.py failed if module _multiprocessing not available In-Reply-To: <1380550542.93.0.175157800121.issue19134@psf.upfronthosting.co.za> Message-ID: <1380718675.7.0.50157231842.issue19134@psf.upfronthosting.co.za> Remi Pointel added the comment: Hi, sorry to reopen this bug but it seams that your commit was not ok: test_qualname_source (__main__.TestMain) ... ERROR ====================================================================== ERROR: test_qualname_source (__main__.TestMain) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_inspect.py", line 2414, in test_qualname_source module = importlib.import_module('concurrent.futures') File "/home/remi/dev/cpython/Lib/importlib/__init__.py", line 95, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1613, in _gcd_import File "", line 1594, in _find_and_load File "", line 1561, in _find_and_load_unlocked File "", line 607, in _check_name_wrapper File "", line 1056, in load_module File "", line 926, in load_module File "", line 274, in _call_with_frames_removed File "/home/remi/dev/cpython/Lib/concurrent/futures/__init__.py", line 17, in from concurrent.futures.process import ProcessPoolExecutor File "/home/remi/dev/cpython/Lib/concurrent/futures/process.py", line 53, in from multiprocessing.queues import SimpleQueue, Full File "/home/remi/dev/cpython/Lib/multiprocessing/queues.py", line 22, in import _multiprocessing ImportError: No module named '_multiprocessing' ---------------------------------------------------------------------- Ran 164 tests in 1.285s FAILED (errors=1) Traceback (most recent call last): File "Lib/test/test_inspect.py", line 2456, in test_main() File "Lib/test/test_inspect.py", line 2452, in test_main TestBoundArguments, TestGetClosureVars, TestUnwrap, TestMain File "/home/remi/dev/cpython/Lib/test/support/__init__.py", line 1696, in run_unittest _run_suite(suite) File "/home/remi/dev/cpython/Lib/test/support/__init__.py", line 1671, in _run_suite raise TestFailed(err) test.support.TestFailed: Traceback (most recent call last): File "Lib/test/test_inspect.py", line 2414, in test_qualname_source module = importlib.import_module('concurrent.futures') File "/home/remi/dev/cpython/Lib/importlib/__init__.py", line 95, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1613, in _gcd_import File "", line 1594, in _find_and_load File "", line 1561, in _find_and_load_unlocked File "", line 607, in _check_name_wrapper File "", line 1056, in load_module File "", line 926, in load_module File "", line 274, in _call_with_frames_removed File "/home/remi/dev/cpython/Lib/concurrent/futures/__init__.py", line 17, in from concurrent.futures.process import ProcessPoolExecutor File "/home/remi/dev/cpython/Lib/concurrent/futures/process.py", line 53, in from multiprocessing.queues import SimpleQueue, Full File "/home/remi/dev/cpython/Lib/multiprocessing/queues.py", line 22, in import _multiprocessing ImportError: No module named '_multiprocessing' Remi. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 15:04:14 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Oct 2013 13:04:14 +0000 Subject: [issue19142] Cross-compile fails trying to execute foreign pgen on build host In-Reply-To: <1380670898.69.0.308819053325.issue19142@psf.upfronthosting.co.za> Message-ID: <1380719054.01.0.846015208557.issue19142@psf.upfronthosting.co.za> R. David Murray added the comment: I have no idea, frankly :) I guess my point is that the tool chain was not designed with cross compilation in mind, so sorting out how to make it work and writing a howto is something that needs to be done. The patches that have already been applied address a narrow need felt and fixed by the Debian folk, dealing with cross compiling 64 bit vs 32 bit, if I understand correctly. I don't know if it is a general cross compile fix, but in theory it should at least have moved us closer. Now, that said, as far as build order goes, what we do in general is to check in the sources that are built by the tools. If you get your sources out of a tarball, make shouldn't try to rebuild those. If you are working from a checkout, try 'make touch' before the make, to update the timestamps the way they would be in a release tarball. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 15:05:17 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 02 Oct 2013 13:05:17 +0000 Subject: [issue17839] base64 module should use memoryview In-Reply-To: <1366875154.79.0.0782227735295.issue17839@psf.upfronthosting.co.za> Message-ID: <1380719117.58.0.162849840422.issue17839@psf.upfronthosting.co.za> Nick Coghlan added the comment: However, _input_type_check should enforce that (as binascii does), so I'll add that before committing. ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 15:07:18 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Oct 2013 13:07:18 +0000 Subject: [issue19132] Add compact mode to pprint In-Reply-To: <1380485149.97.0.648520685176.issue19132@psf.upfronthosting.co.za> Message-ID: <1380719238.75.0.222368915402.issue19132@psf.upfronthosting.co.za> R. David Murray added the comment: Sorry I missed this on the review, but you are missing versionchanged tags (or versionadded, whichever you prefer :) and a what's new entry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 15:21:26 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Wed, 02 Oct 2013 13:21:26 +0000 Subject: [issue17442] code.InteractiveInterpreter doesn't display the exception cause In-Reply-To: <1363468664.92.0.794606977989.issue17442@psf.upfronthosting.co.za> Message-ID: <1380720086.61.0.809116250858.issue17442@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Could anyone review this patch, please? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 15:58:43 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 02 Oct 2013 13:58:43 +0000 Subject: [issue19143] Finding the Windows version getting messier In-Reply-To: <1380675004.25.0.239416620624.issue19143@psf.upfronthosting.co.za> Message-ID: <1380722323.08.0.859809276422.issue19143@psf.upfronthosting.co.za> Martin v. L?wis added the comment: tim.peters: looking at the implementation of the proposed annoying functions with names like IsWindows8Point1OrGreater, it turns out that they all go back to VerifyVersionInfoW, which is available since W2k (but still doesn't tell the actual version). tim.golden: a work-around is documented in http://msdn.microsoft.com/en-us/library/windows/desktop/dn302074.aspx Put into the manifest of python.exe, and it should report the correct version. Of course a) this would fail for somebody embedding Python (unless they have that in their exe's manifest), and b) we don't know the Id of upcoming windows versions, so the binaries produced today might still lie on future Windows releases. It seems possible to query the compatibility using QueryActCtxW and CompatibilityInformationInActivationContext, but I couldn't find a way to put the compatibility into a new activation context (which would allow to claim compatibility dynamically). ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 16:24:30 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 02 Oct 2013 14:24:30 +0000 Subject: [issue19143] Finding the Windows version getting messier In-Reply-To: <1380675004.25.0.239416620624.issue19143@psf.upfronthosting.co.za> Message-ID: <1380723870.21.0.13321714421.issue19143@psf.upfronthosting.co.za> Martin v. L?wis added the comment: According to http://stackoverflow.com/questions/17399302/how-can-i-detect-windows-8-1-in-a-desktop-application another strategy is to directly read the version out of the registry, from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion (values CurrentVersion, CurrentBuild) Not sure where to get service pack information from, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 16:26:14 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 02 Oct 2013 14:26:14 +0000 Subject: [issue19134] test_inspect.py failed if module _multiprocessing not available In-Reply-To: <1380550542.93.0.175157800121.issue19134@psf.upfronthosting.co.za> Message-ID: <3cqfm61x8mz7Lnc@mail.python.org> Roundup Robot added the comment: New changeset 2e54edaf60d4 by Brett Cannon in branch 'default': Try to fix issue #19134 again http://hg.python.org/cpython/rev/2e54edaf60d4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 16:29:57 2013 From: report at bugs.python.org (Brett Cannon) Date: Wed, 02 Oct 2013 14:29:57 +0000 Subject: [issue19134] test_inspect.py failed if module _multiprocessing not available In-Reply-To: <1380550542.93.0.175157800121.issue19134@psf.upfronthosting.co.za> Message-ID: <1380724197.18.0.346389321939.issue19134@psf.upfronthosting.co.za> Brett Cannon added the comment: OK, went for a more thorough check for the failure by just trying to import and catching the ImportError instead of trying to be fancy. The FreeBSD buildbot was having the same failure but it seems stuck waiting for some lock, so I can't verify the fix at the moment. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 16:31:23 2013 From: report at bugs.python.org (Brett Cannon) Date: Wed, 02 Oct 2013 14:31:23 +0000 Subject: [issue19144] test_inspect: failure without threads In-Reply-To: <1380714800.29.0.936969806599.issue19144@psf.upfronthosting.co.za> Message-ID: <1380724283.19.0.903509030526.issue19144@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> brett.cannon nosy: +brett.cannon resolution: -> duplicate status: open -> closed superseder: -> test_inspect.py failed if module _multiprocessing not available _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 16:34:41 2013 From: report at bugs.python.org (Remi Pointel) Date: Wed, 02 Oct 2013 14:34:41 +0000 Subject: [issue19134] test_inspect.py failed if module _multiprocessing not available In-Reply-To: <1380550542.93.0.175157800121.issue19134@psf.upfronthosting.co.za> Message-ID: <1380724481.02.0.965730153506.issue19134@psf.upfronthosting.co.za> Remi Pointel added the comment: It's ok now, thanks: test_qualname_source (__main__.TestMain) ... skipped 'multiprocessing required to test __qualname__ for source files' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 16:48:52 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 02 Oct 2013 14:48:52 +0000 Subject: [issue17839] base64 module should use memoryview In-Reply-To: <1366875154.79.0.0782227735295.issue17839@psf.upfronthosting.co.za> Message-ID: <1380725332.34.0.71448116557.issue17839@psf.upfronthosting.co.za> Nick Coghlan added the comment: After working through this, I found that the modern base64 API just relies on the checks in binascii. All that checks for is: 1. Can the data by exported using PyBUF_SIMPLE? 2. Is it C contiguous? It completely ignores the number of dimensions and the format information. I added tests to at least capture this behaviour, even though it seems a little dubious to me. For the legacy API, I didn't relax the input checks that far - the legacy API will still complain if there is more than 1 dimension and if the format code isn't one of 'c', 'b' or 'B'. That's already substantially more permissive than what it supported in previous versions. Just running the full test suite now, will push after that finishes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 17:03:44 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 02 Oct 2013 15:03:44 +0000 Subject: [issue17839] base64 module should use memoryview In-Reply-To: <1366875154.79.0.0782227735295.issue17839@psf.upfronthosting.co.za> Message-ID: <3cqgbN18wpzQ41@mail.python.org> Roundup Robot added the comment: New changeset d90f25e1a705 by Nick Coghlan in branch 'default': Close #17839: support bytes-like objects in base64 module http://hg.python.org/cpython/rev/d90f25e1a705 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 17:08:16 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 02 Oct 2013 15:08:16 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1260484060.32.0.471733830707.issue7475@psf.upfronthosting.co.za> Message-ID: <1380726496.58.0.443055380417.issue7475@psf.upfronthosting.co.za> Nick Coghlan added the comment: With issue 17839 fixed, the error from invoking the base64 codec through the method API is now substantially more sensible: >>> b"ZXhhbXBsZQ==\n".decode("base64_codec") Traceback (most recent call last): File "", line 1, in TypeError: decoder did not return a str object (type=bytes) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 17:13:49 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 02 Oct 2013 15:13:49 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1260484060.32.0.471733830707.issue7475@psf.upfronthosting.co.za> Message-ID: <1380726829.27.0.987306683465.issue7475@psf.upfronthosting.co.za> Nick Coghlan added the comment: I just wanted to note something I realised in chatting to Armin Ronacher recently: in both Python 2.x and 3.x, the encode/decode method APIs are constrained by the text model, it's just that in 2.x that model was effectively basestring<->basestring, and thus still covered every codec in the standard library. This greatly limited the use cases for the codecs.encode/decode convenience functions, which is why the fact they were undocumented went unnoticed. In 3.x, the changed text model meant the method API become limited to the Unicode codecs, making the function based API more important. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 17:16:36 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 02 Oct 2013 15:16:36 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1260484060.32.0.471733830707.issue7475@psf.upfronthosting.co.za> Message-ID: <1380726996.2.0.863518060687.issue7475@psf.upfronthosting.co.za> Nick Coghlan added the comment: We should fix the docs for the earlier versions as well. ---------- versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 17:17:00 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 02 Oct 2013 15:17:00 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1260484060.32.0.471733830707.issue7475@psf.upfronthosting.co.za> Message-ID: <1380727020.98.0.683055401535.issue7475@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- Removed message: http://bugs.python.org/msg198847 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 17:17:55 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 02 Oct 2013 15:17:55 +0000 Subject: [issue17827] Document codecs.encode and codecs.decode In-Reply-To: <1366811140.15.0.0983174574305.issue17827@psf.upfronthosting.co.za> Message-ID: <1380727075.31.0.0190327626693.issue17827@psf.upfronthosting.co.za> Nick Coghlan added the comment: We should fix the docs for the earlier versions as well. ---------- versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 17:18:13 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 02 Oct 2013 15:18:13 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1260484060.32.0.471733830707.issue7475@psf.upfronthosting.co.za> Message-ID: <1380727093.03.0.958010626013.issue7475@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- versions: -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 17:23:16 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 02 Oct 2013 15:23:16 +0000 Subject: [issue19145] Inconsistent behaviour in itertools.repeat when using negative times Message-ID: <1380727396.47.0.412229295257.issue19145@psf.upfronthosting.co.za> New submission from Vajrasky Kok: >>> from itertools import repeat >>> repeat(2, -10).__length_hint__() 0 >>> repeat(2, times=-10).__length_hint__() 18446744073709551606 >>> repeat(2, times=-10) repeat(2, -10) >>> repeat(2, -10) repeat(2, 0) Hereby, I attached two alternatives of patch to make the behaviour consistent. The first one makes the negative number parameter/keyword ALWAYS means endless. ---------- components: Library (Lib) files: fix_itertools_repeat_negative_number_means_endless.patch keywords: patch messages: 198849 nosy: vajrasky priority: normal severity: normal status: open title: Inconsistent behaviour in itertools.repeat when using negative times type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file31943/fix_itertools_repeat_negative_number_means_endless.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 17:24:38 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 02 Oct 2013 15:24:38 +0000 Subject: [issue19145] Inconsistent behaviour in itertools.repeat when using negative times In-Reply-To: <1380727396.47.0.412229295257.issue19145@psf.upfronthosting.co.za> Message-ID: <1380727478.16.0.258123056917.issue19145@psf.upfronthosting.co.za> Vajrasky Kok added the comment: The second patch makes the negative number parameter/keyword ALWAYS means 0. ---------- Added file: http://bugs.python.org/file31944/fix_itertools_repeat_negative_number_means_0.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 17:25:37 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 02 Oct 2013 15:25:37 +0000 Subject: [issue19145] Inconsistent behaviour in itertools.repeat when using negative times In-Reply-To: <1380727396.47.0.412229295257.issue19145@psf.upfronthosting.co.za> Message-ID: <1380727537.48.0.295929936044.issue19145@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> rhettinger components: +Extension Modules -Library (Lib) nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 18:47:56 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Oct 2013 16:47:56 +0000 Subject: [issue19105] pprint doesn't use all width In-Reply-To: <1380289834.62.0.88627838079.issue19105@psf.upfronthosting.co.za> Message-ID: <1380732476.55.0.869962639026.issue19105@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch. Without patch: >>> pprint.pprint([[[[[[[[[[0, 0, 0]]*3]]]]]]]], width=21) [[[[[[[[[[0, 0, 0], [0, 0, 0], [0, 0, 0]]]]]]]]]] With patch: >>> pprint.pprint([[[[[[[[[[0, 0, 0]]*3]]]]]]]], width=21) [[[[[[[[[[0, 0, 0], [0, 0, 0], [0, 0, 0]]]]]]]]]] ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file31945/pprint_all_width.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 19:03:01 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 02 Oct 2013 17:03:01 +0000 Subject: [issue19146] Improvements to traceback module Message-ID: <1380733381.79.0.0175162036016.issue19146@psf.upfronthosting.co.za> New submission from Guido van Rossum: The traceback module is driving me nuts. It has some handy helpers to extract info about a traceback or a full stack without formatting them, but (a) these are _internal, and (b) they don't return the frame object as part of the information, so code that wants to do additional stuff (e.g. print the values of local variables) cannot use them. (I guess in a sense the two problems cancel each other out. :-) Here's a proposed fix. (I know it is lacking tests.) It adds extract_tb_ex() and extract_stack_ex() functions that return a list of 5-tuples filename, line number, function name, text, frame). I'm also reworking the lowest-level internal function, _extract_tb_or_stack_iter(), to take an iterator instead of a starting point and a function to get the info and the next starting point. The old design feels unpythonic to me -- the task at hand so clearly feels like it should wrap an iterator! Finally, I'm adding some important info to a few docstrings: when the limit clips the number of frames, you get the *oldest* frames from a traceback, but the *newest* frames from a stack. That makes sense when you think about it, but I still think it's worth mentioning. Feedback? ---------- messages: 198852 nosy: akuchling, benjamin.peterson, gvanrossum priority: normal severity: normal status: open title: Improvements to traceback module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 19:03:34 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 02 Oct 2013 17:03:34 +0000 Subject: [issue19146] Improvements to traceback module In-Reply-To: <1380733381.79.0.0175162036016.issue19146@psf.upfronthosting.co.za> Message-ID: <1380733414.77.0.526713711334.issue19146@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- stage: -> patch review type: -> enhancement versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 19:15:01 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Oct 2013 17:15:01 +0000 Subject: [issue18037] 2to3 passes through string literal which causes SyntaxError in 3.x In-Reply-To: <1369259204.14.0.48841389768.issue18037@psf.upfronthosting.co.za> Message-ID: <1380734101.48.0.702547871393.issue18037@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is the patch good to you Benjamin? I'm not very experienced in 2to3 machinery. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 19:16:36 2013 From: report at bugs.python.org (Trevor Bowen) Date: Wed, 02 Oct 2013 17:16:36 +0000 Subject: [issue19142] Cross-compile fails trying to execute foreign pgen on build host In-Reply-To: <1380670898.69.0.308819053325.issue19142@psf.upfronthosting.co.za> Message-ID: <1380734196.24.0.65818265485.issue19142@psf.upfronthosting.co.za> Trevor Bowen added the comment: Ok, thanks for the tips. I'm new to developing on Python itself. I'll start simple by trying to develop a set of patches for the 2.7.5 source tar-ball, which I usually use to build Python. If that succeeds, I'll look into pushing it into the related source files. So far, I'm anticipating modifying these files: configure, Makefile.pre.in, and setup.py. ... Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 19:17:23 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Oct 2013 17:17:23 +0000 Subject: [issue19132] Add compact mode to pprint In-Reply-To: <1380485149.97.0.648520685176.issue19132@psf.upfronthosting.co.za> Message-ID: <1380734243.74.0.0364291399178.issue19132@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I had added a what's new entry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 19:17:35 2013 From: report at bugs.python.org (Andrew Parker) Date: Wed, 02 Oct 2013 17:17:35 +0000 Subject: [issue19147] pydoc3 fcntl.flock documentation gives wrong man page section for flock Message-ID: <1380734255.97.0.651100978858.issue19147@psf.upfronthosting.co.za> New submission from Andrew Parker: On my Linux system the docs for fcntl.flock gives me "man 3 flock" for more details: $ pydoc3 fcntl.flock Help on built-in function flock in fcntl: fcntl.flock = flock(...) flock(fd, operation) Perform the lock operation op on file descriptor fd. See the Unix manual page for flock(3) for details. (On some systems, this function is emulated using fcntl().) However, at least for Fedora 19 and RHEL 6, that should be "man 2 flock" or "See the manual page for flock(2) for details": $ man 3 flock | wc -l No manual entry for flock in section 3 0 $ man 2 flock | wc -l 85 Note that http://docs.python.org/3/library/fcntl.html#fcntl.flock and http://docs.python.org/2/library/fcntl.html#fcntl.flock both have it right. ---------- assignee: docs at python components: Documentation messages: 198856 nosy: Andrew.Parker, docs at python priority: normal severity: normal status: open title: pydoc3 fcntl.flock documentation gives wrong man page section for flock versions: Python 2.6, Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 20:35:50 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Oct 2013 18:35:50 +0000 Subject: [issue19146] Improvements to traceback module In-Reply-To: <1380733381.79.0.0175162036016.issue19146@psf.upfronthosting.co.za> Message-ID: <1380738950.43.0.28939024374.issue19146@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You forgot a patch. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 20:40:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 02 Oct 2013 18:40:52 +0000 Subject: [issue19132] Add compact mode to pprint In-Reply-To: <1380485149.97.0.648520685176.issue19132@psf.upfronthosting.co.za> Message-ID: <3cqmPv16MGz7LjV@mail.python.org> Roundup Robot added the comment: New changeset 6e7b1aadea2f by Serhiy Storchaka in branch 'default': Issue #19132: Add versionchanged tags. http://hg.python.org/cpython/rev/6e7b1aadea2f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 20:41:35 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 02 Oct 2013 18:41:35 +0000 Subject: [issue19146] Improvements to traceback module In-Reply-To: <1380733381.79.0.0175162036016.issue19146@psf.upfronthosting.co.za> Message-ID: <1380739295.38.0.29596456476.issue19146@psf.upfronthosting.co.za> Guido van Rossum added the comment: Sigh. Here it is. ---------- keywords: +patch Added file: http://bugs.python.org/file31946/TB.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 20:44:22 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Oct 2013 18:44:22 +0000 Subject: [issue19020] Regression: Windows-tkinter-idle, unicode, and 0xxx filename In-Reply-To: <1379196682.03.0.147663616291.issue19020@psf.upfronthosting.co.za> Message-ID: <1380739462.89.0.894384802612.issue19020@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Tcl is weak typed language and all Tcl values formally are strings. "123" is the 123 integer, the "123" string, and Tcl list containing one element "123" (which can be a number, a string, a list, etc). Actually for optimization Tcl uses different specialized types internally and Tkinter uses it for converting Tcl values to Python values (when wantobject is true). When wantobject is false, tkinter always returns string. If Tkinter encounters unknown to it Tcl type, it returns Tcl_Obj. Tcl introduces new types in new versions and Tcl function which returned string or Tcl list in old version can return new type in new version. So any Tkinter method which supposed return a "list", can return a tuple, a string, or a Tcl_Obj. splitlist() splits a string, a tuple or a Tcl_Obj to Python tuple. '' -> () 'abc' -> ('abc',) 'abc def' -> ('abc', 'def') 'abc {def ghi}' -> ('abc', 'def ghi') It always returns a tuple (of strings if an argument is a string). If an argument already is a tuple, splitlist() just returns it. If an argument is Tcl list, splitlist() returns a tuple which contains it's elements. split() is more intelligent. It try guess a structure of data and splits "list" to subelements while it is possible. '' -> '' 'abc' -> 'abc' 'abc def' -> ('abc', 'def') 'abc {def ghi}' -> ('abc', ('def', 'ghi')) If an argument is a tuple, split() recursively splits it's elements. When an argument is TclObj, split() returns a string if Tcl list has 0 or 1 element, otherwise it returns the same value as splitlist(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 20:55:27 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Oct 2013 18:55:27 +0000 Subject: [issue19021] AttributeError in Popen.__del__ In-Reply-To: <1379202406.71.0.0429173757884.issue19021@psf.upfronthosting.co.za> Message-ID: <1380740127.68.0.353795724461.issue19021@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There is a regression in 3.4 due to changes in shutdown procedure. This code correctly works in 3.3. There are more than a dozen places in the stdlib which rely upon accessibility of builtins. I wrote patches for all these cases, but third-party code will be broken. I think we should restore guarantees about builtins. ---------- versions: -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 21:04:22 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Wed, 02 Oct 2013 19:04:22 +0000 Subject: [issue19146] Improvements to traceback module In-Reply-To: <1380733381.79.0.0175162036016.issue19146@psf.upfronthosting.co.za> Message-ID: <1380740662.0.0.787502952545.issue19146@psf.upfronthosting.co.za> Changes by Claudiu.Popa : ---------- nosy: +Claudiu.Popa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 21:22:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 02 Oct 2013 19:22:32 +0000 Subject: [issue19147] pydoc3 fcntl.flock documentation gives wrong man page section for flock In-Reply-To: <1380734255.97.0.651100978858.issue19147@psf.upfronthosting.co.za> Message-ID: <3cqnKz5QRQz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 43064ded64cb by Ned Deily in branch '2.7': Issue #19147: Fix docstring for fcntl.flock to refer to correct man section. http://hg.python.org/cpython/rev/43064ded64cb New changeset 735d8b856928 by Ned Deily in branch '3.3': Issue #19147: Fix docstring for fcntl.flock to refer to correct man section. http://hg.python.org/cpython/rev/735d8b856928 New changeset 1cb0c05d71af by Ned Deily in branch 'default': Issue #19147: merge from 3.3 http://hg.python.org/cpython/rev/1cb0c05d71af ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 21:23:42 2013 From: report at bugs.python.org (Ned Deily) Date: Wed, 02 Oct 2013 19:23:42 +0000 Subject: [issue19147] pydoc3 fcntl.flock documentation gives wrong man page section for flock In-Reply-To: <1380734255.97.0.651100978858.issue19147@psf.upfronthosting.co.za> Message-ID: <1380741822.9.0.975305774784.issue19147@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the report! ---------- nosy: +ned.deily resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.4 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 21:24:08 2013 From: report at bugs.python.org (Bastien Montagne) Date: Wed, 02 Oct 2013 19:24:08 +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: <1380741848.5.0.924706574638.issue16129@psf.upfronthosting.co.za> Bastien Montagne added the comment: No one to check the patch? It?s rather small, should not take much time? And we really need a solution for this issue, so better to try to get this settled before 3.4 freeze! ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 21:43:33 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 02 Oct 2013 19:43:33 +0000 Subject: [issue19145] Inconsistent behaviour in itertools.repeat when using negative times In-Reply-To: <1380727396.47.0.412229295257.issue19145@psf.upfronthosting.co.za> Message-ID: <1380743013.43.0.913466153833.issue19145@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The preferred behavior is that a negative number always means 0. That is what lists do: >>> [1] * (-5) [] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 21:59:25 2013 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 02 Oct 2013 19:59:25 +0000 Subject: [issue19108] Benchmark runner tries to execute external Python command and fails on error reporting In-Reply-To: <1380297636.45.0.339184347104.issue19108@psf.upfronthosting.co.za> Message-ID: <1380743965.57.0.75688163406.issue19108@psf.upfronthosting.co.za> Stefan Behnel added the comment: What about this: by default, we assume all runtimes to have the same major version as the Python runtime that executes the benchmark runner. If that's not the case, users must override it explicitly with a command line option, say, "--pyversions 2:3" for a reference 2.x and a comparison 3.x version of Python (i.e. in the order the programs appear on the command line). Does that sound ok? I'd like to avoid a trial-and-fallback approach as that would mean that any wrapper scripts would still have to support being called twice and handling the -c option in one way or another. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 22:06:11 2013 From: report at bugs.python.org (Brett Cannon) Date: Wed, 02 Oct 2013 20:06:11 +0000 Subject: [issue19108] Benchmark runner tries to execute external Python command and fails on error reporting In-Reply-To: <1380297636.45.0.339184347104.issue19108@psf.upfronthosting.co.za> Message-ID: <1380744371.49.0.32986645812.issue19108@psf.upfronthosting.co.za> Brett Cannon added the comment: If you want to propose a patch to add specifying the version on the command-line to avoid inferring the version I would be fine with that. ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 22:18:30 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2013 20:18:30 +0000 Subject: [issue19146] Improvements to traceback module In-Reply-To: <1380733381.79.0.0175162036016.issue19146@psf.upfronthosting.co.za> Message-ID: <1380745110.72.0.0120486910124.issue19146@psf.upfronthosting.co.za> STINNER Victor added the comment: > It adds extract_tb_ex() and extract_stack_ex() functions ... I don't like "_ex" suffixes, it's not future proof if we need to add another function later. You may rename them using "_iter" suffix and return an iterator instead of a list. Such idea was also proposed for os.listdir() => os.scandir() / os.iterdir(). See the discussion in #11406. The caller can write tuple(extract_stack_iter()), as I do with dict.items() to sort a dictionary. > Feedback? I like unit tests :-) The patch should also document new functions. You may only need the most recent frames. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 22:29:21 2013 From: report at bugs.python.org (Esa Peuha) Date: Wed, 02 Oct 2013 20:29:21 +0000 Subject: [issue19148] Minor issues with Enum docs Message-ID: <1380745761.79.0.183004061407.issue19148@psf.upfronthosting.co.za> New submission from Esa Peuha: I noticed a couple of issues with the Enum documentation. First, there are some markup bugs which should be fixed by the attached file. Second, I think "If the only change desired is no aliases allowed" is very bad English and should be reworded; I would go with "If you only want to disallow aliases" but maybe other people have better ideas. ---------- assignee: docs at python components: Documentation files: enum.diff keywords: patch messages: 198869 nosy: Esa.Peuha, docs at python priority: normal severity: normal status: open title: Minor issues with Enum docs type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file31947/enum.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 22:30:00 2013 From: report at bugs.python.org (Ned Deily) Date: Wed, 02 Oct 2013 20:30:00 +0000 Subject: [issue19141] Windows Launcher fails to respect PATH In-Reply-To: <1380669409.4.0.896421919729.issue19141@psf.upfronthosting.co.za> Message-ID: <1380745800.96.0.0327266406416.issue19141@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 22:34:18 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 02 Oct 2013 20:34:18 +0000 Subject: [issue18037] 2to3 passes through string literal which causes SyntaxError in 3.x In-Reply-To: <1369259204.14.0.48841389768.issue18037@psf.upfronthosting.co.za> Message-ID: <1380746058.51.0.813905880811.issue18037@psf.upfronthosting.co.za> Benjamin Peterson added the comment: That seems fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 22:41:00 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 02 Oct 2013 20:41:00 +0000 Subject: [issue19146] Improvements to traceback module In-Reply-To: <1380745110.72.0.0120486910124.issue19146@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: > > I don't like "_ex" suffixes, it's not future proof if we need to add > another function later. > Me neither, but you can't change a function that returns a list of 4-tuples into a function that returns a list of 5-tuples without breaking existing code. IIRC for struct and time tuples we created a hack in C where we return something that behaves like an N-tuple but has some extra attributes -- but I don't think collections.namedtuple supports that. > You may rename them using "_iter" suffix and return an iterator instead of > a list. I already thought of that, but that doesn't work: the iterator version would return the stack in the wrong order (note the .reverse() call in the code). > Such idea was also proposed for os.listdir() => os.scandir() / > os.iterdir(). See the discussion in #11406. The caller can write > tuple(extract_stack_iter()), as I do with dict.items() to sort a dictionary. > > I like unit tests :-) The patch should also document new functions. > I'll take care of that when we've agreed on the new API. > You may only need the most recent frames. > Not sure what you mean by that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 23:13:37 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Wed, 02 Oct 2013 21:13:37 +0000 Subject: [issue19146] Improvements to traceback module In-Reply-To: <1380733381.79.0.0175162036016.issue19146@psf.upfronthosting.co.za> Message-ID: <1380748417.04.0.589537531572.issue19146@psf.upfronthosting.co.za> Claudiu.Popa added the comment: > I already thought of that, but that doesn't work: the iterator version > would return the stack in the wrong order (note the .reverse() call in the code). Then, couldn't this: stack = list(_extract_stack_iter(_get_stack(f), limit=limit)) stack.reverse() return stack be rewritten as this, knowing the fact that _extract_stack_iter returns an iterable? return reversed(_extract_stack_iter(_get_stack(f), limit=limit)) And in this case, extract_stack_ex could become extract_stack_iter or something like that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 23:23:38 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 02 Oct 2013 21:23:38 +0000 Subject: [issue19148] Minor issues with Enum docs In-Reply-To: <1380745761.79.0.183004061407.issue19148@psf.upfronthosting.co.za> Message-ID: <1380749018.24.0.549590577031.issue19148@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 23:26:05 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 02 Oct 2013 21:26:05 +0000 Subject: [issue19146] Improvements to traceback module In-Reply-To: <1380733381.79.0.0175162036016.issue19146@psf.upfronthosting.co.za> Message-ID: <1380749165.63.0.682752058337.issue19146@psf.upfronthosting.co.za> Guido van Rossum added the comment: No, reversed() doesn't work on iterators. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 23:53:27 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Oct 2013 21:53:27 +0000 Subject: [issue19146] Improvements to traceback module In-Reply-To: <1380733381.79.0.0175162036016.issue19146@psf.upfronthosting.co.za> Message-ID: <1380750807.46.0.339681177518.issue19146@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Me neither, but you can't change a function that returns a list of 4-tuples > into a function that returns a list of 5-tuples without breaking existing > code. IIRC for struct and time tuples we created a hack in C where we > return something that behaves like an N-tuple but has some extra attributes > -- but I don't think collections.namedtuple supports that. It do. class tb_entity(namedtuple('tb_entity', 'filename lineno name line')): def __new__(cls, filename, lineno, name, line, frame=None): self = super().__new__(cls, filename, lineno, name, line) self.frame = frame return self ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 23:57:27 2013 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 02 Oct 2013 21:57:27 +0000 Subject: [issue19141] Windows Launcher fails to respect PATH In-Reply-To: <1380669409.4.0.896421919729.issue19141@psf.upfronthosting.co.za> Message-ID: <1380751047.78.0.91199157067.issue19141@psf.upfronthosting.co.za> Vinay Sajip added the comment: The current version of py.exe *does* do a PATH search for a shebang of "#!/usr/bin/env python" (see #17903). The whole *point* of py.exe is to invoke Pythons which are *not* available on the PATH. The behaviour of py.exe is as documented in PEP 397, other than the PATH-searching for /usr/bin/env python which is a more recent addition. People are supposed to put shebang lines in their scripts, else PEP 397 is not of much use to them. Scripts installed via setuptools/pip (e.g. into a virtualenv) have correct shebang lines prepended to them. Note that the environment variables and some py.ini settings are *alternative* ways of specifying intent. The choosing of 2.x vs. 3.x is also mentioned in the PEP and was suggested as the best default for the largest user population - that of 2.x users potentially transitioning to 3.x. Is there some deviation from PEP 397 (other than /usr/bin/env python -> PATH search) that you are trying to draw attention to? Or is purely a documentation fix sufficient? Otherwise, I will be closing this as wontfix, as the basic behaviour was thrashed out when PEP 397 was discussed. ---------- nosy: +mhammond _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 23:59:56 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 02 Oct 2013 21:59:56 +0000 Subject: [issue17442] code.InteractiveInterpreter doesn't display the exception cause In-Reply-To: <1363468664.92.0.794606977989.issue17442@psf.upfronthosting.co.za> Message-ID: <1380751196.06.0.747302888959.issue17442@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +pitrou stage: -> patch review versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 00:42:56 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 02 Oct 2013 22:42:56 +0000 Subject: [issue19146] Improvements to traceback module In-Reply-To: <1380733381.79.0.0175162036016.issue19146@psf.upfronthosting.co.za> Message-ID: <1380753776.86.0.00158404952488.issue19146@psf.upfronthosting.co.za> Guido van Rossum added the comment: Nice. However it will take up a lot more space, because now there's an instance dict. (And adding __slots__ to a namedtuple subclass doesn't work.) I'll have to think about whether I care about the extra space. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 01:24:00 2013 From: report at bugs.python.org (Graham Wideman) Date: Wed, 02 Oct 2013 23:24:00 +0000 Subject: [issue19141] Windows Launcher fails to respect PATH In-Reply-To: <1380669409.4.0.896421919729.issue19141@psf.upfronthosting.co.za> Message-ID: <1380756240.54.0.811982807968.issue19141@psf.upfronthosting.co.za> Graham Wideman added the comment: Hi Vinay, thanks for commenting. And of course for your efforts on py.exe (and no doubt the debate process.) I am trying to draw attention to the situation where the script has no shebang line, and there is no other explicit configuration info for py.exe. (No py.ini file, no py.exe envt variables, no py.exe-specific command-line args). In that case, the next thing py.exe should check, in my view, is the user's PATH, where they may well have defined which python version they prefer (even if they are unaware of PEP 397 and Launcher). This rationale is parallel to the one in #17903 that you pointed to. Currently, py.exe ignores PATH in that case, and falls back to looking through all installed pythons and picking the latest 2.x if available. > The choosing of 2.x vs. 3.x is also mentioned in the PEP The discussion of that issue would be illuminating, but I couldn't find it. Could you point to where this is mentioned in PEP-0397? Thanks again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 06:02:41 2013 From: report at bugs.python.org (Martin) Date: Thu, 03 Oct 2013 04:02:41 +0000 Subject: [issue19149] python bug report Message-ID: New submission from Martin: Hello! My name is Martin, a member of Free Software in Comahue National University of Neuqu?n, Argentina. We have detected an error in the compiler for Python 2.7 using Ubuntu 12.04: I write the code, without realizing I leave a comment with syntax error in that line (do not put the # of comments), compile and get error of sistaxis in that line. Fix the error adding # to comment, I do compile again and it shows me various errors that take over the Python compiler and I am forced to close it. Hope your response with a possible solution to this problem, my idea is to continue using this version of Python. Thank yo ---------- messages: 198878 nosy: Grupobetatesting priority: normal severity: normal status: open title: python bug report _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 06:04:58 2013 From: report at bugs.python.org (Martin) Date: Thu, 03 Oct 2013 04:04:58 +0000 Subject: [issue19150] python bug report Message-ID: <1380773098.03.0.70627839845.issue19150@psf.upfronthosting.co.za> New submission from Martin: Hello! My name is Martin, a member of Free Software in Comahue National University of Neuqu?n, Argentina. We have detected an error in the compiler for Python 2.7 using Ubuntu 12.04: I write the code, without realizing I leave a comment with syntax error in that line (do not put the # of comments), compile and get error of sistaxis in that line. Fix the error adding # to comment, I do compile again and it shows me various errors that take over the Python compiler and I am forced to close it. Hope your response with a possible solution to this problem, my idea is to continue using this version of Python. Thank yo ---------- components: IDLE files: Captura de pantalla de 2013-10-02 23:52:10.png messages: 198879 nosy: Grupobetatesting priority: normal severity: normal status: open title: python bug report type: compile error versions: Python 2.7 Added file: http://bugs.python.org/file31948/Captura de pantalla de 2013-10-02 23:52:10.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 06:07:15 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 03 Oct 2013 04:07:15 +0000 Subject: [issue19149] python bug report In-Reply-To: Message-ID: <1380773235.05.0.155047992407.issue19149@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> python bug report _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 06:36:20 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 03 Oct 2013 04:36:20 +0000 Subject: [issue19150] IDLE shell fails: "ModifiedInterpreter instance has no attribute 'interp'" In-Reply-To: <1380773098.03.0.70627839845.issue19150@psf.upfronthosting.co.za> Message-ID: <1380774980.44.0.754219757973.issue19150@psf.upfronthosting.co.za> Ned Deily added the comment: Can you give a step-by-step sequence of commands to reproduce the problem? One thing that looks somewhat suspicious is that there seem to be multiple IDLE "*Python Shell" windows open. Normally there should only be one. ---------- nosy: +ned.deily title: python bug report -> IDLE shell fails: "ModifiedInterpreter instance has no attribute 'interp'" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 06:46:21 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 03 Oct 2013 04:46:21 +0000 Subject: [issue19145] Inconsistent behaviour in itertools.repeat when using negative times In-Reply-To: <1380727396.47.0.412229295257.issue19145@psf.upfronthosting.co.za> Message-ID: <1380775581.54.0.0855926630631.issue19145@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Improved the patch which makes negative number *always* means 0. Added comment and put more test. ---------- Added file: http://bugs.python.org/file31949/fix_itertools_repeat_negative_number_means_0_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 07:49:44 2013 From: report at bugs.python.org (Martin) Date: Thu, 03 Oct 2013 05:49:44 +0000 Subject: [issue19150] IDLE shell fails: "ModifiedInterpreter instance has no attribute 'interp'" In-Reply-To: <1380773098.03.0.70627839845.issue19150@psf.upfronthosting.co.za> Message-ID: <1380779384.29.0.577512865753.issue19150@psf.upfronthosting.co.za> Martin added the comment: I have three shell windows open because everytime i run the code corrected, it opens a new shell, I try to close them but there is one that keeps open, unless I kill it by terminal (kill) I attach a photo of compiling the line of code, closing leftover shell ... What I do is compile with three lines that should be comments, it makes syntax error for not to have commented lines, I comment them (#) and when I want to recompile, errors appears in the main shell. ---------- resolution: -> invalid Added file: http://bugs.python.org/file31950/Captura de pantalla de 2013-10-03 02:27:12.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 08:15:48 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 03 Oct 2013 06:15:48 +0000 Subject: [issue19151] Docstring and WindowsRegistryFinder wrong relative to importlib._bootstrap._get_supported_file_loaders() Message-ID: <1380780948.31.0.22137513887.issue19151@psf.upfronthosting.co.za> New submission from Eric Snow: Changeset 1db6553f3f8c for issue #15576 changed importlib._bootstrap._get_supported_file_loaders() to return a list of 2-tuples instead of 3-tuples. However, the docstring for the function was not updated to reflect that. More importantly, WindowsRegistryFinder.find_module() still expects 3-tuples. The fix is relatively trivial (patch attached). However, I'm not aware of any reports of problems related to what should be a very broken WindowsRegistryFinder. So I just wanted to double-check that I haven't missed something here. Undoubtedly the code simply hasn't gotten a lot of exposure since the patch (Aug. 2012). ---------- assignee: eric.snow components: Interpreter Core files: fix-get-supported-file-loaders.diff keywords: patch messages: 198883 nosy: brett.cannon, eric.snow priority: normal severity: normal stage: commit review status: open title: Docstring and WindowsRegistryFinder wrong relative to importlib._bootstrap._get_supported_file_loaders() type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file31951/fix-get-supported-file-loaders.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 08:30:13 2013 From: report at bugs.python.org (Georg Brandl) Date: Thu, 03 Oct 2013 06:30:13 +0000 Subject: [issue19148] Minor issues with Enum docs In-Reply-To: <1380745761.79.0.183004061407.issue19148@psf.upfronthosting.co.za> Message-ID: <1380781813.81.0.781220946111.issue19148@psf.upfronthosting.co.za> Georg Brandl added the comment: Patch LGTM. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 08:54:00 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 03 Oct 2013 06:54:00 +0000 Subject: [issue19150] IDLE shell fails: "ModifiedInterpreter instance has no attribute 'interp'" In-Reply-To: <1380773098.03.0.70627839845.issue19150@psf.upfronthosting.co.za> Message-ID: <1380783240.09.0.456063553073.issue19150@psf.upfronthosting.co.za> Ned Deily added the comment: That still doesn't explain the problem. How are you trying to "compile" the program? For example, one way would be to use your mouse to select the "Run" menu item and then the "Run Module" option. Or use the F5 function key shortcut for that. Another somewhat unusual thing is "No Subprocess" status in the shell window. How are you starting IDLE? From a shell? If so, with what arguments? Also, can you show the contents of any files in your ~/.idlerc directory? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 09:01:35 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 03 Oct 2013 07:01:35 +0000 Subject: [issue19152] ExtensionFileLoader missing get_filename() Message-ID: <1380783695.34.0.941035195145.issue19152@psf.upfronthosting.co.za> New submission from Eric Snow: Any reason why ExtensionFileLoader does not implement get_filename()? I'm guessing it just slipped through the cracks. It should be there (and be registered as implementing ExecutionLoader). ---------- assignee: eric.snow components: Interpreter Core messages: 198886 nosy: brett.cannon, eric.snow priority: normal severity: normal status: open title: ExtensionFileLoader missing get_filename() type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 11:13:02 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 03 Oct 2013 09:13:02 +0000 Subject: [issue18037] 2to3 passes through string literal which causes SyntaxError in 3.x In-Reply-To: <1369259204.14.0.48841389768.issue18037@psf.upfronthosting.co.za> Message-ID: <3cr7mF5Q0Tz7LlH@mail.python.org> Roundup Robot added the comment: New changeset 5e8de100f708 by Serhiy Storchaka in branch '2.7': Issue #18037: 2to3 now escapes '\u' and '\U' in native strings. http://hg.python.org/cpython/rev/5e8de100f708 New changeset 5950dd4cd9ef by Serhiy Storchaka in branch '3.3': Issue #18037: 2to3 now escapes '\u' and '\U' in native strings. http://hg.python.org/cpython/rev/5950dd4cd9ef New changeset 7d3695937362 by Serhiy Storchaka in branch 'default': Issue #18037: 2to3 now escapes '\u' and '\U' in native strings. http://hg.python.org/cpython/rev/7d3695937362 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 12:20:02 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Oct 2013 10:20:02 +0000 Subject: [issue18965] 2to3 can produce illegal bytes literals In-Reply-To: <1378598799.8.0.0499553446902.issue18965@psf.upfronthosting.co.za> Message-ID: <1380795602.81.0.411870305481.issue18965@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file31657/2to3_nonascii_bytes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 12:21:20 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Oct 2013 10:21:20 +0000 Subject: [issue18965] 2to3 can produce illegal bytes literals In-Reply-To: <1378598799.8.0.0499553446902.issue18965@psf.upfronthosting.co.za> Message-ID: <1380795680.28.0.560447641312.issue18965@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Added a test. ---------- Added file: http://bugs.python.org/file31952/2to3_nonascii_bytes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 12:44:56 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Oct 2013 10:44:56 +0000 Subject: [issue18037] 2to3 passes through string literal which causes SyntaxError in 3.x In-Reply-To: <1369259204.14.0.48841389768.issue18037@psf.upfronthosting.co.za> Message-ID: <1380797096.33.0.983880494049.issue18037@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 12:45:32 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Oct 2013 10:45:32 +0000 Subject: [issue18965] 2to3 can produce illegal bytes literals In-Reply-To: <1378598799.8.0.0499553446902.issue18965@psf.upfronthosting.co.za> Message-ID: <1380797132.15.0.676049203919.issue18965@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file31952/2to3_nonascii_bytes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 12:46:07 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Oct 2013 10:46:07 +0000 Subject: [issue18965] 2to3 can produce illegal bytes literals In-Reply-To: <1378598799.8.0.0499553446902.issue18965@psf.upfronthosting.co.za> Message-ID: <1380797167.23.0.33461545486.issue18965@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Backported to 2.7. ---------- Added file: http://bugs.python.org/file31953/2to3_nonascii_bytes-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 13:14:06 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Oct 2013 11:14:06 +0000 Subject: [issue19143] Finding the Windows version getting messier In-Reply-To: <1380675004.25.0.239416620624.issue19143@psf.upfronthosting.co.za> Message-ID: <1380798846.79.0.357258704555.issue19143@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 13:32:59 2013 From: report at bugs.python.org (Stefan Krah) Date: Thu, 03 Oct 2013 11:32:59 +0000 Subject: [issue19014] Allow memoryview.cast() for empty views In-Reply-To: <1379105549.83.0.888503022363.issue19014@psf.upfronthosting.co.za> Message-ID: <1380799979.6.0.260147169313.issue19014@psf.upfronthosting.co.za> Stefan Krah added the comment: Ok, I think the main reason for disallowing zeros in view->shape here was that casts are undefined if also the "shape" argument is given: x = memoryview(b'') x.cast('d', shape=[1]) Now, this case *is* already caught at a later stage, since there isn't enough space for the cast. Nevertheless, the code is tricky, so I'd prefer to be conservative and catch shape arguments earlier. I left a suggestion in Rietveld. I would commit it myself, but I'm moving and my infrastructure is a mess. It would be great if one of you could take this one. I'll try to review the general case for ndim > 1 later, but that's not particularly important right now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 14:08:33 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Oct 2013 12:08:33 +0000 Subject: [issue18725] Multiline shortening In-Reply-To: <1376388778.3.0.982069932509.issue18725@psf.upfronthosting.co.za> Message-ID: <1380802113.69.0.433984129063.issue18725@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could anyone please review the patch? ---------- keywords: +needs review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 14:09:11 2013 From: report at bugs.python.org (Mark Hammond) Date: Thu, 03 Oct 2013 12:09:11 +0000 Subject: [issue19141] Windows Launcher fails to respect PATH In-Reply-To: <1380669409.4.0.896421919729.issue19141@psf.upfronthosting.co.za> Message-ID: <1380802151.51.0.781628397832.issue19141@psf.upfronthosting.co.za> Mark Hammond added the comment: > I am trying to draw attention to the situation where the script has no > shebang line, and there is no other explicit configuration info for > py.exe. In that case, the user should just type "python scriptname.py" - py.exe is for cases where just specifying "python" doesn't do the right thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 14:44:34 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 03 Oct 2013 12:44:34 +0000 Subject: [issue19021] AttributeError in Popen.__del__ In-Reply-To: <1379202406.71.0.0429173757884.issue19021@psf.upfronthosting.co.za> Message-ID: <1380804274.56.0.910057850747.issue19021@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > There is a regression in 3.4 due to changes in shutdown procedure. This > code correctly works in 3.3. There are more than a dozen places in the > stdlib which rely upon accessibility of builtins. Well, perhaps we can special-case builtins not to be "wiped" at shutdown. However, there is another problem here in that the Popen object survives until the builtins module is wiped. This should be investigated too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 15:39:24 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 03 Oct 2013 13:39:24 +0000 Subject: [issue19108] Benchmark runner tries to execute external Python command and fails on error reporting In-Reply-To: <1380297636.45.0.339184347104.issue19108@psf.upfronthosting.co.za> Message-ID: <1380807564.04.0.842240318353.issue19108@psf.upfronthosting.co.za> Brett Cannon added the comment: I should mention any solution for the command-line should take a N.N value *only* and not just 2/3 for instances where tests do not work with the latest version of Python yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 15:41:50 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 03 Oct 2013 13:41:50 +0000 Subject: [issue19151] Docstring and WindowsRegistryFinder wrong relative to importlib._bootstrap._get_supported_file_loaders() In-Reply-To: <1380780948.31.0.22137513887.issue19151@psf.upfronthosting.co.za> Message-ID: <1380807710.53.0.980951845628.issue19151@psf.upfronthosting.co.za> Brett Cannon added the comment: LGTM; just watch any Windows buildbot for possible failure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 15:44:10 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 03 Oct 2013 13:44:10 +0000 Subject: [issue19152] ExtensionFileLoader missing get_filename() In-Reply-To: <1380783695.34.0.941035195145.issue19152@psf.upfronthosting.co.za> Message-ID: <1380807850.82.0.70037470202.issue19152@psf.upfronthosting.co.za> Brett Cannon added the comment: Just an oversight. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 16:15:20 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 03 Oct 2013 14:15:20 +0000 Subject: [issue19021] AttributeError in Popen.__del__ In-Reply-To: <1379202406.71.0.0429173757884.issue19021@psf.upfronthosting.co.za> Message-ID: <1380809720.72.0.689084249718.issue19021@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > Well, perhaps we can special-case builtins not to be "wiped" at shutdown. > However, there is another problem here in that the Popen object survives > until the builtins module is wiped. This should be investigated too. Maybe it is because it uses the evil resuscitate-in-__del__ trick. I presume that if the child process survives during shutdown, then the popen object is guaranteed to survive too. We could get rid of the trick: * On Windows __del__ is unneeded since we don't need to reap zombie processes. * On Unix __del__ could just add self._pid (rather than self) to the list _active. _cleanup() would then use os.waitpid() to check the pids in _active. The hardest thing about making such a change is that test_subprocess currently uses _active. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 16:17:16 2013 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 03 Oct 2013 14:17:16 +0000 Subject: [issue19108] Benchmark runner tries to execute external Python command and fails on error reporting In-Reply-To: <1380297636.45.0.339184347104.issue19108@psf.upfronthosting.co.za> Message-ID: <1380809836.86.0.264378924696.issue19108@psf.upfronthosting.co.za> Stefan Behnel added the comment: I'm having trouble understanding your last comment. Are you saing that you want the exact value to be a two digits version and therefore use separate arguments for both Pythons (e.g. "--basever 2.7 --cmpver 3.3"), or that you want it to accept two digit versions instead of major-only regardless of the number of arguments (e.g. "--pyversion 2.7,3.3")? And are you saying that you want to use the version also for, say, disabling a test because it doesn't run in Py3.4 yet, despite supporting Py3.3, for example? A comma is what is used by "--args", BTW, that's why I'd reuse it for the versions argument, i.e. "--pyversion 2.7,3.3" and additionally "--pyversion 3.3" for the simple case. I haven't come up with a patch yet because it requires a number of non-local changes throughout the file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 17:16:44 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 03 Oct 2013 15:16:44 +0000 Subject: [issue19108] Benchmark runner tries to execute external Python command and fails on error reporting In-Reply-To: <1380297636.45.0.339184347104.issue19108@psf.upfronthosting.co.za> Message-ID: <1380813404.04.0.530386016586.issue19108@psf.upfronthosting.co.za> Brett Cannon added the comment: I want to only accept major.minor version specifications; how that is done on the command-line I don't care and leave up to you. And yes, the version may be used in the future to disable tests that e.g. don't work on Python 3.4 like Chameleon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 18:36:53 2013 From: report at bugs.python.org (Rinat) Date: Thu, 03 Oct 2013 16:36:53 +0000 Subject: [issue19153] Embedding into a shared library fails again Message-ID: <1380818213.13.0.0445211197564.issue19153@psf.upfronthosting.co.za> New submission from Rinat: I have same error as here described http://bugs.python.org/issue4434 I made everythings according this article http://docs.python.org/2/extending/embedding.html#compiling-and-linking-under-unix-like-systems and more but when i try to call interpriter from C++ it fails with errors python_support::pre_process_payment() failed Traceback (most recent call last): File "", line 1, in File "/payments/__init__.py", line 1, in from .factory import * File "/payments/factory.py", line 7, in import psycopg2 File "/usr/local/lib/python2.7/dist-packages/psycopg2/__init__.py", line 50, in from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID ImportError: /usr/local/lib/python2.7/dist-packages/psycopg2/_psycopg.so: undefined symbol: PyExc_SystemError Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 66, in apport_excepthook from apport.fileutils import likely_packaged, get_recent_crashes File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in from apport.report import Report File "/usr/lib/python2.7/dist-packages/apport/report.py", line 16, in from xml.parsers.expat import ExpatError File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in from pyexpat import * ImportError: /usr/lib/python2.7/lib-dynload/pyexpat.so: undefined symbol: _Py_ZeroStruct Original exception was: Traceback (most recent call last): File "", line 1, in File "/payments/__init__.py", line 1, in from .factory import * File "/payments/factory.py", line 7, in import psycopg2 File "/usr/local/lib/python2.7/dist-packages/psycopg2/__init__.py", line 50, in from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID ImportError: /usr/local/lib/python2.7/dist-packages/psycopg2/_psycopg.so: undefined symbol: PyExc_SystemError Environment 3.2.0-54-generic-pae #82-Ubuntu (12.04) g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 Boost.Python 1.48 Python 2.7.3 (default, Sep 26 2013, 20:08:41) [GCC 4.6.3] on linux2 No custom builds. Every package from ubuntu repository. Psycopg2 installed by pip Project is big so i can't to provide code ---------- components: Library (Lib) messages: 198900 nosy: rinatous priority: normal severity: normal status: open title: Embedding into a shared library fails again type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 19:05:03 2013 From: report at bugs.python.org (pmoody) Date: Thu, 03 Oct 2013 17:05:03 +0000 Subject: [issue18805] ipaddress netmask/hostmask parsing bugs In-Reply-To: <1377131918.88.0.806374780855.issue18805@psf.upfronthosting.co.za> Message-ID: <1380819903.44.0.803346215909.issue18805@psf.upfronthosting.co.za> pmoody added the comment: I've got a patch from pmarks that I've applied to ipaddr and the google code version of ipaddress-py. I'll get it applied to the hg ipaddress. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 19:12:39 2013 From: report at bugs.python.org (Florent Viard) Date: Thu, 03 Oct 2013 17:12:39 +0000 Subject: [issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed. Message-ID: <1380820358.99.0.777618727237.issue19154@psf.upfronthosting.co.za> New submission from Florent Viard: In Lib/http/client.py +682 (Formerly httplib) def fileno(self): return self.fp.fileno() This function should be modified to be able to handle the case where the http request is already completed and so "fp" is closed. Ex.: def fileno(self): if self.fp: return self.fp.fileno() else: return -1 I encountered the issue in the following context: while 1: read_list = select([req], ...)[0] if read_list: req.read(CHUNK_SIZE) ... Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/nappstore/server_comm.py", line 211, in download_file ready = select.select([req], [], [], timeout)[0] File "/usr/lib/python2.7/socket.py", line 313, in fileno return self._sock.fileno() File "/usr/lib/python2.7/httplib.py", line 655, in fileno return self.fp.fileno() AttributeError: 'NoneType' object has no attribute 'fileno' For the returned value, I'm not sure because there is currently 2 different cases for other objects returning a fileno. In Lib/fileinput.py: -1 is returned in case of ValueError (no fileno value as fp was closed) but in Lib/socket.py: ValueError is raised in that case and default value for fileno for a socket is None ---------- components: Library (Lib) messages: 198902 nosy: fviard priority: normal severity: normal status: open title: AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed. type: crash 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 3 19:59:02 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 03 Oct 2013 17:59:02 +0000 Subject: [issue19014] Allow memoryview.cast() for empty views In-Reply-To: <1379105549.83.0.888503022363.issue19014@psf.upfronthosting.co.za> Message-ID: <3crMR91XcNz7Lk4@mail.python.org> Roundup Robot added the comment: New changeset b08e092df155 by Antoine Pitrou in branch '3.3': Issue #19014: memoryview.cast() is now allowed on zero-length views. http://hg.python.org/cpython/rev/b08e092df155 New changeset 1e13a58c1b92 by Antoine Pitrou in branch 'default': Issue #19014: memoryview.cast() is now allowed on zero-length views. http://hg.python.org/cpython/rev/1e13a58c1b92 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 20:02:37 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 03 Oct 2013 18:02:37 +0000 Subject: [issue19014] Allow memoryview.cast() for empty views In-Reply-To: <1379105549.83.0.888503022363.issue19014@psf.upfronthosting.co.za> Message-ID: <1380823357.73.0.700314937749.issue19014@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Applied Stefan's suggestion. Thanks for the review :) ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 20:07:51 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Oct 2013 18:07:51 +0000 Subject: [issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed. In-Reply-To: <1380820358.99.0.777618727237.issue19154@psf.upfronthosting.co.za> Message-ID: <1380823671.1.0.428237956554.issue19154@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 20:26:51 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Oct 2013 18:26:51 +0000 Subject: [issue19014] Allow memoryview.cast() for empty views In-Reply-To: <1379105549.83.0.888503022363.issue19014@psf.upfronthosting.co.za> Message-ID: <1380824811.98.0.110773274821.issue19014@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Antoine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 20:29:21 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 03 Oct 2013 18:29:21 +0000 Subject: [issue19152] ExtensionFileLoader missing get_filename() In-Reply-To: <1380783695.34.0.941035195145.issue19152@psf.upfronthosting.co.za> Message-ID: <3crN691kc9z7LjP@mail.python.org> Roundup Robot added the comment: New changeset 0d079c66dc23 by Eric Snow in branch 'default': [issue19152] Add ExtensionFileLoader.get_filename(). http://hg.python.org/cpython/rev/0d079c66dc23 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 20:41:47 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 03 Oct 2013 18:41:47 +0000 Subject: [issue19152] ExtensionFileLoader missing get_filename() In-Reply-To: <1380783695.34.0.941035195145.issue19152@psf.upfronthosting.co.za> Message-ID: <1380825707.89.0.0560691793897.issue19152@psf.upfronthosting.co.za> Eric Snow added the comment: I realized after I committed that this should probably be back-ported to 3.3. I'll take care of that in a few hours. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 20:44:11 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 03 Oct 2013 18:44:11 +0000 Subject: [issue19151] Docstring and WindowsRegistryFinder wrong relative to importlib._bootstrap._get_supported_file_loaders() In-Reply-To: <1380780948.31.0.22137513887.issue19151@psf.upfronthosting.co.za> Message-ID: <1380825851.19.0.858383899869.issue19151@psf.upfronthosting.co.za> Eric Snow added the comment: changeset: 85941:152f7235667001fe7cb3c90ad79ab421ef8c03bb user: Eric Snow date: Thu Oct 03 12:08:55 2013 -0600 summary: [issue19951] Fix docstring and use of _get_suppported_file_loaders() to reflect 2-tuples. (wrong issue # in commit message) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 20:48:46 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 03 Oct 2013 18:48:46 +0000 Subject: [issue19151] Docstring and WindowsRegistryFinder wrong relative to importlib._bootstrap._get_supported_file_loaders() In-Reply-To: <1380780948.31.0.22137513887.issue19151@psf.upfronthosting.co.za> Message-ID: <3crNXY6gtZz7LjS@mail.python.org> Roundup Robot added the comment: New changeset a329474cfe0c by Eric Snow in branch 'default': [issue19151] Fix issue number in Misc/NEWS entry. http://hg.python.org/cpython/rev/a329474cfe0c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 20:49:52 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 03 Oct 2013 18:49:52 +0000 Subject: [issue19151] Docstring and WindowsRegistryFinder wrong relative to importlib._bootstrap._get_supported_file_loaders() In-Reply-To: <1380780948.31.0.22137513887.issue19151@psf.upfronthosting.co.za> Message-ID: <1380826192.65.0.00484906797856.issue19151@psf.upfronthosting.co.za> Eric Snow added the comment: As with #19152, I'll need to backport this to 3.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 21:26:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 03 Oct 2013 19:26:28 +0000 Subject: [issue19087] bytearray front-slicing not optimized In-Reply-To: <1380117830.08.0.43327617783.issue19087@psf.upfronthosting.co.za> Message-ID: <1380828388.8.0.943230590207.issue19087@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a slightly modified patch implementing Serhiy's suggestion. ---------- Added file: http://bugs.python.org/file31954/bytea_slice3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 21:34:00 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 03 Oct 2013 19:34:00 +0000 Subject: [issue17442] code.InteractiveInterpreter doesn't display the exception cause In-Reply-To: <1363468664.92.0.794606977989.issue17442@psf.upfronthosting.co.za> Message-ID: <1380828840.34.0.281410076983.issue17442@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +georg.brandl, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 21:34:44 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 03 Oct 2013 19:34:44 +0000 Subject: [issue18986] Add a case-insensitive case-preserving dict In-Reply-To: <1378725721.97.0.387646378602.issue18986@psf.upfronthosting.co.za> Message-ID: <1380828884.06.0.661219348414.issue18986@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Raymond, have you had time to look at this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 21:53:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 03 Oct 2013 19:53:19 +0000 Subject: [issue19151] Docstring and WindowsRegistryFinder wrong relative to importlib._bootstrap._get_supported_file_loaders() In-Reply-To: <1380780948.31.0.22137513887.issue19151@psf.upfronthosting.co.za> Message-ID: <3crPz22vqKz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 32b18998a560 by Eric Snow in branch '3.3': [issue19151] Fix docstring and use of _get_suppported_file_loaders() to reflect 2-tuples. http://hg.python.org/cpython/rev/32b18998a560 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 21:53:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 03 Oct 2013 19:53:19 +0000 Subject: [issue19152] ExtensionFileLoader missing get_filename() In-Reply-To: <1380783695.34.0.941035195145.issue19152@psf.upfronthosting.co.za> Message-ID: <3crPz316Vyz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 832579dbafd6 by Eric Snow in branch '3.3': [issue19152] Add ExtensionFileLoader.get_filename(). http://hg.python.org/cpython/rev/832579dbafd6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 21:55:07 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 03 Oct 2013 19:55:07 +0000 Subject: [issue19152] ExtensionFileLoader missing get_filename() In-Reply-To: <1380783695.34.0.941035195145.issue19152@psf.upfronthosting.co.za> Message-ID: <1380830107.25.0.243944777339.issue19152@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 21:56:01 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 03 Oct 2013 19:56:01 +0000 Subject: [issue19151] Docstring and WindowsRegistryFinder wrong relative to importlib._bootstrap._get_supported_file_loaders() In-Reply-To: <1380780948.31.0.22137513887.issue19151@psf.upfronthosting.co.za> Message-ID: <1380830161.04.0.540657734409.issue19151@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 21:56:11 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2013 19:56:11 +0000 Subject: [issue19087] bytearray front-slicing not optimized In-Reply-To: <1380117830.08.0.43327617783.issue19087@psf.upfronthosting.co.za> Message-ID: <1380830171.45.0.672848110868.issue19087@psf.upfronthosting.co.za> STINNER Victor added the comment: bytea_slice3.patch looks simpler than bytea_slice2.patch, I prefer it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 22:00:39 2013 From: report at bugs.python.org (Peng Yu) Date: Thu, 03 Oct 2013 20:00:39 +0000 Subject: [issue19155] Display stack info with color in pdb (the "w" command) Message-ID: <1380830438.89.0.93033218412.issue19155@psf.upfronthosting.co.za> New submission from Peng Yu: Currently, the "w" command does not show the stack info in color. I think that it might be visually helpful to add some color to emphasize the current frame, etc. May I suggest to add this feature to pdb? Thanks. ---------- messages: 198916 nosy: Peng.Yu priority: normal severity: normal status: open title: Display stack info with color in pdb (the "w" command) type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 22:56:12 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 03 Oct 2013 20:56:12 +0000 Subject: [issue19152] ExtensionFileLoader missing get_filename() In-Reply-To: <1380783695.34.0.941035195145.issue19152@psf.upfronthosting.co.za> Message-ID: <1380833772.82.0.263301025605.issue19152@psf.upfronthosting.co.za> Brett Cannon added the comment: Actually you need to back out the 3.3 commit. That's a new API in a bugfix release and that's bad. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 22:56:27 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 03 Oct 2013 20:56:27 +0000 Subject: [issue19152] ExtensionFileLoader missing get_filename() In-Reply-To: <1380783695.34.0.941035195145.issue19152@psf.upfronthosting.co.za> Message-ID: <1380833787.55.0.527468478898.issue19152@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 23:00:39 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 03 Oct 2013 21:00:39 +0000 Subject: [issue19152] ExtensionFileLoader missing get_filename() In-Reply-To: <1380783695.34.0.941035195145.issue19152@psf.upfronthosting.co.za> Message-ID: <1380834039.15.0.523224339782.issue19152@psf.upfronthosting.co.za> Eric Snow added the comment: Dang it. I was thinking of it as a bug that the method wasn't there, but you're right regardless. Revert coming. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 23:21:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 03 Oct 2013 21:21:06 +0000 Subject: [issue19152] ExtensionFileLoader missing get_filename() In-Reply-To: <1380783695.34.0.941035195145.issue19152@psf.upfronthosting.co.za> Message-ID: <3crRwL17pvz7Ljr@mail.python.org> Roundup Robot added the comment: New changeset 7ed717bd5faa by Eric Snow in branch '3.3': [issue19152] Revert 832579dbafd6. http://hg.python.org/cpython/rev/7ed717bd5faa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 23:21:58 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 03 Oct 2013 21:21:58 +0000 Subject: [issue19152] ExtensionFileLoader missing get_filename() In-Reply-To: <1380783695.34.0.941035195145.issue19152@psf.upfronthosting.co.za> Message-ID: <1380835318.65.0.970458361607.issue19152@psf.upfronthosting.co.za> Eric Snow added the comment: Thanks for noticing that, Brett. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 23:50:08 2013 From: report at bugs.python.org (Berker Peksag) Date: Thu, 03 Oct 2013 21:50:08 +0000 Subject: [issue19152] ExtensionFileLoader missing get_filename() In-Reply-To: <1380783695.34.0.941035195145.issue19152@psf.upfronthosting.co.za> Message-ID: <1380837008.16.0.201963459497.issue19152@psf.upfronthosting.co.za> Berker Peksag added the comment: It would be good to add a versionadded(or versionchanged) tag. ---------- nosy: +berker.peksag versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 00:00:35 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 03 Oct 2013 22:00:35 +0000 Subject: [issue19146] Improvements to traceback module In-Reply-To: <1380733381.79.0.0175162036016.issue19146@psf.upfronthosting.co.za> Message-ID: <1380837635.74.0.232350694004.issue19146@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > And adding __slots__ to a namedtuple subclass doesn't work. Are you sure? I do it all the time. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 00:08:19 2013 From: report at bugs.python.org (CliffM) Date: Thu, 03 Oct 2013 22:08:19 +0000 Subject: [issue19156] Enum helper functions test-coverage Message-ID: <1380838099.92.0.195815500358.issue19156@psf.upfronthosting.co.za> New submission from CliffM: Added some tests for the _is_sunder and _is_dunder helper functions in the enum module. ---------- components: Tests files: enum.patch keywords: patch messages: 198923 nosy: CliffM priority: normal severity: normal status: open title: Enum helper functions test-coverage type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file31955/enum.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 00:12:33 2013 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 Oct 2013 22:12:33 +0000 Subject: [issue19146] Improvements to traceback module In-Reply-To: <1380733381.79.0.0175162036016.issue19146@psf.upfronthosting.co.za> Message-ID: <1380838353.04.0.844451567844.issue19146@psf.upfronthosting.co.za> Guido van Rossum added the comment: Well this is what I get: $ python3 Python 3.4.0a1+ (default:41de6f0e62fd+, Aug 27 2013, 18:44:07) [GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from collections import namedtuple from collections import namedtuple >>> A = namedtuple('A', 'foo bar') A = namedtuple('A', 'foo bar') >>> class B(A): class B(A): ... __slots__ = ['baz'] __slots__ = ['baz'] ... Traceback (most recent call last): File "", line 1, in TypeError: nonempty __slots__ not supported for subtype of 'A' >>> When I try to set __slots__ on an existing namedtuple it doesn't complain, but it doesn't work either: >>> A.__slots__ = ['xxx'] >>> a.xxx = 1 Traceback (most recent call last): File "", line 1, in AttributeError: 'A' object has no attribute 'xxx' >>> What am I doing wrong? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 00:13:21 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 03 Oct 2013 22:13:21 +0000 Subject: [issue19146] Improvements to traceback module In-Reply-To: <1380838353.04.0.844451567844.issue19146@psf.upfronthosting.co.za> Message-ID: <1380838397.2507.3.camel@fsol> Antoine Pitrou added the comment: > Well this is what I get: > > $ python3 > Python 3.4.0a1+ (default:41de6f0e62fd+, Aug 27 2013, 18:44:07) > [GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> from collections import namedtuple > from collections import namedtuple > >>> A = namedtuple('A', 'foo bar') > A = namedtuple('A', 'foo bar') > >>> class B(A): > class B(A): > ... __slots__ = ['baz'] > __slots__ = ['baz'] > ... > > Traceback (most recent call last): > File "", line 1, in > TypeError: nonempty __slots__ not supported for subtype of 'A' Ah, ok, you're right. I only use empty __slots__ :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 00:26:43 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 03 Oct 2013 22:26:43 +0000 Subject: [issue19152] ExtensionFileLoader missing get_filename() In-Reply-To: <1380783695.34.0.941035195145.issue19152@psf.upfronthosting.co.za> Message-ID: <1380839203.87.0.322085084744.issue19152@psf.upfronthosting.co.za> Eric Snow added the comment: Good point. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 00:51:31 2013 From: report at bugs.python.org (Michiel) Date: Thu, 03 Oct 2013 22:51:31 +0000 Subject: [issue19157] ipaddress.IPv6Network.hosts function omits network and broadcast addresses Message-ID: <1380840691.26.0.505062253334.issue19157@psf.upfronthosting.co.za> New submission from Michiel: (See also: http://stackoverflow.com/q/19159168/1298153. This is my first bug submission) Contrary to IPv4, IPv6 does not have a concept of network and broadcast addresses. It looks like the same code is used to generate the hosts for both IPv4 and IPv6, resulting in the network and broadcast addresses being omitted in IPv6, even though these are valid IPv6 addresses, albeit they may have a special meaning. Repro: $ python3 Python 3.3.2 (default, Sep 6 2013, 09:30:10) [GCC 4.8.1 20130725 (prerelease)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ipaddress >>> print("\n".join([str(x) for x in ipaddress.ip_network("2001:0db8::/120").hosts()])) 2001:db8::1 2001:db8::2 ... 2001:db8::fe >>> >>> hex(int(ipaddress.ip_address('2001:db8::fe'))) '0x20010db80000000000000000000000fe' The v4 docs state, that the hosts() function... "Returns an iterator over the usable hosts in the network. The usable hosts are all the IP addresses that belong to the network, except the network address itself and the network broadcast address." Assuming hosts excludes routers, this should probably return a generator/an iterator covering all addresses in the network, apart from the very first one (all 0's after the prefix), since this is typically the subnet-router anycast address (http://tools.ietf.org/html/rfc4291#section-2.6.1). While the top range (including the currently omitted prefix + "all 1's" address) contains reserved anycast addresses (http://tools.ietf.org/html/rfc2526), I'm not sure whether excluding them is a great idea, as in the future some of these may become valid (anycast) host addresses. Backwards compatibility considerations: The proposed fix would add one extra address to the ones already returned. I think this is less likely to break code, than, say, removing all the reserved anycast addresses. Implementation options: 1. override _BaseNetwork hosts() implementation in IPv6Network 2. add an is_host_address(ip_address) method, or something along those lines, to IPv4 and IPv6Address classes, and change the hosts() function to only return addresses for which is_host_address is True. This function might be generally useful, but the implementation is likely to be slower than 1. 3. use address_exclude perhaps.. I'm sure there are many other ways to implement the fix, but I've attached a "naive" diff. I'm not sure if there's a better way to implement it that doesn't involve copying code from hosts()/__iter__ and slightly tweaking it. With 1: >>> print("\n".join([str(x) for x in ipaddress.ip_network("2001:0db8::/124").hosts()])) 2001:db8::1 2001:db8::2 2001:db8::3 2001:db8::4 2001:db8::5 2001:db8::6 2001:db8::7 2001:db8::8 2001:db8::9 2001:db8::a 2001:db8::b 2001:db8::c 2001:db8::d 2001:db8::e 2001:db8::f ---------- components: Library (Lib) files: ipaddress_ipv6_hosts.diff keywords: patch messages: 198927 nosy: m01 priority: normal severity: normal status: open title: ipaddress.IPv6Network.hosts function omits network and broadcast addresses type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file31956/ipaddress_ipv6_hosts.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 02:00:16 2013 From: report at bugs.python.org (Tim Peters) Date: Fri, 04 Oct 2013 00:00:16 +0000 Subject: [issue19158] BoundedSemaphore.release() subject to races Message-ID: <1380844816.11.0.829919053917.issue19158@psf.upfronthosting.co.za> New submission from Tim Peters: I'm sure this flaw exists on more than just the current default branch, but didn't check. BoundedSemaphore.release() doesn't quite do what it thinks it's doing. By eyeball, the code obviously suffers from a small timing hole: multiple threads releasing at the same time can all see "self._value >= self._initial_value" as false before any of them actually releases the semaphore. So the value of ._value can become arbitrarily higher than ._initial_value. This is hard to provoke. The attached patch adds a TESTWAIT Event to BoundedSemaphore so that the new file (unbounded.py) can demonstrate the race reliably. The patch doesn't fix anything - it's just a way to demonstrate the problem. At the end, unbounded.py prints bs._value is 2 That should be "impossible" for a BoundedSemaphore(1). ---------- components: Library (Lib) files: sema messages: 198928 nosy: tim.peters priority: normal severity: normal stage: needs patch status: open title: BoundedSemaphore.release() subject to races type: behavior versions: Python 3.5 Added file: http://bugs.python.org/file31957/sema _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 02:57:01 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 04 Oct 2013 00:57:01 +0000 Subject: [issue19159] 2to3 incorrectly converts two parameter unicode() constructor to str() Message-ID: <1380848221.34.0.113318109219.issue19159@psf.upfronthosting.co.za> New submission from Gregory P. Smith: >From a conversion through 2to3: < default_value=unicode("", "utf-8"), --- > default_value=str("", "utf-8"), The Python 2 unicode constructor takes an optional second parameter which is the codec to use to convert when the first parameter is non-unicode. 2to3 should check the parameters on uses of unicode() and if there is a second parameter and the first is explicitly b"" bytes it should turn it into default_value=b"whatever".decode(second_param) if the first is valid utf-8 and the second is "utf-8" (or its other spellings) it should leave it as is and simply become: default_value="thing passed to unicode() that was already utf-8" ---------- messages: 198929 nosy: gregory.p.smith priority: normal severity: normal stage: needs patch status: open title: 2to3 incorrectly converts two parameter unicode() constructor to str() type: behavior versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 03:36:13 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 04 Oct 2013 01:36:13 +0000 Subject: [issue19160] Inconsistent size for GIL release in hashlib Message-ID: <1380850573.19.0.333542059882.issue19160@psf.upfronthosting.co.za> New submission from Jes?s Cea Avi?n: In http://docs.python.org/3.3/library/hashlib.html there is a contradiction: """ For better multithreading performance, the Python GIL is released for strings of more than 2047 bytes at object creation or on update. [...] Changed in version 3.1: The Python GIL is released to allow other threads to run while hash updates on data larger than 2048 bytes is taking place when using hash algorithms supplied by OpenSSL. """ So is it 2047 or 2048? :) ---------- assignee: docs at python components: Documentation keywords: easy messages: 198930 nosy: docs at python, jcea priority: normal severity: normal status: open title: Inconsistent size for GIL release in hashlib versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 03:57:46 2013 From: report at bugs.python.org (Berker Peksag) Date: Fri, 04 Oct 2013 01:57:46 +0000 Subject: [issue19160] Inconsistent size for GIL release in hashlib In-Reply-To: <1380850573.19.0.333542059882.issue19160@psf.upfronthosting.co.za> Message-ID: <1380851866.7.0.712828610562.issue19160@psf.upfronthosting.co.za> Berker Peksag added the comment: It looks like it is 2048: http://hg.python.org/cpython/rev/f9f5d9047a05/ See also issue 4751. ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 04:12:49 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 04 Oct 2013 02:12:49 +0000 Subject: [issue19160] Inconsistent size for GIL release in hashlib In-Reply-To: <1380850573.19.0.333542059882.issue19160@psf.upfronthosting.co.za> Message-ID: <1380852769.14.0.547778102851.issue19160@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: For extra safety, I just checked the source of 3.4: """ #define HASHLIB_GIL_MINSIZE 2048 [...] if (self->lock == NULL && view.len >= HASHLIB_GIL_MINSIZE) { [...] if (view.len >= HASHLIB_GIL_MINSIZE) { [...] if (len >= HASHLIB_GIL_MINSIZE) { """ So, yes, the GIL is released if len >= 2048 bytes. BTW, in Python 3.x hashes can't be calculated on strings, but bytes. I take care of this. Commit in 5 minutes. ---------- assignee: docs at python -> jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 04:16:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 04 Oct 2013 02:16:06 +0000 Subject: [issue19160] Inconsistent size for GIL release in hashlib In-Reply-To: <1380850573.19.0.333542059882.issue19160@psf.upfronthosting.co.za> Message-ID: <3crZSk0WTFz7LjW@mail.python.org> Roundup Robot added the comment: New changeset 310c26df3234 by Jesus Cea in branch '3.3': Close #19160: Inconsistent size for GIL release in hashlib http://hg.python.org/cpython/rev/310c26df3234 New changeset 9503097ce1b7 by Jesus Cea in branch 'default': MERGE: Close #19160: Inconsistent size for GIL release in hashlib http://hg.python.org/cpython/rev/9503097ce1b7 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 04:21:22 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 04 Oct 2013 02:21:22 +0000 Subject: [issue19160] Inconsistent size for GIL release in hashlib In-Reply-To: <1380850573.19.0.333542059882.issue19160@psf.upfronthosting.co.za> Message-ID: <3crZZp2DzNz7LjS@mail.python.org> Roundup Robot added the comment: New changeset bfebfadfc4aa by Jesus Cea in branch '3.3': Close #19160: Inconsistent size for GIL release in hashlib http://hg.python.org/cpython/rev/bfebfadfc4aa New changeset 989ea05b2500 by Jesus Cea in branch 'default': MERGE: Close #19160: Inconsistent size for GIL release in hashlib http://hg.python.org/cpython/rev/989ea05b2500 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 04:23:31 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 04 Oct 2013 02:23:31 +0000 Subject: [issue18129] Fatal Python error: Cannot recover from stack overflow. In-Reply-To: <1370297932.54.0.350896209872.issue18129@psf.upfronthosting.co.za> Message-ID: <1380853411.34.0.501342695455.issue18129@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 05:56:36 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 04 Oct 2013 03:56:36 +0000 Subject: [issue18129] Fatal Python error: Cannot recover from stack overflow. In-Reply-To: <1370297932.54.0.350896209872.issue18129@psf.upfronthosting.co.za> Message-ID: <1380858996.4.0.81218835904.issue18129@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> duplicate status: open -> closed superseder: -> Interpreter aborts when chaining an infinite number of exceptions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 09:36:47 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Oct 2013 07:36:47 +0000 Subject: [issue19087] bytearray front-slicing not optimized In-Reply-To: <1380117830.08.0.43327617783.issue19087@psf.upfronthosting.co.za> Message-ID: <1380872207.89.0.395888225492.issue19087@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't see much sense in differences between bytea_slice2.patch and bytea_slice3.patch, because bytea_slice3.patch is not smaller and simpler than bytea_slice2.patch. I meant that you can continue use self->ob_bytes instead of PyByteArray_AS_STRING(self) if self->ob_bytes points not to the start of physical buffer, but to the start of logical byte array. *This* will simplify the patch a lot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 09:49:28 2013 From: report at bugs.python.org (Ethan Furman) Date: Fri, 04 Oct 2013 07:49:28 +0000 Subject: [issue19156] Enum helper functions test-coverage In-Reply-To: <1380838099.92.0.195815500358.issue19156@psf.upfronthosting.co.za> Message-ID: <1380872968.7.0.444509833897.issue19156@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- assignee: -> ethan.furman nosy: +ethan.furman stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 10:07:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Oct 2013 08:07:58 +0000 Subject: [issue19159] 2to3 incorrectly converts two parameter unicode() constructor to str() In-Reply-To: <1380848221.34.0.113318109219.issue19159@psf.upfronthosting.co.za> Message-ID: <1380874078.92.0.61810369374.issue19159@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is not a bug, str accepts the encoding argument in Python 3. And in contrast to the decode method it works with arbitrary byte-like objects (i.e. array.array). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 10:29:48 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 04 Oct 2013 08:29:48 +0000 Subject: [issue19087] bytearray front-slicing not optimized In-Reply-To: <1380872207.89.0.395888225492.issue19087@psf.upfronthosting.co.za> Message-ID: <954141742.47968857.1380875381779.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > I meant that you can continue use self->ob_bytes instead of > PyByteArray_AS_STRING(self) if self->ob_bytes points not to the > start of physical buffer, but to the start of logical byte array. > *This* will simplify the patch a lot. It will make the diff smaller but it will not "simplify" the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 11:24:19 2013 From: report at bugs.python.org (Piotr Dobrogost) Date: Fri, 04 Oct 2013 09:24:19 +0000 Subject: [issue10049] Add a "no-op" (null) context manager to contextlib In-Reply-To: <1286536426.03.0.247784217987.issue10049@psf.upfronthosting.co.za> Message-ID: <1380878659.01.0.985815213851.issue10049@psf.upfronthosting.co.za> Changes by Piotr Dobrogost : ---------- nosy: +piotr.dobrogost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 11:31:35 2013 From: report at bugs.python.org (Piotr Dobrogost) Date: Fri, 04 Oct 2013 09:31:35 +0000 Subject: [issue1673203] add identity function Message-ID: <1380879095.05.0.911323726388.issue1673203@psf.upfronthosting.co.za> Changes by Piotr Dobrogost : ---------- nosy: +piotr.dobrogost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 11:34:57 2013 From: report at bugs.python.org (Piotr Dobrogost) Date: Fri, 04 Oct 2013 09:34:57 +0000 Subject: [issue11011] More functools functions In-Reply-To: <1295994742.19.0.341586360497.issue11011@psf.upfronthosting.co.za> Message-ID: <1380879297.25.0.233096359568.issue11011@psf.upfronthosting.co.za> Changes by Piotr Dobrogost : ---------- nosy: +piotr.dobrogost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 12:07:23 2013 From: report at bugs.python.org (Adam Davison) Date: Fri, 04 Oct 2013 10:07:23 +0000 Subject: [issue19161] collections Counter handles nan strangely Message-ID: <1380881243.0.0.773040970534.issue19161@psf.upfronthosting.co.za> New submission from Adam Davison: If you pass an array containing nan to collections.Counter, rather than counting the number of 'nan's it outputs "'nan': 1" n times into the dictionary. I appreciate using this on an array of floats is a bit of an unusual case but I don't think this is the expected behaviour based on the documentation. To reproduce, try e.g.: a = [1, 1, 1, 2, 'nan', 'nan', 'nan'] collections.Counter(map(float, a)) Based on the documentation I expected to see: {1.0: 3, 2.0: 1, nan: 3} But it actually returns: {1.0: 3, 2.0: 1, nan: 1, nan: 1, nan: 1} Presumably this relates to the fact that nan != nan. I'm not 100% sure if this is a bug or maybe just something that should be mentioned in the documentation... Certainly it's not what I wanted it to do :) Thanks, Adam ---------- components: Library (Lib) messages: 198938 nosy: Adam.Davison priority: normal severity: normal status: open title: collections Counter handles nan strangely type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 12:51:01 2013 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 04 Oct 2013 10:51:01 +0000 Subject: [issue19161] collections Counter handles nan strangely In-Reply-To: <1380881243.0.0.773040970534.issue19161@psf.upfronthosting.co.za> Message-ID: <1380883861.7.0.198412521936.issue19161@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Presumably this relates to the fact that nan != nan. Yep. What you're seeing is pretty much expected behaviour, and it matches how NaNs behave with respect to containment in other Python contexts: >>> x = float('nan') >>> y = float('nan') >>> s = {x} >>> x in s True >>> y in s False There's a much-discussed compromise between object model sanity and respect for IEEE 754 here. You can find the discussions on the mailing lists, but the summary is that this isn't going to change in a hurry. One way you can work around this is to make sure you only have single NaN object (possibly referenced multiple times) in your list. Then you get the behaviour that you're looking for: >>> nan = float('nan') >>> a = [1, 1, 2, nan, nan, nan] >>> collections.Counter(a) Counter({nan: 3, 1: 2, 2: 1}) By the way, when you say 'array of floats', do you mean a NumPy ndarray, a standard library array.array object, or a plain Python list? The example you show is a list containing a mixture of ints and strings. I suggest closing this as 'wont fix'. Raymond? ---------- nosy: +mark.dickinson, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 12:58:12 2013 From: report at bugs.python.org (Adam Davison) Date: Fri, 04 Oct 2013 10:58:12 +0000 Subject: [issue19161] collections Counter handles nan strangely In-Reply-To: <1380881243.0.0.773040970534.issue19161@psf.upfronthosting.co.za> Message-ID: <1380884292.64.0.407161426567.issue19161@psf.upfronthosting.co.za> Adam Davison added the comment: Thanks for the quick response. I'm really using a pandas Series, which is effectively a numpy array behind the scenes as far as I understand, the example I pasted was just to illustrate the behaviour. So the nans are being produced elsewhere, I don't really have control over that step. It seems like perhaps collections.Counter should handle nans as a special case. But I can appreciate the counter-arguments too. Thanks, Adam ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 13:00:07 2013 From: report at bugs.python.org (Filip Zyzniewski) Date: Fri, 04 Oct 2013 11:00:07 +0000 Subject: [issue19162] datetime.datetime.min.strftime('%Y') not working Message-ID: <1380884407.41.0.543045955431.issue19162@psf.upfronthosting.co.za> New submission from Filip Zyzniewski: The datetime class provides a min datetime object which is not formattable: on Python 2: $ python Python 2.7.3 (default, Apr 10 2013, 05:13:16) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import datetime >>> datetime.datetime.min.strftime('%Y') Traceback (most recent call last): File "", line 1, in ValueError: year=1 is before 1900; the datetime strftime() methods require year >= 1900 >>> and on Python 3: $ python3 Python 3.2.3 (default, Apr 10 2013, 05:07:54) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import datetime >>> datetime.datetime.min.strftime('%Y') Traceback (most recent call last): File "", line 1, in ValueError: year=1 is before 1000; the datetime strftime() methods require year >= 1000 >>> It seems to me that either datetime.datetime.min.year should be increased to 1900/1000 or strftime should be able to format year=1 - it is strange that the API doesn't support its own constants. ---------- components: Library (Lib) messages: 198941 nosy: filip.zyzniewski priority: normal severity: normal status: open title: datetime.datetime.min.strftime('%Y') not working type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 13:09:58 2013 From: report at bugs.python.org (hiroaki itoh) Date: Fri, 04 Oct 2013 11:09:58 +0000 Subject: [issue19163] PyString_Format with dict Message-ID: <1380884998.67.0.733002313929.issue19163@psf.upfronthosting.co.za> New submission from hiroaki itoh: http://docs.python.org/2.7/c-api/string.html#PyString_Format The documents says `The args argument must be a tuple.', But if format is like '%(key)s', PyString_Format claims args must be mapping protocol. (At least 2.7.3.) ---------- assignee: docs at python components: Documentation messages: 198942 nosy: docs at python, xwhhsprings priority: normal severity: normal status: open title: PyString_Format with dict type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 13:18:10 2013 From: report at bugs.python.org (Marco Buccini) Date: Fri, 04 Oct 2013 11:18:10 +0000 Subject: [issue19164] Update uuid.UUID TypeError exception: integer should not be an argument. Message-ID: <1380885490.13.0.480584034262.issue19164@psf.upfronthosting.co.za> New submission from Marco Buccini: When you try to use uuid.UUID() without arguments you get a TypeError exception saying that you can actually use an integer (while you cannot). Python 2.6.8 (default, Apr 26 2013, 16:24:53) [GCC 4.6.3] on linux2 >>> uuid.UUID() Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.6/uuid.py", line 129, in __init__ raise TypeError('need one of hex, bytes, bytes_le, fields, or int') TypeError: need one of hex, bytes, bytes_le, fields, or int >>> uuid.UUID(uuid.uuid4().int) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.6/uuid.py", line 131, in __init__ hex = hex.replace('urn:', '').replace('uuid:', '') AttributeError: 'long' object has no attribute 'replace' So, let's check with an integer - maybe an int has 'replace'. >>> uuid.UUID(1231231) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.6/uuid.py", line 131, in __init__ hex = hex.replace('urn:', '').replace('uuid:', '') AttributeError: 'int' object has no attribute 'replace' No, it doesn't. Anyway, with a propery hex value, it works (of course!). >>> uuid.UUID(uuid.uuid4().hex) UUID('89b1283d-c32e-4b8a-a9e3-a699445fdd4d') ---------- assignee: docs at python components: Documentation messages: 198943 nosy: docs at python, makronized priority: normal severity: normal status: open title: Update uuid.UUID TypeError exception: integer should not be an argument. type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 13:52:02 2013 From: report at bugs.python.org (tomasz.zaleski) Date: Fri, 04 Oct 2013 11:52:02 +0000 Subject: [issue19162] datetime.datetime.min.strftime('%Y') not working In-Reply-To: <1380884407.41.0.543045955431.issue19162@psf.upfronthosting.co.za> Message-ID: <1380887522.54.0.10872055906.issue19162@psf.upfronthosting.co.za> tomasz.zaleski added the comment: works correctly on python3.3: Python 3.3.2 (default, Oct 4 2013, 12:21:07) [GCC 4.2.1 20070831 patched [FreeBSD]] on freebsd9 Type "help", "copyright", "credits" or "license" for more information. >>> import datetime >>> datetime.datetime.min.strftime('%Y') '0001' issue on 2.7: Python 2.7.5 (default, Sep 17 2013, 12:11:31) [GCC 4.2.1 20070831 patched [FreeBSD]] on freebsd9 Type "help", "copyright", "credits" or "license" for more information. >>> import datetime >>> datetime.datetime.min.strftime('%Y') Traceback (most recent call last): File "", line 1, in ValueError: year=1 is before 1900; the datetime strftime() methods require year >= 1900 ---------- nosy: +krzaq _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 14:37:17 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 04 Oct 2013 12:37:17 +0000 Subject: [issue19153] Embedding into a shared library fails again In-Reply-To: <1380818213.13.0.0445211197564.issue19153@psf.upfronthosting.co.za> Message-ID: <1380890237.25.0.842286903086.issue19153@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > No custom builds. Every package from ubuntu repository. Psycopg2 installed by pip You may have to rebuild packages using the custom Python, not the system Python, since the linker options have to be different (especially the "shared" part: Ubuntu's Python is a static build, not a shared library build). Or perhaps you can dlopen the CPython shared library with the RTLD_GLOBAL flag. I don't know. I don't know if this is something that we can alleviate in Python itself. ---------- nosy: +doko, pitrou, sandro.tosi versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 15:01:10 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Fri, 04 Oct 2013 13:01:10 +0000 Subject: [issue19164] Update uuid.UUID TypeError exception: integer should not be an argument. In-Reply-To: <1380885490.13.0.480584034262.issue19164@psf.upfronthosting.co.za> Message-ID: <1380891670.1.0.384800629586.issue19164@psf.upfronthosting.co.za> Vajrasky Kok added the comment: The exception message is correct. You can give an integer argument. But you have to use keyword argument. >>> uuid.UUID(int=uuid.uuid4().int) UUID('62ad61e5-b492-4f01-81e6-790049051c4f') >From the documentation: __init__(self, hex=None, bytes=None, bytes_le=None, fields=None, int=None, v ersion=None) | Create a UUID from either a string of 32 hexadecimal digits, | a string of 16 bytes as the 'bytes' argument, a string of 16 bytes | in little-endian order as the 'bytes_le' argument, a tuple of six | integers (32-bit time_low, 16-bit time_mid, 16-bit time_hi_version, | 8-bit clock_seq_hi_variant, 8-bit clock_seq_low, 48-bit node) as | the 'fields' argument, or a single 128-bit integer as the 'int' | argument. When a string of hex digits is given, curly braces, | hyphens, and a URN prefix are all optional. For example, these | expressions all yield the same UUID: ---------- nosy: +vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 15:19:41 2013 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 04 Oct 2013 13:19:41 +0000 Subject: [issue19161] collections Counter handles nan strangely In-Reply-To: <1380881243.0.0.773040970534.issue19161@psf.upfronthosting.co.za> Message-ID: <1380892781.12.0.380406592433.issue19161@psf.upfronthosting.co.za> Mark Dickinson added the comment: > perhaps collections.Counter should handle nans as a special case I don't think that would be a good idea: I'd rather that collections.Counter didn't special case NaNs in any way, but instead treated NaNs following the same (admittedly somewhat awkward) rules that all the other Python collections do---namely, for NaNs, containment effectively works by object identity. > I'm really using a pandas Series Okay, that makes sense. It's a bit unfortunate that NumPy creates a new NaN object every time you read a NaN value out of an array, so that you get e.g., >>> from numpy import array, nan, isnan >>> import numpy as np >>> my_list = [1.2, 2.3, np.nan, np.nan] >>> my_list[2] is my_list[3] True >>> my_array = np.array(my_list) >>> my_array[2] is my_array[3] False Or even: >>> my_array[2] is my_array[2] False I guess you're stuck with using Pandas functionality like `dropna` and `isnull` to deal with missing and non-missing values separately. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 15:36:30 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Fri, 04 Oct 2013 13:36:30 +0000 Subject: [issue19158] BoundedSemaphore.release() subject to races In-Reply-To: <1380844816.11.0.829919053917.issue19158@psf.upfronthosting.co.za> Message-ID: <1380893790.22.0.0428540921101.issue19158@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Is BoundedSemaphore really supposed to be "robust" in the face of too many releases, or does it just provide a sanity check? I think that releasing a bounded semaphore too many times is a programmer error, and the exception is just a debugging aid for the programmer. Raising an exception 99% of the time should be sufficient for that purpose. ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 15:51:16 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 04 Oct 2013 13:51:16 +0000 Subject: [issue19155] Display stack info with color in pdb (the "w" command) In-Reply-To: <1380830438.89.0.93033218412.issue19155@psf.upfronthosting.co.za> Message-ID: <1380894676.92.0.312481150849.issue19155@psf.upfronthosting.co.za> R. David Murray added the comment: I think we are unlikely to do this, as pdb is a very simple text interface. I'm sure a patch would be considered if one was offered, but the increase in complexity of the codebase would need to be minimal for it to be accepted, and I suspect the feature would need to be off by default. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 15:54:33 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 04 Oct 2013 13:54:33 +0000 Subject: [issue19155] Display stack info with color in pdb (the "w" command) In-Reply-To: <1380830438.89.0.93033218412.issue19155@psf.upfronthosting.co.za> Message-ID: <1380894873.43.0.312156145971.issue19155@psf.upfronthosting.co.za> Ezio Melotti added the comment: Agreed with David. You can use https://bitbucket.org/antocuni/pdb/src instead. ---------- nosy: +ezio.melotti resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 16:02:48 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 04 Oct 2013 14:02:48 +0000 Subject: [issue19162] datetime.datetime.min.strftime('%Y') not working In-Reply-To: <1380884407.41.0.543045955431.issue19162@psf.upfronthosting.co.za> Message-ID: <1380895368.86.0.680558675539.issue19162@psf.upfronthosting.co.za> R. David Murray added the comment: Indeed, this is already fixed. This issue is a duplicate of issue 1777412. The bug will not be fixed in earlier versions for the reasons discussed in that issue. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> datetime.strftime dislikes years before 1900 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 16:12:21 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 04 Oct 2013 14:12:21 +0000 Subject: [issue14455] plistlib unable to read json and binary plist files In-Reply-To: <1333144578.81.0.343123708942.issue14455@psf.upfronthosting.co.za> Message-ID: <1380895941.28.0.117193529464.issue14455@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'd really like to include this patch in 3.4, but haven't managed to do any opensource work in the previous period and don't know when I'll be able to actually commit this (and more importantly, be available when issues crop up) :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 16:15:30 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 04 Oct 2013 14:15:30 +0000 Subject: [issue16803] Make test_importlib run tests under both _frozen_importlib and importlib._bootstrap In-Reply-To: <1356718069.62.0.143946538677.issue16803@psf.upfronthosting.co.za> Message-ID: <1380896130.13.0.448029297181.issue16803@psf.upfronthosting.co.za> Brett Cannon added the comment: It looks like as long as you block _frozen_importlib and do a fresh import of importlib you can make sure to use the source version of importlib._bootstrap instead of _frozen_importlib. >>> from test.support import import_fresh_module >>> mod = import_fresh_module('importlib.abc', fresh=('importlib',), blocked=('_frozen_importlib',)) >>> mod >>> mod._bootstrap >>> mod._frozen_importlib >>> import importlib >>> importlib._bootstrap >>> mod2 = import_fresh_module('importlib', blocked=('_frozen_importlib',)) >>> mod2 >>> mod2._bootstrap ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 16:15:54 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 04 Oct 2013 14:15:54 +0000 Subject: [issue16803] Make test_import & test_importlib run tests under both _frozen_importlib and importlib._bootstrap In-Reply-To: <1356718069.62.0.143946538677.issue16803@psf.upfronthosting.co.za> Message-ID: <1380896154.89.0.878985842732.issue16803@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- title: Make test_importlib run tests under both _frozen_importlib and importlib._bootstrap -> Make test_import & test_importlib run tests under both _frozen_importlib and importlib._bootstrap _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 16:55:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 04 Oct 2013 14:55:27 +0000 Subject: [issue19163] PyString_Format with dict In-Reply-To: <1380884998.67.0.733002313929.issue19163@psf.upfronthosting.co.za> Message-ID: <3crvJt3GMxz7LjY@mail.python.org> Roundup Robot added the comment: New changeset 405245885569 by Benjamin Peterson in branch '2.7': dict is also allowed (closes #19163) http://hg.python.org/cpython/rev/405245885569 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 17:12:44 2013 From: report at bugs.python.org (Georg Brandl) Date: Fri, 04 Oct 2013 15:12:44 +0000 Subject: [issue19164] Update uuid.UUID TypeError exception: integer should not be an argument. In-Reply-To: <1380885490.13.0.480584034262.issue19164@psf.upfronthosting.co.za> Message-ID: <1380899564.65.0.945840530165.issue19164@psf.upfronthosting.co.za> Georg Brandl added the comment: Yeah, the first message should probably say "one of the hex, bytes, bytes_le, fields, or int arguments must be given" ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 17:39:10 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 04 Oct 2013 15:39:10 +0000 Subject: [issue18716] Deprecate the formatter module In-Reply-To: <1376334968.93.0.863346638514.issue18716@psf.upfronthosting.co.za> Message-ID: <3crwHK3n21z7Lkf@mail.python.org> Roundup Robot added the comment: New changeset 04ff1cc40d62 by Brett Cannon in branch 'default': Issue #18716: Deprecate the formatter module http://hg.python.org/cpython/rev/04ff1cc40d62 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 17:39:45 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 04 Oct 2013 15:39:45 +0000 Subject: [issue18716] Deprecate the formatter module In-Reply-To: <1376334968.93.0.863346638514.issue18716@psf.upfronthosting.co.za> Message-ID: <1380901185.3.0.993959767535.issue18716@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 17:40:15 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 04 Oct 2013 15:40:15 +0000 Subject: [issue19165] Change formatter warning to DeprecationWarning in 3.5 Message-ID: <1380901215.35.0.522211470055.issue19165@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: brett.cannon components: Library (Lib) nosy: brett.cannon priority: normal severity: normal status: open title: Change formatter warning to DeprecationWarning in 3.5 versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 17:53:20 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Fri, 04 Oct 2013 15:53:20 +0000 Subject: [issue19166] Unusued variable in test_keys in Lib/test/test_dict.py Message-ID: <1380902000.81.0.140295441911.issue19166@psf.upfronthosting.co.za> New submission from Vajrasky Kok: This is the test. def test_keys(self): d = {} self.assertEqual(set(d.keys()), set()) d = {'a': 1, 'b': 2} k = d.keys() self.assertIn('a', d) self.assertIn('b', d) self.assertRaises(TypeError, d.keys, None) self.assertEqual(repr(dict(a=1).keys()), "dict_keys(['a'])") As you can see, the variable k is never used. Attached the patch to give purpose to variable k. ---------- components: Tests files: fix_test_dict_unused_variable.patch keywords: patch messages: 198957 nosy: vajrasky priority: normal severity: normal status: open title: Unusued variable in test_keys in Lib/test/test_dict.py versions: Python 3.4 Added file: http://bugs.python.org/file31958/fix_test_dict_unused_variable.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 18:14:10 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 04 Oct 2013 16:14:10 +0000 Subject: [issue16803] Make test_import & test_importlib run tests under both _frozen_importlib and importlib._bootstrap In-Reply-To: <1356718069.62.0.143946538677.issue16803@psf.upfronthosting.co.za> Message-ID: <1380903250.11.0.242147845088.issue16803@psf.upfronthosting.co.za> Brett Cannon added the comment: Turns out this isn't as clean-cut as simply using test.support.import_fresh_module() as you end up with different instances of importlib._bootstrap which kills any possible subclass checks, etc. between e.g. importlib.abc and importlib.machinery as the source versions will have different instances of importlib._bootstrap. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 18:56:46 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 04 Oct 2013 16:56:46 +0000 Subject: [issue6028] Interpreter aborts when chaining an infinite number of exceptions In-Reply-To: <1242376180.99.0.271687505005.issue6028@psf.upfronthosting.co.za> Message-ID: <1380905806.67.0.587144100638.issue6028@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 19:29:17 2013 From: report at bugs.python.org (Tim Peters) Date: Fri, 04 Oct 2013 17:29:17 +0000 Subject: [issue19158] BoundedSemaphore.release() subject to races In-Reply-To: <1380844816.11.0.829919053917.issue19158@psf.upfronthosting.co.za> Message-ID: <1380907757.04.0.265944466599.issue19158@psf.upfronthosting.co.za> Tim Peters added the comment: Richard, that's a strange argument ;-) Since, e.g., a BoundedSemaphore(1) is semantically equivalent to a mutex, it's like saying some_mutex.release() usually raises an exception if the mutex isn't held at the time - but maybe it won't. If the docs _say_ it's not reliable, fair enough. But they don't say that. When a thread gimmick is _intended_ to be probabilistic, the docs say so (e.g., Queue.qsize()). Probably would have been better if a bounded=False optional argument to Semaphore.__init__() had been added, rather than creating a new BoundedSemaphore class. But, as is, it could easily be made reliable: 1. Change Semaphore's condition variable to use an RLock (instead of the current Lock). 2. Stuff the body of BoundedSemaphore.release() in a `with self._cond:` block. Curiously, there doesn't appear to be a test that BoundedSemaphore.release ever raises ValueError. So I'll readily agree that nobody ever took this seriously ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 20:47:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 04 Oct 2013 18:47:27 +0000 Subject: [issue16803] Make test_import & test_importlib run tests under both _frozen_importlib and importlib._bootstrap In-Reply-To: <1356718069.62.0.143946538677.issue16803@psf.upfronthosting.co.za> Message-ID: <3cs0SZ6C1nz7LjS@mail.python.org> Roundup Robot added the comment: New changeset f0416b2b5654 by Brett Cannon in branch 'default': Issue #16803: Run test.test_importlib.test_abc under both http://hg.python.org/cpython/rev/f0416b2b5654 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 21:13:51 2013 From: report at bugs.python.org (Rinat) Date: Fri, 04 Oct 2013 19:13:51 +0000 Subject: [issue19153] Embedding into a shared library fails again In-Reply-To: <1380818213.13.0.0445211197564.issue19153@psf.upfronthosting.co.za> Message-ID: <1380914031.18.0.11222548293.issue19153@psf.upfronthosting.co.za> Rinat added the comment: > Or perhaps you can dlopen the CPython shared library with the RTLD_GLOBAL flag. I don't know. Yes, it works. I made it is my shared library before boost block like this { void* handle = dlopen("libpython2.7.so", RTLD_LAZY | RTLD_GLOBAL); // boost wrapper for python call dlclose(handle); } I think if nothing helps, i'll put this code into __attribute__((ctor|dtor)) functions Thanks a lot ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 22:05:41 2013 From: report at bugs.python.org (Phil Connell) Date: Fri, 04 Oct 2013 20:05:41 +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: <1380917141.46.0.286433946393.issue16195@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 22:40:02 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 04 Oct 2013 20:40:02 +0000 Subject: [issue19153] Embedding into a shared library fails again In-Reply-To: <1380818213.13.0.0445211197564.issue19153@psf.upfronthosting.co.za> Message-ID: <1380919202.97.0.992278141108.issue19153@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, making it a documentation issue in case it deserves clarification in the docs. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 22:40:54 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Oct 2013 20:40:54 +0000 Subject: [issue19119] duplicate test name in Lib/test/test_heapq.py In-Reply-To: <1380401602.68.0.29924709136.issue19119@psf.upfronthosting.co.za> Message-ID: <1380919254.77.0.159006150227.issue19119@psf.upfronthosting.co.za> STINNER Victor added the comment: @Xavier de Gaye: Nice, you found many similar issues. How did you find them? Would it be possible to automate the detection of duplicated test names? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 22:53:03 2013 From: report at bugs.python.org (mpb) Date: Fri, 04 Oct 2013 20:53:03 +0000 Subject: [issue19167] sqlite3 cursor.description varies across Linux (3.3.1), Win32 (3.3.2), when selecting from a view. Message-ID: <1380919983.53.0.47531466178.issue19167@psf.upfronthosting.co.za> New submission from mpb: On Win32, when I select from an SQLite view, and enclose the column name in double quotes in the select query, the cursor description (erroneously?) contains the double quotes. On Linux (or on Win32 when selecting from a table rather than a view) the cursor description does not contain the double quotes. I expect the Linux behavior, not the Win32 behavior. The following code demonstrates the problem. ---- import sqlite3, sys print (sys.platform) print (sys.version) conn = sqlite3.connect (':memory:') cur = conn.cursor () cur.execute ('create table Foo ( foo_id integer primary key ) ;') cur.execute ('create view Foo_View as select * from Foo ;') cur.execute ('select foo_id from Foo;') print (cur.description[0][0]) cur.execute ('select "foo_id" from Foo;') print (cur.description[0][0]) cur.execute ('select foo_id from Foo_View;') print (cur.description[0][0]) cur.execute ('select "foo_id" from Foo_View;') print (cur.description[0][0]) ---- Sample output on Linux and Win32. ---- linux 3.3.1 (default, Apr 17 2013, 22:32:14) [GCC 4.7.3] foo_id foo_id foo_id foo_id ---- win32 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)] foo_id foo_id foo_id "foo_id" ---- Above, please note the (erroneous?) double quotes around the final foo_id. ---------- components: Library (Lib) messages: 198964 nosy: mpb priority: normal severity: normal status: open title: sqlite3 cursor.description varies across Linux (3.3.1), Win32 (3.3.2), when selecting from a view. type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 22:54:34 2013 From: report at bugs.python.org (Derek Wilson) Date: Fri, 04 Oct 2013 20:54:34 +0000 Subject: [issue18679] include a codec to handle escaping only control characters but not any others In-Reply-To: <1375910565.85.0.834240880509.issue18679@psf.upfronthosting.co.za> Message-ID: <1380920074.97.0.858138278355.issue18679@psf.upfronthosting.co.za> Derek Wilson added the comment: Any update on this? Just so you can see what my work around is, I'll paste in the code I'm using. The major issue I have with this is that performance doesn't scale to large strings. This is also a bytes-to-bytes or str-to-str encoding, because this is the type of operation that one plans to do with the data one has. Having a full fledged streaming codec to handle this would be very helpful when writing applications that stream tab and newline separated utf-8 data over stdin/stdout. text_types = (str, ) escape_tm = dict((k, repr(chr(k))[1:-1]) for k in range(32)) escape_tm[0] = '\0' escape_tm[7] = '\a' escape_tm[8] = '\b' escape_tm[11] = '\v' escape_tm[12] = '\f' escape_tm[ord('\\')] = '\\\\' def escape_control(s): if isinstance(s, text_types): return s.translate(escape_tm) else: return s.decode('utf-8', 'surrogateescape').translate(escape_tm).encode('utf-8', 'surrogateescape') def unescape_control(s): if isinstance(s, text_types): return s.encode('latin1', 'backslashreplace').decode('unicode_escape') else: return s.decode('utf-8', 'surrogateescape').encode('latin1', 'backslashreplace').decode('unicode_escape').encode('utf-8', 'surrogateescape') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 23:08:39 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 04 Oct 2013 21:08:39 +0000 Subject: [issue19159] 2to3 incorrectly converts two parameter unicode() constructor to str() In-Reply-To: <1380848221.34.0.113318109219.issue19159@psf.upfronthosting.co.za> Message-ID: <1380920919.89.0.913111543332.issue19159@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Correct, my characterization above was wrong (I shouldn't write these up without the interpreter right in front of me). What is wrong with the conversion is: unicode("", "utf-8") in python 2.x should become either str(b"", "utf-8") or, better, just "" in Python 3.x. The better version could be done if the codec and value can be represented in the encoding of the output 3.x source code file as is but that optimization is not critical. In order for str() to take a second arg (the codec) the first cannot be a unicode string already: >>> str("foo", "utf-8") Traceback (most recent call last): File "", line 1, in TypeError: decoding str is not supported ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 23:21:34 2013 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 04 Oct 2013 21:21:34 +0000 Subject: [issue19119] duplicate test name in Lib/test/test_heapq.py In-Reply-To: <1380401602.68.0.29924709136.issue19119@psf.upfronthosting.co.za> Message-ID: <1380921694.75.0.375020435801.issue19119@psf.upfronthosting.co.za> Xavier de Gaye added the comment: It was proposed, in issue 16056, to enhance `make patchcheck` with the detection of duplicate code names. This triggered the creation of issue 16079. The script named duplicate_code_names_2.py, in issue 16079, listed about 20 duplicate names among all the non-nested functions, classes or methods in the whole repository (default branch), mostly duplicated test names. I have entered an issue for each one of these cases, they are listed in issue 16079. Yes, this detection can be automated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 23:36:24 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Oct 2013 21:36:24 +0000 Subject: [issue19159] 2to3 incorrectly converts two parameter unicode() constructor to str() In-Reply-To: <1380848221.34.0.113318109219.issue19159@psf.upfronthosting.co.za> Message-ID: <1380922584.98.0.672895820936.issue19159@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Just add the "b" prefix to literal string argument of unicode() in Python 2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 00:39:34 2013 From: report at bugs.python.org (Alexis Layton) Date: Fri, 04 Oct 2013 22:39:34 +0000 Subject: [issue19168] pprint.pprint(..., compact=True) not implemented Message-ID: <1380926374.45.0.423470167923.issue19168@psf.upfronthosting.co.za> New submission from Alexis Layton: Documentation for 3.4 states that the compact keyword-only argument has been added to 3.4. However: Python 3.4.0a3 (default, Oct 2 2013, 14:05:02) [GCC 4.6.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pprint >>> pprint(3, compact=True) Traceback (most recent call last): File "", line 1, in TypeError: 'module' object is not callable >>> pprint.pprint(3, compact=True) Traceback (most recent call last): File "", line 1, in TypeError: pprint() got an unexpected keyword argument 'compact' >>> ---------- components: Library (Lib) messages: 198969 nosy: AlexisLayton priority: normal severity: normal status: open title: pprint.pprint(..., compact=True) not implemented type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 00:50:49 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 04 Oct 2013 22:50:49 +0000 Subject: [issue18986] Add a case-insensitive case-preserving dict In-Reply-To: <1378725721.97.0.387646378602.issue18986@psf.upfronthosting.co.za> Message-ID: <1380927049.97.0.543436401899.issue18986@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 01:12:20 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 04 Oct 2013 23:12:20 +0000 Subject: [issue19168] pprint.pprint(..., compact=True) not implemented In-Reply-To: <1380926374.45.0.423470167923.issue19168@psf.upfronthosting.co.za> Message-ID: <1380928340.43.0.236322719675.issue19168@psf.upfronthosting.co.za> Ezio Melotti added the comment: This a very recent change, see #19132. Python 3.4.0a3+ (default:f0416b2b5654, Oct 5 2013, 02:10:25) [GCC 4.7.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pprint >>> pprint.pprint(3, compact=True) 3 ---------- nosy: +ezio.melotti, serhiy.storchaka resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 01:53:36 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 04 Oct 2013 23:53:36 +0000 Subject: [issue18594] C accelerator for collections.Counter is slow In-Reply-To: <1375166960.42.0.521563124847.issue18594@psf.upfronthosting.co.za> Message-ID: <3cs7Fq2rj4zRVH@mail.python.org> Roundup Robot added the comment: New changeset e4cec1116e5c by Raymond Hettinger in branch '3.3': Issue #18594: Make the C code more closely match the pure python code. http://hg.python.org/cpython/rev/e4cec1116e5c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 02:14:35 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 05 Oct 2013 00:14:35 +0000 Subject: [issue19166] Unusued variable in test_keys in Lib/test/test_dict.py In-Reply-To: <1380902000.81.0.140295441911.issue19166@psf.upfronthosting.co.za> Message-ID: <3cs7jz3501z7LjR@mail.python.org> Roundup Robot added the comment: New changeset 92c2e76ca595 by Ezio Melotti in branch '2.7': #19166: use an unused var in a test. Patch by Vajrasky Kok. http://hg.python.org/cpython/rev/92c2e76ca595 New changeset 33bbc60705e8 by Ezio Melotti in branch '3.3': #19166: use an unused var in a test. Patch by Vajrasky Kok. http://hg.python.org/cpython/rev/33bbc60705e8 New changeset 16a88d026571 by Ezio Melotti in branch 'default': #19166: merge with 3.3. http://hg.python.org/cpython/rev/16a88d026571 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 02:19:52 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Oct 2013 00:19:52 +0000 Subject: [issue19166] Unusued variable in test_keys in Lib/test/test_dict.py In-Reply-To: <1380902000.81.0.140295441911.issue19166@psf.upfronthosting.co.za> Message-ID: <1380932392.34.0.243168267787.issue19166@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report and the patch! ---------- assignee: -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 02:25:23 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Oct 2013 00:25:23 +0000 Subject: [issue19165] Change formatter warning to DeprecationWarning in 3.5 Message-ID: <1380932723.18.0.588122827109.issue19165@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 02:28:23 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Oct 2013 00:28:23 +0000 Subject: [issue19111] 2to3 should remove from future_builtins import * In-Reply-To: <1380379953.79.0.934483665034.issue19111@psf.upfronthosting.co.za> Message-ID: <1380932903.61.0.971721470728.issue19111@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 02:31:32 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Oct 2013 00:31:32 +0000 Subject: [issue19164] Update uuid.UUID TypeError exception: integer should not be an argument. In-Reply-To: <1380885490.13.0.480584034262.issue19164@psf.upfronthosting.co.za> Message-ID: <1380933092.17.0.110251885092.issue19164@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy nosy: +ezio.melotti stage: -> needs patch versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 02:40:07 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Oct 2013 00:40:07 +0000 Subject: [issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed. In-Reply-To: <1380820358.99.0.777618727237.issue19154@psf.upfronthosting.co.za> Message-ID: <1380933607.43.0.669932114395.issue19154@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> test needed type: crash -> behavior versions: -Python 2.6, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 03:10:00 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Oct 2013 01:10:00 +0000 Subject: [issue19124] os.execv executes in background on Windows In-Reply-To: <1380451602.11.0.517013085188.issue19124@psf.upfronthosting.co.za> Message-ID: <1380935400.26.0.447239402339.issue19124@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In general, os module functions lightly wrap the corresponding operating system calls. It does not mask differences between OSes, or between versions of an OS. So the unix-windows difference is not a bug and the behavior will not change. The difference could, however, be described succinctly in the doc. In the first paragraph, after "On Unix, the new executable is loaded into the current process, and will have the same process id as the caller.", we could add something like On Windows, the new process is executed in the background but can send output to a console if the original process was started in a console. This has to be worded carefully because the process could instead have been started from an icon, including in Start Menu or Windows Explorer. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, terry.reedy stage: committed/rejected -> needs patch versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 03:11:02 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Oct 2013 01:11:02 +0000 Subject: [issue19129] 6.2.1. Regular Expression Syntax flags In-Reply-To: <1380470947.27.0.0292455287204.issue19129@psf.upfronthosting.co.za> Message-ID: <1380935462.13.0.370923010137.issue19129@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> needs patch versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 03:13:45 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 05 Oct 2013 01:13:45 +0000 Subject: [issue19148] Minor issues with Enum docs In-Reply-To: <1380745761.79.0.183004061407.issue19148@psf.upfronthosting.co.za> Message-ID: <3cs92J34LtzQKr@mail.python.org> Roundup Robot added the comment: New changeset db94fc7218fa by Ezio Melotti in branch 'default': #19148: fix markup errors and wording in enum docs. Patch by Esa Peuha. http://hg.python.org/cpython/rev/db94fc7218fa ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 03:16:10 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Oct 2013 01:16:10 +0000 Subject: [issue19148] Minor issues with Enum docs In-Reply-To: <1380745761.79.0.183004061407.issue19148@psf.upfronthosting.co.za> Message-ID: <1380935770.54.0.154560228635.issue19148@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report and the patch! I used a slightly different wording than the one you suggested because the rest of the document doesn't seem to use "you". ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 04:04:06 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Oct 2013 02:04:06 +0000 Subject: [issue19150] IDLE shell fails: "ModifiedInterpreter instance has no attribute 'interp'" In-Reply-To: <1380773098.03.0.70627839845.issue19150@psf.upfronthosting.co.za> Message-ID: <1380938646.75.0.39233903621.issue19150@psf.upfronthosting.co.za> Terry J. Reedy added the comment: By default, Idle runs user code in a separate process from the idle process that runs shell and edit windows. Because connecting the two processes sometimes fails, there is a start-up option -N (No subprocess) that run your code in the same process as idle code. Since this option also has potential problems, it should not be used unless necessary. In fact, some of us would like to eliminate the option (after fixing connection problems). I tried and failed to reproduce the problem with 2.7.5 on Windows. I started with -N, opened an editor window, ran (F5) with a comment uncommented, got a syntax error box, added '#', ran again, and the valid code ran fine. To continue this issue, update from 2.7.3 to 2.7.5 and see if you still have the problem. The update has 100s of bug fixes including many Idle fixes. If you do still see a problem with 2.7.5, please find a minimal file that has creates a problem when '#' is missing. Also, if you do, please test with 3.3.2 or the most recent 3.4.0. ---------- nosy: +terry.reedy stage: -> test needed type: compile error -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 04:40:05 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 05 Oct 2013 02:40:05 +0000 Subject: [issue19152] ExtensionFileLoader missing get_filename() In-Reply-To: <1380783695.34.0.941035195145.issue19152@psf.upfronthosting.co.za> Message-ID: <3csBxw3lWSz7LjT@mail.python.org> Roundup Robot added the comment: New changeset 62d045a873bb by Eric Snow in branch 'default': [issue 19152] Ensure we have actually registered ExtensionFileLoader as an ExecutionLoader. http://hg.python.org/cpython/rev/62d045a873bb New changeset e9554199620f by Eric Snow in branch 'default': [issue 19152] Add versionadded for ExtensionFileLoader.get_filename(). http://hg.python.org/cpython/rev/e9554199620f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 04:40:33 2013 From: report at bugs.python.org (Eric Snow) Date: Sat, 05 Oct 2013 02:40:33 +0000 Subject: [issue19152] ExtensionFileLoader missing get_filename() In-Reply-To: <1380783695.34.0.941035195145.issue19152@psf.upfronthosting.co.za> Message-ID: <1380940833.0.0.607830327191.issue19152@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 04:55:14 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Oct 2013 02:55:14 +0000 Subject: [issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed. In-Reply-To: <1380820358.99.0.777618727237.issue19154@psf.upfronthosting.co.za> Message-ID: <1380941714.47.0.423608238279.issue19154@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Changing the API of HTTPResponse.fileno is a feature change, not a bug fix. I do not think it should be changed as it would break existing code to no purpose. Instead, calls should continue to wrapped in try: except ValueError when failure is possible. And this issue closed as rejected. -- As to the illustrative example: I do not think the call in _fileobject.fileno should be so wrapped because I think the bug is elsewhere. _fileinput()._sock is supposed to be a socket, not an HTTPResponse. This says to me that a) self._sock.fileno() is supposed to call socket.fileno, not HTTPResonse.fileno; and b) nappstore/server_comm.py is calling socket(_sock=) (or directly modifying the .sock attribute). If b) is true, that strikes me as a bug because _sock is an undocumented private parameter, subject to change. Indeed it disappeared in 3.x when socket became a _socket.socket subclass rather than a wrapper thereof. (Also, the pseudo _fileobject was replaced with an appropriate, real, io class.) ---------- nosy: +terry.reedy versions: -Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 05:02:13 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Oct 2013 03:02:13 +0000 Subject: [issue19145] Inconsistent behaviour in itertools.repeat when using negative times In-Reply-To: <1380727396.47.0.412229295257.issue19145@psf.upfronthosting.co.za> Message-ID: <1380942133.6.0.824117898536.issue19145@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, serhiy.storchaka stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 05:09:13 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Oct 2013 03:09:13 +0000 Subject: [issue19161] collections Counter handles nan strangely In-Reply-To: <1380881243.0.0.773040970534.issue19161@psf.upfronthosting.co.za> Message-ID: <1380942553.44.0.941404582224.issue19161@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is the sort of issue that makes me think that there should be a single nan object (perhaps an instance of a Nan(float) subclass with a special __eq__ method ;-). Pending that, I agree with closing as "won't fix". ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 05:12:15 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Oct 2013 03:12:15 +0000 Subject: [issue19129] 6.2.1. Regular Expression Syntax flags In-Reply-To: <1380470947.27.0.0292455287204.issue19129@psf.upfronthosting.co.za> Message-ID: <1380942735.8.0.0279244954532.issue19129@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy type: -> enhancement versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 05:13:32 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Oct 2013 03:13:32 +0000 Subject: [issue19113] duplicate test names in Lib/ctypes/test/test_functions.py In-Reply-To: <1380385419.52.0.767012097586.issue19113@psf.upfronthosting.co.za> Message-ID: <1380942812.34.0.880003028091.issue19113@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 06:26:23 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 05 Oct 2013 04:26:23 +0000 Subject: [issue19161] collections Counter handles nan strangely In-Reply-To: <1380881243.0.0.773040970534.issue19161@psf.upfronthosting.co.za> Message-ID: <1380947183.68.0.955252202186.issue19161@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 07:08:07 2013 From: report at bugs.python.org (Eric Snow) Date: Sat, 05 Oct 2013 05:08:07 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1380949687.94.0.184600624212.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: Here's an initial patch. Some key things left to do: * unit tests * documentation * implement exec_module() for the various importlib loaders. Once that's squared away there are further things that will be addressed in new tickets (or at least separate patches). This includes: * remove init_module_attrs() and module_to_load() * deprecations * clear a bunch of helper functions out of _bootstrap.py * use ModuleSpec with __main__ * address impact on stdlib (pkgutil, pickle, etc.) ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file31959/modulespec-initial.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 07:10:49 2013 From: report at bugs.python.org (Eric Snow) Date: Sat, 05 Oct 2013 05:10:49 +0000 Subject: [issue18862] Implement __subclasshook__() for Finders and Loaders in importlib.abc In-Reply-To: <1377659436.77.0.0929523139133.issue18862@psf.upfronthosting.co.za> Message-ID: <1380949849.72.0.94392819742.issue18862@psf.upfronthosting.co.za> Eric Snow added the comment: Here's a patch. ---------- keywords: +patch stage: test needed -> patch review Added file: http://bugs.python.org/file31960/issue18862-importlib-abc-subclasshooks.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 10:27:09 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 05 Oct 2013 08:27:09 +0000 Subject: [issue19121] Documentation guidelines enhancements In-Reply-To: <1380446758.24.0.414615784712.issue19121@psf.upfronthosting.co.za> Message-ID: <1380961629.01.0.0759280180862.issue19121@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 11:56:16 2013 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 05 Oct 2013 09:56:16 +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: <1380966976.85.0.716582330096.issue16195@psf.upfronthosting.co.za> Stefan Behnel added the comment: Just as a quick update here: Cython has since then switched to only using PyObject_ClearWeakRefs() and otherwise leaves the handling of the weakref slot to CPython. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 13:33:40 2013 From: report at bugs.python.org (CliffM) Date: Sat, 05 Oct 2013 11:33:40 +0000 Subject: [issue19169] random.py : simple tidying Message-ID: <1380972820.55.0.891016437173.issue19169@psf.upfronthosting.co.za> New submission from CliffM: Standardising some name-shortening in the _randbelow() method. ---------- components: Extension Modules files: shorten.patch keywords: patch messages: 198984 nosy: CliffM priority: normal severity: normal status: open title: random.py : simple tidying type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file31961/shorten.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 13:58:54 2013 From: report at bugs.python.org (CliffM) Date: Sat, 05 Oct 2013 11:58:54 +0000 Subject: [issue19121] Documentation guidelines enhancements In-Reply-To: <1380446758.24.0.414615784712.issue19121@psf.upfronthosting.co.za> Message-ID: <1380974334.44.0.503618374545.issue19121@psf.upfronthosting.co.za> CliffM added the comment: Improving documentation is a fine aim. However, finding the correct balance between reference, tuition and precis (i.e. overview) is tricky. I would like to see more documentation laid out with the code and tests. This at least binds the examples with running code. I am sure this has been asked already, but has anyone done an analysis of the web-server log for the documentation sites ? ---------- nosy: +CliffM _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 14:16:54 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 Oct 2013 12:16:54 +0000 Subject: [issue19169] random.py : simple tidying In-Reply-To: <1380972820.55.0.891016437173.issue19169@psf.upfronthosting.co.za> Message-ID: <1380975414.77.0.301382481587.issue19169@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +mark.dickinson, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 15:16:10 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 05 Oct 2013 13:16:10 +0000 Subject: [issue19170] telnetlib: use selectors Message-ID: <1380978969.74.0.714959132131.issue19170@psf.upfronthosting.co.za> New submission from Charles-Fran?ois Natali: The patch attached uses selector in telnetlib. This removes a lot of duplicated code. ---------- components: Library (Lib) files: telnetlib_selectors.diff keywords: needs review, patch messages: 198986 nosy: neologix priority: normal severity: normal stage: patch review status: open title: telnetlib: use selectors type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file31962/telnetlib_selectors.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 15:43:41 2013 From: report at bugs.python.org (Santosh Kumar) Date: Sat, 05 Oct 2013 13:43:41 +0000 Subject: [issue19129] 6.2.1. Regular Expression Syntax flags In-Reply-To: <1380470947.27.0.0292455287204.issue19129@psf.upfronthosting.co.za> Message-ID: <1380980621.25.0.768948958482.issue19129@psf.upfronthosting.co.za> Changes by Santosh Kumar : ---------- keywords: +patch Added file: http://bugs.python.org/file31963/re_u.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 16:07:17 2013 From: report at bugs.python.org (Armin Rigo) Date: Sat, 05 Oct 2013 14:07:17 +0000 Subject: [issue19171] pow() improvement on longs Message-ID: <1380982037.44.0.922369997614.issue19171@psf.upfronthosting.co.za> New submission from Armin Rigo: The attached patch (which can be applied on both trunk and 2.7) gives a huge speed improvement for the case 'pow(huge_number, smallish_number, smallish_number)'. The improvement is unbounded: I get 20x with 'pow(x, y, z)' with the arguments 'x = 3 ** 10000, y = 10 ** 51 - 2, z = 10 ** 51' but increasing x just increases the factor. This is inspired by https://github.com/pyca/ed25519: check out revision 9f3e838d90ded42a86ec74c5e9f5e37dec8122a0, run it with 'time python -u signfast.py < sign.input'. This patch gives around 14% improvement. So it's a case that occurs in practice. ---------- components: Interpreter Core files: pow_speedup.diff keywords: patch messages: 198987 nosy: arigo priority: normal severity: normal status: open title: pow() improvement on longs versions: Python 2.7, Python 3.4 Added file: http://bugs.python.org/file31964/pow_speedup.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 16:40:38 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 05 Oct 2013 14:40:38 +0000 Subject: [issue19172] selectors: add keys() method Message-ID: <1380984038.36.0.521182029078.issue19172@psf.upfronthosting.co.za> New submission from Charles-Fran?ois Natali: This adds a keys() method to selectors, to return all the registered keys. It's useful, because one often needs to loop until all registered file objects have been unregistered e.g. (inspired from subprocess, see #18923): while selector.keys(): for key, events in selector.select(): # process events also, it can be useful if you want e.g. the list of all currently logged users, etc. It avoids having to maintain a separate data-structure tracking registered file objects. The patch attached returns a new set upon each call: another way to handle this would be to just return the dictionary's .values() view: it would be faster and use less memory, but it's immutable and also this would prevent the user from doing: for key in selectior.keys(): if somecondition: selector.unregister(key.fileobj) (since you'll get "dictonary changed size during iteration"). ---------- components: Library (Lib) files: selectors_keys.diff keywords: needs review, patch messages: 198988 nosy: haypo, neologix, pitrou priority: normal severity: normal stage: patch review status: open title: selectors: add keys() method type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file31965/selectors_keys.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 16:42:42 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 05 Oct 2013 14:42:42 +0000 Subject: [issue18923] Use the new selectors module in the subprocess module In-Reply-To: <1378320095.08.0.301150241372.issue18923@psf.upfronthosting.co.za> Message-ID: <1380984162.77.0.367280679034.issue18923@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Here's a patch updating subprocess to use selectors. (It depends on the new keys() method - issue #19172.) ---------- dependencies: +selectors: add keys() method keywords: +needs review, patch nosy: +neologix stage: -> patch review Added file: http://bugs.python.org/file31966/subprocess_selectors.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 17:58:46 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 05 Oct 2013 15:58:46 +0000 Subject: [issue19171] pow() improvement on longs In-Reply-To: <1380982037.44.0.922369997614.issue19171@psf.upfronthosting.co.za> Message-ID: <1380988726.14.0.840256488952.issue19171@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 18:27:19 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 05 Oct 2013 16:27:19 +0000 Subject: [issue19172] selectors: add keys() method In-Reply-To: <1380984038.36.0.521182029078.issue19172@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: If you want to unregister while iterating on .keys(), just copy .keys(), as I do when removing items from a list or a dict while iterating on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 19:02:03 2013 From: report at bugs.python.org (Tim Peters) Date: Sat, 05 Oct 2013 17:02:03 +0000 Subject: [issue19171] pow() improvement on longs In-Reply-To: <1380982037.44.0.922369997614.issue19171@psf.upfronthosting.co.za> Message-ID: <1380992523.64.0.902325442462.issue19171@psf.upfronthosting.co.za> Tim Peters added the comment: Good idea! The patch looks almost ready to me: the comment block before the code block should be updated, since recomputing `base` is no longer being done _just_ to force `base` to a non-negative value. ---------- nosy: +tim.peters stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 19:25:09 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 05 Oct 2013 17:25:09 +0000 Subject: [issue19171] pow() improvement on longs In-Reply-To: <1380982037.44.0.922369997614.issue19171@psf.upfronthosting.co.za> Message-ID: <1380993909.12.0.077837561101.issue19171@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- type: -> performance versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 19:30:41 2013 From: report at bugs.python.org (noxdafox) Date: Sat, 05 Oct 2013 17:30:41 +0000 Subject: [issue19173] Expose Queue maxsize parameter to multiprocessing.Pool class Message-ID: <1380994241.79.0.709476745668.issue19173@psf.upfronthosting.co.za> New submission from noxdafox: As a developer I want the multiprocessing Pool class to expose the internal queue size limit in order to better control the task flow in my application. Consider the following scenarios: 1. The tasks I want to run into the pool require a considerably big amount of data as input (a big XML string for example). A limitless queue and a high number of tasks would cause my application to consume a huge amount of memory, this is unacceptable. 2. I want to always ensure a small amount of tasks queued into the pool so that, if my application crashes, I won't loose much data. Patch includes code changes, tests and documentation. ---------- components: Library (Lib) files: maxqueuesize.patch keywords: patch messages: 198992 nosy: noxdafox priority: normal severity: normal status: open title: Expose Queue maxsize parameter to multiprocessing.Pool class type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file31967/maxqueuesize.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 19:34:55 2013 From: report at bugs.python.org (noxdafox) Date: Sat, 05 Oct 2013 17:34:55 +0000 Subject: [issue19173] Expose Queue maxsize parameter to multiprocessing.Pool class In-Reply-To: <1380994241.79.0.709476745668.issue19173@psf.upfronthosting.co.za> Message-ID: <1380994495.47.0.445961579407.issue19173@psf.upfronthosting.co.za> noxdafox added the comment: Please ignore the first provided patch, doc changes where wrong ---------- Added file: http://bugs.python.org/file31968/maxqueuesize.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 19:50:41 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 05 Oct 2013 17:50:41 +0000 Subject: [issue19172] selectors: add keys() method In-Reply-To: <1380984038.36.0.521182029078.issue19172@psf.upfronthosting.co.za> Message-ID: <1380995441.65.0.90019886399.issue19172@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Indeed it's easy enough to call list() or set() on the result if you need it. On the other hand, the problem with returning a dict view is that it makes the return type dependent on an implementation detail. Returning a simple iterator would be great, except that you can't as easily test it for emptiness. So perhaps two methods are needed: - a keys() method returning an iterator - a has_keys() method returning a boolean ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 19:58:43 2013 From: report at bugs.python.org (Tim Peters) Date: Sat, 05 Oct 2013 17:58:43 +0000 Subject: [issue19171] pow() improvement on longs In-Reply-To: <1380982037.44.0.922369997614.issue19171@psf.upfronthosting.co.za> Message-ID: <1380995923.51.0.886763958935.issue19171@psf.upfronthosting.co.za> Tim Peters added the comment: A bit of history: last time I fiddled that code, I didn't worry about this, because for large enough exponents all internal numbers _eventually_ become less than `base`. But the patch can speed up the _startup_ costs by an arbitrary amount (for smaller exponents it's _all_ "startup costs", while for larger exponents there are 31 multiplications by `base` to precompute a 5-bits-a-time table). Of course there's no problem with correctness here: `base` and `base % modulus` are equivalent in this algorithm. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 19:59:47 2013 From: report at bugs.python.org (Tim Peters) Date: Sat, 05 Oct 2013 17:59:47 +0000 Subject: [issue19171] pow() improvement on longs In-Reply-To: <1380982037.44.0.922369997614.issue19171@psf.upfronthosting.co.za> Message-ID: <1380995987.85.0.745103917866.issue19171@psf.upfronthosting.co.za> Tim Peters added the comment: Grr: should be: "all internal numbers _eventually_ become less than `modulus`", not "less than `base`". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 20:54:41 2013 From: report at bugs.python.org (Peter) Date: Sat, 05 Oct 2013 18:54:41 +0000 Subject: [issue19174] Add range to future_builtins Message-ID: <1380999281.69.0.809167641275.issue19174@psf.upfronthosting.co.za> New submission from Peter: Much like how iterator style filter, map and zip are available via future_builtins (issue #2171), it would be natural to expect range to be there too, e.g. >>> from future_builtins import range >>> range(5) range(0, 5) The 2to3 fixers would need to be modified in the same way the map/filter/zip fixers were to be aware when a Python3 style range was in use via this import. ---------- messages: 198997 nosy: maubp priority: normal severity: normal status: open title: Add range to future_builtins type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 21:12:24 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 05 Oct 2013 19:12:24 +0000 Subject: [issue19087] bytearray front-slicing not optimized In-Reply-To: <1380117830.08.0.43327617783.issue19087@psf.upfronthosting.co.za> Message-ID: <3cscyv5CgCz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 499a96611baa by Antoine Pitrou in branch 'default': Issue #19087: Improve bytearray allocation in order to allow cheap popping of data at the front (slice deletion). http://hg.python.org/cpython/rev/499a96611baa ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 21:42:05 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 05 Oct 2013 19:42:05 +0000 Subject: [issue19172] selectors: add keys() method In-Reply-To: <1380995441.65.0.90019886399.issue19172@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Using .keys() to test if the selector is empty is surprising. To test if a str, list, tuple, dict, set, ..., is empty: if container: is enough. Or sometimes I write if len(container): ... Selector has no length? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 22:54:09 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 05 Oct 2013 20:54:09 +0000 Subject: [issue19087] bytearray front-slicing not optimized In-Reply-To: <1380117830.08.0.43327617783.issue19087@psf.upfronthosting.co.za> Message-ID: <1381006449.08.0.143269547794.issue19087@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The commit produced compiled errors on Windows, but I've since fixed them. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 22:54:32 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 05 Oct 2013 20:54:32 +0000 Subject: [issue19173] Expose Queue maxsize parameter to multiprocessing.Pool class In-Reply-To: <1380994241.79.0.709476745668.issue19173@psf.upfronthosting.co.za> Message-ID: <1381006471.99.0.99068689131.issue19173@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 22:55:59 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 05 Oct 2013 20:55:59 +0000 Subject: [issue19170] telnetlib: use selectors In-Reply-To: <1380978969.74.0.714959132131.issue19170@psf.upfronthosting.co.za> Message-ID: <1381006559.12.0.80434317182.issue19170@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +jackdied _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 23:09:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 Oct 2013 21:09:14 +0000 Subject: [issue19087] bytearray front-slicing not optimized In-Reply-To: <1380117830.08.0.43327617783.issue19087@psf.upfronthosting.co.za> Message-ID: <1381007354.9.0.299777606318.issue19087@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Side effect of this change is that bytearray's data now can be non-aligned. We should examine all places which relies on this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 23:13:57 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 05 Oct 2013 21:13:57 +0000 Subject: [issue19087] bytearray front-slicing not optimized In-Reply-To: <1381007354.9.0.299777606318.issue19087@psf.upfronthosting.co.za> Message-ID: <1381007634.2482.2.camel@fsol> Antoine Pitrou added the comment: > Side effect of this change is that bytearray's data now can be > non-aligned. We should examine all places which relies on this. The C API makes no guarantees as to alignment of private data areas, so any external code relying on it would be incorrect. The remaining question is whether the bytearray implementation relies on it, but I don't think that's the case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 23:18:44 2013 From: report at bugs.python.org (Tim Peters) Date: Sat, 05 Oct 2013 21:18:44 +0000 Subject: [issue19171] pow() improvement on longs In-Reply-To: <1380982037.44.0.922369997614.issue19171@psf.upfronthosting.co.za> Message-ID: <1381007924.79.0.378430728515.issue19171@psf.upfronthosting.co.za> Tim Peters added the comment: New patch changes the comments to match the new code. ---------- Added file: http://bugs.python.org/file31969/pow.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 23:21:32 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Oct 2013 21:21:32 +0000 Subject: [issue19060] docs: note that subprocess doesn't replace os.exec* In-Reply-To: <1379748595.57.0.00736365306091.issue19060@psf.upfronthosting.co.za> Message-ID: <1381008092.99.0.279209102871.issue19060@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 23:40:29 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 05 Oct 2013 21:40:29 +0000 Subject: [issue19068] Some built-in complex docstrings are not PEP-8 compatible In-Reply-To: <1379833742.32.0.289149108308.issue19068@psf.upfronthosting.co.za> Message-ID: <3cshFn09tMz7LjT@mail.python.org> Roundup Robot added the comment: New changeset 54213ef5bb19 by Ezio Melotti in branch '3.3': #19068: use imperative mood in complex object docstrings. Patch by Marco Buttu. http://hg.python.org/cpython/rev/54213ef5bb19 New changeset c1abbeae5c8a by Ezio Melotti in branch 'default': #19068: merge with 3.3. http://hg.python.org/cpython/rev/c1abbeae5c8a New changeset 3ef157674abc by Ezio Melotti in branch '2.7': #19068: use imperative mood in complex object docstrings. Patch by Marco Buttu. http://hg.python.org/cpython/rev/3ef157674abc ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 23:40:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 05 Oct 2013 21:40:30 +0000 Subject: [issue19067] Built-in range docstrings are not PEP-8 compatible In-Reply-To: <1379833275.25.0.770459256521.issue19067@psf.upfronthosting.co.za> Message-ID: <3cshFn5ZjVz7LkD@mail.python.org> Roundup Robot added the comment: New changeset 5135a431f7b3 by Ezio Melotti in branch '3.3': #19067: use imperative mood in range object docstrings. Patch by Marco Buttu. http://hg.python.org/cpython/rev/5135a431f7b3 New changeset b2c752eff474 by Ezio Melotti in branch 'default': #19067: merge with 3.3. http://hg.python.org/cpython/rev/b2c752eff474 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 23:41:27 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Oct 2013 21:41:27 +0000 Subject: [issue19067] Built-in range docstrings are not PEP-8 compatible In-Reply-To: <1379833275.25.0.770459256521.issue19067@psf.upfronthosting.co.za> Message-ID: <1381009287.89.0.0568269645647.issue19067@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 _______________________________________ From report at bugs.python.org Sat Oct 5 23:42:01 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Oct 2013 21:42:01 +0000 Subject: [issue19068] Some built-in complex docstrings are not PEP-8 compatible In-Reply-To: <1379833742.32.0.289149108308.issue19068@psf.upfronthosting.co.za> Message-ID: <1381009321.73.0.76420690039.issue19068@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 -> closed versions: +Python 2.7, Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 23:47:26 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 05 Oct 2013 21:47:26 +0000 Subject: [issue19069] Built-in float docstrings are not PEP-8 compatible In-Reply-To: <1379834291.01.0.660875879281.issue19069@psf.upfronthosting.co.za> Message-ID: <3cshPn2XKtz7LjM@mail.python.org> Roundup Robot added the comment: New changeset ca8e75190402 by Ezio Melotti in branch '2.7': #19069: use imperative mood in float object docstrings. Patch by Marco Buttu. http://hg.python.org/cpython/rev/ca8e75190402 New changeset 563074ace473 by Ezio Melotti in branch '3.3': #19069: use imperative mood in float object docstrings. Patch by Marco Buttu. http://hg.python.org/cpython/rev/563074ace473 New changeset 63a10c942b50 by Ezio Melotti in branch 'default': #19069: merge with 3.3. http://hg.python.org/cpython/rev/63a10c942b50 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 23:48:40 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Oct 2013 21:48:40 +0000 Subject: [issue19069] Built-in float docstrings are not PEP-8 compatible In-Reply-To: <1379834291.01.0.660875879281.issue19069@psf.upfronthosting.co.za> Message-ID: <1381009720.03.0.923368751568.issue19069@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: duplicate -> fixed stage: -> committed/rejected versions: +Python 2.7, Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 23:51:44 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 05 Oct 2013 21:51:44 +0000 Subject: [issue19170] telnetlib: use selectors In-Reply-To: <1380978969.74.0.714959132131.issue19170@psf.upfronthosting.co.za> Message-ID: <1381009904.59.0.0634319461005.issue19170@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Here's an updated patch (the previous one mistakenly removed a testcase). ---------- Added file: http://bugs.python.org/file31970/telnetlib_selectors-1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 00:02:33 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 05 Oct 2013 22:02:33 +0000 Subject: [issue19074] Add PySide to GUI FAQ In-Reply-To: <1379859377.69.0.892253164041.issue19074@psf.upfronthosting.co.za> Message-ID: <3cshlD2TzmzQN7@mail.python.org> Roundup Robot added the comment: New changeset eddd46b5691a by Ezio Melotti in branch '2.7': #19074: mention PySide in the GUI FAQs. http://hg.python.org/cpython/rev/eddd46b5691a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 00:03:49 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Oct 2013 22:03:49 +0000 Subject: [issue19074] Add PySide to GUI FAQ In-Reply-To: <1379859377.69.0.892253164041.issue19074@psf.upfronthosting.co.za> Message-ID: <1381010629.17.0.356208362234.issue19074@psf.upfronthosting.co.za> Ezio Melotti added the comment: I backported the relevant text from ccfb5ba50a44. ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed type: -> enhancement versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 00:10:51 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 05 Oct 2013 22:10:51 +0000 Subject: [issue19172] selectors: add keys() method In-Reply-To: Message-ID: Charles-Fran?ois Natali added the comment: > If you want to unregister while iterating on .keys(), just copy .keys(), as > I do when removing items from a list or a dict while iterating on it. Of course, but as noted by Antoine, it makes the return type dependent of an implementation detail (I don't think there's any other place in the stdlib where a dict view is returned). > Using .keys() to test if the selector is empty is surprising. To test if a > str, list, tuple, dict, set, ..., is empty: if container: is > enough. > > Or sometimes I write if len(container): ... > > Selector has no length? No. For example, select.epoll objects don't have a length either. I'm not sure whether selectors have a natural length: if we added a __len__, we should also add __iter__ and IMO a selector isn't a container. Returning all the keys is a generic method that can be useful besides checking that the selector has registered keys. > So perhaps two methods are needed: > - a keys() method returning an iterator > - a has_keys() method returning a boolean Sounds a bit overkill, no? keys() is definitely usful, and I'm not sure that it'll actually be a performance bottleneck in practice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 00:14:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 05 Oct 2013 22:14:43 +0000 Subject: [issue19171] pow() improvement on longs In-Reply-To: <1380982037.44.0.922369997614.issue19171@psf.upfronthosting.co.za> Message-ID: <3csj1G6gyvz7LjM@mail.python.org> Roundup Robot added the comment: New changeset f34c59494420 by Tim Peters in branch '3.3': Issue #19171: speed some cases of 3-argument long pow(). http://hg.python.org/cpython/rev/f34c59494420 New changeset 6fcdd1657ee3 by Tim Peters in branch 'default': Issue #19171: speed some cases of 3-argument long pow(). http://hg.python.org/cpython/rev/6fcdd1657ee3 New changeset 101bf827611a by Tim Peters in branch '2.7': Issue #19171: speed some cases of 3-argument long pow(). http://hg.python.org/cpython/rev/101bf827611a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 00:16:15 2013 From: report at bugs.python.org (Tim Peters) Date: Sat, 05 Oct 2013 22:16:15 +0000 Subject: [issue19171] pow() improvement on longs In-Reply-To: <1380982037.44.0.922369997614.issue19171@psf.upfronthosting.co.za> Message-ID: <1381011375.43.0.130714956124.issue19171@psf.upfronthosting.co.za> Changes by Tim Peters : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 01:12:32 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Oct 2013 23:12:32 +0000 Subject: [issue14927] add "Do not supply 'int' argument" to random.shuffle docstring In-Reply-To: <1338133448.81.0.712858049705.issue14927@psf.upfronthosting.co.za> Message-ID: <1381014752.79.0.797951972996.issue14927@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 01:38:19 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Oct 2013 23:38:19 +0000 Subject: [issue19024] Document asterisk (*), splat or star operator In-Reply-To: <1379251118.66.0.684713404389.issue19024@psf.upfronthosting.co.za> Message-ID: <1381016299.68.0.476857034303.issue19024@psf.upfronthosting.co.za> Ezio Melotti added the comment: > 223 people + me out of 1422 disagree with you both. Note that those votes doesn't necessarily mean "I didn't know about the feature" -- they might mean "I find this feature useful/I like this feature". Features like decorators have even more votes and I don't think they are "hidden" features. > Current page http://docs.python.org/3/tutorial/controlflow.html#unpacking-argument-lists is > about functionality, not about operators These operators are documented here: http://docs.python.org/3/reference/expressions.html#index-36 http://docs.python.org/3/reference/expressions.html#index-37 This can be found from the doc index (which admittedly is not the most obvious place where to look): http://docs.python.org/3/genindex-Symbols.html If the problem is the content of the docs, you can suggest what exactly should be improved (and how). If the problem is the discoverability, you should open a separate issue on the Sphinx bug tracker about allowing the search of operators. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 01:40:43 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 05 Oct 2013 23:40:43 +0000 Subject: [issue19174] Add range to future_builtins In-Reply-To: <1380999281.69.0.809167641275.issue19174@psf.upfronthosting.co.za> Message-ID: <1381016443.34.0.388074072914.issue19174@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This would have been a good idea, but that ship has sailed. The API for Python 2.7 is now set in stone. Sorry. ---------- nosy: +rhettinger resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 01:42:58 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Oct 2013 23:42:58 +0000 Subject: [issue19055] Regular expressions: * does not match as many repetitions as possible. In-Reply-To: <1379629723.54.0.556911663587.issue19055@psf.upfronthosting.co.za> Message-ID: <1381016578.84.0.957856577025.issue19055@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: -> docs at python components: +Documentation keywords: +easy nosy: +docs at python stage: -> needs patch type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 01:52:36 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Oct 2013 23:52:36 +0000 Subject: [issue19169] random.py : simple tidying In-Reply-To: <1380972820.55.0.891016437173.issue19169@psf.upfronthosting.co.za> Message-ID: <1381017156.56.0.774618482904.issue19169@psf.upfronthosting.co.za> Ezio Melotti added the comment: I'm not sure I understand the comment about the "overridden random() method" that was introduced in 770c3ec05685, but unless something unusual is happening there I think the patch looks OK (the first comment is a bit redundant, and the empty line added in the last chunk before the comment could be omitted though). ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 02:08:09 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 06 Oct 2013 00:08:09 +0000 Subject: [issue19169] random.py : simple tidying In-Reply-To: <1380972820.55.0.891016437173.issue19169@psf.upfronthosting.co.za> Message-ID: <1381018089.39.0.592511173928.issue19169@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 02:20:28 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 00:20:28 +0000 Subject: [issue19169] random.py : simple tidying In-Reply-To: <1380972820.55.0.891016437173.issue19169@psf.upfronthosting.co.za> Message-ID: <3cslpL5LNJz7LjS@mail.python.org> Roundup Robot added the comment: New changeset 1f51867fe50e by Raymond Hettinger in branch 'default': Issue #19169: Micro refactoring with a micro benefit for brevity and speed. http://hg.python.org/cpython/rev/1f51867fe50e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 02:23:28 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 06 Oct 2013 00:23:28 +0000 Subject: [issue19169] random.py : simple tidying In-Reply-To: <1380972820.55.0.891016437173.issue19169@psf.upfronthosting.co.za> Message-ID: <1381019008.03.0.77565800791.issue19169@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 02:34:00 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 06 Oct 2013 00:34:00 +0000 Subject: [issue14927] add "Do not supply 'int' argument" to random.shuffle docstring In-Reply-To: <1338133448.81.0.712858049705.issue14927@psf.upfronthosting.co.za> Message-ID: <1381019640.11.0.29738364143.issue14927@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I think the "Do not supply the 'int' argument" covers it well enough. This code has been around for a very long time and isn't causing any problems. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 02:37:14 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 06 Oct 2013 00:37:14 +0000 Subject: [issue14927] add "Do not supply 'int' argument" to random.shuffle docstring In-Reply-To: <1338133448.81.0.712858049705.issue14927@psf.upfronthosting.co.za> Message-ID: <1381019834.28.0.392495736362.issue14927@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Hi Raymond, Ezio provided some comments on improvements to the patch. Do you mind if Ezio or I take over task of improvement. Not cause problems != no need to improve. TIA. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 02:42:37 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 06 Oct 2013 00:42:37 +0000 Subject: [issue14927] add "Do not supply 'int' argument" to random.shuffle docstring In-Reply-To: <1338133448.81.0.712858049705.issue14927@psf.upfronthosting.co.za> Message-ID: <1381020157.36.0.3359189967.issue14927@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I don't think there is an actual problem here to be solved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 02:50:13 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 06 Oct 2013 00:50:13 +0000 Subject: [issue14927] add "Do not supply 'int' argument" to random.shuffle docstring In-Reply-To: <1338133448.81.0.712858049705.issue14927@psf.upfronthosting.co.za> Message-ID: <1381020613.8.0.99078508128.issue14927@psf.upfronthosting.co.za> Tim Peters added the comment: I'm old, but I liked the docs better when they didn't mention "the int argument" at all. The "int=int" - or "_int=int" - argument is a CPython implementation detail. It has nothing to do with the API. And _of course_ users shouldn't mess with implementation details. 99.9+% will never notice the argument is there, and the fraction that do notice should infer that they shouldn't mess with it from that it's _not_ documented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 04:41:48 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 06 Oct 2013 02:41:48 +0000 Subject: [issue19169] random.py : simple tidying In-Reply-To: <1380972820.55.0.891016437173.issue19169@psf.upfronthosting.co.za> Message-ID: <1381027308.12.0.66658699254.issue19169@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 05:51:29 2013 From: report at bugs.python.org (Christopher Smith) Date: Sun, 06 Oct 2013 03:51:29 +0000 Subject: [issue14927] add "Do not supply 'int' argument" to random.shuffle docstring In-Reply-To: <1381020613.8.0.99078508128.issue14927@psf.upfronthosting.co.za> Message-ID: Christopher Smith added the comment: I probably wouldn't have noticed it except I was working more intensely with the different random methods and saw that randrange had the note about not supplying the 'int' argument and shuffle (though it had the same sort of argument) did *not* have the comment. So that raised the issue for me. Proabably the best thing would be do remove the comment from randrange and make sure that the not-to-mess-with args are made private with the underscore. /c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 06:14:24 2013 From: report at bugs.python.org (David Chambers) Date: Sun, 06 Oct 2013 04:14:24 +0000 Subject: [issue19175] Erroneous reference to "integer" in format string grammar Message-ID: <1381032864.93.0.113807397977.issue19175@psf.upfronthosting.co.za> New submission from David Chambers: I first raised this issue on Stack Overflow: http://stackoverflow.com/questions/19203194 The [replacement field grammar][1] states that an [integer][2] is a valid field_name, but this is inaccurate: >>> '{0}'.format('zero') 'zero' >>> '{0x0}.format('zero') KeyError: '0x0' >>> '{0o0}.format('zero') KeyError: '0o0' >>> '{0b0}.format('zero') KeyError: '0b0' This [comment][3] by Eric Smith suggests that the above is the intended behaviour: > get_integer uses the narrowest possible definition for integer indexes, > in order to pass all other strings to mappings. The documentation should be updated to match the actual behaviour. abarnert on Stack Overflow suggested the following change: -arg_name ::= [identifier | integer] +arg_name ::= [identifier | digit+] [1]: http://docs.python.org/2/library/string.html#format-string-syntax [2]: http://docs.python.org/2/reference/lexical_analysis.html#grammar-token-integer [3]: http://bugs.python.org/issue8985#msg107705 ---------- assignee: docs at python components: Documentation messages: 199024 nosy: davidchambers, docs at python priority: normal severity: normal status: open title: Erroneous reference to "integer" in format string grammar versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 06:35:03 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 04:35:03 +0000 Subject: [issue14927] add "Do not supply 'int' argument" to random.shuffle docstring In-Reply-To: <1338133448.81.0.712858049705.issue14927@psf.upfronthosting.co.za> Message-ID: <3cssS62WFrz7LjR@mail.python.org> Roundup Robot added the comment: New changeset b1e94e332ec8 by Raymond Hettinger in branch '2.7': Issue 14927: Minor clean-up of function parameters in random(). http://hg.python.org/cpython/rev/b1e94e332ec8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 06:54:02 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 06 Oct 2013 04:54:02 +0000 Subject: [issue14927] add "Do not supply 'int' argument" to random.shuffle docstring In-Reply-To: <1338133448.81.0.712858049705.issue14927@psf.upfronthosting.co.za> Message-ID: <1381035242.35.0.815804128207.issue14927@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Py3.3: http://hg.python.org/cpython/rev/0899960835f5 Py3.4: http://hg.python.org/cpython/rev/8494d2c8ef54 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 07:02:16 2013 From: report at bugs.python.org (Christopher Smith) Date: Sun, 06 Oct 2013 05:02:16 +0000 Subject: [issue14927] add "Do not supply 'int' argument" to random.shuffle docstring In-Reply-To: <1381035242.35.0.815804128207.issue14927@psf.upfronthosting.co.za> Message-ID: Christopher Smith added the comment: In 3.3 and 3.4 I would just change the shuffle arg from `int=int` to `_int=int` and delete the comment in docstring regarding not supplying the value. (In both you *removed* the argument and internally added `_int=int`.) Note that (as far as I can see) in 3.3 you didn't remove the comment in the docstring of shuffle like you did in 3.4 /c On Sat, Oct 5, 2013 at 11:54 PM, Raymond Hettinger wrote: > > Raymond Hettinger added the comment: > > Py3.3: http://hg.python.org/cpython/rev/0899960835f5 > Py3.4: http://hg.python.org/cpython/rev/8494d2c8ef54 > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 07:03:47 2013 From: report at bugs.python.org (Jason Stokes) Date: Sun, 06 Oct 2013 05:03:47 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1381035827.68.0.749365906787.issue17618@psf.upfronthosting.co.za> Jason Stokes added the comment: What issues are there with the implementation as it stands? I am happy to contribute (as I need to code a base36 implementation myself, and it's basically the same work) but it looks like the existing implementation is fine, except possibly some people don't like "adobe" being implemented by default? ---------- nosy: +glasper _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 07:12:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 05:12:01 +0000 Subject: [issue14927] add "Do not supply 'int' argument" to random.shuffle docstring In-Reply-To: <1338133448.81.0.712858049705.issue14927@psf.upfronthosting.co.za> Message-ID: <3cstGn1mkDz7Ljf@mail.python.org> Roundup Robot added the comment: New changeset 50ea4dccb03e by Raymond Hettinger in branch '3.3': Issue 14927: Remove a docstring line that is no longer applicable. http://hg.python.org/cpython/rev/50ea4dccb03e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 07:14:44 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 06 Oct 2013 05:14:44 +0000 Subject: [issue14927] add "Do not supply 'int' argument" to random.shuffle docstring In-Reply-To: <1338133448.81.0.712858049705.issue14927@psf.upfronthosting.co.za> Message-ID: <1381036484.68.0.505839833504.issue14927@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Christopher, this tracker item needs to die. It is wasting everyone's time (and churning code) over nothing. FYI, I moved the _int=int for shuffle inside the function because the assignment was outside of the inner loop, so we weren't getting any real benefit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 08:42:30 2013 From: report at bugs.python.org (Martin Panter) Date: Sun, 06 Oct 2013 06:42:30 +0000 Subject: [issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser Message-ID: <1381041750.41.0.637077946349.issue19176@psf.upfronthosting.co.za> New submission from Martin Panter: I am using the C version of Element Tree via the main ElementTree module. I have subclassed XMLParser, and created my own target object. I am not that interested in XML doctypes, but the following simplified code raises a DeprecationWarning: $ python3.3 -Wall Python 3.3.2 (default, May 16 2013, 23:40:52) [GCC 4.6.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from xml.etree.ElementTree import XMLParser >>> class CustomParser(XMLParser): pass ... >>> CustomParser().feed("") __main__:1: DeprecationWarning: This method of XMLParser is deprecated. Define doctype() method on the TreeBuilder target. Looking at the C code, the logic is wrong. Subclasses of XMLParser will normally always have a doctype() method, at least by inheritance. So the code should compare the method with the XMLParser.doctype() base method rather than just checking that it exists. The native Python version seems to get it right. http://hg.python.org/cpython/file/50ea4dccb03e/Modules/_elementtree.c#l3091 It looks like this may not be an issue for Python 3.4 because according to Issue 13248 the deprecated doctype() method is due to be removed. ---------- components: Extension Modules messages: 199031 nosy: vadmium priority: normal severity: normal status: open title: DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 08:44:45 2013 From: report at bugs.python.org (Christopher Smith) Date: Sun, 06 Oct 2013 06:44:45 +0000 Subject: [issue14927] add "Do not supply 'int' argument" to random.shuffle docstring In-Reply-To: <1381036484.68.0.505839833504.issue14927@psf.upfronthosting.co.za> Message-ID: Christopher Smith added the comment: On Sun, Oct 6, 2013 at 12:14 AM, Raymond Hettinger wrote: > > Raymond Hettinger added the comment: > > Christopher, this tracker item needs to die. It is wasting everyone's > time (and churning code) over nothing. > > but it's not quite dead yet... > FYI, I moved the _int=int for shuffle inside the function because the > assignment was outside of the inner loop, so we weren't getting any real > benefit. > but cf Tim's comment regarding the advantage of leaving it in the arg list so that the lookup is fast: [Senthil Kumaran] > I am unaware of the optimization technique you refer to as > well, it will helpful if you could point to any resource. It's an old trick since the very first Pythons: global lookups are much slower than local lookups (the difference between the LOAD_GLOBAL and LOAD_FAST opcodes in CPython). Putting: ..., _fast=slow, ... in an argument list means we endure the slow lookup (of `slow`) only once, when the function is first defined. When the function is _called_, that binding is available via the local (much faster lookup) variable `_fast`. Purely a speed trick, but can make a real difference in very heavily used functions. ---------- So by removing it from the arg list you have perhaps caused a regression in performance of shuffle. Other than that, everything looks fine to me. Thanks, Chris ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 08:46:03 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 06:46:03 +0000 Subject: [issue19175] Erroneous reference to "integer" in format string grammar In-Reply-To: <1381032864.93.0.113807397977.issue19175@psf.upfronthosting.co.za> Message-ID: <1381041963.17.0.451783912678.issue19175@psf.upfronthosting.co.za> Georg Brandl added the comment: The bug is that "integer" links to the "integer" production in the Python grammar. This shouldn't happen; I'll have a look on the Sphinx side. As a workaround, "integer" can be replaced by "digit+" as requested (it occurs twice). ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 08:46:10 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 06:46:10 +0000 Subject: [issue19175] Erroneous reference to "integer" in format string grammar In-Reply-To: <1381032864.93.0.113807397977.issue19175@psf.upfronthosting.co.za> Message-ID: <1381041970.47.0.780865173191.issue19175@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: docs at python -> eric.smith nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 08:49:36 2013 From: report at bugs.python.org (Stendec) Date: Sun, 06 Oct 2013 06:49:36 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1381042176.9.0.996287620879.issue3982@psf.upfronthosting.co.za> Changes by Stendec : ---------- nosy: +stendec _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 08:59:11 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 06:59:11 +0000 Subject: [issue11176] give more meaningful argument names in argparse documentation In-Reply-To: <1297352937.46.0.470038569364.issue11176@psf.upfronthosting.co.za> Message-ID: <1381042751.86.0.481088913858.issue11176@psf.upfronthosting.co.za> Georg Brandl added the comment: > Also see this e-mail to docs@: > http://mail.python.org/pipermail/docs/2012-December/012028.html No, please don't see this e-mail. It's not worth it. The poster clearly has no clue whatsoever about either a) common placeholders, or b) manners. I don't want to claim that foo/bar/etc. are superior to a well-thought-out example (which takes time to come up with), but they are certainly better than no example at all. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 09:11:30 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 06 Oct 2013 07:11:30 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1381043490.52.0.256254338655.issue17618@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm not very interesting in working on this (but analyzing and optimizing made fun to me). You Antoine as originator definitely are interested. So make decision about interface which you need and finish the work using proposed patches as a basis. I would made a review. I'm a little doubt about appropriateness base85 codec in the base64 module ("This module provides data encoding and decoding as specified in RFC 3548."). Base85 is not standard. But I don't see better place for it. At least the description of the base64 module should be corrected. I suggest first resolve issue16995. Perhaps it will get suggestions about base85 interface. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 09:12:22 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 06 Oct 2013 07:12:22 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1381043542.59.0.92519349915.issue17618@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 09:19:19 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Oct 2013 07:19:19 +0000 Subject: [issue19172] selectors: add keys() method In-Reply-To: <1380984038.36.0.521182029078.issue19172@psf.upfronthosting.co.za> Message-ID: <1381043959.76.0.969700974602.issue19172@psf.upfronthosting.co.za> STINNER Victor added the comment: BaseSelector.register(fd) raises a KeyError if fd is already registered, which means that any selector must know the list of all registered FDs. For EpollSelector, the list may be inconsistent *if* the epoll is object is modified externally, but it's really a corner case. "while selector: ..." is a nice (common?) pattern, it is used by subprocess.communicate() at least. > I'm not sure whether selectors have a natural length len(self._fd_to_key) is the natural length. bool(selector) uses selector.__length__() is defined, right? What do you think of having some mapping methods? - iter(selector), selector.keys(): : iter(self._fd_to_key), iterator on file descriptor numbers (int) - selector.values(): self._fd_to_key.values(), iterate on SelectorKey objects - selector.items(): self._fd_to_key.items(), iterator on (fd, SelectorKey) tuples "SelectorKey" name is confusing, it's not really a key as a dictionary dict. SelectorKey.fd *is* the key, Selector.event is not. "SelectorFile" or "SelectorItem" would be more explicit, no? By the way, is SelectorKey.fileobj always defined? If not, the documentation is wrong: the attribut should be documented as "Optional", as .data. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 09:28:26 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 07:28:26 +0000 Subject: [issue19177] Link to "TLS (Transport Layer Security) and SSL (Secure Socket Layer)" dead Message-ID: <1381044506.5.0.0801676720641.issue19177@psf.upfronthosting.co.za> New submission from Georg Brandl: This page doesn't seem to exist anymore. Antoine, you added the link, I guess it was an introductory page? Do you have another one in mind? It's still in the Wayback Machine, so for the time being we can replace the link to go there. ---------- assignee: pitrou components: Documentation messages: 199037 nosy: georg.brandl, pitrou priority: low severity: normal status: open title: Link to "TLS (Transport Layer Security) and SSL (Secure Socket Layer)" dead versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 09:29:12 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 07:29:12 +0000 Subject: [issue19177] Link to "TLS (Transport Layer Security) and SSL (Secure Socket Layer)" dead In-Reply-To: <1381044506.5.0.0801676720641.issue19177@psf.upfronthosting.co.za> Message-ID: <1381044552.98.0.765873955712.issue19177@psf.upfronthosting.co.za> Georg Brandl added the comment: The page is linked from the ssl docs in the "See also" section. The original link was http://www3.rad.com/networks/applications/secure/tls.htm ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 09:42:29 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 06 Oct 2013 07:42:29 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1381045349.72.0.892338347505.issue18874@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I recommend that tracemalloc focus exclusively on real allocations and ignore freelisting. The former are interesting because they directly affect performance. Freelists on the other hand are close to being free (as in beer). Measuring the freelist usage (or disabling it and then measuring) makes the proposal more complex than necessary and doesn't provide useful information (freelisting is no more interesting to track than saving a value in a static variable). Another suggestion is to expand the API to provide a way to identify a potential performance killer: the number of reallocs() than result in a new pointer (because the data moved). If you use hash table code from another project, be sure to check its licensing. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 10:01:31 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Oct 2013 08:01:31 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1381045349.72.0.892338347505.issue18874@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: 2013/10/6 Raymond Hettinger : > I recommend that tracemalloc focus exclusively on real allocations and ignore freelisting. The former are interesting because they directly affect performance. Freelists on the other hand are close to being free (as in beer). The version of tracemalloc available on PyPI has patches to disable completly freelists or trace usage of freelists. It is important in Python 2 because some lists had no limit, especially int types. The version I wrote for Python 3.4 does not anything on freelists. Did you read the source code of the repository on python.org? > Measuring the freelist usage (or disabling it and then measuring) makes the proposal more complex than necessary and doesn't provide useful information (freelisting is no more interesting to track than saving a value in a static variable). I would be nice to add metrics on freelists: number and size. Using tracemalloc, I'm trying to trace any byte. Such metrics can be optional (ex: a new method added to the Snapshot class). sys._debugmalloc() does already print all free lists. It should not be hard to write these information into structures, as I did for pymalloc statistics. Adding a method to read memory usage once is different than maintaining a structure (hash tables) to know that status anytime. > Another suggestion is to expand the API to provide a way to identify a potential performance killer: the number of reallocs() than result in a new pointer (because the data moved). I can add a global counter for each allocator (malloc, realloc, free) and each domain (raw, mem, obj). But I don't want to add a counter per trace, it would have a price on performances and memory footpring. > If you use hash table code from another project, be sure to check its licensing. Done: see https://mail.python.org/pipermail/python-legal-sig/2013-September/000044.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 10:19:21 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Oct 2013 08:19:21 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: Message-ID: STINNER Victor added the comment: >> If you use hash table code from another project, be sure to check its licensing. > Done: see > https://mail.python.org/pipermail/python-legal-sig/2013-September/000044.html I contacted the original author and python-legal mailing list. The BSD license asks to mention the license: done in Doc/license.html. Note: cfuhash hash table was heavily modified. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 10:22:11 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 08:22:11 +0000 Subject: [issue18646] Improve tutorial entry on 'Lambda Forms'. In-Reply-To: <1375562526.59.0.207872880438.issue18646@psf.upfronthosting.co.za> Message-ID: <3csyVB2ZrszSwZ@mail.python.org> Roundup Robot added the comment: New changeset d4eb47c3d681 by Georg Brandl in branch '2.7': Closes #18646: improve lambda docs in tutorial. Original patch by Terry Reedy. http://hg.python.org/cpython/rev/d4eb47c3d681 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 10:22:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 08:22:25 +0000 Subject: [issue18646] Improve tutorial entry on 'Lambda Forms'. In-Reply-To: <1375562526.59.0.207872880438.issue18646@psf.upfronthosting.co.za> Message-ID: <3csyVS59Dcz7Ljd@mail.python.org> Roundup Robot added the comment: New changeset ef1a17d5e263 by Georg Brandl in branch '3.3': Closes #18646: improve lambda docs in tutorial. Original patch by Terry Reedy. http://hg.python.org/cpython/rev/ef1a17d5e263 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 10:24:37 2013 From: report at bugs.python.org (Berker Peksag) Date: Sun, 06 Oct 2013 08:24:37 +0000 Subject: [issue18790] incorrect text in argparse add_help example In-Reply-To: <1377025104.92.0.641943823333.issue18790@psf.upfronthosting.co.za> Message-ID: <1381047877.56.0.595452750956.issue18790@psf.upfronthosting.co.za> Berker Peksag added the comment: This is fixed by changesets: - http://hg.python.org/cpython/rev/e2456381fa14 (3.4) - http://hg.python.org/cpython/rev/ee394a61dade (3.3) - http://hg.python.org/cpython/rev/c5f57a7fd4d8 (2.7) ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 10:25:57 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 08:25:57 +0000 Subject: [issue18646] Improve tutorial entry on 'Lambda Forms'. In-Reply-To: <1375562526.59.0.207872880438.issue18646@psf.upfronthosting.co.za> Message-ID: <1381047957.32.0.735673351406.issue18646@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks for the patch; I modified it a little (removed the sentence about the name attribute; this is too involved for the tutorial, and used "lambda expression"). Will fix more "lambda form" in the docs in another changeset. ---------- nosy: +georg.brandl resolution: fixed -> stage: committed/rejected -> patch review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 10:29:49 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 06 Oct 2013 08:29:49 +0000 Subject: [issue18725] Multiline shortening In-Reply-To: <1376388778.3.0.982069932509.issue18725@psf.upfronthosting.co.za> Message-ID: <1381048189.21.0.162327206583.issue18725@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In updated patch fixed a bug with final spaces. ---------- assignee: -> serhiy.storchaka Added file: http://bugs.python.org/file31971/textwrap_max_lines_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 10:31:12 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 08:31:12 +0000 Subject: [issue18972] Use argparse in email example scripts In-Reply-To: <1378652028.96.0.621116344908.issue18972@psf.upfronthosting.co.za> Message-ID: <1381048272.07.0.220486261595.issue18972@psf.upfronthosting.co.za> Georg Brandl added the comment: LGTM, please apply. (FileType is imported but not used in the second example?) ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 10:33:05 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 08:33:05 +0000 Subject: [issue18790] incorrect text in argparse add_help example In-Reply-To: <1377025104.92.0.641943823333.issue18790@psf.upfronthosting.co.za> Message-ID: <1381048385.31.0.725901113526.issue18790@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks for closing this! ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 10:34:25 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 06 Oct 2013 08:34:25 +0000 Subject: [issue18972] Use argparse in email example scripts In-Reply-To: <1378652028.96.0.621116344908.issue18972@psf.upfronthosting.co.za> Message-ID: <1381048465.57.0.00302040139946.issue18972@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: FileType have some problems (see issue13824). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 10:35:48 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 08:35:48 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <1381048548.39.0.502593987876.issue18758@psf.upfronthosting.co.za> Georg Brandl added the comment: Definitely not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 10:35:56 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 06 Oct 2013 08:35:56 +0000 Subject: [issue18646] Improve tutorial entry on 'Lambda Forms'. In-Reply-To: <1375562526.59.0.207872880438.issue18646@psf.upfronthosting.co.za> Message-ID: <1381048556.19.0.870848297984.issue18646@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I think this was a nice improvement. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 10:39:24 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 08:39:24 +0000 Subject: [issue18646] Improve tutorial entry on 'Lambda Forms'. In-Reply-To: <1375562526.59.0.207872880438.issue18646@psf.upfronthosting.co.za> Message-ID: <1381048764.8.0.700938994347.issue18646@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 10:42:53 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 08:42:53 +0000 Subject: [issue19178] Entries for "module" and "package" in glossary Message-ID: <1381048973.81.0.279739415702.issue19178@psf.upfronthosting.co.za> New submission from Georg Brandl: >From Kevin Murphy on docs@: > I think newbies might like having 'module' and 'package' defined in > the glossary, e.g. http://docs.python.org/2/glossary.html I agree. ---------- assignee: docs at python components: Documentation messages: 199052 nosy: docs at python, georg.brandl priority: normal severity: normal stage: needs patch status: open title: Entries for "module" and "package" in glossary type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 10:45:49 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 08:45:49 +0000 Subject: [issue18972] Use argparse in email example scripts In-Reply-To: <1378652028.96.0.621116344908.issue18972@psf.upfronthosting.co.za> Message-ID: <3csz1S6b8HzSb8@mail.python.org> Roundup Robot added the comment: New changeset 1b1b1d4b28e8 by Serhiy Storchaka in branch 'default': Issue #18972: Modernize email examples and use the argparse module in them. http://hg.python.org/cpython/rev/1b1b1d4b28e8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 10:46:53 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 06 Oct 2013 08:46:53 +0000 Subject: [issue18972] Use argparse in email example scripts In-Reply-To: <1378652028.96.0.621116344908.issue18972@psf.upfronthosting.co.za> Message-ID: <1381049213.61.0.533645190497.issue18972@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Georg for the review ---------- assignee: docs at python -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 10:48:02 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 08:48:02 +0000 Subject: [issue18927] Lock.acquire() docs incorrect about negative timeout In-Reply-To: <1378331648.69.0.879815072803.issue18927@psf.upfronthosting.co.za> Message-ID: <3csz422X5Cz7Ljp@mail.python.org> Roundup Robot added the comment: New changeset ff5fb419967f by Georg Brandl in branch '3.3': Closes #18927: Lock.acquire only accepts -1 or positive values for timeout. http://hg.python.org/cpython/rev/ff5fb419967f ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 10:50:22 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 08:50:22 +0000 Subject: [issue13951] Document that Seg Fault in .so called by ctypes causes the interpreter to Seg Fault In-Reply-To: <1328535030.63.0.73417525944.issue13951@psf.upfronthosting.co.za> Message-ID: <3csz6j6Z3lz7Ljn@mail.python.org> Roundup Robot added the comment: New changeset 1e163fdf8cf3 by Georg Brandl in branch '3.3': Closes #13951: Add a "faulthandler" reference in the ctypes docs talking about crashes. http://hg.python.org/cpython/rev/1e163fdf8cf3 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 10:59:21 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 06 Oct 2013 08:59:21 +0000 Subject: [issue19145] Inconsistent behaviour in itertools.repeat when using negative times In-Reply-To: <1380727396.47.0.412229295257.issue19145@psf.upfronthosting.co.za> Message-ID: <1381049961.75.0.637641062158.issue19145@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Added file: http://bugs.python.org/file31972/itertools_repeat.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 11:10:07 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 06 Oct 2013 09:10:07 +0000 Subject: [issue19119] duplicate test name in Lib/test/test_heapq.py In-Reply-To: <1380401602.68.0.29924709136.issue19119@psf.upfronthosting.co.za> Message-ID: <1381050607.6.0.549957074187.issue19119@psf.upfronthosting.co.za> Vajrasky Kok added the comment: I have played around with this test. The major issue (there are other issues as well but not so difficult) is whether nlargest and nsmallest should support iterator that could be endless iterator or reject it (by checking __len__ attribute) straight away. Once we decide that, the fix should be not that hard. For example, I want to get 2 largest numbers from fibonacci number series. heapq.nlargest(2, fibonacci_iterator) => what is the answer for this? Exception or let it be stuck forever. ---------- nosy: +vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 11:20:14 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 09:20:14 +0000 Subject: [issue18529] Use long dash In-Reply-To: <1374499433.16.0.583158051605.issue18529@psf.upfronthosting.co.za> Message-ID: <1381051214.29.0.945336706926.issue18529@psf.upfronthosting.co.za> Georg Brandl added the comment: Agreed. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 11:37:25 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 06 Oct 2013 09:37:25 +0000 Subject: [issue19172] selectors: add keys() method In-Reply-To: <1380984038.36.0.521182029078.issue19172@psf.upfronthosting.co.za> Message-ID: <1381052245.58.0.899226793327.issue19172@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > BaseSelector.register(fd) raises a KeyError if fd is already registered, which means that any selector must know the list of all registered FDs. For EpollSelector, the list may be inconsistent *if* the epoll is object is modified externally, but it's really a corner case. Yes, and there's nothing we can do about it :-( > What do you think of having some mapping methods? > > - iter(selector), selector.keys(): : iter(self._fd_to_key), iterator on file descriptor numbers (int) > - selector.values(): self._fd_to_key.values(), iterate on SelectorKey objects > - selector.items(): self._fd_to_key.items(), iterator on (fd, SelectorKey) tuples I don't know, it makes me uncomfortable treating a selector like a plain container. > "SelectorKey" name is confusing, it's not really a key as a dictionary dict. SelectorKey.fd *is* the key, Selector.event is not. > > "SelectorFile" or "SelectorItem" would be more explicit, no? It's more key as "indexing key", or token: it's the interface between the selector and the external world. The FD "is" indeed the key internally, but that's an implementation detail. I'd really like to have Guido's feeling regarding the above questions. > By the way, is SelectorKey.fileobj always defined? If not, the documentation is wrong: the attribut should be documented as "Optional", as .data. Yes, it's always defined: it's the object passed to register(). ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 11:44:33 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 09:44:33 +0000 Subject: [issue19129] 6.2.1. Regular Expression Syntax flags In-Reply-To: <1380470947.27.0.0292455287204.issue19129@psf.upfronthosting.co.za> Message-ID: <1381052673.86.0.125936166294.issue19129@psf.upfronthosting.co.za> Georg Brandl added the comment: This is intended, the U flag is a legacy flag that is not supposed to by used in new code. ---------- nosy: +georg.brandl resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 12:08:15 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 10:08:15 +0000 Subject: [issue15956] backreference to named group does not work In-Reply-To: <1347888827.23.0.363134887653.issue15956@psf.upfronthosting.co.za> Message-ID: <3ct0rZ30HrzRNt@mail.python.org> Roundup Robot added the comment: New changeset bee2736296c5 by Georg Brandl in branch '2.7': Closes #15956: improve documentation of named groups and how to reference them. http://hg.python.org/cpython/rev/bee2736296c5 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 12:08:26 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 10:08:26 +0000 Subject: [issue15956] backreference to named group does not work In-Reply-To: <1347888827.23.0.363134887653.issue15956@psf.upfronthosting.co.za> Message-ID: <3ct0rn4YQQz7Ljp@mail.python.org> Roundup Robot added the comment: New changeset f765a29309d1 by Georg Brandl in branch '3.3': Closes #15956: improve documentation of named groups and how to reference them. http://hg.python.org/cpython/rev/f765a29309d1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 12:10:21 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 10:10:21 +0000 Subject: [issue15956] backreference to named group does not work In-Reply-To: <1347888827.23.0.363134887653.issue15956@psf.upfronthosting.co.za> Message-ID: <1381054221.42.0.937988370865.issue15956@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks for the patch. I made a few changes, such as explaining what the example pattern does. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 12:50:31 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 10:50:31 +0000 Subject: [issue15172] Document nasm-2.10.01 as required version for openssl In-Reply-To: <1340569947.64.0.165180800824.issue15172@psf.upfronthosting.co.za> Message-ID: <1381056631.61.0.646077558076.issue15172@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed, I guess? ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 12:53:42 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 10:53:42 +0000 Subject: [issue18229] attribute headers of http.server.BaseHTTPRequestHandler sometimes does not exists In-Reply-To: <1371376761.5.0.41138715811.issue18229@psf.upfronthosting.co.za> Message-ID: <1381056822.14.0.617925139945.issue18229@psf.upfronthosting.co.za> Georg Brandl added the comment: This appears to be a bug in the _lowerHTTP module, which does not ship with Python. ---------- nosy: +georg.brandl resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 13:01:32 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 11:01:32 +0000 Subject: [issue19179] doc bug: confusing table of values In-Reply-To: Message-ID: <52514342.6020404@python.org> New submission from Georg Brandl: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [From Jason Scherer on docs at python.org] On this page: http://docs.python.org/2/library/xml.html The table of truth values is a bit confusing because it's not clear from the context what it's actually saying is true, or false. It might be better to replace the words "true" and "false" with "vulnerable" and "protected" or something like that. Otherwise, I can't tell if "true" means "yes, this parser is vulnerable to this attack" or if "true" means "yes, this parser is protected from this attack" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (GNU/Linux) iEYEARECAAYFAlJRQ0IACgkQN9GcIYhpnLCziACeO3MzVKKcH8RLlU+w11hAy9Kh wo4AnRYvAXuCCLdlrED2SHJ0oexW1vj0 =dxxa -----END PGP SIGNATURE----- ---------- messages: 199066 nosy: georg.brandl priority: normal severity: normal status: open title: doc bug: confusing table of values _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 13:02:09 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 11:02:09 +0000 Subject: [issue19179] doc bug: confusing table of values In-Reply-To: <52514342.6020404@python.org> Message-ID: <1381057329.07.0.350155768886.issue19179@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> docs at python components: +Documentation nosy: +christian.heimes, docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 13:03:16 2013 From: report at bugs.python.org (Martin Panter) Date: Sun, 06 Oct 2013 11:03:16 +0000 Subject: [issue12350] Improve stat_result.st_blocks and st_blksize documentation In-Reply-To: <1308256127.22.0.581997138097.issue12350@psf.upfronthosting.co.za> Message-ID: <1381057396.18.0.224946778178.issue12350@psf.upfronthosting.co.za> Martin Panter added the comment: What happened to this patch? The current documentation is very misleading because the descriptions of the two block fields appear to complement each other. ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 13:04:30 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Oct 2013 11:04:30 +0000 Subject: [issue19177] Link to "TLS (Transport Layer Security) and SSL (Secure Socket Layer)" dead In-Reply-To: <1381044506.5.0.0801676720641.issue19177@psf.upfronthosting.co.za> Message-ID: <1381057470.32.0.114100674771.issue19177@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think we could use the Apache SSL intro: http://httpd.apache.org/docs/trunk/en/ssl/ssl_intro.html (some fine points are a bit outdated, but the general discourse looks fine) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 13:07:47 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 11:07:47 +0000 Subject: [issue19180] some RFC references could be updated In-Reply-To: <519ADE01.7090104@ieca.com> Message-ID: <525144B9.3040305@python.org> New submission from Georg Brandl: -------- Original-Nachricht -------- Betreff: [docs] some RFC references could be updated Datum: Mon, 20 May 2013 22:37:53 -0400 Von: Sean Turner An: docs at python.org Hi, Just starting to learn python and have noted that at the bottom of this page: http://docs.python.org/3/library/ssl.html There's a couple of out of date references: 0) RFC 1750 has been been obsoleted by RFC 4086 so maybe this is a better reference (and I prefer the datatracker view as opposed to the tools view): http://datatracker.ietf.org/doc/rfc4086/ Same could be done on this link: http://docs.python.org/3.4/library/ssl.html 1) RFC 3280 has been obsoleted by RFC 5280 so maybe: http://datatracker.ietf.org/doc/rfc5280/ Same could be done on this link: http://docs.python.org/3.4/library/ssl.html 2) RFC 4366 has been obsoleted by RFC 6066 so maybe: http://datatracker.ietf.org/doc/rfc6066/ On http://docs.python.org/3.4/library/ssl.html you could probably just drop the reference and change in the ssl.HAS_SNI section. 3) The link to TLS seems broken maybe just point to: TLS 1.0 http://datatracker.ietf.org/doc/rfc2246/ TLS 1.1 http://datatracker.ietf.org/doc/rfc4346/ TLS 1.2 http://datatracker.ietf.org/doc/rfc5246/ SSL 3.0 http://datatracker.ietf.org/doc/rfc6101/ Actually the same link is broken on: http://docs.python.org/3.4/library/ssl.html 4) (this is a shameless plug) Might be worth adding a reference in the ssl.PROTOCOL_SSLv2 section that points to: http://datatracker.ietf.org/doc/rfc6146/ ---------- assignee: docs at python components: Documentation messages: 199069 nosy: docs at python, georg.brandl priority: normal severity: normal status: open title: some RFC references could be updated _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 13:28:44 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 11:28:44 +0000 Subject: [issue19181] ftp.cwi.nl used as example does not exist anymore In-Reply-To: <002d01cded5f$6d1fa980$475efc80$@gravitymarketing.com.au> Message-ID: <525149A2.2010402@python.org> New submission from Georg Brandl: ftp.python.org doesn't seem to listen on port 21 either... anyone know a public FTP server we can use as example? -------- Original-Nachricht -------- Betreff: [docs] quick note on ftplib for python Datum: Tue, 8 Jan 2013 16:17:14 +1100 Von: Jeremy Orchard An: Hello, Quick note, ftplib gives example host ftp.cwi.nl In its documentation which is a url which is no longer active? when you try the dummy example, ftplib doesn?t really output a clear error so it might be worth updating the host, (though most programmers should assume this quickly), Python 2.7 > documentation for ftplib which introduced the feature FTP_TLS gives the examplehost ftp.python.org which is possibly the ideal candidate for the change. Not really a bug, thought id save you the trouble by reporting just incase, it was something worth changing. ---------- assignee: docs at python components: Documentation messages: 199070 nosy: docs at python, georg.brandl priority: normal severity: normal status: open title: ftp.cwi.nl used as example does not exist anymore _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 13:52:32 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Oct 2013 11:52:32 +0000 Subject: [issue19181] ftp.cwi.nl used as example does not exist anymore In-Reply-To: <525149A2.2010402@python.org> Message-ID: <1381060352.04.0.896759535158.issue19181@psf.upfronthosting.co.za> Antoine Pitrou added the comment: ftp://ftp.ietf.org/ ? ftp://ftp.debian.org/ ? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 13:56:47 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Oct 2013 11:56:47 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1381060607.88.0.726719859796.issue17618@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, I think the following comments (Serhiy's) should be implemented: """As for interface, I think 'adobe' flag should be false by default. It makes encoder simpler. ascii85 encoder in Go's standard library doesn't wrap nor add Adobe's brackets. btoa/atob functions looks redundant as we can just use a85encode/a85decoder with appropriate options.""" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 14:51:23 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 06 Oct 2013 12:51:23 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <1381063883.47.0.239390684809.issue18758@psf.upfronthosting.co.za> Ezio Melotti added the comment: Serhiy, are you planning to work on more patches or can this be closed? ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 15:39:44 2013 From: report at bugs.python.org (Esa Peuha) Date: Sun, 06 Oct 2013 13:39:44 +0000 Subject: [issue19182] Socket leak in logging.handlers Message-ID: <1381066784.25.0.989730227562.issue19182@psf.upfronthosting.co.za> New submission from Esa Peuha: Running test_logging produces the following: /home/peuha/python/cpython/Lib/logging/handlers.py:550: ResourceWarning: unclosed self.retryTime = now + self.retryPeriod /home/peuha/python/cpython/Lib/logging/handlers.py:550: ResourceWarning: unclosed self.retryTime = now + self.retryPeriod This turns out to be a bug in SocketHandler.makeSocket; the attachment should fix it. ---------- components: Library (Lib) files: logging.handlers.diff keywords: patch messages: 199074 nosy: Esa.Peuha priority: normal severity: normal status: open title: Socket leak in logging.handlers type: behavior Added file: http://bugs.python.org/file31973/logging.handlers.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 16:28:09 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Oct 2013 14:28:09 +0000 Subject: [issue19172] selectors: add keys() method In-Reply-To: <1381052245.58.0.899226793327.issue19172@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: 2013/10/6 Charles-Fran?ois Natali : >> BaseSelector.register(fd) raises a KeyError if fd is already registered, which means that any selector must know the list of all registered FDs. For EpollSelector, the list may be inconsistent *if* the epoll is object is modified externally, but it's really a corner case. > > Yes, and there's nothing we can do about it :-( Oh, I just mentioned to corner case to say that it would nice to expose the length of a selector. >> What do you think of having some mapping methods? >> >> - iter(selector), selector.keys(): : iter(self._fd_to_key), iterator on file descriptor numbers (int) >> - selector.values(): self._fd_to_key.values(), iterate on SelectorKey objects >> - selector.items(): self._fd_to_key.items(), iterator on (fd, SelectorKey) tuples > > I don't know, it makes me uncomfortable treating a selector like > a plain container. I don't know if there is a real use case. >> By the way, is SelectorKey.fileobj always defined? If not, the documentation is wrong: the attribut should be documented as "Optional", as .data. > > Yes, it's always defined: it's the object passed to register(). Oh, selector.register(0).fileobj gives me 0... I didn't know that 0 is a file object :-) I would expect .fileobj=None and .fd=0. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 16:48:22 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 06 Oct 2013 14:48:22 +0000 Subject: [issue19172] selectors: add keys() method In-Reply-To: <1380984038.36.0.521182029078.issue19172@psf.upfronthosting.co.za> Message-ID: <1381070902.41.0.865638927541.issue19172@psf.upfronthosting.co.za> Guido van Rossum added the comment: No time to follow this in detail, but one thing: please do not make the selector appear "false" under *any* circumstances. I've seen too many code write "if foo" where they meant "if foo is not None" and get in trouble because foo wasn't None but happened to have no content. (See e.g. recent issue 19097, although the situation there is even more complicated.) (And for things formally deriving from Container it's a different thing. But that shouldn't be done lightly.) I think it's useful to be able to get the keys; it would be nice if that was an O(1) operation so you can also check for emptiness without needing a second method. Perhaps the method shouldn't be called keys() to avoid any confusion with subclasses of the Container ABC? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 16:50:40 2013 From: report at bugs.python.org (Jordan Szubert) Date: Sun, 06 Oct 2013 14:50:40 +0000 Subject: [issue18229] attribute headers of http.server.BaseHTTPRequestHandler sometimes does not exists In-Reply-To: <1371376761.5.0.41138715811.issue18229@psf.upfronthosting.co.za> Message-ID: <1381071040.18.0.246214788539.issue18229@psf.upfronthosting.co.za> Jordan Szubert added the comment: what _lowerHTTP does is try read request header 'X-Forwarded-For', but instance of request handler have attribute headers only if thing that connected to port where server listens happened to send valid enough http request my problem is, documentation does not help write code that would not crash when client sends random bytes instead of expected http request ---------- resolution: invalid -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 16:58:28 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 06 Oct 2013 14:58:28 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm Message-ID: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> New submission from Christian Heimes: The patch implements the current state of PEP 456 plus a configure option to select the hash algorithm. I have tested it only on 64bit Linux so far. ---------- components: Interpreter Core files: pep-0456-1.patch keywords: patch messages: 199078 nosy: christian.heimes, ncoghlan, pitrou priority: normal severity: normal stage: patch review status: open title: PEP 456 Secure and interchangeable hash algorithm type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file31974/pep-0456-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 16:59:56 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Oct 2013 14:59:56 +0000 Subject: [issue19172] selectors: add keys() method In-Reply-To: <1381070902.41.0.865638927541.issue19172@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > Perhaps the method shouldn't be called keys() to avoid any confusion with subclasses of the Container ABC? If you don't want to rename the SelectorKey class, rename the method to get_keys(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 17:01:11 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Oct 2013 15:01:11 +0000 Subject: [issue19172] selectors: add keys() method In-Reply-To: <1381070902.41.0.865638927541.issue19172@psf.upfronthosting.co.za> Message-ID: <1381071669.2488.7.camel@fsol> Antoine Pitrou added the comment: FWIW, I think the "ideal" solution would be for keys() (*) to return a read-only Mapping implementation, allowing for file object lookup (using __getitem__) as well as iteration on SelectorKeys (using __iter__) and fast emptiness checking (using __len__). (to implement Mapping, you can subclass Mapping and implement __getitem__, __len__ and __iter__) (*) or a better name ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 17:02:03 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Oct 2013 15:02:03 +0000 Subject: [issue19172] selectors: add keys() method In-Reply-To: <1381071669.2488.7.camel@fsol> Message-ID: <1381071722.2488.8.camel@fsol> Antoine Pitrou added the comment: > FWIW, I think the "ideal" solution would be for keys() (*) to return a > read-only Mapping implementation, allowing for file object lookup (using > __getitem__) as well as iteration on SelectorKeys (using __iter__) and > fast emptiness checking (using __len__). Actually, you would use values() to iterate on SelectorKeys. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 17:07:30 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Oct 2013 15:07:30 +0000 Subject: [issue19182] Socket leak in logging.handlers In-Reply-To: <1381066784.25.0.989730227562.issue19182@psf.upfronthosting.co.za> Message-ID: <1381072050.97.0.109562481546.issue19182@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> vinay.sajip nosy: +vinay.sajip stage: -> patch review versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 17:18:33 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 06 Oct 2013 15:18:33 +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: <1381072713.14.0.898477062922.issue16355@psf.upfronthosting.co.za> Vajrasky Kok added the comment: I pep-8 Phil Connell's work and revamped the unit test based on R. David Murray's request. ---------- nosy: +vajrasky Added file: http://bugs.python.org/file31975/issue16355_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 17:39:49 2013 From: report at bugs.python.org (Jordan Szubert) Date: Sun, 06 Oct 2013 15:39:49 +0000 Subject: [issue18229] attribute headers of http.server.BaseHTTPRequestHandler sometimes does not exists In-Reply-To: <1371376761.5.0.41138715811.issue18229@psf.upfronthosting.co.za> Message-ID: <1381073989.11.0.419670748927.issue18229@psf.upfronthosting.co.za> Jordan Szubert added the comment: #minimal server: #!/c/Python33/python.exe from http.server import HTTPServer as S, BaseHTTPRequestHandler as H class HNDL(H): def log_request(req,code): print('header is',req.headers.get('X-Forwarder-For'),', code',code) H.log_request(req) s=S(('',54321),HNDL) s.serve_forever() #non-http client: #!/c/Python33/python.exe import socket,os s=socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(('localhost', 54321)) s.sendall(os.urandom(1024)) buf=s.recv(2048) s.close() print(buf) #running server: $ ./server.py 127.0.0.1 - - [06/Oct/2013 17:33:41] code 400, message Bad HTTP/0.9 request type ('E)\xaeE^2?\xf2W\x8f\xb3aG') ---------------------------------------- Exception happened during processing of request from ('127.0.0.1', 18234) Traceback (most recent call last): File "c:\Python33\lib\socketserver.py", line 306, in _handle_request_noblock self.process_request(request, client_address) File "c:\Python33\lib\socketserver.py", line 332, in process_request self.finish_request(request, client_address) File "c:\Python33\lib\socketserver.py", line 345, in finish_request self.RequestHandlerClass(request, client_address, self) File "c:\Python33\lib\socketserver.py", line 666, in __init__ self.handle() File "c:\Python33\lib\http\server.py", line 400, in handle self.handle_one_request() File "c:\Python33\lib\http\server.py", line 380, in handle_one_request if not self.parse_request(): File "c:\Python33\lib\http\server.py", line 311, in parse_request "Bad HTTP/0.9 request type (%r)" % command) File "c:\Python33\lib\http\server.py", line 428, in send_error self.send_response(code, message) File "c:\Python33\lib\http\server.py", line 443, in send_response self.log_request(code) File "./server.py", line 5, in log_request print('header is',req.headers.get('X-Forwarder-For'),', code',code) AttributeError: 'HNDL' object has no attribute 'headers' ---------------------------------------- #running client: $ ./client.py b'' $ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 17:42:18 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Oct 2013 15:42:18 +0000 Subject: [issue11798] Test cases not garbage collected after run In-Reply-To: <1302192957.51.0.450503345302.issue11798@psf.upfronthosting.co.za> Message-ID: <1381074138.02.0.827709701088.issue11798@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 17:43:34 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 15:43:34 +0000 Subject: [issue18229] attribute headers of http.server.BaseHTTPRequestHandler sometimes does not exists In-Reply-To: <1371376761.5.0.41138715811.issue18229@psf.upfronthosting.co.za> Message-ID: <1381074214.49.0.502571202982.issue18229@psf.upfronthosting.co.za> Georg Brandl added the comment: OK, so I guess it could be documented that the "headers" attribute is not set if the request cannot be parsed as a HTTP request. That's a valid point. By the way, you should really call your "self" argument "self". ---------- versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 17:59:24 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Oct 2013 15:59:24 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1381075164.33.0.595473516916.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: ec121a72e848.patch: updated patch, based on revision ec121a72e848 of the tracemalloc repository. ---------- Added file: http://bugs.python.org/file31976/ec121a72e848.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 17:59:35 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Oct 2013 15:59:35 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1381075175.76.0.527761369245.issue18874@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file31806/21f7c3df0f15.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 18:00:47 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Oct 2013 16:00:47 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1381075247.93.0.803542400137.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: TODO list: * unit test for task reschedule * hash_destroy(): use a double-linked list to avoid the O(n) complexity? * Snapshot.add_process_memory_metrics(): * rename metrics on Windows? * more metrics on Linux? * implement get_process_memory() on BSD * add unit test for the command line interface * add unit test for DisplayTopTask/TakeSnapshot.start() * remove TRACE_RAW_MALLOC, always define it? * test_io.check_interrupted_write() enters a deadlock when tracemalloc task is called before _pyio is blocked in the C write() function: the SIGINT does not interrupt write() but another instruction * hide _tracemalloc._atexit()? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 18:11:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 16:11:32 +0000 Subject: [issue12350] Improve stat_result.st_blocks and st_blksize documentation In-Reply-To: <1308256127.22.0.581997138097.issue12350@psf.upfronthosting.co.za> Message-ID: <3ct8vl6gp0zShd@mail.python.org> Roundup Robot added the comment: New changeset ef5aa8d7e932 by Georg Brandl in branch '3.3': Closes #12350: clarify blocks/block size members of stat result. http://hg.python.org/cpython/rev/ef5aa8d7e932 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 18:11:39 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 16:11:39 +0000 Subject: [issue12350] Improve stat_result.st_blocks and st_blksize documentation In-Reply-To: <1308256127.22.0.581997138097.issue12350@psf.upfronthosting.co.za> Message-ID: <3ct8vv0mMxz7Lkf@mail.python.org> Roundup Robot added the comment: New changeset c32657e278f6 by Georg Brandl in branch '2.7': Closes #12350: clarify blocks/block size members of stat result. http://hg.python.org/cpython/rev/c32657e278f6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 18:17:34 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 16:17:34 +0000 Subject: [issue19181] ftp.cwi.nl used as example does not exist anymore In-Reply-To: <525149A2.2010402@python.org> Message-ID: <3ct92k0kmXz7Ljd@mail.python.org> Roundup Robot added the comment: New changeset d41aab121366 by Georg Brandl in branch '3.3': Closes #19181: replace non-existing host ftp.cwi.nl with ftp.debian.org in ftplib example. http://hg.python.org/cpython/rev/d41aab121366 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 18:17:42 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 16:17:42 +0000 Subject: [issue19181] ftp.cwi.nl used as example does not exist anymore In-Reply-To: <525149A2.2010402@python.org> Message-ID: <3ct92t27Rbz7Lkf@mail.python.org> Roundup Robot added the comment: New changeset 635e6239aa8e by Georg Brandl in branch '2.7': Closes #19181: replace non-existing host ftp.cwi.nl with ftp.debian.org in ftplib example. http://hg.python.org/cpython/rev/635e6239aa8e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 18:19:58 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 16:19:58 +0000 Subject: [issue19177] Link to "TLS (Transport Layer Security) and SSL (Secure Socket Layer)" dead In-Reply-To: <1381044506.5.0.0801676720641.issue19177@psf.upfronthosting.co.za> Message-ID: <3ct95T2PL7z7Ljd@mail.python.org> Roundup Robot added the comment: New changeset 03e8ba26fb80 by Georg Brandl in branch '2.7': Closes #19177: replace dead link to SSL/TLS introduction with the version from Apache. http://hg.python.org/cpython/rev/03e8ba26fb80 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 18:20:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 16:20:19 +0000 Subject: [issue19177] Link to "TLS (Transport Layer Security) and SSL (Secure Socket Layer)" dead In-Reply-To: <1381044506.5.0.0801676720641.issue19177@psf.upfronthosting.co.za> Message-ID: <3ct95t6Kwzz7Lk5@mail.python.org> Roundup Robot added the comment: New changeset 9f3da04a0045 by Georg Brandl in branch '3.3': Closes #19177: replace dead link to SSL/TLS introduction with the version from Apache. http://hg.python.org/cpython/rev/9f3da04a0045 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 18:32:07 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 16:32:07 +0000 Subject: [issue17745] "packaging" no longer planned to be included In-Reply-To: <1366070463.53.0.324723238706.issue17745@psf.upfronthosting.co.za> Message-ID: <1381077127.27.0.495805757849.issue17745@psf.upfronthosting.co.za> Georg Brandl added the comment: Currently we have packaging listed as "deferred to post-3.3" which is certainly not wrong. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 18:36:47 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 16:36:47 +0000 Subject: [issue17725] English mistake in Extending and Embedding Python doc page. In-Reply-To: <1365923367.93.0.414383739407.issue17725@psf.upfronthosting.co.za> Message-ID: <3ct9St5xrNzLr2@mail.python.org> Roundup Robot added the comment: New changeset 8ce8eae6abfa by Georg Brandl in branch '3.3': Closes #17725: small grammar fix. http://hg.python.org/cpython/rev/8ce8eae6abfa ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 18:37:21 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 16:37:21 +0000 Subject: [issue17725] English mistake in Extending and Embedding Python doc page. In-Reply-To: <1365923367.93.0.414383739407.issue17725@psf.upfronthosting.co.za> Message-ID: <3ct9TX650qzQLd@mail.python.org> Roundup Robot added the comment: New changeset 27f1a3b0b340 by Georg Brandl in branch '2.7': Closes #17725: small grammar fix. http://hg.python.org/cpython/rev/27f1a3b0b340 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 18:46:52 2013 From: report at bugs.python.org (Ned Batchelder) Date: Sun, 06 Oct 2013 16:46:52 +0000 Subject: [issue19184] dis module has incorrect docs for RAISE_VARARGS Message-ID: <1381078012.05.0.236677780468.issue19184@psf.upfronthosting.co.za> New submission from Ned Batchelder: The order of values on the stack is backwards for RAISE_VARARGS. The docs say: "Raises an exception. argc indicates the number of parameters to the raise statement, ranging from 0 to 3. The handler will find the traceback as TOS2, the parameter as TOS1, and the exception as TOS." But in fact, the order is reverse of that. In the one-parameter case, the exception is TOS, in the two-parameter case, the value is TOS, and in the three-parameter case, the traceback is TOS. Not sure how to write that concisely, thought. :) ---------- assignee: docs at python components: Documentation keywords: easy messages: 199096 nosy: docs at python, nedbat priority: normal severity: normal status: open title: dis module has incorrect docs for RAISE_VARARGS versions: Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 18:47:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 16:47:51 +0000 Subject: [issue15213] _PyOS_URandom documentation In-Reply-To: <1340845023.83.0.143337072725.issue15213@psf.upfronthosting.co.za> Message-ID: <3ct9jg0nqQzQsm@mail.python.org> Roundup Robot added the comment: New changeset 3e5078c3784e by Georg Brandl in branch '2.7': Closes #15213: update comment for _PyOS_URandom http://hg.python.org/cpython/rev/3e5078c3784e ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 18:56:21 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 16:56:21 +0000 Subject: [issue11807] Documentation of add_subparsers lacks information about parametres In-Reply-To: <1302340872.99.0.0231583237732.issue11807@psf.upfronthosting.co.za> Message-ID: <3ct9vS3TLlz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset b930b4e67c8a by Georg Brandl in branch '3.3': Closes #11807: document argparse add_subparsers method better. http://hg.python.org/cpython/rev/b930b4e67c8a ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 18:56:22 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 16:56:22 +0000 Subject: [issue15213] _PyOS_URandom documentation In-Reply-To: <1340845023.83.0.143337072725.issue15213@psf.upfronthosting.co.za> Message-ID: <3ct9vT1mBXz7Ljg@mail.python.org> Roundup Robot added the comment: New changeset 176bb5a98463 by Georg Brandl in branch '3.3': Closes #15213: update comment for _PyOS_URandom http://hg.python.org/cpython/rev/176bb5a98463 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 18:56:28 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 16:56:28 +0000 Subject: [issue11807] Documentation of add_subparsers lacks information about parametres In-Reply-To: <1302340872.99.0.0231583237732.issue11807@psf.upfronthosting.co.za> Message-ID: <3ct9vb2kNXz7LjR@mail.python.org> Roundup Robot added the comment: New changeset d5027e489c25 by Georg Brandl in branch '2.7': Closes #11807: document argparse add_subparsers method better. http://hg.python.org/cpython/rev/d5027e489c25 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 18:57:21 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 16:57:21 +0000 Subject: [issue15228] os.utime() docs not clear on behavior on nonexistant files In-Reply-To: <1341086123.85.0.135321380132.issue15228@psf.upfronthosting.co.za> Message-ID: <3ct9wd1LB6z7Ljp@mail.python.org> Roundup Robot added the comment: New changeset 62321359c35b by Georg Brandl in branch '3.3': Closes #15228: remove reference to Unix "touch"; it is confusing since the path needs to exist for os.utime() to succeed http://hg.python.org/cpython/rev/62321359c35b ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 19:01:18 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 17:01:18 +0000 Subject: [issue15432] gzip.py: mtime argument only since python 2.7 In-Reply-To: <1343035771.6.0.0683574772688.issue15432@psf.upfronthosting.co.za> Message-ID: <3ctB194w68z7LjS@mail.python.org> Roundup Robot added the comment: New changeset 74ae6064d3e8 by Georg Brandl in branch '2.7': Closes #15432: GzipFile mtime argument was added in 2.7. http://hg.python.org/cpython/rev/74ae6064d3e8 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 19:01:29 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 17:01:29 +0000 Subject: [issue15432] gzip.py: mtime argument only since python 2.7 In-Reply-To: <1343035771.6.0.0683574772688.issue15432@psf.upfronthosting.co.za> Message-ID: <3ctB1P2tMyz7Ljq@mail.python.org> Roundup Robot added the comment: New changeset ad19a9982b03 by Georg Brandl in branch '3.3': Closes #15432: GzipFile mtime argument is new in 3.1. http://hg.python.org/cpython/rev/ad19a9982b03 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 19:35:45 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 17:35:45 +0000 Subject: [issue14101] example function in tertools.count docstring is misindented In-Reply-To: <1330027633.46.0.670191761588.issue14101@psf.upfronthosting.co.za> Message-ID: <1381080945.89.0.880090170651.issue14101@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> duplicate status: open -> closed superseder: -> Intendation issue in example code in itertools.count documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 19:36:11 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 17:36:11 +0000 Subject: [issue19182] Socket leak in logging.handlers In-Reply-To: <1381066784.25.0.989730227562.issue19182@psf.upfronthosting.co.za> Message-ID: <3ctBnQ314LzS9B@mail.python.org> Roundup Robot added the comment: New changeset bd314db5532d by Vinay Sajip in branch 'default': Issue #19182: Fixed socket leak on exception when connecting. http://hg.python.org/cpython/rev/bd314db5532d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 19:40:04 2013 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 06 Oct 2013 17:40:04 +0000 Subject: [issue19182] Socket leak in logging.handlers In-Reply-To: <1381066784.25.0.989730227562.issue19182@psf.upfronthosting.co.za> Message-ID: <1381081204.85.0.436214844045.issue19182@psf.upfronthosting.co.za> Vinay Sajip added the comment: Thanks for the report and patch. This issue only applies to Python 3.4 - it was in new code added in the default branch, and so does not apply to earlier Python releases. ---------- resolution: -> fixed status: open -> closed versions: -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 19:41:07 2013 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 06 Oct 2013 17:41:07 +0000 Subject: [issue18939] Venv docs regarding original python install In-Reply-To: <1378418560.94.0.0370764034466.issue18939@psf.upfronthosting.co.za> Message-ID: <1381081267.79.0.147128933399.issue18939@psf.upfronthosting.co.za> Vinay Sajip added the comment: Closing, as documentation has now been updated. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 20:29:15 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 18:29:15 +0000 Subject: [issue10709] Misc/AIX-NOTES needs updating In-Reply-To: <1292428256.05.0.89055748757.issue10709@psf.upfronthosting.co.za> Message-ID: <1381084155.22.0.574809001581.issue10709@psf.upfronthosting.co.za> Georg Brandl added the comment: Ping? :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 20:45:38 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 18:45:38 +0000 Subject: [issue11585] Documentation 1.8 shows Python 2 example In-Reply-To: <1300369208.25.0.790450898206.issue11585@psf.upfronthosting.co.za> Message-ID: <1381085138.05.0.629564574638.issue11585@psf.upfronthosting.co.za> Georg Brandl added the comment: This has since been fixed already. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 20:50:30 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 18:50:30 +0000 Subject: [issue11789] Extend upon metaclass/type class documentation, here: zope.interface and usage of instances of classes as base classes In-Reply-To: <1302126921.15.0.0291977163306.issue11789@psf.upfronthosting.co.za> Message-ID: <1381085430.87.0.454672825047.issue11789@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 21:01:01 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 19:01:01 +0000 Subject: [issue12162] Documentation about re \number In-Reply-To: <1306195657.59.0.977782679394.issue12162@psf.upfronthosting.co.za> Message-ID: <1381086061.53.0.303951530926.issue12162@psf.upfronthosting.co.za> Georg Brandl added the comment: I can't see the issue here. The RE docs are much better off with the regexes unquoted. The '(.+) \1' example was fixed today (the string supposed to not match actually did match). ---------- nosy: +georg.brandl resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 21:05:15 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Oct 2013 19:05:15 +0000 Subject: [issue19172] selectors: add keys() method In-Reply-To: <1380984038.36.0.521182029078.issue19172@psf.upfronthosting.co.za> Message-ID: <1381086315.87.0.880151432731.issue19172@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a proof-of-concept patch adding a get_map() method to Selector (and removing get_key()). ---------- Added file: http://bugs.python.org/file31977/selectors_map.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 21:21:21 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Oct 2013 19:21:21 +0000 Subject: [issue1215] documentation doesn't say that you can't handle C segfaults from python In-Reply-To: <1190912724.9.0.418130471784.issue1215@psf.upfronthosting.co.za> Message-ID: <1381087281.96.0.156075450441.issue1215@psf.upfronthosting.co.za> Georg Brandl added the comment: I see not much to be done here, except from committing Martin's patch updated to the current trunk. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 21:22:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Oct 2013 19:22:43 +0000 Subject: [issue1215] documentation doesn't say that you can't handle C segfaults from python In-Reply-To: <1190912724.9.0.418130471784.issue1215@psf.upfronthosting.co.za> Message-ID: <3ctF8L2rb3z7LjP@mail.python.org> Roundup Robot added the comment: New changeset b4444d16e333 by Georg Brandl in branch '3.3': Closes #1215: document better why it is not a good idea to catch e.g. SIGSEGV and refer to faulthandler. http://hg.python.org/cpython/rev/b4444d16e333 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 21:23:52 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Oct 2013 19:23:52 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1381087432.31.0.64004812114.issue19183@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a simple benchmark (Linux, gcc 4.7.3): $ ./python -m timeit -s "words=[w for line in open('LICENSE') for w in line.split()]; import collections" "c = collections.Counter(words); c.most_common(10)" - 64-bit build, before: 313 usec per loop - 64-bit build, after: 298 usec per loop - 32-bit build, before: 328 usec per loop - 32-bit build, before: 329 usec per loop - x32 build, before: 291 usec per loop - x32 build, after: 284 usec per loop ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 21:28:09 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Oct 2013 19:28:09 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1381087689.25.0.264819051257.issue19183@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Microbenchmarking hash computation (Linux, gcc 4.7.3): * Short strings: python -m timeit -s "b=b'x'*20" "hash(memoryview(b))" - 64-bit build, before: 0.263 usec per loop - 64-bit build, after: 0.263 usec per loop - 32-bit build, before: 0.303 usec per loop - 32-bit build, after: 0.358 usec per loop * Long strings: python -m timeit -s "b=b'x'*1000" "hash(memoryview(b))" - 64-bit build, before: 1.56 usec per loop - 64-bit build, after: 1.03 usec per loop - 32-bit build, before: 1.61 usec per loop - 32-bit build, after: 2.46 usec per loop Overall, performance looks fine to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 21:31:00 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 06 Oct 2013 19:31:00 +0000 Subject: [issue17534] unittest keeps references to test cases alive In-Reply-To: <1364076408.77.0.0522248566775.issue17534@psf.upfronthosting.co.za> Message-ID: <1381087860.33.0.840582587093.issue17534@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 21:31:14 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 06 Oct 2013 19:31:14 +0000 Subject: [issue9815] assertRaises as a context manager keeps tracebacks and frames alive In-Reply-To: <1284103100.0.0.404704166803.issue9815@psf.upfronthosting.co.za> Message-ID: <1381087874.51.0.903625528459.issue9815@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 21:33:12 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Oct 2013 19:33:12 +0000 Subject: [issue9815] assertRaises as a context manager keeps tracebacks and frames alive In-Reply-To: <1284103100.0.0.404704166803.issue9815@psf.upfronthosting.co.za> Message-ID: <1381087992.46.0.0853800003736.issue9815@psf.upfronthosting.co.za> Antoine Pitrou added the comment: See issue1565525 for the new helper function in the traceback module. ---------- nosy: +akuchling stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 22:01:45 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sun, 06 Oct 2013 20:01:45 +0000 Subject: [issue17534] unittest keeps references to test cases alive In-Reply-To: <1364076408.77.0.0522248566775.issue17534@psf.upfronthosting.co.za> Message-ID: <1381089705.11.0.686612417253.issue17534@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 22:07:28 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sun, 06 Oct 2013 20:07:28 +0000 Subject: [issue11798] Test cases not garbage collected after run In-Reply-To: <1302192957.51.0.450503345302.issue11798@psf.upfronthosting.co.za> Message-ID: <1381090048.12.0.22650641557.issue11798@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 22:14:30 2013 From: report at bugs.python.org (Matteo Cafasso) Date: Sun, 06 Oct 2013 20:14:30 +0000 Subject: [issue19185] Allow multiprocessing Pool initializer to return values Message-ID: <1381090470.56.0.579888919868.issue19185@psf.upfronthosting.co.za> New submission from Matteo Cafasso: This patch allows the pool initializer function to return the initialized values. The returned values will be passed to the called function as first positional argument. Previously the common pattern was to store the initialized objects into global variables making the code more difficult to manage. The patch is not breaking any backward compatibility as the previous initializers were not supposed to return any value, if the initializer does not return anything the behavior is the same as usual. ---------- files: pool_initializer.patch keywords: patch messages: 199116 nosy: noxdafox priority: normal severity: normal status: open title: Allow multiprocessing Pool initializer to return values type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file31978/pool_initializer.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 23:01:42 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Oct 2013 21:01:42 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351775704.44.0.517582874178.issue16381@psf.upfronthosting.co.za> Message-ID: <1381093302.33.0.200227647234.issue16381@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 23:06:13 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Oct 2013 21:06:13 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351775704.44.0.517582874178.issue16381@psf.upfronthosting.co.za> Message-ID: <1381093573.82.0.271496572885.issue16381@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If we want to get more sophisticated, I would suggest a two-pronged approach: - first call a user-defined oom function - if calling the user-defined oom function raises MemoryError, dump a fatal error ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 23:27:36 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Oct 2013 21:27:36 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351775704.44.0.517582874178.issue16381@psf.upfronthosting.co.za> Message-ID: <1381094856.57.0.359999108058.issue16381@psf.upfronthosting.co.za> STINNER Victor added the comment: See also issue #1195571: simple callback system for Py_FatalError. It is somehow related. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 00:08:03 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Oct 2013 22:08:03 +0000 Subject: [issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser In-Reply-To: <1381041750.41.0.637077946349.issue19176@psf.upfronthosting.co.za> Message-ID: <1381097283.94.0.691649337368.issue19176@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 00:41:53 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 06 Oct 2013 22:41:53 +0000 Subject: [issue19185] Allow multiprocessing Pool initializer to return values In-Reply-To: <1381090470.56.0.579888919868.issue19185@psf.upfronthosting.co.za> Message-ID: <1381099313.73.0.335523271886.issue19185@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > the previous initializers were not supposed to return any value Previously, any returned value would have been ignored. But the documentation does not say that the function has to return None. So I don't think we can assume there is no compatibility issue. ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 02:14:56 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 07 Oct 2013 00:14:56 +0000 Subject: [issue19156] Enum helper functions test-coverage In-Reply-To: <1380838099.92.0.195815500358.issue19156@psf.upfronthosting.co.za> Message-ID: <1381104896.79.0.228361612539.issue19156@psf.upfronthosting.co.za> Ethan Furman added the comment: Thanks for catching that, Cliff. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 02:20:09 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 Oct 2013 00:20:09 +0000 Subject: [issue19156] Enum helper functions test-coverage In-Reply-To: <1380838099.92.0.195815500358.issue19156@psf.upfronthosting.co.za> Message-ID: <3ctMlV2NM9z7LkB@mail.python.org> Roundup Robot added the comment: New changeset 516576f5f9dc by Ethan Furman in branch 'default': Close #19156: add tests and fix for Enum helper edge cases. Patch from CliffM. http://hg.python.org/cpython/rev/516576f5f9dc ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 02:36:52 2013 From: report at bugs.python.org (Tim Peters) Date: Mon, 07 Oct 2013 00:36:52 +0000 Subject: [issue19158] BoundedSemaphore.release() subject to races In-Reply-To: <1380844816.11.0.829919053917.issue19158@psf.upfronthosting.co.za> Message-ID: <1381106212.72.0.895965449199.issue19158@psf.upfronthosting.co.za> Tim Peters added the comment: Attached patch, which closes the timing hole, and adds a new basic sanity test. ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file31979/boundsem.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 02:51:05 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2013 00:51:05 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1381107065.65.0.721021916467.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: ec121a72e848.patch: - ignore changes on Lib/test/support/__init__.py: it's my own fix for issue #18948 which will be fixed differently - ignore changes on Lib/test/regrtest.py: they should not be commited, it's just a convinient way to test tracemalloc (python -X tracemalloc -m test -r) - changes on Modules/readline.c: this is the fix for the issue #16742 - Objects/codeobject.c: calling PyUnicode_READY(filename) in PyCode_New() is useful on Windows in debug mode, the filename may not be ready, whereas tracemalloc requires a ready Unicode string. This change can probably be fixed in default independently - Objects/obmalloc.c: changes on _PyMem_Debug and changes replacing PyMem_Malloc() with PyMem_RawMalloc() are a try to reuse pymalloc allocator for PyMem_Malloc(). This should be discussed independently Sorry for all these unrelated change, I will try to cleanup the repository in the next patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 02:56:10 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2013 00:56:10 +0000 Subject: [issue19158] BoundedSemaphore.release() subject to races In-Reply-To: <1380844816.11.0.829919053917.issue19158@psf.upfronthosting.co.za> Message-ID: <1381107370.32.0.579485891439.issue19158@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 04:18:09 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 07 Oct 2013 02:18:09 +0000 Subject: [issue19097] bool(cgi.FieldStorage(...)) may be False unexpectedly In-Reply-To: <1380239682.41.0.674159694258.issue19097@psf.upfronthosting.co.za> Message-ID: <1381112289.85.0.890320241959.issue19097@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Hi Guido, Agree with both your points. Attaching a patch that fixes this issue. 1. Raises TypeError exception when header is not a Mapping or email.message.Message type. 2. Asserts for fp.read and fp.readline() to assert that fp, the first argument to FieldStorage is a file like object. I would have preferred to assert fp as a type of BytesIO object, but I saw some tests failings, so that could be taken as a separate 3.4 only backwards incompatible improvement (and not bug fix). Finally, in the cases where read_single() is called for FieldStorage(), bool() raises valid TypeError for empty FieldStorage. Please review and if it is OK, I can check this in. ---------- assignee: -> orsenthil keywords: +patch stage: -> patch review type: -> behavior Added file: http://bugs.python.org/file31980/19097.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 04:34:56 2013 From: report at bugs.python.org (Chris Rebert) Date: Mon, 07 Oct 2013 02:34:56 +0000 Subject: [issue17359] Mention "__main__.py" explicitly in command line docs In-Reply-To: <1362512425.64.0.937549165034.issue17359@psf.upfronthosting.co.za> Message-ID: <1381113296.41.0.0939356701937.issue17359@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 05:04:19 2013 From: report at bugs.python.org (Tim Peters) Date: Mon, 07 Oct 2013 03:04:19 +0000 Subject: [issue19158] BoundedSemaphore.release() subject to races In-Reply-To: <1380844816.11.0.829919053917.issue19158@psf.upfronthosting.co.za> Message-ID: <1381115059.98.0.572670641577.issue19158@psf.upfronthosting.co.za> Tim Peters added the comment: New patch makes the test case do what I intended it to do ;-) ---------- Added file: http://bugs.python.org/file31981/boundsem2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 05:25:29 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 07 Oct 2013 03:25:29 +0000 Subject: [issue16938] pydoc confused by __dir__ In-Reply-To: <1357944129.98.0.501949279766.issue16938@psf.upfronthosting.co.za> Message-ID: <1381116329.81.0.987690490533.issue16938@psf.upfronthosting.co.za> Ethan Furman added the comment: ========================================================================= class Boom: def __dir__(self): return ['BOOM'] def __getattr__(self, name): if name =='BOOM': return 42 return super().__getattr(name) help(Boom) ========================================================================= Help on class Boom in module __main__: class Boom(builtins.object) | Methods defined here: | | __dir__(self) | | __getattr__(self, name) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) (END) ========================================================================= So on an instance there is no problem. ========================================================================= import inspect class MetaBoom(type): def __dir__(cls): return ['__class__', '__module__', '__name__', 'BOOM'] def __getattr__(self, name): if name =='BOOM': return 42 return super().__getattr(name) def test(self): print('testing...') class Boom(metaclass=MetaBoom): pass help(Boom()) ========================================================================= Help on Boom in module __main__ object: (END) ========================================================================= Still have problem with metaclasses. Looking at the result from inspect.classify_class_attrs() we see: ========================================================================= Attribute(name='BOOM', kind='data', defining_class=None, object=) ========================================================================= The defining class for BOOM should be Boom, not None. With the attached patch, we get: ========================================================================= Help on Boom in module __main__ object: class Boom(builtins.object) | Data and other attributes defined here: | | BOOM = 42 (END) ========================================================================= ---------- assignee: -> ethan.furman keywords: +patch priority: low -> normal stage: test needed -> patch review versions: -Python 2.7 Added file: http://bugs.python.org/file31982/issue16938.stoneleaf.01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 05:32:02 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 07 Oct 2013 03:32:02 +0000 Subject: [issue19075] Add sorting algorithm visualization to turtledemo In-Reply-To: <1379872942.6.0.509488553247.issue19075@psf.upfronthosting.co.za> Message-ID: <1381116722.7.0.0844463890866.issue19075@psf.upfronthosting.co.za> Ethan Furman added the comment: What are the requirements (if any) to get something added to demos? If not many, I'll spiffy up the code a bit (mostly make it go more than one round without having to restart). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 05:33:41 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 07 Oct 2013 03:33:41 +0000 Subject: [issue19031] Make help() enum aware In-Reply-To: <1379289794.97.0.994378932185.issue19031@psf.upfronthosting.co.za> Message-ID: <1381116821.85.0.0543599930645.issue19031@psf.upfronthosting.co.za> Ethan Furman added the comment: What I'd really like to see is for help to be smart enough to pick up the docstrings from instances if an instance has one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 05:36:27 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 07 Oct 2013 03:36:27 +0000 Subject: [issue18281] tarfile defines stat constants In-Reply-To: <1371912078.43.0.227039082522.issue18281@psf.upfronthosting.co.za> Message-ID: <1381116987.06.0.810110943951.issue18281@psf.upfronthosting.co.za> Ethan Furman added the comment: Christian, do you mind if I get this patchd committed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 08:10:30 2013 From: report at bugs.python.org (shishkander) Date: Mon, 07 Oct 2013 06:10:30 +0000 Subject: [issue19070] In place operators of weakref.proxy() not returning self. In-Reply-To: <1379846143.45.0.326809671068.issue19070@psf.upfronthosting.co.za> Message-ID: <1381126230.84.0.520463285957.issue19070@psf.upfronthosting.co.za> shishkander added the comment: This bug happens not just with operators, but with any call self.call_something()! For example, running this: from __future__ import print_function import weakref class Test(object): def method(self): return type(self) def test(obj): print(type(obj), "=>", obj.method()) o = Test() test(o) test(weakref.proxy(o)) (also attached for convenience as t.py) produces in both python2.7 and python3.2: $ python t.py => => ---------- nosy: +shishkander Added file: http://bugs.python.org/file31983/t.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 08:53:51 2013 From: report at bugs.python.org (Matteo Cafasso) Date: Mon, 07 Oct 2013 06:53:51 +0000 Subject: [issue19185] Allow multiprocessing Pool initializer to return values In-Reply-To: <1381090470.56.0.579888919868.issue19185@psf.upfronthosting.co.za> Message-ID: <1381128831.19.0.349348666878.issue19185@psf.upfronthosting.co.za> Matteo Cafasso added the comment: I agree with your point, I've probably made my considerations too quickly. The consideration was based on the fact that returning any value previously was a misuse (without consequences) of the initializer itself. Now the misuse would be exposed by the new implementation, probably meeting the requirements that leds to the misuse itself. Aim of the patch is to give an alternative to the use of global variables. Global variables usage is a pattern which might lead to code errors and many developers discourage from following it. I do believe that forcing such pattern in order to accomplish the desired goals is quite restrictive from an API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 10:22:35 2013 From: report at bugs.python.org (Graham Dumpleton) Date: Mon, 07 Oct 2013 08:22:35 +0000 Subject: [issue19070] In place operators of weakref.proxy() not returning self. In-Reply-To: <1379846143.45.0.326809671068.issue19070@psf.upfronthosting.co.za> Message-ID: <1381134155.27.0.591353175008.issue19070@psf.upfronthosting.co.za> Graham Dumpleton added the comment: @shishkander I can't see how what you are talking about has got anything to do with the issue with in place operators. The results from your test script are expected and normal. What result are you expecting? The one thing you cannot override in Python is what type() returns for an object. Thus is it completely normal for the weakref.proxy object to have a different type that what it wraps. This is one of the reasons why in Python why should rarely ever do direct comparison of type objects. Instead you should use isinstance(). >>> import weakref >>> class Test(object): ... pass ... >>> test = Test() >>> proxy = weakref.proxy(test) >>> type(test) >>> type(proxy) >>> isinstance(test, Test) True >>> isinstance(proxy, Test) True >>> proxy.__class__ The isinstance() check will work because weakref.proxy will proxy __class__() method such that it returns the type of the wrapped object rather than of the proxy. Now if your problem is with methods of wrapped objects which return self not having that self object some how automatically wrapped in another proxy, there isn't anything the proxy can be do about that. That is a situation where you as a user need to be careful about what you are doing. A way one can handle that is through derivation off a proxy object and override specific methods where you then in turn need to wrap the result, but I can see that easily becoming fragile when weakrefs are involved. Also, the weakref proxy in Python doesn't expose a class for doing that anyway. One important thing to note is that where self is returned is returned by a normal method, it is still on you to have assigned the result to a variable so as to have started any possible problems. In the case of in place operators that is done under the covers by Python and you have no control over it. This is why the current behaviour as originally described is arguably broken as is breaks the expectations of what would logically happen for an in place operator when used via a proxy, something you have no control over. So can you go back and explain what your specific problem is that you believe is the same issue as this bug report is, because so far I can't see any similarity based on your example code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 11:55:05 2013 From: report at bugs.python.org (shishkander) Date: Mon, 07 Oct 2013 09:55:05 +0000 Subject: [issue19070] In place operators of weakref.proxy() not returning self. In-Reply-To: <1379846143.45.0.326809671068.issue19070@psf.upfronthosting.co.za> Message-ID: <1381139705.74.0.0269037815187.issue19070@psf.upfronthosting.co.za> shishkander added the comment: @grahamd In short, instead of this: $ python t.py => => I expected to get this (note the second line): => => I pass the proxy to the test() function, and I expect the argument inside the function to be a proxy. And that works - the type of obj in test() is weakproxy. However, the test function calls obj.method(), and I expected the method to get a proxy of obj as well, but *it does not* (the type of self is now Test)! The reason I though this is the same bug is that your method doesn't work on a proxy any more! def __iadd__(self, value): # self is not longer proxy! it's actually actual class instance now. ... Now, if I call the method like this: Test.method(weakref.proxy(o)), then obviously the self argument of the method is a proxy. So, the crux of the matter is in how obj.method is handled inside Python interpreter. I think the current behavior is wrong, and if it is fixed, I'm certain your problem is fixed as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 11:56:55 2013 From: report at bugs.python.org (Florent Viard) Date: Mon, 07 Oct 2013 09:56:55 +0000 Subject: [issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed. In-Reply-To: <1380820358.99.0.777618727237.issue19154@psf.upfronthosting.co.za> Message-ID: <1381139815.35.0.360491582767.issue19154@psf.upfronthosting.co.za> Florent Viard added the comment: Hi Terry, I think you misunderstood what i was trying to say. Maybe fileno should raise a ValueError (and not -1) in that case. That is the question. It should only be able to be something understood by "select.select". But currently it is an Bug/Crash as the case where self.fp is None is not handled before trying to get self.fp.fileno() and so this raise an AttributeError and not a ValueError. And so, it is certainly not managed by select. Please really understand that here I speak about the "def fileno()" function that is inside Lib/http/client.py" and not about the "def fileno()" that is in socket.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:06:22 2013 From: report at bugs.python.org (Graham Dumpleton) Date: Mon, 07 Oct 2013 10:06:22 +0000 Subject: [issue19070] In place operators of weakref.proxy() not returning self. In-Reply-To: <1379846143.45.0.326809671068.issue19070@psf.upfronthosting.co.za> Message-ID: <1381140382.1.0.551013557053.issue19070@psf.upfronthosting.co.za> Graham Dumpleton added the comment: The proxy is intended as a wrapper around an object, it is not intended to merge in some way with the wrapped object. The wrapped object shouldn't really ever be aware that it was being accessed via a proxy. Thus the expectation that the 'self' attribute of the methods of the wrapper object would actually be the proxy object is a strange one. Can you explain why you need it to behave the way you are expecting? Also specifically indicate what requirement you have for needing the reference to the wrapped object to be a weakref? Almost sounds a bit like you may be trying to use weakref.proxy in a way not intended. It is technically possible to write an object proxy which would work how you are expecting, but the Python standard library doesn't provide an object proxy implementation to base such a thing on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:32:59 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 07 Oct 2013 10:32:59 +0000 Subject: [issue19185] Allow multiprocessing Pool initializer to return values In-Reply-To: <1381090470.56.0.579888919868.issue19185@psf.upfronthosting.co.za> Message-ID: <1381141979.01.0.783752722289.issue19185@psf.upfronthosting.co.za> Richard Oudkerk added the comment: I think "misuse" is an exageration. Various functions change some state and return a value that is usually ignored, e.g. os.umask(), signal.signal(). > Global variables usage is a pattern which might lead to code errors and many > developers discourage from following it. What sort of code errors? This really seems a stylistic point. Maybe such developers would be happier using class methods and class variables rather than functions and globals variables. Out of interest, what do you usually do in your initializer functions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:57:36 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 07 Oct 2013 10:57:36 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1381143456.3.0.948803349956.issue19183@psf.upfronthosting.co.za> Christian Heimes added the comment: Your benchmark is a bit unrealistic because it times the hash cache most of the time. Here is a better benchmark (but bytes-only): $ ./python -m timeit -s "words=[w.encode('utf-8') for line in open('../LICENSE') for w in line.split()]; import collections" -- "c = collections.Counter(memoryview(w) for w in words); c.most_common(10)" 1000 loops, best of 3: 1.63 msec per loop This increases the number of hash calculations from about 28k to over 8.4 mio. I also added a little statistic function to see how large typical string are. The artificial benchmark: hash 1: 115185 hash 2: 1440956 hash 3: 1679976 hash 4: 873769 hash 5: 948124 hash 6: 651799 hash 7: 676707 hash 8: 545459 hash 9: 523615 hash 10: 421232 hash 11: 161641 hash 12: 140797 hash 13: 86826 hash 14: 41702 hash 15: 41570 hash 16: 332 hash 17: 211 hash 18: 4275 hash 19: 205 hash 20: 131 hash 21: 4197 hash 22: 70 hash 23: 35 hash 24: 44 hash 25: 4145 hash 26: 4137 hash 27: 4137 hash 28: 21 hash 29: 4124 hash 30: 8 hash 31: 5 hash 32: 1 hash other: 28866 hash total: 8404302 And here is the statistic of a full test run. hash 1: 18935 hash 2: 596761 hash 3: 643973 hash 4: 645399 hash 5: 576231 hash 6: 742531 hash 7: 497214 hash 8: 330890 hash 9: 291301 hash 10: 93206 hash 11: 1417900 hash 12: 160802 hash 13: 58675 hash 14: 49324 hash 15: 48068 hash 16: 90634 hash 17: 24163 hash 18: 66079 hash 19: 23408 hash 20: 20695 hash 21: 16424 hash 22: 17236 hash 23: 59135 hash 24: 10368 hash 25: 6047 hash 26: 6784 hash 27: 5565 hash 28: 5931 hash 29: 3469 hash 30: 4220 hash 31: 2652 hash 32: 2911 hash other: 72042 hash total: 6608973 About 50% of the hashed elements are between 1 and 5 characters long. A realistic hash collision attack on 32bit needs at least 7, 8 chars. I see the chance of a micro-optimization! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 13:10:35 2013 From: report at bugs.python.org (shishkander) Date: Mon, 07 Oct 2013 11:10:35 +0000 Subject: [issue19070] In place operators of weakref.proxy() not returning self. In-Reply-To: <1379846143.45.0.326809671068.issue19070@psf.upfronthosting.co.za> Message-ID: <1381144235.67.0.308517874918.issue19070@psf.upfronthosting.co.za> shishkander added the comment: @grahamd Well, I read the PEP for weakproxy and python doc on weakref library, and I got an impression that weakproxy is really like a weak pointer in C++: i can pass it around as it was a strong pointer, and get an exception if actual object has been deleted. Well, but I see now that it was wrong. My use case If you are familiar with kazoo library, then what I am making is similar to KazooClient object. See here, for example: https://kazoo.readthedocs.org/en/latest/basic_usage.html#connection-handling The typical usage for my object is like this: zk = KazooClient(hosts='127.0.0.1:2181') zk.start() # user *MUST* call zk.stop() otherwise there is a leak Now I think it's not user-friendly to require the call to zk.stop(). I prefer the call to stop() to be called automatically from destructor of zk object whenever it goes out of scope. However, the background thread which is created in zk.start() also holds reference to zk object, and so __del__ is never called, the thread is never stopped, and the leak occurs. Of course, I can do this to solve the problem above: class Wrapper(object): def __init__(self, *args, **kwargs): self.__obj = KazooClient(*args, **kwargs) self.__obj.start() def __getattr__(self, attr): return getattr(self.__obj, attr) def __del__(self): self.__obj.stop() But even this doesn't quite solve the problem of callbacks. To have callbacks from KazooClient, they have to be stored in Wrapper object instead, and KazooClient has to be given weak references to some special Wrapper method, which will call the real callback. When KazooClient executes callback, it operates on a weakproxy, but as soon as it calls wrapper.method() the weakproxy is transformed to actual instance, and that complicates things. It still works with current weakref implementation, but it would be simpler and more flexible if the weakproxy was working as I expected, as then I don't have to use unnatural calls: Class.method(proxy, ...) instead of just proxy.method(...). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 13:12:12 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 07 Oct 2013 11:12:12 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381143456.3.0.948803349956.issue19183@psf.upfronthosting.co.za> Message-ID: <492141168.56245134.1381144326751.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > Your benchmark is a bit unrealistic because it times the hash cache > most of the time. Here is a better benchmark (but bytes-only): > > $ ./python -m timeit -s "words=[w.encode('utf-8') for line in > open('../LICENSE') for w in line.split()]; import collections" -- "c > = collections.Counter(memoryview(w) for w in words); > c.most_common(10)" > 1000 loops, best of 3: 1.63 msec per loop Good point. Can you also post all benchmark results? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 13:17:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 07 Oct 2013 11:17:23 +0000 Subject: [issue19075] Add sorting algorithm visualization to turtledemo In-Reply-To: <1379872942.6.0.509488553247.issue19075@psf.upfronthosting.co.za> Message-ID: <1381144643.54.0.679159585999.issue19075@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > What are the requirements (if any) to get something added to demos? Nothing much AFAIK, except that someone must be willing to maintain the code. ---------- nosy: +pitrou versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 13:21:21 2013 From: report at bugs.python.org (Graham Dumpleton) Date: Mon, 07 Oct 2013 11:21:21 +0000 Subject: [issue19070] In place operators of weakref.proxy() not returning self. In-Reply-To: <1379846143.45.0.326809671068.issue19070@psf.upfronthosting.co.za> Message-ID: <1381144881.24.0.914811449982.issue19070@psf.upfronthosting.co.za> Graham Dumpleton added the comment: The __del__() method is generally something to be avoided. As this is a design issue with how you are doing things, I would suggest you move the discussion to: https://groups.google.com/forum/#!forum/comp.lang.python You will no doubt get many suggestions there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 13:57:59 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 07 Oct 2013 11:57:59 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1381147079.47.0.820531590508.issue19183@psf.upfronthosting.co.za> Christian Heimes added the comment: unmodified Python: 1000 loops, best of 3: 307 usec per loop (unicode) 1000 loops, best of 3: 930 usec per loop (memoryview) SipHash: 1000 loops, best of 3: 300 usec per loop (unicode) 1000 loops, best of 3: 906 usec per loop (memoryview) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 15:04:57 2013 From: report at bugs.python.org (AThompson) Date: Mon, 07 Oct 2013 13:04:57 +0000 Subject: [issue19186] expat symbols should be namespaced in pyexpat again Message-ID: <1381151097.4.0.844657685559.issue19186@psf.upfronthosting.co.za> New submission from AThompson: The issue with confliciting expat versions has poped up again in python 3. http://bugs.python.org/issue1295808 It looks like the fix for this was removed when upgrading to expat 2.1 in http://hg.python.org/cpython/rev/e4dc8be9a72f on Sat, 14 Jul 2012 14:12:35 -0700 Gregory P. Smith --- a/Modules/expat/expat_external.h /* Namespace external symbols to allow multiple libexpat version to - co-exist. */ -#include "pyexpatns.h" Same backtrace as before. #0 0x0000003507481321 in __strlen_sse2 () from /lib64/libc.so.6 #1 0x00007facace1b0d0 in PyUnicode_FromString (u=0x0) at Objects/unicodeobject.c:1824 #2 0x00007facaceefddc in PyModule_AddStringConstant (m=0x7fac9c7cf678, name=0x7fac9c5ab2e3 "XML_ERROR_UNBOUND_PREFIX", value=0x0) at Python/modsupport.c:554 #3 0x00007fac9c582f31 in PyInit_pyexpat () at /home/hex/Downloads/Python-3.3.2/Modules/pyexpat.c:1870 #4 0x00007facacee8f89 in _PyImport_LoadDynamicModule (name=0x7fac9c7db450, path=0x7fac9cdf9928, fp=0x0) ---------- components: Extension Modules messages: 199143 nosy: athompson priority: normal severity: normal status: open title: expat symbols should be namespaced in pyexpat again type: crash versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 15:20:53 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 Oct 2013 13:20:53 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <3ctj4P0yyrz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset c960bed22bf6 by Christian Heimes in branch 'default': Make Nick BDFG delegate http://hg.python.org/peps/rev/c960bed22bf6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 15:24:39 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 07 Oct 2013 13:24:39 +0000 Subject: [issue19186] expat symbols should be namespaced in pyexpat again In-Reply-To: <1381151097.4.0.844657685559.issue19186@psf.upfronthosting.co.za> Message-ID: <1381152279.13.0.0308597057924.issue19186@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes, fdrake stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 15:45:58 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 07 Oct 2013 13:45:58 +0000 Subject: [issue19186] expat symbols should be namespaced in pyexpat again In-Reply-To: <1381151097.4.0.844657685559.issue19186@psf.upfronthosting.co.za> Message-ID: <1381153558.78.0.925535340454.issue19186@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 16:54:10 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2013 14:54:10 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1381157650.16.0.724622225745.issue19183@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I propose extract all hash related stuff from Include/object.h in separated file Include/pyhash.h. And perhaps move Objects/hash.c to Python/pyhash.c. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 17:12:27 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2013 15:12:27 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1381158746.99.0.961178195715.issue19183@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since hash algorithm determined at compile time, the _Py_HashSecret_t structure and the _Py_HashSecret function are redundant. We need define only the _Py_HashBytes function. Currently SipHash algorithm doesn't work with unaligned data. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 17:28:00 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 07 Oct 2013 15:28:00 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1381159680.84.0.385379008987.issue19183@psf.upfronthosting.co.za> Christian Heimes added the comment: Sure it does. The test for unaligned hashing passes without an error or a segfault. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 17:32:19 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2013 15:32:19 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1381159939.3.0.501179836213.issue19183@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And note that the quality of the FNV hash function is reduced (msg186403). We need "shuffle" result's bits. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 17:38:54 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2013 15:38:54 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1381160334.31.0.329742982474.issue19183@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > The test for unaligned hashing passes without an error or a segfault. On some platforms it can work without a segfault. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 19:49:54 2013 From: report at bugs.python.org (Eric Snow) Date: Mon, 07 Oct 2013 17:49:54 +0000 Subject: [issue19178] Entries for "module" and "package" in glossary In-Reply-To: <1381048973.81.0.279739415702.issue19178@psf.upfronthosting.co.za> Message-ID: <1381168194.39.0.854909175553.issue19178@psf.upfronthosting.co.za> Eric Snow added the comment: They are defined in the Python 3 glossary [1], so I expect it just a matter of backporting those entries. [1] http://docs.python.org/3/glossary.html ---------- nosy: +eric.snow versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 20:32:23 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2013 18:32:23 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <1381170743.02.0.933080264809.issue12892@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated whatsnew and Misc/ files. ---------- Added file: http://bugs.python.org/file31984/utf_16_32_surrogates_4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 20:41:43 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2013 18:41:43 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <1381171303.22.0.488303225413.issue18758@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes. I have 180 Kb patch which touches 107 files, and this is yet too large for one issue. I will continue split this patch for lesser issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 20:43:05 2013 From: report at bugs.python.org (Bastien Montagne) Date: Mon, 07 Oct 2013 18:43:05 +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: <1381171385.54.0.665647900652.issue16129@psf.upfronthosting.co.za> Bastien Montagne added the comment: Updated patch (mostly from Brecht's remarks, removed an obvious bug...) ---------- Added file: http://bugs.python.org/file31985/setstdio.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 21:18:53 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 07 Oct 2013 19:18:53 +0000 Subject: [issue19187] Use a set for interned strings Message-ID: <1381173533.0.0.681038585832.issue19187@psf.upfronthosting.co.za> New submission from Antoine Pitrou: This is a simple enhancement that may reduce memory consumption by a bit (unfortunately, this is difficult to measure using standard tools). ---------- components: Interpreter Core files: setintern.patch keywords: patch messages: 199154 nosy: haypo, pitrou priority: low severity: normal stage: patch review status: open title: Use a set for interned strings type: resource usage versions: Python 3.4 Added file: http://bugs.python.org/file31986/setintern.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 21:31:17 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2013 19:31:17 +0000 Subject: [issue19187] Use a set for interned strings In-Reply-To: <1381173533.0.0.681038585832.issue19187@psf.upfronthosting.co.za> Message-ID: <1381174277.69.0.973407616188.issue19187@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Dict has a special case for string keys. Is set have such optimization? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 21:32:44 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 07 Oct 2013 19:32:44 +0000 Subject: [issue19187] Use a set for interned strings In-Reply-To: <1381174277.69.0.973407616188.issue19187@psf.upfronthosting.co.za> Message-ID: <1381174361.2489.0.camel@fsol> Antoine Pitrou added the comment: > Dict has a special case for string keys. Is set have such optimization? Yes (see set_lookkey_unicode). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 21:35:39 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2013 19:35:39 +0000 Subject: [issue19188] Add PySet_CheckExact() Message-ID: <1381174539.56.0.480859980209.issue19188@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: There are PyFrozenSet_CheckExact() and PyAnySet_CheckExact() but there is no PySet_CheckExact(). Perhaps we should add it for consistency. ---------- components: Interpreter Core messages: 199157 nosy: christian.heimes, pitrou, rhettinger, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Add PySet_CheckExact() type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 22:13:19 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 07 Oct 2013 20:13:19 +0000 Subject: [issue3430] httplib.HTTPResponse documentations inconsistent In-Reply-To: <1216747880.73.0.0581734704537.issue3430@psf.upfronthosting.co.za> Message-ID: <1381176799.75.0.346092465129.issue3430@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Docs are still as deficient in 3.3, and so I presume in 3.4. Part of the discrepancy between the first two lists is that data attributes msg, version, status, and reason are instance-only attributes. #19154 is (now) about improving fileno doc. That, some other methods, are missing doctrings, making help(method) useless. A big change in 3.x is that HTTPResponse now subclasses io.RawIOBase and hence inherits or implements even more (undocumented) methods than listed here. I suppose they could be documented by reference to the base class, if that is the normal procedure when subclassing. ---------- dependencies: +AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed. nosy: -georg.brandl versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 22:13:31 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 07 Oct 2013 20:13:31 +0000 Subject: [issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed. In-Reply-To: <1380820358.99.0.777618727237.issue19154@psf.upfronthosting.co.za> Message-ID: <1381176811.46.0.758787673744.issue19154@psf.upfronthosting.co.za> Terry J. Reedy added the comment: We are both talking about 2.7 httplib.HTTPResponse.fileno. I should have said that users should try: ...fileno(); except AttributeError rather than ValueError. Any caller can understand AttributeError as well as ValueError or any other exception. It is not an error for a python function to raise an exception. In fact, it is the normal thing to do when it cannot do as requested. API changes are not allowed in 2.7 and this one would be dubious even in a future 3.x. I do think the doc should be more informative and that Return(s) the fileno of the underlying socket. should be extended to indicate the specific exception raised when that is not possible. Return the fileno of the underlying socket if there is one or raise AttributeError. This should also be added as a docstring (currently missing). The above is also true for 3.x as self.fp continues to be replaced with None on closing. The HTTPResponse docs are known to be deficient. #3430 -- I do not think select needs to be changed to understand the HTTPResponse.fileno error indicator because it does not call that method. As indicated in the traceback, it calls (in 2.7) socket._fileinput.fileno. I believe it is only a bug in nappstore (that would be harder to reproduce in 3.x) that _fileinput.fileno is forwarded to HTTPResponse.fileno instead of _socket.fileno. The latter seem to be the clear intention. Even if I am wrong, changing something in the select or socket modules would be a different issue from changing something in the client module. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) keywords: +easy, patch nosy: +docs at python stage: test needed -> needs patch type: behavior -> enhancement versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 22:23:33 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 07 Oct 2013 20:23:33 +0000 Subject: [issue19187] Use a set for interned strings In-Reply-To: <1381173533.0.0.681038585832.issue19187@psf.upfronthosting.co.za> Message-ID: <1381177412.99.0.0998789957275.issue19187@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Note that the resizing heuristic is slightly different for sets and dicts, so a small-to-middle-size dict can sometimesbe smaller than a set of the same len(). However, for large dicts (>= 50000) it seems the corresponding set is most always 66% smaller. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 22:25:35 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 07 Oct 2013 20:25:35 +0000 Subject: [issue18948] deliberately crashing tests should prevent core dumps In-Reply-To: <1378493765.27.0.466855736327.issue18948@psf.upfronthosting.co.za> Message-ID: <1381177535.27.0.490349768394.issue18948@psf.upfronthosting.co.za> Zachary Ware added the comment: Here's a patch that combines Valerie's patch with a merged suppress_crash_popup and SuppressCoreFiles called SuppressCrashReport. Tests ok on Windows; I haven't been able to test on Unix yet. ---------- Added file: http://bugs.python.org/file31987/issue18948-combined.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 22:39:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2013 20:39:14 +0000 Subject: [issue19189] Improve cross-references in pickle documentation. Message-ID: <1381178353.55.0.131251765353.issue19189@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here is a patch which fixes internal references in the documentation of the pickle package. ---------- assignee: docs at python components: Documentation files: refs.pickle.patch keywords: patch messages: 199162 nosy: alexandre.vassalotti, docs at python, pitrou, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Improve cross-references in pickle documentation. type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file31988/refs.pickle.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 22:40:08 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2013 20:40:08 +0000 Subject: [issue19190] Improve cross-references in builtins documentation. Message-ID: <1381178406.23.0.925502914141.issue19190@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here is a patch which fixes internal references for in the documentation of builtins. ---------- assignee: docs at python components: Documentation files: refs.builtins.patch keywords: patch messages: 199163 nosy: docs at python, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Improve cross-references in builtins documentation. type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file31989/refs.builtins.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 22:58:54 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 07 Oct 2013 20:58:54 +0000 Subject: [issue18948] deliberately crashing tests should prevent core dumps In-Reply-To: <1378493765.27.0.466855736327.issue18948@psf.upfronthosting.co.za> Message-ID: <1381179534.39.0.917447954686.issue18948@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks! The patch works fine here under Linux, too (though I haven't tried to figure out if it really prevented core files from being generated). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 23:20:07 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2013 21:20:07 +0000 Subject: [issue19190] Improve cross-references in builtins documentation. In-Reply-To: <1381178406.23.0.925502914141.issue19190@psf.upfronthosting.co.za> Message-ID: <1381180807.37.0.557598588533.issue19190@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file31989/refs.builtins.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 23:22:11 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2013 21:22:11 +0000 Subject: [issue19190] Improve cross-references in builtins documentation. In-Reply-To: <1381178406.23.0.925502914141.issue19190@psf.upfronthosting.co.za> Message-ID: <1381180931.72.0.347396611612.issue19190@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file31990/refs.builtins.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 00:47:57 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 07 Oct 2013 22:47:57 +0000 Subject: [issue19187] Use a set for interned strings In-Reply-To: <1381173533.0.0.681038585832.issue19187@psf.upfronthosting.co.za> Message-ID: <1381186077.17.0.782966057315.issue19187@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 01:01:14 2013 From: report at bugs.python.org (Trevor Bowen) Date: Mon, 07 Oct 2013 23:01:14 +0000 Subject: [issue19142] Cross-compile fails trying to execute foreign pgen on build host In-Reply-To: <1380670898.69.0.308819053325.issue19142@psf.upfronthosting.co.za> Message-ID: <1381186874.62.0.772625208771.issue19142@psf.upfronthosting.co.za> Trevor Bowen added the comment: In the vein of: http://randomsplat.com/id5-cross-compiling-python-for-embedded-linux.html I have created a patch and top-level build script, which builds the requisite python interpreter and Parser/pgen binary to run on the build system, which are both used during the cross-compile process. In some ways, this patch is simpler, because of the new cross-compile capabilities in 2.7.4 and 2.7.5. However, previous work is still insufficient, because the Makefile assumes the cross-compiled Parser/pgen can be executed on the build system during build. This patch primarily compensates for that, but it also works around some misplaced installation file issues. My top-level cross-compile script, which applies the patch *during* the build process is also attached. It depends on a VCS to restore the original version, but I could have just as easily made 2 copies of the patched files (before and after patching) and copied the original versions as needed. I hope this helps others. Hopefully, bits of this can be integrated to help further simplify future cross-compile efforts. ---------- keywords: +patch Added file: http://bugs.python.org/file31991/Python-2.7.5-xcompile.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 01:13:03 2013 From: report at bugs.python.org (Trevor Bowen) Date: Mon, 07 Oct 2013 23:13:03 +0000 Subject: [issue19142] Cross-compile fails trying to execute foreign pgen on build host In-Reply-To: <1380670898.69.0.308819053325.issue19142@psf.upfronthosting.co.za> Message-ID: <1381187583.54.0.249249457124.issue19142@psf.upfronthosting.co.za> Trevor Bowen added the comment: Short version of cross-compile script without error checking: #!/bin/bash export RFS=/local/my_root_file_system make distclean rm -rf python_for_build Parser/pgen_for_build git checkout -- Makefile.pre.in Modules/Setup.dist configure setup.py ./configure make python Parser/pgen mv python python_for_build mv Parser/pgen Parser/pgen_for_build patch -p3 < Python-2.7.5-xcompile.patch export PATH="/opt/my_cross_compile_toolchain/gcc-4.3.74-eglibc-2.8.74-dp-2/powerpc-none-linux-gnuspe/bin:${PATH}" make distclean ./configure --host=powerpc-none-linux-gnuspe --build=i586-linux-gnu --prefix=/ \ --disable-ipv6 ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no ac_cv_have_long_long_format=yes make --jobs=4 sudo make install DESTDIR=${RFS} PATH="${PATH}" ---------- Added file: http://bugs.python.org/file31992/cross-compile.sh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 01:33:42 2013 From: report at bugs.python.org (Trevor Bowen) Date: Mon, 07 Oct 2013 23:33:42 +0000 Subject: [issue19142] Cross-compile fails trying to execute foreign pgen on build host In-Reply-To: <1380670898.69.0.308819053325.issue19142@psf.upfronthosting.co.za> Message-ID: <1381188822.13.0.81302617256.issue19142@psf.upfronthosting.co.za> Trevor Bowen added the comment: FWIW, I also explored my original proposal, which essentially moved the above script and modifications into the Python configure.ac and Makefile.pre.in files, so that Python's internal build process would create the native build system versions of Python and Parser/pgen, if necessary. I made some progress in creating additional Make targets just for the native build system, which redefined the toolchain after completion; however, I encountered unexepected, overwhelming configure contamination in the auto-generated header files. Maybe someone can push this farther than me? I'm attaching my patch, in case it helps someone else and just as reference. As for me, I think it is much easier to use the above solution, which would require very little patching to the sources to make a 2-step compilation to be trivial. ---------- Added file: http://bugs.python.org/file31993/Python-2.7.5-xcompile_improvements.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 02:50:25 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 08 Oct 2013 00:50:25 +0000 Subject: [issue18037] 2to3 passes through string literal which causes SyntaxError in 3.x In-Reply-To: <1369259204.14.0.48841389768.issue18037@psf.upfronthosting.co.za> Message-ID: <1381193425.42.0.465293367092.issue18037@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: These revisions also introduced escaping of \u and \U in raw literals, which is incorrect. It breaks e.g. Sphinx. ---------- resolution: fixed -> stage: committed/rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 05:11:39 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 08 Oct 2013 03:11:39 +0000 Subject: [issue19187] Use a set for interned strings In-Reply-To: <1381173533.0.0.681038585832.issue19187@psf.upfronthosting.co.za> Message-ID: <1381201899.11.0.222782589198.issue19187@psf.upfronthosting.co.za> Raymond Hettinger added the comment: If sets need to be hacked-up to accommodate this, I would like to draft the patch for it that I think will be cleaner. FWIW, I'm dubious that there will be any benefit from this at all. The savings of one-pointer is the dictionary is likely to be insignificant compared to the size of the string object themselves. Also, I think sets conceptually are not the right choice of data structure because they are primarily about membership testing and not about looking up values. Incorporating this kind of hack will make my other set optimization efforts more difficult. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 05:13:45 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 08 Oct 2013 03:13:45 +0000 Subject: [issue19188] Add PySet_CheckExact() In-Reply-To: <1381174539.56.0.480859980209.issue19188@psf.upfronthosting.co.za> Message-ID: <1381202025.06.0.175014458931.issue19188@psf.upfronthosting.co.za> Raymond Hettinger added the comment: AFACIT, there is no use case. I left this out of the API for a reason. It was not an unintentional omission. ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 06:13:16 2013 From: report at bugs.python.org (Berker Peksag) Date: Tue, 08 Oct 2013 04:13:16 +0000 Subject: [issue19178] Entries for "module" and "package" in glossary In-Reply-To: <1381048973.81.0.279739415702.issue19178@psf.upfronthosting.co.za> Message-ID: <1381205596.02.0.408204147026.issue19178@psf.upfronthosting.co.za> Berker Peksag added the comment: For 3.x, I've added cross references between module and package entries. For 2.7, I've backported importing, module and package entries. ---------- keywords: +patch nosy: +berker.peksag stage: needs patch -> patch review Added file: http://bugs.python.org/file31994/issue19178_py3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 06:13:27 2013 From: report at bugs.python.org (Berker Peksag) Date: Tue, 08 Oct 2013 04:13:27 +0000 Subject: [issue19178] Entries for "module" and "package" in glossary In-Reply-To: <1381048973.81.0.279739415702.issue19178@psf.upfronthosting.co.za> Message-ID: <1381205607.3.0.980848297591.issue19178@psf.upfronthosting.co.za> Changes by Berker Peksag : Added file: http://bugs.python.org/file31995/issue19178_py2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 07:41:02 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 08 Oct 2013 05:41:02 +0000 Subject: [issue19190] Improve cross-references in builtins documentation. In-Reply-To: <1381178406.23.0.925502914141.issue19190@psf.upfronthosting.co.za> Message-ID: <1381210862.25.0.599040586388.issue19190@psf.upfronthosting.co.za> Georg Brandl added the comment: Why the need for these changes -- the references I checked are working fine as is. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 07:43:31 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 08 Oct 2013 05:43:31 +0000 Subject: [issue19178] Entries for "module" and "package" in glossary In-Reply-To: <1381048973.81.0.279739415702.issue19178@psf.upfronthosting.co.za> Message-ID: <1381211011.13.0.937451292978.issue19178@psf.upfronthosting.co.za> Georg Brandl added the comment: Looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 08:05:44 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 08 Oct 2013 06:05:44 +0000 Subject: [issue19178] Entries for "module" and "package" in glossary In-Reply-To: <1381048973.81.0.279739415702.issue19178@psf.upfronthosting.co.za> Message-ID: <3cv7Mq15t7z7LkY@mail.python.org> Roundup Robot added the comment: New changeset 5e1f359d54c4 by Georg Brandl in branch '2.7': Closes #19178: backport entries for "module" and "package" from 3.x glossary. Patch by Berker Peksag. http://hg.python.org/cpython/rev/5e1f359d54c4 New changeset b6205505e1e4 by Georg Brandl in branch '3.3': Closes #19178: some more cross-references about packages in glossary. Patch by Berker Peksag. http://hg.python.org/cpython/rev/b6205505e1e4 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 09:33:40 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 08 Oct 2013 07:33:40 +0000 Subject: [issue19187] Use a set for interned strings In-Reply-To: <1381173533.0.0.681038585832.issue19187@psf.upfronthosting.co.za> Message-ID: <1381217620.38.0.965635008167.issue19187@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Added file: http://bugs.python.org/file31996/set_intern1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 09:48:34 2013 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 08 Oct 2013 07:48:34 +0000 Subject: [issue19171] pow() improvement on longs In-Reply-To: <1380982037.44.0.922369997614.issue19171@psf.upfronthosting.co.za> Message-ID: <1381218514.16.0.330385959086.issue19171@psf.upfronthosting.co.za> Mark Dickinson added the comment: Hmm. I thought 2.7 (and 3.3, for that matter) was in bugfix mode only? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 09:51:35 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 08 Oct 2013 07:51:35 +0000 Subject: [issue19171] pow() improvement on longs In-Reply-To: <1380982037.44.0.922369997614.issue19171@psf.upfronthosting.co.za> Message-ID: <1381218695.68.0.674170192788.issue19171@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I thought 2.7 (and 3.3, for that matter) was in bugfix mode only? It would be crazy to not apply this little fix-up. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:02:01 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 08 Oct 2013 08:02:01 +0000 Subject: [issue19187] Use a set for interned strings In-Reply-To: <1381173533.0.0.681038585832.issue19187@psf.upfronthosting.co.za> Message-ID: <1381219321.86.0.170236380901.issue19187@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file31996/set_intern1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:13:42 2013 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 08 Oct 2013 08:13:42 +0000 Subject: [issue19171] pow() improvement on longs In-Reply-To: <1380982037.44.0.922369997614.issue19171@psf.upfronthosting.co.za> Message-ID: <1381220022.59.0.551051186194.issue19171@psf.upfronthosting.co.za> Mark Dickinson added the comment: > It would be crazy to not apply this little fix-up. Crazy? How so? Note that this change, while introducing a performance enhancement in some rather unlikely corner cases, also introduces a performance regression in some other unlikely corner cases: Before the patch (2.7): iwasawa:cpython mdickinson$ ./python.exe -m timeit -s "a=7**10000; b=0; c=23" "pow(a, b, c)" 1000000 loops, best of 3: 0.232 usec per loop After the patch: iwasawa:cpython mdickinson$ ./python.exe -m timeit -s "a=7**10000; b=0; c=23" "pow(a, b, c)" 100000 loops, best of 3: 13.8 usec per loop That can be easily fixed with more special-casing and more code, but I don't think this sort of experimentation is appropriate for a bugfix branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:19:42 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 08 Oct 2013 08:19:42 +0000 Subject: [issue19187] Use a set for interned strings In-Reply-To: <1381173533.0.0.681038585832.issue19187@psf.upfronthosting.co.za> Message-ID: <1381220382.59.0.922684258038.issue19187@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Added file: http://bugs.python.org/file31997/set_intern2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:31:34 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Oct 2013 08:31:34 +0000 Subject: [issue19187] Use a set for interned strings In-Reply-To: <1381173533.0.0.681038585832.issue19187@psf.upfronthosting.co.za> Message-ID: <1381221094.29.0.908153928211.issue19187@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I agree the benefit is likely to be small and very minor. Victor has experience measuring memory consumption of various programs, I would like to know about his measurements. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:45:59 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Oct 2013 08:45:59 +0000 Subject: [issue19186] expat symbols should be namespaced in pyexpat again In-Reply-To: <1381151097.4.0.844657685559.issue19186@psf.upfronthosting.co.za> Message-ID: <1381221959.12.0.582056648955.issue19186@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- priority: normal -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:46:59 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Oct 2013 08:46:59 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <1381222019.18.0.992834132796.issue12892@psf.upfronthosting.co.za> Antoine Pitrou added the comment: utf-16 isn't that widely used, so it's probably fine if it becomes a bit slower. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:50:44 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Oct 2013 08:50:44 +0000 Subject: [issue19158] BoundedSemaphore.release() subject to races In-Reply-To: <1380844816.11.0.829919053917.issue19158@psf.upfronthosting.co.za> Message-ID: <1381222244.52.0.170517618703.issue19158@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The implementation is a bit weird. Why take the lock a second time instead of simply reimplementing the release() method? (it's a 5-liner) By the way, Semaphore.acquire could probably use Condition.wait_for. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:53:47 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Oct 2013 08:53:47 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1381222427.82.0.429792726369.issue3982@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I'd like to put a nudge towards supporting the __mod__ interface on bytes - > for Mercurial this is the single biggest impediment to even getting our > testrunner working, much less starting the porting process. Given a spec hasn't been written (bytes.__mod__ can't support the same things as str.__mod__), and nobody seems to step up to write it, I'd say this is unlikely to appear in 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:55:54 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2013 08:55:54 +0000 Subject: [issue19190] Improve cross-references in builtins documentation. In-Reply-To: <1381178406.23.0.925502914141.issue19190@psf.upfronthosting.co.za> Message-ID: <1381222554.91.0.829440390929.issue19190@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Indeed, there are false changes. Thank you Georg. Here is cleaned patch. ---------- Added file: http://bugs.python.org/file31998/refs.builtins_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:59:13 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 08 Oct 2013 08:59:13 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1381222019.18.0.992834132796.issue12892@psf.upfronthosting.co.za> Message-ID: <5253C95B.90006@egenix.com> Marc-Andre Lemburg added the comment: On 08.10.2013 10:46, Antoine Pitrou wrote: > > utf-16 isn't that widely used, so it's probably fine if it becomes a bit slower. It's the default encoding for Unicode text files and APIs on Windows, so I'd say it *is* widely used :-) http://en.wikipedia.org/wiki/UTF-16#Use_in_major_operating_systems_and_environments ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 11:03:35 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Oct 2013 09:03:35 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <5253C95B.90006@egenix.com> Message-ID: <737814870.59012621.1381223008918.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > On 08.10.2013 10:46, Antoine Pitrou wrote: > > > > utf-16 isn't that widely used, so it's probably fine if it becomes > > a bit slower. > > It's the default encoding for Unicode text files and APIs on Windows, > so I'd say it *is* widely used :-) I've never seen any UTF-16 text files. Do you have other data? APIs are irrelevant. You only pass very small strings to then (e.g. file paths). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 11:22:19 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Oct 2013 09:22:19 +0000 Subject: [issue19142] Cross-compile fails trying to execute foreign pgen on build host In-Reply-To: <1380670898.69.0.308819053325.issue19142@psf.upfronthosting.co.za> Message-ID: <1381224139.12.0.457499097699.issue19142@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Have you tried "make touch" to avoid rebuilding pgen and stuff? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 11:25:11 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 08 Oct 2013 09:25:11 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <737814870.59012621.1381223008918.JavaMail.root@zimbra10-e2.priv.proxad.net> Message-ID: <5253CF71.2010000@egenix.com> Marc-Andre Lemburg added the comment: On 08.10.2013 11:03, Antoine Pitrou wrote: > >>> utf-16 isn't that widely used, so it's probably fine if it becomes >>> a bit slower. >> >> It's the default encoding for Unicode text files and APIs on Windows, >> so I'd say it *is* widely used :-) > > I've never seen any UTF-16 text files. Do you have other data? See the link I posted. MS Notepad and MS Office save Unicode text files in UTF-16-LE, unless you explicitly specify UTF-8, just like many other Windows applications that support Unicode text files: http://msdn.microsoft.com/en-us/library/windows/desktop/dd374101%28v=vs.85%29.aspx http://superuser.com/questions/294219/what-are-the-differences-between-linux-and-windows-txt-files-unicode-encoding This is simply due to the fact that MS introduced Unicode plain text files as UTF-16-LE files and only later added the possibility to also use UTF-8 with BOM versions. > APIs are irrelevant. You only pass very small strings to then (e.g. > file paths). You are forgetting that wchar_t is UTF-16 on Windows, so UTF-16 is all around you when working on Windows, not only in the OS APIs, but also in most other Unicode APIs you find on Windows: http://msdn.microsoft.com/en-us/library/windows/desktop/dd374089%28v=vs.85%29.aspx http://msdn.microsoft.com/en-us/library/windows/desktop/dd374061%28v=vs.85%29.aspx ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 11:33:24 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Oct 2013 09:33:24 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <5253CF71.2010000@egenix.com> Message-ID: <116765461.59095722.1381224798470.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > MS Notepad and MS Office save Unicode text files in UTF-16-LE, > unless you explicitly specify UTF-8, just like many other Windows > applications that support Unicode text files: I'd be curious to know if people actually edit *text files* using Microsoft Word (rather than Word documents). Same for Notepad, which is much too poor to edit something else than a 10-line configuration file. > You are forgetting that wchar_t is UTF-16 on Windows, so UTF-16 > is all around you when working on Windows, not only in the OS APIs, > but also in most other Unicode APIs you find on Windows: Still, unless those APIs get passed rather large strings, the performance different should be irrelevant IMHO. We're talking about using those APIs from Python, not from a raw optimized C program. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 11:42:19 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2013 09:42:19 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <1381225339.08.0.987997286064.issue12892@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: UTF-16 codec still fast enough. Let first make it correct and then will try optimize it. I have an idea how restore 3.3 performance (if it worth, the code already complicated enough). The converting to/from wchar_t* uses different code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 12:03:06 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 08 Oct 2013 10:03:06 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <116765461.59095722.1381224798470.JavaMail.root@zimbra10-e2.priv.proxad.net> Message-ID: <5253D843.40506@egenix.com> Marc-Andre Lemburg added the comment: On 08.10.2013 11:33, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> MS Notepad and MS Office save Unicode text files in UTF-16-LE, >> unless you explicitly specify UTF-8, just like many other Windows >> applications that support Unicode text files: > > I'd be curious to know if people actually edit *text files* using > Microsoft Word (rather than Word documents). > Same for Notepad, which is much too poor to edit something else > than a 10-line configuration file. The question is not so much which program they use for editing. The format "Unicode text file" is defined as UTF-16-LE on Windows (see the links I posted). >> You are forgetting that wchar_t is UTF-16 on Windows, so UTF-16 >> is all around you when working on Windows, not only in the OS APIs, >> but also in most other Unicode APIs you find on Windows: > > Still, unless those APIs get passed rather large strings, the performance > different should be irrelevant IMHO. We're talking about using those APIs > from Python, not from a raw optimized C program. Antoine, I'm just pointing out that your statement that UTF-16 is not widely used may apply to the Unix world, but it doesn't apply to Windows. Java also uses UTF-16 internally and makes this available via JNI as jchar*. The APIs on those platforms are used from Python (the interpreter and also by extensions) and do use the UTF-16 Python codec to convert the data to Python Unicode/string objects, so the fact that UTF-16 is used widely on some of the more popular platforms does matter. UTF-8, UTF-16 and UTF-32 codecs need to be as fast as possible in Python to not create performance problems when converting between platform Unicode data and the internal formats used in Python. The real question is: Can the UTF-16/32 codecs be made fast while still detecting lone surrogates ? Not whether UTF-16 is widely used or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 12:28:07 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2013 10:28:07 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <1381228087.0.0.494864640397.issue12892@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I repeat myself. Even with the patch, UTF-16 codec is faster than UTF-8 codec (except ASCII-only data). This is fastest Unicode codec in Python (perhaps UTF-32 can be made faster, but this is another issue). > The real question is: Can the UTF-16/32 codecs be made fast > while still detecting lone surrogates ? Not whether UTF-16 > is widely used or not. Yes, they can. But let defer this to other issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 12:30:56 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Oct 2013 10:30:56 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <5253D843.40506@egenix.com> Message-ID: <851275436.59250047.1381228250501.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > UTF-8, UTF-16 and UTF-32 codecs need to be as fast as possible > in Python to not create performance problems when converting > between platform Unicode data and the internal formats > used in Python. "As fast as possible" is a platonic dream. They only need to be fast enough not to be bottlenecks. If you know of a *Python* workload where UTF-16 decoding is the bottleneck, I'd like to know about it :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 12:32:59 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 08 Oct 2013 10:32:59 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1381225339.08.0.987997286064.issue12892@psf.upfronthosting.co.za> Message-ID: <5253DF56.7030204@egenix.com> Marc-Andre Lemburg added the comment: On 08.10.2013 11:42, Serhiy Storchaka wrote: > > UTF-16 codec still fast enough. Let first make it correct and then will try optimize it. I have an idea how restore 3.3 performance (if it worth, the code already complicated enough). That's a good plan :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 12:39:06 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 08 Oct 2013 10:39:06 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <851275436.59250047.1381228250501.JavaMail.root@zimbra10-e2.priv.proxad.net> Message-ID: <5253E0C5.3010606@egenix.com> Marc-Andre Lemburg added the comment: On 08.10.2013 12:30, Antoine Pitrou wrote: > >> UTF-8, UTF-16 and UTF-32 codecs need to be as fast as possible >> in Python to not create performance problems when converting >> between platform Unicode data and the internal formats >> used in Python. > > "As fast as possible" is a platonic dream. > They only need to be fast enough not to be bottlenecks. No, they need to be as fast as possible, without sacrificing correctness. This has always been our guideline for codec implementations and string methods. As a result, our implementations are some of the best out there. ---------- _______________________________________ Python tracker _______________________________________ From mal at egenix.com Tue Oct 8 12:39:01 2013 From: mal at egenix.com (M.-A. Lemburg) Date: Tue, 08 Oct 2013 12:39:01 +0200 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <851275436.59250047.1381228250501.JavaMail.root@zimbra10-e2.priv.proxad.net> References: <851275436.59250047.1381228250501.JavaMail.root@zimbra10-e2.priv.proxad.net> Message-ID: <5253E0C5.3010606@egenix.com> On 08.10.2013 12:30, Antoine Pitrou wrote: > >> UTF-8, UTF-16 and UTF-32 codecs need to be as fast as possible >> in Python to not create performance problems when converting >> between platform Unicode data and the internal formats >> used in Python. > > "As fast as possible" is a platonic dream. > They only need to be fast enough not to be bottlenecks. No, they need to be as fast as possible, without sacrificing correctness. This has always been our guideline for codec implementations and string methods. As a result, our implementations are some of the best out there. -- Marc-Andre Lemburg eGenix.com From report at bugs.python.org Tue Oct 8 13:04:10 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2013 11:04:10 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <5253E0C5.3010606@egenix.com> Message-ID: STINNER Victor added the comment: I don't think that performances on a microbenchmark is the good question. The good question is: does Python conform to Unicode? The answer is simple and explicit: no. Encoding lone surrogates may lead to bugs and even security vulnerabilities. Please open a new performance issue after fixing this one if you have another patch improving performances. I didn't read the patch yet, but strict, surrogatepass and surrogateescape error handlers must be checked. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 13:39:47 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2013 11:39:47 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <1381232387.19.0.356914970928.issue12892@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is my idea: http://permalink.gmane.org/gmane.comp.python.ideas/23521. I see that a discussion about how fast UTF-16 codec should be already larger than discussion about patches. Could you please review this not so simple patch instead? Yet one help which I need is writing a note in "Porting to Python 3.4" section in Doc/whatsnew/3.4.rst. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 14:00:34 2013 From: report at bugs.python.org (Trevor Bowen) Date: Tue, 08 Oct 2013 12:00:34 +0000 Subject: [issue19142] Cross-compile fails trying to execute foreign pgen on build host In-Reply-To: <1380670898.69.0.308819053325.issue19142@psf.upfronthosting.co.za> Message-ID: <1381233634.04.0.219253293131.issue19142@psf.upfronthosting.co.za> Trevor Bowen added the comment: I thought "make touch" was only for those trying to build from the Mecurial source, as opposed to building from the released tar-ball source. I thought my efforts laid on the other side of the need for that command. If I understood wrong, when would I use it and why? ... Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 14:19:05 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 08 Oct 2013 12:19:05 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <1381234745.95.0.727736925209.issue12892@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Marc-Andre: please don't confuse "use in major operating systems" with "major use in operating systems". I agree with Antoine that UTF-16 isn't widely used on Windows, despite notepad and Office supporting it. Most users on Windows using notepad continue to use the ANSI code page, most users of Word use Word files (instead of plain text). Also, wchar_t on Windows isn't *really* UTF-16. Many APIs support lone surrogates just fine; they really are UCS-2 instead (e.g. the file system APIs). Only starting with Vista, MultiByteToWideChar will complain about lone surrogates. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 14:30:42 2013 From: report at bugs.python.org (Florent Viard) Date: Tue, 08 Oct 2013 12:30:42 +0000 Subject: [issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed. In-Reply-To: <1380820358.99.0.777618727237.issue19154@psf.upfronthosting.co.za> Message-ID: <1381235442.84.0.712463429466.issue19154@psf.upfronthosting.co.za> Florent Viard added the comment: Thank you for your reply. But I just realised that in my bug issue, I completely forgot to indicate what is "req" and so this is maybe the root of you telling me that the best is to fix the client code side as the traceback could be confusing. This is how is defined req.: opener = urllib2.build_opener(proxy_handler) req = urllib2.Request(url_src) then: while 1: read_list = select([req], ...)[0] if read_list: req.read(CHUNK_SIZE) I found this issue with python 2.7, but I don't care a lot for it to be fixed in 2.7. As I saw that the code looks unchanged in python 3.x, I just reported the issue for it to be fixed/better handled in 3.x :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 14:55:54 2013 From: report at bugs.python.org (Augie Fackler) Date: Tue, 08 Oct 2013 12:55:54 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1381236954.71.0.927553631.issue3982@psf.upfronthosting.co.za> Augie Fackler added the comment: Is there any chance we could just have it work for bytes, ints, and floats? That'd solve the immediate need, and it'd be obviously correct how to have those behave. Punting this to 3.5 basically means we'll have to either wait for 3.5, or do something awful like use cffi to grab sprintf to port Mercurial. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 15:07:43 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 08 Oct 2013 13:07:43 +0000 Subject: [issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots In-Reply-To: <1380295557.39.0.230281055925.issue19106@psf.upfronthosting.co.za> Message-ID: <1381237663.42.0.668054773801.issue19106@psf.upfronthosting.co.za> Eli Bendersky added the comment: I think this issue can be closed, since Martin's touch step runs on the bots successfully, and the ASDL dependencies in .hgtouch were fixed. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 15:09:22 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 08 Oct 2013 13:09:22 +0000 Subject: [issue15964] SyntaxError in asdl when building 2.7 with system Python 3 In-Reply-To: <1347978379.29.0.810502621141.issue15964@psf.upfronthosting.co.za> Message-ID: <1381237762.22.0.0349619222331.issue15964@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 15:11:00 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 08 Oct 2013 13:11:00 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: <1279677265.36.0.322549269298.issue9317@psf.upfronthosting.co.za> Message-ID: <1381237860.89.0.689224772196.issue9317@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: -eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 15:11:08 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 08 Oct 2013 13:11:08 +0000 Subject: [issue9398] Unify sys.settrace and sys.setprofile tests In-Reply-To: <1280329442.24.0.0145405625071.issue9398@psf.upfronthosting.co.za> Message-ID: <1381237868.56.0.218916245327.issue9398@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: -eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 15:11:18 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 08 Oct 2013 13:11:18 +0000 Subject: [issue8957] strptime(.., '%c') fails to parse output of strftime('%c', ..) in some locales In-Reply-To: <1276115080.37.0.388300880324.issue8957@psf.upfronthosting.co.za> Message-ID: <1381237878.97.0.115318137065.issue8957@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: -eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 15:12:19 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 08 Oct 2013 13:12:19 +0000 Subject: [issue14332] Better explain "junk" concept in difflib doc In-Reply-To: <1331877125.66.0.103153393744.issue14332@psf.upfronthosting.co.za> Message-ID: <1381237939.77.0.692368678531.issue14332@psf.upfronthosting.co.za> Eli Bendersky added the comment: Tim, any suggestions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 15:16:19 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 08 Oct 2013 13:16:19 +0000 Subject: [issue16817] test___all__ affects other tests by doing too much importing In-Reply-To: <1356828969.86.0.130125185831.issue16817@psf.upfronthosting.co.za> Message-ID: <1381238179.9.0.285120562965.issue16817@psf.upfronthosting.co.za> Eli Bendersky added the comment: This is superceded by: http://bugs.python.org/issue18906 ---------- superseder: -> Create a way to always run tests in subprocesses within regrtest _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 15:35:50 2013 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 08 Oct 2013 13:35:50 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1381239350.35.0.262463559746.issue3982@psf.upfronthosting.co.za> Eric V. Smith added the comment: If you could write up a concrete proposal, including which format specifiers would be supported, that would be helpful. Would it be extensible with something like __bformat__? There's really quite a bit of work to be done to specify how this would work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 15:38:09 2013 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 08 Oct 2013 13:38:09 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1381239489.45.0.668182907058.issue3982@psf.upfronthosting.co.za> Eric V. Smith added the comment: Also, with the PEP 393 changes, the implementation will be much more difficult. Sharing code with str (unicode) will likely be impossible, or require much refactoring of the existing code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 16:41:02 2013 From: report at bugs.python.org (Marc Abramowitz) Date: Tue, 08 Oct 2013 14:41:02 +0000 Subject: [issue13405] Add DTrace probes In-Reply-To: <1321299726.66.0.343368151185.issue13405@psf.upfronthosting.co.za> Message-ID: <1381243262.34.0.777204743208.issue13405@psf.upfronthosting.co.za> Marc Abramowitz added the comment: Nice to see this moving along as I helped Jes?s a while back with some testing on OS X and FreeBSD. The buildbots in particular sound like a great asset. Let me know if I can help again with testing, though it looks like the basics are pretty well-covered by the buildbots. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 17:08:36 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Oct 2013 15:08:36 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1381236954.71.0.927553631.issue3982@psf.upfronthosting.co.za> Message-ID: <1863011480.59955638.1381244910224.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > Is there any chance we could just have it work for bytes, ints, and > floats? That'd solve the immediate need, and it'd be obviously > correct how to have those behave. You mean "%s" and "%d"? > Punting this to 3.5 basically means we'll have to either wait for > 3.5, or do something awful like use cffi to grab sprintf to port > Mercurial. Or write a pure Python implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 17:10:00 2013 From: report at bugs.python.org (Augie Fackler) Date: Tue, 08 Oct 2013 15:10:00 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1863011480.59955638.1381244910224.JavaMail.root@zimbra10-e2.priv.proxad.net> Message-ID: Augie Fackler added the comment: On Tue, Oct 8, 2013 at 11:08 AM, Antoine Pitrou wrote: > > Is there any chance we could just have it work for bytes, ints, and > > floats? That'd solve the immediate need, and it'd be obviously > > correct how to have those behave. > > You mean "%s" and "%d"? > Basically, yes. > > > Punting this to 3.5 basically means we'll have to either wait for > > 3.5, or do something awful like use cffi to grab sprintf to port > > Mercurial. > > Or write a pure Python implementation. Hah. Probably too slow for anything beyond a proof of concept, no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 17:25:06 2013 From: report at bugs.python.org (xiaowei) Date: Tue, 08 Oct 2013 15:25:06 +0000 Subject: [issue19191] os.path.splitext in windows , a little question Message-ID: <1381245906.23.0.98078809812.issue19191@psf.upfronthosting.co.za> New submission from xiaowei: >>> print( os.path.splitext.__doc__ ) Split the extension from a pathname. Extension is everything from the last dot to the end, ignoring leading dots. Returns "(root, ext)"; ext may be empty. >>> os.path.splitext('.txt') ('.txt', '') #### I think, in windows it should be ('','.txt'), because the first dot doesnot mean hiding. Actually, in windows file explorer , it will show a empty file name and hide the extension if the extension has been related a program except shell32.dll?just like the attachment show. So, in windows, the last dot , even it's the first character of the file name, it still means the start of the file extension name. In this case, windows doesnot like linux, we donot have to make them same. If you agree, then why we can talk ignoring leading dots or not ...... i mean os.path.splitext('...ext') Anyway, thank you , for your work, even you donot think so ---------- components: Windows files: fileext.JPG messages: 199208 nosy: xiaowei.py priority: normal severity: normal status: open title: os.path.splitext in windows , a little question type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file31999/fileext.JPG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 17:31:43 2013 From: report at bugs.python.org (Tim Golden) Date: Tue, 08 Oct 2013 15:31:43 +0000 Subject: [issue19191] os.path.splitext in windows , a little question In-Reply-To: <1381245906.23.0.98078809812.issue19191@psf.upfronthosting.co.za> Message-ID: <52542549.6090005@timgolden.me.uk> Tim Golden added the comment: This was implemented after discussion in issue1115886: http://bugs.python.org/issue1115886 and python-dev: https://mail.python.org/pipermail/python-dev/2007-March/071557.html In short, it could have gone either way and it went this way. ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 17:32:22 2013 From: report at bugs.python.org (Tim Golden) Date: Tue, 08 Oct 2013 15:32:22 +0000 Subject: [issue19191] os.path.splitext in windows , a little question In-Reply-To: <1381245906.23.0.98078809812.issue19191@psf.upfronthosting.co.za> Message-ID: <1381246342.1.0.623524931161.issue19191@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- resolution: -> wont fix stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 17:38:17 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 08 Oct 2013 15:38:17 +0000 Subject: [issue18679] include a codec to handle escaping only control characters but not any others In-Reply-To: <1375910565.85.0.834240880509.issue18679@psf.upfronthosting.co.za> Message-ID: <1381246697.34.0.79230655102.issue18679@psf.upfronthosting.co.za> R. David Murray added the comment: Well, you could writing a streaming codec. Even if it didn't get accepted for the stdlib, you could put it up on pypi. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 17:51:59 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 08 Oct 2013 15:51:59 +0000 Subject: [issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed. In-Reply-To: <1380820358.99.0.777618727237.issue19154@psf.upfronthosting.co.za> Message-ID: <1381247519.78.0.433848459234.issue19154@psf.upfronthosting.co.za> R. David Murray added the comment: It seems to me that there is indeed an issue of some sort here, but its locus is (to me) unclear. I haven't commented before this because I wanted to read the docs...but I haven't had time yet :) One question is, is it even expected that passing a Request to select will work? If it *is* expected, then what is the API that req should be conforming to? This API may be an implicit one that is not documented, or perhaps it is documented in select (I haven't checked). If req is conforming to the explicit or implicit API, then the bug would be in select. Otherwise it is in httplib. Or, if this isn't something we've been supporting in the past, then as Terry says it is a new feature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 17:53:30 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 08 Oct 2013 15:53:30 +0000 Subject: [issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed. In-Reply-To: <1380820358.99.0.777618727237.issue19154@psf.upfronthosting.co.za> Message-ID: <1381247610.09.0.533783926752.issue19154@psf.upfronthosting.co.za> R. David Murray added the comment: s/httplib/urllib/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 17:59:27 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Oct 2013 15:59:27 +0000 Subject: [issue19187] Use a set for interned strings In-Reply-To: <1381173533.0.0.681038585832.issue19187@psf.upfronthosting.co.za> Message-ID: <1381247967.9.0.205727974294.issue19187@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 18:09:45 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 08 Oct 2013 16:09:45 +0000 Subject: [issue19142] Cross-compile fails trying to execute foreign pgen on build host In-Reply-To: <1380670898.69.0.308819053325.issue19142@psf.upfronthosting.co.za> Message-ID: <1381248585.58.0.268427754001.issue19142@psf.upfronthosting.co.za> R. David Murray added the comment: make touch avoids rebuilding "pgen and stuff", and just uses what was checked out or provided in the tarball. The release tarballs are supposed to have the time stamps in the correct order so that the compiletime/boostrapping utilities don't get built/rebuilt. So for cross compilation, you should be able to use the existing files to build the target python. If you then also want pgen *on the target*, you will need to build it for the target. Like I said, I don't have much experience with this stuff, but if I understand correctly, you only really the utilities if you want to be able to do development *of python* on the target. So, if running make in cross-compile "mode" (whatever that looks like, I have no clue) tries to rebuild pgen in your scenario, then *that* is what needs to be fixed, I think. Of course, I could be completely wrong, which is why I've been pretty tentative about handing out advice :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 18:13:00 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 08 Oct 2013 16:13:00 +0000 Subject: [issue19165] Change formatter warning to DeprecationWarning in 3.5 Message-ID: <1381248780.95.0.467798670434.issue19165@psf.upfronthosting.co.za> New submission from R. David Murray: You two may know what this is about, but I have no clue :) A few more details would help if someone wants to try their hand at a patch. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 18:15:05 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 08 Oct 2013 16:15:05 +0000 Subject: [issue19167] sqlite3 cursor.description varies across Linux (3.3.1), Win32 (3.3.2), when selecting from a view. In-Reply-To: <1380919983.53.0.47531466178.issue19167@psf.upfronthosting.co.za> Message-ID: <1381248905.42.0.107726958249.issue19167@psf.upfronthosting.co.za> R. David Murray added the comment: There is a decent chance this is a bug in sqlite. Have you checked? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 18:17:42 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 08 Oct 2013 16:17:42 +0000 Subject: [issue19168] pprint.pprint(..., compact=True) not implemented In-Reply-To: <1380926374.45.0.423470167923.issue19168@psf.upfronthosting.co.za> Message-ID: <1381249062.23.0.0191337121679.issue19168@psf.upfronthosting.co.za> R. David Murray added the comment: FYI: the development documentation tracks the tip of the default branch, so it sometimes documents features that have not yet been released even in an alpha. When we hit the first beta, *then* if the code doesn't match the docs there is a bug :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 18:21:00 2013 From: report at bugs.python.org (Tim Peters) Date: Tue, 08 Oct 2013 16:21:00 +0000 Subject: [issue19171] pow() improvement on longs In-Reply-To: <1380982037.44.0.922369997614.issue19171@psf.upfronthosting.co.za> Message-ID: <1381249260.96.0.545973640766.issue19171@psf.upfronthosting.co.za> Tim Peters added the comment: I'll revert the 2.7 change if people agree that's a good thing. I'm fine with it as-is. Armin pulled the idea from timing a Python public-key crypto project (see the original message in this report), where he found a 14% improvement. I don't care if the trivial exponent == 0 case slows down - that's _truly_ unlikely ;-) The time spent special-casing it would marginally slow down other cases without good reason. For any exponent other than 0, reduction by the base must be done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 18:26:11 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Tue, 08 Oct 2013 16:26:11 +0000 Subject: [issue19192] Move test_current_time from test_xmlrpc_net to test_xmlrpc Message-ID: <1381249571.28.0.993585174787.issue19192@psf.upfronthosting.co.za> New submission from Vajrasky Kok: Currently, the test_current_time is idle because the server (time.xmlrpc.com) that it requires is dead (at the moment being and no end in sight). The patch moved the test from Lib/test/test_xmlrpc_net.py to Lib/test/test_xmlrpc.py and simulate the time.xmlrpc.com server using http_server's TestInstanceClass. ---------- components: Tests files: move_current_time_test_from_xmlrpc_net_to_xmlrpc.patch keywords: patch messages: 199218 nosy: r.david.murray, vajrasky priority: normal severity: normal status: open title: Move test_current_time from test_xmlrpc_net to test_xmlrpc versions: Python 3.4 Added file: http://bugs.python.org/file32000/move_current_time_test_from_xmlrpc_net_to_xmlrpc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 18:58:13 2013 From: report at bugs.python.org (Tim Peters) Date: Tue, 08 Oct 2013 16:58:13 +0000 Subject: [issue19158] BoundedSemaphore.release() subject to races In-Reply-To: <1380844816.11.0.829919053917.issue19158@psf.upfronthosting.co.za> Message-ID: <1381251493.4.0.801188289609.issue19158@psf.upfronthosting.co.za> Tim Peters added the comment: This is the "right" way to do it: the subclass wants to extend the behavior of the base class .release(), not to replace it. Calling the base class .release() is the natural and obvious way to do that. It's also utterly normal for a lock used by multiple methods to be acquired & released multiple times - that's what an RLock is for. What's odd to my eyes is that Semaphore - before the patch - went out of its way to _not_ use an RLock in its condition variable (Conditions use an RLock by default, for good reasons). About acquire(), this is a bugfix - I'm not looking here to change code that isn't broken ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 19:06:24 2013 From: report at bugs.python.org (Trevor Bowen) Date: Tue, 08 Oct 2013 17:06:24 +0000 Subject: [issue19142] Cross-compile fails trying to execute foreign pgen on build host In-Reply-To: <1380670898.69.0.308819053325.issue19142@psf.upfronthosting.co.za> Message-ID: <1381251984.44.0.0404308704024.issue19142@psf.upfronthosting.co.za> Trevor Bowen added the comment: Thanks, David! I have no interest in running pgen on the target/host. My only interest is building python and its various modules to run on my embedded host. I do not want to develop Python on the embedded host. Unfortunately, the build process requires Parser/pgen to build the grammar files, which are needed for several object files. Here's the relevant snippet from the Makefile.pre.in: $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS) @$(MKDIR_P) Include $(MAKE) $(PGEN) $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS) $(MAKE) $(GRAMMAR_H) touch $(GRAMMAR_C) $(PGEN): $(PGENOBJS) $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) Parser/grammar.o: $(srcdir)/Parser/grammar.c \ $(srcdir)/Include/token.h \ $(srcdir)/Include/grammar.h ... Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) If there is a way to eliminate the need for Parser/pgen to run on the build system to cross-compile the default "all" target, that would be great. ... I'll experiment with "make touch". ... Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 19:17:34 2013 From: report at bugs.python.org (Florent Viard) Date: Tue, 08 Oct 2013 17:17:34 +0000 Subject: [issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed. In-Reply-To: <1380820358.99.0.777618727237.issue19154@psf.upfronthosting.co.za> Message-ID: <1381252654.03.0.541006704777.issue19154@psf.upfronthosting.co.za> Florent Viard added the comment: R. David, what you say is correct, supporting "select" that would be nice but i'm also not sure that is supposed to, and in that case, maybe select as to be fixed for that. But: a) As urllib2 through httplib provide publicly a fileno, i was excepting so. b) The real point of my issue is that i noticed that there is 3 different return values, for the similar fileno function in 3 different modules of python, when the file descriptor is closed or inexistant: - in urllib2->httplib: AttributeError as "None" as no "fileno()" attribute. - in socket : ValueError - in fileinput: -1 And for the 2 firsts, one is finally using the fileno function of the other. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 19:24:21 2013 From: report at bugs.python.org (Trevor Bowen) Date: Tue, 08 Oct 2013 17:24:21 +0000 Subject: [issue19142] Cross-compile fails trying to execute foreign pgen on build host In-Reply-To: <1380670898.69.0.308819053325.issue19142@psf.upfronthosting.co.za> Message-ID: <1381253061.72.0.819449557191.issue19142@psf.upfronthosting.co.za> Trevor Bowen added the comment: I executed "make touch" between "configure" and "make", but the build process still created Parser/pgen and then tried to use it, which of course crashed the build, since pgen was compiled for the embedded host not the build system. :( Was that the wrong usage? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 19:28:41 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 08 Oct 2013 17:28:41 +0000 Subject: [issue13436] compile() doesn't work on ImportFrom with level=None In-Reply-To: <1321747479.31.0.688458511993.issue13436@psf.upfronthosting.co.za> Message-ID: <1381253321.95.0.892327300016.issue13436@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- Removed message: http://bugs.python.org/msg148146 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 19:29:33 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 08 Oct 2013 17:29:33 +0000 Subject: [issue13436] compile() doesn't work on ImportFrom with level=None In-Reply-To: <1321747479.31.0.688458511993.issue13436@psf.upfronthosting.co.za> Message-ID: <1381253373.56.0.887981053393.issue13436@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- components: -Documentation nosy: -docs at python, python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 19:32:55 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Oct 2013 17:32:55 +0000 Subject: [issue19158] BoundedSemaphore.release() subject to races In-Reply-To: <1381251493.4.0.801188289609.issue19158@psf.upfronthosting.co.za> Message-ID: <1381253573.2582.2.camel@fsol> Antoine Pitrou added the comment: Le mardi 08 octobre 2013 ? 16:58 +0000, Tim Peters a ?crit : > Tim Peters added the comment: > > This is the "right" way to do it: the subclass wants to extend the > behavior of the base class .release(), not to replace it. Calling the > base class .release() is the natural and obvious way to do that. Well... IMOHO it would be "natural and obvious" if those were in different modules written by different developers. Here I think that "practicality beats purity", though. (although I'm not sure the person who originally wrote that sentence can really be trusted ;-)) > About acquire(), this is a bugfix - I'm not looking here to change > code that isn't broken ;-) Agreed. Just wanted to mention it before I'd totally forget about it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 19:47:00 2013 From: report at bugs.python.org (Kushal Das) Date: Tue, 08 Oct 2013 17:47:00 +0000 Subject: [issue19167] sqlite3 cursor.description varies across Linux (3.3.1), Win32 (3.3.2), when selecting from a view. In-Reply-To: <1380919983.53.0.47531466178.issue19167@psf.upfronthosting.co.za> Message-ID: <1381254420.91.0.972723949786.issue19167@psf.upfronthosting.co.za> Kushal Das added the comment: Looking at the code, it seems to be a sqlite issue. ---------- nosy: +kushaldas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 20:00:45 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 08 Oct 2013 18:00:45 +0000 Subject: [issue14224] packaging: path description of resources is mixed up In-Reply-To: <1331157234.71.0.528832694178.issue14224@psf.upfronthosting.co.za> Message-ID: <1381255245.63.0.630235693768.issue14224@psf.upfronthosting.co.za> Georg Brandl added the comment: Doc/packaging has been removed. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 20:09:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 08 Oct 2013 18:09:27 +0000 Subject: [issue18037] 2to3 passes through string literal which causes SyntaxError in 3.x In-Reply-To: <1369259204.14.0.48841389768.issue18037@psf.upfronthosting.co.za> Message-ID: <3cvRQv1Hdwz7LkW@mail.python.org> Roundup Robot added the comment: New changeset c498d1090970 by Serhiy Storchaka in branch '2.7': Issue #18037: Do not escape '\u' and '\U' in raw strings. http://hg.python.org/cpython/rev/c498d1090970 New changeset acb2dacd0d24 by Serhiy Storchaka in branch '3.3': Issue #18037: Do not escape '\u' and '\U' in raw strings. http://hg.python.org/cpython/rev/acb2dacd0d24 New changeset a49d313a28ae by Serhiy Storchaka in branch 'default': Issue #18037: Do not escape '\u' and '\U' in raw strings. http://hg.python.org/cpython/rev/a49d313a28ae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 20:10:41 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2013 18:10:41 +0000 Subject: [issue18037] 2to3 passes through string literal which causes SyntaxError in 3.x In-Reply-To: <1369259204.14.0.48841389768.issue18037@psf.upfronthosting.co.za> Message-ID: <1381255841.17.0.406751439336.issue18037@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Arfrever. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 20:12:50 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2013 18:12:50 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <1381255970.91.0.135993184459.issue18758@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Improve cross-references in builtins documentation., Improve cross-references in pickle documentation. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 20:16:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2013 18:16:58 +0000 Subject: [issue19193] Improve cross-references in tutorial Message-ID: <1381256218.12.0.311002758548.issue19193@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here is a patch which fixes internal references in the tutorial. ---------- assignee: docs at python components: Documentation files: refs.tutorial.patch keywords: patch messages: 199228 nosy: docs at python, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Improve cross-references in tutorial type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32001/refs.tutorial.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 20:18:41 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2013 18:18:41 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <1381256321.5.0.991731450742.issue18758@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Improve cross-references in tutorial _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 20:26:55 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 08 Oct 2013 18:26:55 +0000 Subject: [issue13867] misleading comment in weakrefobject.h In-Reply-To: <1327532476.25.0.872465463087.issue13867@psf.upfronthosting.co.za> Message-ID: <3cvRq16qswz7Ljh@mail.python.org> Roundup Robot added the comment: New changeset 1800107873c0 by Georg Brandl in branch 'default': Closes #13867: remove untrue comment about PyWeakref_Check(). http://hg.python.org/cpython/rev/1800107873c0 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 20:30:39 2013 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 08 Oct 2013 18:30:39 +0000 Subject: [issue19171] pow() improvement on longs In-Reply-To: <1380982037.44.0.922369997614.issue19171@psf.upfronthosting.co.za> Message-ID: <1381257039.12.0.923338020776.issue19171@psf.upfronthosting.co.za> Mark Dickinson added the comment: No need to revert. The improvement seems like a good one; I was just a bit surprised to see it land in the maintenance branches as well as the default branch. My understanding was that minor performance improvements aren't normally candidates for inclusion in 2.7. Maybe Benjamin can clarify the policy here. > I don't care if the trivial exponent == 0 case slows down [...] Sure; I guess my point was that even the simplest change can have unexpected / unintended consequences, which is one of the reasons that it makes sense to me to avoid non-bugfix changes in 2.7 / 3.3. (We're not totally without use-cases for special-casing pow(a, 0, b), by the way: such a pow operation occurs any time you do `hash(Decimal(some_integer))`, though admittedly not with an oversized a.) ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 20:32:08 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 08 Oct 2013 18:32:08 +0000 Subject: [issue13867] misleading comment in weakrefobject.h In-Reply-To: <1327532476.25.0.872465463087.issue13867@psf.upfronthosting.co.za> Message-ID: <3cvRx32tWfz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 1cd2fca12abf by Georg Brandl in branch '3.3': Closes #13867: remove untrue comment about PyWeakref_Check(). http://hg.python.org/cpython/rev/1cd2fca12abf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 20:33:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 08 Oct 2013 18:33:01 +0000 Subject: [issue13867] misleading comment in weakrefobject.h In-Reply-To: <1327532476.25.0.872465463087.issue13867@psf.upfronthosting.co.za> Message-ID: <3cvRy45LHxzSyK@mail.python.org> Roundup Robot added the comment: New changeset 39e5ab118602 by Georg Brandl in branch '2.7': Closes #13867: remove untrue comment about PyWeakref_Check(). http://hg.python.org/cpython/rev/39e5ab118602 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 20:34:48 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 08 Oct 2013 18:34:48 +0000 Subject: [issue15264] PyErr_SetFromErrnoWithFilenameObject() undocumented In-Reply-To: <1341592840.74.0.991788798601.issue15264@psf.upfronthosting.co.za> Message-ID: <1381257288.74.0.399945328592.issue15264@psf.upfronthosting.co.za> Georg Brandl added the comment: Has been documented meanwhile. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 20:42:19 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 08 Oct 2013 18:42:19 +0000 Subject: [issue15455] index entries not showing up in glossary In-Reply-To: <1343292936.36.0.839564467916.issue15455@psf.upfronthosting.co.za> Message-ID: <1381257739.43.0.308121916548.issue15455@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 20:46:39 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 08 Oct 2013 18:46:39 +0000 Subject: [issue15863] Fine-grained info about Python versions which support changes introduced in micro releases In-Reply-To: <1346798659.62.0.336544157965.issue15863@psf.upfronthosting.co.za> Message-ID: <1381257999.69.0.177549828237.issue15863@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't think this is necessary. ---------- nosy: +georg.brandl resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 20:47:28 2013 From: report at bugs.python.org (Tim Peters) Date: Tue, 08 Oct 2013 18:47:28 +0000 Subject: [issue19171] pow() improvement on longs In-Reply-To: <1380982037.44.0.922369997614.issue19171@psf.upfronthosting.co.za> Message-ID: <1381258048.78.0.475461225008.issue19171@psf.upfronthosting.co.za> Tim Peters added the comment: I'm glad you pointed it out, Mark! You're right about unintended consequences, and I confess I didn't think at all about the exponent == 0 case. I didn't remind myself that 2.7 was a bugfix branch either: I read Armin's "(which can be applied on both trunk and 2.7)" and reflexively checked it in. I'd _say_ I'd be more careful about that in the future, but since I still use 2.7.5 for most of my private work I wouldn't believe me either ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 20:58:02 2013 From: report at bugs.python.org (mpb) Date: Tue, 08 Oct 2013 18:58:02 +0000 Subject: [issue19167] sqlite3 cursor.description varies across Linux (3.3.1), Win32 (3.3.2), when selecting from a view. In-Reply-To: <1380919983.53.0.47531466178.issue19167@psf.upfronthosting.co.za> Message-ID: <1381258682.03.0.207068665209.issue19167@psf.upfronthosting.co.za> mpb added the comment: No, I have not checked to see if it is a bug in the Windows version of SQLite. How would I even test that? I just tried running the command line version of SQLite (version 3.8.0.2 2013-09-03) on Windows (XP SP2, in VirtualBox). I manually ran the same statements from the Python script. I turned on headers (.headers ON). The headers did not contain the quotes around foo_id. That's probably all the testing I can do easily, unless there is some other way to access the cursor description. I don't have a C development environment installed on Windows, nor have I ever written C code that calls SQLite. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 20:58:36 2013 From: report at bugs.python.org (Tim Peters) Date: Tue, 08 Oct 2013 18:58:36 +0000 Subject: [issue19158] BoundedSemaphore.release() subject to races In-Reply-To: <1380844816.11.0.829919053917.issue19158@psf.upfronthosting.co.za> Message-ID: <1381258716.17.0.244545182739.issue19158@psf.upfronthosting.co.za> Tim Peters added the comment: Antoine, how strongly do you feel about this? I confess I don't get it. Copy+paste code duplication doesn't help any of readability, correctness, or ease of future maintenance, so I guess it's some micro-efficiency concern. Really?! ;-) Note that the patch doesn't _introduce_ calling the base class .release() - the code always did that. All it does is put the pre-existing code in a `with:` block. Minimal change. Yes, the pre-existing code had to be indented, but no non-whitespace character changed. Of course in this case it's trivial either way. So if I have to duplicate the code to get your blessing, fine. On the other hand, since it _is_ trivial either way, I'd rather not bother ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 20:58:49 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 08 Oct 2013 18:58:49 +0000 Subject: [issue11009] urllib.splituser is not documented In-Reply-To: <1295987078.02.0.421774194417.issue11009@psf.upfronthosting.co.za> Message-ID: <1381258729.8.0.2006367347.issue11009@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 21:03:04 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Oct 2013 19:03:04 +0000 Subject: [issue19158] BoundedSemaphore.release() subject to races In-Reply-To: <1381258716.17.0.244545182739.issue19158@psf.upfronthosting.co.za> Message-ID: <1381258982.2582.4.camel@fsol> Antoine Pitrou added the comment: > Antoine, how strongly do you feel about this? I confess I don't get > it. Copy+paste code duplication doesn't help any of readability, > correctness, or ease of future maintenance, so I guess it's some > micro-efficiency concern. Really?! ;-) Not very strongly, admittedly. It's just that I find the double locking a bit silly while we control both implementations :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 21:03:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Oct 2013 19:03:28 +0000 Subject: [issue19158] BoundedSemaphore.release() subject to races In-Reply-To: <1381258982.2582.4.camel@fsol> Message-ID: <1381259006.2582.5.camel@fsol> Antoine Pitrou added the comment: (of course, you can go ahead and commit your version) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 21:45:42 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 08 Oct 2013 19:45:42 +0000 Subject: [issue19171] pow() improvement on longs In-Reply-To: <1380982037.44.0.922369997614.issue19171@psf.upfronthosting.co.za> Message-ID: <1381261542.42.0.407764486618.issue19171@psf.upfronthosting.co.za> Benjamin Peterson added the comment: In general, we like to touch 2.7 as little as possible. I'm not sure it's worth arguing about this (admittely small) change meets the bar. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 21:46:38 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 08 Oct 2013 19:46:38 +0000 Subject: [issue19142] Cross-compile fails trying to execute foreign pgen on build host In-Reply-To: <1380670898.69.0.308819053325.issue19142@psf.upfronthosting.co.za> Message-ID: <1381261598.04.0.118441891267.issue19142@psf.upfronthosting.co.za> R. David Murray added the comment: I believe that's the correct usage, in which case there must be a bug in the process somewhere. My guess would be that it is looking for a file in the "wrong" place when doing a cross compile, but that's just a guess. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 21:50:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2013 19:50:40 +0000 Subject: [issue19194] Improve cross-references in fcntl documentation Message-ID: <1381261840.65.0.334313272339.issue19194@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here is a patch which fixes internal references in the documentation of the fcntl package. ---------- assignee: docs at python components: Documentation files: refs.fcntl.patch keywords: patch messages: 199242 nosy: docs at python, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Improve cross-references in fcntl documentation type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32002/refs.fcntl.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 21:51:23 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2013 19:51:23 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <1381261883.52.0.300838153122.issue18758@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Improve cross-references in fcntl documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 21:56:32 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2013 19:56:32 +0000 Subject: [issue19195] Improve cross-references in C API Message-ID: <1381262191.72.0.573497194321.issue19195@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here is a patch which fixes internal references in C API and extension documentation. ---------- assignee: docs at python components: Documentation files: refs.c-api.patch keywords: patch messages: 199243 nosy: docs at python, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Improve cross-references in C API type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32003/refs.c-api.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 21:57:00 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2013 19:57:00 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <1381262220.04.0.00801202584996.issue18758@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Improve cross-references in C API _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 22:00:00 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2013 20:00:00 +0000 Subject: [issue19196] Improve cross-references in pickle documentation Message-ID: <1381262400.58.0.379802599514.issue19196@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here is a patch which fixes internal references in distutils documentation. ---------- assignee: docs at python components: Documentation files: refs.distutils.patch keywords: patch messages: 199244 nosy: docs at python, eric.araujo, serhiy.storchaka, tarek priority: normal severity: normal stage: patch review status: open title: Improve cross-references in pickle documentation type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32004/refs.distutils.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 22:00:24 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2013 20:00:24 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <1381262424.08.0.361992288676.issue18758@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Improve cross-references in pickle documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 22:23:30 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 08 Oct 2013 20:23:30 +0000 Subject: [issue19196] Improve cross-references in distutils documentation In-Reply-To: <1381262400.58.0.379802599514.issue19196@psf.upfronthosting.co.za> Message-ID: <1381263810.88.0.259348314535.issue19196@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- title: Improve cross-references in pickle documentation -> Improve cross-references in distutils documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 22:24:19 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 08 Oct 2013 20:24:19 +0000 Subject: [issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed. In-Reply-To: <1380820358.99.0.777618727237.issue19154@psf.upfronthosting.co.za> Message-ID: <1381263859.92.0.334299176977.issue19154@psf.upfronthosting.co.za> R. David Murray added the comment: OK, I've looked at the docs and code, and as far as I can see this bug does not exist in Python3. Or at least in 3.4, which is the only place I'd feel safe about making a change to the exception type. To summarize: in 3.4 socket logic is based on RawIOBase, as is HTTPResponse. And RawIOBase checks to see if the file is closed and raises a ValueError if it is, when fileno is called on the 'fp' attribute of the HTTPResponse. At least, that's what I think based on reading the code. So, unless you can reproduce the error in 3.3 and/or 3.4, I think we should close this issue as out of date, since as Terry said there is a non-trivial danger of backward incompatibility if we were to change the exception type in 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 22:36:40 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 08 Oct 2013 20:36:40 +0000 Subject: [issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed. In-Reply-To: <1380820358.99.0.777618727237.issue19154@psf.upfronthosting.co.za> Message-ID: <1381264600.51.0.72555353496.issue19154@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Florent, for future reference, marking an issue for 2.7 says to us "I want this fixed for 2.7". I agree that having 3 different error indicators for 3 similar functions is nasty. But this is partly due to the difference between object that *has* a fd (socket) versus a object that *wraps such an object. The problem is that changing any of them could break code that just uses one of them. The select doc says that a 'waitable' object must have .fileno() that return a valid fd int. It says nothing about an allowed error return. This could be interpreted as meaning that not returning an fd int makes the object (such as a closed HTTPResponse) unwaitable. Or this could be interpreted as a deficiency in the select doc or code. In the module/selectmodule.c code, the various poll methods interpret -1 as the error return for a closed fd. I do not know how it deals with socket.fileno raising ValueError (or returning None?). In the client doc, none of several examples of using HTTPResponses use select. They just use the various methods to retrieve data. I could interpret this to mean that they are not intended to work with select. The fact that they do not, reinforces that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 22:42:29 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Oct 2013 20:42:29 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1381264949.83.0.181802558903.issue18874@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 23:03:50 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2013 21:03:50 +0000 Subject: [issue19197] Improve cross-references in shlex documentation Message-ID: <1381266229.65.0.408303361922.issue19197@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here is a patch which fixes internal references in the documentation of the shlex module. ---------- assignee: docs at python components: Documentation files: refs.shlex.patch keywords: patch messages: 199247 nosy: docs at python, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Improve cross-references in shlex documentation type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32005/refs.shlex.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 23:05:24 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 08 Oct 2013 21:05:24 +0000 Subject: [issue18948] deliberately crashing tests should prevent core dumps In-Reply-To: <1378493765.27.0.466855736327.issue18948@psf.upfronthosting.co.za> Message-ID: <3cvWKv1P1dz7Ljg@mail.python.org> Roundup Robot added the comment: New changeset 1cbd3d9f7d61 by Antoine Pitrou in branch 'default': Issue #18948: improve SuppressCoreFiles to include Windows crash popup suppression, and use it in more tests. http://hg.python.org/cpython/rev/1cbd3d9f7d61 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 23:05:35 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2013 21:05:35 +0000 Subject: [issue19198] Improve cross-references in cgi documentation Message-ID: <1381266335.84.0.645626523869.issue19198@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here is a patch which fixes internal references in the documentation of the cgi module. ---------- assignee: docs at python components: Documentation files: refs.cgi.patch keywords: patch messages: 199249 nosy: docs at python, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Improve cross-references in cgi documentation type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32006/refs.cgi.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 23:05:58 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Oct 2013 21:05:58 +0000 Subject: [issue18948] deliberately crashing tests should prevent core dumps In-Reply-To: <1378493765.27.0.466855736327.issue18948@psf.upfronthosting.co.za> Message-ID: <1381266358.32.0.357304032791.issue18948@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Patch committed. Thanks to both of you! ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 23:06:23 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2013 21:06:23 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <1381266383.26.0.972524265378.issue18758@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Improve cross-references in cgi documentation, Improve cross-references in shlex documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 23:10:13 2013 From: report at bugs.python.org (Glyph Lefkowitz) Date: Tue, 08 Oct 2013 21:10:13 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: Message-ID: Glyph Lefkowitz added the comment: On Oct 8, 2013, at 8:10 AM, Augie Fackler wrote: > Hah. Probably too slow for anything beyond a proof of concept, no? It should perform acceptably on PyPy ;-). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 23:11:00 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Oct 2013 21:11:00 +0000 Subject: [issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed. In-Reply-To: <1380820358.99.0.777618727237.issue19154@psf.upfronthosting.co.za> Message-ID: <1381266660.54.0.0640448787801.issue19154@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think ValueError should generally be raised when calling fileno() on a closed file. However, this is not something we're gonna change in a bugfix release, so it would go in 3.4 at the earliest. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 23:11:40 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Oct 2013 21:11:40 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: Message-ID: <1381266697.2582.6.camel@fsol> Antoine Pitrou added the comment: > > > Punting this to 3.5 basically means we'll have to either wait for > > > 3.5, or do something awful like use cffi to grab sprintf to port > > > Mercurial. > > > > Or write a pure Python implementation. > > Hah. Probably too slow for anything beyond a proof of concept, no? If it's only for the Mercurial test suite, that shouldn't be a problem? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 23:17:11 2013 From: report at bugs.python.org (Augie Fackler) Date: Tue, 08 Oct 2013 21:17:11 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1381266697.2582.6.camel@fsol> Message-ID: Augie Fackler added the comment: On Tue, Oct 8, 2013 at 5:11 PM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > > > > Punting this to 3.5 basically means we'll have to either wait for > > > > 3.5, or do something awful like use cffi to grab sprintf to port > > > > Mercurial. > > > > > > Or write a pure Python implementation. > > > > Hah. Probably too slow for anything beyond a proof of concept, no? > > If it's only for the Mercurial test suite, that shouldn't be a problem? It's not just the testsuite though: we do this _all over_ hg itself. For example, status needs to do something like this: sys.stdout.write('%(state)s %(path)s\n' % {'state': 'M', 'path': 'some/filesystem/path'}) except we don't know the encoding of the filesystem path (Hi unix!) so we have to treat the whole thing as opaque bytes. It's even more fun for 'log', becase then it's got localized strings in it as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 23:17:25 2013 From: report at bugs.python.org (Brecht Van Lommel) Date: Tue, 08 Oct 2013 21:17:25 +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: <1381267045.13.0.238891802405.issue16129@psf.upfronthosting.co.za> Brecht Van Lommel added the comment: I tested the patch on Windows and can confirm it solves the problem for Blender. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 23:18:41 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2013 21:18:41 +0000 Subject: [issue19199] Remove PyThreadState.tick_counter field Message-ID: <1381267121.14.0.275844287932.issue19199@psf.upfronthosting.co.za> New submission from STINNER Victor: The C structure "PyThreadState" has a counter which is incremented in the bytecode evaluation loop (ceval.c), but never used. /* XXX doesn't mean anything anymore (the comment below is obsolete) => deprecate or remove? */ /* tick_counter is incremented whenever the check_interval ticker * reaches zero. The purpose is to give a useful measure of the number * of interpreted bytecode instructions in a given thread. This * extremely lightweight statistic collector may be of interest to * profilers (like psyco.jit()), although nothing in the core uses it. */ int tick_counter; Antoine Pitrou added the XXX comment when he merged the "new GIL" of Python 3.2. Can we now remove it? ---------- messages: 199256 nosy: haypo, pitrou, serhiy.storchaka priority: normal severity: normal status: open versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 23:19:19 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Oct 2013 21:19:19 +0000 Subject: [issue19199] Remove PyThreadState.tick_counter field In-Reply-To: <1381267121.14.0.275844287932.issue19199@psf.upfronthosting.co.za> Message-ID: <1381267159.29.0.671709152951.issue19199@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Yes, we can :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 23:24:53 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2013 21:24:53 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: Message-ID: STINNER Victor added the comment: 2013/10/8 Augie Fackler : > sys.stdout.write('%(state)s %(path)s\n' % {'state': 'M', 'path': > 'some/filesystem/path'}) > > except we don't know the encoding of the filesystem path (Hi unix!) so we > have to treat the whole thing as opaque bytes. You are doing it wrong. In Python 3, you "should" store filenames as Unicode (str type). If Python fails to decode a filename, undecodable bytes are stored as surrogate characters (see the PEP 383). The Unicode type became natural in Python 3, as byte string (old "str" type) was natural in Python 2. sys.stdout.write() expects a Unicode string, not a byte string. Does it mean that Mercurial is moving to Python 3? Cool :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 23:26:54 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2013 21:26:54 +0000 Subject: [issue19199] Remove PyThreadState.tick_counter field In-Reply-To: <1381267121.14.0.275844287932.issue19199@psf.upfronthosting.co.za> Message-ID: <1381267614.44.0.371066323943.issue19199@psf.upfronthosting.co.za> STINNER Victor added the comment: Here is a patch. I'm going to commit it in one week if nobody complains. ---------- keywords: +patch Added file: http://bugs.python.org/file32007/remove_tick_counter.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 23:35:38 2013 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 08 Oct 2013 21:35:38 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1381268138.73.0.852038818036.issue3982@psf.upfronthosting.co.za> Eric V. Smith added the comment: I've lost track what we were talking about. I thought we were trying to support b''.format() in 3.4, for a restricted set of arguments. I don't see how a third-party package is going to help, if the goal is to allow 3.4 to be source compatible with 2.7. And the recent example uses %-formatting, which is not the subject of this ticket. What proposal is actually on the table here? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 23:38:04 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 08 Oct 2013 21:38:04 +0000 Subject: [issue19199] Remove PyThreadState.tick_counter field In-Reply-To: <1381267121.14.0.275844287932.issue19199@psf.upfronthosting.co.za> Message-ID: <1381268284.26.0.982580478468.issue19199@psf.upfronthosting.co.za> R. David Murray added the comment: Should there be a mention in whats new in case any external tools are (still) looking at it and thinking it is meaningful? ---------- nosy: +nedbat, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 23:47:03 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2013 21:47:03 +0000 Subject: [issue19199] Remove PyThreadState.tick_counter field In-Reply-To: <1381267121.14.0.275844287932.issue19199@psf.upfronthosting.co.za> Message-ID: <1381268823.28.0.572036685667.issue19199@psf.upfronthosting.co.za> STINNER Victor added the comment: PyThreadState.tick_counter field was added in 2002 by Armin Rigo: see issue #617311. "A very very small statistic-collecting patch. (...) The purpose is to give a useful measure of the number of interpreted bytecode instructions in a given thread." My patch will probably break the following module :-) http://packages.ubuntu.com/fr/lucid/python-tickcount "Python C extension module giving access to the internal tickcounter of python. This is useful for certain forms of profiling or performance analysis." (But tickcounter was meanless since Python 3.2.) The PyThreadState.tick_counter field was mentionned in the following question: "Read how many Python instructions have been interpreted?" http://stackoverflow.com/questions/16437487/read-how-many-python-instructions-have-been-interpreted Should we add a new counter to count the number of executed Python instructions per thread? Or fix tick_counter? Does we really need such counter or other profilers (cProfile) are enough? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 23:51:03 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Oct 2013 21:51:03 +0000 Subject: [issue19199] Remove PyThreadState.tick_counter field In-Reply-To: <1381268823.28.0.572036685667.issue19199@psf.upfronthosting.co.za> Message-ID: <1381269060.2582.7.camel@fsol> Antoine Pitrou added the comment: > Should we add a new counter to count the number of executed Python > instructions per thread? Or fix tick_counter? Let's just drop it. It's useless and nobody complained. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 00:02:31 2013 From: report at bugs.python.org (Tim Peters) Date: Tue, 08 Oct 2013 22:02:31 +0000 Subject: [issue19199] Remove PyThreadState.tick_counter field In-Reply-To: <1381267121.14.0.275844287932.issue19199@psf.upfronthosting.co.za> Message-ID: <1381269751.27.0.884744383492.issue19199@psf.upfronthosting.co.za> Changes by Tim Peters : ---------- nosy: +arigo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 00:02:49 2013 From: report at bugs.python.org (Tim Peters) Date: Tue, 08 Oct 2013 22:02:49 +0000 Subject: [issue19199] Remove PyThreadState.tick_counter field In-Reply-To: <1381267121.14.0.275844287932.issue19199@psf.upfronthosting.co.za> Message-ID: <1381269769.73.0.488752311471.issue19199@psf.upfronthosting.co.za> Changes by Tim Peters : ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 00:19:14 2013 From: report at bugs.python.org (Glyph Lefkowitz) Date: Tue, 08 Oct 2013 22:19:14 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1381268138.73.0.852038818036.issue3982@psf.upfronthosting.co.za> Message-ID: Glyph Lefkowitz added the comment: On Oct 8, 2013, at 2:35 PM, Eric V. Smith wrote: > What proposal is actually on the table here? Sorry Eric, you're right, there is too much discussion here. This issue ought to be about .format, like the title says. There should be a separate ticket for %-formatting, since it seems to be an almost wholly unrelated task. While I'm sympathetic to Mercurial's issues, they're somewhat different from Twisted's, in that we're willing to adopt the "one new way" to do things in order to achieve compatibility whereas that would be too hard for Mercurial. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 00:19:42 2013 From: report at bugs.python.org (Augie Fackler) Date: Tue, 08 Oct 2013 22:19:42 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: Message-ID: Augie Fackler added the comment: On Oct 8, 2013, at 5:24 PM, STINNER Victor wrote: > > STINNER Victor added the comment: > > 2013/10/8 Augie Fackler : >> sys.stdout.write('%(state)s %(path)s\n' % {'state': 'M', 'path': >> 'some/filesystem/path'}) >> >> except we don't know the encoding of the filesystem path (Hi unix!) so we >> have to treat the whole thing as opaque bytes. > > You are doing it wrong. In Python 3, you "should" store filenames as > Unicode (str type). If Python fails to decode a filename, undecodable > bytes are stored as surrogate characters (see the PEP 383). No, I'm not. In Mercurial, all end-user data is OPAQUE BYTES, and must remain that way. We're not able to change either our on-disk data format OR our stdout format, even to support a newer version of Python. I don't know the encoding of the filename's bytes, but I _must_ faithfully reproduce them exactly as they are or I'll break tools like make(1) and patch(1). Similarly, if a file goes from ISO-8859-1 to UTF-8, I have to emit a diff that has some ISO bytes and some UTF bytes - it's not in *any* valid encoding. Changing that is a showstopper regression. > The Unicode type became natural in Python 3, as byte string (old "str" > type) was natural in Python 2. > > sys.stdout.write() expects a Unicode string, not a byte string. Ouch. Is there any way to write things to stderr and stdout without decoding and hopelessly breaking user data? > Does it mean that Mercurial is moving to Python 3? Cool :-) Not likely, honestly. I tackle this when I've got some spare cycles and my ability to handle pain is high. As it stands, I have the test-runner barely working, but it's making wrong assumptions to get there. The best estimate is that it's a year of work to upgrade to Python 3. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 00:20:50 2013 From: report at bugs.python.org (Augie Fackler) Date: Tue, 08 Oct 2013 22:20:50 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: Message-ID: <84447A25-50ED-4EB5-9607-F486D13AF4D4@durin42.com> Augie Fackler added the comment: On Oct 8, 2013, at 6:19 PM, Glyph Lefkowitz wrote: > Glyph Lefkowitz added the comment: > > On Oct 8, 2013, at 2:35 PM, Eric V. Smith wrote: > >> What proposal is actually on the table here? > > Sorry Eric, you're right, there is too much discussion here. This issue ought to be about .format, like the title says. There should be a separate ticket for %-formatting, since it seems to be an almost wholly unrelated task. While I'm sympathetic to Mercurial's issues, they're somewhat different from Twisted's, in that we're willing to adopt the "one new way" to do things in order to achieve compatibility whereas that would be too hard for Mercurial. Yeah, my bad too. I suppose I should add a new bug for %-formatting on bytes objects? Note that for hg, we can't drop Python 2.6 or so (we'll only drop *2.4* if we can do 2.6 and some 3.x from a single source tree) for a while, due to supporting the system interpreter on a variety of LTS platforms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 00:28:02 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 08 Oct 2013 22:28:02 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1381271282.32.0.430849664646.issue3982@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Augie, to understand what Viktor meant, I suggest reading http://www.python.org/dev/peps/pep-0383/ One point of the pep is round-trip filenames without loss on all systems, which is just what you say you need. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 00:31:18 2013 From: report at bugs.python.org (Augie Fackler) Date: Tue, 08 Oct 2013 22:31:18 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1381271282.32.0.430849664646.issue3982@psf.upfronthosting.co.za> Message-ID: Augie Fackler added the comment: On Oct 8, 2013, at 6:28 PM, "Terry J. Reedy" wrote: > http://www.python.org/dev/peps/pep-0383/ > One point of the pep is round-trip filenames without loss on all systems, which is just what you say you need. At a quick skim, likely not good enough, because http://en.wikipedia.org/wiki/Shift_JIS isn't completely ASCII-compatible, and we've got a fair number of users on weird Shift-JIS using platforms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 00:33:38 2013 From: report at bugs.python.org (Elazar Gershuni) Date: Tue, 08 Oct 2013 22:33:38 +0000 Subject: [issue19200] grammar in forkserver docs Message-ID: <1381271618.79.0.0617201422198.issue19200@psf.upfronthosting.co.za> New submission from Elazar Gershuni: in http://docs.python.org/3.4/library/multiprocessing.html#start-methods for `forkserver`: "whenever a new process is need the parent process connects to the server and requests that it fork a new process." replace "need " with "needed, ". ---------- assignee: docs at python components: Documentation messages: 199269 nosy: docs at python, elazar priority: normal severity: normal status: open title: grammar in forkserver docs versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 00:45:39 2013 From: report at bugs.python.org (Glyph Lefkowitz) Date: Tue, 08 Oct 2013 22:45:39 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: Message-ID: Glyph Lefkowitz added the comment: On Oct 8, 2013, at 3:19 PM, Augie Fackler wrote: > No, I'm not. In Mercurial, all end-user data is OPAQUE BYTES, and must remain that way. The PEP 383 technique for handling file names is completely capable of round-tripping exact bytes, given one encoding for both input and output. You can still handle file names this way internally in Mercurial and not risk disturbing any observable output. You do not need to change that in order to do what Victor suggests. We should get together in some other forum and discuss file-name handling though, since you can't actually round-trip "opaque bytes" through a *filesystem* and not disturb your output. > Ouch. Is there any way to write things to stderr and stdout without decoding and hopelessly breaking user data? You can use sys.stdout.buffer.write. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 01:57:04 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 08 Oct 2013 23:57:04 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1381276624.93.0.485266183082.issue3982@psf.upfronthosting.co.za> Changes by Terry J. Reedy : Added file: http://bugs.python.org/file32008/byte_format.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 02:13:58 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Oct 2013 00:13:58 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1381277638.0.0.110702084496.issue3982@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Here is a proof of concept Python function, with a minimal test. It is similar to how str.format could be coded in Python, with re.split and ''.join, except that it does not allow anything before : in the format specification. By default (no format spec given), it copies bytes objects without change. If a format specification *is* given, it does not restrict the object, as this code simply uses builtin format sandwiched between decode and encode. ---------- Added file: http://bugs.python.org/file32009/byte_format.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 02:14:41 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Oct 2013 00:14:41 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1381277681.97.0.64657677154.issue3982@psf.upfronthosting.co.za> Changes by Terry J. Reedy : Removed file: http://bugs.python.org/file32008/byte_format.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 03:31:54 2013 From: report at bugs.python.org (Tim Heaney) Date: Wed, 09 Oct 2013 01:31:54 +0000 Subject: [issue19201] lzma and 'x' mode open Message-ID: <1381282314.82.0.620935912444.issue19201@psf.upfronthosting.co.za> New submission from Tim Heaney: I love the 'x' mode open in recent versions of Python. I just discovered that lzma.open doesn't support it. It seems there's an elif that explicitly checks the modes allowed. I added "x" and "xb" to the choices and now it works as I would like. ---------- files: patch.lzma.py messages: 199272 nosy: oylenshpeegul priority: normal severity: normal status: open title: lzma and 'x' mode open type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32010/patch.lzma.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 03:44:32 2013 From: report at bugs.python.org (Tim Heaney) Date: Wed, 09 Oct 2013 01:44:32 +0000 Subject: [issue19201] lzma and 'x' mode open In-Reply-To: <1381282314.82.0.620935912444.issue19201@psf.upfronthosting.co.za> Message-ID: <1381283072.16.0.85340106396.issue19201@psf.upfronthosting.co.za> Changes by Tim Heaney : ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 03:52:26 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 09 Oct 2013 01:52:26 +0000 Subject: [issue19201] lzma and 'x' mode open In-Reply-To: <1381282314.82.0.620935912444.issue19201@psf.upfronthosting.co.za> Message-ID: <1381283546.75.0.248097919304.issue19201@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- nosy: +nadeem.vawda _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 03:59:41 2013 From: report at bugs.python.org (Berker Peksag) Date: Wed, 09 Oct 2013 01:59:41 +0000 Subject: [issue19165] Change formatter warning to DeprecationWarning in 3.5 In-Reply-To: <1381248780.95.0.467798670434.issue19165@psf.upfronthosting.co.za> Message-ID: <1381283981.96.0.580122395893.issue19165@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 04:23:40 2013 From: report at bugs.python.org (Berker Peksag) Date: Wed, 09 Oct 2013 02:23:40 +0000 Subject: [issue19200] grammar in forkserver docs In-Reply-To: <1381271618.79.0.0617201422198.issue19200@psf.upfronthosting.co.za> Message-ID: <1381285420.93.0.147470061197.issue19200@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 04:30:14 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 09 Oct 2013 02:30:14 +0000 Subject: [issue19158] BoundedSemaphore.release() subject to races In-Reply-To: <1380844816.11.0.829919053917.issue19158@psf.upfronthosting.co.za> Message-ID: <3cvfXj44rwz7LjM@mail.python.org> Roundup Robot added the comment: New changeset e06edc0c7a49 by Tim Peters in branch '3.3': Issue 19158: a rare race in BoundedSemaphore could allow .release() too often. http://hg.python.org/cpython/rev/e06edc0c7a49 New changeset 7c56bf5afee6 by Tim Peters in branch 'default': Issue 19158: a rare race in BoundedSemaphore could allow .release() too often. http://hg.python.org/cpython/rev/7c56bf5afee6 New changeset cb4fd7515cb4 by Tim Peters in branch '2.7': Issue 19158: a rare race in BoundedSemaphore could allow .release() too often. http://hg.python.org/cpython/rev/cb4fd7515cb4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 04:31:49 2013 From: report at bugs.python.org (Tim Peters) Date: Wed, 09 Oct 2013 02:31:49 +0000 Subject: [issue19158] BoundedSemaphore.release() subject to races In-Reply-To: <1380844816.11.0.829919053917.issue19158@psf.upfronthosting.co.za> Message-ID: <1381285909.48.0.254211264226.issue19158@psf.upfronthosting.co.za> Changes by Tim Peters : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 08:56:59 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 09 Oct 2013 06:56:59 +0000 Subject: [issue19193] Improve cross-references in tutorial In-Reply-To: <1381256218.12.0.311002758548.issue19193@psf.upfronthosting.co.za> Message-ID: <3cvmSV554xz7LjT@mail.python.org> Roundup Robot added the comment: New changeset ac826284fdd1 by Serhiy Storchaka in branch '2.7': Issue #19193: Improved cross-references in the tutorial. http://hg.python.org/cpython/rev/ac826284fdd1 New changeset 012380d57e44 by Serhiy Storchaka in branch '3.3': Issue #19193: Improved cross-references in the tutorial. http://hg.python.org/cpython/rev/012380d57e44 New changeset e338a5c8fcfa by Serhiy Storchaka in branch 'default': Issue #19193: Improved cross-references in the tutorial. http://hg.python.org/cpython/rev/e338a5c8fcfa ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 08:59:35 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 06:59:35 +0000 Subject: [issue19193] Improve cross-references in tutorial In-Reply-To: <1381256218.12.0.311002758548.issue19193@psf.upfronthosting.co.za> Message-ID: <1381301975.13.0.121631656802.issue19193@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Georg for the review. ---------- assignee: docs at python -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 09:15:17 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 07:15:17 +0000 Subject: [issue19190] Improve cross-references in builtins documentation. In-Reply-To: <1381178406.23.0.925502914141.issue19190@psf.upfronthosting.co.za> Message-ID: <1381302917.12.0.55098657526.issue19190@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch addresses more Georg's comments. ---------- Added file: http://bugs.python.org/file32011/refs.builtins_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 10:11:12 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 08:11:12 +0000 Subject: [issue19196] Improve cross-references in distutils documentation In-Reply-To: <1381262400.58.0.379802599514.issue19196@psf.upfronthosting.co.za> Message-ID: <1381306272.6.0.446655031981.issue19196@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch addresses Georg's comments. ---------- Added file: http://bugs.python.org/file32012/refs.distutils_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 10:12:13 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Oct 2013 08:12:13 +0000 Subject: [issue19158] BoundedSemaphore.release() subject to races In-Reply-To: <1381285909.51.0.840275109137.issue19158@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: You should mention the change in Misc/NEWS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 11:43:36 2013 From: report at bugs.python.org (Armin Rigo) Date: Wed, 09 Oct 2013 09:43:36 +0000 Subject: [issue19199] Remove PyThreadState.tick_counter field In-Reply-To: <1381267121.14.0.275844287932.issue19199@psf.upfronthosting.co.za> Message-ID: <1381311816.22.0.864544452725.issue19199@psf.upfronthosting.co.za> Armin Rigo added the comment: Better remove this field if its value is now useless anyway. If someone needs it again for a similar reason, he can contribute a patch like I did in 2002 :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 12:01:08 2013 From: report at bugs.python.org (Esa Peuha) Date: Wed, 09 Oct 2013 10:01:08 +0000 Subject: [issue19165] Change formatter warning to DeprecationWarning in 3.5 In-Reply-To: <1381248780.95.0.467798670434.issue19165@psf.upfronthosting.co.za> Message-ID: <1381312868.96.0.756900083942.issue19165@psf.upfronthosting.co.za> Esa Peuha added the comment: The wanted patch seems to be very simple: change PendingDeprecationWarning to DeprecationWarning on line 24 of Lib/formatter.py but only for Python 3.5 (i.e. no need to do anything until 3.4 is released). On a related note, should formatter be added to PEP 4? ---------- nosy: +Esa.Peuha _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 12:09:16 2013 From: report at bugs.python.org (Esa Peuha) Date: Wed, 09 Oct 2013 10:09:16 +0000 Subject: [issue19202] Additions to docs Message-ID: <1381313356.45.0.650070848794.issue19202@psf.upfronthosting.co.za> New submission from Esa Peuha: Here are some additions to documentation of a few functions: all, any: alternative definitions using functools.reduce enumerate: alternative definition using zip and itertools.count sum: equivalent definition using functools.reduce and operator.add functools.reduce: equivalent definitions, use operator.add in example itertools.accumulate: point to functools.reduce itertools.filterfalse: point to filter ---------- assignee: docs at python components: Documentation files: doc.diff keywords: patch messages: 199281 nosy: Esa.Peuha, docs at python priority: normal severity: normal status: open title: Additions to docs type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32013/doc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 12:29:57 2013 From: report at bugs.python.org (Georg Brandl) Date: Wed, 09 Oct 2013 10:29:57 +0000 Subject: [issue19202] Additions to docs In-Reply-To: <1381313356.45.0.650070848794.issue19202@psf.upfronthosting.co.za> Message-ID: <1381314597.8.0.741606061038.issue19202@psf.upfronthosting.co.za> Georg Brandl added the comment: Most of these changes should not be applied: the "alternate" equivalents in terms of reduce() will not help understanding, Equivalents for reduce() may be useful, but I would limit them to one per case, possibly even just one function that covers both cases. I'm deferring to Raymond for the changes to the itertools docs. ---------- nosy: +georg.brandl, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 13:00:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 09 Oct 2013 11:00:30 +0000 Subject: [issue19195] Improve cross-references in C API In-Reply-To: <1381262191.72.0.573497194321.issue19195@psf.upfronthosting.co.za> Message-ID: <3cvssT2ZFVz7Ljm@mail.python.org> Roundup Robot added the comment: New changeset 9b855a701e28 by Serhiy Storchaka in branch '2.7': Issue 19195: Improved cross-references in C API documentation. http://hg.python.org/cpython/rev/9b855a701e28 New changeset f0491617b098 by Serhiy Storchaka in branch '3.3': Issue 19195: Improved cross-references in C API documentation. http://hg.python.org/cpython/rev/f0491617b098 New changeset e30b27927e49 by Serhiy Storchaka in branch 'default': Issue 19195: Improved cross-references in C API documentation. http://hg.python.org/cpython/rev/e30b27927e49 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 13:04:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 09 Oct 2013 11:04:13 +0000 Subject: [issue19190] Improve cross-references in builtins documentation. In-Reply-To: <1381178406.23.0.925502914141.issue19190@psf.upfronthosting.co.za> Message-ID: <3cvsxm5CGGzRND@mail.python.org> Roundup Robot added the comment: New changeset 7565df5939de by Serhiy Storchaka in branch '2.7': Issue #19190: Improve cross-references in builtin types and functions documentation. http://hg.python.org/cpython/rev/7565df5939de New changeset 207e1e1cb17a by Serhiy Storchaka in branch '3.3': Issue #19190: Improve cross-references in builtin types and functions documentation. http://hg.python.org/cpython/rev/207e1e1cb17a New changeset a3f6e5920881 by Serhiy Storchaka in branch 'default': Issue #19190: Improve cross-references in builtin types and functions documentation. http://hg.python.org/cpython/rev/a3f6e5920881 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 13:10:07 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 09 Oct 2013 11:10:07 +0000 Subject: [issue19196] Improve cross-references in distutils documentation In-Reply-To: <1381262400.58.0.379802599514.issue19196@psf.upfronthosting.co.za> Message-ID: <3cvt4Z5dXzz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset e0b9e0ed561a by Serhiy Storchaka in branch '2.7': #19196: Improved cross-references in distutils documentation. http://hg.python.org/cpython/rev/e0b9e0ed561a New changeset 0879b60de41f by Serhiy Storchaka in branch '3.3': #19196: Improved cross-references in distutils documentation. http://hg.python.org/cpython/rev/0879b60de41f New changeset d70799f69d25 by Serhiy Storchaka in branch 'default': #19196: Improved cross-references in distutils documentation. http://hg.python.org/cpython/rev/d70799f69d25 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 13:11:55 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 11:11:55 +0000 Subject: [issue19195] Improve cross-references in C API In-Reply-To: <1381262191.72.0.573497194321.issue19195@psf.upfronthosting.co.za> Message-ID: <1381317115.89.0.301050907175.issue19195@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for the review Georg. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 13:12:30 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 11:12:30 +0000 Subject: [issue19190] Improve cross-references in builtins documentation. In-Reply-To: <1381178406.23.0.925502914141.issue19190@psf.upfronthosting.co.za> Message-ID: <1381317150.33.0.855410351162.issue19190@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for the review Georg. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 13:12:56 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 11:12:56 +0000 Subject: [issue19196] Improve cross-references in distutils documentation In-Reply-To: <1381262400.58.0.379802599514.issue19196@psf.upfronthosting.co.za> Message-ID: <1381317176.27.0.969484318102.issue19196@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for the review Georg. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 13:23:15 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 09 Oct 2013 11:23:15 +0000 Subject: [issue19194] Improve cross-references in fcntl documentation In-Reply-To: <1381261840.65.0.334313272339.issue19194@psf.upfronthosting.co.za> Message-ID: <3cvtMl13GPz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset 372abcca25fc by Serhiy Storchaka in branch '2.7': #19194: Improved cross-references in the fcntl module documentation. http://hg.python.org/cpython/rev/372abcca25fc New changeset 9015a84d694e by Serhiy Storchaka in branch '3.3': #19194: Improved cross-references in the fcntl module documentation. http://hg.python.org/cpython/rev/9015a84d694e New changeset d76e91a29f64 by Serhiy Storchaka in branch 'default': #19194: Improved cross-references in the fcntl module documentation. http://hg.python.org/cpython/rev/d76e91a29f64 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 13:54:56 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 11:54:56 +0000 Subject: [issue19194] Improve cross-references in fcntl documentation In-Reply-To: <1381261840.65.0.334313272339.issue19194@psf.upfronthosting.co.za> Message-ID: <1381319696.57.0.696504504372.issue19194@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for the review Georg. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 14:17:57 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 12:17:57 +0000 Subject: [issue19203] Improve cross-references in curses howto Message-ID: <1381321077.27.0.332235799284.issue19203@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here is a patch which fixes internal references in the howto of the curses module. ---------- assignee: docs at python components: Documentation files: refs.curses-howto.patch keywords: patch messages: 199291 nosy: akuchling, docs at python, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Improve cross-references in curses howto type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32014/refs.curses-howto.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 14:18:19 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 12:18:19 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <1381321099.92.0.970887319776.issue18758@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Improve cross-references in curses howto _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 14:19:25 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 12:19:25 +0000 Subject: [issue19203] Improve cross-references in curses howto In-Reply-To: <1381321077.27.0.332235799284.issue19203@psf.upfronthosting.co.za> Message-ID: <1381321165.06.0.0967684861411.issue19203@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file32014/refs.curses-howto.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 14:19:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 12:19:40 +0000 Subject: [issue19203] Improve cross-references in curses howto In-Reply-To: <1381321077.27.0.332235799284.issue19203@psf.upfronthosting.co.za> Message-ID: <1381321180.97.0.362035420168.issue19203@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file32015/refs.curses-howto.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 14:27:21 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 12:27:21 +0000 Subject: [issue19204] Improve cross-references in urllib documentation Message-ID: <1381321641.68.0.236509571307.issue19204@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here is a patch which fixes internal references in the documentation of the urllib package. ---------- assignee: docs at python components: Documentation files: refs.urllib.patch keywords: patch messages: 199292 nosy: docs at python, orsenthil, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Improve cross-references in urllib documentation type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32016/refs.urllib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 14:27:42 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 12:27:42 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <1381321662.47.0.149051786691.issue18758@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Improve cross-references in urllib documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 14:53:18 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 09 Oct 2013 12:53:18 +0000 Subject: [issue19199] Remove PyThreadState.tick_counter field In-Reply-To: <1381267121.14.0.275844287932.issue19199@psf.upfronthosting.co.za> Message-ID: <3cvwMd3nh7z7Ljv@mail.python.org> Roundup Robot added the comment: New changeset 3ce0102e4c1f by Victor Stinner in branch 'default': Close #19199: Remove ``PyThreadState.tick_counter`` field http://hg.python.org/cpython/rev/3ce0102e4c1f ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 15:15:01 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 09 Oct 2013 13:15:01 +0000 Subject: [issue19205] Don Message-ID: <1381324501.56.0.878877827164.issue19205@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: christian.heimes priority: normal severity: normal status: open title: Don _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 15:17:03 2013 From: report at bugs.python.org (Itamar Turner-Trauring) Date: Wed, 09 Oct 2013 13:17:03 +0000 Subject: [issue19206] Support disabling file I/O when doing traceback formatting Message-ID: <1381324623.16.0.375897659555.issue19206@psf.upfronthosting.co.za> New submission from Itamar Turner-Trauring: In certain situations it is best to avoid doing file I/O. For example, a program that runs in an event loop may wish to avoid any potentially blocking operations; reading from a file usually is fast, but can sometimes take arbitrary long. Another example (my specific use case) is a logging library - you don't want to block for an arbitrary amount of time when creating log messages in an application thread (a separate thread would do the writing). Unfortunately, the traceback.py module reads from files to load the source lines for the traceback (using linecache.py). This means if you want to format a traceback without file I/O you have to either recreate some logic from the standard library, monkey-patch globally, or do a terrible hack you don't want to know about. It would be better if the there was some way to ask the traceback.py module's functions to not do file I/O. The actual change would be fairly minor I suspect since the formatting functions already support getting None back from linecache. ---------- components: Library (Lib) messages: 199294 nosy: itamarst priority: normal severity: normal status: open title: Support disabling file I/O when doing traceback formatting type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 15:20:34 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 09 Oct 2013 13:20:34 +0000 Subject: [issue19205] Don't import re and sysconfig in site.py Message-ID: <1381324834.76.0.705779220837.issue19205@psf.upfronthosting.co.za> New submission from Christian Heimes: The site module is loaded at every startup. Nowadays it imports the re and the sysconfig modules. The re module is used for venv config parsing and inside sysconfig. sysconfig is loaded to find the location of the user's site-packages directory. Suggestions: - Only import re and compile CONFIG_LINE when a venv config file is found - Don't rely on sysconfig for user's site-packages directory. Instead the sysconfig module should rely on site.py to get its location. Without re and sysconfig Python would import only 45 instead of 56 modules at startup (tested on Linux). ---------- components: +Interpreter Core, Library (Lib) stage: -> needs patch title: Don -> Don't import re and sysconfig in site.py type: -> performance versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 15:26:37 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 09 Oct 2013 13:26:37 +0000 Subject: [issue19205] Don't import re and sysconfig in site.py In-Reply-To: <1381324834.76.0.705779220837.issue19205@psf.upfronthosting.co.za> Message-ID: <1381325197.59.0.60289505235.issue19205@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- keywords: +patch Added file: http://bugs.python.org/file32017/site_no_re.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 15:39:11 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 13:39:11 +0000 Subject: [issue19207] Improve cross-references in os documentation Message-ID: <1381325950.91.0.175108750844.issue19207@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here is a patch which fixes internal references in the documentation of the os, os.path and posix modules. ---------- assignee: docs at python components: Documentation files: refs.os.patch keywords: patch messages: 199296 nosy: docs at python, loewis, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Improve cross-references in os documentation type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32018/refs.os.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 15:40:35 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 13:40:35 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <1381326035.36.0.423433502464.issue18758@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Improve cross-references in os documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 15:51:11 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 13:51:11 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <1381326671.1.0.824649139104.issue18758@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And here is a patch with small changes which doesn't worth separated issue. ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file32019/refs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 15:51:14 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 09 Oct 2013 13:51:14 +0000 Subject: [issue19200] grammar in forkserver docs In-Reply-To: <1381271618.79.0.0617201422198.issue19200@psf.upfronthosting.co.za> Message-ID: <3cvxfQ2kJkz7Ljv@mail.python.org> Roundup Robot added the comment: New changeset c0f3d18d79fd by Georg Brandl in branch 'default': Closes #19200: small grammar fix in multiprocessing docs. Thanks to Elazar Gershuni. http://hg.python.org/cpython/rev/c0f3d18d79fd ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 15:55:35 2013 From: report at bugs.python.org (Tymoteusz Paul) Date: Wed, 09 Oct 2013 13:55:35 +0000 Subject: [issue19208] Bas64.decodestring() returns data instead of throwing exception Message-ID: <1381326935.62.0.967416907354.issue19208@psf.upfronthosting.co.za> New submission from Tymoteusz Paul: What happens (and how to reproduce): import base64 str = """GET http://www.google.com.hk/search?q=hotels+near+airport&pws=1&igu=1&ip=0.0.0.0&safe=images&gl=CN&gll=39.913889,116.391667&near=china&hl=zh-CN HTTP/1.0\nContent-Length: 0\nUser-Agent: Opera/9.80 (X11; Linux i686; U; en-US) Presto/2.9.173 Version/12.00\nProxy-Authorization: Basic\nAuthorization: Basic\nReferer: http://www.google.com/\n\n""" base64.decodestring(str) What is expected: Exception should be throw as provided string is not encoded with base64. What is the result: We receive some garbage string which hex representation is '\x18D\xe1\xb6\xda\x7f\xff\x0c0\x82\x8a \x95\xe7(\x9a\x19?\xb1\xe6\xabr\x1a' ---------- messages: 199299 nosy: Tymoteusz.Paul priority: normal severity: normal status: open title: Bas64.decodestring() returns data instead of throwing exception type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 16:03:33 2013 From: report at bugs.python.org (Georg Brandl) Date: Wed, 09 Oct 2013 14:03:33 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <1381327413.34.0.372397255103.issue18758@psf.upfronthosting.co.za> Georg Brandl added the comment: Looks good, except that buffer doesn't really correspond to bytearray. No memoryview involved there? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 16:13:23 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 14:13:23 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <1381328003.6.0.959379740618.issue18758@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: No. BytesWarning is related only to bytes and bytearray. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 16:18:37 2013 From: report at bugs.python.org (Georg Brandl) Date: Wed, 09 Oct 2013 14:18:37 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <1381328317.67.0.464645976034.issue18758@psf.upfronthosting.co.za> Georg Brandl added the comment: OK then -- so much the better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 16:21:20 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 09 Oct 2013 14:21:20 +0000 Subject: [issue19209] Remove import copyreg from os module Message-ID: <1381328480.57.0.127685895203.issue19209@psf.upfronthosting.co.za> New submission from Christian Heimes: The patch removes "import copyreg" from the os module and moves the registration of the hooks to copyreg. This speeds up the startup of the interpreter a tiny bit. ---------- files: os_no_copyreg.patch keywords: patch messages: 199303 nosy: christian.heimes priority: normal severity: normal stage: patch review status: open title: Remove import copyreg from os module type: performance versions: Python 3.4 Added file: http://bugs.python.org/file32020/os_no_copyreg.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 16:28:29 2013 From: report at bugs.python.org (Georg Brandl) Date: Wed, 09 Oct 2013 14:28:29 +0000 Subject: [issue19209] Remove import copyreg from os module In-Reply-To: <1381328480.57.0.127685895203.issue19209@psf.upfronthosting.co.za> Message-ID: <1381328909.64.0.660013475249.issue19209@psf.upfronthosting.co.za> Georg Brandl added the comment: +1 ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 17:29:51 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Oct 2013 15:29:51 +0000 Subject: [issue19209] Remove import copyreg from os module In-Reply-To: <1381328480.57.0.127685895203.issue19209@psf.upfronthosting.co.za> Message-ID: <1381332591.42.0.897033722776.issue19209@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't know the copyreg module! Does it have a unit test for the registered os objects? If not, how can it be tested manually? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 17:33:41 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 09 Oct 2013 15:33:41 +0000 Subject: [issue19209] Remove import copyreg from os module In-Reply-To: <1381328480.57.0.127685895203.issue19209@psf.upfronthosting.co.za> Message-ID: <1381332821.69.0.317247067925.issue19209@psf.upfronthosting.co.za> Christian Heimes added the comment: >>> import os >>> import pickle >>> pickle.dumps(os.stat(".")) b"\x80\x03cos\n_make_stat_result\nq\x00(M\xfdAJ\x84\xa0k\x00M\x00\xfcK\x13M\xe8\x03M\xe8\x03M\x00`J\x9chURJ\xbdgURJ\xbdgURtq\x01}q\x02(X\x08\x00\x00\x00st_ctimeq\x03GA\xd4\x95Y\xefW\x04\xc1X\x07\x00\x00\x00st_rdevq\x04K\x00X\x0b\x00\x00\x00st_mtime_nsq\x05\x8a\x08\xe8/\xfdo at w+\x13X\x08\x00\x00\x00st_atimeq\x06GA\xd4\x95Z'$T\xb6X\x0b\x00\x00\x00st_ctime_nsq\x07\x8a\x08\xe8/\xfdo at w+\x13X\n\x00\x00\x00st_blksizeq\x08M\x00\x10X\x0b\x00\x00\x00st_atime_nsq\t\x8a\x08\xa0\x0e9htw+\x13X\x08\x00\x00\x00st_mtimeq\nGA\xd4\x95Y\xefW\x04\xc1X\t\x00\x00\x00st_blocksq\x0bK8u\x86q\x0cRq\r." >>> pickle.loads(pickle.dumps(os.stat("."))) posix.stat_result(st_mode=16893, st_ino=7053444, st_dev=64512, st_nlink=19, st_uid=1000, st_gid=1000, st_size=24576, st_atime=1381329052, st_mtime=1381328829, st_ctime=1381328829) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 17:46:01 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 15:46:01 +0000 Subject: [issue19209] Remove import copyreg from os module In-Reply-To: <1381328480.57.0.127685895203.issue19209@psf.upfronthosting.co.za> Message-ID: <1381333561.87.0.486263001861.issue19209@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What will happen when do not register stat_result and statvfs_result at all? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 18:13:07 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 09 Oct 2013 16:13:07 +0000 Subject: [issue19201] lzma and 'x' mode open In-Reply-To: <1381282314.82.0.620935912444.issue19201@psf.upfronthosting.co.za> Message-ID: <1381335187.89.0.696015563211.issue19201@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +ethan.furman stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 18:39:21 2013 From: report at bugs.python.org (Stephen Tucker) Date: Wed, 09 Oct 2013 16:39:21 +0000 Subject: [issue19210] Unicode Objects in Tuples Message-ID: <1381336761.68.0.499147739849.issue19210@psf.upfronthosting.co.za> New submission from Stephen Tucker: If a tuple consists of a single unicode object with non-ASCII characters in it, the printing of the tuple causes the non-ASCII characters to appear correctly as characters. If the tuple contains such a unicode object and anything else (even if it contains nothing else but two or more such unicode objects), the printing of the tuple causes all non-ASCII characters in the objects to appear as their "\uxxxx" escapes instead of as their characters. The same thing happens when writing such tuples to a file that has been opened using codecs.open (, 'w', 'utf-8'). ---------- components: Windows messages: 199308 nosy: Stephen_Tucker priority: normal severity: normal status: open title: Unicode Objects in Tuples type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 18:47:46 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 09 Oct 2013 16:47:46 +0000 Subject: [issue19209] Remove import copyreg from os module In-Reply-To: <1381328480.57.0.127685895203.issue19209@psf.upfronthosting.co.za> Message-ID: <1381337266.49.0.78203310991.issue19209@psf.upfronthosting.co.za> Christian Heimes added the comment: You can still pickle and unpickle the objects but the result is no longer platform-independent as it refers to "posix" or "nt" instead of "os". >>> import os, pickle, pickletools >>> pickletools.dis(pickle.dumps(os.stat("."))) 0: \x80 PROTO 3 2: c GLOBAL 'os _make_stat_result' 24: q BINPUT 0 26: ( MARK ... >>> pickletools.dis(pickle.dumps(os.stat("."))) 0: \x80 PROTO 3 2: c GLOBAL 'posix stat_result' 21: q BINPUT 0 23: ( MARK ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 18:54:09 2013 From: report at bugs.python.org (Brett Cannon) Date: Wed, 09 Oct 2013 16:54:09 +0000 Subject: [issue19165] Change formatter warning to DeprecationWarning in 3.5 In-Reply-To: <1381248780.95.0.467798670434.issue19165@psf.upfronthosting.co.za> Message-ID: <1381337649.51.0.253460102276.issue19165@psf.upfronthosting.co.za> Brett Cannon added the comment: Esa is right; this is a placeholder bug to remind me to do this in Python 3.5. And Esa is also right about adding formatter to PEP 4; I'll reopen the original bug to remind me to do that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 18:54:16 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 09 Oct 2013 16:54:16 +0000 Subject: [issue19097] bool(cgi.FieldStorage(...)) may be False unexpectedly In-Reply-To: <1380239682.41.0.674159694258.issue19097@psf.upfronthosting.co.za> Message-ID: <1381337656.87.0.40840831464.issue19097@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Addressing storchaka's review comments. Here is the updated patch. ---------- Added file: http://bugs.python.org/file32021/19092-v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 18:54:30 2013 From: report at bugs.python.org (Brett Cannon) Date: Wed, 09 Oct 2013 16:54:30 +0000 Subject: [issue18716] Deprecate the formatter module In-Reply-To: <1376334968.93.0.863346638514.issue18716@psf.upfronthosting.co.za> Message-ID: <1381337670.57.0.22716622823.issue18716@psf.upfronthosting.co.za> Brett Cannon added the comment: Need to add a note to PEP 4. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 18:54:39 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 09 Oct 2013 16:54:39 +0000 Subject: [issue19097] bool(cgi.FieldStorage(...)) may be False unexpectedly In-Reply-To: <1380239682.41.0.674159694258.issue19097@psf.upfronthosting.co.za> Message-ID: <1381337679.59.0.860742710405.issue19097@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- versions: +Python 3.3, Python 3.4 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 18:54:41 2013 From: report at bugs.python.org (Brett Cannon) Date: Wed, 09 Oct 2013 16:54:41 +0000 Subject: [issue19165] Change formatter warning to DeprecationWarning in 3.5 In-Reply-To: <1381248780.95.0.467798670434.issue19165@psf.upfronthosting.co.za> Message-ID: <1381337681.75.0.729528005566.issue19165@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Deprecate the formatter module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 18:58:09 2013 From: report at bugs.python.org (Esa Peuha) Date: Wed, 09 Oct 2013 16:58:09 +0000 Subject: [issue19202] Additions to docs In-Reply-To: <1381313356.45.0.650070848794.issue19202@psf.upfronthosting.co.za> Message-ID: <1381337889.61.0.891570498163.issue19202@psf.upfronthosting.co.za> Esa Peuha added the comment: How would you give a single definition of reduce() that helps people to understand both 2-arg and 3-arg variants? The way it is implemented in C is impossible to duplicate in pure Python; the best you could do is a hack that works unless someone *tries* to break it, but that would just be confusing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 19:10:21 2013 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 09 Oct 2013 17:10:21 +0000 Subject: [issue19210] Unicode Objects in Tuples In-Reply-To: <1381336761.68.0.499147739849.issue19210@psf.upfronthosting.co.za> Message-ID: <1381338621.35.0.274685840116.issue19210@psf.upfronthosting.co.za> Eric V. Smith added the comment: Can you provide some code which demonstrates this? It's easier to address this if we have known working (or non-working) examples. Thanks. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 19:13:17 2013 From: report at bugs.python.org (Georg Brandl) Date: Wed, 09 Oct 2013 17:13:17 +0000 Subject: [issue19202] Additions to docs In-Reply-To: <1381313356.45.0.650070848794.issue19202@psf.upfronthosting.co.za> Message-ID: <1381338797.18.0.352890402378.issue19202@psf.upfronthosting.co.za> Georg Brandl added the comment: What about def reduce(function, iterable, initializer=None): it = iter(iterable) if initializer is None: value = next(it) else: value = initializer for element in it: value = function(value, element) return value Remember, an equivalent doesn't have to be 100% compatible, it is a way for the user to quickly get an idea what the function does. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 19:17:24 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 09 Oct 2013 17:17:24 +0000 Subject: [issue19205] Don't import re and sysconfig in site.py In-Reply-To: <1381324834.76.0.705779220837.issue19205@psf.upfronthosting.co.za> Message-ID: <1381339044.85.0.747548238884.issue19205@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 19:17:35 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 09 Oct 2013 17:17:35 +0000 Subject: [issue19209] Remove import copyreg from os module In-Reply-To: <1381328480.57.0.127685895203.issue19209@psf.upfronthosting.co.za> Message-ID: <1381339055.51.0.874100480233.issue19209@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 19:17:50 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 09 Oct 2013 17:17:50 +0000 Subject: [issue9548] locale can be imported at startup but relies on too many library modules In-Reply-To: <1281380971.62.0.695264636628.issue9548@psf.upfronthosting.co.za> Message-ID: <1381339070.14.0.709166335854.issue9548@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 19:46:14 2013 From: report at bugs.python.org (Peter Otten) Date: Wed, 09 Oct 2013 17:46:14 +0000 Subject: [issue19210] Unicode Objects in Tuples In-Reply-To: <1381336761.68.0.499147739849.issue19210@psf.upfronthosting.co.za> Message-ID: <1381340774.59.0.987546858035.issue19210@psf.upfronthosting.co.za> Peter Otten added the comment: Be aware that for a 1-tuple the trailing comma is mandatory: >>> print (u"???") # this is a string despite the suggestive parens ??? >>> print (u"???",) # this is a tuple (u'\xe4\xf6\xfc',) ---------- nosy: +peter.otten _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 19:58:13 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 09 Oct 2013 17:58:13 +0000 Subject: [issue19208] Bas64.decodestring() returns data instead of throwing exception In-Reply-To: <1381326935.62.0.967416907354.issue19208@psf.upfronthosting.co.za> Message-ID: <1381341493.53.0.659301460204.issue19208@psf.upfronthosting.co.za> R. David Murray added the comment: You are looking for the (new in Python 3) 'validate' option of b64decode: >>> base64.b64decode(b"GET http://www.google.com.hk/search?q=hotels+near+airport&pws=1&igu=1&ip=0.0.0.0&safe=images&gl=CN&gll=39.913889,116.391667&near=china&hl=zh-CN", validate=True) Traceback (most recent call last): File "", line 1, in File "/home/rdmurray/python/p34/Lib/base64.py", line 87, in b64decode raise binascii.Error('Non-base64 digit found') binascii.Error: Non-base64 digit found In Python2, the base64 module unfortunately only handles the applications of RFC 3548 where non-base64 alphabet characters are required to be ignored. (Those are (or were?) the primary applications of the RFC, by the way, which is why it was implemented that way originally.) ---------- nosy: +r.david.murray resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 20:06:20 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 09 Oct 2013 18:06:20 +0000 Subject: [issue1507011] Use a set to keep interned strings Message-ID: <1381341980.4.0.406392075329.issue1507011@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- superseder: -> Use a set for interned strings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 20:12:15 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 09 Oct 2013 18:12:15 +0000 Subject: [issue19187] Use a set for interned strings In-Reply-To: <1381173533.0.0.681038585832.issue19187@psf.upfronthosting.co.za> Message-ID: <1381342335.39.0.873039487659.issue19187@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This exact issue was discussed in #19187 and #7224 many years ago. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 20:14:16 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 09 Oct 2013 18:14:16 +0000 Subject: [issue19187] Use a set for interned strings In-Reply-To: <1381173533.0.0.681038585832.issue19187@psf.upfronthosting.co.za> Message-ID: <1381342456.34.0.024394176074.issue19187@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The first reference above should have been to #1507011. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 20:18:04 2013 From: report at bugs.python.org (Ethan Glasser-Camp) Date: Wed, 09 Oct 2013 18:18:04 +0000 Subject: [issue19211] from relative_module import seems to import wrong module Message-ID: <1381342684.04.0.290393809096.issue19211@psf.upfronthosting.co.za> New submission from Ethan Glasser-Camp: I have a library lib. lib/__init__.py does the following: from .subdir import a from . import a import sys print(sys.modules['lib.a']) This code fails with a KeyError. It seems that despite the second line, lib.a does not get imported. Printing a.__name__ shows lib.subdir.a. Commenting out the first line makes the code work fine, as does moving the code from lib/__init__.py to lib/api.py. This happens under both Python 2.7 and Python 3.3. Here is my sys.path, sys.meta_path, and sys.path_hooks under Python 2.7: (['/home/ethan/tmp/import-madness', '/home/ethan/tmp/software/notmuch/bindings/python', '/home/ethan/local/lib/python2.7/site-packages', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/home/ethan/.local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7'], [], []) The same under Python 3: ['/home/ethan/tmp/import-madness', '/home/ethan/local/lib/python2.7/site-packages', '/usr/lib/python3.3', '/usr/lib/python3.3/plat-x86_64-linux-gnu', '/usr/lib/python3.3/lib-dynload', '/usr/local/lib/python3.3/dist-packages', '/usr/lib/python3/dist-packages'] [, , ] [, .path_hook_for_FileFinder at 0x7f0728babdd0>] ---------- components: Interpreter Core files: __init__.py messages: 199320 nosy: ethan.glasser.camp priority: normal severity: normal status: open title: from relative_module import seems to import wrong module type: behavior versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file32022/__init__.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 20:23:57 2013 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 09 Oct 2013 18:23:57 +0000 Subject: [issue19210] Unicode Objects in Tuples In-Reply-To: <1381336761.68.0.499147739849.issue19210@psf.upfronthosting.co.za> Message-ID: <1381343037.93.0.915520379614.issue19210@psf.upfronthosting.co.za> Eric V. Smith added the comment: This isn't strictly related to printing a tuple. It's the difference between str() and repr(): >>> print (u"???") # uses str ??? >>> print repr(u"???") u'\xe4\xf6\xfc' When the tuple is printed, it uses the repr of its constituent parts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 20:25:46 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Oct 2013 18:25:46 +0000 Subject: [issue19209] Remove import copyreg from os module In-Reply-To: <1381337266.49.0.78203310991.issue19209@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Can't we modify the qualified name instead? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 20:28:19 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 09 Oct 2013 18:28:19 +0000 Subject: [issue19211] from relative_module import seems to import wrong module In-Reply-To: <1381342684.04.0.290393809096.issue19211@psf.upfronthosting.co.za> Message-ID: <1381343299.58.0.0851639203166.issue19211@psf.upfronthosting.co.za> R. David Murray added the comment: I believe that this is because once you execute the first line, 'a' exists as a name in the 'lib' namespace, so 'from . import a' sees that 'a' already exists, and does nothing. The same import sequence in abc.py will put 'a' into the 'abc' namespace, but 'from . import a' will be looking in the 'lib' namespace, won't see an 'a', and will do the new import, overwriting the definition of 'a' in the 'abc' namespace as it does so. The exact effects of imports inside __init__ is sometimes a bit non-intuitive. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 20:30:18 2013 From: report at bugs.python.org (Ethan Glasser-Camp) Date: Wed, 09 Oct 2013 18:30:18 +0000 Subject: [issue19211] from relative_module import seems to import wrong module In-Reply-To: <1381342684.04.0.290393809096.issue19211@psf.upfronthosting.co.za> Message-ID: <1381343418.47.0.0940582318717.issue19211@psf.upfronthosting.co.za> Ethan Glasser-Camp added the comment: Thanks for the explanation. I had a feeling I was overlooking something obvious but couldn't figure out what it was. Feel free to close as invalid. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 20:30:24 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 09 Oct 2013 18:30:24 +0000 Subject: [issue19158] BoundedSemaphore.release() subject to races In-Reply-To: <1380844816.11.0.829919053917.issue19158@psf.upfronthosting.co.za> Message-ID: <3cw3rb2K8Pz7LkD@mail.python.org> Roundup Robot added the comment: New changeset 369fabf9b2ba by Tim Peters in branch '3.3': Issue 19158: a rare race in BoundedSemaphore could allow .release() too often. http://hg.python.org/cpython/rev/369fabf9b2ba New changeset 9ddc33174ddf by Tim Peters in branch 'default': Issue 19158: a rare race in BoundedSemaphore could allow .release() too often. http://hg.python.org/cpython/rev/9ddc33174ddf New changeset 2ce77d9ed4b0 by Tim Peters in branch '2.7': Issue 19158: a rare race in BoundedSemaphore could allow .release() too often. http://hg.python.org/cpython/rev/2ce77d9ed4b0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 20:31:01 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 09 Oct 2013 18:31:01 +0000 Subject: [issue19211] from relative_module import seems to import wrong module In-Reply-To: <1381342684.04.0.290393809096.issue19211@psf.upfronthosting.co.za> Message-ID: <1381343461.84.0.866681959916.issue19211@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 Wed Oct 9 20:31:15 2013 From: report at bugs.python.org (Georg Brandl) Date: Wed, 09 Oct 2013 18:31:15 +0000 Subject: [issue19209] Remove import copyreg from os module In-Reply-To: <1381328480.57.0.127685895203.issue19209@psf.upfronthosting.co.za> Message-ID: <1381343475.96.0.982237851621.issue19209@psf.upfronthosting.co.za> Georg Brandl added the comment: But for pickling something, you have to import pickle, which always imports copyreg anyway, doesn't it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 20:33:45 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 09 Oct 2013 18:33:45 +0000 Subject: [issue19209] Remove import copyreg from os module In-Reply-To: <1381328480.57.0.127685895203.issue19209@psf.upfronthosting.co.za> Message-ID: <1381343625.58.0.142435900169.issue19209@psf.upfronthosting.co.za> Christian Heimes added the comment: Exactly, the pickle module depends on the copyreg module. It's a submodule that acts as a registry for pickle-related lookups and hooks. My patch just moves the registration of these hooks out of the os module into the copyreg module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 20:35:25 2013 From: report at bugs.python.org (Georg Brandl) Date: Wed, 09 Oct 2013 18:35:25 +0000 Subject: [issue19209] Remove import copyreg from os module In-Reply-To: <1381328480.57.0.127685895203.issue19209@psf.upfronthosting.co.za> Message-ID: <1381343725.33.0.240622750295.issue19209@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't see a problem with that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 20:38:02 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 18:38:02 +0000 Subject: [issue19209] Remove import copyreg from os module In-Reply-To: <1381328480.57.0.127685895203.issue19209@psf.upfronthosting.co.za> Message-ID: <1381343882.09.0.182586976875.issue19209@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: How much this speed up the startup of the interpreter? Proposed patch looks contrary to purpose of the copyreg module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 20:52:33 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 09 Oct 2013 18:52:33 +0000 Subject: [issue19205] Don't import re and sysconfig in site.py In-Reply-To: <1381324834.76.0.705779220837.issue19205@psf.upfronthosting.co.za> Message-ID: <1381344753.88.0.523856527063.issue19205@psf.upfronthosting.co.za> Christian Heimes added the comment: The site and sysconfig module are too intermingled to remove the import of sysconfig from the site module. However the sysconfig module doesn't use the re module in most cases anymore. The parsing functions for Makefile and pyconfig.h are only used by distutils. The patch moves "import re" inside three functions. ---------- Added file: http://bugs.python.org/file32023/sysconfig_delay_re.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 20:56:03 2013 From: report at bugs.python.org (Matteo Cafasso) Date: Wed, 09 Oct 2013 18:56:03 +0000 Subject: [issue19185] Allow multiprocessing Pool initializer to return values In-Reply-To: <1381141979.01.0.783752722289.issue19185@psf.upfronthosting.co.za> Message-ID: <5255A6C0.1030303@gmail.com> Matteo Cafasso added the comment: On 07/10/13 13:32, Richard Oudkerk wrote: > Richard Oudkerk added the comment: > > I think "misuse" is an exageration. Various functions change some state and return a value that is usually ignored, e.g. os.umask(), signal.signal(). These functions are compliant with POSIX standards and the return values are actually useful, they return the previously set masks and handlers, often are ignored but in complex cases it's good to know their previous state. The problem here is quite different, the interface is giving the opportunity of executing a function but it ignores the returned values, this is pretty limiting from an API point of view. It is quite counterintuitive and also not documented, proof is the amount of questions on how to use the initializer (just a couple of examples): http://stackoverflow.com/questions/10117073/how-to-use-initializer-to-set-up-my-multiprocess-pool http://stackoverflow.com/questions/9944370/use-of-initialize-in-python-multiprocessing-worker-pool > >> Global variables usage is a pattern which might lead to code errors and many >> developers discourage from following it. > What sort of code errors? This really seems a stylistic point. Maybe such developers would be happier using class methods and class variables rather than functions and globals variables. http://c2.com/cgi/wiki?GlobalVariablesAreBad It is a pretty common code practice to avoid global variables whenever possible; as always: is the way a tool is used to make it evil not the tool itself; yet I agree with the fact that a global variable change is hard to track down into the code and when the code grows it can lead to very tricky errors. > > Out of interest, what do you usually do in your initializer functions? I mainly develop back-end systems which take great advantage from the Worker Pool pattern. We are talking about services which uses third party libraries to execute CPU bounded tasks trying to scale up with the number of CPU cores. Many of these libraries, unfortunately, are stateful (I would say "state-full") and their initialization is time-consuming. Typically a worker initializes some of those objects (which currently are stored in global variables) and starts crunching some data, meanwhile the state of these objects keeps changing and here the global variables pattern shows its worst side. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 21:05:11 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 19:05:11 +0000 Subject: [issue19187] Use a set for interned strings In-Reply-To: <1381173533.0.0.681038585832.issue19187@psf.upfronthosting.co.za> Message-ID: <1381345511.14.0.264030226259.issue19187@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 21:17:40 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Oct 2013 19:17:40 +0000 Subject: [issue19187] Use a set for interned strings In-Reply-To: <1381173533.0.0.681038585832.issue19187@psf.upfronthosting.co.za> Message-ID: <1381346260.33.0.874691323529.issue19187@psf.upfronthosting.co.za> STINNER Victor added the comment: Raymond> FWIW, I'm dubious that there will be any benefit from this at all. The savings of one-pointer is the dictionary is likely to be insignificant compared to the size of the string object themselves. As I wrote in python-dev, the dictionary is usually the largest memory block, at least at Python startup. The dictionary (without counting the string, just the dict) is between 192 KB and 1.5 MB on x86_64. In the implementation of the PEP 454, issue #18874, I added a function to get the length and size of the dictionary of Unicode interned strings. Objects/unicodeobject.c: PyObject* _PyUnicode_GetInterned(void) { return interned; } tracemalloc.get_unicode_interned(): http://hg.python.org/features/tracemalloc/file/b797779940a5/Modules/_tracemalloc.c#l4606 You can use this function to see how many KB are saved. In embedded systems, every byte of memory counts :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 21:21:31 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 09 Oct 2013 19:21:31 +0000 Subject: [issue19209] Remove import copyreg from os module In-Reply-To: <1381328480.57.0.127685895203.issue19209@psf.upfronthosting.co.za> Message-ID: <1381346491.05.0.315329482818.issue19209@psf.upfronthosting.co.za> Christian Heimes added the comment: The speedup is minimal but it's a start. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 21:25:53 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Oct 2013 19:25:53 +0000 Subject: [issue19209] Remove import copyreg from os module In-Reply-To: <1381328480.57.0.127685895203.issue19209@psf.upfronthosting.co.za> Message-ID: <1381346753.29.0.82014387747.issue19209@psf.upfronthosting.co.za> STINNER Victor added the comment: os_no_copyreg.patch looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 21:30:33 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 19:30:33 +0000 Subject: [issue19145] Inconsistent behaviour in itertools.repeat when using negative times In-Reply-To: <1380727396.47.0.412229295257.issue19145@psf.upfronthosting.co.za> Message-ID: <1381347033.24.0.407048513134.issue19145@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Raymond's patch looks even more cumbersome than previous code. And it doesn't work in some cases: >>> it = itertools.cycle([-2, -1]) >>> class Index: ... def __index__(self): return next(it) ... >>> itertools.repeat(42, times=Index()) repeat(42, -1) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 21:34:55 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 19:34:55 +0000 Subject: [issue19209] Remove import copyreg from os module In-Reply-To: <1381328480.57.0.127685895203.issue19209@psf.upfronthosting.co.za> Message-ID: <1381347295.26.0.398118314081.issue19209@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't think we should tangent code for such tiny benefit. copyreg is lightweight module specially designed to break coupling of the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 21:35:37 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 09 Oct 2013 19:35:37 +0000 Subject: [issue19187] Use a set for interned strings In-Reply-To: <1381173533.0.0.681038585832.issue19187@psf.upfronthosting.co.za> Message-ID: <1381347337.7.0.498404205197.issue19187@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > In embedded systems, every byte of memory counts It is not just embedded systems. The range 192 KB to 1.5 MB is where typical L2 cache sizes are these days. I would expect that the intern dictionary is accessed very often and much more often than the actual strings. In theory, if it fits in L2 cache, the performance will be much higher than if it is even slightly over. This said, when I was looking at this 3-4 years ago, I did not see measurable improvements in my programs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 21:49:32 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2013 19:49:32 +0000 Subject: [issue19187] Use a set for interned strings In-Reply-To: <1381173533.0.0.681038585832.issue19187@psf.upfronthosting.co.za> Message-ID: <1381348172.84.0.463874280754.issue19187@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I afraid that adding new parameter to the set_contains_key function will slow down other set operations. It will be better return a key as the result of the function (NULL if not found). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 21:59:24 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 09 Oct 2013 19:59:24 +0000 Subject: [issue19185] Allow multiprocessing Pool initializer to return values In-Reply-To: <1381090470.56.0.579888919868.issue19185@psf.upfronthosting.co.za> Message-ID: <1381348764.75.0.661601432175.issue19185@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > These functions are compliant with POSIX standards and the return values > are actually useful, they return the previously set masks and handlers, > often are ignored but in complex cases it's good to know their previous > state. Yes. But my point was that somebody might have used such a function as the initializer argument. The proposed change would break a program which does with Pool(initializer=os.nice, initargs=(incr,)) as p: ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 22:04:10 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 09 Oct 2013 20:04: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: <1381349050.11.0.252817019187.issue16355@psf.upfronthosting.co.za> R. David Murray added the comment: Looking at the source, the suppression of errors is clearly intentional. Looking at the change that added the TypeError check, we see this from Jeremy Hilton in March 2002 (9c2ca37bdeec): It appears that getcomments() can get called for classes defined in C. Since these don't have source code, it can't do anything useful. A function buried many levels deep was raising a TypeError that was not caught. Who knows why this broke... Which implies that getcomments was being called from somewhere in Python itself...at least back then. The check for OSError (IOError, then) was from shortly after the module was first added, in February of 2001 by Ka-Ping Yee. So, the motivation behind this behavior are shrouded in the mists of time :) Should we really be changing something of that long standing, when it raising a TypeError previously clearly broke something? I'm thinking not. I'm thinking we should leave well enough alone. It is, after all, working as documented....in the doc string, from the time Jeremy made the TypeError change. So after all this work (sorry people, I do appreciate the work!), I think we should just make a doc fix that copies the line about returning None if source can't be found into the rst docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 22:29:06 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 09 Oct 2013 20:29:06 +0000 Subject: [issue17134] Use Windows' certificate store for CA certs In-Reply-To: <1360078143.8.0.938168290854.issue17134@psf.upfronthosting.co.za> Message-ID: <1381350546.37.0.516128591331.issue17134@psf.upfronthosting.co.za> Christian Heimes added the comment: The current implementation doesn't check the trust settings and purpose of certs. CertGetCertificateContextProperty() with CERT_ENHKEY_USAGE_PROP_ID returns a ASN.1 structure. I just have to figure out how to parse the CTL_USAGE struct ... http://msdn.microsoft.com/en-us/library/aa376079%28v=vs.85%29.aspx http://msdn.microsoft.com/en-us/library/aa381493%28v=vs.85%29.aspx http://www.alvestrand.no/objectid/1.3.6.1.5.5.7.3.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 23:11:33 2013 From: report at bugs.python.org (bruno Piguet) Date: Wed, 09 Oct 2013 21:11:33 +0000 Subject: [issue14984] netrc module allows read of non-secured .netrc file In-Reply-To: <1338641621.72.0.0114973811866.issue14984@psf.upfronthosting.co.za> Message-ID: <1381353093.89.0.629321462422.issue14984@psf.upfronthosting.co.za> bruno Piguet added the comment: I apologise for coming back to this issue lately, after its closing. I must have misconfigured something in my tracking system. Thank-you everybody for the work done, especiallly the careful handling and documenting of the case "only if password is present in file". I recognise my proposed patch was a bit flacky. However, I don't get the rationale behind the restriction to the sole case where the file is the default .netrc ? If a clear text password is exposed in any file, it is also a security problem, isn't it ? This specific file might be more difficult to find for an attacker, but not impossible. Feel free to redirect this discussion to some other place if you want to keep this issue close and still. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 23:11:59 2013 From: report at bugs.python.org (Caitlin Potter) Date: Wed, 09 Oct 2013 21:11:59 +0000 Subject: [issue19212] Invitation to connect on LinkedIn Message-ID: <1942377297.24265262.1381353116671.JavaMail.app@ela4-app0130.prod> New submission from Caitlin Potter: LinkedIn ------------ Python, I'd like to add you to my professional network on LinkedIn. - Caitlin Caitlin Potter Freelance Developer at freelance software developer "self employed" Toronto, Canada Area Confirm that you know Caitlin Potter: https://www.linkedin.com/e/-3qcne3-hml1zaap-1f/isd/17195171015/l2fhHe9j/?hs=false&tok=2MQlcG4YvniRY1 -- You are receiving Invitation to Connect emails. Click to unsubscribe: http://www.linkedin.com/e/-3qcne3-hml1zaap-1f/z2oU7dKDzpt2G7xQz2FC2SclHmnUGzmsk0c/goo/report%40bugs%2Epython%2Eorg/20061/I5707467440_1/?hs=false&tok=1rzhxcavbniRY1 (c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA. ---------- messages: 199343 nosy: Caitlin.Potter priority: normal severity: normal status: open title: Invitation to connect on LinkedIn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 23:12:16 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 09 Oct 2013 21:12:16 +0000 Subject: [issue18891] Master patch for content manager addtion to email package. In-Reply-To: <1377918603.72.0.362957249668.issue18891@psf.upfronthosting.co.za> Message-ID: <1381353136.92.0.642758631944.issue18891@psf.upfronthosting.co.za> R. David Murray added the comment: Updating the patch to address Stephen's review comments (thanks, Stephen!). The biggest change is adding a MIMEPart class, and renaming MIMEMessage to EmailMessage. Other significant changes are: only moving 'Content-*' headers in 'make' methods, adding 'clear' and 'clear_content' methods (and calling clear_content in the 'make' methods), and raising a TypeError if set_content is called on a multipart. The documentation is complete, but not completely proofread/edited. I can always finish that after the Beta if I don't get to it before (though I expect to). There are probably some missing docstrings as well; same comment applies :). I have not addressed the MIMEType idea. I will deal with that as a separate issue (and not for 3.4), since it has implications throughout the package, not just in the code I'm enhancing. I think this is ready for commit review, assuming I haven't forgotten anything. (I'll close the earlier issues.) ---------- stage: patch review -> commit review Added file: http://bugs.python.org/file32024/master_content_manager.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 23:14:58 2013 From: report at bugs.python.org (Alexander Boyd) Date: Wed, 09 Oct 2013 21:14:58 +0000 Subject: [issue19213] platform.linux_distribution detects Oracle Linux as Red Hat Enterprise Linux Message-ID: <1381353298.1.0.0482171871073.issue19213@psf.upfronthosting.co.za> New submission from Alexander Boyd: Tested on 3.3.2 and 2.6.6. On Oracle Linux, platform.linux_distribution detects the current distribution as Red Hat Enterprise Linux: >>> import platform >>> platform.linux_distribution() ('Red Hat Enterprise Linux Server', '6.2', 'Santiago') I would have expected something along the lines of: >>> import platform >>> platform.linux_distribution() ('Oracle Linux', '6.2', '') Or perhaps ('Oracle Linux Server', '6.2', ''). ---------- components: Library (Lib) messages: 199345 nosy: javawizard priority: normal severity: normal status: open title: platform.linux_distribution detects Oracle Linux as Red Hat Enterprise Linux type: behavior versions: Python 2.6, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 23:29:24 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 09 Oct 2013 21:29:24 +0000 Subject: [issue9548] locale can be imported at startup but relies on too many library modules In-Reply-To: <1281380971.62.0.695264636628.issue9548@psf.upfronthosting.co.za> Message-ID: <1381354164.95.0.361680815238.issue9548@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Updated patch for 3.4. ---------- nosy: +benjamin.peterson, christian.heimes versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 23:29:38 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 09 Oct 2013 21:29:38 +0000 Subject: [issue9548] locale can be imported at startup but relies on too many library modules In-Reply-To: <1281380971.62.0.695264636628.issue9548@psf.upfronthosting.co.za> Message-ID: <1381354178.52.0.862314923014.issue9548@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Added file: http://bugs.python.org/file32025/bootlocale2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 23:43:12 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 09 Oct 2013 21:43:12 +0000 Subject: [issue18785] Add get_body and iter_attachments to provisional email API In-Reply-To: <1376947482.78.0.757583569107.issue18785@psf.upfronthosting.co.za> Message-ID: <1381354992.87.0.555710306388.issue18785@psf.upfronthosting.co.za> R. David Murray added the comment: Serhiy's review comments were addressed by changes made on the master patch issue. Closing this one in favor of that one. ---------- resolution: -> out of date stage: patch review -> committed/rejected superseder: -> Master patch for content manager addtion to email package. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 23:43:19 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 09 Oct 2013 21:43:19 +0000 Subject: [issue18785] Add get_body and iter_attachments to provisional email API In-Reply-To: <1376947482.78.0.757583569107.issue18785@psf.upfronthosting.co.za> Message-ID: <1381354999.21.0.37436292432.issue18785@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 23:44:23 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 09 Oct 2013 21:44:23 +0000 Subject: [issue18860] Add content manager API to email package In-Reply-To: <1377653310.93.0.882700028291.issue18860@psf.upfronthosting.co.za> Message-ID: <1381355063.94.0.89906151161.issue18860@psf.upfronthosting.co.za> R. David Murray added the comment: Closing in favor of the master patch issue 18891. ---------- resolution: -> out of date stage: patch review -> committed/rejected status: open -> closed superseder: -> Master patch for content manager addtion to email package. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 23:45:09 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 09 Oct 2013 21:45:09 +0000 Subject: [issue18890] Add a raw_data_manager content manager to the email package. In-Reply-To: <1377916552.26.0.723801852284.issue18890@psf.upfronthosting.co.za> Message-ID: <1381355109.93.0.282833603489.issue18890@psf.upfronthosting.co.za> R. David Murray added the comment: Closing in favor of the master patch issue 18891. ---------- resolution: -> out of date stage: patch review -> committed/rejected status: open -> closed superseder: -> Master patch for content manager addtion to email package. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 23:55:33 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 09 Oct 2013 21:55:33 +0000 Subject: [issue14984] netrc module allows read of non-secured .netrc file In-Reply-To: <1338641621.72.0.0114973811866.issue14984@psf.upfronthosting.co.za> Message-ID: <1381355733.5.0.489058661739.issue14984@psf.upfronthosting.co.za> R. David Murray added the comment: Nothing stops us from have a post-mortem discussion on a closed issue :) The rationale for only doing the check for .netrc is that that is backward-compatibility-wise fairly safe, because other tools will already be insisting on the same security. But for arbitrary files being parsed for arbitrary purposes by python-based tools, suddenly throwing an error if there is a password in the file could easily break things. This doesn't necessarily prevent us from making the security even more strict in 3.4, but that is a more complex discussion (involving what purposes netrc-on-other-than-.netrc is used for in the real world), and should be a separate issue in this tracker, if you want to raise the proposal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 23:56:29 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 09 Oct 2013 21:56:29 +0000 Subject: [issue19212] Invitation to connect on LinkedIn Message-ID: <1381355789.36.0.167307378355.issue19212@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- Removed message: http://bugs.python.org/msg199343 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 23:56:48 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 09 Oct 2013 21:56:48 +0000 Subject: [issue19212] Spam Message-ID: <1381355808.11.0.48171526975.issue19212@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- status: open -> closed title: Invitation to connect on LinkedIn -> Spam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 23:58:48 2013 From: report at bugs.python.org (Bill Sobel) Date: Wed, 09 Oct 2013 21:58:48 +0000 Subject: [issue17748] Condition.wait timeout can't be set to more than 50 ms In-Reply-To: <1366104172.5.0.472723952105.issue17748@psf.upfronthosting.co.za> Message-ID: <1381355928.72.0.499734727495.issue17748@psf.upfronthosting.co.za> Bill Sobel added the comment: I'd like to suggest a easy fix here (I saw this was closed, but the posters were asking for a behavior change). With this fix there is no behavior change to callers or new parameters to the API. if remaining >= 4.0: maxDelay = 1 else: maxDelay = .05 delay = min(delay * 2, remaining, maxDelay) With this fix the loop waits 1 second until it is 'close' to the expiration time then goes into its normal 20 times per-second check. For long waits this is what is causing the power issue and is alleviated by throttling back on the check when not close to expiration. ---------- nosy: +Bill.Sobel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 00:05:16 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 09 Oct 2013 22:05:16 +0000 Subject: [issue19213] platform.linux_distribution detects Oracle Linux as Red Hat Enterprise Linux In-Reply-To: <1381353298.1.0.0482171871073.issue19213@psf.upfronthosting.co.za> Message-ID: <1381356316.97.0.600878198273.issue19213@psf.upfronthosting.co.za> R. David Murray added the comment: You might expect that, but platform.linux_distribution is basing its report on what is in /etc/xxx-version or xxx-release. Most likely this is an Oracle "bug", although they might be providing both their own version file and the version file for the RH release they are basing off of, in which case we could perhaps tweak the platform code to take that into account. Can you figure out which it is? ---------- nosy: +lemburg, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 00:26:12 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 09 Oct 2013 22:26:12 +0000 Subject: [issue19210] Unicode Objects in Tuples In-Reply-To: <1381336761.68.0.499147739849.issue19210@psf.upfronthosting.co.za> Message-ID: <1381357572.22.0.496749830094.issue19210@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Indeed, this is a feature, even though it may seem an odd one. ---------- nosy: +pitrou resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 00:45:35 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Wed, 09 Oct 2013 22:45:35 +0000 Subject: [issue18177] Incorect quote marks in code section-headers in PDF version of docs In-Reply-To: <1370829780.84.0.0627044566719.issue18177@psf.upfronthosting.co.za> Message-ID: <1381358735.98.0.348172683756.issue18177@psf.upfronthosting.co.za> Tshepang Lekhonkhobe added the comment: A work-around: http://stackoverflow.com/a/16164658/321731. ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 01:06:01 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Wed, 09 Oct 2013 23:06:01 +0000 Subject: [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: <1356739435.76.0.304211925624.issue16805@psf.upfronthosting.co.za> Message-ID: <1381359961.87.0.531773094641.issue16805@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : Removed file: http://bugs.python.org/file28482/remove-directives-warnings-3.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 01:07:19 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Wed, 09 Oct 2013 23:07:19 +0000 Subject: [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: <1356739435.76.0.304211925624.issue16805@psf.upfronthosting.co.za> Message-ID: <1381360039.98.0.974303631246.issue16805@psf.upfronthosting.co.za> Tshepang Lekhonkhobe added the comment: BTW, these patches still apply, one to 2.7 and another to 3.3 and 3.4. They are pretty much harmless, so do not be afraid to accept them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 01:11:22 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 09 Oct 2013 23:11:22 +0000 Subject: [issue19199] Remove PyThreadState.tick_counter field In-Reply-To: <1381267121.14.0.275844287932.issue19199@psf.upfronthosting.co.za> Message-ID: <1381360282.59.0.862234082471.issue19199@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 01:20:29 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 09 Oct 2013 23:20:29 +0000 Subject: [issue19201] lzma and 'x' mode open In-Reply-To: <1381282314.82.0.620935912444.issue19201@psf.upfronthosting.co.za> Message-ID: <1381360829.59.0.877681523166.issue19201@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Looks good. Being strict this would be 3.4 material, but patch is trivial and looks like a oversight. We should check other compression modules like gzip, bzip2, etc. ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 02:00:59 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 10 Oct 2013 00:00:59 +0000 Subject: [issue9548] locale can be imported at startup but relies on too many library modules In-Reply-To: <1281380971.62.0.695264636628.issue9548@psf.upfronthosting.co.za> Message-ID: <1381363259.16.0.53198770593.issue9548@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 05:12:44 2013 From: report at bugs.python.org (Martin) Date: Thu, 10 Oct 2013 03:12:44 +0000 Subject: [issue19150] IDLE shell fails: "ModifiedInterpreter instance has no attribute 'interp'" In-Reply-To: <1380773098.03.0.70627839845.issue19150@psf.upfronthosting.co.za> Message-ID: <1381374764.08.0.71235045371.issue19150@psf.upfronthosting.co.za> Martin added the comment: Thank you very much for your help. Specification of error : In python 2.7.3 for Ubuntu 12.04 32-bit It creates a program with the following line of code : Python is a programming language That lets you work more quickly and integrate your systems more effectively. You can learn to use Python and see almost immediate gains in productivity and lower maintenance costs. import math elCociente def (x, y): ????ratio = x / y ????return ratio theRemainder def (x, y): ????remainder = x% y ????return other laRaiz def ( x ) : ????root = math.sqrt ( x ) ????return root LaSegRaiz def (y): ????segraiz = math.sqrt ( y) ????return segraiz def main ( ) : ????x = input (" Enter a number: " ) ????y = input (" Enter a second number :") ????print " the quotient of dividing " , x , "with" , and , " is" , elCociente ( x , y) ????print " the remainder of dividing " , x , " for " and , " is" , theRemainder ( x , y) ????print " the root of " , x , " is" , laRaiz ( x ) ????print " the root ," and , " is" , LaSegRaiz ( y) Where the lines 1 and 2 are not discussed , when compiling the program ( f5 ) warns us to a syntax error , open the sheel , we force the compilation typing the main and opens another blank shell . not saying that is the error line . If commented lines 1 and 2 and compile again ( f5 ) jump several errors in the shell which can not close and forces us to have to kill python process . I hope I have been much clearer . thanks Corrected with cometary Program # Python is a programming language That lets you work more quickly and integrate your systems more effectively. # You can learn to use Python and see almost immediate gains in productivity and lower maintenance costs. import math elCociente def (x, y): ????ratio = x / y ????return ratio theRemainder def (x, y): ????remainder = x% y ????return other laRaiz def ( x ) : ????root = math.sqrt ( x ) ????return root LaSegRaiz def (y): ????segraiz = math.sqrt ( y) ????return segraiz def main ( ) : ????x = input (" Enter a number: " ) ????y = input (" Enter a second number :") ????print " the quotient of dividing " , x , "with" , and , " is" , elCociente ( x , y) ????print " the remainder of dividing " , x , " for " and , " is" , theRemainder ( x , y) ????print " the root of " , x , " is" , laRaiz ( x ) ????print " the root ," and , " is" , LaSegRaiz ( y) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 06:29:05 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 10 Oct 2013 04:29:05 +0000 Subject: [issue19187] Use a set for interned strings In-Reply-To: <1381173533.0.0.681038585832.issue19187@psf.upfronthosting.co.za> Message-ID: <1381379345.43.0.881732617288.issue19187@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Based on the discussion so far, I'm going to close this one. I don't think it is an appropriate use of sets (they are about membership testing, not about looking up values). The upside is minimal. The downside is hacking up the set implementation and making it more difficult to implement some of the other alterations I'm planning for sets -- I want to tune the performance to optimize set operations without worrying about slowing down all the rest of Python because of interned strings. Martin's reason's for rejecting this previously still hold true. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 06:53:34 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 10 Oct 2013 04:53:34 +0000 Subject: [issue19188] Add PySet_CheckExact() In-Reply-To: <1381174539.56.0.480859980209.issue19188@psf.upfronthosting.co.za> Message-ID: <1381380814.74.0.763562788277.issue19188@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 06:55:00 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 10 Oct 2013 04:55:00 +0000 Subject: [issue5907] repr of time.struct_time type does not eval In-Reply-To: <1241281843.36.0.110450032545.issue5907@psf.upfronthosting.co.za> Message-ID: <1381380900.06.0.648305718321.issue5907@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 07:13:36 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 10 Oct 2013 05:13:36 +0000 Subject: [issue15475] Correct __sizeof__ support for itertools In-Reply-To: <1343418242.58.0.256146467281.issue15475@psf.upfronthosting.co.za> Message-ID: <1381382016.3.0.586492599409.issue15475@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Serhiy, you can make the decision on whether this goes into 3.4 or gets closed. I don't think any actual user has ever expressed interest in this functionality and it is hard to meaningfully reason about the real memory cost because we don't have a way to include the memory of the referred-to objects. To me, it seems like unnecessary code bloat. ---------- assignee: rhettinger -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 07:22:54 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 10 Oct 2013 05:22:54 +0000 Subject: [issue19005] PyIter_Next crashes if passed a non-iterator In-Reply-To: <1378894942.16.0.763585748614.issue19005@psf.upfronthosting.co.za> Message-ID: <1381382574.88.0.280511439229.issue19005@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This is a documentation bug. As you noted, the input must be an iterator. It is up to the C programmer to assure this precondition is met. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 07:38:39 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 10 Oct 2013 05:38:39 +0000 Subject: [issue19005] PyIter_Next crashes if passed a non-iterator In-Reply-To: <1378894942.16.0.763585748614.issue19005@psf.upfronthosting.co.za> Message-ID: <1381383519.23.0.522085042526.issue19005@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- components: +Documentation -Interpreter Core type: crash -> versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 07:39:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 10 Oct 2013 05:39:25 +0000 Subject: [issue19005] PyIter_Next crashes if passed a non-iterator In-Reply-To: <1378894942.16.0.763585748614.issue19005@psf.upfronthosting.co.za> Message-ID: <3cwLhX3VKFz7LlT@mail.python.org> Roundup Robot added the comment: New changeset 0820e8394d96 by Raymond Hettinger in branch '2.7': Issue #19005: Fix documentation for PyIter_Next(). http://hg.python.org/cpython/rev/0820e8394d96 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 07:43:40 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 10 Oct 2013 05:43:40 +0000 Subject: [issue19005] PyIter_Next crashes if passed a non-iterator In-Reply-To: <1378894942.16.0.763585748614.issue19005@psf.upfronthosting.co.za> Message-ID: <3cwLnR4wX6zQV5@mail.python.org> Roundup Robot added the comment: New changeset 249ba942a6d4 by Raymond Hettinger in branch '3.3': Issue #19005: Fix documentation for PyIter_Next(). http://hg.python.org/cpython/rev/249ba942a6d4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 07:44:08 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 10 Oct 2013 05:44:08 +0000 Subject: [issue19005] PyIter_Next crashes if passed a non-iterator In-Reply-To: <1378894942.16.0.763585748614.issue19005@psf.upfronthosting.co.za> Message-ID: <1381383848.28.0.325911212354.issue19005@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 07:48:15 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 10 Oct 2013 05:48:15 +0000 Subject: [issue18577] lru_cache enhancement: lru_timestamp helper function In-Reply-To: <1375014771.52.0.855210720887.issue18577@psf.upfronthosting.co.za> Message-ID: <1381384095.95.0.806828076015.issue18577@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Please publish this outside the standard library so it can mature and get user feedback. I think it would be premature to add it right now. The subject of cache entry invalidation or expiration is broad. I'm not sure this is the best way to do it. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 08:29:42 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 10 Oct 2013 06:29:42 +0000 Subject: [issue9548] locale can be imported at startup but relies on too many library modules In-Reply-To: <1281380971.62.0.695264636628.issue9548@psf.upfronthosting.co.za> Message-ID: <1381386582.06.0.47975450945.issue9548@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 This seems like a reasonable solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 09:43:57 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2013 07:43:57 +0000 Subject: [issue19201] lzma and 'x' mode open In-Reply-To: <1381282314.82.0.620935912444.issue19201@psf.upfronthosting.co.za> Message-ID: <1381391037.51.0.795385935588.issue19201@psf.upfronthosting.co.za> STINNER Victor added the comment: > Being strict this would be 3.4 material, Why? The patch is trivial, I don't how it could cause a regression. If you don't want regression, add a unit test to test_lzma.py. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 09:47:05 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 10 Oct 2013 07:47:05 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <3cwPWr59ZYz7LlN@mail.python.org> Roundup Robot added the comment: New changeset 63a1ee94b3ed by Raymond Hettinger in branch 'default': Issue #15805: Add contextlib.redirect_stdout() http://hg.python.org/cpython/rev/63a1ee94b3ed ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 09:47:39 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 10 Oct 2013 07:47:39 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1381391259.39.0.843631728737.issue15805@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 09:58:25 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2013 07:58:25 +0000 Subject: [issue9548] locale can be imported at startup but relies on too many library modules In-Reply-To: <1281380971.62.0.695264636628.issue9548@psf.upfronthosting.co.za> Message-ID: <1381391905.39.0.927277578166.issue9548@psf.upfronthosting.co.za> STINNER Victor added the comment: The io module doesn't need to set temporarly the LC_CTYPE locale (which is a good thing because the change is process-wide!). If we ignore systems where CODESET is not available, the _bootlocale can be simplified to a few lines: if sys.platform.startswith("win"): def getpreferredencoding(): import _locale return _locale._getdefaultlocale()[1] else: def getpreferredencoding(): result = nl_langinfo(CODESET) if not result and sys.platform == 'darwin': result = 'UTF-8' return result This code can probably be implemented in C, directly in the _locale module. Would it be acceptable to modify the io module to replace locale.getpreferredencoding(False) with _locale.getpreferredencoding(False)? Does anyone know if Python does still support systems where CODESET is not available? Which OS does not support CODESET? Would it be acceptable to fallback to locale.py if CODESET is not available? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 10:04:24 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 10 Oct 2013 08:04:24 +0000 Subject: [issue15329] clarify which deque methods are thread-safe In-Reply-To: <1342044644.52.0.376014623438.issue15329@psf.upfronthosting.co.za> Message-ID: <1381392264.49.0.651682697503.issue15329@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > So, is deque a faster replacement for Queue.Queue or not? Yes, it is faster. The Queue module itself uses the deque internally. And the Queue is slowed down a bit through locks, function indirection, and additional features such as maxsize, join, and task_done. The deque's append(), appendleft(), pop(), popleft(), and len(d) operations are thread-safe in CPython. The append methods have a DECREF at the end (for cases where maxlen has been set), but this happens after all of the structure updates have been made and the invariants have been restored, so it is okay to treat these operations as atomic. Closing this tracker item. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 10:09:22 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2013 08:09:22 +0000 Subject: [issue19209] Remove import copyreg from os module In-Reply-To: <1381328480.57.0.127685895203.issue19209@psf.upfronthosting.co.za> Message-ID: <1381392562.72.0.908170886531.issue19209@psf.upfronthosting.co.za> STINNER Victor added the comment: > Can't we modify the qualified name instead? Attached os_stat_statvfs_pickle.patch implements this idea. IMO it's much simpler because it removes completly the need of the copyreg module. Example with the patch on Linux: $ ./python Python 3.4.0a3+ (default:63a1ee94b3ed+, Oct 10 2013, 10:03:45) >>> import os, pickletools, pickle >>> s=os.stat('.') >>> pickletools.dis(pickle.dumps(s)) 0: \x80 PROTO 3 2: c GLOBAL 'os stat_result' ... >>> pickle.loads(pickle.dumps(s)) os.stat_result(st_mode=16893, st_ino=19792207, st_dev=64772, st_nlink=17, st_uid=1000, st_gid=1000, st_size=28672, st_atime=1381392226, st_mtime=1381392226, st_ctime=1381392226) >>> >>> v=os.statvfs('.') >>> pickletools.dis(pickle.dumps(v)) 0: \x80 PROTO 3 2: c GLOBAL 'os statvfs_result' ... >>> pickle.loads(pickle.dumps(v)) os.statvfs_result(f_bsize=4096, f_frsize=4096, f_blocks=125958458, f_bfree=124095595, f_bavail=117695595, f_files=32006144, f_ffree=31792079, f_favail=31792079, f_flag=4096, f_namemax=255) ---------- Added file: http://bugs.python.org/file32026/os_stat_statvfs_pickle.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 10:14:15 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2013 08:14:15 +0000 Subject: [issue19206] Support disabling file I/O when doing traceback formatting In-Reply-To: <1381324623.16.0.375897659555.issue19206@psf.upfronthosting.co.za> Message-ID: <1381392855.42.0.913399307817.issue19206@psf.upfronthosting.co.za> STINNER Victor added the comment: > Unfortunately, the traceback.py module reads from files to load the source lines for the traceback (using linecache.py). linecache is supposed to cache the result. When all files generating tracebacks of your project are cached, only os.stat() is called on each file to check if the file has been modified. But I'm not sure I understood your request: do you want the line content in your traceback or not? If you don't want the line content, the traceback module should be modified to add an option "don't read file content". ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 10:30:26 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2013 08:30:26 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <1381393826.56.0.626717830803.issue12892@psf.upfronthosting.co.za> STINNER Victor added the comment: I tested utf_16_32_surrogates_4.patch: surrogateescape with as encoder does not work as expected. >>> b'[\x00\x80\xdc]\x00'.decode('utf-16-le', 'ignore') '[]' >>> b'[\x00\x80\xdc]\x00'.decode('utf-16-le', 'replace') '[?]' >>> b'[\x00\x80\xdc]\x00'.decode('utf-16-le', 'surrogateescape') '[\udc80\udcdc\uffff' => I expected '[\udc80\udcdc]'. With a decoder, surrogateescape does not work neither: >>> '[\uDC80]'.encode('utf-16-le', 'surrogateescape') Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'utf-16-le' codec can't encode character '\udc80' in position 1: surrogates not allowed Using the PEP 383, I expect that data.decode(encoding, 'surrogateescape') does never fail, data.decode(encoding, 'surrogateescape').encode(encoding, 'surrogateescape') should give data. -- With UTF-16, there is a corner case: >>> b'[\x00\x00'.decode('utf-16-le', 'surrogateescape') Traceback (most recent call last): File "", line 1, in File "/home/haypo/prog/python/default/Lib/encodings/utf_16_le.py", line 16, in decode return codecs.utf_16_le_decode(input, errors, True) UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x00 in position 2: truncated data >>> b'[\x00\x80'.decode('utf-16-le', 'surrogateescape') '[\udc80' The incomplete sequence b'\x00' raises a decoder error, wheras b'\x80' does not. Should we extend the PEP 383 to bytes in range [0; 127]? Or should we keep this behaviour? Sorry, this question is unrelated to this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 10:36:07 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 10 Oct 2013 08:36:07 +0000 Subject: [issue15329] clarify which deque methods are thread-safe In-Reply-To: <1342044644.52.0.376014623438.issue15329@psf.upfronthosting.co.za> Message-ID: <1381394167.7.0.892964541826.issue15329@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 10:44:00 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 10 Oct 2013 08:44:00 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1381394640.57.0.243158062383.issue15805@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Nice. My only complain is the dis.dis example. We don't have to use redirect_stdout context manager. + # How to capture disassembly to a string + + import dis + import io + + f = io.StringIO() + with redirect_stdout(f): + dis.dis('x**2 - y**2') + s = f.getvalue() dis.dis supports file object natively. We can do this instead: dis.dis('x**2 - y**2', file=f) ---------- nosy: +vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 10:50:37 2013 From: report at bugs.python.org (Andreas Hilboll) Date: Thu, 10 Oct 2013 08:50:37 +0000 Subject: [issue19214] shutil.make_archive should recognize extensions in filenames Message-ID: <1381395037.28.0.850005234621.issue19214@psf.upfronthosting.co.za> New submission from Andreas Hilboll: shutil.make_archive should be able to automatically determine the desired *format* from the given filename. It would make life easier, because the programmer wouldn't need to strip the extension from the filename before passing it to make_archive. I'm think of something along the lines of if base_path.lower().endswith(".zip"): fmt = "zip" base_path = base_path[:-4] elif base_path.lower().endswith(".tar.gz") or base_path.lower().endswith(".tgz"): fmt = "gztar" base_path = base_path[:-7] elif base_path.lower().endswith(".tar.bz2"): fmt = "bztar" base_path = base_path[:-8] elif base_path.lower().endswith(".tar"): fmt = "tar" base_path = base_path[:-4] ---------- messages: 199373 nosy: andreas-h priority: normal severity: normal status: open title: shutil.make_archive should recognize extensions in filenames type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 11:04:17 2013 From: report at bugs.python.org (Stephen Tucker) Date: Thu, 10 Oct 2013 09:04:17 +0000 Subject: [issue19210] Unicode Objects in Tuples In-Reply-To: <1381338621.35.0.274685840116.issue19210@psf.upfronthosting.co.za> Message-ID: Stephen Tucker added the comment: Dear All (Eric Smith in particular), I see the issue has been closed - I guess that I have to use e-mail to continue this discussion. I attach a source file that demonstrates the "feature", and the output from IDLE that it generated. Yours, Stephen Tucker. On Wed, Oct 9, 2013 at 6:10 PM, Eric V. Smith wrote: > > Eric V. Smith added the comment: > > Can you provide some code which demonstrates this? > > It's easier to address this if we have known working (or non-working) > examples. > > Thanks. > > ---------- > nosy: +eric.smith > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file32027/UnicodeTupleTestIDLEOutput.txt Added file: http://bugs.python.org/file32028/UnicodeTupleTest.py _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> import UnicodeTupleTest ? ? (u'\u2021',) (u'\u2021', u'\u2021') >>> -------------- next part -------------- # # Set a unicode string with a non-ASCII character mystring = u'\u2021' # # Print the string print mystring # # Print the string enclosed in parentheses print (mystring) # # Print the string as the first item in a tuple whose second item is None print (mystring,) # # Set a tuple consisting of two instances of this string mytuple = (mystring, mystring) # # Print the tuple print mytuple From report at bugs.python.org Thu Oct 10 11:15:25 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2013 09:15:25 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <1381396525.08.0.570337136226.issue12892@psf.upfronthosting.co.za> STINNER Victor added the comment: > Could you please review this not so simple patch instead? I did a first review of your code on rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 11:57:59 2013 From: report at bugs.python.org (=?utf-8?q?Zden=C4=9Bk_Pavlas?=) Date: Thu, 10 Oct 2013 09:57:59 +0000 Subject: [issue19215] StringIO.StringIO('foo').readline(0) == 'foo' Message-ID: <1381399079.81.0.443745839975.issue19215@psf.upfronthosting.co.za> New submission from Zden?k Pavlas: The behavior contradicts documentation and is inconsistent with both cStringIO and File objects. Patch attached. >>> StringIO.StringIO('foo').readline(0) 'foo' >>> cStringIO.StringIO('foo').readline(0) '' >>> open('/etc/passwd').readline(0) '' ---------- components: Library (Lib) files: stringio.patch keywords: patch messages: 199376 nosy: Zden?k.Pavlas priority: normal severity: normal status: open title: StringIO.StringIO('foo').readline(0) == 'foo' type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file32029/stringio.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 12:31:45 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 10 Oct 2013 10:31:45 +0000 Subject: [issue19201] lzma and 'x' mode open In-Reply-To: <1381282314.82.0.620935912444.issue19201@psf.upfronthosting.co.za> Message-ID: <1381401105.97.0.280541558417.issue19201@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Here is the unit test for Tim Heaney's work. There is a test that explicitly tests that we get error when opening in 'x' mode. Also, this test is only for lzma. I think we should create separate tickets for other compression methods. ---------- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file32030/add_x_mode_to_lzma.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 12:33:14 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 10 Oct 2013 10:33:14 +0000 Subject: [issue19201] lzma and 'x' mode open In-Reply-To: <1381282314.82.0.620935912444.issue19201@psf.upfronthosting.co.za> Message-ID: <1381401194.15.0.0265349529204.issue19201@psf.upfronthosting.co.za> Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file32030/add_x_mode_to_lzma.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 12:33:29 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 10 Oct 2013 10:33:29 +0000 Subject: [issue19201] lzma and 'x' mode open In-Reply-To: <1381282314.82.0.620935912444.issue19201@psf.upfronthosting.co.za> Message-ID: <1381401209.04.0.796841083501.issue19201@psf.upfronthosting.co.za> Changes by Vajrasky Kok : Added file: http://bugs.python.org/file32031/add_x_mode_to_lzma.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 13:20:50 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 10 Oct 2013 11:20:50 +0000 Subject: [issue19216] stat cache for import bootstrap Message-ID: <1381404050.43.0.806301244574.issue19216@psf.upfronthosting.co.za> New submission from Christian Heimes: The import library uses excessive stat() calls. I've implemented a simple cache for the bootstrap module that reduces the amount of stat() calls by almost 1/3 (236 -> 159 on Linux). ---------- assignee: brett.cannon files: import_stat_cache.patch keywords: patch messages: 199378 nosy: brett.cannon, christian.heimes priority: normal severity: normal stage: patch review status: open title: stat cache for import bootstrap type: performance versions: Python 3.4 Added file: http://bugs.python.org/file32032/import_stat_cache.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 13:21:28 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 10 Oct 2013 11:21:28 +0000 Subject: [issue19210] Unicode Objects in Tuples In-Reply-To: <1381336761.68.0.499147739849.issue19210@psf.upfronthosting.co.za> Message-ID: <1381404088.39.0.312016903757.issue19210@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Stephen: do you agree that your example actually doesn't demonstrate the issue you originally reported? Your first to print statements don't actually print a tuple, whereas the latter two do, and the string gets always escaped in the tuple, and never when printed directly. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 13:29:42 2013 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 10 Oct 2013 11:29:42 +0000 Subject: [issue19210] Unicode Objects in Tuples In-Reply-To: <1381336761.68.0.499147739849.issue19210@psf.upfronthosting.co.za> Message-ID: <1381404582.43.0.0703034935047.issue19210@psf.upfronthosting.co.za> Eric V. Smith added the comment: As Martin points out, your first example is printing a string, not a tuple. The parens here are not building a tuple, they are just used for grouping in the expression, and are not doing anything in this example. So my explanation still holds: everything is working as designed. The output of the first two print statements uses str(astring), the second two use str(atuple). repr of a tuple is effectively: "(" + ", ".join(repr(item) for item in tuple) + ")" So when printing your tuples, Python is using the repr of each string in the tuple. Since this is not a bug or feature request, it's probably best to continue the discussion on python-list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 13:40:48 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 10 Oct 2013 11:40:48 +0000 Subject: [issue19215] StringIO.StringIO('foo').readline(0) == 'foo' In-Reply-To: <1381399079.81.0.443745839975.issue19215@psf.upfronthosting.co.za> Message-ID: <1381405248.91.0.185849729425.issue19215@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 13:40:54 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 10 Oct 2013 11:40:54 +0000 Subject: [issue16938] pydoc confused by __dir__ In-Reply-To: <1357944129.98.0.501949279766.issue16938@psf.upfronthosting.co.za> Message-ID: <1381405254.94.0.224837375017.issue16938@psf.upfronthosting.co.za> Ronald Oussoren added the comment: A problem with __objclass__ is that it is undocumented other than in PEP 252. That why I called it a workaround, at the time I created this issue I had just found the problem and workaround and as far as I knew __objclass__ was an undocumented feature of CPython that just happened to fix my problem. If using __objclass__ is the right solution, as it seems to be, this should be documented somewhere, probably in the section on descriptors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 13:44:12 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 10 Oct 2013 11:44:12 +0000 Subject: [issue19215] StringIO.StringIO('foo').readline(0) == 'foo' In-Reply-To: <1381399079.81.0.443745839975.issue19215@psf.upfronthosting.co.za> Message-ID: <1381405452.1.0.983310341393.issue19215@psf.upfronthosting.co.za> R. David Murray added the comment: Oops, I was too quick with that nosy. This bug is fixed in io.StringIO, which means it is fixed in Python3. And sorry to say, it shouldn't be fixed in a maintenance release, since it is a behavior change that could break working programs. ---------- nosy: +r.david.murray resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 13:49:01 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 10 Oct 2013 11:49:01 +0000 Subject: [issue19216] stat cache for import bootstrap In-Reply-To: <1381404050.43.0.806301244574.issue19216@psf.upfronthosting.co.za> Message-ID: <1381405741.49.0.602034431162.issue19216@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 15:04:46 2013 From: report at bugs.python.org (Jacek Bzdak) Date: Thu, 10 Oct 2013 13:04:46 +0000 Subject: [issue19217] Calling assertEquals for moderately long list takes too long Message-ID: <1381410286.72.0.514206486634.issue19217@psf.upfronthosting.co.za> New submission from Jacek Bzdak: Call to assertEquals(list1, list2) does not finish (takes more than couple of minutes), for lists that containt 10000 elements if all list elements are different. The same call in python2.6 finishes instanteneously. This occours even if error message is truncated using maxDiff. ---------- components: Library (Lib) files: unittest_scse.py messages: 199383 nosy: Jacek.Bzdak priority: normal severity: normal status: open title: Calling assertEquals for moderately long list takes too long type: resource usage versions: Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file32033/unittest_scse.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 15:05:33 2013 From: report at bugs.python.org (Jacek Bzdak) Date: Thu, 10 Oct 2013 13:05:33 +0000 Subject: [issue19217] Calling assertEquals for moderately long list takes too long In-Reply-To: <1381410286.72.0.514206486634.issue19217@psf.upfronthosting.co.za> Message-ID: <1381410333.09.0.319274359774.issue19217@psf.upfronthosting.co.za> Jacek Bzdak added the comment: I have attached a simple test case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 15:05:42 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 10 Oct 2013 13:05:42 +0000 Subject: [issue19216] stat cache for import bootstrap In-Reply-To: <1381404050.43.0.806301244574.issue19216@psf.upfronthosting.co.za> Message-ID: <1381410342.45.0.28473668151.issue19216@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 15:29:28 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 10 Oct 2013 13:29:28 +0000 Subject: [issue19217] Calling assertEquals for moderately long list takes too long In-Reply-To: <1381410286.72.0.514206486634.issue19217@psf.upfronthosting.co.za> Message-ID: <1381411768.38.0.969733039558.issue19217@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, michael.foord stage: -> needs patch versions: +Python 3.4 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 15:34:50 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2013 13:34:50 +0000 Subject: [issue19216] stat cache for import bootstrap In-Reply-To: <1381404050.43.0.806301244574.issue19216@psf.upfronthosting.co.za> Message-ID: <1381412090.45.0.678304876727.issue19216@psf.upfronthosting.co.za> STINNER Victor added the comment: See also #14604. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 15:36:22 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 10 Oct 2013 13:36:22 +0000 Subject: [issue14604] spurious stat() calls in importlib In-Reply-To: <1334663931.89.0.459058246046.issue14604@psf.upfronthosting.co.za> Message-ID: <1381412182.74.0.756766230698.issue14604@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 16:02:08 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 10 Oct 2013 14:02:08 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <3cwYrZ5Fz4z7LjN@mail.python.org> Roundup Robot added the comment: New changeset bea4447c22bf by Victor Stinner in branch 'default': Issue #18874: PyCode_New() now ensures that the filename is a ready Unicode http://hg.python.org/cpython/rev/bea4447c22bf New changeset ba27cba3ae20 by Victor Stinner in branch 'default': Issue #18874: _PyObject_Malloc/Realloc/Free() now falls back on http://hg.python.org/cpython/rev/ba27cba3ae20 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 16:07:25 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 10 Oct 2013 14:07:25 +0000 Subject: [issue19216] stat cache for import bootstrap In-Reply-To: <1381404050.43.0.806301244574.issue19216@psf.upfronthosting.co.za> Message-ID: <1381414045.04.0.354294046145.issue19216@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Benchmarks? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 16:19:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 10 Oct 2013 14:19:38 +0000 Subject: [issue16742] PyOS_Readline drops GIL and calls PyOS_StdioReadline, which isn't thread safe In-Reply-To: <1356086390.48.0.327620937355.issue16742@psf.upfronthosting.co.za> Message-ID: <3cwZDp06BjzPPX@mail.python.org> Roundup Robot added the comment: New changeset 98dbe677dfe7 by Victor Stinner in branch 'default': Close #16742: Fix misuse of memory allocations in PyOS_Readline() http://hg.python.org/cpython/rev/98dbe677dfe7 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 16:30:27 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 10 Oct 2013 14:30:27 +0000 Subject: [issue19217] Calling assertEquals for moderately long list takes too long In-Reply-To: <1381410286.72.0.514206486634.issue19217@psf.upfronthosting.co.za> Message-ID: <1381415427.95.0.928623460409.issue19217@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 16:35:26 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 10 Oct 2013 14:35:26 +0000 Subject: [issue18999] Robustness issues in multiprocessing.{get, set}_start_method In-Reply-To: <1378824821.26.0.31883015251.issue18999@psf.upfronthosting.co.za> Message-ID: <1381415726.16.0.542136741912.issue18999@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Attached is a patch which allows the use of separate contexts. For example try: ctx = multiprocessing.get_context('forkserver') except ValueError: ctx = multiprocessing.get_context('spawn') q = ctx.Queue() p = ctx.Process(target=foo, args=(q,)) p.start() ... Also, get_start_method(allow_none=True) will return None if the start method has not yet been fixed. ---------- Added file: http://bugs.python.org/file32034/context.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 16:44:47 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 10 Oct 2013 14:44:47 +0000 Subject: [issue18999] Robustness issues in multiprocessing.{get, set}_start_method In-Reply-To: <1378824821.26.0.31883015251.issue18999@psf.upfronthosting.co.za> Message-ID: <1381416287.56.0.285010234127.issue18999@psf.upfronthosting.co.za> Richard Oudkerk added the comment: BTW, the context objects are singletons. I could not see a sensible way to make ctx.Process be a picklable class (rather than a method) if there can be multiple instances of a context type. This means that the helper processes survive until the program closes down. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 17:01:03 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 10 Oct 2013 15:01:03 +0000 Subject: [issue19192] Move test_current_time from test_xmlrpc_net to test_xmlrpc In-Reply-To: <1381249571.28.0.993585174787.issue19192@psf.upfronthosting.co.za> Message-ID: <1381417263.28.0.28091992907.issue19192@psf.upfronthosting.co.za> R. David Murray added the comment: Added some review comments. Summary: I think we should just make it a dotted attribute test, and forget about the 'time' thing, which was just used because that's what the available network test used. (I find it odd that allow_dotted_names does not appear to be tested at all.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 17:17:05 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 10 Oct 2013 15:17:05 +0000 Subject: [issue18764] The pdb print command prints repr instead of str in python3 In-Reply-To: <1376694990.04.0.946395407142.issue18764@psf.upfronthosting.co.za> Message-ID: <1381418225.28.0.16552683647.issue18764@psf.upfronthosting.co.za> R. David Murray added the comment: It occurs to me, looking at the docs, that there are doc changes also required for this patch. And given that there are doc changes, this clearly can't be treated as a bug fix. If there is no objection to fixing it in 3.4, though, I'd like to do that in the next few days. This is not normally the kind of change that I'd advocate for, since it does break backward compatibility, but in this case I think the benefits outweigh the possible problems, since there are probably very few people who script pdb sessions. ---------- versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 17:25:57 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 10 Oct 2013 15:25:57 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1381418757.78.0.913632047742.issue19063@psf.upfronthosting.co.za> R. David Murray added the comment: There is definitely a bug in set_payload here, and (obviously :) no test for that case (passing an 8bit charset to set_payload). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 17:52:26 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 10 Oct 2013 15:52:26 +0000 Subject: [issue19192] Move test_current_time from test_xmlrpc_net to test_xmlrpc In-Reply-To: <1381249571.28.0.993585174787.issue19192@psf.upfronthosting.co.za> Message-ID: <1381420346.9.0.136070151642.issue19192@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Attached the second version patch to address R. David Murray's concerns. 1. test_dotted_attribute name has been taken, so I use test_instance_with_allow_dotted_names name. Or should I use test_instance_with_dotted_attribute name? Or maybe test_allow_dotted_names name? 2. There is no test testing allow_dotted_name feature with fail case. I did consider to chuck the test in this ticket. But one xmlrpc server can only register one instance, meaning I have to create a separate server for this test. Currently we have two: http_server and http_multi_server. I don't think it's a good idea to chuck the fail case to http_multi_server. 3. Okay, I removed the checking datetime test. Thanks. ---------- Added file: http://bugs.python.org/file32035/move_current_time_test_from_xmlrpc_net_to_xmlrpc_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 17:57:21 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 10 Oct 2013 15:57:21 +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: <1381420641.89.0.59474474679.issue16355@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Only doc fix? What about unit test confirming that getcomments and getsource return None if inspect can not find the source code? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 18:10:45 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 10 Oct 2013 16:10:45 +0000 Subject: [issue18764] The pdb print command prints repr instead of str in python3 In-Reply-To: <1376694990.04.0.946395407142.issue18764@psf.upfronthosting.co.za> Message-ID: <1381421445.76.0.477279011404.issue18764@psf.upfronthosting.co.za> Eric Snow added the comment: Though I can't speak regarding the patch, your justification for breaking backward compatibility seems good enough to me (but I may not be the best judge :). However, backward compatibility is a funny thing. I've spent not insignificant time thinking about it with regards to the import system and PEP 451 particularly. The problem is that, while there may not be much code using a feature now, there may be people that start to use it later under an earlier system Python (e.g. 3.2 or 3.3). Then when their system upgrades Python to 3.4 their code breaks. So a backward incompatible change can have a more adverse impact than is measurable right now. That's a subtle but significant reason behind our aversion to breaking backward compatibility, I've come to realize. Of course, doing so is still an option if the benefit outweighs the risk/cost. It sounds like you are comfortable with the risk here, and I trust your judgement. :) ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 18:14:22 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 10 Oct 2013 16:14:22 +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: <1381421662.38.0.817824836812.issue16355@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, good point, those tests should definitely be added, which means the test work doesn't go to waste :) Note, however, that getsource *does* raise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 18:45:01 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 10 Oct 2013 16:45:01 +0000 Subject: [issue18764] The pdb print command prints repr instead of str in python3 In-Reply-To: <1376694990.04.0.946395407142.issue18764@psf.upfronthosting.co.za> Message-ID: <1381423501.34.0.691582613704.issue18764@psf.upfronthosting.co.za> R. David Murray added the comment: Well, I'm not certain, to tell you the truth. However, the only non-backward-incompatible change that will work is to introduce a new command that gives one access to the "real" print function, and that to me feels really really ugly and, if I may be somewhat hyperbolic, undignified. In other words, I am willing to break this particular "feature" in a feature release as the price of restoring pdb's consistency with the python language and the history of the changes between python2 and python3...because it is primarily a UI change and not a change that affects programs (in the general case, at least). It shouldn't depend on only my view though. If Georg doesn't want to decide, we should put it out to python-dev. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 18:49:18 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 10 Oct 2013 16:49:18 +0000 Subject: [issue18764] The pdb print command prints repr instead of str in python3 In-Reply-To: <1376694990.04.0.946395407142.issue18764@psf.upfronthosting.co.za> Message-ID: <1381423758.86.0.375306283001.issue18764@psf.upfronthosting.co.za> Eric Snow added the comment: Sounds good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 18:50:31 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 10 Oct 2013 16:50:31 +0000 Subject: [issue19216] stat cache for import bootstrap In-Reply-To: <1381404050.43.0.806301244574.issue19216@psf.upfronthosting.co.za> Message-ID: <1381423831.56.0.958797916673.issue19216@psf.upfronthosting.co.za> Brett Cannon added the comment: A cursory look at the patch suggests that the cache use is permanent and so any dynamic changes to a file or directory after an initial caching will not be picked up. Did you run the test suite with this patch as it should have failed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 19:54:04 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 10 Oct 2013 17:54:04 +0000 Subject: [issue19216] stat cache for import bootstrap In-Reply-To: <1381404050.43.0.806301244574.issue19216@psf.upfronthosting.co.za> Message-ID: <1381427644.74.0.04510099295.issue19216@psf.upfronthosting.co.za> Christian Heimes added the comment: Is the content of the bootstrap module used after the interpreter is boot strapped? I see ... that's a problem. It's a proof of concept anyway and the speed up is minimal. On my computer with a SSD the speedup barely measurable. I'd like to see if it makes a difference on a Raspbarry Pi or a NFS shares I have another idea, too. Could we add an optional 'stat' argument to __init__() of FileLoader and ExtensionFileLoader so we can pass the stat object around and reuse it for loading? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 20:08:01 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 10 Oct 2013 18:08:01 +0000 Subject: [issue19218] Use of MutableMapping in os module slows down interpreter startup Message-ID: <1381428481.39.0.771776860266.issue19218@psf.upfronthosting.co.za> New submission from Eric Snow: There has been some discussion on python-dev about improving interpreter startup time. Christian Heimes brought up how the os module imports collections (so _Environ can inherit from it) [1], and mentioned a couple of solutions [2]. [1]https://mail.python.org/pipermail/python-dev/2013-October/129312.html [2]https://mail.python.org/pipermail/python-dev/2013-October/129367.html ---------- components: Library (Lib) messages: 199402 nosy: christian.heimes, eric.snow priority: normal severity: normal stage: needs patch status: open title: Use of MutableMapping in os module slows down interpreter startup type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 20:33:53 2013 From: report at bugs.python.org (Georg Brandl) Date: Thu, 10 Oct 2013 18:33:53 +0000 Subject: [issue18764] The pdb print command prints repr instead of str in python3 In-Reply-To: <1376694990.04.0.946395407142.issue18764@psf.upfronthosting.co.za> Message-ID: <1381430033.43.0.294570563943.issue18764@psf.upfronthosting.co.za> Georg Brandl added the comment: patch looks good for 3.4; I probably didn't realize that "p" uses repr when I added "print". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 20:35:14 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 10 Oct 2013 18:35:14 +0000 Subject: [issue19218] Use of MutableMapping in os module slows down interpreter startup In-Reply-To: <1381428481.39.0.771776860266.issue19218@psf.upfronthosting.co.za> Message-ID: <1381430114.97.0.0247147144476.issue19218@psf.upfronthosting.co.za> Eric Snow added the comment: Here is a patch for an alternate approach. It does not require re-implementing MutableMapping (could get out of sync) and does not require rearranging collections.abc. Instead it uses a metaclass to resolve the import issue lazily. ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file32036/os-lazy-collections.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 20:39:24 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 10 Oct 2013 18:39:24 +0000 Subject: [issue19218] Use of MutableMapping in os module slows down interpreter startup In-Reply-To: <1381428481.39.0.771776860266.issue19218@psf.upfronthosting.co.za> Message-ID: <1381430364.66.0.816695952202.issue19218@psf.upfronthosting.co.za> Christian Heimes added the comment: Nice trick :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 20:45:53 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 10 Oct 2013 18:45:53 +0000 Subject: [issue19218] Use of MutableMapping in os module slows down interpreter startup In-Reply-To: <1381428481.39.0.771776860266.issue19218@psf.upfronthosting.co.za> Message-ID: <1381430753.5.0.893364357419.issue19218@psf.upfronthosting.co.za> Eric Snow added the comment: And when the lazy base class gets resolved, the metaclass gets to say "You didn't see anything and I was never here." :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 20:47:53 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 10 Oct 2013 18:47:53 +0000 Subject: [issue19218] Use of MutableMapping in os module slows down interpreter startup In-Reply-To: <1381428481.39.0.771776860266.issue19218@psf.upfronthosting.co.za> Message-ID: <1381430873.68.0.588928318546.issue19218@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 21:44:21 2013 From: report at bugs.python.org (Vladimir Rutsky) Date: Thu, 10 Oct 2013 19:44:21 +0000 Subject: [issue18243] mktime_tz documentation out-of-date In-Reply-To: <1371482642.16.0.49381484414.issue18243@psf.upfronthosting.co.za> Message-ID: <1381434261.27.0.619797545627.issue18243@psf.upfronthosting.co.za> Changes by Vladimir Rutsky : ---------- nosy: +rutsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 21:45:05 2013 From: report at bugs.python.org (Stephen Tucker) Date: Thu, 10 Oct 2013 19:45:05 +0000 Subject: [issue19210] Unicode Objects in Tuples In-Reply-To: <1381404582.43.0.0703034935047.issue19210@psf.upfronthosting.co.za> Message-ID: Stephen Tucker added the comment: Martin: Yes, I agree this does not demonstrate the issue I reported - so far as print is concerned. The other issue in my original report was that the same behaviour is exhibited when tuples are read from a utf-8 - encoded file where a tuple which has a unicode string in it with a non-ASCII character is displayed with its non-ASCII characters as escapes. Eric: I am in a quandary. I am not convinced that the appearance of such strings (under either circumstance) should be governed by whether they are in tuples or not. It still seems remarkably like a bug to me. However, I am happy to continue this discussion on Python-list, if you consider it better to do that. Please, can you tell me, how do I do that? On Thu, Oct 10, 2013 at 12:29 PM, Eric V. Smith wrote: > > Eric V. Smith added the comment: > > As Martin points out, your first example is printing a string, not a > tuple. The parens here are not building a tuple, they are just used for > grouping in the expression, and are not doing anything in this example. > > So my explanation still holds: everything is working as designed. The > output of the first two print statements uses str(astring), the second two > use str(atuple). > > repr of a tuple is effectively: > "(" + ", ".join(repr(item) for item in tuple) + ")" > > So when printing your tuples, Python is using the repr of each string in > the tuple. > > Since this is not a bug or feature request, it's probably best to continue > the discussion on python-list. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 21:49:12 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 10 Oct 2013 19:49:12 +0000 Subject: [issue19219] speed up marshal.loads() Message-ID: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> New submission from Antoine Pitrou: This patch contains assorted improvements for unmarshalling pyc files. It will also make them ~10% smaller. $ ./python -m timeit -s "import marshal; d=marshal.dumps(tuple((i, str(i)) for i in range(1000)))" "marshal.loads(d)" -> 3.4 unpatched: 232 usec per loop -> 3.4 patched: 96.3 usec per loop -> 2.7 (for reference): 76.5 usec per loop ---------- components: Interpreter Core files: marshal_opts4.patch keywords: patch messages: 199408 nosy: barry, christian.heimes, pitrou priority: normal severity: normal stage: patch review status: open title: speed up marshal.loads() type: performance versions: Python 3.4 Added file: http://bugs.python.org/file32037/marshal_opts4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 22:11:49 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 10 Oct 2013 20:11:49 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381435909.94.0.547401658551.issue19219@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +kristjan.jonsson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 22:13:13 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 10 Oct 2013 20:13:13 +0000 Subject: [issue19210] Unicode Objects in Tuples In-Reply-To: <1381336761.68.0.499147739849.issue19210@psf.upfronthosting.co.za> Message-ID: <1381435993.42.0.953867565303.issue19210@psf.upfronthosting.co.za> R. David Murray added the comment: python-list is a mailing list, so you would subscribe and post your questions and examples there. There are very good reasons for the existing behavior, and python-list would be a good place for you to learn about them (by asking questions). The file case is the same: you are using print to create the output, and it is print's rules that are being used to generate that output, before it ever gets written to the file. (And by the way, you are free to post to a closed issue. Having it closed just means it doesn't show up on our list of issues we need to fix :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 22:34:10 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 10 Oct 2013 20:34:10 +0000 Subject: [issue19216] stat cache for import bootstrap In-Reply-To: <1381404050.43.0.806301244574.issue19216@psf.upfronthosting.co.za> Message-ID: <1381437250.96.0.476562246014.issue19216@psf.upfronthosting.co.za> Brett Cannon added the comment: importlib/_bootstrap.py is importlib, period, so there is no separation of what is used to start Python and what is used after interpreter startup is completed. As for adding a 'stat' argument to the loaders, it's possible but as always it comes down to whether it will break someone or not. Since loaders do not necessarily execute immediately you are running the risk of a very stale cached stat object. Plus Eric Snow has his PEP where the API in terms of loader __init__ signature so you would want to look into that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 22:52:30 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Thu, 10 Oct 2013 20:52:30 +0000 Subject: [issue19220] Outdated unicodedata.__doc__ Message-ID: <1381438350.75.0.839860647652.issue19220@psf.upfronthosting.co.za> New submission from Arfrever Frehtes Taifersar Arahesis: Unicode version was updated in 3.3 and 3.4, but unicodedata.__doc__ was not updated. $ for version in 3.2 3.3 3.4; do python${version} -c 'import unicodedata; print("%s\n\"%s\"\n" % (unicodedata.unidata_version, unicodedata.__doc__))'; done 6.0.0 "This module provides access to the Unicode Character Database which defines character properties for all Unicode characters. The data in this database is based on the UnicodeData.txt file version 6.0.0 which is publically available from ftp://ftp.unicode.org/. The module uses the same names and symbols as defined by the UnicodeData File Format 6.0.0 (see http://www.unicode.org/reports/tr44/tr44-6.html)." 6.1.0 "This module provides access to the Unicode Character Database which defines character properties for all Unicode characters. The data in this database is based on the UnicodeData.txt file version 6.0.0 which is publically available from ftp://ftp.unicode.org/. The module uses the same names and symbols as defined by the UnicodeData File Format 6.0.0 (see http://www.unicode.org/reports/tr44/tr44-6.html)." 6.2.0 "This module provides access to the Unicode Character Database which defines character properties for all Unicode characters. The data in this database is based on the UnicodeData.txt file version 6.0.0 which is publically available from ftp://ftp.unicode.org/. The module uses the same names and symbols as defined by the UnicodeData File Format 6.0.0 (see http://www.unicode.org/reports/tr44/tr44-6.html)." URL for 6.1.0: http://www.unicode.org/reports/tr44/tr44-8.html URL for 6.2.0: http://www.unicode.org/reports/tr44/tr44-10.html ---------- messages: 199411 nosy: Arfrever priority: normal severity: normal status: open title: Outdated unicodedata.__doc__ versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 22:54:33 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Thu, 10 Oct 2013 20:54:33 +0000 Subject: [issue19221] Upgrade to Unicode 6.3.0 Message-ID: <1381438473.54.0.298872784227.issue19221@psf.upfronthosting.co.za> New submission from Arfrever Frehtes Taifersar Arahesis: Unicode 6.3.0 was released on 2013-09-30. Please remember to update unicodedata.__doc__. New URL for unicodedata.__doc__: http://www.unicode.org/reports/tr44/tr44-12.html ---------- messages: 199412 nosy: Arfrever priority: normal severity: normal status: open title: Upgrade to Unicode 6.3.0 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 23:11:47 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 10 Oct 2013 21:11:47 +0000 Subject: [issue19221] Upgrade to Unicode 6.3.0 In-Reply-To: <1381438473.54.0.298872784227.issue19221@psf.upfronthosting.co.za> Message-ID: <1381439507.56.0.950989103434.issue19221@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +benjamin.peterson, ezio.melotti, lemburg, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 23:14:01 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 10 Oct 2013 21:14:01 +0000 Subject: [issue19221] Upgrade to Unicode 6.3.0 In-Reply-To: <1381438473.54.0.298872784227.issue19221@psf.upfronthosting.co.za> Message-ID: <1381439641.93.0.412993748912.issue19221@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 23:14:49 2013 From: report at bugs.python.org (Piotr Dobrogost) Date: Thu, 10 Oct 2013 21:14:49 +0000 Subject: [issue12939] Add new io.FileIO using the native Windows API In-Reply-To: <1315523941.29.0.146575875409.issue12939@psf.upfronthosting.co.za> Message-ID: <1381439689.21.0.873008388859.issue12939@psf.upfronthosting.co.za> Piotr Dobrogost added the comment: I guess extracting Richard's patch to a package and placing it on PyPI would be a good move. I recalled reading this bug after I saw "Does Python IO allow opened file to be deleted/renamed on Windows?" question on Stackoverflow (http://stackoverflow.com/q/19280836/95735) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 23:24:08 2013 From: report at bugs.python.org (Connor Osborn) Date: Thu, 10 Oct 2013 21:24:08 +0000 Subject: [issue18764] The pdb print command prints repr instead of str in python3 In-Reply-To: <1376694990.04.0.946395407142.issue18764@psf.upfronthosting.co.za> Message-ID: <1381440248.56.0.594101623314.issue18764@psf.upfronthosting.co.za> Connor Osborn added the comment: Here is the documentation patch: I defaulted to the docs that were in 2.7.5, by noting that beside the p command the builtin print function could be used. I also fixed a small code sample that still used print ... syntax. ---------- Added file: http://bugs.python.org/file32038/18764-docs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 23:25:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 10 Oct 2013 21:25:31 +0000 Subject: [issue19221] Upgrade to Unicode 6.3.0 In-Reply-To: <1381438473.54.0.298872784227.issue19221@psf.upfronthosting.co.za> Message-ID: <3cwlhB4n6FzNyd@mail.python.org> Roundup Robot added the comment: New changeset 97df7404f39c by Benjamin Peterson in branch 'default': upgrade unicode db to 6.3.0 (closes #19221) http://hg.python.org/cpython/rev/97df7404f39c ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 23:32:12 2013 From: report at bugs.python.org (Tim Heaney) Date: Thu, 10 Oct 2013 21:32:12 +0000 Subject: [issue19222] gzip and 'x' mode open Message-ID: <1381440732.5.0.887732797238.issue19222@psf.upfronthosting.co.za> New submission from Tim Heaney: This is analogous to issue19201, but for gzip. Recent versions of Python have an 'x' mode for open, but gzip doesn't support it. It looks like everything is passed to builtins.open eventually, so if we just allow the 'x' option to pass through, all will be well. ---------- files: patch.gzip.py messages: 199416 nosy: oylenshpeegul priority: normal severity: normal status: open title: gzip and 'x' mode open type: enhancement versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32039/patch.gzip.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 23:34:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 10 Oct 2013 21:34:06 +0000 Subject: [issue18764] The pdb print command prints repr instead of str in python3 In-Reply-To: <1376694990.04.0.946395407142.issue18764@psf.upfronthosting.co.za> Message-ID: <3cwlt55yxVz7LjP@mail.python.org> Roundup Robot added the comment: New changeset 592579b89d8c by R David Murray in branch 'default': #18764: p(rint) -> p in pdb docs. http://hg.python.org/cpython/rev/592579b89d8c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 23:34:35 2013 From: report at bugs.python.org (Tim Heaney) Date: Thu, 10 Oct 2013 21:34:35 +0000 Subject: [issue19223] bz2 and 'x' mode open Message-ID: <1381440875.62.0.537853075258.issue19223@psf.upfronthosting.co.za> New submission from Tim Heaney: This is analogous to issue19201, but for bz2. Recent versions of Python have an 'x' mode for open, but bz2 doesn't support it. It looks like everything is passed to builtins.open eventually, so if we just allow the 'x' option to pass through, all will be well. ---------- files: patch.bz2.py messages: 199418 nosy: oylenshpeegul priority: normal severity: normal status: open title: bz2 and 'x' mode open type: enhancement versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32040/patch.bz2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 23:38:00 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 10 Oct 2013 21:38:00 +0000 Subject: [issue18764] The pdb print command prints repr instead of str in python3 In-Reply-To: <1376694990.04.0.946395407142.issue18764@psf.upfronthosting.co.za> Message-ID: <1381441080.6.0.429728391674.issue18764@psf.upfronthosting.co.za> R. David Murray added the comment: I applied the patch (with doc and test changes) in d4d886620a00, before I saw your patch. But your patch fixes the main 'p' docs, which I somehow missed, so I applied it, too. So, thanks Connor, and I think this is done. A couple notes if you are going to continue to contribute, which I hope you do: diffs from the root of the checkout are easier to apply (ideally, 'hg diff', or 'git diff' if you use the git mirror). And, please submit a contributor agreement (http://www.python.org/psf/contrib). ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 23:38:05 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Thu, 10 Oct 2013 21:38:05 +0000 Subject: [issue19220] Outdated unicodedata.__doc__ In-Reply-To: <1381438350.75.0.839860647652.issue19220@psf.upfronthosting.co.za> Message-ID: <1381441085.28.0.471446733879.issue19220@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: Issue #19221 has been fixed, but URL in unicodedata.__doc__ in default branch was not updated :( . Now it should be http://www.unicode.org/reports/tr44/tr44-12.html ---------- assignee: -> benjamin.peterson nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 23:41:03 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 10 Oct 2013 21:41:03 +0000 Subject: [issue19220] Outdated unicodedata.__doc__ In-Reply-To: <1381438350.75.0.839860647652.issue19220@psf.upfronthosting.co.za> Message-ID: <3cwm266CDXz7LjP@mail.python.org> Roundup Robot added the comment: New changeset 4e301c80f5d1 by Benjamin Peterson in branch '3.3': remove url from docstring (closes #19220) http://hg.python.org/cpython/rev/4e301c80f5d1 New changeset f38edb58fefb by Benjamin Peterson in branch 'default': merge 3.3 (#19220) http://hg.python.org/cpython/rev/f38edb58fefb ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 23:45:24 2013 From: report at bugs.python.org (Tim Heaney) Date: Thu, 10 Oct 2013 21:45:24 +0000 Subject: [issue19201] lzma and 'x' mode open In-Reply-To: <1381401105.97.0.280541558417.issue19201@psf.upfronthosting.co.za> Message-ID: Tim Heaney added the comment: Okay, I just made similar issues for gzip (issue19222) and bz2 (issue19223). It's weird how different these three patches are! We're essentially doing the same thing: "please allow the x option to pass through to builtins.open." Why don't these three modules look more alike? On Thu, Oct 10, 2013 at 6:31 AM, Vajrasky Kok wrote: > > Vajrasky Kok added the comment: > > Here is the unit test for Tim Heaney's work. There is a test that > explicitly tests that we get error when opening in 'x' mode. Also, this > test is only for lzma. I think we should create separate tickets for other > compression methods. > > ---------- > keywords: +patch > nosy: +vajrasky > Added file: http://bugs.python.org/file32030/add_x_mode_to_lzma.patch > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 23:47:39 2013 From: report at bugs.python.org (Connor Osborn) Date: Thu, 10 Oct 2013 21:47:39 +0000 Subject: [issue18764] The pdb print command prints repr instead of str in python3 In-Reply-To: <1376694990.04.0.946395407142.issue18764@psf.upfronthosting.co.za> Message-ID: <1381441659.12.0.425021999318.issue18764@psf.upfronthosting.co.za> Connor Osborn added the comment: I'm hoping to ease into more involvement. Thanks for the review and tips, and I submitted the agreement(e-sign version). ---------- nosy: -eric.snow, ezio.melotti, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 00:11:24 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 10 Oct 2013 22:11:24 +0000 Subject: [issue19216] stat cache for import bootstrap In-Reply-To: <1381404050.43.0.806301244574.issue19216@psf.upfronthosting.co.za> Message-ID: <1381443084.91.0.506031124316.issue19216@psf.upfronthosting.co.za> Eric Snow added the comment: With ModuleSpec (PEP 451), the finder creates the spec object (where it stores the loader). At that point the finder is free to store any stat object you like in spec.loader_state. The spec is made available to the loader during exec (if the loader supports it, which the importlib loaders will). So there is no need to add anything to any loader __init__. The only catch is the slim possibility that the stat object will be stale by the time it gets used. I seem to remember a case where something like this happened (related to distros building their system Python or something). ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 00:39:26 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2013 22:39:26 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381444766.24.0.713254760442.issue19219@psf.upfronthosting.co.za> STINNER Victor added the comment: Why adding ASCII strings, whereas you can add Latin1 (UCS1, U+0000-U+00FF) strings? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 00:47:17 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2013 22:47:17 +0000 Subject: [issue18754] Run Python child processes in isolated mode in the test suite? In-Reply-To: <1376660404.79.0.733501229055.issue18754@psf.upfronthosting.co.za> Message-ID: <1381445237.45.0.0645614780707.issue18754@psf.upfronthosting.co.za> STINNER Victor added the comment: @Crys: ping! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 00:50:20 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2013 22:50:20 +0000 Subject: [issue18664] occasional test_threading failure In-Reply-To: <1375741165.75.0.0273425053979.issue18664@psf.upfronthosting.co.za> Message-ID: <1381445420.14.0.804728627844.issue18664@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 00:57:33 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2013 22:57:33 +0000 Subject: [issue18281] tarfile defines stat constants In-Reply-To: <1371912078.43.0.227039082522.issue18281@psf.upfronthosting.co.za> Message-ID: <1381445853.4.0.460774615743.issue18281@psf.upfronthosting.co.za> STINNER Victor added the comment: issue18281.stoneleaf.01.patch looks good to me, please commit it! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 01:11:03 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2013 23:11:03 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351775704.44.0.517582874178.issue16381@psf.upfronthosting.co.za> Message-ID: <1381446663.51.0.495607109429.issue16381@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue is maybe a new usecase of the PEP 445. Try attached Python module fatalmalloc.c, use attached setup.py script to build it. $ python3.4 -c 'import fatalmalloc; x="x"*(50*1024*1024); print(len(x))' Traceback (most recent call last): File "", line 1, in MemoryError $ python3.4 -c 'import fatalmalloc; fatalmalloc.enable(); x="x"*(50*1024*1024)' $ echo $? 1 ---------- Added file: http://bugs.python.org/file32041/fatalmalloc.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 01:11:12 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2013 23:11:12 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351775704.44.0.517582874178.issue16381@psf.upfronthosting.co.za> Message-ID: <1381446672.83.0.582687625788.issue16381@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file32042/setup.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 01:15:58 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2013 23:15:58 +0000 Subject: [issue19046] SystemError: ..\Objects\weakrefobject.c:903: bad argument to internal function In-Reply-To: <1379574898.14.0.174335958635.issue19046@psf.upfronthosting.co.za> Message-ID: <1381446958.04.0.606932025649.issue19046@psf.upfronthosting.co.za> STINNER Victor added the comment: @ichael Herrmann: ping? Without feedback, I will close the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 02:53:46 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 11 Oct 2013 00:53:46 +0000 Subject: [issue19216] stat cache for import bootstrap In-Reply-To: <1381404050.43.0.806301244574.issue19216@psf.upfronthosting.co.za> Message-ID: <1381452826.73.0.894253711926.issue19216@psf.upfronthosting.co.za> Eric Snow added the comment: For interpreter startup, stats are not involved for builtin and frozen modules[1]. They are tied to imports that involve traversing sys.path (a.k.a. PathFinder). Most stats happen in FileFinder.find_loader. The remainder are for source (.py) files (a.k.a. SourceFileLoader). Here's a rough sketch of what typically happens currently during the import of a path-based module[2], as related to stats (and other FS access): (lines with FS access start with *) def load_module(fullname): suffixes = ['.cpython-34m.so', '.abi3.so', '.so', '.py', '.pyc'] tailname = fullname.rpartition('.')[2] for entry in sys.path: * mtime = os.stat(entry).st_mtime if mtime != cached_mtime: * cached_listdir = os.listdir(entry) if tailname in cached_listdir: basename = entry/tailname * if os.stat(basename).st_mode implies directory: # superfluous? # package? for suffix in suffixes: full_path = basename + suffix * if os.stat(full_path).st_mode implies file: if is_extension: * (full_path) elif is_sourceless: * open(full_path).read() else: load_from_source(full_path) return # ...non-package module? for suffix in suffixes: full_path = entry/tailname + suffix if tailname + suffix in cached_listdir: * if os.stat(full_path).st_mode implies file: # superfluous? if is_extension: * (full_path) elif is_sourceless: * open(full_path).read() else: load_from_source(full_path) def load_from_source(sourcepath): * st = os.stat(sourcepath) if st: * open(bytecodepath).read() else: * open(sourcepath).read() * os.stat(sourcepath).st_mode for parent in ancestor_dirs(sourcepath): * os.stat(parent).st_mode -> missing_parents for parent in missing_parents: * os.mkdir(parent) * open(tempname).write() * os.replace(tempname, bytecodepath) Obviously there are some unix-isms in there. Windows ends up not that different though. stat/FS count ------------- load_module (*per path entry*): (add 1 listdir to each if the cache is stale) not found: 1 stat non-package dir: 7 (num_suffixes + 2 stats) package (best): 4/5-9+ (3 stats, 1 read or load_from_source) package (worst): 8/9-13+ (num_suffixes + 2 stats, 1 read or load_from_source) non-package module 3/4-8+ (best): (2 stats, 1 read or load_from_source) non-package module 7/8-12+ (worst): (num_suffixes + 1 stats, 1 read or load_from_source) non-package module + dir (best): 10/11-15+ (num_suffixes + 4 stats, 1 read or load_from_source) non-package module + dir (best): 14/15-19+ (num_suffixes * 2 + 3 stats, 1 read or load_from_source) load_from_source: cached: 2 (1 stat, 1 read) uncached, no parents: 4 (2 stats, 1 write, 1 replace) uncached, no missing parents: 5+ (num_parents + 2 stats, 1 write, 1 replace) uncached, missing parents: 6+ (num_parents + 2 stats, num_missing mkdirs, 1 write, 1 replace) Highlights: * the common case is not fast (for the sake of the slight possibility that files may change between imports)--not as much an issue during interpreter startup. * up to 5 different suffixes with a separate stat for each (with extension module suffixes tried first). * the size and ordering of sys.path has a decided impact on # stats. * if a module is cached, a lot less FS access happens. * the more nested a module, the more access happen. * namespace packages don't have much impact on performance. Possible improvements: * provide an internal mechanism to turn on/off caching all stats (don't worry about staleness) and maybe expose it via a context manager/API. (not unlike what Christian put in his patch.) * at least do some temporally local caching where the risk of staleness is particularly small. * Move .py ahead of extension modules (or just behind .cpython-34m.so)? * non-packages are more common than packages (?) so look for those first (hard to make effective without breaking key import semantics). * remove 2 possibly superfluous stats? [1] Maybe we should freeze the stdlib. <0.5 wink> [2] importing a module usually involves importing the module's parent and its parent and so forth. Each of those incurs the same stat hits all over again (though usually packages have only 1 path entry to traverse). The stdlib is pretty flat (particularly among modules involved during startup) so this is less of an issue for this ticket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 03:02:39 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 11 Oct 2013 01:02:39 +0000 Subject: [issue19216] stat cache for import bootstrap In-Reply-To: <1381404050.43.0.806301244574.issue19216@psf.upfronthosting.co.za> Message-ID: <1381453359.5.0.438129706338.issue19216@psf.upfronthosting.co.za> Brett Cannon added the comment: So the 2 stat calls in the general case are superfluous, it's just a question of whether they make any performance difference. Turns out that at least on my Macbook their is no performance difference and thus not worth the cost of breaking semantics over it: http://bugs.python.org/issue18810 . As for completely turning off stat calls during interpreter startup, that would definitely buy us something, but the question is how much and how do we make it work reliably? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 03:18:50 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 11 Oct 2013 01:18:50 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1381454330.8.0.337986111276.issue3982@psf.upfronthosting.co.za> Ezio Melotti added the comment: > You can use sys.stdout.buffer.write. Note that there's no guarantee that sys.stdout.buffer exists, e.g. if sys.stdout has been replaced with a StringIO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 03:23:10 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 11 Oct 2013 01:23:10 +0000 Subject: [issue18177] Incorect quote marks in code section-headers in PDF version of docs In-Reply-To: <1370829780.84.0.0627044566719.issue18177@psf.upfronthosting.co.za> Message-ID: <1381454590.16.0.560019091229.issue18177@psf.upfronthosting.co.za> Ezio Melotti added the comment: Should this be moved to the Sphinx bug tracker? ---------- nosy: +georg.brandl status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 03:28:42 2013 From: report at bugs.python.org (Dustin Oprea) Date: Fri, 11 Oct 2013 01:28:42 +0000 Subject: [issue18233] SSLSocket.getpeercertchain() In-Reply-To: <1371415195.44.0.636993698614.issue18233@psf.upfronthosting.co.za> Message-ID: <1381454922.69.0.655158897448.issue18233@psf.upfronthosting.co.za> Dustin Oprea added the comment: I was about to submit a feature request to add exactly this. The [second] patch works like a charm. When are you going to land on a particular resolution so that it can get committed in? Dustin ---------- nosy: +dsoprea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 03:40:48 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 11 Oct 2013 01:40:48 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1381455648.99.0.979082775039.issue15805@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think this should also be added to the whatsnew. Regarding the examples, isn't it easier to say that: with redirect_stdout(sys.stderr): print('error') is equivalent to print('error', file=sys.stderr) ? I think that in most of the cases users are redirecting something that is being print()ed, and this example gets the point across (even if the "file" arg can be used for this specific case, it is not always the case if print() is called by a function). Capturing help() and especially did.dis() output don't seem to me realistic/intuitive use cases for redirect_stdout(). ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 03:46:32 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 11 Oct 2013 01:46:32 +0000 Subject: [issue19216] stat cache for import bootstrap In-Reply-To: <1381404050.43.0.806301244574.issue19216@psf.upfronthosting.co.za> Message-ID: <1381455992.71.0.00372845479393.issue19216@psf.upfronthosting.co.za> Eric Snow added the comment: I realized those two stats are not superfluous in the case that a directory name has a .py suffix or a file doesn't have any suffix. However, I expect that's pretty uncommon. Worst case, these cases cost 2 stats per path entry. In practice they cost nothing due to the dir caching we already do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 03:54:58 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 11 Oct 2013 01:54:58 +0000 Subject: [issue19216] stat cache for import bootstrap In-Reply-To: <1381404050.43.0.806301244574.issue19216@psf.upfronthosting.co.za> Message-ID: <1381456498.3.0.334806037313.issue19216@psf.upfronthosting.co.za> Eric Snow added the comment: I forgot to mention that optimizing the default composition of sys.path (from site) could help speed things up, though it might already be optimized in that regard. I also forgot to mention the idea of zipping up the stdlib. Sorry for the sidetrack. Now, back to the stat discussion... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 04:01:25 2013 From: report at bugs.python.org (Glyph Lefkowitz) Date: Fri, 11 Oct 2013 02:01:25 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1381454330.8.0.337986111276.issue3982@psf.upfronthosting.co.za> Message-ID: <4C779646-682C-4AD2-B379-37A4B3BE8157@twistedmatrix.com> Glyph Lefkowitz added the comment: Tempting as it is to reply to the comment about 'buffer' not existing, we're way off topic here. Let's please keep further comments on this bug to issues about a 'format' methods on the 'bytes' object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 06:03:41 2013 From: report at bugs.python.org (Qiangning Hong) Date: Fri, 11 Oct 2013 04:03:41 +0000 Subject: [issue19224] Make hash(None) consistent among processes Message-ID: <1381464221.0.0.181699047962.issue19224@psf.upfronthosting.co.za> New submission from Qiangning Hong: Integers, strings, and bool's hash are all consistent for processes of a same interpreter. However, hash(None) differs. $ python -c "print(hash(None))" 272931276 $ python -c "print(hash(None))" 277161420 It's wired and make difficulty for distributed systems partitioning data according hash of keys if the system wants the keys support None. This patch makes hash(None) always return 0 to resolve that problem. And it is used in DPark(Python clone of Spark, a MapReduce alike framework in Python, https://github.com/douban/dpark) to speed up portable hash (see line https://github.com/douban/dpark/blob/65a3ba857f11285667c61e2e134dacda44c13a2c/dpark/util.py#L47). davies.liu at gmail.com is the original author of this patch. All credit goes to him. ---------- messages: 199439 nosy: hongqn priority: normal severity: normal status: open title: Make hash(None) consistent among processes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 06:03:59 2013 From: report at bugs.python.org (Qiangning Hong) Date: Fri, 11 Oct 2013 04:03:59 +0000 Subject: [issue19224] Make hash(None) consistent among processes In-Reply-To: <1381464221.0.0.181699047962.issue19224@psf.upfronthosting.co.za> Message-ID: <1381464239.81.0.856609106228.issue19224@psf.upfronthosting.co.za> Changes by Qiangning Hong : ---------- keywords: +patch Added file: http://bugs.python.org/file32043/hash_of_none.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 06:11:05 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 11 Oct 2013 04:11:05 +0000 Subject: [issue19218] Use of MutableMapping in os module slows down interpreter startup In-Reply-To: <1381428481.39.0.771776860266.issue19218@psf.upfronthosting.co.za> Message-ID: <1381464665.3.0.563061347386.issue19218@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 06:39:41 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 11 Oct 2013 04:39:41 +0000 Subject: [issue19218] Use of MutableMapping in os module slows down interpreter startup In-Reply-To: <1381428481.39.0.771776860266.issue19218@psf.upfronthosting.co.za> Message-ID: <1381466381.76.0.557332773334.issue19218@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 06:51:49 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 11 Oct 2013 04:51:49 +0000 Subject: [issue19224] Make hash(None) consistent among processes In-Reply-To: <1381464221.0.0.181699047962.issue19224@psf.upfronthosting.co.za> Message-ID: <1381467109.69.0.725143931095.issue19224@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Instead of 0, pick some large random number that is less likely to collide with other hashes such as hash(0). ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 06:54:43 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 11 Oct 2013 04:54:43 +0000 Subject: [issue19217] Calling assertEquals for moderately long list takes too long In-Reply-To: <1381410286.72.0.514206486634.issue19217@psf.upfronthosting.co.za> Message-ID: <1381467283.19.0.164715453276.issue19217@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 07:06:31 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 11 Oct 2013 05:06:31 +0000 Subject: [issue19224] Make hash(None) consistent among processes In-Reply-To: <1381464221.0.0.181699047962.issue19224@psf.upfronthosting.co.za> Message-ID: <1381467991.6.0.551490763649.issue19224@psf.upfronthosting.co.za> Christian Heimes added the comment: How about >>> (78 << 24) + (111 << 16) + (110 << 8) + 101 1315925605 The output of hash() is not guaranteed to be consistent between processes. The outcome depends on the hash randomization key, architecture, platform, Python version and perhaps other flags. 32bit builds of Python generated different hash() values than 64bit. The value might depend on endianess, too. (Not sure about that) ---------- nosy: +christian.heimes stage: -> needs patch type: -> enhancement versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 07:54:35 2013 From: report at bugs.python.org (Qiangning Hong) Date: Fri, 11 Oct 2013 05:54:35 +0000 Subject: [issue19224] Make hash(None) consistent among processes In-Reply-To: <1381464221.0.0.181699047962.issue19224@psf.upfronthosting.co.za> Message-ID: <1381470875.15.0.959096280528.issue19224@psf.upfronthosting.co.za> Qiangning Hong added the comment: Return 1315925605 now :) ---------- Added file: http://bugs.python.org/file32044/hash_of_none.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 08:30:31 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 11 Oct 2013 06:30:31 +0000 Subject: [issue18233] SSLSocket.getpeercertchain() In-Reply-To: <1371415195.44.0.636993698614.issue18233@psf.upfronthosting.co.za> Message-ID: <1381473031.01.0.280248194337.issue18233@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The patch needs a test, a proper doc, and reviewing. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 09:09:17 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 11 Oct 2013 07:09:17 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1381475357.49.0.719709038775.issue3982@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 09:39:53 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 11 Oct 2013 07:39:53 +0000 Subject: [issue19201] lzma and 'x' mode open In-Reply-To: <1381282314.82.0.620935912444.issue19201@psf.upfronthosting.co.za> Message-ID: <1381477193.7.0.118825774102.issue19201@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: Is there any reason why the order of characters matters here? builtins.open() supports them in any order ("br"=="rb", "bw"=="wb", "ba"=="ab", "bx"=="xb"). ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 09:42:01 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 11 Oct 2013 07:42:01 +0000 Subject: [issue19222] gzip and 'x' mode open In-Reply-To: <1381440732.5.0.887732797238.issue19222@psf.upfronthosting.co.za> Message-ID: <1381477321.73.0.533385873006.issue19222@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 09:43:29 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 11 Oct 2013 07:43:29 +0000 Subject: [issue19223] bz2 and 'x' mode open In-Reply-To: <1381440875.62.0.537853075258.issue19223@psf.upfronthosting.co.za> Message-ID: <1381477409.81.0.402188447091.issue19223@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 09:50:09 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 11 Oct 2013 07:50:09 +0000 Subject: [issue19201] lzma and 'x' mode open In-Reply-To: <1381282314.82.0.620935912444.issue19201@psf.upfronthosting.co.za> Message-ID: <1381477809.0.0.0112473459829.issue19201@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: Also tarfile.open() could support "x" mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 11:06:33 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 11 Oct 2013 09:06:33 +0000 Subject: [issue18233] SSLSocket.getpeercertchain() In-Reply-To: <1371415195.44.0.636993698614.issue18233@psf.upfronthosting.co.za> Message-ID: <1381482393.28.0.348992291927.issue18233@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Sorry for the incorrect answer. I just noticed there was a test in the patch! Further looking at it, I notice the new function is returning a tuple. Wouldn't it be better to return a list here? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 11:09:34 2013 From: report at bugs.python.org (Dustin Oprea) Date: Fri, 11 Oct 2013 09:09:34 +0000 Subject: [issue18233] SSLSocket.getpeercertchain() In-Reply-To: <1371415195.44.0.636993698614.issue18233@psf.upfronthosting.co.za> Message-ID: <1381482574.77.0.3442203245.issue18233@psf.upfronthosting.co.za> Dustin Oprea added the comment: My two-cents is to leave it a tuple (why not?). Dustin ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 11:09:36 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 11 Oct 2013 09:09:36 +0000 Subject: [issue19224] Make hash(None) consistent among processes In-Reply-To: <1381464221.0.0.181699047962.issue19224@psf.upfronthosting.co.za> Message-ID: <1381482576.32.0.16316592263.issue19224@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Is this something we actually want to support officially? Many other types have non-repeatable hashes, e.g.: $ PYTHONHASHSEED=1 python3 -c "print(hash((lambda: 0)))" 8771754605115 $ PYTHONHASHSEED=1 python3 -c "print(hash((lambda: 0)))" 8791504743739 $ PYTHONHASHSEED=1 python3 -c "print(hash((lambda: 0)))" 8788491320379 $ PYTHONHASHSEED=1 python3 -c "print(hash((lambda: 0)))" 8792628055611 ---------- nosy: +pitrou, tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 11:11:22 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 11 Oct 2013 09:11:22 +0000 Subject: [issue19218] Use of MutableMapping in os module slows down interpreter startup In-Reply-To: <1381428481.39.0.771776860266.issue19218@psf.upfronthosting.co.za> Message-ID: <1381482682.23.0.12972808258.issue19218@psf.upfronthosting.co.za> Antoine Pitrou added the comment: -1 on such hacks. I much prefer the _abcoll approach. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 11:14:14 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2013 09:14:14 +0000 Subject: [issue19218] Use of MutableMapping in os module slows down interpreter startup In-Reply-To: <1381428481.39.0.771776860266.issue19218@psf.upfronthosting.co.za> Message-ID: <1381482854.8.0.537749919532.issue19218@psf.upfronthosting.co.za> STINNER Victor added the comment: The collections module is loaded by the io module. You removed "from collections.abc import MutableMapping" from os.py. To be useful, you have also to rewrite the whole io module to remove all references to the collections.abc module, right? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 11:15:14 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 11 Oct 2013 09:15:14 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381482914.09.0.241333065996.issue19219@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Why adding ASCII strings, whereas you can add Latin1 (UCS1, U+0000-U+00FF) > strings? Reasons: - most strings in pyc files are pure ASCII (it's like 99% in the stdlib) - unmarshalling ASCII strings is faster: you can pass 127 to PyUnicode_New without scanning for non-ASCII chars The aim here is to optimize the common cases. There is no reason to further complicate the code for rare cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 11:19:16 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2013 09:19:16 +0000 Subject: [issue19224] Make hash(None) consistent among processes In-Reply-To: <1381464221.0.0.181699047962.issue19224@psf.upfronthosting.co.za> Message-ID: <1381483155.99.0.278409079949.issue19224@psf.upfronthosting.co.za> STINNER Victor added the comment: In the same Python version, hash(None) always give me the same value. I cannot reproduced your issue on Linux, I tested Python 2.7, 3.3 and 3.4. $ python2.7 -c "print(hash(None))" 17171842026 $ python2.7 -c "print(hash(None))" 17171842026 $ python2.7 -c "print(hash(None))" 17171842026 $ python3.3 -c "print(hash(None))" 17171873465 $ python3.3 -c "print(hash(None))" 17171873465 $ python3.3 -c "print(hash(None))" 17171873465 $ python3.4 -c "print(hash(None))" 588812 $ python3.4 -c "print(hash(None))" 588812 $ python3.4 -c "print(hash(None))" 588812 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 11:20:56 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2013 09:20:56 +0000 Subject: [issue19224] Make hash(None) consistent among processes In-Reply-To: <1381464221.0.0.181699047962.issue19224@psf.upfronthosting.co.za> Message-ID: <1381483256.94.0.0382736189466.issue19224@psf.upfronthosting.co.za> STINNER Victor added the comment: "It's wired and make difficulty for distributed systems partitioning data according hash of keys if the system wants the keys support None." How you handle the randomization of hash(str)? (python2.7 -R, enabled by default in Python 3.3). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 11:27:40 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2013 09:27:40 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381482914.09.0.241333065996.issue19219@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > unmarshalling ASCII strings is faster: you can pass 127 to PyUnicode_New without scanning for non-ASCII chars Oh, I forgot this pain of the PEP 393. Don't tell me more, it's enough :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 11:43:43 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 11 Oct 2013 09:43:43 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381484623.53.0.461303636568.issue19219@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: I imagine that the test for ASCII is cheaper. It corresponds to the new compact internal unicode representation (one byte characters). This looks fine. Can you quantify where the speedup comes from? Reading the code, I see we now maintain a small internal buffer in the file object, rather than using stack allocation at the call sites. It is unclear to me how this saves memory, since the amount of memory copying should be the same. Could it be that the speedup is all due to the native 8 bit support for unicode? Have you looked at providing a special opcode for a few other magic numbers?(We have that in our own custom marshal format) Some very common values are: empty tuple 0 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 11:51:56 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 11 Oct 2013 09:51:56 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381484623.53.0.461303636568.issue19219@psf.upfronthosting.co.za> Message-ID: <1882276521.68616056.1381485110088.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > This looks fine. Can you quantify where the speedup comes from? >From all changes, but mainly the ASCII special-casing and the new buffering. > Reading the code, I see we now maintain a small internal buffer in > the file object, rather than using stack allocation at the call > sites. It is unclear to me how this saves memory, since the amount > of memory copying should be the same. No, memory copying is suppressed in many cases. > Have you looked at providing a special opcode for a few other magic > numbers?(We have that in our own custom marshal format) > Some very common values are: > empty tuple > 0 > 1 It shouldn't be useful since marshal memoizes them anyway: only the first appearance in a pyc file would benefit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 11:56:07 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 11 Oct 2013 09:56:07 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1882276521.68616056.1381485110088.JavaMail.root@zimbra10-e2.priv.proxad.net> Message-ID: <691672221.68628960.1381485360180.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > > Reading the code, I see we now maintain a small internal buffer in > > the file object, rather than using stack allocation at the call > > sites. It is unclear to me how this saves memory, since the amount > > of memory copying should be the same. > > No, memory copying is suppressed in many cases. To clarify: the import logic uses marshal.loads(), not marshal.load(). So the aim is really to speed up unmarshalling from memory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 12:02:57 2013 From: report at bugs.python.org (hiroaki itoh) Date: Fri, 11 Oct 2013 10:02:57 +0000 Subject: [issue19225] lack of PyExc_BufferError doc Message-ID: <1381485777.95.0.364414099437.issue19225@psf.upfronthosting.co.za> New submission from hiroaki itoh: http://docs.python.org/2.7/c-api/exceptions.html#standard-exceptions Python2.7 (at least 2.7.5) has PyExc_BufferError, but the document does not tell it. ---------- assignee: docs at python components: Documentation messages: 199458 nosy: docs at python, xwhhsprings priority: normal severity: normal status: open title: lack of PyExc_BufferError doc type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 12:10:18 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 11 Oct 2013 10:10:18 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381486218.23.0.329297405867.issue19219@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Right, in this case, memory copying is avoided. Regarding the memoing of 0, empty tuple, etc: Special opcode may still benefit because it takes only one byte. So, you save four bytes for each such case. I think it might be worth investigating. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 12:19:24 2013 From: report at bugs.python.org (hiroaki itoh) Date: Fri, 11 Oct 2013 10:19:24 +0000 Subject: [issue19225] lack of PyExc_BufferError doc In-Reply-To: <1381485777.95.0.364414099437.issue19225@psf.upfronthosting.co.za> Message-ID: <1381486764.0.0.620307040551.issue19225@psf.upfronthosting.co.za> hiroaki itoh added the comment: also: * GeneratorExit * StopIteration * VMSError (#ifdef __VMS) * UnboundLocalError * IndentationError * TabError * UnicodeError * UnicodeDecodeError * UnicodeEncodeError * UnicodeTranslateError * Warning; * UserWarning; * DeprecationWarning; * PendingDeprecationWarning; * SyntaxWarning; * RuntimeWarning; * FutureWarning; * ImportWarning; * UnicodeWarning; * BytesWarning; Or, erase `For completeness, here are all the variables' statement...? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 13:32:04 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 11 Oct 2013 11:32:04 +0000 Subject: [issue19210] Unicode Objects in Tuples In-Reply-To: <1381336761.68.0.499147739849.issue19210@psf.upfronthosting.co.za> Message-ID: <1381491124.81.0.988942334638.issue19210@psf.upfronthosting.co.za> Martin v. L?wis added the comment: It's at https://mail.python.org/mailman/listinfo/python-list ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 13:57:43 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Oct 2013 11:57:43 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381492663.04.0.601157666373.issue19219@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > - unmarshalling ASCII strings is faster: you can pass 127 to PyUnicode_New without scanning for non-ASCII chars You should ensure that loaded bytes are ASCII-only. Otherwise broken or malicious marshalled data will compromise you program. Decoding UTF-8 is so fast as decoding ASCII (with checks) and is almost so fast as memcpy. As for output, we could use cached UTF-8 representation of string (always exists for ASCII only strings) before calling PyUnicode_AsUTF8String(). I'm good with buffering and codes for short strings and tuples (I have not examined a code closely yet), but special casing ASCII looks not so good to me. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 13:58:48 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2013 11:58:48 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381492728.83.0.326907657479.issue19219@psf.upfronthosting.co.za> STINNER Victor added the comment: "You should ensure that loaded bytes are ASCII-only. Otherwise broken or malicious marshalled data will compromise you program." This is not new, see the red warning in marshal doc: """ Warning The marshal module is not intended to be secure against erroneous or maliciously constructed data. Never unmarshal data received from an untrusted or unauthenticated source. """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:04:34 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 11 Oct 2013 12:04:34 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381493074.68.0.971227164202.issue19219@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: We have to make two distinctions here: 1) Loading data and then running it. This is a bad idea if your data is not trusted. This is what is meant by "marshal" being unsafe. 2) Loading data and then not running it. This is perfectly fine, because marshal has _no side effects_ when loading. Only actually _running_ untrusted data is what you should be careful about. In fact, using 'marshal' as a cheap and fast pickler for builtin types is actually a good idea because it has no side effects like invoking code. (and I think the comment you refer to should be revised to make this clear) So, will simply load ASCII data that is, in fact, not ASCII data, destabilize your program in any way? Or even crash it? If that is true, then we have a problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:10:57 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2013 12:10:57 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381493457.63.0.247531243495.issue19219@psf.upfronthosting.co.za> STINNER Victor added the comment: "As for output, we could use cached UTF-8 representation of string (always exists for ASCII only strings) before calling PyUnicode_AsUTF8String()." PyUnicode_AsEncodedString(v, "utf8", "surrogatepass") is expensive. I proposed an optimization for the pickle module, Antoine finished the work: see issue #15596. It's exactly what you suggest: reuse PyUnicode_AsUTF8String(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:11:52 2013 From: report at bugs.python.org (Michael Foord) Date: Fri, 11 Oct 2013 12:11:52 +0000 Subject: [issue19217] Calling assertEquals for moderately long list takes too long In-Reply-To: <1381410286.72.0.514206486634.issue19217@psf.upfronthosting.co.za> Message-ID: <1381493512.72.0.264778311449.issue19217@psf.upfronthosting.co.za> Michael Foord added the comment: Ouch. Looking. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:13:53 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 11 Oct 2013 12:13:53 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381493074.68.0.971227164202.issue19219@psf.upfronthosting.co.za> Message-ID: <1778174014.69013295.1381493606914.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > In fact, using 'marshal' as a cheap and fast pickler for builtin types > is actually a good idea because it has no side effects like invoking > code. It's an unsupported use case. The marshal docs are quite clear: """Therefore, the Python maintainers reserve the right to modify the marshal format in backward incompatible ways should the need arise. If you?re serializing and de-serializing Python objects, use the pickle module instead [...]""" So, it's a "good idea" as long as you're willing to deal with the consequences :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:17:19 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2013 12:17:19 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381493839.47.0.233397124081.issue19219@psf.upfronthosting.co.za> STINNER Victor added the comment: marshal and pickle are unsafe, even without the patch attached to the issue. If you consider that it is an issue that should be fixed, please open a new issue. Antoine's patch doesn't make the module less secure, since it was already not secure :) Loading untrusted data and executing untrusted code is not supported by Python. Many things should be fixed to support such use case, not only the marshal module. I'm interested by the topic (I wrote the pysandbox project, which is first try), but please discuss it elsewhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:18:09 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2013 12:18:09 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381493889.96.0.0665092734301.issue19219@psf.upfronthosting.co.za> STINNER Victor added the comment: > please discuss it elsewhere. Hum, I'm not sure that this word exist, I mean: somethere else :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:19:09 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2013 12:19:09 +0000 Subject: [issue19217] Calling assertEquals for moderately long list takes too long In-Reply-To: <1381410286.72.0.514206486634.issue19217@psf.upfronthosting.co.za> Message-ID: <1381493949.53.0.319621772302.issue19217@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:19:34 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 11 Oct 2013 12:19:34 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381493974.7.0.617261202197.issue19219@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: "Therefore, the Python maintainers reserve the right to modify the marshal format in backward incompatible ways" sure, don't expect such things to survive version changes. (Actually, they have been hitherto, and my version "3" I actually changed, to be so, the initial draft being unable to read version 2 data) But for sending stuff over the wire, caching on disk, etc, its perfectly safe and super fast. And what is more, the python developers (that's you and me) are super careful to never _crash_ the interpreter, no matter how broken any input data is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:21:57 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 11 Oct 2013 12:21:57 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381494117.57.0.440800278227.issue19219@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: "Loading untrusted data ... is not supported by Python." This is a pretty bold claim. Is this, indeed, a fact? (and yes, "elsewhere" is a word) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:31:48 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 11 Oct 2013 12:31:48 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381494708.96.0.17333148652.issue19219@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Anyway, whether or not Pyhon guarantees this and that wrt. "untrusted" is beside the point and offtopic, as Victor poitns out. However: We are, and have always been, careful to fail gracefully if we detect data corruption. Never should the flipping of a bit on a file on the disk cause our program to crash. It is fine when reading a corrupt file that an int(1) turns to int(2), or that we get an UnmarshalError when reading it, or that a "hello world" string turns to "hello $orld". What is not good is if the reading of the corrupt string causes the interpreter to crash. My knowledge of the new unicode internals is limited at best. If you don't think, Antoine, that putting non-7-bit data into the supposedly 7 bit ascii unicode data can cause an actual crash, but at worst a corrupt string, then I'm quite happy, personally :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 15:05:30 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 11 Oct 2013 13:05:30 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381496730.16.0.99191628728.issue19219@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 15:10:54 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Oct 2013 13:10:54 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381497054.83.0.689078566159.issue19219@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > The marshal module is not intended to be secure against erroneous or maliciously constructed data. Never unmarshal data received from an untrusted or unauthenticated source. Then we can simplify the marshal module by dropping all error handling: f.read() returned not bytes, read() returned too much data, EOF read where not expected, recursion limit exceeded, long/string/unicode/tuple/list/set size out of range, unnormalized long data, digit out of range in long, index list too large, invalid reference, unknown type code, NULL object in marshal data for set, UTF8 decoding errors, string to float converting errors, etc, etc. Sorry for sarcasm. > It's exactly what you suggest: reuse PyUnicode_AsUTF8String(). Actually _PyUnicode_UTF8(). PyUnicode_AsUTF8String() creates UTF8 cache if it is not exists and this can be not desired. We could use this optimization in many other places, in particular in PyUnicode_AsUTF8String() itself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 15:23:51 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 11 Oct 2013 13:23:51 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381497054.83.0.689078566159.issue19219@psf.upfronthosting.co.za> Message-ID: <681666985.69194707.1381497804258.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > Sorry for sarcasm. Well, indeed, the sarcasm is undeserved here, if the interpreter cannot crash because of the change. > > It's exactly what you suggest: reuse PyUnicode_AsUTF8String(). > > Actually _PyUnicode_UTF8(). PyUnicode_AsUTF8String() creates UTF8 > cache if it is not exists and this can be not desired. We could use > this optimization in many other places, in particular in > PyUnicode_AsUTF8String() itself. I don't understand how _PyUnicode_UTF8() can be used for *unmarshalling*. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 15:29:54 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 11 Oct 2013 13:29:54 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381498194.72.0.06001724071.issue19219@psf.upfronthosting.co.za> Antoine Pitrou added the comment: That said, I'll try out the patch with _PyUnicode_FromUCS1 instead of _PyUnicode_FromASCII, to see if it affects performance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 16:03:37 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 11 Oct 2013 14:03:37 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381500217.32.0.769777941279.issue19219@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Just for the record, I want to say that this is great stuff, Antoine! It's great when this sort of stuff gets some attention. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 16:05:05 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Oct 2013 14:05:05 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381500305.43.0.543220526724.issue19219@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I don't understand how _PyUnicode_UTF8() can be used for *unmarshalling*. I say about marshalling. > That said, I'll try out the patch with _PyUnicode_FromUCS1 instead of _PyUnicode_FromASCII, to see if it affects performance. Could you try out the patch with PyUnicode_DecodeUTF8()? This will save you two opcodes and perhaps several lines of code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 16:14:59 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 11 Oct 2013 14:14:59 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381500899.49.0.0614432256474.issue19219@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: "This will save you two opcodes and perhaps several lines of code. " Just bear in mind that without other changes, version 4 needs to be backwards compatible with version 3. I ran into this when developing version 3. The reason is that while the marshal format includes the version information in its header, it isn't actually verified on loading. IIRC. You specify the expected format to the function, or something like that. So, if you don't do this, you get errors when loading previously generated .pyc files. Of course, we are free to fix that problem as well :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 16:27:26 2013 From: report at bugs.python.org (Berker Peksag) Date: Fri, 11 Oct 2013 14:27:26 +0000 Subject: [issue13477] tarfile module should have a command line In-Reply-To: <1322190665.85.0.356467902383.issue13477@psf.upfronthosting.co.za> Message-ID: <1381501646.94.0.754334623433.issue13477@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- keywords: +needs review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 16:27:44 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 11 Oct 2013 14:27:44 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1381501664.97.0.0570726753414.issue3982@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 16:32:26 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 11 Oct 2013 14:32:26 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381500305.43.0.543220526724.issue19219@psf.upfronthosting.co.za> Message-ID: <1260510829.69355908.1381501919602.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > > That said, I'll try out the patch with _PyUnicode_FromUCS1 instead > > of _PyUnicode_FromASCII, to see if it affects performance. > > Could you try out the patch with PyUnicode_DecodeUTF8()? This will > save you two opcodes and perhaps several lines of code. That would be a change in behaviour, since currently "surrogatepass" is the error handler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 16:34:55 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 11 Oct 2013 14:34:55 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381500899.49.0.0614432256474.issue19219@psf.upfronthosting.co.za> Message-ID: <1919290567.69360662.1381502068060.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > I ran into this when developing version 3. The reason is that while > the marshal format includes the version information in its header, > it isn't actually verified on loading. IIRC. You specify the > expected format to the function, or something like that. So, if you > don't do this, you get errors when loading previously generated .pyc > files. Exactly (I also tried this :-)). The problem is the version number is *outside* of the marshal format: e.g. it's in the pyc file header. When freezing a module (see frozen.c), the version number isn't included. So our freedom is quite limited here: we have to support legacy frozen modules. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 16:37:00 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 11 Oct 2013 14:37:00 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381502220.7.0.496830578777.issue19219@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: How about adding a version opcode? This is a backwards compatible change, and allows us to reject unsupported versions in the future, as long as they are not very old unsupported versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 16:43:41 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Oct 2013 14:43:41 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381502621.16.0.112245222519.issue19219@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > "This will save you two opcodes and perhaps several lines of code. " > Just bear in mind that without other changes, version 4 needs to be backwards compatible with version 3. I meant two of new proposed opcodes: TYPE_ASCII and TYPE_ASCII_INTERNED. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 16:45:51 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Oct 2013 14:45:51 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381502751.65.0.387376969594.issue19219@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > That would be a change in behaviour, since currently "surrogatepass" is the error handler. I don't propose any change in behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 16:48:39 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 11 Oct 2013 14:48:39 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381502621.16.0.112245222519.issue19219@psf.upfronthosting.co.za> Message-ID: <1710678806.69398357.1381502892237.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > I meant two of new proposed opcodes: TYPE_ASCII and > TYPE_ASCII_INTERNED. You cannot change the meaning of TYPE_UNICODE (it uses "surrogatepass"). Therefore, you have to use new opcodes with other semantics. Besides, opcodes are cheap. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 17:03:29 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Oct 2013 15:03:29 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381503809.96.0.610953630749.issue19219@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > You cannot change the meaning of TYPE_UNICODE (it uses "surrogatepass"). > Therefore, you have to use new opcodes with other semantics. You don't need new semantic. Use old semantic. The set of ASCII encoded strings is a subset of valid UTF8 encoded strings, which is a subset of UTF8 encoded with "surrogatepass" strings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 17:18:58 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 11 Oct 2013 15:18:58 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381503809.96.0.610953630749.issue19219@psf.upfronthosting.co.za> Message-ID: <453476170.69479802.1381504710814.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > > You cannot change the meaning of TYPE_UNICODE (it uses > > "surrogatepass"). > > Therefore, you have to use new opcodes with other semantics. > > You don't need new semantic. Use old semantic. The set of ASCII > encoded strings is a subset of valid UTF8 encoded strings, which is > a subset of UTF8 encoded with "surrogatepass" strings. Sorry, I don't understand you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 18:10:10 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 11 Oct 2013 16:10:10 +0000 Subject: [issue19192] Move test_current_time from test_xmlrpc_net to test_xmlrpc In-Reply-To: <1381249571.28.0.993585174787.issue19192@psf.upfronthosting.co.za> Message-ID: <3cxDds2YDJz7Ljy@mail.python.org> Roundup Robot added the comment: New changeset a4515186bf9c by R David Murray in branch 'default': #19192: Give up on time.xmlrpc.com as an xmlrpc network test. http://hg.python.org/cpython/rev/a4515186bf9c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 18:13:03 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 11 Oct 2013 16:13:03 +0000 Subject: [issue19192] Move test_current_time from test_xmlrpc_net to test_xmlrpc In-Reply-To: <1381249571.28.0.993585174787.issue19192@psf.upfronthosting.co.za> Message-ID: <1381507982.99.0.312217325251.issue19192@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Vajrasky. I simplified your test a bit further still. It occurs to me that nowadays (unlike when the file was written), we can use resources to skip individual test classes or even individual tests. So we could open a new issue to move the last test from test_xmlrpc_net into test_xmrlpc, if anyone was interested in doing that :) ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 18:26:12 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Fri, 11 Oct 2013 16:26:12 +0000 Subject: [issue19180] some RFC references could be updated In-Reply-To: <525144B9.3040305@python.org> Message-ID: <1381508772.46.0.44594948892.issue19180@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 18:31:15 2013 From: report at bugs.python.org (W. Trevor King) Date: Fri, 11 Oct 2013 16:31:15 +0000 Subject: [issue19226] distutils/command/upload.py show response gives: TypeError: sequence item 1: expected str instance, bytes found Message-ID: <1381509075.7.0.951655438313.issue19226@psf.upfronthosting.co.za> New submission from W. Trevor King: Avoid: Traceback (most recent call last): File "setup.py", line 61, in 'html2text (>=3.0.1)', File "/.../python3.2/distutils/core.py", line 148, in setup dist.run_commands() File "/.../python3.2/distutils/dist.py", line 917, in run_commands self.run_command(cmd) File "/.../python3.2/distutils/dist.py", line 936, in run_command cmd_obj.run() File "/.../python3.2/distutils/command/upload.py", line 66, in run self.upload_file(command, pyversion, filename) File "/.../python3.2/distutils/command/upload.py", line 201, in upload_file msg = '\n'.join(('-' * 75, r.read(), '-' * 75)) TypeError: sequence item 1: expected str instance, bytes found by converting the bytes returned by HTTPResponse.read [1] to a string before joinging it with other strings. HTTPResponse.headers supports the Message interface [2], so we can use get_param to extract the charset [3], falling back on ISO-8859-1 [4]. [1]: http://docs.python.org/3/library/http.client.html#http.client.HTTPResponse.read [2]: http://docs.python.org/3/library/http.client.html#httpmessage-objects [3]: http://docs.python.org/3/library/email.message.html#email.message.Message.get_param [4]: http://tools.ietf.org/html/rfc2616#section-3.7.1 ---------- assignee: eric.araujo components: Distutils files: show-response-string.patch keywords: patch messages: 199489 nosy: eric.araujo, labrat, tarek priority: normal severity: normal status: open title: distutils/command/upload.py show response gives: TypeError: sequence item 1: expected str instance, bytes found versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file32045/show-response-string.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 18:37:15 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Oct 2013 16:37:15 +0000 Subject: [issue19180] some RFC references could be updated In-Reply-To: <525144B9.3040305@python.org> Message-ID: <1381509435.75.0.218493938099.issue19180@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also http://comments.gmane.org/gmane.comp.python.devel/139953 . ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 18:51:53 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 11 Oct 2013 16:51:53 +0000 Subject: [issue15806] Add context manager for the "try: ... except: pass" pattern In-Reply-To: <1346217315.31.0.832549559428.issue15806@psf.upfronthosting.co.za> Message-ID: <1381510313.73.0.418613437135.issue15806@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 19:11:37 2013 From: report at bugs.python.org (Georg Brandl) Date: Fri, 11 Oct 2013 17:11:37 +0000 Subject: [issue5388] Green-box doc glitch: winhelp version only In-Reply-To: <1235763954.97.0.134032530958.issue5388@psf.upfronthosting.co.za> Message-ID: <1381511497.4.0.597626118931.issue5388@psf.upfronthosting.co.za> Georg Brandl added the comment: Is this still an issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 19:21:15 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Oct 2013 17:21:15 +0000 Subject: [issue19226] distutils/command/upload.py show response gives: TypeError: sequence item 1: expected str instance, bytes found In-Reply-To: <1381509075.7.0.951655438313.issue19226@psf.upfronthosting.co.za> Message-ID: <1381512075.53.0.215778345835.issue19226@psf.upfronthosting.co.za> Ned Deily added the comment: This problem has been reported previously as Issue17354, a duplicate of Issue12853 which is still open at the moment. ---------- nosy: +ned.deily resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> global name 'r' is not defined in upload.py versions: -Python 3.2, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 19:24:42 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Oct 2013 17:24:42 +0000 Subject: [issue12853] global name 'r' is not defined in upload.py In-Reply-To: <1314637700.16.0.440169429003.issue12853@psf.upfronthosting.co.za> Message-ID: <1381512282.09.0.599477205568.issue12853@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 19:24:35 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 11 Oct 2013 17:24:35 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381512275.65.0.851208971845.issue19219@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 19:35:35 2013 From: report at bugs.python.org (W. Trevor King) Date: Fri, 11 Oct 2013 17:35:35 +0000 Subject: [issue19226] distutils/command/upload.py show response gives: TypeError: sequence item 1: expected str instance, bytes found In-Reply-To: <1381512075.53.0.215778345835.issue19226@psf.upfronthosting.co.za> Message-ID: <20131011173432.GP1409@odin.tremily.us> W. Trevor King added the comment: On Fri, Oct 11, 2013 at 05:21:15PM +0000, Ned Deily wrote: > This problem has been reported previously as Issue17354, a duplicate > of Issue12853 which is still open at the moment. Ah, I searched for a fwe possible subject lines, but didn't hit those :p. I thought that if it wasn't fixed in the master branch it must not have an associated issue? I like my patch better than Issue17354's, because PyPI servers may not always use UTF-8. I'll ping Issue12853 about the patches, because either one would fix Issue12853, and it's currently "needs patch". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 19:38:55 2013 From: report at bugs.python.org (W. Trevor King) Date: Fri, 11 Oct 2013 17:38:55 +0000 Subject: [issue12853] global name 'r' is not defined in upload.py In-Reply-To: <1314637700.16.0.440169429003.issue12853@psf.upfronthosting.co.za> Message-ID: <1381513135.24.0.0645260602466.issue12853@psf.upfronthosting.co.za> W. Trevor King added the comment: I just posted a patch fixing this in the current master branch [1]. Ned Deily pointed out that my Issue19226 duplicated an earlier Issue17354, which also has a patch fixing this problem. Merging either one of these patches should close this issue. I like my patch's generic charset handling better, but for PyPI uploads either one would work fine. I've looked through the Mercurial logs, but it looks like this r *has* been around since 34794 (Implement the Distutils 'upload' subcommand (upload package to PyPI), 2005-03-21), so I don't know where the "global name 'r' is not defined" message came from. ---------- nosy: +labrat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 20:09:20 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 11 Oct 2013 18:09:20 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381514960.95.0.98926239867.issue19219@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Updated patch using PyUnicode_FromKindAndData for ASCII strings, to ensure that corrupt marshal bytecode doesn't provide corrupt unicode objects. Performance is within 2% of the previous patch. (however, a quick test suggests that PyUnicode_DecodeUTF8 is quite slower) ---------- Added file: http://bugs.python.org/file32046/marshal_opts5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 20:32:31 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 11 Oct 2013 18:32:31 +0000 Subject: [issue13477] tarfile module should have a command line In-Reply-To: <1322190665.85.0.356467902383.issue13477@psf.upfronthosting.co.za> Message-ID: <1381516351.84.0.978392477992.issue13477@psf.upfronthosting.co.za> Antoine Pitrou added the comment: >From a quick glance, the patch looks ok. Serhiy, do you want to review it any further? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 20:51:13 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 11 Oct 2013 18:51:13 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots Message-ID: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> New submission from Antoine Pitrou: test_multiprocessing has started to hang frequently on the Gentoo buildbots. It seems it has started happening with the "OpenSSL re-seeding" commits: http://hg.python.org/cpython/rev/8e1194c39beddb83337c0acb9e4c2922a02a36cf David, could you try to investigate on the buildbot? If this security fix can crash some machines, we'd better find a workaround. ---------- components: Interpreter Core, Library (Lib), Tests keywords: buildbot messages: 199497 nosy: christian.heimes, pitrou, r.david.murray, sbt priority: critical severity: normal status: open title: test_multiprocessing_xxx hangs under Gentoo buildbots type: crash versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 20:59:48 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Oct 2013 18:59:48 +0000 Subject: [issue5388] Green-box doc glitch: winhelp version only In-Reply-To: <1235763954.97.0.134032530958.issue5388@psf.upfronthosting.co.za> Message-ID: <1381517988.43.0.668275274857.issue5388@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Yes. On win 7, html help control 6.1, the horizontal scroll bar is still put in or on top of the box, but it is thinner so it only cuts off half of the bottom line instead of hiding it completely. There is no longer a vertical scroll bar, which means one can only expose the rest of the bottom line by maximizing the window and shrinking the type size. This is no an issue for me now because I recently got a 27' monitor with 2560x1440 resolution, so with full screen and still readable type, I can see even the long lines discussed here without a scrollbar. But this will not be true for most. On a small enough screen, I might need a magnifier. I checked and Internet Explorer works like FireFox, adding the scrollbar beneath the box (or expanding the box to accommodate it). I just confirmed that the start menu shortcut does the same as double clicking python34/Doc/python34a3.chm. Same behavior. The icon is question mark partly over page. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 20:59:58 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Oct 2013 18:59:58 +0000 Subject: [issue5388] Green-box doc glitch: winhelp version only In-Reply-To: <1235763954.97.0.134032530958.issue5388@psf.upfronthosting.co.za> Message-ID: <1381517998.21.0.781269347454.issue5388@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 21:59:04 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Oct 2013 19:59:04 +0000 Subject: [issue19221] Upgrade to Unicode 6.3.0 In-Reply-To: <1381438473.54.0.298872784227.issue19221@psf.upfronthosting.co.za> Message-ID: <1381521544.08.0.428274093227.issue19221@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Doc/whatsnew/3.4.rst ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 22:00:19 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Oct 2013 20:00:19 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <1381521619.91.0.850410659561.issue12892@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch addresses Victor's comments on Rietveld. Thank you Victor. The "surrogatepass" error handler now works with different spellings of encodings ("utf_32le", "UTF-32-LE", etc). > I tested utf_16_32_surrogates_4.patch: surrogateescape with as encoder does not work as expected. Yes, surrogateescape doesn't work with ASCII incompatible encodings and can't. First, it can't represent the result of decoding b'\x00\xd8' from utf-16-le or b'ABCD' from utf-32*. This problem is worth separated issue (or even PEP) and discussion on Python-Dev. ---------- Added file: http://bugs.python.org/file32047/utf_16_32_surrogates_5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 22:01:11 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Oct 2013 20:01:11 +0000 Subject: [issue13477] tarfile module should have a command line In-Reply-To: <1322190665.85.0.356467902383.issue13477@psf.upfronthosting.co.za> Message-ID: <1381521671.21.0.875189461376.issue13477@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, this is in my plans. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 22:07:43 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 11 Oct 2013 20:07:43 +0000 Subject: [issue19205] Don't import re and sysconfig in site.py In-Reply-To: <1381324834.76.0.705779220837.issue19205@psf.upfronthosting.co.za> Message-ID: <1381522063.36.0.767212834179.issue19205@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file32017/site_no_re.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 22:07:52 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 11 Oct 2013 20:07:52 +0000 Subject: [issue19205] Don't import re and sysconfig in site.py In-Reply-To: <1381324834.76.0.705779220837.issue19205@psf.upfronthosting.co.za> Message-ID: <1381522072.0.0.661469146074.issue19205@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file32023/sysconfig_delay_re.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 22:11:16 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 11 Oct 2013 20:11:16 +0000 Subject: [issue19205] Don't import re and sysconfig in site.py In-Reply-To: <1381324834.76.0.705779220837.issue19205@psf.upfronthosting.co.za> Message-ID: <1381522276.29.0.187986204726.issue19205@psf.upfronthosting.co.za> Christian Heimes added the comment: Here is a new patch with unit test and patch for the locale module. The locale modules is loaded by the _io module when any standard stream is not connected to a terminal (or so). ---------- Added file: http://bugs.python.org/file32048/startup_no_re.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 22:26:21 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 11 Oct 2013 20:26:21 +0000 Subject: [issue19205] Don't import re and sysconfig in site.py In-Reply-To: <1381324834.76.0.705779220837.issue19205@psf.upfronthosting.co.za> Message-ID: <1381523181.23.0.863662261466.issue19205@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Review posted on Rietveld. ---------- nosy: +pitrou stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 22:56:36 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Oct 2013 20:56:36 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381524996.11.0.477703452549.issue19219@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Let a code say instead me. ---------- Added file: http://bugs.python.org/file32049/marshal_opts5a.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 23:02:39 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2013 21:02:39 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1381525359.12.0.669311861904.issue19227@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 23:07:13 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 11 Oct 2013 21:07:13 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381524996.11.0.477703452549.issue19219@psf.upfronthosting.co.za> Message-ID: <1381525596.2512.4.camel@fsol> Antoine Pitrou added the comment: > Let a code say instead me. I don't understand your patch. The macros you define aren't used anywhere. Also, your patch keeps the slow call to PyUnicode_DecodeUTF8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 23:19:53 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2013 21:19:53 +0000 Subject: [issue19205] Don't import re and sysconfig in site.py In-Reply-To: <1381324834.76.0.705779220837.issue19205@psf.upfronthosting.co.za> Message-ID: <1381526393.75.0.315767301888.issue19205@psf.upfronthosting.co.za> STINNER Victor added the comment: I accept hacks to speedup Python is the site module, but it becomes more surprising in the locale module. The issue #9548 proposes to a more generic solution for the locale module at startup. -CONFIG_LINE = re.compile(r'^(?P(\w|[-_])+)\s*=\s*(?P.*)\s*$') +CONFIG_LINE = None If you set the constant to None, it's better to remove it completly (or make it private). It's a public variable, someone may try to read it. I don't know why it is public. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 23:30:24 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 11 Oct 2013 21:30:24 +0000 Subject: [issue9548] locale can be imported at startup but relies on too many library modules In-Reply-To: <1281380971.62.0.695264636628.issue9548@psf.upfronthosting.co.za> Message-ID: <1381527024.86.0.975644498963.issue9548@psf.upfronthosting.co.za> Christian Heimes added the comment: The locale module uses only collections.abc.Mapping. The import of the entire collections module can be avoided if collections.abc is renamed to _abcoll again. functools.wrap() can be replaced with: localeconv.__doc__ = _localeconv.__doc__ The other attributes are either equal (e.g. __name__) or do not exist on builtin functions (__dict__). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 23:35:33 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2013 21:35:33 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381527333.51.0.257694807529.issue19219@psf.upfronthosting.co.za> STINNER Victor added the comment: > (however, a quick test suggests that PyUnicode_DecodeUTF8 is quite slower) It's surprising that PyUnicode_DecodeUTF8() is quite slower than _PyUnicode_FromUCS1(). _PyUnicode_FromUCS1() calls ucs1lib_find_max_char() and then memcpy(). PyUnicode_DecodeUTF8() first tries ascii_decode() which is very similar than ucs1lib_find_max_char(). The difference is maybe that _PyUnicode_FromUCS1() copies all bytes at once (memcpy()), whereas ascii_decode() copies bytes while if the string is ASCII or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 23:41:37 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 11 Oct 2013 21:41:37 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1381527697.28.0.737598362356.issue19227@psf.upfronthosting.co.za> R. David Murray added the comment: Running test_socket test_ssl test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_spaw under -F on the buildbot, I got the following failure during the second loop: [ 10] test_multiprocessing_spawn Traceback (most recent call last): File "", line 1, in File "/home/rdmurray/p34/Lib/multiprocessing/spawn.py", line 96, in spawn_main exitcode = _main(fd) File "/home/rdmurray/p34/Lib/multiprocessing/spawn.py", line 105, in _main prepare(preparation_data) File "/home/rdmurray/p34/Lib/multiprocessing/spawn.py", line 210, in prepare import_main_path(data['main_path']) File "/home/rdmurray/p34/Lib/multiprocessing/spawn.py", line 256, in import_main_path exec(code, main_module.__dict__) File "/home/rdmurray/p34/Lib/test/regrtest.py", line 136, in import shutil File "/home/rdmurray/p34/Lib/shutil.py", line 14, in import tarfile File "", line 1599, in _find_and_load File "", line 1566, in _find_and_load_unlocked File "", line 607, in _check_name_wrapper File "", line 1056, in load_module File "", line 922, in load_module File "", line 1025, in get_code File "", line 1065, in get_data OSError: [Errno 23] Too many open files in system: '/home/rdmurray/p34/Lib/tarfile.py' Process Process-1410: Traceback (most recent call last): File "/home/rdmurray/p34/Lib/multiprocessing/process.py", line 255, in _bootstrap self.run() File "/home/rdmurray/p34/Lib/multiprocessing/process.py", line 92, in run self._target(*self._args, **self._kwargs) Process Process-1411: Traceback (most recent call last): Process Process-1412: Traceback (most recent call last): File "/home/rdmurray/p34/Lib/multiprocessing/process.py", line 255, in _bootstrap self.run() File "/home/rdmurray/p34/Lib/multiprocessing/process.py", line 92, in run self._target(*self._args, **self._kwargs) File "/home/rdmurray/p34/Lib/test/_test_multiprocessing.py", line 1135, in task self.f(*self.args) File "/home/rdmurray/p34/Lib/test/_test_multiprocessing.py", line 1219, in _test_wait_return_f res = barrier.wait() File "/home/rdmurray/p34/Lib/multiprocessing/process.py", line 255, in _bootstrap self.run() File "/home/rdmurray/p34/Lib/multiprocessing/process.py", line 92, in run self._target(*self._args, **self._kwargs) File "/home/rdmurray/p34/Lib/threading.py", line 395, in wait self._wait(timeout) File "/home/rdmurray/p34/Lib/threading.py", line 435, in _wait raise BrokenBarrierError threading.BrokenBarrierError File "/home/rdmurray/p34/Lib/test/_test_multiprocessing.py", line 1135, in task self.f(*self.args) File "/home/rdmurray/p34/Lib/test/_test_multiprocessing.py", line 1219, in _test_wait_return_f res = barrier.wait() File "/home/rdmurray/p34/Lib/test/_test_multiprocessing.py", line 1135, in task self.f(*self.args) File "/home/rdmurray/p34/Lib/test/_test_multiprocessing.py", line 1219, in _test_wait_return_f res = barrier.wait() File "/home/rdmurray/p34/Lib/threading.py", line 395, in wait self._wait(timeout) File "/home/rdmurray/p34/Lib/threading.py", line 395, in wait self._wait(timeout) File "/home/rdmurray/p34/Lib/threading.py", line 435, in _wait raise BrokenBarrierError threading.BrokenBarrierError File "/home/rdmurray/p34/Lib/threading.py", line 435, in _wait raise BrokenBarrierError threading.BrokenBarrierError test test_multiprocessing_spawn failed -- Traceback (most recent call last): File "/home/rdmurray/p34/Lib/test/_test_multiprocessing.py", line 1227, in test_wait_return self.run_threads(self._test_wait_return_f, (self.barrier, queue)) File "/home/rdmurray/p34/Lib/test/_test_multiprocessing.py", line 1184, in run_threads f(*args) File "/home/rdmurray/p34/Lib/test/_test_multiprocessing.py", line 1219, in _test_wait_return_f res = barrier.wait() File "/home/rdmurray/p34/Lib/threading.py", line 395, in wait self._wait(timeout) File "/home/rdmurray/p34/Lib/threading.py", line 433, in _wait raise BrokenBarrierError threading.BrokenBarrierError ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 23:58:45 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2013 21:58:45 +0000 Subject: [issue9548] locale can be imported at startup but relies on too many library modules In-Reply-To: <1281380971.62.0.695264636628.issue9548@psf.upfronthosting.co.za> Message-ID: <1381528725.63.0.895959453062.issue9548@psf.upfronthosting.co.za> STINNER Victor added the comment: > ... the _bootlocale can be simplified to a few lines: ... Here is the patch implementing my proposition: bootlocale3.patch. ---------- Added file: http://bugs.python.org/file32050/bootlocale3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 00:13:20 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2013 22:13:20 +0000 Subject: [issue9548] locale can be imported at startup but relies on too many library modules In-Reply-To: <1281380971.62.0.695264636628.issue9548@psf.upfronthosting.co.za> Message-ID: <1381529600.78.0.82693044494.issue9548@psf.upfronthosting.co.za> STINNER Victor added the comment: "Does anyone know if Python does still support systems where CODESET is not available? Which OS does not support CODESET?" I checked my VMs with Python, nl_langinfo(CODESET) works on: - Linux (Fedora 18, kernel 3.9) - OpenBSD 5.2 - OpenIndiana 148 (SunOS 5.11) - FreeBSD 9.1 I also tested my patch on Windows 7: _bootlocale.getpreferredencoding() works as expected (it returns "cp1252"). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 00:14:58 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 11 Oct 2013 22:14:58 +0000 Subject: [issue9548] locale can be imported at startup but relies on too many library modules In-Reply-To: <1281380971.62.0.695264636628.issue9548@psf.upfronthosting.co.za> Message-ID: <1381529698.57.0.391907804506.issue9548@psf.upfronthosting.co.za> Christian Heimes added the comment: You could raise an error and wait until somebody files a complain. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 00:15:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 11 Oct 2013 22:15:25 +0000 Subject: [issue9548] locale can be imported at startup but relies on too many library modules In-Reply-To: <1281380971.62.0.695264636628.issue9548@psf.upfronthosting.co.za> Message-ID: <3cxNkv4Sj9z7Lkl@mail.python.org> Roundup Robot added the comment: New changeset fbbf8b160e8d by Antoine Pitrou in branch 'default': Issue #9548: Add a minimal "_bootlocale" module that is imported by the _io module instead of the full locale module. http://hg.python.org/cpython/rev/fbbf8b160e8d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 00:25:03 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 11 Oct 2013 22:25:03 +0000 Subject: [issue19205] Don't import re and sysconfig in site.py In-Reply-To: <1381324834.76.0.705779220837.issue19205@psf.upfronthosting.co.za> Message-ID: <3cxNyQ6lMFz7Lk3@mail.python.org> Roundup Robot added the comment: New changeset 406529adf156 by Christian Heimes in branch 'default': Issue #19205: Don't import the 're' module in site and sysconfig module to http://hg.python.org/cpython/rev/406529adf156 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 00:25:32 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 11 Oct 2013 22:25:32 +0000 Subject: [issue19205] Don't import re and sysconfig in site.py In-Reply-To: <1381324834.76.0.705779220837.issue19205@psf.upfronthosting.co.za> Message-ID: <1381530332.01.0.49553682857.issue19205@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks for your input! ---------- resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 00:28:26 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 11 Oct 2013 22:28:26 +0000 Subject: [issue19205] Don't import re and sysconfig in site.py In-Reply-To: <1381324834.76.0.705779220837.issue19205@psf.upfronthosting.co.za> Message-ID: <3cxP2K3DWrzNt4@mail.python.org> Roundup Robot added the comment: New changeset 2cd1b28d1666 by Christian Heimes in branch 'default': Issue #19205 fix 406529adf156 http://hg.python.org/cpython/rev/2cd1b28d1666 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 00:53:01 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 11 Oct 2013 22:53:01 +0000 Subject: [issue19209] Remove import copyreg from os module In-Reply-To: <1381328480.57.0.127685895203.issue19209@psf.upfronthosting.co.za> Message-ID: <1381531981.51.0.362573055355.issue19209@psf.upfronthosting.co.za> Christian Heimes added the comment: os_stat_statvfs_pickle.patch with comments and tests. ---------- Added file: http://bugs.python.org/file32051/os_stat_statvfs_pickle2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 00:56:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2013 22:56:52 +0000 Subject: [issue19228] type.__qualname__ should not strip the module name Message-ID: <1381532212.21.0.0772191194155.issue19228@psf.upfronthosting.co.za> New submission from STINNER Victor: type.__qualname__ getter type_qualname() calls type_name() which strips the module name from the type name (type->tp_name). Attached patch fixes this. ---------- files: type_qualname.patch keywords: patch messages: 199518 nosy: haypo priority: normal severity: normal status: open title: type.__qualname__ should not strip the module name versions: Python 3.4 Added file: http://bugs.python.org/file32052/type_qualname.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 01:00:37 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 11 Oct 2013 23:00:37 +0000 Subject: [issue19228] type.__qualname__ should not strip the module name In-Reply-To: <1381532212.21.0.0772191194155.issue19228@psf.upfronthosting.co.za> Message-ID: <1381532437.82.0.112972742828.issue19228@psf.upfronthosting.co.za> Antoine Pitrou added the comment: __qualname__ strips the module name by design. If you want the module name, look up __name__ on the module. ---------- nosy: +pitrou resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 01:07:09 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 11 Oct 2013 23:07:09 +0000 Subject: [issue19218] Use of MutableMapping in os module slows down interpreter startup In-Reply-To: <1381428481.39.0.771776860266.issue19218@psf.upfronthosting.co.za> Message-ID: <1381532829.76.0.88326736302.issue19218@psf.upfronthosting.co.za> Christian Heimes added the comment: The io module no longer imports collections.abc through the locale module. Eric, I'm with Antoine. Your patch is too much of a clever hack and uses tricks that are dark magic. _abcoll is much simpler and easier to understand. Plus it can be used from other modules, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 01:17:08 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 11 Oct 2013 23:17:08 +0000 Subject: [issue19218] Use of MutableMapping in os module slows down interpreter startup In-Reply-To: <1381428481.39.0.771776860266.issue19218@psf.upfronthosting.co.za> Message-ID: <1381533428.52.0.67451808707.issue19218@psf.upfronthosting.co.za> Eric Snow added the comment: Not a problem. It is most definitely a hack. :) I put in up as an alternative to rearranging the collections module, but agree that doing so is preferable. I image that Raymond will make a decision on that one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 01:27:40 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 11 Oct 2013 23:27:40 +0000 Subject: [issue19209] Remove import copyreg from os module In-Reply-To: <1381328480.57.0.127685895203.issue19209@psf.upfronthosting.co.za> Message-ID: <3cxQLh2GSDz7Lk3@mail.python.org> Roundup Robot added the comment: New changeset 29c4a6a11e76 by Christian Heimes in branch 'default': Issue #19209: Remove import of copyreg from the os module to speed up http://hg.python.org/cpython/rev/29c4a6a11e76 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 01:29:43 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 11 Oct 2013 23:29:43 +0000 Subject: [issue19209] Remove import copyreg from os module In-Reply-To: <1381328480.57.0.127685895203.issue19209@psf.upfronthosting.co.za> Message-ID: <1381534183.05.0.894697255806.issue19209@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks for your help! Python is down to 43 modules on Linux. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 01:42:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 11 Oct 2013 23:42:01 +0000 Subject: [issue19209] Remove import copyreg from os module In-Reply-To: <1381328480.57.0.127685895203.issue19209@psf.upfronthosting.co.za> Message-ID: <3cxQgF055Zz7Lk2@mail.python.org> Roundup Robot added the comment: New changeset 89e405e6a7a9 by Christian Heimes in branch 'default': Issue #19209: fix structseq test http://hg.python.org/cpython/rev/89e405e6a7a9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 01:49:11 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2013 23:49:11 +0000 Subject: [issue19229] operator.py: move the Python implementation in the else block of try/except ImportError Message-ID: <1381535351.94.0.0685942795619.issue19229@psf.upfronthosting.co.za> New submission from STINNER Victor: To speedup Python startup, it may be interesting to not create useless many functions and classes in operator.py: "from _operator import *" will remove them a few line later. What do you think of moving the Python implementation of the operator module inside in the else block of "try/except ImportError" section? See attached operator.py for an example. It adds an ugly level of indentation, but it's for performances! Another option is to add a _pyoperator module. ---------- files: operator.py messages: 199525 nosy: christian.heimes, haypo priority: normal severity: normal status: open title: operator.py: move the Python implementation in the else block of try/except ImportError versions: Python 3.4 Added file: http://bugs.python.org/file32053/operator.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 02:00:07 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Oct 2013 00:00:07 +0000 Subject: [issue19179] doc bug: confusing table of values In-Reply-To: <52514342.6020404@python.org> Message-ID: <1381536007.61.0.0299619348018.issue19179@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I agree that this could be improved. It took a few readings to convince myself that True == Vulnerable. (Assuming that this is correct ;-) the table needs a title like Vulernable or a lead in sentence: "The following table indicates which modules are susceptible to which attacks." Since True and False are names of Python objects, I would also prefer Yes and No or X and or '-'. ---------- nosy: +eli.bendersky, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 02:03:26 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Oct 2013 00:03:26 +0000 Subject: [issue19191] os.path.splitext in windows , a little question In-Reply-To: <1381245906.23.0.98078809812.issue19191@psf.upfronthosting.co.za> Message-ID: <1381536206.22.0.0771258665354.issue19191@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 02:14:02 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Oct 2013 00:14:02 +0000 Subject: [issue19202] Additions to function docs: reduce and itertools. In-Reply-To: <1381313356.45.0.650070848794.issue19202@psf.upfronthosting.co.za> Message-ID: <1381536842.75.0.462890071564.issue19202@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think the reduce equivalent given by Georg would be excellent. I think the enumerate equivalent already given is fine because I think equivalents should use basic syntax (for loops), not something that might be more obscure. ---------- nosy: +terry.reedy title: Additions to docs -> Additions to function docs: reduce and itertools. versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 02:30:44 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Oct 2013 00:30:44 +0000 Subject: [issue19223] bz2 and 'x' mode open In-Reply-To: <1381440875.62.0.537853075258.issue19223@psf.upfronthosting.co.za> Message-ID: <1381537844.66.0.965859452084.issue19223@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +nadeem.vawda _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 02:33:11 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Oct 2013 00:33:11 +0000 Subject: [issue19230] Reimplement the keyword module in C Message-ID: <1381537991.31.0.762180400628.issue19230@psf.upfronthosting.co.za> New submission from STINNER Victor: To speedup Python startup, I propose to reimplement the keyword module in C. Attached patch implements it. * Remove Lib/keyword.py * Add Tools/scripts/keyword.py: script to build Modules/keyword.h * The new module is Modules/keyword.c I chose to change the keyword.kwlist type from list to tuple. The documentation only says they that kwlist is a "Sequence": http://docs.python.org/dev/library/keyword.html#keyword.kwlist The keyword is now used by the collections module in the implementation of namedtuple. The keyword module is trivial: it only contains a sequence of strings and a method checking if a string is part of this sequence. It would be simpler to add this to an existing module. I suppose that a new module was added for technical reasons. ---------- files: keyword.patch keywords: patch messages: 199528 nosy: christian.heimes, haypo, pitrou priority: normal severity: normal status: open title: Reimplement the keyword module in C type: performance versions: Python 3.4 Added file: http://bugs.python.org/file32054/keyword.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 03:23:48 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 12 Oct 2013 01:23:48 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1381541028.66.0.982049890559.issue19227@psf.upfronthosting.co.za> R. David Murray added the comment: Here is a more useful traceback: [394] test_multiprocessing_spawn Timeout (1:00:00)! Thread 0xb76a16c0: File "/home/rdmurray/p34/Lib/multiprocessing/popen_fork.py", line 30 in poll File "/home/rdmurray/p34/Lib/multiprocessing/popen_fork.py", line 54 in wait File "/home/rdmurray/p34/Lib/multiprocessing/process.py", line 124 in join File "/home/rdmurray/p34/Lib/test/_test_multiprocessing.py", line 144 in __call__ File "/home/rdmurray/p34/Lib/test/_test_multiprocessing.py", line 302 in test_terminate File "/home/rdmurray/p34/Lib/unittest/case.py", line 571 in run File "/home/rdmurray/p34/Lib/unittest/case.py", line 610 in __call__ File "/home/rdmurray/p34/Lib/unittest/suite.py", line 117 in run File "/home/rdmurray/p34/Lib/unittest/suite.py", line 79 in __call__ File "/home/rdmurray/p34/Lib/unittest/suite.py", line 117 in run File "/home/rdmurray/p34/Lib/unittest/suite.py", line 79 in __call__ File "/home/rdmurray/p34/Lib/unittest/suite.py", line 117 in run File "/home/rdmurray/p34/Lib/unittest/suite.py", line 79 in __call__ File "/home/rdmurray/p34/Lib/unittest/runner.py", line 168 in run File "/home/rdmurray/p34/Lib/test/support/__init__.py", line 1661 in _run_suite File "/home/rdmurray/p34/Lib/test/support/__init__.py", line 1695 in run_unittest File "/home/rdmurray/p34/Lib/test/regrtest.py", line 1275 in File "/home/rdmurray/p34/Lib/test/regrtest.py", line 1276 in runtest_inner File "/home/rdmurray/p34/Lib/test/regrtest.py", line 965 in runtest File "/home/rdmurray/p34/Lib/test/regrtest.py", line 761 in main File "/home/rdmurray/p34/Lib/test/regrtest.py", line 1560 in main_in_temp_cwd File "/home/rdmurray/p34/Lib/test/__main__.py", line 3 in File "/home/rdmurray/p34/Lib/runpy.py", line 73 in _run_code File "/home/rdmurray/p34/Lib/runpy.py", line 160 in _run_module_as_main ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 03:25:17 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Oct 2013 01:25:17 +0000 Subject: [issue19230] Reimplement the keyword module in C In-Reply-To: <1381537991.31.0.762180400628.issue19230@psf.upfronthosting.co.za> Message-ID: <1381541117.97.0.744353847367.issue19230@psf.upfronthosting.co.za> STINNER Victor added the comment: I fail to see a difference with my patch in the startup time, but I see that the number of syscalls is reduced by 10 (558 => 548). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 03:29:24 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Oct 2013 01:29:24 +0000 Subject: [issue19230] Reimplement the keyword module in C In-Reply-To: <1381537991.31.0.762180400628.issue19230@psf.upfronthosting.co.za> Message-ID: <1381541364.86.0.300537603579.issue19230@psf.upfronthosting.co.za> STINNER Victor added the comment: The patch adds 448 bytes to the stripped python executable file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 03:30:37 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Oct 2013 01:30:37 +0000 Subject: [issue19201] Add 'x' mode to lzma.open In-Reply-To: <1381282314.82.0.620935912444.issue19201@psf.upfronthosting.co.za> Message-ID: <1381541437.87.0.781707689873.issue19201@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The bug versus feature issue does not depend on whether the patch could cause a regression. (I think feature patches might actually be less likely than bug fixes to cause regressions, but it does not matter.) Nor is oversight, not adding a feature when it could have been added, a bug. The point is that adding a new feature in a bug-fix release makes it a feature release, and this is a new feature. Code that uses the new feature will not run on previous releases of the same version. The doc for lzma.open says "The mode argument can be any of "r", "rb", "w", "wb", "a" or "ab" for binary mode, or "rt", "wt", or "at" for text mode. The default is "rb"." (I assume that) the code does just what the doc says. (If it did not, *that* would be a bug). Arfrever's point about the order of characters makes me wonder why mode strings (as opposed to characters in the strings) are being checked. The following tests that exactly one of w, a, x appear in mode. if len({'w', 'a', 'x'} & set(mode)) == 1: If mode is eventually passed to open(), the latter would do what ever it does with junk chars in mode (such as 'q'). ---------- nosy: +terry.reedy title: lzma and 'x' mode open -> Add 'x' mode to lzma.open versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 03:30:48 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Oct 2013 01:30:48 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1381541448.58.0.765625914974.issue19227@psf.upfronthosting.co.za> STINNER Victor added the comment: See also issue #12413 which proposes to dump also the Python traceback of child processes to analyze multiprocessing issues. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 03:34:41 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 12 Oct 2013 01:34:41 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1381541681.35.0.712777097995.issue19227@psf.upfronthosting.co.za> R. David Murray added the comment: That's great, but without a patch it doesn't help me debug *this* failure :) Any suggestions for getting more information out of that test (I'm not familiar with multiprocessing...I'm already confused by the fact that the test is named test_multiprocessing_spawn and the error is coming from a module named popen_fork...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 04:45:39 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 12 Oct 2013 02:45:39 +0000 Subject: [issue18891] Master patch for content manager addtion to email package. In-Reply-To: <1377918603.72.0.362957249668.issue18891@psf.upfronthosting.co.za> Message-ID: <1381545939.66.0.472431733258.issue18891@psf.upfronthosting.co.za> R. David Murray added the comment: Final doc edits done. I will commit this next week if there are no objections, in order to get it in to alpha 4. ---------- Added file: http://bugs.python.org/file32055/master_content_manager.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 06:10:16 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 12 Oct 2013 04:10:16 +0000 Subject: [issue19082] Lib/xmlrpc/client.py demo code points to the dead server In-Reply-To: <1380034126.83.0.318957814744.issue19082@psf.upfronthosting.co.za> Message-ID: <1381551016.97.0.381870583367.issue19082@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Okay, I updated the patch. Now, it sends the datetime object instead of formatted datetime string. Also, I used static method inside instance to let the client uses dotted attribute feature instead of self attribute trick. ---------- Added file: http://bugs.python.org/file32056/xmlrpc_server_client_demo_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 06:35:19 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 12 Oct 2013 04:35:19 +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: <1381552519.53.0.462753412327.issue16355@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Added the doc fix and modified the test. ---------- Added file: http://bugs.python.org/file32057/issue16355_v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 06:51:34 2013 From: report at bugs.python.org (Tim Peters) Date: Sat, 12 Oct 2013 04:51:34 +0000 Subject: [issue19224] Make hash(None) consistent among processes In-Reply-To: <1381464221.0.0.181699047962.issue19224@psf.upfronthosting.co.za> Message-ID: <1381553494.15.0.309049495898.issue19224@psf.upfronthosting.co.za> Tim Peters added the comment: -0. Since hash(None) is currently based on None's memory address, I appreciate that it's not reliable (e.g., use different releases of the same compiler to build Python, and hash(None) may be different between them). The docs guarantee little about hash() results, so applications relying on cross-machine - or even same-machine cross-run - consistency are broken. It's trivial code bloat to special-case None, but it leaves a world of other hash() behaviors as-is (essentially "undefined"). The `portable_hash()` function in the DPark source is a start at what needs to be done if an application wants reliable hashes. But it's just a start (e.g., it's apparently relying on cross-platform consistency for `hash(integer)` and `hash(string)`, etc). Since CPython will never promise to make _all_ of those consistent across platforms and releases, I'd rather not even start down that road. Making the promise for `hash(None)` would be an attractive nuisance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 07:55:09 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 12 Oct 2013 05:55:09 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381541681.35.0.712777097995.issue19227@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > R. David Murray added the comment: OSError: [Errno 23] Too many open files in system: '/home/rdmurray/p34/Lib/tarfile.py' Well, the buildbot is hitting ENFILE. Try to run "lsof" as root, to see which process (more likely processes) have so many open files. Also, you should check the value of "/proc/sys/fs/file-max", although the default value should be more than enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 07:58:50 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 12 Oct 2013 05:58:50 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: Message-ID: Charles-Fran?ois Natali added the comment: > Here is a more useful traceback: If the failures aren't linked to ENFILE, then you could use strace to find the process on which the test is doing a waitpid(), and then perform an strace and gdb on that process to see where it's stuck. And send it a fatal signal that will make faulthander dump the stack. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 09:15:50 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 12 Oct 2013 07:15:50 +0000 Subject: [issue19202] Additions to function docs: reduce and itertools. In-Reply-To: <1381313356.45.0.650070848794.issue19202@psf.upfronthosting.co.za> Message-ID: <1381562150.37.0.159202242195.issue19202@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 09:20:14 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 12 Oct 2013 07:20:14 +0000 Subject: [issue19202] Additions to function docs: reduce and itertools. In-Reply-To: <1381313356.45.0.650070848794.issue19202@psf.upfronthosting.co.za> Message-ID: <1381562414.06.0.360830280669.issue19202@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Almost all of these make the docs worse and should not be applied. The purpose of the "equivalent" code is simply to make the documentation clearer, not to show all the ways it could have been done. I do think Georg's reduce() equivalent should be added because it is clearer than the current prose description. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 10:32:59 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 12 Oct 2013 08:32:59 +0000 Subject: [issue19201] Add 'x' mode to lzma.open() In-Reply-To: <1381282314.82.0.620935912444.issue19201@psf.upfronthosting.co.za> Message-ID: <1381566779.26.0.540630248919.issue19201@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- components: +Library (Lib) title: Add 'x' mode to lzma.open -> Add 'x' mode to lzma.open() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 10:33:54 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 12 Oct 2013 08:33:54 +0000 Subject: [issue19222] Add 'x' mode to gzip.open() In-Reply-To: <1381440732.5.0.887732797238.issue19222@psf.upfronthosting.co.za> Message-ID: <1381566834.78.0.214696657509.issue19222@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- components: +Library (Lib) stage: -> patch review title: gzip and 'x' mode open -> Add 'x' mode to gzip.open() versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 10:34:13 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 12 Oct 2013 08:34:13 +0000 Subject: [issue19223] Add 'x' mode to bz2.open() In-Reply-To: <1381440875.62.0.537853075258.issue19223@psf.upfronthosting.co.za> Message-ID: <1381566853.96.0.954064139626.issue19223@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- components: +Library (Lib) stage: -> patch review title: bz2 and 'x' mode open -> Add 'x' mode to bz2.open() versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 11:20:45 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Oct 2013 09:20:45 +0000 Subject: [issue19230] Reimplement the keyword module in C In-Reply-To: <1381537991.31.0.762180400628.issue19230@psf.upfronthosting.co.za> Message-ID: <1381569645.5.0.18649865209.issue19230@psf.upfronthosting.co.za> Antoine Pitrou added the comment: IMO this should be rejected. Failure to improve startup time + more complicated maintenance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 12:13:43 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Oct 2013 10:13:43 +0000 Subject: [issue19205] Don't import re and sysconfig in site.py In-Reply-To: <1381324834.76.0.705779220837.issue19205@psf.upfronthosting.co.za> Message-ID: <1381572823.82.0.0876441495798.issue19205@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Christian, the test is failing on Snow Leopard: ====================================================================== FAIL: test_startup_imports (test.test_site.StartupImportTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/test_site.py", line 435, in test_startup_imports self.assertFalse(modules.intersection(re_mods)) AssertionError: {'re', 'sre_compile', 'sre_constants', 'sre_parse', '_sre'} is not false http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.x/builds/106/steps/test/logs/stdio ---------- assignee: -> christian.heimes status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 12:26:25 2013 From: report at bugs.python.org (Esa Peuha) Date: Sat, 12 Oct 2013 10:26:25 +0000 Subject: [issue12853] global name 'r' is not defined in upload.py In-Reply-To: <1314637700.16.0.440169429003.issue12853@psf.upfronthosting.co.za> Message-ID: <1381573585.67.0.772033926502.issue12853@psf.upfronthosting.co.za> Esa Peuha added the comment: > so I don't know where the "global name 'r' is not defined" message came from. It came from Python 2.7. There are two separate bugs here, one in 3.x and the other in 2.7: the 3.x bug has to do with bytes/string separation, while the 2.7 bug is that result was changed to r in baf1a482b57d. ---------- nosy: +Esa.Peuha _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 12:32:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Oct 2013 10:32:38 +0000 Subject: [issue19205] Don't import re and sysconfig in site.py In-Reply-To: <1381324834.76.0.705779220837.issue19205@psf.upfronthosting.co.za> Message-ID: <3cxj5x1bgvz7Ljc@mail.python.org> Roundup Robot added the comment: New changeset a57dfbba91f9 by Christian Heimes in branch 'default': Issue #19205: add debugging output for failing test on Snow Leopard http://hg.python.org/cpython/rev/a57dfbba91f9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 12:53:18 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Sat, 12 Oct 2013 10:53:18 +0000 Subject: [issue12413] make faulthandler dump traceback of child processes In-Reply-To: <1309046011.52.0.650507172396.issue12413@psf.upfronthosting.co.za> Message-ID: <1381575198.09.0.508473228657.issue12413@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 12:56:32 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Sat, 12 Oct 2013 10:56:32 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1381575392.94.0.889732003543.issue19227@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > I'm already confused by the fact that the test is named > test_multiprocessing_spawn and the error is coming from a module named > popen_fork...) popen_spawn_posix.Popen is a subclass of popen_fork.Popen. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 13:33:02 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 12 Oct 2013 11:33:02 +0000 Subject: [issue19230] Reimplement the keyword module in C In-Reply-To: <1381537991.31.0.762180400628.issue19230@psf.upfronthosting.co.za> Message-ID: <1381577582.8.0.463588145624.issue19230@psf.upfronthosting.co.za> Christian Heimes added the comment: Here is a simpler patch that directly uses the grammar definition to create a list of keywords. It completely removes the necessity of a script. ---------- components: +Extension Modules stage: -> patch review Added file: http://bugs.python.org/file32058/keyword_grammar.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 13:37:02 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Oct 2013 11:37:02 +0000 Subject: [issue19230] Reimplement the keyword module in C In-Reply-To: <1381537991.31.0.762180400628.issue19230@psf.upfronthosting.co.za> Message-ID: <1381577822.15.0.986255683749.issue19230@psf.upfronthosting.co.za> Antoine Pitrou added the comment: -1 again. We shouldn't gratuitously convert Python code to C code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 13:43:10 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 12 Oct 2013 11:43:10 +0000 Subject: [issue19230] Reimplement the keyword module in C In-Reply-To: <1381537991.31.0.762180400628.issue19230@psf.upfronthosting.co.za> Message-ID: <1381578190.63.0.94565839923.issue19230@psf.upfronthosting.co.za> Georg Brandl added the comment: Well, combined with the fact that it gets rid of a manual regeneration step (that is easy to forget, since adding a keyword is not done very often) I think it's a net gain. The same could be done with the "token" module BTW. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 13:43:47 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Oct 2013 11:43:47 +0000 Subject: [issue19230] Reimplement the keyword module in C In-Reply-To: <1381537991.31.0.762180400628.issue19230@psf.upfronthosting.co.za> Message-ID: <1381578227.47.0.212751759929.issue19230@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Well, combined with the fact that it gets rid of a manual regeneration step (that is easy to forget, since adding a keyword is not done very often) I think it's a net gain. If it needs to be automated it can be added to the Makefile... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 13:46:58 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 12 Oct 2013 11:46:58 +0000 Subject: [issue13203] Doc: say id() is only useful for existing objects In-Reply-To: <1318873835.36.0.466865504792.issue13203@psf.upfronthosting.co.za> Message-ID: <1381578418.84.0.469971646345.issue13203@psf.upfronthosting.co.za> Georg Brandl added the comment: Suggestion attached. ---------- keywords: +patch Added file: http://bugs.python.org/file32059/id_unique.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 14:02:49 2013 From: report at bugs.python.org (FreedomKnight) Date: Sat, 12 Oct 2013 12:02:49 +0000 Subject: [issue19231] ctype cant's use printf Message-ID: <1381579369.49.0.578493785687.issue19231@psf.upfronthosting.co.za> New submission from FreedomKnight: the code is simple, so i paste all of mycode #!/usr/bin/env python3 from ctypes import * cdll.LoadLibrary("libc.so.6") libc = CDLL("libc.so.6") libc.printf("hello\n") result: h expect result: hello plateform: fedora 19 x64 python3 (3.3.2) ---------- components: ctypes messages: 199552 nosy: FreedomKnight priority: normal severity: normal status: open title: ctype cant's use printf type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 14:03:19 2013 From: report at bugs.python.org (Stefan Krah) Date: Sat, 12 Oct 2013 12:03:19 +0000 Subject: [issue19232] Speed up _decimal import Message-ID: <1381579399.63.0.316110193187.issue19232@psf.upfronthosting.co.za> New submission from Stefan Krah: As discussed on python-dev, importing _decimal at the bottom of decimal.py is about 9x slower than importing _decimal directly. ---------- assignee: skrah components: Extension Modules messages: 199553 nosy: skrah priority: normal severity: normal stage: needs patch status: open title: Speed up _decimal import type: performance versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 14:19:11 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 12 Oct 2013 12:19:11 +0000 Subject: [issue19231] ctype cant's use printf In-Reply-To: <1381579369.49.0.578493785687.issue19231@psf.upfronthosting.co.za> Message-ID: <1381580351.21.0.650168462725.issue19231@psf.upfronthosting.co.za> Georg Brandl added the comment: In Python 3, "hello\n" is a Unicode string. printf() expects a byte string, so you should use b"hello\n" (or s.encode() for string object named "s"). ---------- nosy: +georg.brandl resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 14:21:12 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Oct 2013 12:21:12 +0000 Subject: [issue19232] Speed up _decimal import In-Reply-To: <1381579399.63.0.316110193187.issue19232@psf.upfronthosting.co.za> Message-ID: <1381580472.9.0.0459186769473.issue19232@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 14:21:39 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Oct 2013 12:21:39 +0000 Subject: [issue19232] Speed up _decimal import In-Reply-To: <1381579399.63.0.316110193187.issue19232@psf.upfronthosting.co.za> Message-ID: <1381580499.43.0.741773516506.issue19232@psf.upfronthosting.co.za> STINNER Victor added the comment: I proposed something similar for issue #19229. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 14:28:43 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Oct 2013 12:28:43 +0000 Subject: [issue19230] Reimplement the keyword module in C In-Reply-To: <1381537991.31.0.762180400628.issue19230@psf.upfronthosting.co.za> Message-ID: <1381580923.41.0.845526686039.issue19230@psf.upfronthosting.co.za> STINNER Victor added the comment: > If it needs to be automated it can be added to the Makefile... I tested keyword_grammar.patch on a fresh Python source code (make distclean; ./configure --with-pydebug; make): I can compile Python. I don't understand what should be automated? This patch doesn't need to build a dependency. keyword_grammar.patch needs probably something for Visual Studio (PC/config.c and PCbuild/pythoncore.vcxproj?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 14:31:50 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 12 Oct 2013 12:31:50 +0000 Subject: [issue13203] Doc: say id() is only useful for existing objects In-Reply-To: <1318873835.36.0.466865504792.issue13203@psf.upfronthosting.co.za> Message-ID: <1381581110.23.0.0493982262656.issue13203@psf.upfronthosting.co.za> Ezio Melotti added the comment: LGTM + created and deleted during execution of the ``id()`` If you want to be more accurate you could say "before and after" instead of "during". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 14:43:41 2013 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 12 Oct 2013 12:43:41 +0000 Subject: [issue19232] Speed up _decimal import In-Reply-To: <1381579399.63.0.316110193187.issue19232@psf.upfronthosting.co.za> Message-ID: <1381581821.14.0.228101183655.issue19232@psf.upfronthosting.co.za> Eric V. Smith added the comment: Remember that one reason for importing the C version at the bottom of the python version is so that alternate implementations (PyPy, IronPython, Jython) could provide partial versions of the C (or equivalent) versions. By importing after the Python version, the alternate implementation could continue to use parts of the Python code. I think the impact on alternate implementations needs to be considered before we start rearchitecting these imports. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 14:49:02 2013 From: report at bugs.python.org (Stefan Krah) Date: Sat, 12 Oct 2013 12:49:02 +0000 Subject: [issue19232] Speed up _decimal import In-Reply-To: <1381579399.63.0.316110193187.issue19232@psf.upfronthosting.co.za> Message-ID: <1381582142.64.0.304206604582.issue19232@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- keywords: +patch Added file: http://bugs.python.org/file32060/issue19232.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 14:51:47 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Oct 2013 12:51:47 +0000 Subject: [issue18754] Run Python child processes in isolated mode in the test suite? In-Reply-To: <1376660404.79.0.733501229055.issue18754@psf.upfronthosting.co.za> Message-ID: <3cxmBW0QRVz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 72b2e7b74307 by Victor Stinner in branch 'default': Close #18754: Run Python child processes in isolated more in the test suite. http://hg.python.org/cpython/rev/72b2e7b74307 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 14:53:13 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 Oct 2013 12:53:13 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <1381582393.12.0.425173311447.issue18758@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch to Sphinx which helped me to search dead internal references. Not all references were fixed by proposed patches. ---------- Added file: http://bugs.python.org/file32061/sphinx_warn_refs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 14:54:42 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Oct 2013 12:54:42 +0000 Subject: [issue19233] test_io.test_interrupted_write_retry_text() hangs on Solaris 10 and FreeBSD 7.2 Message-ID: <1381582482.49.0.0638429802819.issue19233@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20FreeBSD%207.2%203.x/builds/4531/steps/test/logs/stdio [136/380] test_io Timeout (1:00:00)! Thread 0x28401040: File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/test/test_io.py", line 3215 in check_interrupted_write_retry File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/test/test_io.py", line 3237 in test_interrupted_write_retry_text File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/unittest/case.py", line 571 in run File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/unittest/case.py", line 610 in __call__ File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/unittest/suite.py", line 117 in run File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/unittest/suite.py", line 79 in __call__ File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/unittest/suite.py", line 117 in run File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/unittest/suite.py", line 79 in __call__ File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/unittest/suite.py", line 117 in run File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/unittest/suite.py", line 79 in __call__ File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/unittest/runner.py", line 168 in run File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/test/support/__init__.py", line 1661 in _run_suite File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/test/support/__init__.py", line 1695 in run_unittest File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/test/regrtest.py", line 1275 in File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/test/regrtest.py", line 1276 in runtest_inner File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/test/regrtest.py", line 965 in runtest File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/test/regrtest.py", line 761 in main File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/test/regrtest.py", line 1560 in main_in_temp_cwd File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/test/__main__.py", line 3 in File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/runpy.py", line 73 in _run_code File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/runpy.py", line 160 in _run_module_as_main and http://buildbot.python.org/all/builders/SPARC%20Solaris%2010%20%28cc%2C%2064b%29%20%5BSB%5D%203.x/builds/980/steps/test/logs/stdio [324/377/2] test_io Timeout (1:00:00)! Thread 0x0000000000000001: File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/test/test_io.py", line 3215 in check_interrupted_write_retry File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/test/test_io.py", line 3237 in test_interrupted_write_retry_text File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/unittest/case.py", line 496 in run File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/unittest/case.py", line 535 in __call__ File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/unittest/suite.py", line 105 in run File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/unittest/suite.py", line 67 in __call__ File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/unittest/suite.py", line 105 in run File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/unittest/suite.py", line 67 in __call__ File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/unittest/suite.py", line 105 in run File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/unittest/suite.py", line 67 in __call__ File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/unittest/runner.py", line 168 in run File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/test/support/__init__.py", line 1624 in _run_suite File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/test/support/__init__.py", line 1658 in run_unittest File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/test/regrtest.py", line 1304 in File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/test/regrtest.py", line 1305 in runtest_inner File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/test/regrtest.py", line 998 in runtest File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/test/regrtest.py", line 796 in main File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/test/regrtest.py", line 1590 in main_in_temp_cwd File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/test/__main__.py", line 3 in File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/runpy.py", line 73 in _run_code File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/runpy.py", line 160 in _run_module_as_main ---------- messages: 199561 nosy: haypo priority: normal severity: normal status: open title: test_io.test_interrupted_write_retry_text() hangs on Solaris 10 and FreeBSD 7.2 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 14:55:01 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 Oct 2013 12:55:01 +0000 Subject: [issue19131] Broken support of compressed AIFC files In-Reply-To: <1380482642.92.0.440951147189.issue19131@psf.upfronthosting.co.za> Message-ID: <1381582501.26.0.414482577882.issue19131@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 15:00:25 2013 From: report at bugs.python.org (Stefan Krah) Date: Sat, 12 Oct 2013 13:00:25 +0000 Subject: [issue19232] Speed up _decimal import In-Reply-To: <1381579399.63.0.316110193187.issue19232@psf.upfronthosting.co.za> Message-ID: <1381582825.81.0.0854756913829.issue19232@psf.upfronthosting.co.za> Stefan Krah added the comment: Right, let's start collecting objections. :) Mark, Raymond: Would you support the change (__name__ hack and all)? Maciej: Is this approach a problem for PyPy? ---------- nosy: +fijall, mark.dickinson, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 15:01:53 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Oct 2013 13:01:53 +0000 Subject: [issue19205] Don't import re and sysconfig in site.py In-Reply-To: <1381324834.76.0.705779220837.issue19205@psf.upfronthosting.co.za> Message-ID: <1381582913.88.0.39406413109.issue19205@psf.upfronthosting.co.za> STINNER Victor added the comment: > New changeset a57dfbba91f9 by Christian Heimes in branch 'default': > Issue #19205: add debugging output for failing test on Snow Leopard > http://hg.python.org/cpython/rev/a57dfbba91f9 So the "import re" comes from _osx_support, _osx_support is imported by sysconfig. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 15:02:22 2013 From: report at bugs.python.org (Stefan Krah) Date: Sat, 12 Oct 2013 13:02:22 +0000 Subject: [issue19232] Speed up _decimal import In-Reply-To: <1381579399.63.0.316110193187.issue19232@psf.upfronthosting.co.za> Message-ID: <1381582942.8.0.523503873401.issue19232@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 15:08:07 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Oct 2013 13:08:07 +0000 Subject: [issue19232] Speed up _decimal import In-Reply-To: <1381579399.63.0.316110193187.issue19232@psf.upfronthosting.co.za> Message-ID: <1381583287.57.0.735324053738.issue19232@psf.upfronthosting.co.za> STINNER Victor added the comment: If the Python implementation is renamed to _pydecimal, I don't expect it to be used in CPython. I never used _pyio in a real application, only for some tests to debug. I don't think that we need the __name__ = 'decimal' "hack". If you really want to keep it, please add at least a comment explaining it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 15:08:59 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Oct 2013 13:08:59 +0000 Subject: [issue19205] Don't import re and sysconfig in site.py In-Reply-To: <1381324834.76.0.705779220837.issue19205@psf.upfronthosting.co.za> Message-ID: <3cxmZL5V0cz7LjV@mail.python.org> Roundup Robot added the comment: New changeset 9f6ef09f6492 by Christian Heimes in branch 'default': Issue #19205: _osx_support uses the re module all over the place. Omit the test for nw. http://hg.python.org/cpython/rev/9f6ef09f6492 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 15:13:46 2013 From: report at bugs.python.org (Stefan Krah) Date: Sat, 12 Oct 2013 13:13:46 +0000 Subject: [issue19229] operator.py: move the Python implementation in the else block of try/except ImportError In-Reply-To: <1381535351.94.0.0685942795619.issue19229@psf.upfronthosting.co.za> Message-ID: <1381583626.77.0.649345860883.issue19229@psf.upfronthosting.co.za> Stefan Krah added the comment: Using the microbenchmark I get (standard version): ./python -m timeit "import sys; modname='operator'" "__import__(modname); del sys.modules[modname]" 1000 loops, best of 3: 460 usec per loop Victor's version: ./python -m timeit "import sys; modname='operator'" "__import__(modname); del sys.modules[modname]" 1000 loops, best of 3: 355 usec per loop Importing _operator directly: ./python -m timeit "import sys; modname='_operator'" "__import__(modname); del sys.modules[modname]" 10000 loops, best of 3: 35.7 usec per loop Extrapolating from what I did with decimal, I guess a _pyoperator version could get down to something like 70 usec. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 15:20:30 2013 From: report at bugs.python.org (Stefan Krah) Date: Sat, 12 Oct 2013 13:20:30 +0000 Subject: [issue19232] Speed up _decimal import In-Reply-To: <1381579399.63.0.316110193187.issue19232@psf.upfronthosting.co.za> Message-ID: <1381584030.88.0.557300525878.issue19232@psf.upfronthosting.co.za> Stefan Krah added the comment: I guess if some of the pickling stuff get's rewritten, we can drop __name__. The other thing is that traditionally the types were "decimal.Decimal" etc., so I'm not sure if it is good idea to have "_decimal.Decimal" and "_pydecimal.Decimal". Of course adding __module__ everywhere is another option. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 15:20:58 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Oct 2013 13:20:58 +0000 Subject: [issue18804] pythorun.c: is_valid_fd() should not duplicate the file descriptor In-Reply-To: <1377126467.82.0.012503473328.issue18804@psf.upfronthosting.co.za> Message-ID: <1381584058.28.0.329374702733.issue18804@psf.upfronthosting.co.za> STINNER Victor added the comment: > Did you encounter this in real life? Well, my initial concern was that dup() creates an inheritable file descriptor. It is unlikely that fork() occurs while is_valid_fd() is called, because is_valid_fd() is only called early during Python initialization. Replacing dup() with _Py_dup() would be overkill: _Py_dup() releases the GIL and raises an exception, which is not needed here. I'm closing the issue. I will reopen it if I find a simple solution to this non-issue :-) ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 15:21:47 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Oct 2013 13:21:47 +0000 Subject: [issue18509] CJK decoders should return MBERR_EXCEPTION on PyUnicodeWriter error In-Reply-To: <1374271247.45.0.0168623931287.issue18509@psf.upfronthosting.co.za> Message-ID: <1381584107.28.0.238080662992.issue18509@psf.upfronthosting.co.za> STINNER Victor added the comment: This is a regression of Python 3.4, so it would be nice to fix it before the Python 3.4 final. ---------- nosy: +larry priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 15:24:20 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Oct 2013 13:24:20 +0000 Subject: [issue19232] Speed up _decimal import In-Reply-To: <1381584030.88.0.557300525878.issue19232@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > The other thing is that traditionally the types were "decimal.Decimal" > etc., so I'm not sure if it is good idea to have "_decimal.Decimal" and > "_pydecimal.Decimal". Why not renaming the _decimal module to decimal? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 15:32:46 2013 From: report at bugs.python.org (Stefan Krah) Date: Sat, 12 Oct 2013 13:32:46 +0000 Subject: [issue19232] Speed up _decimal import In-Reply-To: <1381579399.63.0.316110193187.issue19232@psf.upfronthosting.co.za> Message-ID: <1381584766.71.0.961389755411.issue19232@psf.upfronthosting.co.za> Stefan Krah added the comment: _decimal already lies about its name (for pickling). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 15:36:34 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Oct 2013 13:36:34 +0000 Subject: [issue19221] Upgrade to Unicode 6.3.0 In-Reply-To: <1381438473.54.0.298872784227.issue19221@psf.upfronthosting.co.za> Message-ID: <3cxnB974hSz7Ljr@mail.python.org> Roundup Robot added the comment: New changeset cc1e2f9a569a by Ezio Melotti in branch 'default': #19221: update whatsnew entry about UCD version. http://hg.python.org/cpython/rev/cc1e2f9a569a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 16:04:41 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Oct 2013 14:04:41 +0000 Subject: [issue12187] subprocess.wait() with a timeout uses polling on POSIX In-Reply-To: <1306416741.33.0.363365904037.issue12187@psf.upfronthosting.co.za> Message-ID: <1381586681.76.0.630630828388.issue12187@psf.upfronthosting.co.za> STINNER Victor added the comment: "On BSDs and OS X, you can use kqueue with EVFILT_PROC+NOTE_EXIT to do exactly that. No polling required. Unfortunately there's no Linux equivalent." http://stackoverflow.com/questions/1157700/how-to-wait-for-exit-of-non-children-processes/7477317#7477317 An example: http://doc.geoffgarside.co.uk/kqueue/proc.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 16:09:58 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Oct 2013 14:09:58 +0000 Subject: [issue12187] subprocess.wait() with a timeout uses polling on POSIX In-Reply-To: <1306416741.33.0.363365904037.issue12187@psf.upfronthosting.co.za> Message-ID: <1381586998.25.0.978950721644.issue12187@psf.upfronthosting.co.za> STINNER Victor added the comment: On Linux, it possible to watch processes using a netlink socket: http://www.outflux.net/blog/archives/2010/07/01/reporting-all-execs/ Example: http://users.suse.com/~krahmer/exec-notify.c Python binding (written in Cython) for proc connector: http://debathena.mit.edu/trac/browser/trunk/debathena/debathena/metrics/debathena/metrics/connector.pyx There is just a minor limitation: you must be root (CAP_NET_ADMIN) to use this interface... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 17:25:07 2013 From: report at bugs.python.org (Brett Cannon) Date: Sat, 12 Oct 2013 15:25:07 +0000 Subject: [issue9548] locale can be imported at startup but relies on too many library modules In-Reply-To: <1281380971.62.0.695264636628.issue9548@psf.upfronthosting.co.za> Message-ID: <1381591507.06.0.612950332797.issue9548@psf.upfronthosting.co.za> Brett Cannon added the comment: Just a quick favour to ask people: please post benchmark numbers of startup_nosite and normal_startup with your patches, otherwise we are taking stabs in the dark that the code complexity being suggested is worth it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 17:25:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Oct 2013 15:25:57 +0000 Subject: [issue19131] Broken support of compressed AIFC files In-Reply-To: <1380482642.92.0.440951147189.issue19131@psf.upfronthosting.co.za> Message-ID: <3cxqbz3ZjQz7LjX@mail.python.org> Roundup Robot added the comment: New changeset 567241d794bd by Serhiy Storchaka in branch '2.7': Issue #19131: The aifc module now correctly reads and writes sampwidth of http://hg.python.org/cpython/rev/567241d794bd New changeset 863a92cc9e03 by Serhiy Storchaka in branch '3.3': Issue #19131: The aifc module now correctly reads and writes sampwidth of http://hg.python.org/cpython/rev/863a92cc9e03 New changeset cff4dd674efe by Serhiy Storchaka in branch 'default': Issue #19131: The aifc module now correctly reads and writes sampwidth of http://hg.python.org/cpython/rev/cff4dd674efe ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 17:28:14 2013 From: report at bugs.python.org (Brett Cannon) Date: Sat, 12 Oct 2013 15:28:14 +0000 Subject: [issue19230] Reimplement the keyword module in C In-Reply-To: <1381537991.31.0.762180400628.issue19230@psf.upfronthosting.co.za> Message-ID: <1381591694.49.0.360019014413.issue19230@psf.upfronthosting.co.za> Brett Cannon added the comment: Is there any change in any benchmark? ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 17:32:38 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 12 Oct 2013 15:32:38 +0000 Subject: [issue19232] Speed up _decimal import In-Reply-To: <1381579399.63.0.316110193187.issue19232@psf.upfronthosting.co.za> Message-ID: <1381591958.31.0.864199170746.issue19232@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 17:44:06 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 12 Oct 2013 15:44:06 +0000 Subject: [issue12187] subprocess.wait() with a timeout uses polling on POSIX In-Reply-To: <1381586998.25.0.978950721644.issue12187@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: Honestly, I think the extra complexity and non-portability isn't worth it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 17:52:54 2013 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 12 Oct 2013 15:52:54 +0000 Subject: [issue19108] Benchmark runner tries to execute external Python command and fails on error reporting In-Reply-To: <1380297636.45.0.339184347104.issue19108@psf.upfronthosting.co.za> Message-ID: <1381593174.82.0.252038336493.issue19108@psf.upfronthosting.co.za> Stefan Behnel added the comment: Here's a patch that replaces the current simplistic Python executable command config with a dedicated PythonRuntime config class. That makes it easy to properly pass around the program specific configuration. Part of that is the Python executable path, the Python version, the specific command line arguments and the relative benchmark library path. The patch also adds a "--pyversions" command line option to avoid calling the executable for figuring out the Python versions, as discussed. ---------- keywords: +patch Added file: http://bugs.python.org/file32062/add_pyversions_option_and_refactor_runtime_config.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 17:53:07 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 12 Oct 2013 15:53:07 +0000 Subject: [issue19233] test_io.test_interrupted_write_retry_text() hangs on Solaris 10 and FreeBSD 7.2 In-Reply-To: <1381582482.49.0.0638429802819.issue19233@psf.upfronthosting.co.za> Message-ID: <1381593187.3.0.360299085029.issue19233@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: I think the problem is that those buildbots are really slow (just look at the second buildbot's backlog), and the signal is delivered before the large buffer is allocated, hence the write() syscall doesn't fail with EINTR. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 18:05:51 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Oct 2013 16:05:51 +0000 Subject: [issue9548] locale can be imported at startup but relies on too many library modules In-Reply-To: <1281380971.62.0.695264636628.issue9548@psf.upfronthosting.co.za> Message-ID: <1381593951.3.0.672448564699.issue9548@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here normal_startup and startup_nosite wouldn't show a difference (under Linux anyway) because the locale module is only imported for non-interactive streams, AFAICT. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 18:08:33 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Oct 2013 16:08:33 +0000 Subject: [issue12187] subprocess.wait() with a timeout uses polling on POSIX In-Reply-To: Message-ID: <1381594081.2497.2.camel@fsol> Antoine Pitrou added the comment: > Honestly, I think the extra complexity and non-portability isn't worth it. That's what I think too. If we want to avoid polling, there's another approach: - fork() a first time - fork() in the first child - exec() in the second child - in the first child, call waitpid() and then write() the return code to a fd - in the parent, wait on the fd using select() or poll() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 18:11:23 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Oct 2013 16:11:23 +0000 Subject: [issue8090] PEP 4 should say something about the standard library In-Reply-To: <1268085096.1.0.884411338226.issue8090@psf.upfronthosting.co.za> Message-ID: <3cxrcP731Nz7Ljd@mail.python.org> Roundup Robot added the comment: New changeset f7e3f6a53823 by Georg Brandl in branch 'default': PEP 4: convert to reST, update SourceForge -> bugs.python.org, update DeprecationWarning policy http://hg.python.org/peps/rev/f7e3f6a53823 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 18:13:49 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Oct 2013 16:13:49 +0000 Subject: [issue13203] Doc: say id() is only useful for existing objects In-Reply-To: <1318873835.36.0.466865504792.issue13203@psf.upfronthosting.co.za> Message-ID: <3cxrgc3LrDzSDW@mail.python.org> Roundup Robot added the comment: New changeset 8525cc1f342f by Georg Brandl in branch '2.7': Closes #13203: add a FAQ section about seemingly duplicate id()s. http://hg.python.org/cpython/rev/8525cc1f342f ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 18:14:53 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Oct 2013 16:14:53 +0000 Subject: [issue13203] Doc: say id() is only useful for existing objects In-Reply-To: <1318873835.36.0.466865504792.issue13203@psf.upfronthosting.co.za> Message-ID: <3cxrhR35bxzSDW@mail.python.org> Roundup Robot added the comment: New changeset 0d5de993db66 by Georg Brandl in branch '3.3': Closes #13203: add a FAQ section about seemingly duplicate id()s. http://hg.python.org/cpython/rev/0d5de993db66 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 18:19:21 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Oct 2013 16:19:21 +0000 Subject: [issue19179] doc bug: confusing table of values In-Reply-To: <52514342.6020404@python.org> Message-ID: <3cxrnb6ZPkz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 6b0ca3963ff1 by Georg Brandl in branch '3.3': Closes #19179: make table of XML vulnerabilities clearer by using "everyday" booleans and explaining the table beforehand. http://hg.python.org/cpython/rev/6b0ca3963ff1 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 18:19:29 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Oct 2013 16:19:29 +0000 Subject: [issue19179] doc bug: confusing table of values In-Reply-To: <52514342.6020404@python.org> Message-ID: <3cxrnl3XFSz7Ljs@mail.python.org> Roundup Robot added the comment: New changeset 9aae58596349 by Georg Brandl in branch '2.7': Closes #19179: make table of XML vulnerabilities clearer by using "everyday" booleans and explaining the table beforehand. http://hg.python.org/cpython/rev/9aae58596349 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 18:19:40 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 12 Oct 2013 16:19:40 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <1381594780.74.0.124990857275.issue18758@psf.upfronthosting.co.za> Georg Brandl added the comment: The -n (nitpicky) option to Sphinx should also report missing references. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 18:20:50 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 12 Oct 2013 16:20:50 +0000 Subject: [issue19202] Additions to function docs: reduce and itertools. In-Reply-To: <1381313356.45.0.650070848794.issue19202@psf.upfronthosting.co.za> Message-ID: <1381594850.81.0.770039137508.issue19202@psf.upfronthosting.co.za> Georg Brandl added the comment: What do you think of the two references added to the itertools docs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 18:24:10 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 12 Oct 2013 16:24: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: <1381595050.31.0.56592326074.issue16355@psf.upfronthosting.co.za> Georg Brandl added the comment: "lives in the interactive shell" is not precise; I would prefer "has been defined in ...". ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 18:26:00 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 12 Oct 2013 16:26:00 +0000 Subject: [issue18177] Incorect quote marks in code section-headers in PDF version of docs In-Reply-To: <1370829780.84.0.0627044566719.issue18177@psf.upfronthosting.co.za> Message-ID: <1381595160.05.0.471070099703.issue18177@psf.upfronthosting.co.za> Georg Brandl added the comment: Yes, there is already one or two issues there (e.g. number 1239). ---------- resolution: -> invalid status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 18:33:57 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 12 Oct 2013 16:33:57 +0000 Subject: [issue19234] socket.fileno() documentation In-Reply-To: <1984648.JD0MPFlghQ@noisy.pr41.sk> Message-ID: <52597A2F.60807@python.org> New submission from Georg Brandl: -------- Original-Nachricht -------- Betreff: [docs] socket.fileno() documentation Datum: Thu, 10 Oct 2013 19:27:35 +0200 Von: Vlado Potisk An: docs at python.org I might be wrong but in my opinion the socket library documentation is not clear enough regarding the behaviour of the fileno() method in a case of a failure. In the Python 3.2 socket library documentation there is: ---- exception socket.error A subclass of IOError, this exception is raised for socket-related errors. ----- socket.close() Close the socket. All future operations on the socket object will fail. ---- socket.fileno() Return the socket?s file descriptor (a small integer). ---- Based on the information quoted above, I wrote a test if a socket is active or if it has been closed already: try: sock.fileno() except socket.error: return False return True But is doesn't work. I have found out that fileno() returns -1 on a closed socket. Replacing fileno() with e.g. getsockname() fixes the code. It looks like a fileno's failure - unlike to getsockname's failure - is not expressed by raising an exception, but by returning -1. However this seems to be not documented and that's why I'm unsure if I may rely on this. ---------- assignee: docs at python components: Documentation messages: 199592 nosy: docs at python, georg.brandl priority: normal severity: normal status: open title: socket.fileno() documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 18:40:36 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Oct 2013 16:40:36 +0000 Subject: [issue13026] Dis module - documentation of MAKE_FUNCTION In-Reply-To: <1316642558.64.0.601129278503.issue13026@psf.upfronthosting.co.za> Message-ID: <3cxsGW63LtzPXl@mail.python.org> Roundup Robot added the comment: New changeset b9ab48c491d5 by Georg Brandl in branch '3.3': Closes #13026: fix documentation of MAKE_FUNCTION for 3.x. http://hg.python.org/cpython/rev/b9ab48c491d5 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 18:41:44 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 12 Oct 2013 16:41:44 +0000 Subject: [issue19234] socket.fileno() documentation In-Reply-To: <52597A2F.60807@python.org> Message-ID: <1381596104.78.0.835367268719.issue19234@psf.upfronthosting.co.za> R. David Murray added the comment: See also issue 19154. For consistency with the rest of Python it should probably raise ValueError. But at this point it has done what it does for a long time (which is to return what the underlying posix function returns), so we should probably just document it. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 18:41:47 2013 From: report at bugs.python.org (Elazar Gershuni) Date: Sat, 12 Oct 2013 16:41:47 +0000 Subject: [issue19235] Add a dedicated subclass for recursion errors Message-ID: <1381596107.9.0.320701037292.issue19235@psf.upfronthosting.co.za> New submission from Elazar Gershuni: There's no dedicated StackOverflowErrorException, So there is no way to accurately distinguish a recursion overflow from a general RuntimeError. One cannot use the exception message, since the docs explicitly says that "Exception messages are not part of the Python API", and checking for len(traceback.extract_tb(trace)) >= sys.getrecursionlimit()-1 is ugly, and (AFAIK) not guaranteed to be correct. Use case: I've found this while trying to create a cycle detector that will compress the traceback of such errors. See discussion in python-ideas: https://mail.python.org/pipermail/python-ideas/2013-September/023190.html An cycle-detection implementation: http://code.activestate.com/recipes/578660-concise-output-for-maximum-recursion-depth-exceede/ ---------- components: Library (Lib) messages: 199595 nosy: elazar priority: normal severity: normal status: open title: Add a dedicated subclass for recursion errors type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 18:43:48 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Oct 2013 16:43:48 +0000 Subject: [issue13905] Built-in Types Comparisons should mention rich comparison methods In-Reply-To: <1327867132.3.0.913390477966.issue13905@psf.upfronthosting.co.za> Message-ID: <3cxsKp5lVHz7Ljk@mail.python.org> Roundup Robot added the comment: New changeset 9f1e1da820fb by Georg Brandl in branch '2.7': Closes #13905: mention rich-comparison methods in addition to __cmp__ when documenting how to make classes comparable and orderable. http://hg.python.org/cpython/rev/9f1e1da820fb ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 18:44:14 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 12 Oct 2013 16:44:14 +0000 Subject: [issue19202] Additions to function docs: reduce and itertools. In-Reply-To: <1381313356.45.0.650070848794.issue19202@psf.upfronthosting.co.za> Message-ID: <1381596254.94.0.375288742729.issue19202@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The reference from accumulate() to reduce() may be useful. I'm opposed to most of the other equivalents and cross-references. They bloat the docs without adding value. Terry is right in saying that the equivalent for enumerate() is better as a basic loop than as a composition of functional tools. I think the OP has missed what the purpose of the code equivalents was trying to do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 18:48:47 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 12 Oct 2013 16:48:47 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1381596527.92.0.61222270103.issue15805@psf.upfronthosting.co.za> Georg Brandl added the comment: Whatsnew: yes please. As for your second point, I assume Raymond wanted to exemplify usage with an "unfortunate" API that prints to stderr with no option to change it. It just turned out that dis() is not one of those APIs. For purposes of print(), you're almost always better off using file=x on each print you do. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 18:51:52 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 12 Oct 2013 16:51:52 +0000 Subject: [issue19202] Additions to function docs: reduce and itertools. In-Reply-To: <1381313356.45.0.650070848794.issue19202@psf.upfronthosting.co.za> Message-ID: <1381596712.8.0.849977286318.issue19202@psf.upfronthosting.co.za> Georg Brandl added the comment: I agree. Will prepare a patch to the reduce() doc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 18:55:14 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 12 Oct 2013 16:55:14 +0000 Subject: [issue19202] Additions to function docs: reduce and itertools. In-Reply-To: <1381313356.45.0.650070848794.issue19202@psf.upfronthosting.co.za> Message-ID: <1381596914.49.0.631501112042.issue19202@psf.upfronthosting.co.za> Changes by Georg Brandl : Added file: http://bugs.python.org/file32063/reduce_equiv.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 18:57:29 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Oct 2013 16:57:29 +0000 Subject: [issue12187] subprocess.wait() with a timeout uses polling on POSIX In-Reply-To: <1381594081.2497.2.camel@fsol> Message-ID: STINNER Victor added the comment: For the PEP 446 (non inheritable files and sockets), it was discussed to write a helper similar to what Antoine proposes, but to only inherit a few handles instead all inherit all (inheritable) handles. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 19:00:51 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 12 Oct 2013 17:00:51 +0000 Subject: [issue18582] PBKDF2 support In-Reply-To: <1375024279.36.0.0953079533445.issue18582@psf.upfronthosting.co.za> Message-ID: <1381597251.97.0.912609209724.issue18582@psf.upfronthosting.co.za> Christian Heimes added the comment: Done ---------- stage: -> patch review Added file: http://bugs.python.org/file32064/pbkdf2_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 19:02:58 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Oct 2013 17:02:58 +0000 Subject: [issue13833] No documentation for PyStructSequence In-Reply-To: <1327010174.09.0.407534369688.issue13833@psf.upfronthosting.co.za> Message-ID: <3cxsmK4TzSz7Lk8@mail.python.org> Roundup Robot added the comment: New changeset 05dcaf761c7d by Georg Brandl in branch '3.3': Closes #13833: document PyStructSequence C-API functions. http://hg.python.org/cpython/rev/05dcaf761c7d ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 19:11:43 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 12 Oct 2013 17:11:43 +0000 Subject: [issue19224] Make hash(None) consistent among processes In-Reply-To: <1381464221.0.0.181699047962.issue19224@psf.upfronthosting.co.za> Message-ID: <1381597903.68.0.650106805503.issue19224@psf.upfronthosting.co.za> Raymond Hettinger added the comment: There seems to be a pretty good consensus that this is something we don't want to support. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 19:12:46 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 12 Oct 2013 17:12:46 +0000 Subject: [issue13915] Update tutorial/modules for PEP 3147 In-Reply-To: <1328053198.63.0.994035147287.issue13915@psf.upfronthosting.co.za> Message-ID: <1381597966.79.0.0947699578507.issue13915@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks for the suggestion! ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 19:13:02 2013 From: report at bugs.python.org (Elazar Gershuni) Date: Sat, 12 Oct 2013 17:13:02 +0000 Subject: [issue19235] Add a dedicated subclass for recursion errors In-Reply-To: <1381596107.9.0.320701037292.issue19235@psf.upfronthosting.co.za> Message-ID: <1381597982.06.0.716587600204.issue19235@psf.upfronthosting.co.za> Changes by Elazar Gershuni : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 19:12:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Oct 2013 17:12:51 +0000 Subject: [issue13915] Update tutorial/modules for PEP 3147 In-Reply-To: <1328053198.63.0.994035147287.issue13915@psf.upfronthosting.co.za> Message-ID: <3cxszk3hYgzSyF@mail.python.org> Roundup Robot added the comment: New changeset 6ecef57f57f9 by Georg Brandl in branch '3.3': Closes #13915: update tutorial with respect to .pyc files (__pycache__ / PEP 3147). http://hg.python.org/cpython/rev/6ecef57f57f9 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 19:18:49 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 12 Oct 2013 17:18:49 +0000 Subject: [issue19224] Make hash(None) consistent among processes In-Reply-To: <1381464221.0.0.181699047962.issue19224@psf.upfronthosting.co.za> Message-ID: <1381598329.01.0.166705694291.issue19224@psf.upfronthosting.co.za> Christian Heimes added the comment: Tim has convinced me, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 19:41:02 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 12 Oct 2013 17:41:02 +0000 Subject: [issue19235] Add a dedicated subclass for recursion errors In-Reply-To: <1381596107.9.0.320701037292.issue19235@psf.upfronthosting.co.za> Message-ID: <1381599662.69.0.186745210077.issue19235@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 19:57:35 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Oct 2013 17:57:35 +0000 Subject: [issue19235] Add a dedicated subclass for recursion errors In-Reply-To: <1381596107.9.0.320701037292.issue19235@psf.upfronthosting.co.za> Message-ID: <1381600655.02.0.904832904245.issue19235@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This sounds like a reasonable feature request to me. ---------- components: +Interpreter Core -Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 19:59:51 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 12 Oct 2013 17:59:51 +0000 Subject: [issue19235] Add a dedicated subclass for recursion errors In-Reply-To: <1381596107.9.0.320701037292.issue19235@psf.upfronthosting.co.za> Message-ID: <1381600791.83.0.395249453342.issue19235@psf.upfronthosting.co.za> Georg Brandl added the comment: I agree. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 20:14:17 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 12 Oct 2013 18:14:17 +0000 Subject: [issue4965] Can doc index of html version be separately scrollable? In-Reply-To: <1232148633.29.0.602528403512.issue4965@psf.upfronthosting.co.za> Message-ID: <1381601657.71.0.396670714359.issue4965@psf.upfronthosting.co.za> Georg Brandl added the comment: See http://sphinx-doc.org/latest/ for my preferred solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 20:23:03 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 Oct 2013 18:23:03 +0000 Subject: [issue19131] Broken support of compressed AIFC files In-Reply-To: <1380482642.92.0.440951147189.issue19131@psf.upfronthosting.co.za> Message-ID: <1381602183.21.0.200695901263.issue19131@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 20:31:50 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 12 Oct 2013 18:31:50 +0000 Subject: [issue11233] clarifying Availability: Unix In-Reply-To: <1297969399.53.0.187875867799.issue11233@psf.upfronthosting.co.za> Message-ID: <1381602710.42.0.784812432645.issue11233@psf.upfronthosting.co.za> Georg Brandl added the comment: A draft is attached. The directive currently just always links to the "availability" notes, which I have moved to the main "Operating system services" document. Please review! ---------- keywords: +patch Added file: http://bugs.python.org/file32065/availability-directive.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 20:39:12 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Oct 2013 18:39:12 +0000 Subject: [issue18919] Unify audio modules tests In-Reply-To: <1378293110.61.0.780572869606.issue18919@psf.upfronthosting.co.za> Message-ID: <3cxvtz0gmmzS2g@mail.python.org> Roundup Robot added the comment: New changeset 3303d735058f by Serhiy Storchaka in branch '2.7': Issue #18919: If the close() method of a writer in the sunau or wave module http://hg.python.org/cpython/rev/3303d735058f New changeset b7eae747385c by Serhiy Storchaka in branch '3.3': Issue #18919: If the close() method of a writer in the sunau or wave module http://hg.python.org/cpython/rev/b7eae747385c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 20:47:36 2013 From: report at bugs.python.org (Stefan Krah) Date: Sat, 12 Oct 2013 18:47:36 +0000 Subject: [issue19232] Speed up _decimal import In-Reply-To: <1381579399.63.0.316110193187.issue19232@psf.upfronthosting.co.za> Message-ID: <1381603656.47.0.600513118583.issue19232@psf.upfronthosting.co.za> Stefan Krah added the comment: I can't apply the patch that was created with diff --git, so here is another one that is less readable but applies. ---------- Added file: http://bugs.python.org/file32066/issue19232-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 21:15:31 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Oct 2013 19:15:31 +0000 Subject: [issue19236] Add Tornado HTTP benchmark Message-ID: <1381605331.62.0.22076893629.issue19236@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Tornado 3.1.1 is compatible with Python 2.6, 2.7, 3.2 and upwards, which makes it a good candidate for a networking benchmark. Here is a patch adding a HTTP (server + client) benchmark. A trivial HTTP server is spawned which writes a sizable body in response to requests. HTTP clients then connect with a certain amount of concurrency and fetch the HTTP server's resource. (note: the patch omits the Tornado lib itself for readability) ---------- files: tornado_bench.patch keywords: patch messages: 199613 nosy: brett.cannon, pitrou priority: normal severity: normal stage: patch review status: open title: Add Tornado HTTP benchmark type: enhancement versions: 3rd party Added file: http://bugs.python.org/file32067/tornado_bench.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 21:37:09 2013 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 12 Oct 2013 19:37:09 +0000 Subject: [issue19236] Add Tornado HTTP benchmark In-Reply-To: <1381605331.62.0.22076893629.issue19236@psf.upfronthosting.co.za> Message-ID: <1381606629.44.0.490861634029.issue19236@psf.upfronthosting.co.za> Changes by Stefan Behnel : ---------- components: +Benchmarks nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 21:54:19 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 12 Oct 2013 19:54:19 +0000 Subject: [issue19236] Add Tornado HTTP benchmark In-Reply-To: <1381605331.62.0.22076893629.issue19236@psf.upfronthosting.co.za> Message-ID: <1381607659.16.0.438074473017.issue19236@psf.upfronthosting.co.za> Gregory P. Smith added the comment: makes sense to me. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 21:58:02 2013 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 12 Oct 2013 19:58:02 +0000 Subject: [issue19236] Add Tornado HTTP benchmark In-Reply-To: <1381605331.62.0.22076893629.issue19236@psf.upfronthosting.co.za> Message-ID: <1381607882.48.0.482628158442.issue19236@psf.upfronthosting.co.za> Stefan Behnel added the comment: +1. Does it give reasonably predictable timings? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 22:01:38 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Oct 2013 20:01:38 +0000 Subject: [issue19236] Add Tornado HTTP benchmark In-Reply-To: <1381607882.48.0.482628158442.issue19236@psf.upfronthosting.co.za> Message-ID: <1381608066.2497.3.camel@fsol> Antoine Pitrou added the comment: > +1. Does it give reasonably predictable timings? Yes. There is a small warmup phase at the beginning (the first few rounds are skipped). The benchmark eats 100% CPU on one core, mostly userspace (at least under Linux). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 22:25:53 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Oct 2013 20:25:53 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <3cxyGT1242z7Lk9@mail.python.org> Roundup Robot added the comment: New changeset 4059e871e74e by Antoine Pitrou in branch 'default': Issue #19219: Speed up marshal.loads(), and make pyc files slightly (5% to 10%) smaller. http://hg.python.org/cpython/rev/4059e871e74e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 22:31:16 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Oct 2013 20:31:16 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381609876.59.0.0189352209325.issue19219@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've now committed the latest patch (marshal_opts5.patch). ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 22:34:38 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Oct 2013 20:34:38 +0000 Subject: [issue19232] Speed up _decimal import In-Reply-To: <1381579399.63.0.316110193187.issue19232@psf.upfronthosting.co.za> Message-ID: <1381610078.53.0.73103220481.issue19232@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I can't apply the patch that was created with diff --git, so here is > another one that is less readable but applies. You can apply it using "hg import --no-commit", I think. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 22:35:37 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Oct 2013 20:35:37 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1381610137.75.0.311524044668.issue16203@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Serhiy, sorry to ping you, but do you think you're gonna look at this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 22:38:08 2013 From: report at bugs.python.org (Ethan Furman) Date: Sat, 12 Oct 2013 20:38:08 +0000 Subject: [issue18281] tarfile defines stat constants In-Reply-To: <1371912078.43.0.227039082522.issue18281@psf.upfronthosting.co.za> Message-ID: <1381610288.57.0.500098207629.issue18281@psf.upfronthosting.co.za> Ethan Furman added the comment: Sounds like we have a consensus. If no objections I'll commit in four or five days (in time for the last alpha). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 22:38:51 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Oct 2013 20:38:51 +0000 Subject: [issue12186] readline.replace_history_item still leaks memory In-Reply-To: <1306412402.14.0.859641157612.issue12186@psf.upfronthosting.co.za> Message-ID: <1381610331.55.0.423314615596.issue12186@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo stage: -> patch review versions: -Python 2.6, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 22:54:48 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Oct 2013 20:54:48 +0000 Subject: [issue4555] Smelly exports (global symbols in python not prefixed with Py or _Py) In-Reply-To: <1228526950.62.0.716618083363.issue4555@psf.upfronthosting.co.za> Message-ID: <3cxyvR0BgJz7LjT@mail.python.org> Roundup Robot added the comment: New changeset 142c62a490ce by Antoine Pitrou in branch 'default': Issue #4555: All exported C symbols are now prefixed with either "Py" or "_Py". http://hg.python.org/cpython/rev/142c62a490ce ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 23:08:22 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Oct 2013 21:08:22 +0000 Subject: [issue4555] Smelly exports (global symbols in python not prefixed with Py or _Py) In-Reply-To: <1228526950.62.0.716618083363.issue4555@psf.upfronthosting.co.za> Message-ID: <1381612102.44.0.134761803849.issue4555@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 23:24:42 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Oct 2013 21:24:42 +0000 Subject: [issue11233] clarifying Availability: Unix In-Reply-To: <1297969399.53.0.187875867799.issue11233@psf.upfronthosting.co.za> Message-ID: <1381613082.1.0.136663699833.issue11233@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I can't comment on the Sphinx extension code but this is a good idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 23:39:45 2013 From: report at bugs.python.org (CliffM) Date: Sat, 12 Oct 2013 21:39:45 +0000 Subject: [issue19237] Proposal : LCM function to complement GCD Message-ID: <1381613985.13.0.579421159234.issue19237@psf.upfronthosting.co.za> New submission from CliffM: While implementing a Least-Common-Multiple function (LCM), I noticed that although python has a Greatest-Common-Divisor (GCD) function in the fractions module, the LCM, its counterpart is not there. I've attached a patch which implements and tests LCM in the fractions module. It would really need documentation, but maybe GCD and LCD should be moved to the math module first ? ---------- components: Extension Modules files: lcm.patch keywords: patch messages: 199624 nosy: CliffM priority: normal severity: normal status: open title: Proposal : LCM function to complement GCD type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32068/lcm.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 23:41:42 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 12 Oct 2013 21:41:42 +0000 Subject: [issue18891] Master patch for content manager addtion to email package. In-Reply-To: <1377918603.72.0.362957249668.issue18891@psf.upfronthosting.co.za> Message-ID: <1381614102.82.0.739405603435.issue18891@psf.upfronthosting.co.za> R. David Murray added the comment: Updated patch to address Serhiy's review comments. Also noticed a bug and fixed it, adding a new 'is_attachment' attribute to EmailMessage/MIMEPart to do so. ---------- Added file: http://bugs.python.org/file32069/master_content_manager.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 23:46:02 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Oct 2013 21:46:02 +0000 Subject: [issue18582] PBKDF2 support In-Reply-To: <1375024279.36.0.0953079533445.issue18582@psf.upfronthosting.co.za> Message-ID: <1381614362.77.0.931824139963.issue18582@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The patch looks good at first sight. It still needs docs and tests :) Just one thing: are we sure PKCS5_PBKDF2_HMAC is defined on old OpenSSL versions, or does it need a #ifdef? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 23:47:43 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 12 Oct 2013 21:47:43 +0000 Subject: [issue18281] tarfile defines stat constants In-Reply-To: <1371912078.43.0.227039082522.issue18281@psf.upfronthosting.co.za> Message-ID: <1381614463.13.0.966848154186.issue18281@psf.upfronthosting.co.za> Christian Heimes added the comment: Yes, please commit your patch. I totally wanted to reply to your mail but I was distracted by other things. Sorry! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 00:03:50 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 12 Oct 2013 22:03:50 +0000 Subject: [issue18582] PBKDF2 support In-Reply-To: <1375024279.36.0.0953079533445.issue18582@psf.upfronthosting.co.za> Message-ID: <1381615430.39.0.865721756286.issue18582@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file31067/pbkdf2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 00:05:09 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 12 Oct 2013 22:05:09 +0000 Subject: [issue18582] PBKDF2 support In-Reply-To: <1375024279.36.0.0953079533445.issue18582@psf.upfronthosting.co.za> Message-ID: <1381615509.34.0.938552408417.issue18582@psf.upfronthosting.co.za> Christian Heimes added the comment: Here is a new patch with tests, documentation and some minor improvements. The last argument is now called dklen. If dklen is omitted or None than dklen is set to digest size of the hash algorithm. ---------- Added file: http://bugs.python.org/file32070/pbkdf2_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 00:12:54 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 12 Oct 2013 22:12:54 +0000 Subject: [issue9951] introduce bytes.hex method In-Reply-To: <1285457928.18.0.422778723123.issue9951@psf.upfronthosting.co.za> Message-ID: <1381615974.82.0.299163733738.issue9951@psf.upfronthosting.co.za> Christian Heimes added the comment: I like to see the feature in 3.4, too. ---------- nosy: +christian.heimes stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 00:14:05 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 12 Oct 2013 22:14:05 +0000 Subject: [issue18582] PBKDF2 support In-Reply-To: <1375024279.36.0.0953079533445.issue18582@psf.upfronthosting.co.za> Message-ID: <1381616045.25.0.046078670847.issue18582@psf.upfronthosting.co.za> Christian Heimes added the comment: Fixed copy n' paste bug in docs. ---------- Added file: http://bugs.python.org/file32071/pbkdf2_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 00:14:10 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 12 Oct 2013 22:14:10 +0000 Subject: [issue18582] PBKDF2 support In-Reply-To: <1375024279.36.0.0953079533445.issue18582@psf.upfronthosting.co.za> Message-ID: <1381616050.72.0.659696069678.issue18582@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file32070/pbkdf2_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 00:14:17 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 12 Oct 2013 22:14:17 +0000 Subject: [issue18582] PBKDF2 support In-Reply-To: <1375024279.36.0.0953079533445.issue18582@psf.upfronthosting.co.za> Message-ID: <1381616057.8.0.424299628411.issue18582@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file32064/pbkdf2_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 00:16:42 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Oct 2013 22:16:42 +0000 Subject: [issue9951] introduce bytes.hex method In-Reply-To: <1285457928.18.0.422778723123.issue9951@psf.upfronthosting.co.za> Message-ID: <1381616202.83.0.98043500411.issue9951@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If it's the reverse of fromhex(), perhaps we should call it tohex()? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 00:17:33 2013 From: report at bugs.python.org (Ethan Furman) Date: Sat, 12 Oct 2013 22:17:33 +0000 Subject: [issue18281] tarfile defines stat constants In-Reply-To: <1381614463.13.0.966848154186.issue18281@psf.upfronthosting.co.za> Message-ID: <5259CA7E.1020401@stoneleaf.us> Ethan Furman added the comment: Cool, thanks! I didn't want to step on any toes. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 00:27:49 2013 From: report at bugs.python.org (David Chambers) Date: Sat, 12 Oct 2013 22:27:49 +0000 Subject: [issue19238] Misleading explanation of fill and align in format_spec Message-ID: <1381616869.75.0.196962613989.issue19238@psf.upfronthosting.co.za> New submission from David Chambers: >From http://docs.python.org/3/library/string.html#formatspec: > The presence of a fill character is signaled by the character > following it, which must be one of the alignment options. If the > second character of format_spec is not a valid alignment option, > then it is assumed that both the fill character and the alignment > option are absent. The fact that the second character in the format_spec is not an alignment option is not sufficient to declare that the alignment option is absent: the alignment option may be the first character in the format_spec. For example: >>> '{:^10}'.format(42) ' 42 ' I suggest the following wording: The presence of a fill character is signaled by the character following it, which must be one of the alignment options. Unless the second character of format_spec is a valid alignment option, the fill character is assumed to be absent. ---------- assignee: docs at python components: Documentation messages: 199633 nosy: davidchambers, docs at python priority: normal severity: normal status: open title: Misleading explanation of fill and align in format_spec _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 00:35:06 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 12 Oct 2013 22:35:06 +0000 Subject: [issue9951] introduce bytes.hex method In-Reply-To: <1285457928.18.0.422778723123.issue9951@psf.upfronthosting.co.za> Message-ID: <1381617306.78.0.881695786352.issue9951@psf.upfronthosting.co.za> Christian Heimes added the comment: Funny thing. I was searching for "tohex" when I found this ticket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 00:35:29 2013 From: report at bugs.python.org (Ethan Furman) Date: Sat, 12 Oct 2013 22:35:29 +0000 Subject: [issue19239] add inspect functions to Message-ID: <1381617329.76.0.628803647816.issue19239@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: ethan.furman priority: normal severity: normal status: open title: add inspect functions to _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 00:38:26 2013 From: report at bugs.python.org (Ethan Furman) Date: Sat, 12 Oct 2013 22:38:26 +0000 Subject: [issue19239] add inspect functions to retrieve attributes from both old dir() and overridden dir() Message-ID: <1381617506.87.0.926836334477.issue19239@psf.upfronthosting.co.za> New submission from Ethan Furman: Currently we have - inspect.getmembers - inspect.classify_class_attrs But they only return what dir() returns. It is proposed that we add - inspect.get_all_members - inspect.classify_all_class_attrs which will look at all the attributes returned by both the original dir() and the overridden dir(). ---------- title: add inspect functions to -> add inspect functions to retrieve attributes from both old dir() and overridden dir() type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 00:52:53 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Oct 2013 22:52:53 +0000 Subject: [issue18582] PBKDF2 support In-Reply-To: <1375024279.36.0.0953079533445.issue18582@psf.upfronthosting.co.za> Message-ID: <3cy1X51BGqz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 5fd56d6d3fce by Christian Heimes in branch 'default': Issue #18582: Add 'pbkdf2_hmac' to the hashlib module. http://hg.python.org/cpython/rev/5fd56d6d3fce ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 00:58:12 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Oct 2013 22:58:12 +0000 Subject: [issue18458] libedit history offset workaround In-Reply-To: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> Message-ID: <3cy1fD14X1zSlP@mail.python.org> Roundup Robot added the comment: New changeset 1e03fd72e116 by Ned Deily in branch '2.7': Issue #18458: Prevent crashes with newer versions of libedit. Its readline http://hg.python.org/cpython/rev/1e03fd72e116 New changeset dfb7cab9f819 by Ned Deily in branch '3.3': Issue #18458: Prevent crashes with newer versions of libedit. Its readline http://hg.python.org/cpython/rev/dfb7cab9f819 New changeset 47a7313f079a by Ned Deily in branch 'default': Issue #18458: merge comments from 3.3 http://hg.python.org/cpython/rev/47a7313f079a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 01:04:07 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 12 Oct 2013 23:04:07 +0000 Subject: [issue18458] interactive interpreter crashes and test_readline fails with newer versions of libedit In-Reply-To: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> Message-ID: <1381619046.99.0.5830094526.issue18458@psf.upfronthosting.co.za> Ned Deily added the comment: Backported to 2.7 (for 2.7.6) and 3.3 (for 3.3.3) as well. The current test_readline already covers this case. ---------- keywords: -needs review resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed title: libedit history offset workaround -> interactive interpreter crashes and test_readline fails with newer versions of libedit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 01:05:09 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Oct 2013 23:05:09 +0000 Subject: [issue19202] Additions to function docs: reduce and itertools. In-Reply-To: <1381313356.45.0.650070848794.issue19202@psf.upfronthosting.co.za> Message-ID: <3cy1nq30zLz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 3b6401c27e39 by Raymond Hettinger in branch '3.3': Issue #19202: Add cross-reference and a rough code equivalent http://hg.python.org/cpython/rev/3b6401c27e39 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 01:05:51 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 12 Oct 2013 23:05:51 +0000 Subject: [issue19202] Additions to function docs: reduce and itertools. In-Reply-To: <1381313356.45.0.650070848794.issue19202@psf.upfronthosting.co.za> Message-ID: <1381619151.18.0.77334444739.issue19202@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks Georg. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 01:16:20 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 12 Oct 2013 23:16:20 +0000 Subject: [issue18582] PBKDF2 support In-Reply-To: <1375024279.36.0.0953079533445.issue18582@psf.upfronthosting.co.za> Message-ID: <1381619780.96.0.761335457066.issue18582@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks Antoine! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 01:22:47 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Oct 2013 23:22:47 +0000 Subject: [issue19237] Proposal : LCM function to complement GCD In-Reply-To: <1381613985.13.0.579421159234.issue19237@psf.upfronthosting.co.za> Message-ID: <1381620167.62.0.765544667952.issue19237@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 01:22:52 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Oct 2013 23:22:52 +0000 Subject: [issue19237] Proposal : LCM function to complement GCD In-Reply-To: <1381613985.13.0.579421159234.issue19237@psf.upfronthosting.co.za> Message-ID: <1381620172.76.0.315448677202.issue19237@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 01:31:20 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 12 Oct 2013 23:31:20 +0000 Subject: [issue19238] Misleading explanation of fill and align in format_spec In-Reply-To: <1381616869.75.0.196962613989.issue19238@psf.upfronthosting.co.za> Message-ID: <1381620680.59.0.347469922872.issue19238@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 01:35:39 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 12 Oct 2013 23:35:39 +0000 Subject: [issue19218] Use of MutableMapping in os module slows down interpreter startup In-Reply-To: <1381428481.39.0.771776860266.issue19218@psf.upfronthosting.co.za> Message-ID: <1381620939.62.0.41903960917.issue19218@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Christian, go ahead an rearrange the collections module. Move Lib/collections/abc.py to Lib/_collections_abc.py. Also, be sure to update source link on line 18 of Doc/library.collections.abc.rst ---------- assignee: rhettinger -> christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 01:55:08 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Oct 2013 23:55:08 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <3cy2vv47tPz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset 87f484679a39 by Richard Oudkerk in branch '3.3': Make test_terminate() succeed or fail quickly. http://hg.python.org/cpython/rev/87f484679a39 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 02:27:54 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 00:27:54 +0000 Subject: [issue19218] Use of MutableMapping in os module slows down interpreter startup In-Reply-To: <1381428481.39.0.771776860266.issue19218@psf.upfronthosting.co.za> Message-ID: <3cy3dG3H2Jz7LjT@mail.python.org> Roundup Robot added the comment: New changeset 0b6052f2a8ee by Christian Heimes in branch 'default': Issue #19218: Rename collections.abc to _collections_abc in order to speed up interpreter start http://hg.python.org/cpython/rev/0b6052f2a8ee New changeset 7ea831581af4 by Christian Heimes in branch 'default': Issue #19218: Add facade collections.abc http://hg.python.org/cpython/rev/7ea831581af4 New changeset 62b6ecd1e463 by Christian Heimes in branch 'default': Issue #19218: set __name__ of _collections_abc to collections.abc in order to fix tests and keep beautiful qualified names. http://hg.python.org/cpython/rev/62b6ecd1e463 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 02:29:21 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 00:29:21 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <3cy3gP0f8Yz7LjT@mail.python.org> Roundup Robot added the comment: New changeset 2a2b339b6b59 by Christian Heimes in branch 'default': Issue #19219: retval may be used uninitialized value http://hg.python.org/cpython/rev/2a2b339b6b59 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 02:51:38 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 Oct 2013 00:51:38 +0000 Subject: [issue19234] socket.fileno() documentation In-Reply-To: <52597A2F.60807@python.org> Message-ID: <1381625498.32.0.686521135823.issue19234@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Indeed, this should probably be documented as-is - or, if we want to change the behaviour, discussed on python-dev first. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 02:53:34 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 13 Oct 2013 00:53:34 +0000 Subject: [issue19218] Use of MutableMapping in os module slows down interpreter startup In-Reply-To: <1381428481.39.0.771776860266.issue19218@psf.upfronthosting.co.za> Message-ID: <1381625614.7.0.770425932911.issue19218@psf.upfronthosting.co.za> Christian Heimes added the comment: Thank you very much for your input and assistance! tip compared to v3.4.0a3: ### normal_startup ### Min: 0.506533 -> 0.313627: 1.62x faster Avg: 0.582504 -> 0.441796: 1.32x faster Significant (t=19.98) Stddev: 0.02397 -> 0.04366: 1.8213x larger ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 03:13:07 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 01:13:07 +0000 Subject: [issue18281] tarfile defines stat constants In-Reply-To: <1371912078.43.0.227039082522.issue18281@psf.upfronthosting.co.za> Message-ID: <3cy4dv19Njz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 3d557da59c22 by Ethan Furman in branch 'default': Close #18281: superfluous stat constants removed from tarfile http://hg.python.org/cpython/rev/3d557da59c22 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 03:42:58 2013 From: report at bugs.python.org (Miki Tebeka) Date: Sun, 13 Oct 2013 01:42:58 +0000 Subject: [issue19240] iglob should try to use `readdir` Message-ID: <1381628578.0.0.047697770755.issue19240@psf.upfronthosting.co.za> New submission from Miki Tebeka: Currently glob.iglob calls os.listdir internally. Which means that if there are many files in the directory - a big list of them is created in memory. iglob should try to use readdir and be a "true" iterator, not consuming a lot of memory. See one possible implementation using ctypes at http://stackoverflow.com/questions/4403598/list-files-in-a-folder-as-a-stream-to-begin-process-immediately ---------- components: Library (Lib) messages: 199649 nosy: tebeka priority: normal severity: normal status: open title: iglob should try to use `readdir` type: performance versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 03:58:55 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 13 Oct 2013 01:58:55 +0000 Subject: [issue4965] Can doc index of html version be separately scrollable? In-Reply-To: <1232148633.29.0.602528403512.issue4965@psf.upfronthosting.co.za> Message-ID: <1381629535.78.0.269122726227.issue4965@psf.upfronthosting.co.za> Changes by Ezio Melotti : Added file: http://bugs.python.org/file32072/issue4965-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 04:01:22 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 13 Oct 2013 02:01:22 +0000 Subject: [issue4965] Can doc index of html version be separately scrollable? In-Reply-To: <1232148633.29.0.602528403512.issue4965@psf.upfronthosting.co.za> Message-ID: <1381629682.54.0.850060285262.issue4965@psf.upfronthosting.co.za> Ezio Melotti added the comment: I stole the code from that page and adapted it to integrate better with sidebar.js (and make it a bit more efficient). To test the new patch, in the root of the clone, with the doc already built in Doc/build (no need to rebuild it), do: hg import --no-c http://bugs.python.org/file32072/issue4965-2.diff cp Doc/tools/sphinxext/static/sidebar.js Doc/build/html/_static/sidebar.js cp Doc/tools/sphinxext/static/basic.css Doc/build/html/_static/basic.css firefox file://`pwd`/Doc/build/html/library/multiprocessing.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 05:00:36 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 13 Oct 2013 03:00:36 +0000 Subject: [issue4965] Can doc index of html version be separately scrollable? In-Reply-To: <1232148633.29.0.602528403512.issue4965@psf.upfronthosting.co.za> Message-ID: <1381633236.92.0.837643290712.issue4965@psf.upfronthosting.co.za> Ned Deily added the comment: The patch seems to work well with both Safari 6.0.5 and Firefox 25.0 on OS X 10.8. Nice improvement. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 05:41:40 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 13 Oct 2013 03:41:40 +0000 Subject: [issue18986] Add a case-insensitive case-preserving dict In-Reply-To: <1378725721.97.0.387646378602.issue18986@psf.upfronthosting.co.za> Message-ID: <1381635700.89.0.642142122959.issue18986@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Antoine, is the PEP ready for review? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 05:52:40 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 13 Oct 2013 03:52:40 +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: <1381636360.8.0.0669915020803.issue16355@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Attached the patch to address Georg Brandl's concern (Thank you!). I also added test for checking the comment of the object defined in C (list, open, etc). I have given thought about testing the comment of the object in interactive shell. But it is too much hassle. So I skip it. ---------- Added file: http://bugs.python.org/file32073/issue16355_v4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 06:54:28 2013 From: report at bugs.python.org (Eric Snow) Date: Sun, 13 Oct 2013 04:54:28 +0000 Subject: [issue19218] Use of MutableMapping in os module slows down interpreter startup In-Reply-To: <1381428481.39.0.771776860266.issue19218@psf.upfronthosting.co.za> Message-ID: <1381640068.81.0.185933721886.issue19218@psf.upfronthosting.co.za> Eric Snow added the comment: Thanks, Christian. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 07:05:09 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 13 Oct 2013 05:05:09 +0000 Subject: [issue19223] Add 'x' mode to bz2.open() In-Reply-To: <1381440875.62.0.537853075258.issue19223@psf.upfronthosting.co.za> Message-ID: <1381640709.56.0.0160365561812.issue19223@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Added test. ---------- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file32074/add_x_mode_to_bz2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 08:33:44 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 13 Oct 2013 06:33:44 +0000 Subject: [issue19239] add inspect functions to retrieve attributes from both old dir() and overridden dir() In-Reply-To: <1381617506.87.0.926836334477.issue19239@psf.upfronthosting.co.za> Message-ID: <1381646024.69.0.320750027832.issue19239@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 08:47:06 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 13 Oct 2013 06:47:06 +0000 Subject: [issue19240] iglob should try to use `readdir` In-Reply-To: <1381628578.0.0.047697770755.issue19240@psf.upfronthosting.co.za> Message-ID: <1381646826.16.0.585391198266.issue19240@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Actually, it should probably be using a generator-based version of os.listdir(). See #11406. ---------- dependencies: +There is no os.listdir() equivalent returning generator instead of list nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 08:53:27 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 13 Oct 2013 06:53:27 +0000 Subject: [issue19223] Add 'x' mode to bz2.open() In-Reply-To: <1381440875.62.0.537853075258.issue19223@psf.upfronthosting.co.za> Message-ID: <1381647207.73.0.425203227514.issue19223@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Added doc. ---------- Added file: http://bugs.python.org/file32075/add_x_mode_to_bz2_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 09:00:07 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 07:00:07 +0000 Subject: [issue4965] Can doc index of html version be separately scrollable? In-Reply-To: <1232148633.29.0.602528403512.issue4965@psf.upfronthosting.co.za> Message-ID: <1381647607.41.0.174921121957.issue4965@psf.upfronthosting.co.za> Georg Brandl added the comment: Very nice, thanks for porting this. One minor nit: when I close the sidebar, then scroll and then reopen it, it does not immediately update the sidebar position, only when scrolling again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 09:00:59 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 07:00:59 +0000 Subject: [issue4965] Can doc index of html version be separately scrollable? In-Reply-To: <1232148633.29.0.602528403512.issue4965@psf.upfronthosting.co.za> Message-ID: <1381647659.61.0.770059911058.issue4965@psf.upfronthosting.co.za> Georg Brandl added the comment: You said you made it a bit more efficient; is this python-specific or can it be ported back to Sphinx? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 09:20:02 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 07:20:02 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1381648802.7.0.0294875814966.issue16203@psf.upfronthosting.co.za> Georg Brandl added the comment: I updated the patch to current tip, fixed three issues from the review, and added documentation updates. ---------- nosy: +georg.brandl Added file: http://bugs.python.org/file32076/issue16203_mrab_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 09:30:28 2013 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 13 Oct 2013 07:30:28 +0000 Subject: [issue19236] Add Tornado HTTP benchmark In-Reply-To: <1381605331.62.0.22076893629.issue19236@psf.upfronthosting.co.za> Message-ID: <1381649428.92.0.177876358802.issue19236@psf.upfronthosting.co.za> Stefan Behnel added the comment: Another thing: you are only using one thread for both the client and the server, and the app writes the entire content in one go (during one call to get()). Wouldn't it be more interesting to make the app's get() method asynchronous as well, so that each chunk actually gets passed separately? Otherwise, the fact that it's writing chunks wouldn't really contribute all that much to the benchmark. Or maybe split it up into two benchmarks, one that exercises the asynchronous client (as your current code does) and one that shifts more work to the server side? Not sure if it's worth it, but might be worth trying. I think it would cover two different use cases that way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 09:31:12 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 07:31:12 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <3cyF280c0MzShM@mail.python.org> Roundup Robot added the comment: New changeset b51218966201 by Georg Brandl in branch 'default': Add re.fullmatch() function and regex.fullmatch() method, which anchor the http://hg.python.org/cpython/rev/b51218966201 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 09:32:54 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 07:32:54 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1381649574.9.0.766823171363.issue16203@psf.upfronthosting.co.za> Georg Brandl added the comment: Sorry, accidental push, already reverted. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 09:45:40 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 07:45:40 +0000 Subject: [issue9951] introduce bytes.hex method In-Reply-To: <1285457928.18.0.422778723123.issue9951@psf.upfronthosting.co.za> Message-ID: <1381650340.94.0.510544781461.issue9951@psf.upfronthosting.co.za> Georg Brandl added the comment: Blasphemous question: why not give bytes a __hex__ method? Then you could use hex() to convert them :) The patch is outdated; it should not use PyUnicode_AS_UNICODE, but PyUnicode_New(..., 127) and then PyUnicode_1BYTE_DATA to get the char array. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 09:50:33 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 13 Oct 2013 07:50:33 +0000 Subject: [issue19201] Add 'x' mode to lzma.open() In-Reply-To: <1381282314.82.0.620935912444.issue19201@psf.upfronthosting.co.za> Message-ID: <1381650633.29.0.951499179569.issue19201@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Added doc. Revamped the test. The patch did not cater to the order of modes ("wb" is equal to "bw"?). I think that deserves a separate ticket. ---------- Added file: http://bugs.python.org/file32077/add_x_mode_to_lzma_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:01:56 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 08:01:56 +0000 Subject: [issue13744] raw byte strings are described in a confusing way In-Reply-To: <1326116062.09.0.84789277908.issue13744@psf.upfronthosting.co.za> Message-ID: <1381651316.89.0.0633503378687.issue13744@psf.upfronthosting.co.za> Georg Brandl added the comment: 3.3 is now released with both "br" and "rb" allowed, and in 2.7 the current text looks good enough for me. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:07:14 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 08:07:14 +0000 Subject: [issue14486] Add some versionchanged notes in threading docs In-Reply-To: <1333501522.24.0.791616845298.issue14486@psf.upfronthosting.co.za> Message-ID: <3cyFqJ74fDz7LjZ@mail.python.org> Roundup Robot added the comment: New changeset 81c28c415718 by Georg Brandl in branch '2.7': Closes #14486: add versionchanged notices throughout the threading docs for PEP8-compliant APIs; the note at the top of the page is too hard to notice. http://hg.python.org/cpython/rev/81c28c415718 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:14:55 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 08:14:55 +0000 Subject: [issue11120] threading.Thread.daemon Documentation Incomplete In-Reply-To: <1296848896.87.0.703380092713.issue11120@psf.upfronthosting.co.za> Message-ID: <1381652095.08.0.627892410695.issue11120@psf.upfronthosting.co.za> Georg Brandl added the comment: This is now fixed with changeset 81c28c415718. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:23:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 08:23:06 +0000 Subject: [issue15829] Threading Lock - Wrong Exception Name In-Reply-To: <1346406935.1.0.0548021295601.issue15829@psf.upfronthosting.co.za> Message-ID: <3cyG9c33vNz7LkB@mail.python.org> Roundup Robot added the comment: New changeset d7e9c0a6dbcf by Georg Brandl in branch '2.7': Closes #15829: document ThreadError and fix exception raised for releasing unlocked locks. http://hg.python.org/cpython/rev/d7e9c0a6dbcf ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:23:54 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 08:23:54 +0000 Subject: [issue15829] Threading Lock - Wrong Exception Name In-Reply-To: <1346406935.1.0.0548021295601.issue15829@psf.upfronthosting.co.za> Message-ID: <1381652634.34.0.38729471567.issue15829@psf.upfronthosting.co.za> Georg Brandl added the comment: 3.3 didn't need to be updated; it's RuntimeError there everywhere. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:24:35 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 08:24:35 +0000 Subject: [issue14502] Document better what happens on releasing an unacquired lock In-Reply-To: <1333609616.9.0.633115743228.issue14502@psf.upfronthosting.co.za> Message-ID: <1381652675.62.0.680261799813.issue14502@psf.upfronthosting.co.za> Georg Brandl added the comment: This is now fixed for 2.7 (see #15829); no fix needed for 3.3+. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:40:46 2013 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 13 Oct 2013 08:40:46 +0000 Subject: [issue18654] modernize mingw&cygwin compiler classes In-Reply-To: <1375621500.14.0.511859388859.issue18654@psf.upfronthosting.co.za> Message-ID: <1381653646.3.0.829763021866.issue18654@psf.upfronthosting.co.za> Changes by Roumen Petrov : Added file: http://bugs.python.org/file32078/modernize-mingw+cygwin-compiler-class.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:41:25 2013 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 13 Oct 2013 08:41:25 +0000 Subject: [issue18654] modernize mingw&cygwin compiler classes In-Reply-To: <1375621500.14.0.511859388859.issue18654@psf.upfronthosting.co.za> Message-ID: <1381653685.73.0.79830680497.issue18654@psf.upfronthosting.co.za> Changes by Roumen Petrov : Added file: http://bugs.python.org/file32079/0011-MINGW-compiler-customize-mingw-cygwin-compilers.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:43:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 08:43:38 +0000 Subject: [issue17375] Add docstrings to methods in the threading module In-Reply-To: <1362648255.88.0.520762515957.issue17375@psf.upfronthosting.co.za> Message-ID: <3cyGdJ4hVwz7Ljp@mail.python.org> Roundup Robot added the comment: New changeset 24429118988b by Georg Brandl in branch '3.3': Closes #17375: port new threading docstrings from 2.7. http://hg.python.org/cpython/rev/24429118988b ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:46:17 2013 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 13 Oct 2013 08:46:17 +0000 Subject: [issue17219] cross add Python's library directory when building python standard extensions In-Reply-To: <1361119360.59.0.341690353599.issue17219@psf.upfronthosting.co.za> Message-ID: <1381653977.2.0.0785010138935.issue17219@psf.upfronthosting.co.za> Changes by Roumen Petrov : Added file: http://bugs.python.org/file32080/0002-issue17219-add-current-dir-in-library-path-if-buildi.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:48:59 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 08:48:59 +0000 Subject: [issue13740] winsound.SND_NOWAIT ignored on modern Windows platforms In-Reply-To: <1326059265.01.0.0567556069676.issue13740@psf.upfronthosting.co.za> Message-ID: <3cyGlt2MV7z7LjY@mail.python.org> Roundup Robot added the comment: New changeset e08dea96b6e2 by Georg Brandl in branch '3.3': Closes #13740: SND_NOWAIT seems to be ignored on modern Windows. http://hg.python.org/cpython/rev/e08dea96b6e2 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:49:22 2013 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 13 Oct 2013 08:49:22 +0000 Subject: [issue18632] mingw: build extensions with GCC In-Reply-To: <1375467327.02.0.323723692344.issue18632@psf.upfronthosting.co.za> Message-ID: <1381654162.21.0.420250809454.issue18632@psf.upfronthosting.co.za> Changes by Roumen Petrov : Added file: http://bugs.python.org/file32081/0015-MINGW-build-extensions-with-GCC.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:49:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 08:49:30 +0000 Subject: [issue13740] winsound.SND_NOWAIT ignored on modern Windows platforms In-Reply-To: <1326059265.01.0.0567556069676.issue13740@psf.upfronthosting.co.za> Message-ID: <3cyGm513Vxz7Lk6@mail.python.org> Roundup Robot added the comment: New changeset 3c8feb068694 by Georg Brandl in branch '2.7': Closes #13740: SND_NOWAIT seems to be ignored on modern Windows. http://hg.python.org/cpython/rev/3c8feb068694 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:51:03 2013 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 13 Oct 2013 08:51:03 +0000 Subject: [issue18639] mingw: avoid circular dependency from time module during native build of extentions In-Reply-To: <1375472743.5.0.167328971816.issue18639@psf.upfronthosting.co.za> Message-ID: <1381654263.92.0.506940474027.issue18639@psf.upfronthosting.co.za> Changes by Roumen Petrov : Added file: http://bugs.python.org/file32082/0021-MINGW-avoid-circular-dependency-from-time-module-dur.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:53:44 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 08:53:44 +0000 Subject: [issue16253] Docs for PyArg_ParseTupleAndKeywords say it doesn't accept nested tuples In-Reply-To: <1350415684.72.0.0946925077197.issue16253@psf.upfronthosting.co.za> Message-ID: <1381654424.46.0.453065245924.issue16253@psf.upfronthosting.co.za> Georg Brandl added the comment: This sentence appears to be from the 1.5.2 docs; I can't find it anywhere else. ---------- nosy: +georg.brandl resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:59:23 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 13 Oct 2013 08:59:23 +0000 Subject: [issue19232] Speed up _decimal import In-Reply-To: <1381579399.63.0.316110193187.issue19232@psf.upfronthosting.co.za> Message-ID: <1381654763.69.0.162026096691.issue19232@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Mark, Raymond: Would you support the change (__name__ hack and all)? No objections here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 11:12:22 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 13 Oct 2013 09:12:22 +0000 Subject: [issue19237] Proposal : LCM function to complement GCD In-Reply-To: <1381613985.13.0.579421159234.issue19237@psf.upfronthosting.co.za> Message-ID: <1381655542.26.0.562831865067.issue19237@psf.upfronthosting.co.za> Mark Dickinson added the comment: To get the boundary cases correct, you need a special case for lcm(0, 0), which should be 0. Did you have any particular use-cases in mind for this? It may make sense to allow multiple arguments: e.g., lcm(4, 5, 6) -> 60. Overall, I'm -0 on this addition: I don't think it comes up often enough to make it worth adding, and when it does come up it's easy to create the lcm from the gcd (just as your patch does). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 11:21:13 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 13 Oct 2013 09:21:13 +0000 Subject: [issue18606] Add statistics module to standard library In-Reply-To: <1375258820.22.0.0684222529612.issue18606@psf.upfronthosting.co.za> Message-ID: <1381656073.6.0.48856375736.issue18606@psf.upfronthosting.co.za> Nick Coghlan added the comment: Are the ReST docs the only missing piece here? It would be nice to have this included in alpha 4 next weekend (although the real deadline is beta 1 on November 24). ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 11:37:52 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 13 Oct 2013 09:37:52 +0000 Subject: [issue18842] Add float.is_finite is_nan is_infinite to match Decimal methods In-Reply-To: <1377532757.24.0.123652540945.issue18842@psf.upfronthosting.co.za> Message-ID: <1381657072.29.0.363458231031.issue18842@psf.upfronthosting.co.za> Mark Dickinson added the comment: +1 from me. You want `float.is_infinite` rather than `float.is_infinity`. `is_signed` is another one that may be worth considering. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 11:55:55 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 09:55:55 +0000 Subject: [issue18739] math.log of a long returns a different value of math.log of an int In-Reply-To: <1376492687.31.0.627121997874.issue18739@psf.upfronthosting.co.za> Message-ID: <3cyJDj3vDWz7LjZ@mail.python.org> Roundup Robot added the comment: New changeset f543863f4e43 by Mark Dickinson in branch '2.7': Issue #18739: Fix inconsistent results from math.log(n) and math.log(long(n)) http://hg.python.org/cpython/rev/f543863f4e43 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 11:56:13 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 13 Oct 2013 09:56:13 +0000 Subject: [issue18739] math.log of a long returns a different value of math.log of an int In-Reply-To: <1376492687.31.0.627121997874.issue18739@psf.upfronthosting.co.za> Message-ID: <1381658173.73.0.851488677295.issue18739@psf.upfronthosting.co.za> Mark Dickinson added the comment: Patch applied. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 12:05:17 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 10:05:17 +0000 Subject: [issue18659] test_precision in test_format.py is not executed and has unused variable In-Reply-To: <1375689790.25.0.721615428383.issue18659@psf.upfronthosting.co.za> Message-ID: <3cyJRW2rmwz7Ljp@mail.python.org> Roundup Robot added the comment: New changeset e7eed20f2da7 by Mark Dickinson in branch 'default': Issue #18659: fix test_format test that wasn't being executed. Thanks Vajrasky Kok for the patch. http://hg.python.org/cpython/rev/e7eed20f2da7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 12:05:52 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 13 Oct 2013 10:05:52 +0000 Subject: [issue18659] test_precision in test_format.py is not executed and has unused variable In-Reply-To: <1375689790.25.0.721615428383.issue18659@psf.upfronthosting.co.za> Message-ID: <1381658752.56.0.444722165291.issue18659@psf.upfronthosting.co.za> Mark Dickinson added the comment: Let's try again. I'll close once the buildbots have run. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 12:09:03 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 10:09:03 +0000 Subject: [issue18606] Add statistics module to standard library In-Reply-To: <1375258820.22.0.0684222529612.issue18606@psf.upfronthosting.co.za> Message-ID: <1381658943.01.0.0952625140866.issue18606@psf.upfronthosting.co.za> Georg Brandl added the comment: In the attached patch I took the docstrings, put them in statistics.rst and reformatted/marked-up them according to our guidelines. This should at least be good enough to make this committable. I also modified statistics.py very slightly; I removed trailing spaces and added "Function/class" in the third table in the module docstring. ---------- nosy: +georg.brandl Added file: http://bugs.python.org/file32083/statistics_combined_withdocs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 12:26:14 2013 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 13 Oct 2013 10:26:14 +0000 Subject: [issue18606] Add statistics module to standard library In-Reply-To: <1381656073.6.0.48856375736.issue18606@psf.upfronthosting.co.za> Message-ID: <20131013102504.GU7989@ando> Steven D'Aprano added the comment: On Sun, Oct 13, 2013 at 09:21:13AM +0000, Nick Coghlan wrote: > > Nick Coghlan added the comment: > > Are the ReST docs the only missing piece here? As far as I know, the only blocker is that the ReST docs are missing. Also Guido would like to see the docstrings be a little smaller (or perhaps even a lot smaller), and that will happen at the same time. The implementation of statistics.sum needs to be a bit faster, but that's also coming. I presume that won't be a blocker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 12:40:13 2013 From: report at bugs.python.org (CliffM) Date: Sun, 13 Oct 2013 10:40:13 +0000 Subject: [issue19237] Proposal : LCM function to complement GCD In-Reply-To: <1381613985.13.0.579421159234.issue19237@psf.upfronthosting.co.za> Message-ID: <1381660813.26.0.420329020982.issue19237@psf.upfronthosting.co.za> CliffM added the comment: I've handled a patch, and extended both lcm and gcd to take an arbitrary number of arguments -- via functools.reduce, as they are both multiplicative (in the first argument). Also handled the zero case , so lcm(0,0) = 0 = gcd(0,0) Use-case-wise, I do a reasonable amount of number-theoretic work and lcm and gcd are always popping up. If gcd is defined, it's nice to find lcm too. For those less well versed in number-theory, the implementation of lcm is not so obvious, and many end up going down a tedious prime factorisation route -- if they get that far. But is it all worth it in the fractions module ? They should really be in the math module. ---------- Added file: http://bugs.python.org/file32084/lcm2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 12:54:20 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 13 Oct 2013 10:54:20 +0000 Subject: [issue18659] test_precision in test_format.py is not executed and has unused variable In-Reply-To: <1375689790.25.0.721615428383.issue18659@psf.upfronthosting.co.za> Message-ID: <1381661660.67.0.0342098223981.issue18659@psf.upfronthosting.co.za> Mark Dickinson added the comment: ... and the buildbots with sizeof(int) == sizeof(size_t) == 4 still fail, of course. http://hg.python.org/cpython/rev/d115dc671f52 fixes that by removing the check for the exact error message. It should be enough to check for ValueError anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 12:55:24 2013 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 13 Oct 2013 10:55:24 +0000 Subject: [issue19241] MINGW: install import library Message-ID: <1381661724.71.0.909185396021.issue19241@psf.upfronthosting.co.za> New submission from Roumen Petrov: Enhancement of issue3871 - installation ---------- components: Installation files: 0001-MINGW-install-import-library.patch keywords: patch messages: 199689 nosy: rpetrov priority: normal severity: normal status: open title: MINGW: install import library versions: Python 3.4 Added file: http://bugs.python.org/file32085/0001-MINGW-install-import-library.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 12:57:09 2013 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 13 Oct 2013 10:57:09 +0000 Subject: [issue19242] MINGW: generalization of posix installation in distutils Message-ID: <1381661829.44.0.682603781281.issue19242@psf.upfronthosting.co.za> New submission from Roumen Petrov: Enhancement of issue3871 - installation ---------- files: 0002-MINGW-generalization-of-posix-installation-in-distut.patch keywords: patch messages: 199690 nosy: rpetrov priority: normal severity: normal status: open title: MINGW: generalization of posix installation in distutils Added file: http://bugs.python.org/file32086/0002-MINGW-generalization-of-posix-installation-in-distut.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 12:59:01 2013 From: report at bugs.python.org (Stefan Krah) Date: Sun, 13 Oct 2013 10:59:01 +0000 Subject: [issue19232] Speed up _decimal import In-Reply-To: <1381610078.53.0.73103220481.issue19232@psf.upfronthosting.co.za> Message-ID: <20131013105902.GA22070@sleipnir.bytereef.org> Stefan Krah added the comment: Antoine Pitrou wrote: > You can apply it using "hg import --no-commit", I think. mercurial 2.1 throws an exception even though the patch was created with that version. Now I upgraded to 2.7.2 and it works. Rietveld also seems to choke on the first patch (no review link). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 13:00:02 2013 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 13 Oct 2013 11:00:02 +0000 Subject: [issue19242] MINGW: generalization of posix installation in distutils In-Reply-To: <1381661829.44.0.682603781281.issue19242@psf.upfronthosting.co.za> Message-ID: <1381662002.78.0.504460028557.issue19242@psf.upfronthosting.co.za> Changes by Roumen Petrov : ---------- components: +Installation versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 13:00:20 2013 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 13 Oct 2013 11:00:20 +0000 Subject: [issue19243] MINGW: support stdcall without underscore Message-ID: <1381662020.61.0.491449073615.issue19243@psf.upfronthosting.co.za> New submission from Roumen Petrov: Split of issue3871 ---------- components: Extension Modules, Installation files: 0003-MINGW-support-stdcall-without-underscore.patch keywords: patch messages: 199692 nosy: rpetrov priority: normal severity: normal status: open title: MINGW: support stdcall without underscore type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32087/0003-MINGW-support-stdcall-without-underscore.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 13:00:39 2013 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 13 Oct 2013 11:00:39 +0000 Subject: [issue19241] MINGW: install import library In-Reply-To: <1381661724.71.0.909185396021.issue19241@psf.upfronthosting.co.za> Message-ID: <1381662039.68.0.345031760817.issue19241@psf.upfronthosting.co.za> Changes by Roumen Petrov : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 13:01:22 2013 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 13 Oct 2013 11:01:22 +0000 Subject: [issue19242] MINGW: generalization of posix installation in distutils In-Reply-To: <1381661829.44.0.682603781281.issue19242@psf.upfronthosting.co.za> Message-ID: <1381662082.8.0.878955089156.issue19242@psf.upfronthosting.co.za> Changes by Roumen Petrov : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 13:02:50 2013 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 13 Oct 2013 11:02:50 +0000 Subject: [issue19244] MINGW: use replace instead rename to avoid failure on windows Message-ID: <1381662169.98.0.886605409124.issue19244@psf.upfronthosting.co.za> New submission from Roumen Petrov: Enhancement of issue3871 - installation ---------- components: Installation files: 0004-use-replace-instead-rename-to-avoid-failure-on-windo.patch keywords: patch messages: 199693 nosy: rpetrov priority: normal severity: normal status: open title: MINGW: use replace instead rename to avoid failure on windows type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32088/0004-use-replace-instead-rename-to-avoid-failure-on-windo.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 13:06:00 2013 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 13 Oct 2013 11:06:00 +0000 Subject: [issue19245] mingw-meta: installation Message-ID: <1381662360.07.0.972595151036.issue19245@psf.upfronthosting.co.za> New submission from Roumen Petrov: this is meta issue for enhancement of issue3871 - part related to installation. Remark: build of core modules is in issue18653 . 01 : issue19241 : install import library 02 : issue19242 : generalization of posix installation in distutils 03 : issue19243 : support stdcall without underscore 04 : issue19244 : use replace instead rename to avoid failure on windows ---------- components: Installation messages: 199694 nosy: rpetrov priority: normal severity: normal status: open title: mingw-meta: installation type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 13:15:44 2013 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 13 Oct 2013 11:15:44 +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: <1381662944.27.0.841936988733.issue3871@psf.upfronthosting.co.za> Roumen Petrov added the comment: For protocol - as requested patches attached to this issue are split ans posted as separate issues. Please follow those listed below: issue18654 - modernize mingw&cygwin compiler classes (new) issue17605 - mingw-meta: build interpreter core issue18653 - mingw-meta: build core modules issue19245 - mingw-meta: install (new) Test cases are not covered. Patches will be posted later, if above are resolved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 13:31:14 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 13 Oct 2013 11:31:14 +0000 Subject: [issue18842] Add float.is_finite is_nan is_infinite to match Decimal methods In-Reply-To: <1377532757.24.0.123652540945.issue18842@psf.upfronthosting.co.za> Message-ID: <1381663874.35.0.147781232276.issue18842@psf.upfronthosting.co.za> Christian Heimes added the comment: The code is already there so the patch is really small. http://hg.python.org/cpython/annotate/5bc7b20dc04a/Objects/floatobject.c#l1046 I love my time machine. *g* ---------- keywords: +patch nosy: +christian.heimes Added file: http://bugs.python.org/file32089/float_is.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 13:53:32 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 13 Oct 2013 11:53:32 +0000 Subject: [issue16938] pydoc confused by __dir__ In-Reply-To: <1357944129.98.0.501949279766.issue16938@psf.upfronthosting.co.za> Message-ID: <1381665212.97.0.573533388435.issue16938@psf.upfronthosting.co.za> Nick Coghlan added the comment: Part of the issue 19030 patch was incorrect and we missed it in the review. Specifically, the else clause in this bit: try: get_obj = getattr(cls, name) except Exception as exc: pass else: homecls = getattr(get_obj, "__class__") homecls = getattr(get_obj, "__objclass__", homecls) if homecls not in possible_bases: # if the resulting object does not live somewhere in the # mro, drop it and go with the dict_obj version only homecls = None get_obj = sentinel The restriction that the __class__ of the object returned by a descriptor must appear in the MRO doesn't make any sense. The entire else block should be simplified to just: homecls = getattr(get_obj, "__objclass__", None) And a "defining class" of None should be documented as a possible result for dynamic attributes that appear in __dir__ but don't set __objclass__ appropriately, and don't correspond to a descriptor. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 14:00:01 2013 From: report at bugs.python.org (=?utf-8?b?0J/RkdGC0YAg0JTRkdC80LjQvQ==?=) Date: Sun, 13 Oct 2013 12:00:01 +0000 Subject: [issue19246] GC does not really free up memory in console Message-ID: <1381665601.5.0.467418586985.issue19246@psf.upfronthosting.co.za> New submission from ???? ?????: Taken from http://stackoverflow.com/a/19287553/135079 When I consume all memory: Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> a = {} >>> for k in xrange(1000000): a['a' * k] = k ... Traceback (most recent call last): File "", line 1, in MemoryError >>> len(a) 64036 If we'll take summary keys length: >>> log(sum(xrange(64036)), 2) 30.93316861532543 we'll get near 32-bit integer overflow. After that done, >>> a = {} will free all 2 Gb of allocated memory (as shown in Task Manager), but executing: >>> for k in xrange(1000000): a[k] = k Will cause: MemoryError And dictionary length something like: >>> len(a) 87382 ---------- components: Windows messages: 199698 nosy: ????.????? priority: normal severity: normal status: open title: GC does not really free up memory in console type: resource usage versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 14:05:23 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 13 Oct 2013 12:05:23 +0000 Subject: [issue18842] Add float.is_finite is_nan is_infinite to match Decimal methods In-Reply-To: <1377532757.24.0.123652540945.issue18842@psf.upfronthosting.co.za> Message-ID: <1381665923.41.0.961556144591.issue18842@psf.upfronthosting.co.za> Christian Heimes added the comment: Here is a longer patch that also adds the methods to int and numbers.Real. It comes with tests and doc updates, too. ---------- stage: -> patch review Added file: http://bugs.python.org/file32090/issue18842.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 14:12:42 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 13 Oct 2013 12:12:42 +0000 Subject: [issue19239] add inspect functions to retrieve attributes from both old dir() and overridden dir() In-Reply-To: <1381617506.87.0.926836334477.issue19239@psf.upfronthosting.co.za> Message-ID: <1381666362.96.0.524878161144.issue19239@psf.upfronthosting.co.za> Nick Coghlan added the comment: Should we go further and also consider attributes provided through the metaclass? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 14:18:28 2013 From: report at bugs.python.org (Stefan Krah) Date: Sun, 13 Oct 2013 12:18:28 +0000 Subject: [issue19229] operator.py: move the Python implementation in the else block of try/except ImportError In-Reply-To: <1381535351.94.0.0685942795619.issue19229@psf.upfronthosting.co.za> Message-ID: <1381666708.14.0.612071209526.issue19229@psf.upfronthosting.co.za> Stefan Krah added the comment: To be fair, for the startup time I can't really detect any difference between importing _operator directly and the current setup. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 14:19:12 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sun, 13 Oct 2013 12:19:12 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381666752.8.0.304654450077.issue19219@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: In this case, we can remove a bunch of 'retval = NULL' from the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 14:49:13 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 13 Oct 2013 12:49:13 +0000 Subject: [issue18659] test_precision in test_format.py is not executed and has unused variable In-Reply-To: <1375689790.25.0.721615428383.issue18659@psf.upfronthosting.co.za> Message-ID: <1381668553.21.0.00540009061109.issue18659@psf.upfronthosting.co.za> Mark Dickinson added the comment: Buildbots are happy now. Closing. Thank you! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 15:01:02 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 13 Oct 2013 13:01:02 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1381669262.22.0.688102036875.issue16203@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- stage: committed/rejected -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 15:49:24 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2013 13:49:24 +0000 Subject: [issue18842] Add float.is_finite is_nan is_infinite to match Decimal methods In-Reply-To: <1377532757.24.0.123652540945.issue18842@psf.upfronthosting.co.za> Message-ID: <1381672164.3.0.709455465432.issue18842@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Fraction? complex? Complex? Integral? Number? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 15:56:48 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 13 Oct 2013 13:56:48 +0000 Subject: [issue18842] Add float.is_finite is_nan is_infinite to match Decimal methods In-Reply-To: <1377532757.24.0.123652540945.issue18842@psf.upfronthosting.co.za> Message-ID: <1381672608.58.0.961486809843.issue18842@psf.upfronthosting.co.za> Christian Heimes added the comment: Pardon? The methods could be added to complex, too. cmath implements the methods as: is_finite: Py_IS_FINITE(z.real) && Py_IS_FINITE(z.imag) is_infinite: Py_IS_INFINITY(z.real) || Py_IS_INFINITY(z.imag) is_nan: Py_IS_NAN(z.real) || Py_IS_NAN(z.imag) For numbers.Real: We can't make the methods abstractmethods because it would be an incompatible change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 16:12:15 2013 From: report at bugs.python.org (Lars Buitinck) Date: Sun, 13 Oct 2013 14:12:15 +0000 Subject: [issue18999] Robustness issues in multiprocessing.{get, set}_start_method In-Reply-To: <1378824821.26.0.31883015251.issue18999@psf.upfronthosting.co.za> Message-ID: <1381673535.5.0.985998214269.issue18999@psf.upfronthosting.co.za> Lars Buitinck added the comment: > BTW, the context objects are singletons. I haven't read all of your patch yet, but does this mean a forkserver will be started regardless of whether it is later used? That would be a good thing, since starting the fork server after reading in large data sets would mean the fork server would hold on to large swaths of memory even when the data set is deallocated in the master process. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 16:12:57 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 13 Oct 2013 14:12:57 +0000 Subject: [issue19247] Describe surrogateescape algorithm in the Library Reference Message-ID: <1381673577.83.0.634006615694.issue19247@psf.upfronthosting.co.za> New submission from Nick Coghlan: The codecs module currently refers out to PEP 383 as the documentation for the details of the ``surrogateescape`` error handler. Instead (as per the recent python-dev discussion about not using PEPs as substitutes for reference docs), there should be a section providing details on surrogateescape directly in the library reference for the codecs module. This may involve breaking out the current table of standard error handlers under its own heading rather than including it in the intro to codec base classes. Then the detailed description of surrogateescape could go under a dedicated subheading. ---------- messages: 199707 nosy: ncoghlan priority: normal severity: normal stage: needs patch status: open title: Describe surrogateescape algorithm in the Library Reference type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 16:28:43 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 Oct 2013 14:28:43 +0000 Subject: [issue18986] Add a case-insensitive case-preserving dict In-Reply-To: <1378725721.97.0.387646378602.issue18986@psf.upfronthosting.co.za> Message-ID: <1381674523.95.0.92742594775.issue18986@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Antoine, is the PEP ready for review? Well, I think it is. Do you think other points should be addressed in it? We still have some time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 16:38:12 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 13 Oct 2013 14:38:12 +0000 Subject: [issue18999] Robustness issues in multiprocessing.{get, set}_start_method In-Reply-To: <1378824821.26.0.31883015251.issue18999@psf.upfronthosting.co.za> Message-ID: <1381675092.82.0.147431489763.issue18999@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > I haven't read all of your patch yet, but does this mean a forkserver > will be started regardless of whether it is later used? No, it is started on demand. But since it is started using _posixsbuprocess.fork_exec(), nothing is inherited from the main process. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 16:40:48 2013 From: report at bugs.python.org (Lars Buitinck) Date: Sun, 13 Oct 2013 14:40:48 +0000 Subject: [issue18999] Robustness issues in multiprocessing.{get, set}_start_method In-Reply-To: <1378824821.26.0.31883015251.issue18999@psf.upfronthosting.co.za> Message-ID: <1381675248.69.0.628630068372.issue18999@psf.upfronthosting.co.za> Lars Buitinck added the comment: Ok, great. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 16:45:13 2013 From: report at bugs.python.org (Ethan Furman) Date: Sun, 13 Oct 2013 14:45:13 +0000 Subject: [issue16938] pydoc confused by __dir__ In-Reply-To: <1357944129.98.0.501949279766.issue16938@psf.upfronthosting.co.za> Message-ID: <1381675513.83.0.429549700772.issue16938@psf.upfronthosting.co.za> Ethan Furman added the comment: 'None' is not an appropriate response to the "Where does this attribute come from" question. For one, it's wrong. For two, it breaks help. The current patch fixes that particular problem (as a last resort it walks the mro looking for the last class that reported having the attribute, and returns that class as the home class). The reason it has the __class__, __objclass__ two-step in there was to handle cases like Enum members that do have __class__ set correctly and do not have __objclass__ set at all as it was falsely reporting the home class in that case as None. Nick Coughlan said: > The restriction that the __class__ of the object returned by a descriptor > must appear in the MRO doesn't make any sense. In the context of finding the home class it does: if the __class__ returned by a descriptor is not in the mro then just like None it 1) is wrong (it doesn't reflect how it came it be in the class being looked up), and 2) it gives weird results in help. The added tests in the patch may shed more light if my explanation isn't making sense. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 16:52:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 14:52:57 +0000 Subject: [issue18919] Unify audio modules tests In-Reply-To: <1378293110.61.0.780572869606.issue18919@psf.upfronthosting.co.za> Message-ID: <3cyQqS1WtGz7LjX@mail.python.org> Roundup Robot added the comment: New changeset a9f967c8d002 by Serhiy Storchaka in branch '2.7': Issue #18919: Added tests for the sunau module. Unified and extended tests http://hg.python.org/cpython/rev/a9f967c8d002 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 16:56:14 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 14:56:14 +0000 Subject: [issue17827] Document codecs.encode and codecs.decode In-Reply-To: <1366811140.15.0.0983174574305.issue17827@psf.upfronthosting.co.za> Message-ID: <3cyQvd4dt8z7LjX@mail.python.org> Roundup Robot added the comment: New changeset b607ce6c9ee6 by Nick Coghlan in branch '3.3': Issue #17827: Document codecs.encode and codecs.decode http://hg.python.org/cpython/rev/b607ce6c9ee6 New changeset 32f3d6721c84 by Nick Coghlan in branch 'default': Issue #17827: document codecs.encode and codecs.decode http://hg.python.org/cpython/rev/32f3d6721c84 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 16:59:05 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 13 Oct 2013 14:59:05 +0000 Subject: [issue16938] pydoc confused by __dir__ In-Reply-To: <1357944129.98.0.501949279766.issue16938@psf.upfronthosting.co.za> Message-ID: <1381676345.36.0.340997699313.issue16938@psf.upfronthosting.co.za> Nick Coghlan added the comment: No, __class__ on a descriptor has *NOTHING* to do with how it was looked up. It's the class of the *result*. >> property.__class__ >>> staticmethod.__class__ >>> classmethod.__class__ It's completely irrelevant to determining *where the attribute came from*. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 16:59:52 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 13 Oct 2013 14:59:52 +0000 Subject: [issue16938] pydoc confused by __dir__ In-Reply-To: <1357944129.98.0.501949279766.issue16938@psf.upfronthosting.co.za> Message-ID: <1381676392.69.0.822455932517.issue16938@psf.upfronthosting.co.za> Nick Coghlan added the comment: However, setting __objclass__ on Enum members would be a perfectly reasonable thing to do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 17:00:24 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 Oct 2013 15:00:24 +0000 Subject: [issue19236] Add Tornado HTTP benchmark In-Reply-To: <1381605331.62.0.22076893629.issue19236@psf.upfronthosting.co.za> Message-ID: <1381676424.06.0.0312172408654.issue19236@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Wouldn't it be more interesting to make the app's get() method > asynchronous as well, so that each chunk actually gets passed > separately? That's a good point. I'll try to look into it. > Or maybe split it up into two benchmarks, one that exercises the > asynchronous client (as your current code does) and one that shifts more > work to the server side? Not sure if it's worth it, but might be worth > trying. I think it would cover two different use cases that way. You still need a client to exercise the server, and a server to exercise the client, so I'm not sure how to separate them (short of using an external utility, which would add dependencies). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 17:03:34 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 13 Oct 2013 15:03:34 +0000 Subject: [issue16938] pydoc confused by __dir__ In-Reply-To: <1357944129.98.0.501949279766.issue16938@psf.upfronthosting.co.za> Message-ID: <1381676614.58.0.43661191067.issue16938@psf.upfronthosting.co.za> Nick Coghlan added the comment: That means __objclass__ can have its meaning broadened to say "this is where this particular instance of this kind of object was defined", and that and __class__ are just coincidentally the same for Enum objects. We should *not* need to have any Enum specific code in the inspect module, and the current code that tries to find the home class has Enum specific assumptions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 17:05:57 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 13 Oct 2013 15:05:57 +0000 Subject: [issue17827] Document codecs.encode and codecs.decode In-Reply-To: <1366811140.15.0.0983174574305.issue17827@psf.upfronthosting.co.za> Message-ID: <1381676757.82.0.567017298807.issue17827@psf.upfronthosting.co.za> Nick Coghlan added the comment: Still need to backport this to 2.7 (Thanks for the preliminary patch Grant, but I'm afraid it didn't make it into what I ended up committing) ---------- versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 17:08:11 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 13 Oct 2013 15:08:11 +0000 Subject: [issue4965] Can doc index of html version be separately scrollable? In-Reply-To: <1232148633.29.0.602528403512.issue4965@psf.upfronthosting.co.za> Message-ID: <1381676891.06.0.254250499411.issue4965@psf.upfronthosting.co.za> Ezio Melotti added the comment: > One minor nit: when I close the sidebar, then scroll and then reopen > it, it does not immediately update the sidebar position, only when > scrolling again. I'll look into it. > You said you made it a bit more efficient; is this python-specific > or can it be ported back to Sphinx? Some could be backported: * $('.sphinxsidebarwrapper'), $(window), and $('.sphinxsidebar') are re-evaluated every time the user scrolls. In sidebar.js I already had references to these, so I reused them; in Sphinx you can move them outside the .scroll(); * The original code used $(window).innerHeight(), but the code in sidebar.js used window.innerHeight if available or $(window).height() if not. I kept the latter, however I'm not sure that is the best option; * $(document) and sidebar_height could also be calculated once at the beginning, since they shouldn't change, but I haven't done it in my patch; * In the patch I also renamed a few variables to be more clear; * The fix in #4711 could also be backported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 17:09:14 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 13 Oct 2013 15:09:14 +0000 Subject: [issue19247] Describe surrogateescape algorithm in the Library Reference In-Reply-To: <1381673577.83.0.634006615694.issue19247@psf.upfronthosting.co.za> Message-ID: <1381676954.43.0.484639765388.issue19247@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 17:12:57 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 Oct 2013 15:12:57 +0000 Subject: [issue19246] GC does not really free up memory in console In-Reply-To: <1381665601.5.0.467418586985.issue19246@psf.upfronthosting.co.za> Message-ID: <1381677177.04.0.978910044081.issue19246@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +brian.curtin, tim.golden, tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 17:14:35 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 15:14:35 +0000 Subject: [issue18919] Unify audio modules tests In-Reply-To: <1378293110.61.0.780572869606.issue18919@psf.upfronthosting.co.za> Message-ID: <3cyRJQ2YRYz7LjY@mail.python.org> Roundup Robot added the comment: New changeset ee7563b07c6f by Serhiy Storchaka in branch '3.3': Issue #18919: Unified and extended tests for audio modules: aifc, sunau and http://hg.python.org/cpython/rev/ee7563b07c6f New changeset fc418ecd8777 by Serhiy Storchaka in branch 'default': Issue #18919: Unified and extended tests for audio modules: aifc, sunau and http://hg.python.org/cpython/rev/fc418ecd8777 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 17:14:47 2013 From: report at bugs.python.org (Ethan Furman) Date: Sun, 13 Oct 2013 15:14:47 +0000 Subject: [issue16938] pydoc confused by __dir__ In-Reply-To: <1357944129.98.0.501949279766.issue16938@psf.upfronthosting.co.za> Message-ID: <1381677287.09.0.629070192508.issue16938@psf.upfronthosting.co.za> Ethan Furman added the comment: Nick Couphlan added the comment: > > No, __class__ on a descriptor has *NOTHING* to do with how it was > looked up. It's the class of the *result*. Which is why in most cases it's discarded as the home class. (I could easily be saying this wrong, which is why I directed you to the tests as better examples of what I am trying to communicate.) > However, setting __objclass__ on Enum members would be a perfectly > reasonable thing to do. I'm glad you think so, but this patch makes that unnecessary. > We should *not* need to have any Enum specific code in the inspect > module, and the current code that tries to find the home class has > Enum specific assumptions. Only in the sense that Enum is currently the only thing making use of the new DynamicClassAttribute descriptor. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 17:16:13 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2013 15:16:13 +0000 Subject: [issue18919] Unify audio modules tests In-Reply-To: <1378293110.61.0.780572869606.issue18919@psf.upfronthosting.co.za> Message-ID: <1381677373.38.0.146350544436.issue18919@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 17:22:45 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 13 Oct 2013 15:22:45 +0000 Subject: [issue16938] pydoc confused by __dir__ In-Reply-To: <1381677287.09.0.629070192508.issue16938@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: I want to kill the dance in inspect completely. Just use __objclass__ and document it appropriately. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 17:30:02 2013 From: report at bugs.python.org (Ethan Furman) Date: Sun, 13 Oct 2013 15:30:02 +0000 Subject: [issue19239] add inspect functions to retrieve attributes from both old dir() and overridden dir() In-Reply-To: <1381617506.87.0.926836334477.issue19239@psf.upfronthosting.co.za> Message-ID: <1381678202.92.0.812975801477.issue19239@psf.upfronthosting.co.za> Ethan Furman added the comment: It would certainly be nice. We could do a dir() on the metaclass, discarding anything either not in dir(type) or not dundered, or both. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 17:35:56 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 13 Oct 2013 15:35:56 +0000 Subject: [issue19232] Speed up _decimal import In-Reply-To: <1381579399.63.0.316110193187.issue19232@psf.upfronthosting.co.za> Message-ID: <1381678556.49.0.410820212386.issue19232@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I think we should save these sort of tricks only for modules imported during startup. Ideally, a user should expect that the code for the decimal module is in decimal.py. Ideally, tools like IDLE's "Open Module" should be able to find the source code using only the module name. I'm -0 on this one. I don't think hacking up the source tree is worth it. The import is only done once -- the important part is what decimal does when it is imported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 18:06:30 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 16:06:30 +0000 Subject: [issue19247] Describe surrogateescape algorithm in the Library Reference In-Reply-To: <1381673577.83.0.634006615694.issue19247@psf.upfronthosting.co.za> Message-ID: <1381680390.59.0.788907022437.issue19247@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 18:20:18 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 16:20:18 +0000 Subject: [issue19198] Improve cross-references in cgi documentation In-Reply-To: <1381266335.84.0.645626523869.issue19198@psf.upfronthosting.co.za> Message-ID: <3cySmd1q2Pz7LjS@mail.python.org> Roundup Robot added the comment: New changeset 053eb1db0bf8 by Serhiy Storchaka in branch '2.7': Issue #19198: Improved cross-references in the cgi module documentation. http://hg.python.org/cpython/rev/053eb1db0bf8 New changeset e52e259d42e8 by Serhiy Storchaka in branch '3.3': Issue #19198: Improved cross-references in the cgi module documentation. http://hg.python.org/cpython/rev/e52e259d42e8 New changeset 781deb421ad0 by Serhiy Storchaka in branch 'default': Issue #19198: Improved cross-references in the cgi module documentation. http://hg.python.org/cpython/rev/781deb421ad0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 18:20:40 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 16:20:40 +0000 Subject: [issue19203] Improve cross-references in curses howto In-Reply-To: <1381321077.27.0.332235799284.issue19203@psf.upfronthosting.co.za> Message-ID: <3cySmf0gdgz7LjS@mail.python.org> Roundup Robot added the comment: New changeset 54d422f5a5c6 by Serhiy Storchaka in branch '3.3': Issue #19203: Improved cross-references in the curses howto. http://hg.python.org/cpython/rev/54d422f5a5c6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 18:25:07 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 16:25:07 +0000 Subject: [issue19203] Improve cross-references in curses howto In-Reply-To: <1381321077.27.0.332235799284.issue19203@psf.upfronthosting.co.za> Message-ID: <3cyStB3T73z7LjS@mail.python.org> Roundup Robot added the comment: New changeset 542f96b913ac by Serhiy Storchaka in branch 'default': Issue #19203: Improved cross-references in the curses howto. http://hg.python.org/cpython/rev/542f96b913ac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 18:30:34 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 16:30:34 +0000 Subject: [issue19235] Add a dedicated subclass for recursion errors In-Reply-To: <1381596107.9.0.320701037292.issue19235@psf.upfronthosting.co.za> Message-ID: <1381681834.8.0.762072624084.issue19235@psf.upfronthosting.co.za> Georg Brandl added the comment: Attached is a patch, please review. Introduces a RecursionError that subclasses RuntimeError for compatibility. Note: I also tested this with RecursionError not subclassing RuntimeError, to make sure that except clauses in the test suite are sufficiently narrowed to RecursionError. ---------- keywords: +patch Added file: http://bugs.python.org/file32091/recursion_error.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 18:31:32 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 13 Oct 2013 16:31:32 +0000 Subject: [issue19229] operator.py: move the Python implementation in the else block of try/except ImportError In-Reply-To: <1381535351.94.0.0685942795619.issue19229@psf.upfronthosting.co.za> Message-ID: <1381681892.16.0.336840330677.issue19229@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 18:31:42 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 13 Oct 2013 16:31:42 +0000 Subject: [issue19232] Speed up _decimal import In-Reply-To: <1381579399.63.0.316110193187.issue19232@psf.upfronthosting.co.za> Message-ID: <1381681902.9.0.5824557611.issue19232@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 18:33:21 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 13 Oct 2013 16:33:21 +0000 Subject: [issue15996] pow() for complex numbers is rough around the edges In-Reply-To: <1348178428.15.0.517718755216.issue15996@psf.upfronthosting.co.za> Message-ID: <1381682001.85.0.195785980602.issue15996@psf.upfronthosting.co.za> Mark Dickinson added the comment: See also http://stackoverflow.com/q/18243270/270986 , which points out the following inconsistencies: >>> 1e300 ** 2 OverflowError: (34, 'Result too large') >>> 1e300j ** 2 OverflowError: complex exponentiation >>> (1e300 + 1j) ** 2 OverflowError: complex exponentiation >>> (1e300 + 1e300j) ** 2 (nan+nanj) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 18:47:23 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 13 Oct 2013 16:47:23 +0000 Subject: [issue19246] GC does not really free up memory in console In-Reply-To: <1381665601.5.0.467418586985.issue19246@psf.upfronthosting.co.za> Message-ID: <1381682843.37.0.470375113813.issue19246@psf.upfronthosting.co.za> R. David Murray added the comment: My guess would be you are dealing with memory fragmentation issues, but I'll let someone more knowledgeable confirm that before closing the issue :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 19:08:16 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 17:08:16 +0000 Subject: [issue19204] Improve cross-references in urllib documentation In-Reply-To: <1381321641.68.0.236509571307.issue19204@psf.upfronthosting.co.za> Message-ID: <3cyTqz6L84z7LjP@mail.python.org> Roundup Robot added the comment: New changeset 3901ff1e6547 by Serhiy Storchaka in branch '3.3': Improve #19204: Improved cross-references in the urllib package documentation. http://hg.python.org/cpython/rev/3901ff1e6547 New changeset b5bd28d39cf3 by Serhiy Storchaka in branch 'default': Improve #19204: Improved cross-references in the urllib package documentation. http://hg.python.org/cpython/rev/b5bd28d39cf3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 19:14:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 17:14:32 +0000 Subject: [issue19207] Improve cross-references in os documentation In-Reply-To: <1381325950.91.0.175108750844.issue19207@psf.upfronthosting.co.za> Message-ID: <3cyTzC67TVz7LkJ@mail.python.org> Roundup Robot added the comment: New changeset 7ea984fc9be1 by Serhiy Storchaka in branch '3.3': Issue #19207: Improved cross-references in the os, os.path, and posix modules http://hg.python.org/cpython/rev/7ea984fc9be1 New changeset 74c3cf05fb1e by Serhiy Storchaka in branch 'default': Issue #19207: Improved cross-references in the os, os.path, and posix modules http://hg.python.org/cpython/rev/74c3cf05fb1e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 19:26:20 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 17:26:20 +0000 Subject: [issue19207] Improve cross-references in os documentation In-Reply-To: <1381325950.91.0.175108750844.issue19207@psf.upfronthosting.co.za> Message-ID: <3cyVDq2LH3z7LjQ@mail.python.org> Roundup Robot added the comment: New changeset fd2c34e0104b by Serhiy Storchaka in branch '2.7': Issue #19207: Improved cross-references in the os, os.path, and posix modules http://hg.python.org/cpython/rev/fd2c34e0104b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 19:26:47 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2013 17:26:47 +0000 Subject: [issue19198] Improve cross-references in cgi documentation In-Reply-To: <1381266335.84.0.645626523869.issue19198@psf.upfronthosting.co.za> Message-ID: <1381685207.31.0.869841571883.issue19198@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 19:28:51 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2013 17:28:51 +0000 Subject: [issue19203] Improve cross-references in curses howto In-Reply-To: <1381321077.27.0.332235799284.issue19203@psf.upfronthosting.co.za> Message-ID: <1381685331.41.0.439040528778.issue19203@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I haven't applied patch to 2.7 because 2.7 and 3.3 are desynchronized enough. If anyone want update curses howto in 2.7 it should do this in separated issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 19:29:12 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2013 17:29:12 +0000 Subject: [issue19203] Improve cross-references in curses howto In-Reply-To: <1381321077.27.0.332235799284.issue19203@psf.upfronthosting.co.za> Message-ID: <1381685352.44.0.677760547282.issue19203@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 19:42:53 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2013 17:42:53 +0000 Subject: [issue19204] Improve cross-references in urllib documentation In-Reply-To: <1381321641.68.0.236509571307.issue19204@psf.upfronthosting.co.za> Message-ID: <1381686173.22.0.734326938228.issue19204@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I haven't applied the patch to 2.7 because in 2.7 urllib is totally different. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 19:43:48 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2013 17:43:48 +0000 Subject: [issue19207] Improve cross-references in os documentation In-Reply-To: <1381325950.91.0.175108750844.issue19207@psf.upfronthosting.co.za> Message-ID: <1381686228.46.0.330034111653.issue19207@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 19:45:53 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 17:45:53 +0000 Subject: [issue6011] python doesn't build if prefix contains non-ascii characters In-Reply-To: <1242212510.55.0.349129306137.issue6011@psf.upfronthosting.co.za> Message-ID: <1381686353.8.0.983068465254.issue6011@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- status: -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 19:52:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 17:52:19 +0000 Subject: [issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors In-Reply-To: <1379289654.59.0.452504541982.issue19030@psf.upfronthosting.co.za> Message-ID: <3cyVpp3F0szNt4@mail.python.org> Roundup Robot added the comment: New changeset 3752c94368dd by Ethan Furman in branch 'default': Issue19030: commit tests for DynamicClassAttribute http://hg.python.org/cpython/rev/3752c94368dd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 19:53:07 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 17:53:07 +0000 Subject: [issue5557] Byte-code compilation uses excessive memory In-Reply-To: <1237924124.82.0.478709056921.issue5557@psf.upfronthosting.co.za> Message-ID: <1381686787.05.0.865720119995.issue5557@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing, as without a specific issue to fix it is unlikely that this will change. ---------- nosy: +georg.brandl resolution: -> wont fix status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 19:55:16 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 17:55:16 +0000 Subject: [issue14507] Segfault with deeply nested starmap calls In-Reply-To: <1333628918.06.0.633986455545.issue14507@psf.upfronthosting.co.za> Message-ID: <1381686916.46.0.948481246086.issue14507@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: later -> duplicate status: pending -> closed superseder: -> deeply nested filter segfaults _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 19:55:33 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 17:55:33 +0000 Subject: [issue14010] deeply nested filter segfaults In-Reply-To: <1329235106.54.0.737183388066.issue14010@psf.upfronthosting.co.za> Message-ID: <1381686933.89.0.378825780435.issue14010@psf.upfronthosting.co.za> Georg Brandl added the comment: See issue14507 for another instance of this in starmap(). ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 19:56:31 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 17:56:31 +0000 Subject: [issue18512] sys.stdout.write does not allow bytes in Python 3.x In-Reply-To: <1374287481.36.0.643885131326.issue18512@psf.upfronthosting.co.za> Message-ID: <1381686991.9.0.198489721991.issue18512@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> wont fix status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 19:57:07 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 17:57:07 +0000 Subject: [issue17104] Tk() not defined in Tkinter module In-Reply-To: <1359797316.8.0.0796335939383.issue17104@psf.upfronthosting.co.za> Message-ID: <1381687027.75.0.669123755728.issue17104@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing due to lack of feedback. ---------- nosy: +georg.brandl resolution: -> invalid status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 19:59:53 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 17:59:53 +0000 Subject: [issue8010] tkFileDialog.askopenfiles crashes on Windows 7 In-Reply-To: <1267005125.4.0.826921627128.issue8010@psf.upfronthosting.co.za> Message-ID: <1381687193.61.0.497201099977.issue8010@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> duplicate status: pending -> closed superseder: -> tkinter - askopenfilenames returns string instead of tuple in windows 2.6.1 release _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:04:32 2013 From: report at bugs.python.org (Ethan Furman) Date: Sun, 13 Oct 2013 18:04:32 +0000 Subject: [issue16938] pydoc confused by __dir__ In-Reply-To: <1357944129.98.0.501949279766.issue16938@psf.upfronthosting.co.za> Message-ID: <1381687472.34.0.220044994167.issue16938@psf.upfronthosting.co.za> Ethan Furman added the comment: That portion of classify_class_attrs now reads: else: homecls = getattr(get_obj, "__objclass__", None) if homecls not in possible_bases: # if the resulting object does not live somewhere in the # mro, drop it and go with the dict_obj version only homecls = None get_obj = sentinel An example for why the if clause is still there: class Life: @property def answer(self): return 42 Without the if clause the home class for answer would be int when it should be Life. Attached patch is refactored for simplicity as well. ---------- Added file: http://bugs.python.org/file32092/issue16938.stoneleaf.02.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:08:03 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:08:03 +0000 Subject: [issue13519] Tkinter rowconfigure and columnconfigure functions crash if minsize, pad, or weight is not None In-Reply-To: <1322817071.4.0.270134570046.issue13519@psf.upfronthosting.co.za> Message-ID: <1381687683.53.0.303045845548.issue13519@psf.upfronthosting.co.za> Georg Brandl added the comment: I agree. ---------- nosy: +georg.brandl resolution: -> fixed status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:08:24 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:08:24 +0000 Subject: [issue18736] Invalid charset in HTML pages inside documentation in CHM format In-Reply-To: <1376481546.2.0.725412367622.issue18736@psf.upfronthosting.co.za> Message-ID: <1381687704.48.0.829912357018.issue18736@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> invalid status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:08:25 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 13 Oct 2013 18:08:25 +0000 Subject: [issue18986] Add a case-insensitive case-preserving dict In-Reply-To: <1378725721.97.0.387646378602.issue18986@psf.upfronthosting.co.za> Message-ID: <1381687705.1.0.525047276761.issue18986@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:08:55 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:08:55 +0000 Subject: [issue18375] python -m test --randseed 1234 does not randomize tests In-Reply-To: <1373105386.95.0.445511556966.issue18375@psf.upfronthosting.co.za> Message-ID: <1381687735.84.0.90219695603.issue18375@psf.upfronthosting.co.za> Georg Brandl added the comment: I think this is fine to close. ---------- nosy: +georg.brandl resolution: -> fixed status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:13:18 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:13:18 +0000 Subject: [issue706263] print in pythonw raises silent exception when no console available Message-ID: <1381687998.43.0.988639877249.issue706263@psf.upfronthosting.co.za> Georg Brandl added the comment: I agree with Christian; closing as suggested. ---------- nosy: +georg.brandl status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:20:28 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:20:28 +0000 Subject: [issue11084] Serialization of decimal.Decimal to XML-RPC In-Reply-To: <1296502651.44.0.847909816314.issue11084@psf.upfronthosting.co.za> Message-ID: <1381688428.06.0.819563190111.issue11084@psf.upfronthosting.co.za> Georg Brandl added the comment: Adding a special case for Decimal isn't as well justified as one for None -- after all it is a fundamental singleton. (Also, None is encoded without lossy conversion.) The encoder/decoder are already extensible by extending Marshaller.dispatch and Unmarshaller.dispatch. ---------- nosy: +georg.brandl resolution: -> rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:21:07 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:21:07 +0000 Subject: [issue1634774] locale 1251 does not convert to upper case properly Message-ID: <1381688467.94.0.750318340495.issue1634774@psf.upfronthosting.co.za> Georg Brandl added the comment: I agree that it's better not to touch this in 2.x. ---------- nosy: +georg.brandl status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:21:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 18:21:19 +0000 Subject: [issue19197] Improve cross-references in shlex documentation In-Reply-To: <1381266229.65.0.408303361922.issue19197@psf.upfronthosting.co.za> Message-ID: <3cyWRs2bNhz7LjS@mail.python.org> Roundup Robot added the comment: New changeset bca5ba1ea5aa by Serhiy Storchaka in branch '2.7': Issue #19197: Improved cross-references in the shlex module documentation. http://hg.python.org/cpython/rev/bca5ba1ea5aa New changeset 325fedff6178 by Serhiy Storchaka in branch '3.3': Issue #19197: Improved cross-references in the shlex module documentation. http://hg.python.org/cpython/rev/325fedff6178 New changeset dfbd5115fb95 by Serhiy Storchaka in branch 'default': Issue #19197: Improved cross-references in the shlex module documentation. http://hg.python.org/cpython/rev/dfbd5115fb95 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:22:11 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:22:11 +0000 Subject: [issue17360] Regular expressions on mmap'd files can overflow In-Reply-To: <1362520048.77.0.430567108666.issue17360@psf.upfronthosting.co.za> Message-ID: <1381688531.42.0.732612609655.issue17360@psf.upfronthosting.co.za> Georg Brandl added the comment: Closed due to lack of feedback. ---------- nosy: +georg.brandl resolution: -> works for me status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:22:37 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:22:37 +0000 Subject: [issue17212] os.path.isfile() in Python 3.3 sometimes fails In-Reply-To: <1360968598.97.0.73683430526.issue17212@psf.upfronthosting.co.za> Message-ID: <1381688557.28.0.532544946367.issue17212@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing due to lack of feedback. ---------- nosy: +georg.brandl status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:23:29 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2013 18:23:29 +0000 Subject: [issue19197] Improve cross-references in shlex documentation In-Reply-To: <1381266229.65.0.408303361922.issue19197@psf.upfronthosting.co.za> Message-ID: <1381688609.94.0.587248247072.issue19197@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:23:48 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:23:48 +0000 Subject: [issue8194] Incompatible API change in xmlrpclib.Transport.parse_response() of Python 2.7 and 3.2 In-Reply-To: <1269199462.82.0.615666977327.issue8194@psf.upfronthosting.co.za> Message-ID: <1381688628.39.0.16585100628.issue8194@psf.upfronthosting.co.za> Georg Brandl added the comment: It would appear so. ---------- nosy: +georg.brandl status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:24:39 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:24:39 +0000 Subject: [issue15362] pyport.h includes antiquated UTF handling for FreeBSD In-Reply-To: <1342387162.35.0.975176855172.issue15362@psf.upfronthosting.co.za> Message-ID: <1381688679.57.0.259205685481.issue15362@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing due to lack of feedback. ---------- nosy: +georg.brandl resolution: -> out of date status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:24:58 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:24:58 +0000 Subject: [issue9889] PyUnicode_FormatV and Py_UNICODE*? In-Reply-To: <1284751931.03.0.894481141092.issue9889@psf.upfronthosting.co.za> Message-ID: <1381688698.73.0.181284821861.issue9889@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:25:26 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:25:26 +0000 Subject: [issue16846] relative import solution In-Reply-To: <1357192331.61.0.693606949117.issue16846@psf.upfronthosting.co.za> Message-ID: <1381688726.24.0.315362153397.issue16846@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:25:43 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2013 18:25:43 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <1381688743.08.0.49369279871.issue18758@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > The -n (nitpicky) option to Sphinx should also report missing references. Great. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:26:22 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:26:22 +0000 Subject: [issue10040] GZipFile failure on large files In-Reply-To: <1286416633.51.0.196300487006.issue10040@psf.upfronthosting.co.za> Message-ID: <1381688782.65.0.329242527161.issue10040@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing due to lack of feedback. ---------- nosy: +georg.brandl resolution: -> invalid status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:26:20 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 13 Oct 2013 18:26:20 +0000 Subject: [issue15996] pow() for complex numbers is rough around the edges In-Reply-To: <1348178428.15.0.517718755216.issue15996@psf.upfronthosting.co.za> Message-ID: <1381688780.4.0.706724614323.issue15996@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > OS math libraries are bad enough at *float* math, > let alone complex; I'd rather not depend on them unless we have to. This makes good sense. We should control how the special cases resolve and not be subject the whims of various C libraries. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:30:03 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:30:03 +0000 Subject: [issue9613] Python considers pid longs under 64-bit Windows In-Reply-To: <1281895347.49.0.271541660208.issue9613@psf.upfronthosting.co.za> Message-ID: <1381689003.34.0.960625235625.issue9613@psf.upfronthosting.co.za> Georg Brandl added the comment: Antoine, ping? ---------- nosy: +georg.brandl status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:31:24 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:31:24 +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: <1381689084.68.0.0112686953935.issue10888@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing as suggested. ---------- nosy: +georg.brandl resolution: -> wont fix status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:32:23 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:32:23 +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: <1381689143.67.0.101280443501.issue16063@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:32:57 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:32:57 +0000 Subject: [issue8229] Interpreter crash on application shutdown In-Reply-To: <1269507058.23.0.138728346212.issue8229@psf.upfronthosting.co.za> Message-ID: <1381689177.21.0.122050046527.issue8229@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing due to lack of feedback. ---------- nosy: +georg.brandl resolution: -> out of date status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:33:55 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:33:55 +0000 Subject: =?utf-8?q?=5Bissue6602=5D_Add_argument_to_control_file_object_used_by_Bas?= =?utf-8?q?eHTTPServer=E2=80=99s_log=5Fmessage?= In-Reply-To: <1248952406.18.0.680079792557.issue6602@psf.upfronthosting.co.za> Message-ID: <1381689235.11.0.136808849813.issue6602@psf.upfronthosting.co.za> Georg Brandl added the comment: Agreed. ---------- nosy: +georg.brandl resolution: -> rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:34:26 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:34:26 +0000 Subject: [issue13329] Runs normal as console script but falls as CGI In-Reply-To: <1320290534.75.0.190110850785.issue13329@psf.upfronthosting.co.za> Message-ID: <1381689266.38.0.8224501658.issue13329@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing due to lack of feedback. ---------- nosy: +georg.brandl resolution: -> out of date status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:35:01 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:35:01 +0000 Subject: [issue11934] build with --prefix=/dev/null and zlib enabled in Modules/Setup failed In-Reply-To: <1303898972.2.0.53608607185.issue11934@psf.upfronthosting.co.za> Message-ID: <1381689301.69.0.256603274381.issue11934@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing due to lack of feedback. ---------- nosy: +georg.brandl resolution: -> works for me status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:35:24 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:35:24 +0000 Subject: [issue10196] distutils.get_python_lib() returns /usr/local/python3/dist-packages on Ubuntu 10.10 In-Reply-To: <1288071198.84.0.0625228182395.issue10196@psf.upfronthosting.co.za> Message-ID: <1381689324.39.0.56482149581.issue10196@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:37:49 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 Oct 2013 18:37:49 +0000 Subject: [issue9613] Python considers pid longs under 64-bit Windows In-Reply-To: <1281895347.49.0.271541660208.issue9613@psf.upfronthosting.co.za> Message-ID: <1381689469.53.0.0369203204867.issue9613@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Amaury is right, it seems a Windows pid is an int after all. I don't know where I got the other impression :-) ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:42:52 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:42:52 +0000 Subject: [issue8579] Add missing tests for FlushKey, LoadKey, and SaveKey in winreg In-Reply-To: <1272650551.21.0.0191974450566.issue8579@psf.upfronthosting.co.za> Message-ID: <1381689772.46.0.465526134006.issue8579@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- versions: +Python 3.4 -Python 2.6, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:44:45 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:44:45 +0000 Subject: [issue19245] mingw-meta: installation In-Reply-To: <1381662360.07.0.972595151036.issue19245@psf.upfronthosting.co.za> Message-ID: <1381689885.64.0.230422059354.issue19245@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- dependencies: +MINGW: generalization of posix installation in distutils, MINGW: install import library, MINGW: support stdcall without underscore, MINGW: use replace instead rename to avoid failure on windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:52:06 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 18:52:06 +0000 Subject: [issue18714] Add tests for pdb.find_function In-Reply-To: <1376334321.42.0.844383208785.issue18714@psf.upfronthosting.co.za> Message-ID: <1381690326.8.0.804310360576.issue18714@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks for the patch! ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:52:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 18:52:19 +0000 Subject: [issue18714] Add tests for pdb.find_function In-Reply-To: <1376334321.42.0.844383208785.issue18714@psf.upfronthosting.co.za> Message-ID: <3cyX7f2976z7LjS@mail.python.org> Roundup Robot added the comment: New changeset 9c65877b3e34 by Georg Brandl in branch 'default': pdb: modernize find_function() and add tests for it. http://hg.python.org/cpython/rev/9c65877b3e34 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:56:00 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 18:56:00 +0000 Subject: [issue18714] Add tests for pdb.find_function In-Reply-To: <1376334321.42.0.844383208785.issue18714@psf.upfronthosting.co.za> Message-ID: <3cyXCt3fhYz7LjS@mail.python.org> Roundup Robot added the comment: New changeset 86af5991c809 by Georg Brandl in branch 'default': #18714: add attribution. http://hg.python.org/cpython/rev/86af5991c809 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 21:09:31 2013 From: report at bugs.python.org (Nick Guenther) Date: Sun, 13 Oct 2013 19:09:31 +0000 Subject: [issue19248] sphinx is not py3k compatible Message-ID: <1381691371.24.0.619813163861.issue19248@psf.upfronthosting.co.za> New submission from Nick Guenther: I'm running Arch. I just checked out python's hg and tried to build the docs, and found that I couldn't: $ cd cpython/doc $ make update [lots of output stripped] $ make pydoc-topics mkdir -p build/pydoc-topics build/doctrees python tools/sphinx-build.py -b pydoc-topics -d build/doctrees -D latex_paper_size= . build/pydoc-topics Traceback (most recent call last): File "tools/sphinx-build.py", line 27, in from sphinx import main File "/home/kousu/pro/cpython/Doc/tools/sphinx/__init__.py", line 44 except ImportError, err: ^ SyntaxError: invalid syntax make: *** [build] Error 1 I edited the Makefile to say PYTHON = python2 and then it worked. Is the assumption that python2 is still supposed to be the default python everywhere? Is python 3 not able to build itself yet? [kousu at galleon Doc]$ pacman -Qi python Name : python Version : 3.3.2-2 Description : Next generation of the python high-level scripting language Architecture : x86_64 URL : http://www.python.org/ Licenses : custom Groups : None Provides : python3 Depends On : expat bzip2 gdbm openssl libffi zlib Optional Deps : tk: for tkinter [installed] sqlite [installed] Required By : cython ipython ktoblzcheck libreoffice-common python-cairo python-dateutil python-dbus python-markupsafe python-numpy python-pyparsing python-pytz python-pyzmq python-setuptools python-sip python-six python-sympy python-tornado python-xdg ranger youtube-dl Optional For : systemd Conflicts With : None Replaces : python3 Installed Size : 86980.00 KiB Packager : Bart Build Date : Fri Sep 6 03:31:57 2013 Install Date : Tue Sep 17 10:29:36 2013 Install Reason : Installed as a dependency for another package Install Script : No Validated By : Signature ---------- assignee: docs at python components: Documentation messages: 199764 nosy: docs at python, kousu priority: normal severity: normal status: open title: sphinx is not py3k compatible versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 21:11:21 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 13 Oct 2013 19:11:21 +0000 Subject: [issue19248] sphinx is not py3k compatible In-Reply-To: <1381691371.24.0.619813163861.issue19248@psf.upfronthosting.co.za> Message-ID: <1381691481.23.0.0113859204249.issue19248@psf.upfronthosting.co.za> Ezio Melotti added the comment: This is a duplicate of #10224. ---------- nosy: +ezio.melotti resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Build 3.x documentation using python3.x type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 21:19:33 2013 From: report at bugs.python.org (Nick Guenther) Date: Sun, 13 Oct 2013 19:19:33 +0000 Subject: [issue19248] sphinx is not py3k compatible In-Reply-To: <1381691371.24.0.619813163861.issue19248@psf.upfronthosting.co.za> Message-ID: <1381691973.51.0.461927409857.issue19248@psf.upfronthosting.co.za> Nick Guenther added the comment: I see that in Doc/tools/sphinx-build.py there is this check: if sys.version_info[:3] < (2, 4, 0): sys.stderr.write("""\ Error: Sphinx needs to be executed with Python 2.4 or newer (not 3.0 though). (If you run this from the Makefile, you can set the PYTHON variable to the path of an alternative interpreter executable, e.g., ``make html PYTHON=python2.5``). """) But I never saw this and had to debug it myself. I submit the attached patch as a solution. ---------- keywords: +patch resolution: duplicate -> status: closed -> open type: enhancement -> Added file: http://bugs.python.org/file32093/sphinx_version_check.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 21:22:29 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 19:22:29 +0000 Subject: [issue19248] sphinx is not py3k compatible In-Reply-To: <1381691371.24.0.619813163861.issue19248@psf.upfronthosting.co.za> Message-ID: <1381692149.44.0.0409309113013.issue19248@psf.upfronthosting.co.za> Georg Brandl added the comment: Looks ok for now. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 21:24:05 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 19:24:05 +0000 Subject: [issue18776] atexit error display behavior changed in python 3 In-Reply-To: <1376867279.76.0.423082412526.issue18776@psf.upfronthosting.co.za> Message-ID: <1381692245.87.0.324189489932.issue18776@psf.upfronthosting.co.za> Georg Brandl added the comment: The attached patch fixes two instances of PyErr_Display being called without the traceback properly set on the exception object. ---------- keywords: +patch nosy: +georg.brandl, pitrou Added file: http://bugs.python.org/file32094/set_traceback.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 21:26:33 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 19:26:33 +0000 Subject: [issue18527] Upgrade Modules/zlib to 1.2.8 In-Reply-To: <1374483245.68.0.946100267151.issue18527@psf.upfronthosting.co.za> Message-ID: <1381692393.62.0.320253914875.issue18527@psf.upfronthosting.co.za> Georg Brandl added the comment: Sounds reasonable at least for 3.4. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 21:27:34 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 Oct 2013 19:27:34 +0000 Subject: [issue18776] atexit error display behavior changed in python 3 In-Reply-To: <1376867279.76.0.423082412526.issue18776@psf.upfronthosting.co.za> Message-ID: <1381692454.09.0.970200302439.issue18776@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Attached patch does the setting in PyErr_Display (which is an undocumented API, thus presumably private), and adds a test for atexit. ---------- Added file: http://bugs.python.org/file32095/atexit_tracebacks.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 21:29:24 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 19:29:24 +0000 Subject: [issue18776] atexit error display behavior changed in python 3 In-Reply-To: <1376867279.76.0.423082412526.issue18776@psf.upfronthosting.co.za> Message-ID: <1381692564.96.0.371098767107.issue18776@psf.upfronthosting.co.za> Georg Brandl added the comment: With your patch, can the SetTraceback in PyErr_Print be removed? Or should PyErr_Display only set the tb if there is none on the object already? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 21:33:11 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 Oct 2013 19:33:11 +0000 Subject: [issue18776] atexit error display behavior changed in python 3 In-Reply-To: <1381692564.96.0.371098767107.issue18776@psf.upfronthosting.co.za> Message-ID: <1381692758.2498.4.camel@fsol> Antoine Pitrou added the comment: > With your patch, can the SetTraceback in PyErr_Print be removed? I don't think so. PyErr_Print() calls sys.excepthook, which can be overriden with custom code. > Or should PyErr_Display only set the tb if there is none on the > object already? Well, why not! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 21:34:39 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 19:34:39 +0000 Subject: [issue17631] inspect getsource does not display full text of lambda In-Reply-To: <1365030839.21.0.0882950227622.issue17631@psf.upfronthosting.co.za> Message-ID: <1381692879.76.0.792730734119.issue17631@psf.upfronthosting.co.za> Georg Brandl added the comment: Unfortunately, this is impossible to fix with the current implementation, which only tokenizes the source. A full parse would be necessary. Since this is just a minor inconvenience (and there are many situations where the source cannot be found at all), I'm closing this as won't fix. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 21:38:20 2013 From: report at bugs.python.org (CliffM) Date: Sun, 13 Oct 2013 19:38:20 +0000 Subject: [issue19249] Enumeration.__eq__ Message-ID: <1381693100.88.0.523701824631.issue19249@psf.upfronthosting.co.za> New submission from CliffM: Given that enumeration members are Singletons, can we not rely on the default __eq__() method ? (FWIW the existing tests all pass if you delete it) This might be confusing for a reader later, so needs documenting. Although I think it should be documented (in enum.py) either way. Maybe also add a singletoness test ? def test_singleton(self): class A(Enum): X=1 Y=2 self.assertTrue(id(A.X)==id(A.X)) Of course there is good chance that there is a test-case I have not thought of that will defeat this. I am thinking about : a) weak-ref handling of Enums b) unpickling, say by a user of the ZODB Which might break the singletonicity. ?? Any offers ?? ---------- components: Tests messages: 199774 nosy: CliffM priority: normal severity: normal status: open title: Enumeration.__eq__ versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 21:40:35 2013 From: report at bugs.python.org (Nick Guenther) Date: Sun, 13 Oct 2013 19:40:35 +0000 Subject: [issue19250] Duplicate import documentation in py3k Message-ID: <1381693235.0.0.590158180035.issue19250@psf.upfronthosting.co.za> New submission from Nick Guenther: Python3's docs given by >> help("import") duplicate these two paragraphs: "The *public names* defined by a module are determined by checking the module's namespace for a variable named ``__all__``; if defined, it must be a sequence of strings which are names defined or imported by that module. The names given in ``__all__`` are all considered public and are required to exist. If ``__all__`` is not defined, the set of public names includes all names found in the module's namespace which do not begin with an underscore character (``'_'``). ``__all__`` should contain the entire public API. It is intended to avoid accidentally exporting items that are not part of the API (such as library modules which were imported and used within the module). The ``from`` form with ``*`` may only occur in a module scope. Attempting to use it in class or function definitions will raise a ``SyntaxError``." (full output attached for proof) Digging through the sources, I can't find where this is defined. The python2 on my system has the same two paragraphs but they are *not* duplicated there, and in the sources, which admittedly I don't know my way around, Doc/reference/simple_stmts.rst contains these paragraphs but only once each, and grep seems to imply this is the source of them. Did sphinx screw up somewhere between your hg and my distro mirror? Here's my version info (arch linux, 64 bit) [kousu at galleon ~]$ pacman -Qi python Name : python Version : 3.3.2-2 Description : Next generation of the python high-level scripting language Architecture : x86_64 URL : http://www.python.org/ Licenses : custom Groups : None Provides : python3 Depends On : expat bzip2 gdbm openssl libffi zlib Optional Deps : tk: for tkinter [installed] sqlite [installed] Required By : cython ipython ktoblzcheck libreoffice-common python-cairo python-dateutil python-dbus python-markupsafe python-numpy python-pyparsing python-pytz python-pyzmq python-setuptools python-sip python-six python-sympy python-tornado python-xdg ranger youtube-dl Optional For : systemd Conflicts With : None Replaces : python3 Installed Size : 86980.00 KiB Packager : Bart Build Date : Fri Sep 6 03:31:57 2013 Install Date : Tue Sep 17 10:29:36 2013 Install Reason : Installed as a dependency for another package Install Script : No Validated By : Signature ---------- assignee: docs at python components: Documentation files: The ``import`` statement - (2013-10-13 15:36:07) messages: 199775 nosy: docs at python, kousu priority: normal severity: normal status: open title: Duplicate import documentation in py3k versions: Python 3.3 Added file: http://bugs.python.org/file32096/The ``import`` statement - (2013-10-13 15:36:07) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 21:42:08 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 Oct 2013 19:42:08 +0000 Subject: [issue18776] atexit error display behavior changed in python 3 In-Reply-To: <1376867279.76.0.423082412526.issue18776@psf.upfronthosting.co.za> Message-ID: <1381693328.15.0.056835076548.issue18776@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Updated patch. ---------- stage: needs patch -> patch review versions: +Python 3.3 Added file: http://bugs.python.org/file32097/atexit_tracebacks2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 21:44:51 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 Oct 2013 19:44:51 +0000 Subject: [issue18527] Upgrade Modules/zlib to 1.2.8 In-Reply-To: <1374483245.68.0.946100267151.issue18527@psf.upfronthosting.co.za> Message-ID: <1381693491.58.0.70410329162.issue18527@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 21:46:44 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 13 Oct 2013 19:46:44 +0000 Subject: [issue19250] Duplicate import documentation in py3k In-Reply-To: <1381693235.0.0.590158180035.issue19250@psf.upfronthosting.co.za> Message-ID: <1381693604.35.0.61215738439.issue19250@psf.upfronthosting.co.za> Ezio Melotti added the comment: I can reproduce on 3.3; looks OK on 3.4. ---------- nosy: +ezio.melotti type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 21:49:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 19:49:01 +0000 Subject: [issue17730] code.interact() doesn't support no banner In-Reply-To: <1365940117.84.0.770011673155.issue17730@psf.upfronthosting.co.za> Message-ID: <3cyYP33QwRzSky@mail.python.org> Roundup Robot added the comment: New changeset 2933598a7802 by Georg Brandl in branch 'default': Closes #17730: in code.interact(), when banner="", do not print anything. http://hg.python.org/cpython/rev/2933598a7802 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 21:49:32 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 13 Oct 2013 19:49:32 +0000 Subject: [issue4965] Can doc index of html version be separately scrollable? In-Reply-To: <1232148633.29.0.602528403512.issue4965@psf.upfronthosting.co.za> Message-ID: <1381693772.52.0.35688231535.issue4965@psf.upfronthosting.co.za> Ezio Melotti added the comment: Updated patch should fix the nit and factors out $(document) from the scrolling function. Tested on Firefox and Chromium. ---------- Added file: http://bugs.python.org/file32098/issue4965-3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 21:52:17 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 19:52:17 +0000 Subject: [issue4965] Can doc index of html version be separately scrollable? In-Reply-To: <1232148633.29.0.602528403512.issue4965@psf.upfronthosting.co.za> Message-ID: <1381693937.97.0.628349480362.issue4965@psf.upfronthosting.co.za> Georg Brandl added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 21:54:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 19:54:30 +0000 Subject: [issue18776] atexit error display behavior changed in python 3 In-Reply-To: <1376867279.76.0.423082412526.issue18776@psf.upfronthosting.co.za> Message-ID: <3cyYWp1cTXz7LjS@mail.python.org> Roundup Robot added the comment: New changeset 19ce90930e8b by Antoine Pitrou in branch '3.3': Issue #18776: atexit callbacks now display their full traceback when they raise an exception. http://hg.python.org/cpython/rev/19ce90930e8b New changeset c13ef65f3dcf by Antoine Pitrou in branch 'default': Issue #18776: atexit callbacks now display their full traceback when they raise an exception. http://hg.python.org/cpython/rev/c13ef65f3dcf ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 21:55:27 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 Oct 2013 19:55:27 +0000 Subject: [issue18776] atexit error display behavior changed in python 3 In-Reply-To: <1376867279.76.0.423082412526.issue18776@psf.upfronthosting.co.za> Message-ID: <1381694127.54.0.0338565226657.issue18776@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Since it's a regression from 2.7, I chose to commit it as a bugfix (to 3.3 and 3.4). ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:01:05 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 20:01:05 +0000 Subject: [issue19250] Duplicate import documentation in py3k In-Reply-To: <1381693235.0.0.590158180035.issue19250@psf.upfronthosting.co.za> Message-ID: <1381694465.52.0.833998072569.issue19250@psf.upfronthosting.co.za> Georg Brandl added the comment: This is already fixed in the 3.3 branch (see #17938); it will be updated for pydoc "automatically" before the next bugfix release (the actual content comes from Lib/pydoc_data/topics.py). ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:02:17 2013 From: report at bugs.python.org (Nick Guenther) Date: Sun, 13 Oct 2013 20:02:17 +0000 Subject: [issue19250] Duplicate import documentation in py3k In-Reply-To: <1381693235.0.0.590158180035.issue19250@psf.upfronthosting.co.za> Message-ID: <1381694537.72.0.380322079192.issue19250@psf.upfronthosting.co.za> Nick Guenther added the comment: Thank you. Sorry for the duplicates. I tried to search the bug tracker but nothing stood out to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:07:27 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 13 Oct 2013 20:07:27 +0000 Subject: [issue19251] bitwise ops for bytes of equal length Message-ID: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> New submission from Christian Heimes: I like to propose a new feature for bytes and perhaps bytearray. None of the bytes types support bitwise operations like &, | and ^. I like to add the bitwise protocol between byte objects of equal length: >>> a, b = b"123", b"abc" >>> bytes(x ^ y for x, y in zip(a, b)) b'PPP' >>> a ^ b b'PPP' ---------- components: Interpreter Core messages: 199785 nosy: christian.heimes priority: normal severity: normal stage: needs patch status: open title: bitwise ops for bytes of equal length type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:09:58 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 Oct 2013 20:09:58 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1381694998.97.0.972880007973.issue19251@psf.upfronthosting.co.za> Antoine Pitrou added the comment: bytearray should certainly get the same functionality as bytes. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:12:07 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 20:12:07 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1381695127.63.0.76368207066.issue19251@psf.upfronthosting.co.za> Georg Brandl added the comment: I assume you have a use case? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:13:48 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 20:13:48 +0000 Subject: [issue17756] test_syntax_error fails when run in the installed location In-Reply-To: <1366111959.84.0.955866306047.issue17756@psf.upfronthosting.co.za> Message-ID: <1381695228.71.0.104719125383.issue17756@psf.upfronthosting.co.za> Georg Brandl added the comment: Can't reproduce with current 3.3 tip. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:15:47 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 20:15:47 +0000 Subject: [issue17335] FieldStorageClass is messed up In-Reply-To: <1362184463.11.0.388912351396.issue17335@psf.upfronthosting.co.za> Message-ID: <1381695347.51.0.223281473458.issue17335@psf.upfronthosting.co.za> Georg Brandl added the comment: I'll keep the class attribute for compatibility, but will remove the local assignment. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:16:56 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 20:16:56 +0000 Subject: [issue17352] Be clear that __prepare__ must be declared as a class method In-Reply-To: <1362409892.83.0.717786566871.issue17352@psf.upfronthosting.co.za> Message-ID: <1381695416.1.0.00606294577812.issue17352@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:17:02 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 20:17:02 +0000 Subject: [issue17335] FieldStorageClass is messed up In-Reply-To: <1362184463.11.0.388912351396.issue17335@psf.upfronthosting.co.za> Message-ID: <3cyZ1N553kzS2g@mail.python.org> Roundup Robot added the comment: New changeset b9d3e99ea516 by Georg Brandl in branch 'default': Closes #17335: remove no-op assignment. http://hg.python.org/cpython/rev/b9d3e99ea516 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:19:42 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 20:19:42 +0000 Subject: [issue19248] sphinx is not py3k compatible In-Reply-To: <1381691371.24.0.619813163861.issue19248@psf.upfronthosting.co.za> Message-ID: <3cyZ4S51n1zS2g@mail.python.org> Roundup Robot added the comment: New changeset 6e65ee2a0073 by Georg Brandl in branch '3.3': Closes #19248: actually check for Python 3.x in tools/sphinx-build.py. http://hg.python.org/cpython/rev/6e65ee2a0073 ---------- nosy: +python-dev resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:21:16 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2013 20:21:16 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1381695676.27.0.846000925972.issue19251@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Use int's. (int.from_bytes(a, 'big') ^ int.from_bytes(b, 'big')).to_bytes(len(a), 'big') Adding & and | operations to bytes will be confused because bytes is a sequence and this will conflict with set operations. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:26:53 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 20:26:53 +0000 Subject: [issue1539925] warnings in interactive sessions Message-ID: <1381696013.79.0.325494375606.issue1539925@psf.upfronthosting.co.za> Georg Brandl added the comment: Is there still any interest in this? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:30:15 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 Oct 2013 20:30:15 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1381696215.42.0.332429953089.issue19251@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The int-based spelling isn't very pretty though. And sequences are not sets :-) I suppose the use case has something to do with cryptography? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:35:00 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 20:35:00 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <3cyZQW727Bz7Ljc@mail.python.org> Roundup Robot added the comment: New changeset fa7cfbec0d32 by Serhiy Storchaka in branch '2.7': Issue #18758: Fixed and improved cross-references. http://hg.python.org/cpython/rev/fa7cfbec0d32 New changeset 907da535ed9d by Serhiy Storchaka in branch '3.3': Issue #18758: Fixed and improved cross-references. http://hg.python.org/cpython/rev/907da535ed9d New changeset 261d9bf0cc2b by Serhiy Storchaka in branch 'default': Issue #18758: Fixed and improved cross-references. http://hg.python.org/cpython/rev/261d9bf0cc2b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:42:23 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 13 Oct 2013 20:42:23 +0000 Subject: [issue19248] sphinx is not py3k compatible In-Reply-To: <1381691371.24.0.619813163861.issue19248@psf.upfronthosting.co.za> Message-ID: <1381696943.76.0.139241598968.issue19248@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: > Is the assumption that python2 is still supposed to be the default python everywhere? > Is python 3 not able to build itself yet? You can manually install Sphinx >=1.1 (preferably >=1.2.*) (and its dependencies) using Python 3, and directly call `sphinx-build` from so installed Sphinx, instead of using `make`. ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:42:42 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 20:42:42 +0000 Subject: [issue14999] ctypes ArgumentError lists arguments from 1, not 0 In-Reply-To: <1338789005.54.0.744601187049.issue14999@psf.upfronthosting.co.za> Message-ID: <1381696962.1.0.913484610555.issue14999@psf.upfronthosting.co.za> Georg Brandl added the comment: IMO we always use 1-based numbering when counting things. Try e.g. >>> format('a', None) Traceback (most recent call last): File "", line 1, in TypeError: format expects arg 2 to be string or unicode, not NoneType ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:48:39 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2013 20:48:39 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <1381697319.48.0.131567143647.issue18758@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Georg for all your reviews. Only patch for pickle left, and this is not trivial one. ---------- resolution: -> fixed stage: patch review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:50:54 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 13 Oct 2013 20:50:54 +0000 Subject: [issue19027] undefined symbol: _PyParser_Grammar In-Reply-To: <1379265648.95.0.708128098895.issue19027@psf.upfronthosting.co.za> Message-ID: <1381697454.94.0.924309106119.issue19027@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- components: +Build nosy: +ned.deily versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:51:42 2013 From: report at bugs.python.org (CliffM) Date: Sun, 13 Oct 2013 20:51:42 +0000 Subject: [issue19252] Enum.py : Enum.__new__() : Test Coverage Message-ID: <1381697502.11.0.490856984285.issue19252@psf.upfronthosting.co.za> New submission from CliffM: test_nonhash_value tests the lookup of an Enum Member from a value. The current test does not exercise the iteration over values completely -- the if-clause being redundant wrt the existing test. My patch adds an additional test which requires the if-clause. ---------- components: Extension Modules, Tests files: enum.patch keywords: patch messages: 199800 nosy: CliffM priority: normal severity: normal status: open title: Enum.py : Enum.__new__() : Test Coverage type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32099/enum.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:57:16 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2013 20:57:16 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1381697836.92.0.366205937291.issue19251@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: When you work with int's instead of bytes it is spelled pretty enough. Sets are sequences. So having for example iteration and | operation in one function we can't be sure what it means. Please don't turn Python to APL or Perl. Perhaps separated mutable bitset (or bitlist?) type will be more useful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 23:00:36 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 Oct 2013 21:00:36 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1381698036.36.0.198236259902.issue19251@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Sets are sequences. >>> from collections import abc >>> issubclass(abc.Set, abc.Sequence) False >>> issubclass(abc.Sequence, abc.Set) False > Perhaps separated mutable bitset (or bitlist?) type will be more useful. Then I would prefer a view, using e.g. the buffer API, but without any copies. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 23:07:10 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 13 Oct 2013 21:07:10 +0000 Subject: [issue19027] undefined symbol: _PyParser_Grammar In-Reply-To: <1379265648.95.0.708128098895.issue19027@psf.upfronthosting.co.za> Message-ID: <1381698430.25.0.938110084822.issue19027@psf.upfronthosting.co.za> Ned Deily added the comment: It looks like this was caused by the changes for Issue14321 to not run pgen for cross builds. ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 23:08:13 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 21:08:13 +0000 Subject: [issue19253] PyArg_ParseTuple: wrong use of seterror() clips helpful type error annotation Message-ID: <1381698493.04.0.861687446453.issue19253@psf.upfronthosting.co.za> New submission from Georg Brandl: Follow-up to #6624. This issue changed a call to seterror() whose last argument is supposed to be NULL or a "custom error message" given by the ";message" format character. This had two effects: * the custom message (if present) is never printed * the helpful "function() argument X " is omitted and only "must be str, not int" remains >>> format(None, 1) # current behavior TypeError: must be str, not int >>> format(None, 1) # with #6624 reverted (= patch to this issue applied) TypeError: format() argument 2 must be str, not int Almost all uses of the ";" format code are currently broken: the strings must give a complete message, but only give a description of the expected arguments. Most of them should probably just be removed. ---------- components: Interpreter Core files: seterror_fix.patch keywords: patch messages: 199804 nosy: benjamin.peterson, georg.brandl, pitrou priority: normal severity: normal stage: patch review status: open title: PyArg_ParseTuple: wrong use of seterror() clips helpful type error annotation type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32100/seterror_fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 23:10:41 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 13 Oct 2013 21:10:41 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1381698641.5.0.0908527610442.issue19251@psf.upfronthosting.co.za> Christian Heimes added the comment: You got me, Antoine! I'm working on a Python-only implementation of PBKDF2_HMAC. It involves XOR of two bytes in one place. Serhiy, I'm not going to turn Python into Perl. I merely like to provide a simple and well defined feature with existing syntax. I propose bitwise ops only between bytes and bytearrays of equal size. Everything else like unequal size, bitwise ops between integers and bytes etc. are out of the question. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 23:22:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2013 21:22:40 +0000 Subject: [issue19021] AttributeError in Popen.__del__ In-Reply-To: <1379202406.71.0.0429173757884.issue19021@psf.upfronthosting.co.za> Message-ID: <1381699360.01.0.810625879805.issue19021@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 23:25:21 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 21:25:21 +0000 Subject: [issue12348] case sensitivity in packaging.pypi.simple.Crawler In-Reply-To: <1308237667.78.0.20758863265.issue12348@psf.upfronthosting.co.za> Message-ID: <1381699521.94.0.988482433414.issue12348@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing as a packaging-related bug. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 23:31:15 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 21:31:15 +0000 Subject: [issue16657] traceback.format_tb incorrect docsting In-Reply-To: <1355146400.65.0.00525928914729.issue16657@psf.upfronthosting.co.za> Message-ID: <3cybg14CyVz7LjS@mail.python.org> Roundup Robot added the comment: New changeset e6ab0cd959a0 by Georg Brandl in branch '2.7': Closes #16657: fix docstring of traceback.format_tb(). http://hg.python.org/cpython/rev/e6ab0cd959a0 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 23:31:20 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 13 Oct 2013 21:31:20 +0000 Subject: [issue19254] Python implementation of PBKDF2_HMAC Message-ID: <1381699880.62.0.48701357342.issue19254@psf.upfronthosting.co.za> New submission from Christian Heimes: The patch provides a Python implementation of pbkdf2_hmac with Python's hmac module. Although I'm using some tricks it's more than six times slower than OpenSSL's implementation. ---------- files: pbkdf2_py.patch keywords: patch messages: 199808 nosy: christian.heimes priority: normal severity: normal stage: patch review status: open title: Python implementation of PBKDF2_HMAC type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32101/pbkdf2_py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 23:33:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 21:33:43 +0000 Subject: [issue16657] traceback.format_tb incorrect docsting In-Reply-To: <1355146400.65.0.00525928914729.issue16657@psf.upfronthosting.co.za> Message-ID: <3cybjt0fKMz7LjS@mail.python.org> Roundup Robot added the comment: New changeset dcded8c7af89 by Georg Brandl in branch '3.3': Closes #16657: fix docstring of traceback.format_tb(). http://hg.python.org/cpython/rev/dcded8c7af89 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 23:34:15 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2013 21:34:15 +0000 Subject: [issue19255] Don't "wipe" builtins at shutdown Message-ID: <1381700055.32.0.691639350713.issue19255@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Many __del__ methods expect that builtins are existing at the time of executing. But when the object survives until the builtins module is wiped, __del__ will fail with unexpected AttributeError (see issue19021 for example). We can change __del__'s in the stdlib to not use non-cached builtins, but third party code will be broken. Perhaps we should special case shutdown of the builtins module. E.g. reset it to initial value (all initial members of the builtins module are immutable and can't create resource loops) instead wiping. ---------- components: Interpreter Core messages: 199810 nosy: pitrou, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Don't "wipe" builtins at shutdown type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 23:38:17 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Oct 2013 21:38:17 +0000 Subject: [issue16732] setup.py support for xxmodule without tkinker In-Reply-To: <1355947283.43.0.495525141996.issue16732@psf.upfronthosting.co.za> Message-ID: <3cybq81G15z7Ljc@mail.python.org> Roundup Robot added the comment: New changeset c167ab1c49c9 by Georg Brandl in branch '2.7': Closes #16732: move "xxmodule" comment block to detect_modules(). (Already done in 3.x) http://hg.python.org/cpython/rev/c167ab1c49c9 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 23:47:08 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 13 Oct 2013 21:47:08 +0000 Subject: [issue17084] nntplib.NNTP.xover does not always return results as documented In-Reply-To: <1359573413.45.0.835923158727.issue17084@psf.upfronthosting.co.za> Message-ID: <1381700828.61.0.442601177574.issue17084@psf.upfronthosting.co.za> Georg Brandl added the comment: The NNTP server seems to be violating the protocol; it is supposed to convert tab characters in the fields to spaces. It appears that in your example the list of references was separated by a tab character, which Python then (correctly) interprets as separator. ---------- nosy: +georg.brandl resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:05:18 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 13 Oct 2013 22:05:18 +0000 Subject: [issue19246] GC does not really free up memory in console In-Reply-To: <1381665601.5.0.467418586985.issue19246@psf.upfronthosting.co.za> Message-ID: <1381701918.32.0.83266942609.issue19246@psf.upfronthosting.co.za> Tim Peters added the comment: Here on 32-bit Windows Vista, with Python 3: C:\Python33>python.exe Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> a = {} >>> for k in range(1000000): a['a' * k] = k ... Traceback (most recent call last): File "", line 1, in MemoryError >>> del a And here too Task Manager shows that Python has given back close to 2GB of memory. >>> a = {} >>> for k in range(100000): a['a' * k] = k ... Traceback (most recent call last): File "", line 1, in MemoryError And here Task Manager shows that there's tons of memory still available. sys._debugmallocstats() shows nothing odd after another "a = {}" - only 7 arenas are allocated, less than 2 MB. Of course this has nothing to do with running in interactive mode. Same thing happens in a program (catching MemoryError, etc). So best guess is that Microsoft's allocators have gotten fatally fragmented, but I don't know how to confirm/refute that. It would be good to get some reports from non-Windows 32-bit boxes. If those are fine, then we can be "almost sure" it's a Microsoft problem. ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:10:25 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 Oct 2013 22:10:25 +0000 Subject: [issue19246] GC does not really free up memory in console In-Reply-To: <1381665601.5.0.467418586985.issue19246@psf.upfronthosting.co.za> Message-ID: <1381702225.07.0.785606408169.issue19246@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Works fine on a 32-bit Linux build (64-bit machine, though): >>> import sys >>> sys.maxsize 2147483647 >>> a = {} >>> for k in range(1000000): a['a' * k] = k ... Traceback (most recent call last): File "", line 1, in MemoryError >>> del a >>> a = {} >>> for k in range(1000000): a[k] = k ... >>> Note that Linux says the process eats 4GB RAM. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:14:10 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 13 Oct 2013 22:14:10 +0000 Subject: [issue19246] GC does not really free up memory in console In-Reply-To: <1381665601.5.0.467418586985.issue19246@psf.upfronthosting.co.za> Message-ID: <1381702450.57.0.562959436455.issue19246@psf.upfronthosting.co.za> STINNER Victor added the comment: int type of Python 2 uses an internal "free list" which has an unlimited size. If once you have 1 million different integers are the same time, the memory will never be released, even if the container storing all these integers is removed, because a reference is kept in the free list. This is a known issue of Python 2, solved "indirectly" in Python 3, because "int" type of Python 3 does not use a free list. The long type of Python 2 does not use a free list neither. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:15:25 2013 From: report at bugs.python.org (Alan Cristhian) Date: Sun, 13 Oct 2013 22:15:25 +0000 Subject: [issue1539925] warnings in interactive sessions Message-ID: <1381702525.08.0.285047093247.issue1539925@psf.upfronthosting.co.za> Changes by Alan Cristhian : ---------- nosy: +Alan.Cristhian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:16:50 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 Oct 2013 22:16:50 +0000 Subject: [issue19255] Don't "wipe" builtins at shutdown In-Reply-To: <1381700055.32.0.691639350713.issue19255@psf.upfronthosting.co.za> Message-ID: <1381702577.2498.6.camel@fsol> Antoine Pitrou added the comment: > Perhaps we should special case shutdown of the builtins module. E.g. > reset it to initial value (all initial members of the builtins module > are immutable and can't create resource loops) instead wiping. This sounds like a reasonable approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:22:58 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 13 Oct 2013 22:22:58 +0000 Subject: [issue19246] GC does not really free up memory in console In-Reply-To: <1381665601.5.0.467418586985.issue19246@psf.upfronthosting.co.za> Message-ID: <1381702978.81.0.485125683292.issue19246@psf.upfronthosting.co.za> Tim Peters added the comment: haypo, there would only be a million ints here even if the loop had completed. That's trivial in context (maybe 14 MB for the free list in Python 2?). And note that I did my example run under Python 3. Besides, the OP and I both reported that Task Manager showed that Python did release "almost all" of the memory back to the OS. While the first MemoryError occurs when available memory has been truly exhausted, the second MemoryError occurs with way over a gigabyte of memory still "free" (according to Task Manager). Best guess is that it is indeed free, but so fragmented that MS C's allocator can't deal with it. That would not be unprecedented on Windows ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:30:08 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sun, 13 Oct 2013 22:30:08 +0000 Subject: [issue19256] Optimize marshal format and add version token. Message-ID: <1381703408.57.0.928931596293.issue19256@psf.upfronthosting.co.za> New submission from Kristj?n Valur J?nsson: Issue $19219 added new tokens making marshal format smaller and faster. This patch adds two new tokens: TYPE_SHORT_REF for which the ref index is a byte and TYPE_VERSION for which the operand is the protocol version. The former helps because it catches common singletons such as 0, 1, () and so on which typically show up early in a pickle. they then need only two bytes to encoded. This shrinks the code for the decimal.py module from 172K to 162K. The second can help break backwards compatibility requirements in the future. The format (if 4 or larger) is now put into the stream, so that future new formats can re-assign opcodes if needed. I don't reassign the version number, leaving it at the new value of 4. This change is still backwards compatible with the previous '4' so there should be no problem. For size / performance comparison, try: python.exe -m timeit -s "import decimal; c=compile(open(decimal.__file__).read(), decimal.__file__, 'exec'); import marshal; d=marshal.dumps(c); print(len(d))" "marshal.loads(d)" ---------- files: marshal.patch keywords: patch messages: 199818 nosy: haypo, kristjan.jonsson, pitrou priority: normal severity: normal status: open title: Optimize marshal format and add version token. type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32102/marshal.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:34:20 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 Oct 2013 22:34:20 +0000 Subject: [issue19256] Optimize marshal format and add version token. In-Reply-To: <1381703408.57.0.928931596293.issue19256@psf.upfronthosting.co.za> Message-ID: <1381703660.5.0.047285604046.issue19256@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:39:07 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2013 22:39:07 +0000 Subject: [issue19256] Optimize marshal format and add version token. In-Reply-To: <1381703408.57.0.928931596293.issue19256@psf.upfronthosting.co.za> Message-ID: <1381703947.77.0.133788926682.issue19256@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Let defer version token until it be needed. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:42:37 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 13 Oct 2013 22:42:37 +0000 Subject: [issue19256] Optimize marshal format and add version token. In-Reply-To: <1381703408.57.0.928931596293.issue19256@psf.upfronthosting.co.za> Message-ID: <1381704157.88.0.368717642462.issue19256@psf.upfronthosting.co.za> STINNER Victor added the comment: Good idea to add a version. But it should not be a token, but a mandatory header at the beginning. For example, 16 unsigned bits at the beginning. Many file formats use a "magic" key, like "MZ" for Windows executable or "GIF" for GIF pictures. What do you think of adding such magic string (if it does not exist yet, I don't know the marshal format... is it documented somewhere?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:44:34 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 Oct 2013 22:44:34 +0000 Subject: [issue19256] Optimize marshal format and add version token. In-Reply-To: <1381704157.88.0.368717642462.issue19256@psf.upfronthosting.co.za> Message-ID: <1381704242.2498.7.camel@fsol> Antoine Pitrou added the comment: I actually agree with Kristjan that an opcode is the least disruptive choice here. I also agree it's useful if we want to be able to evolve the protocol without being tied by backwards compatibility constraints. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:53:12 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 13 Oct 2013 22:53:12 +0000 Subject: [issue19256] Optimize marshal format and add version token. In-Reply-To: <1381704242.2498.7.camel@fsol> Message-ID: STINNER Victor added the comment: "I actually agree with Kristjan that an opcode is the least disruptive choice here." Does you mean that data serialized with python 3.3 can be read with python 3.4? But not the opposite (version token unknown in Python 3.3)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:57:10 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 Oct 2013 22:57:10 +0000 Subject: [issue19256] Optimize marshal format and add version token. In-Reply-To: Message-ID: <1381704998.2498.9.camel@fsol> Antoine Pitrou added the comment: > "I actually agree with Kristjan that an opcode is the least disruptive > choice here." > > Does you mean that data serialized with python 3.3 can be read with > python 3.4? But not the opposite (version token unknown in Python > 3.3)? Yes, indeed. I'm not sure it's very important but it's safer in case people have old "frozen" modules around. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 01:40:50 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 13 Oct 2013 23:40:50 +0000 Subject: [issue19027] undefined symbol: _PyParser_Grammar In-Reply-To: <1379265648.95.0.708128098895.issue19027@psf.upfronthosting.co.za> Message-ID: <1381707650.69.0.803657456252.issue19027@psf.upfronthosting.co.za> Ned Deily added the comment: BTW, this can be worked around (for non cross-builds at least) by running "make touch" on the source directory, e.g.: make -C python/src -f python/build/Makefile touch But it should be fixed. Doko? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 02:00:16 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 14 Oct 2013 00:00:16 +0000 Subject: [issue4965] Can doc index of html version be separately scrollable? In-Reply-To: <1232148633.29.0.602528403512.issue4965@psf.upfronthosting.co.za> Message-ID: <3cyfzM6qjPzNQC@mail.python.org> Roundup Robot added the comment: New changeset 3bb34d370871 by Ezio Melotti in branch '3.3': #4965: Implement intelligent scrolling of the sidebar in the docs. http://hg.python.org/cpython/rev/3bb34d370871 New changeset 8d916ea12efb by Ezio Melotti in branch 'default': #4965: merge with 3.3. http://hg.python.org/cpython/rev/8d916ea12efb ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 02:04:49 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 14 Oct 2013 00:04:49 +0000 Subject: [issue4965] Can doc index of html version be separately scrollable? In-Reply-To: <1232148633.29.0.602528403512.issue4965@psf.upfronthosting.co.za> Message-ID: <1381709089.33.0.0909462709894.issue4965@psf.upfronthosting.co.za> Ezio Melotti added the comment: I committed the patch on 3.3/3.x. I'm willing to port the patch on 2.7 too, however sidebar.js is not in Doc/tools/sphinxext/static/ but in Doc/tools/sphinx/themes/default/static/, which is not under version control. How do you suggest to proceed? ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 02:07:11 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 14 Oct 2013 00:07:11 +0000 Subject: [issue19252] Enum.py : Enum.__new__() : Test Coverage In-Reply-To: <1381697502.11.0.490856984285.issue19252@psf.upfronthosting.co.za> Message-ID: <1381709231.75.0.266440013316.issue19252@psf.upfronthosting.co.za> Ethan Furman added the comment: I'm not sure what you are talking about. Here's the code: try: if value in cls._value2member_map_: return cls._value2member_map_[value] except TypeError: # not there, now do long search -- O(n) behavior for member in cls._member_map_.values(): if member.value == value: return member Here's the test: self.assertEqual(ColorInAList([1]), ColorInAList.red) In order for that test to work, the first if (in the try) raises a TypeError, then execution falls into the except block and each member is tested for equality until one matches (via the if) -- so what is your added test doing that isn't already being done? ---------- assignee: -> ethan.furman nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 02:24:07 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 14 Oct 2013 00:24:07 +0000 Subject: [issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser In-Reply-To: <1381041750.41.0.637077946349.issue19176@psf.upfronthosting.co.za> Message-ID: <1381710247.69.0.846977512945.issue19176@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 02:44:30 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 14 Oct 2013 00:44:30 +0000 Subject: [issue19082] Lib/xmlrpc/client.py demo code points to the dead server In-Reply-To: <1380034126.83.0.318957814744.issue19082@psf.upfronthosting.co.za> Message-ID: <1381711470.08.0.977238746149.issue19082@psf.upfronthosting.co.za> Senthil Kumaran added the comment: The patch is good. I think, it is better to include this information in documentation too. Please let me know if this suitable, I shall go ahead committing this. (With credits to Vajrasky Kok) ---------- assignee: -> orsenthil nosy: +orsenthil versions: +Python 3.3 Added file: http://bugs.python.org/file32103/issue19082-patch3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 02:51:11 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 14 Oct 2013 00:51:11 +0000 Subject: [issue19249] Enumeration.__eq__ In-Reply-To: <1381693100.88.0.523701824631.issue19249@psf.upfronthosting.co.za> Message-ID: <1381711871.85.0.360778538748.issue19249@psf.upfronthosting.co.za> Ethan Furman added the comment: Here's the current __eq__ method: def __eq__(self, other): if type(other) is self.__class__: return self is other return NotImplemented It is, in fact, using identity and not value equality. I'm thinking we should either remove and go with the default __eq__, or change it to value equality. One possible reason to use value equality is that pickle protocols below 2 will actually create duplicate Enum members, breaking identity tests; if someone is stuck using pickle that way, they could still use Enum with `==` and not `is`. Identity tests are already incorporated in many of the existing tests. Gentlemen, what do you think? ---------- assignee: -> ethan.furman nosy: +barry, eli.bendersky, ethan.furman type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 02:57:54 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 14 Oct 2013 00:57:54 +0000 Subject: [issue11763] assertEqual memory issues with large text inputs In-Reply-To: <1301948164.44.0.0206798295308.issue11763@psf.upfronthosting.co.za> Message-ID: <1381712274.56.0.543920084041.issue11763@psf.upfronthosting.co.za> Ezio Melotti added the comment: Attached an updated patch that addresses Serhiy comments. The tests in the previous patch have been committed already, so this might need new tests. The first problem I mentioned in msg134530 has been reported in #19217. ---------- Added file: http://bugs.python.org/file32104/issue11763-3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 03:19:06 2013 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 14 Oct 2013 01:19:06 +0000 Subject: [issue18606] Add statistics module to standard library In-Reply-To: <1381656073.6.0.48856375736.issue18606@psf.upfronthosting.co.za> Message-ID: <20131014011759.GW7989@ando> Steven D'Aprano added the comment: Oscar Benjamin has just made a proposal to me off-list that has *almost* convinced me to make statistics.sum a private implementation detail, at least for the 3.4 release. I won't go into detail about Oscar's proposal, but it has caused me to rethink all the arguments for making sum public. Given that the PEP concludes that sum ought to be public, is it appropriate to defer that part of it until 3.5 without updating the PEP? I'd like to shift sum -> _sum for 3.4, then if Oscar's ideas don't pan out, in 3.5 make sum public. (None of this will effect the public interface for mean, variance, etc.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 03:24:25 2013 From: report at bugs.python.org (Tim Peters) Date: Mon, 14 Oct 2013 01:24:25 +0000 Subject: [issue18606] Add statistics module to standard library In-Reply-To: <1375258820.22.0.0684222529612.issue18606@psf.upfronthosting.co.za> Message-ID: <1381713865.19.0.776912919318.issue18606@psf.upfronthosting.co.za> Tim Peters added the comment: Do what's best for the future of the module. A PEP is more of a starting point than a constraint, especially for implementation details. And making a private thing public later is one ginormous whale of a lot easier than trying to remove a public thing later. "Practicality beats purity" once again ;-) ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 03:30:31 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 14 Oct 2013 01:30:31 +0000 Subject: [issue19217] Calling assertEquals for moderately long list takes too long In-Reply-To: <1381410286.72.0.514206486634.issue19217@psf.upfronthosting.co.za> Message-ID: <1381714231.96.0.986094229882.issue19217@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here's a proof of concept to fix the issue (still lacks tests and breaks one existing test). The problem is that assertSequenceEqual computes the diff regardless of the size of the sequences, and then truncates it if it's too long. Producing the diff takes time, so checking the size of the sequences and skip the diff if they are too long solves the problem. In the patch I used an hardcoded and arbitrary value of 30 elements -- the other attributes like maxDiff and _diffThreshold can't be used here. The value is so low because if the sequence doesn't fit in one line, the output will list one element per line, resulting in 30+ lines of output which is not very readable IMHO. Also note that regardless of the this diff, the error message indicates what is the position of the first element that differs. The threshold value I picked could be moved to a _seqDiffThreshold (and possibly _diffThreshold can be renamed to _strDiffThreshold). This issue is related to #11763. All other methods should be checked for similar issues. ---------- assignee: michael.foord -> ezio.melotti keywords: +patch stage: needs patch -> patch review versions: +Python 2.7 Added file: http://bugs.python.org/file32105/issue19217.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 03:43:13 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 14 Oct 2013 01:43:13 +0000 Subject: [issue11928] fail on filename with space at the end In-Reply-To: <1303836707.17.0.285457821827.issue11928@psf.upfronthosting.co.za> Message-ID: <1381714993.61.0.990893493076.issue11928@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- type: -> behavior versions: +Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 03:46:58 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 14 Oct 2013 01:46:58 +0000 Subject: [issue17029] h2py.py: search the multiarch include dir if it does exist In-Reply-To: <1359115169.66.0.228835023529.issue17029@psf.upfronthosting.co.za> Message-ID: <1381715218.68.0.0765001523177.issue17029@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 04:05:10 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 14 Oct 2013 02:05:10 +0000 Subject: [issue15826] Increased test coverage of test_glob.py In-Reply-To: <1346381534.69.0.636623200483.issue15826@psf.upfronthosting.co.za> Message-ID: <1381716310.78.0.712689515496.issue15826@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: patch review -> commit review versions: -Python 3.2, Python 3.3 Added file: http://bugs.python.org/file32106/issue15826.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 04:08:03 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 14 Oct 2013 02:08:03 +0000 Subject: [issue887237] Machine integers Message-ID: <1381716483.56.0.647656636464.issue887237@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 04:12:51 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 14 Oct 2013 02:12:51 +0000 Subject: [issue4888] misplaced (or misleading) assert in ceval.c In-Reply-To: <1231476734.82.0.767072982695.issue4888@psf.upfronthosting.co.za> Message-ID: <1381716771.76.0.929052665389.issue4888@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> patch review versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 04:32:17 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 14 Oct 2013 02:32:17 +0000 Subject: [issue14112] tutorial intro talks of "shallow copy" concept without explanation In-Reply-To: <1330113005.05.0.0872009811322.issue14112@psf.upfronthosting.co.za> Message-ID: <1381717937.74.0.612913657278.issue14112@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here is a patch that adds glossary entries for deep and shallow copy. I tried to keep them simple and clear enough. FWIW http://docs.python.org/3.4/library/copy.html also has a definition of the terms. If my definitions are OK I will add links to the terms were appropriate. ---------- keywords: +patch nosy: +georg.brandl stage: -> patch review type: -> enhancement versions: +Python 3.4 -Python 3.2 Added file: http://bugs.python.org/file32107/issue14112.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 04:57:03 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 14 Oct 2013 02:57:03 +0000 Subject: [issue4888] misplaced (or misleading) assert in ceval.c In-Reply-To: <1231476734.82.0.767072982695.issue4888@psf.upfronthosting.co.za> Message-ID: <1381719423.45.0.717267567177.issue4888@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 06:00:57 2013 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 14 Oct 2013 04:00:57 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1381723257.51.0.803764971904.issue19251@psf.upfronthosting.co.za> Ramchandra Apte added the comment: +1 ---------- nosy: +Ramchandra Apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 06:27:05 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 04:27:05 +0000 Subject: [issue4965] Can doc index of html version be separately scrollable? In-Reply-To: <1232148633.29.0.602528403512.issue4965@psf.upfronthosting.co.za> Message-ID: <1381724825.8.0.707084836266.issue4965@psf.upfronthosting.co.za> Georg Brandl added the comment: You'll have to put a copy in sphinxext/static. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 06:29:52 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 14 Oct 2013 04:29:52 +0000 Subject: [issue18521] [cppcheck] Full report In-Reply-To: <1374408848.64.0.369654911435.issue18521@psf.upfronthosting.co.za> Message-ID: <1381724992.56.0.906827897749.issue18521@psf.upfronthosting.co.za> Ezio Melotti added the comment: I grouped the errors by message and checked of there were any actual errors. Most of the reports seemed wrong or false positive, but a few looked fixable. I haven't checked the "Unusued variable" ones, because they are harmless (even thought we could clean them up), and the "value assigned to a var that is never used" (I suspect most of these are to silence compiler warnings about unused return values). These two categories cover more than half of the errors. I attach the file with the grouped content and some notes I took about the errors I looked at in case someone wants to check the remaining issues. ---------- nosy: +ezio.melotti, haypo, serhiy.storchaka versions: +Python 3.4 -Python 3.5 Added file: http://bugs.python.org/file32108/cppcheck_reports_filtered_grouped.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 06:30:34 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 04:30:34 +0000 Subject: [issue14112] tutorial intro talks of "shallow copy" concept without explanation In-Reply-To: <1330113005.05.0.0872009811322.issue14112@psf.upfronthosting.co.za> Message-ID: <1381725034.04.0.370845128705.issue14112@psf.upfronthosting.co.za> Georg Brandl added the comment: The text talks about containers which, although often the case, is not general enough; copy() and deepcopy() can work with any object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 06:45:23 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 14 Oct 2013 04:45:23 +0000 Subject: [issue18521] [cppcheck] Full report In-Reply-To: <1374408848.64.0.369654911435.issue18521@psf.upfronthosting.co.za> Message-ID: <3cynJM1g7yz7Ljb@mail.python.org> Roundup Robot added the comment: New changeset eaeaed43ff1c by Georg Brandl in branch 'default': Re #18521: fix not-quite-C syntax that works only because the PyXXX_Check are macros defined with () around them. http://hg.python.org/cpython/rev/eaeaed43ff1c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 06:52:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 14 Oct 2013 04:52:38 +0000 Subject: [issue18521] [cppcheck] Full report In-Reply-To: <1374408848.64.0.369654911435.issue18521@psf.upfronthosting.co.za> Message-ID: <3cynSj4Cchz7Ljb@mail.python.org> Roundup Robot added the comment: New changeset 7396d10405db by Georg Brandl in branch 'default': Re #18521: remove assignments of variables that are immediately reassigned. http://hg.python.org/cpython/rev/7396d10405db ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 07:00:44 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 14 Oct 2013 05:00:44 +0000 Subject: [issue18521] [cppcheck] Full report In-Reply-To: <1374408848.64.0.369654911435.issue18521@psf.upfronthosting.co.za> Message-ID: <3cyndg0rcwz7Ljb@mail.python.org> Roundup Robot added the comment: New changeset 63bc2fe28a6e by Georg Brandl in branch 'default': Re #18521: move array bounds check before array access. http://hg.python.org/cpython/rev/63bc2fe28a6e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 07:03:01 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 05:03:01 +0000 Subject: [issue18521] [cppcheck] Full report In-Reply-To: <1374408848.64.0.369654911435.issue18521@psf.upfronthosting.co.za> Message-ID: <1381726981.65.0.0468397193747.issue18521@psf.upfronthosting.co.za> Georg Brandl added the comment: I fixed some items from Ezio's list that I think were legitimate; the rest is mostly invalid. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 07:54:08 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Oct 2013 05:54:08 +0000 Subject: [issue18606] Add statistics module to standard library In-Reply-To: <1375258820.22.0.0684222529612.issue18606@psf.upfronthosting.co.za> Message-ID: <1381730048.35.0.951604502533.issue18606@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I think this should get checked in so that people can start interacting with it. The docstrings and whatnot can get tweaked later. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 08:45:11 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 06:45:11 +0000 Subject: [issue18521] [cppcheck] Full report In-Reply-To: <1374408848.64.0.369654911435.issue18521@psf.upfronthosting.co.za> Message-ID: <1381733111.4.0.859476157125.issue18521@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Shouldn't converttuple() in getargs.c set "levels[1] = 0;" after second "levels[0] = i+1;"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 09:08:43 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 07:08:43 +0000 Subject: [issue18521] [cppcheck] Full report In-Reply-To: <1374408848.64.0.369654911435.issue18521@psf.upfronthosting.co.za> Message-ID: <1381734523.24.0.273951991986.issue18521@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Agree that all other looks false positive or unimportant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 09:09:22 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Oct 2013 07:09:22 +0000 Subject: [issue19256] Optimize marshal format and add version token. In-Reply-To: <1381703408.57.0.928931596293.issue19256@psf.upfronthosting.co.za> Message-ID: <1381734562.19.0.641512468641.issue19256@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Unlike pickle, the marshal module makes no promises about keeping the format consistent between Python versions. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 09:29:15 2013 From: report at bugs.python.org (Alex Gaynor) Date: Mon, 14 Oct 2013 07:29:15 +0000 Subject: [issue19257] Sub-optimal error message when importing a non-package Message-ID: <1381735755.7.0.417601101762.issue19257@psf.upfronthosting.co.za> New submission from Alex Gaynor: Use case: Alexanders-MacBook-Pro:pypy alex_gaynor$ python3.3 Python 3.3.2 (default, May 29 2013, 14:03:57) [GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import datetime.datetime Traceback (most recent call last): File "", line 1521, in _find_and_load_unlocked AttributeError: 'module' object has no attribute '__path__' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in ImportError: No module named 'datetime.datetime'; datetime is not a package >>> Showing the user the original "module has no attribute __path__" error is just confusing, we should hide it. ---------- messages: 199847 nosy: alex priority: normal severity: normal status: open title: Sub-optimal error message when importing a non-package _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 09:44:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 14 Oct 2013 07:44:57 +0000 Subject: [issue19189] Improve cross-references in pickle documentation. In-Reply-To: <1381178353.55.0.131251765353.issue19189@psf.upfronthosting.co.za> Message-ID: <3cysHX3Cn1z7LjQ@mail.python.org> Roundup Robot added the comment: New changeset c99a3566be83 by Serhiy Storchaka in branch '2.7': Issue #19189: Improved cross-references in the pickle module documentation. http://hg.python.org/cpython/rev/c99a3566be83 New changeset f2c725fb4b2f by Serhiy Storchaka in branch '3.3': Issue #19189: Improved cross-references in the pickle module documentation. http://hg.python.org/cpython/rev/f2c725fb4b2f New changeset 37c06d20dda5 by Serhiy Storchaka in branch 'default': Issue #19189: Improved cross-references in the pickle module documentation. http://hg.python.org/cpython/rev/37c06d20dda5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 09:49:42 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 07:49:42 +0000 Subject: [issue19189] Improve cross-references in pickle documentation. In-Reply-To: <1381178353.55.0.131251765353.issue19189@psf.upfronthosting.co.za> Message-ID: <1381736982.57.0.516722810945.issue19189@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Georg for your review and for your suggestion. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 09:49:57 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 07:49:57 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <1381736997.92.0.57969844362.issue18758@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 09:54:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 07:54:14 +0000 Subject: [issue19256] Optimize marshal format and add version token. In-Reply-To: <1381703408.57.0.928931596293.issue19256@psf.upfronthosting.co.za> Message-ID: <1381737254.9.0.312505684379.issue19256@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The version token needed only when we want break backward compatibility (change the meaning of existing opcodes). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 10:18:39 2013 From: report at bugs.python.org (koobs) Date: Mon, 14 Oct 2013 08:18:39 +0000 Subject: [issue18919] Unify audio modules tests In-Reply-To: <1378293110.61.0.780572869606.issue18919@psf.upfronthosting.co.za> Message-ID: <1381738719.49.0.866771410395.issue18919@psf.upfronthosting.co.za> koobs added the comment: Tests fail for 2.7 on the koobs-freebsd9 and koobs-freebsd10 buildbots since a9f967c8d002db364021a5fb1c9926a27029e849 Taking a snapshot of the output here for reference: test_aifc test test_aifc produced unexpected output: ********************************************************************** Warning: bad COMM chunk size Warning: bad COMM chunk size Warning: MARK chunk contains only 0 markers instead of 1 ********************************************************************** 363 tests OK. 1 test failed: test_aifc Re-running failed tests in verbose mode Re-running test 'test_aifc' in verbose mode test_read_comm_kludge_compname_even (test.test_aifc.AIFCLowLevelTest) ... Warning: bad COMM chunk size ok test_read_comm_kludge_compname_odd (test.test_aifc.AIFCLowLevelTest) ... Warning: bad COMM chunk size ok test_read_wrong_marks (test.test_aifc.AIFCLowLevelTest) ... Warning: MARK chunk contains only 0 markers instead of 1 ok ---------------------------------------------------------------------- Ran 80 tests in 0.102s OK ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 10:46:13 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 14 Oct 2013 08:46:13 +0000 Subject: [issue18606] Add statistics module to standard library In-Reply-To: <1381730048.35.0.951604502533.issue18606@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: +0 for starting with _sum as private and +1 for getting this initial version checked in for alpha 4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 10:53:27 2013 From: report at bugs.python.org (CliffM) Date: Mon, 14 Oct 2013 08:53:27 +0000 Subject: [issue19252] Enum.py : Enum.__new__() : Test Coverage In-Reply-To: <1381697502.11.0.490856984285.issue19252@psf.upfronthosting.co.za> Message-ID: <1381740807.48.0.594318314007.issue19252@psf.upfronthosting.co.za> CliffM added the comment: Sorry -- I could have been clearer : The conditional: if member.value == value: Is redundant as the tests stand. If you comment it out -- everything works. So therefore we are missing a test. The current test works, as red is the first value to pop out of the value() list. This makes the if-clause fragile for future maintenance. So we need another test to ensure the loop is covered. It's a coverage issue -- where although the code is executed by the test, and the code is correct, the test is not complete enough for the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 10:58:38 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 08:58:38 +0000 Subject: [issue18919] Unify audio modules tests In-Reply-To: <1378293110.61.0.780572869606.issue18919@psf.upfronthosting.co.za> Message-ID: <1381741118.43.0.0659178013886.issue18919@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is unexpected output considered as test failing? The aifc module uses bare print to output these "warnings" to stdout. Here is a patch which uses captured_stdout(). ---------- Added file: http://bugs.python.org/file32109/test_aifc_capture_warnings.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 10:59:00 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 08:59:00 +0000 Subject: [issue18919] Unify audio modules tests In-Reply-To: <1378293110.61.0.780572869606.issue18919@psf.upfronthosting.co.za> Message-ID: <1381741140.18.0.122048236087.issue18919@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: committed/rejected -> patch review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 11:02:45 2013 From: report at bugs.python.org (Berker Peksag) Date: Mon, 14 Oct 2013 09:02:45 +0000 Subject: [issue19257] Sub-optimal error message when importing a non-package In-Reply-To: <1381735755.7.0.417601101762.issue19257@psf.upfronthosting.co.za> Message-ID: <1381741365.18.0.293842742311.issue19257@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +brett.cannon, eric.snow versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 11:04:44 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 09:04:44 +0000 Subject: [issue19217] Calling assertEquals for moderately long list takes too long In-Reply-To: <1381410286.72.0.514206486634.issue19217@psf.upfronthosting.co.za> Message-ID: <1381741484.14.0.659133344835.issue19217@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Perhaps a combination of len(pprint.pformat(seq1).splitlines()) and len(pprint.pformat(seq2).splitlines()) (minimum, maximum or production) is better metric? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 11:21:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Oct 2013 09:21:28 +0000 Subject: [issue19256] Optimize marshal format and add version token. In-Reply-To: <1381737254.9.0.312505684379.issue19256@psf.upfronthosting.co.za> Message-ID: <656062652.76406831.1381742461262.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > The version token needed only when we want break backward > compatibility (change the meaning of existing opcodes). This is true. For example, my first hunch was to make w_long() emit variable-length data, (0-254: one byte integer, 255: four bytes integer following the 255 prefix). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 11:23:40 2013 From: report at bugs.python.org (Esa Peuha) Date: Mon, 14 Oct 2013 09:23:40 +0000 Subject: [issue19246] GC does not really free up memory in console In-Reply-To: <1381665601.5.0.467418586985.issue19246@psf.upfronthosting.co.za> Message-ID: <1381742620.43.0.119057862007.issue19246@psf.upfronthosting.co.za> Esa Peuha added the comment: > So best guess is that Microsoft's allocators have gotten fatally fragmented, but I don't know how to confirm/refute that. Let's test this in pure C. Compile and run the attached uglyhack.c on win32; if it reports something significantly less than 100%, it's probably safe to conclude that this has nothing to do with Python. ---------- nosy: +Esa.Peuha Added file: http://bugs.python.org/file32110/uglyhack.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 11:40:15 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 14 Oct 2013 09:40:15 +0000 Subject: [issue19258] Got resource warning when running wsgiref demo app Message-ID: <1381743615.58.0.125660440046.issue19258@psf.upfronthosting.co.za> New submission from Vajrasky Kok: ./python Lib/wsgiref/simple_server.py Serving HTTP on 0.0.0.0 port 8000 ... 127.0.0.1 - - [14/Oct/2013 17:23:43] "GET /xyz?abc HTTP/1.1" 200 4510 sys:1: ResourceWarning: unclosed Attached the patch to close the socket. ---------- components: Library (Lib) files: close_server_in_wsgiref_demo.patch keywords: patch messages: 199858 nosy: vajrasky priority: normal severity: normal status: open title: Got resource warning when running wsgiref demo app type: resource usage versions: Python 3.4 Added file: http://bugs.python.org/file32111/close_server_in_wsgiref_demo.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 12:33:34 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 14 Oct 2013 10:33:34 +0000 Subject: [issue19254] Python implementation of PBKDF2_HMAC In-Reply-To: <1381699880.62.0.48701357342.issue19254@psf.upfronthosting.co.za> Message-ID: <1381746814.93.0.771319448368.issue19254@psf.upfronthosting.co.za> Christian Heimes added the comment: Here is an optimized version with inline HMAC. Contrary to the implementations in OpenSSL, PyCrypto, and pbkdf2.py the length of the password has almost no impact on the runtime of my implementation. ---------- Added file: http://bugs.python.org/file32112/pbkdf2_py2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 12:42:15 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 14 Oct 2013 10:42:15 +0000 Subject: [issue19082] Lib/xmlrpc/client.py demo code points to the dead server In-Reply-To: <1380034126.83.0.318957814744.issue19082@psf.upfronthosting.co.za> Message-ID: <1381747335.93.0.821562727446.issue19082@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Hi, Senthil Kumaran, thank you for your review. I have one small complain about your improved patch. Perhaps we need to give security warning when they want to use allow_dotted_names feature in the documentation. I omitted the warning in the demo because it is just a demo. >From the source code (Lib/xmlrpc/server.py): *** SECURITY WARNING: *** Enabling the allow_dotted_names options allows intruders to access your module's global variables and may allow intruders to execute arbitrary code on your machine. Only use this option on a secure, closed network. Whether we want to give a separate example without allow_dotted_names feature or using example without allow_dotted_names feature entirely, I am not really sure. What do you say? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 12:48:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 10:48:40 +0000 Subject: [issue18965] 2to3 can produce illegal bytes literals In-Reply-To: <1378598799.8.0.0499553446902.issue18965@psf.upfronthosting.co.za> Message-ID: <1381747720.07.0.900926279041.issue18965@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Benjamin, what would you say about this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 12:51:28 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 10:51:28 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <1381747888.72.0.348932296167.issue19085@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If there are no objections I'm going to commit this. ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 12:56:19 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 10:56:19 +0000 Subject: [issue1575020] Request wave support > 16 bit samples Message-ID: <1381748179.57.0.690029180598.issue1575020@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka stage: test needed -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 12:57:23 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 10:57:23 +0000 Subject: [issue2259] Poor support other than 44.1khz, 16bit audio files? In-Reply-To: <1205075207.56.0.203597492215.issue2259@psf.upfronthosting.co.za> Message-ID: <1381748243.96.0.345276567065.issue2259@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 12:58:40 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 14 Oct 2013 10:58:40 +0000 Subject: [issue19254] Python implementation of PBKDF2_HMAC In-Reply-To: <1381699880.62.0.48701357342.issue19254@psf.upfronthosting.co.za> Message-ID: <1381748320.82.0.409054874414.issue19254@psf.upfronthosting.co.za> Christian Heimes added the comment: I have optimized XOR and now it's even faster than OpenSSL's code for reasonable long passwords. :( ---------- Added file: http://bugs.python.org/file32113/pbkdf2_py3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 13:00:01 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 14 Oct 2013 11:00:01 +0000 Subject: [issue19232] Speed up _decimal import In-Reply-To: <1381579399.63.0.316110193187.issue19232@psf.upfronthosting.co.za> Message-ID: <1381748401.33.0.591571415388.issue19232@psf.upfronthosting.co.za> Stefan Krah added the comment: About IDLE I can't say anything, but I'm not entirely sure if the PEP-399 import method is easier to understand for users, see e.g.: http://stackoverflow.com/questions/13194384/instantiate-decimal-class I get the impression that the posters at first did not even realize that there *is* an accelerator in Python 3.3, so they had a hard time debugging the issue. As for the load time: Personally I don't have any application that relies on a very short load time, but I wan't to note again that importing decimal at Python startup actually doubles the startup time. So if there are applications that start a new Python script for each request (e.g. via djb's tcpserver), it could really matter. OTOH I don't like moving code around either, so we can wait until there's a demonstrated need for the speedup. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 13:00:33 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 11:00:33 +0000 Subject: [issue16525] wave file module does not support 32bit float format In-Reply-To: <1353528827.37.0.543069044809.issue16525@psf.upfronthosting.co.za> Message-ID: <1381748433.65.0.468633306431.issue16525@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 13:02:43 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 14 Oct 2013 11:02:43 +0000 Subject: [issue19254] Python implementation of PBKDF2_HMAC In-Reply-To: <1381699880.62.0.48701357342.issue19254@psf.upfronthosting.co.za> Message-ID: <1381748563.06.0.0764709073509.issue19254@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 13:05:26 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 11:05:26 +0000 Subject: [issue1483545] Wave.py support for ulaw and alaw audio Message-ID: <1381748726.14.0.443244506647.issue1483545@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: For consistency with the aifc and sunau modules the wave module should compress/uncompress u-law and A-law data. ---------- nosy: +serhiy.storchaka stage: test needed -> needs patch versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 13:12:37 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2013 11:12:37 +0000 Subject: [issue19246] GC does not really free up memory in console In-Reply-To: <1381742620.43.0.119057862007.issue19246@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Python uses an allocator called "pymalloc". For allocations smaller than 512 bytes, it uses arenas of 256 KB. If you allocate many small objects and later release most of them (but not all!), the memory is fragmented. For allocations larger than 512 bytes, Python falls back to malloc/free. It was discussed to replace pymalloc with Windows Low Fragmented Heap allocator. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 13:28:20 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 14 Oct 2013 11:28:20 +0000 Subject: [issue19256] Optimize marshal format and add version token. In-Reply-To: <1381703408.57.0.928931596293.issue19256@psf.upfronthosting.co.za> Message-ID: <1381750100.17.0.353169778478.issue19256@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Right, the idea of the version token is to introduce it now, as early as possible, even if it is not needed, for prudence. For example, if version 5 decides to change the semantics of some of the opcodes, we can then support both kinds, in the future. Read old files _and_ the new ones. Despite the fact that we claim that we don't guarantee interoperability, in reality it is very desirable. During development, for instance. Frozen modules, .pyc files, and all that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 13:30:56 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 14 Oct 2013 11:30:56 +0000 Subject: [issue19259] Provide Python implementation of operator.compare_digest() Message-ID: <1381750256.83.0.263124716214.issue19259@psf.upfronthosting.co.za> New submission from Christian Heimes: The operator module doesn't have a Python implementation of _compare_digest. This code mimicks the C code: def _compare_digest(a, b): if isinstance(a, str) and isinstance(b, str): a = a.encode("ascii") b = b.encode("ascii") a = memoryview(a) len_a = len(a) right = memoryview(b) len_b = len(right) if len_a == len_b: result = 0 left = a # loop count depends on length of b if len_a != len_b: result = 1 left = b for l, r in zip(left, right): result |= l ^ r return result == 0 ---------- messages: 199868 nosy: christian.heimes, pitrou, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Provide Python implementation of operator.compare_digest() type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 13:31:55 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2013 11:31:55 +0000 Subject: [issue19256] Optimize marshal format and add version token. In-Reply-To: <1381750100.17.0.353169778478.issue19256@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Should we support serialization in an older version? For example, disable the new SMALL and ASCII tokens? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 13:33:16 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2013 11:33:16 +0000 Subject: [issue19259] Provide Python implementation of operator.compare_digest() In-Reply-To: <1381750256.83.0.263124716214.issue19259@psf.upfronthosting.co.za> Message-ID: <1381750396.55.0.706460150125.issue19259@psf.upfronthosting.co.za> STINNER Victor added the comment: #15061 explains why the function is not implemented in Python :) ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 13:43:26 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 11:43:26 +0000 Subject: [issue8311] wave module sets data subchunk size incorrectly when writing wav file In-Reply-To: <1270388213.12.0.14457017538.issue8311@psf.upfronthosting.co.za> Message-ID: <1381751006.14.0.384566221925.issue8311@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch for all three audio modules. After dropping support of string (which is meanless) in the audioop module (issue16685) it can be simplified. I doubt that this should be applied in maintenance releases. Support of non-bytes arguments in writerawframes() is a new feature. ---------- assignee: -> serhiy.storchaka stage: needs patch -> patch review type: behavior -> enhancement versions: -Python 2.7, Python 3.3 Added file: http://bugs.python.org/file32114/audio_write_nonbytes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 13:44:41 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Oct 2013 11:44:41 +0000 Subject: [issue19232] Speed up _decimal import In-Reply-To: <1381748401.33.0.591571415388.issue19232@psf.upfronthosting.co.za> Message-ID: <1467297496.76913684.1381751054351.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > OTOH I don't like moving code around either, so we can wait until > there's a demonstrated need for the speedup. Keep in mind that people who have startup speed problems aren't likely to open an issue on the tracker about it, let alone diagnose it enough to put the blame on decimal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 13:46:08 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Oct 2013 11:46:08 +0000 Subject: [issue19256] Optimize marshal format and add version token. In-Reply-To: Message-ID: <1790225201.76921246.1381751141055.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > Should we support serialization in an older version? For example, > disable the new SMALL and ASCII tokens? It is officially supported with the "version" parameter: http://docs.python.org/3.4/library/marshal.html#marshal.dump ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 13:47:04 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 14 Oct 2013 11:47:04 +0000 Subject: [issue19256] Optimize marshal format and add version token. In-Reply-To: <1381703408.57.0.928931596293.issue19256@psf.upfronthosting.co.za> Message-ID: <1381751224.36.0.346628299719.issue19256@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: We have done so previously and should continue to do that. Thanks for pointing out that the new SHORT_REF needs that fix :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 13:48:47 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Oct 2013 11:48:47 +0000 Subject: [issue19259] Provide Python implementation of operator.compare_digest() In-Reply-To: <1381750256.83.0.263124716214.issue19259@psf.upfronthosting.co.za> Message-ID: <1381751327.81.0.0701154171446.issue19259@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It explains why the function isn't implemented in Python, it doesn't say that there shouldn't be a best-effort Python fallback. All in all, Christian's version looks reasonable. All arithmetic is done on small ints, so there shouldn't be a strong data-dependent timing issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 13:53:29 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Oct 2013 11:53:29 +0000 Subject: [issue19246] freeing then reallocating lots of memory fails under Windows In-Reply-To: <1381665601.5.0.467418586985.issue19246@psf.upfronthosting.co.za> Message-ID: <1381751609.48.0.120512222951.issue19246@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- title: GC does not really free up memory in console -> freeing then reallocating lots of memory fails under Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 13:58:39 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Oct 2013 11:58:39 +0000 Subject: [issue19254] Python implementation of PBKDF2_HMAC In-Reply-To: <1381699880.62.0.48701357342.issue19254@psf.upfronthosting.co.za> Message-ID: <1381751919.9.0.982462667806.issue19254@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I have optimized XOR and now it's even faster than OpenSSL's code for > reasonable long passwords. :( Uh... and it gives the right results? Perhaps OpenSSL should be reimplemented in Python :-) If your code is resistant to timing attacks, I suppose we don't need the C implementation anymore? Or does it have a larger startup cost? (what is a "reasonably long password" for you? 10 chars or 64? :-)) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 14:06:18 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Oct 2013 12:06:18 +0000 Subject: [issue19253] PyArg_ParseTuple: wrong use of seterror() clips helpful type error annotation In-Reply-To: <1381698493.04.0.861687446453.issue19253@psf.upfronthosting.co.za> Message-ID: <1381752378.19.0.039263046325.issue19253@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The original commit doesn't contain any tests, so you should add some to be sure there's no regression in both directions (i.e. no regression for issue #6624 and for this issue): http://hg.python.org/cpython/rev/83b46a5988b0/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 14:10:37 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 12:10:37 +0000 Subject: [issue19256] Optimize marshal format and add version token. In-Reply-To: <1381703408.57.0.928931596293.issue19256@psf.upfronthosting.co.za> Message-ID: <1381752637.43.0.614363407289.issue19256@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Right, the idea of the version token is to introduce it now, as early as possible, even if it is not needed, for prudence. How it will help? If we will break backward compatibility in version 10, then we will introduce the version token for version 10 and larger. If the file will not contain the version token, then it will compatible with version 9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 14:30:06 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 14 Oct 2013 12:30:06 +0000 Subject: [issue19256] Optimize marshal format and add version token. In-Reply-To: <1381703408.57.0.928931596293.issue19256@psf.upfronthosting.co.za> Message-ID: <1381753806.69.0.260935529308.issue19256@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Only output TYPE_SHORT_REF for version >= 4 ---------- Added file: http://bugs.python.org/file32115/marshal2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 14:38:36 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 14 Oct 2013 12:38:36 +0000 Subject: [issue19256] Optimize marshal format and add version token. In-Reply-To: <1381703408.57.0.928931596293.issue19256@psf.upfronthosting.co.za> Message-ID: <1381754316.17.0.193719231547.issue19256@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Quoting myself: "for prudence." We probably should have had this from the beginning. Adding this now makes it easier to make such changes in future, because then you don't have to re-invent the versioning mechanism. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 14:40:09 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 12:40:09 +0000 Subject: [issue19254] Python implementation of PBKDF2_HMAC In-Reply-To: <1381699880.62.0.48701357342.issue19254@psf.upfronthosting.co.za> Message-ID: <1381754409.12.0.970620980305.issue19254@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Christian, does you noticed my comments on Rietveld? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 14:43:12 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 12:43:12 +0000 Subject: [issue19256] Optimize marshal format and add version token. In-Reply-To: <1381703408.57.0.928931596293.issue19256@psf.upfronthosting.co.za> Message-ID: <1381754592.85.0.651141338283.issue19256@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What is difference between introducing the version token right now or only when (if?) we will need it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 14:44:36 2013 From: report at bugs.python.org (Larry Hastings) Date: Mon, 14 Oct 2013 12:44:36 +0000 Subject: [issue19260] "int" comment in marshal.c is outdated Message-ID: <1381754676.73.0.103403492624.issue19260@psf.upfronthosting.co.za> New submission from Larry Hastings: In r_string() (read a string) in marshal.c we see this comment: /* The result fits into int because it must be <=n. */ read = fread(p->buf, 1, n, p->fp); This comment was first committed in r36501 by MvL. Back then the "read" and "n" variables were int, but (of course) the return size of fread was size_t. Since then, both n and read have become ssize_t. I suggest changing the wording slightly anyway, because I had to meditate on what the comment was originally trying to say. I suggest: /* The result fits into ssize_t because n is ssize_t. */ Patch appended too. Bikeshedding away! Should this be fixed in previous versions too? ---------- files: larry.marshal.outdated.comment.r1.diff keywords: patch messages: 199883 nosy: larry priority: normal severity: normal status: open title: "int" comment in marshal.c is outdated versions: Python 3.4 Added file: http://bugs.python.org/file32116/larry.marshal.outdated.comment.r1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 15:07:22 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 14 Oct 2013 13:07:22 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1381756042.92.0.954003281923.issue19183@psf.upfronthosting.co.za> Nick Coghlan added the comment: Added some structural comments to the patch. I'll defer to Serhiy when it comes to assessing the algorithm details :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 15:45:49 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 14 Oct 2013 13:45:49 +0000 Subject: [issue19256] Optimize marshal format and add version token. In-Reply-To: <1381703408.57.0.928931596293.issue19256@psf.upfronthosting.co.za> Message-ID: <1381758349.33.0.267022085488.issue19256@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Never put off to tomorrow what you can do today :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 15:48:02 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 13:48:02 +0000 Subject: [issue11471] If without else generates redundant jump In-Reply-To: <1299880156.4.0.0999870554397.issue11471@psf.upfronthosting.co.za> Message-ID: <1381758482.08.0.574769141207.issue11471@psf.upfronthosting.co.za> Georg Brandl added the comment: Python-ast.c can't be changed; it is auto-generated. But the whole thing can be handled in compile.c I think -- see attached patch. Test suite passes (except for test_dis, which checks compilation result against a given list of bytecodes). ---------- nosy: +georg.brandl, pitrou, rhettinger Added file: http://bugs.python.org/file32117/if_else_nojump.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 15:49:23 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 13:49:23 +0000 Subject: [issue11471] If without else generates redundant jump In-Reply-To: <1299880156.4.0.0999870554397.issue11471@psf.upfronthosting.co.za> Message-ID: <1381758563.46.0.864459072768.issue11471@psf.upfronthosting.co.za> Georg Brandl added the comment: I'll make a complete patch with test suite additions (and fixing test_dis) if this is deemed to be a correct approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 15:56:57 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 13:56:57 +0000 Subject: [issue14407] concurrent.futures tests don't adher to test_cases protocol In-Reply-To: <1332701075.92.0.286414979411.issue14407@psf.upfronthosting.co.za> Message-ID: <1381759017.74.0.540601719056.issue14407@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- nosy: +bquinlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 15:57:32 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 13:57:32 +0000 Subject: [issue11646] 2to3: msvcrt.(get|put)ch -> (get|put)wch In-Reply-To: <1300839645.82.0.653929076098.issue11646@psf.upfronthosting.co.za> Message-ID: <1381759052.24.0.422075762355.issue11646@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 15:59:21 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 13:59:21 +0000 Subject: [issue7979] connect_ex returns 103 often In-Reply-To: <1266812788.68.0.211126163639.issue7979@psf.upfronthosting.co.za> Message-ID: <1381759161.92.0.813296069662.issue7979@psf.upfronthosting.co.za> Georg Brandl added the comment: Is this still the case with Python 2.7? ---------- nosy: +georg.brandl resolution: -> out of date status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:00:28 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 14:00:28 +0000 Subject: [issue15817] Misc/gdbinit: Expose command documentation to gdb help In-Reply-To: <1346283185.13.0.0954859318202.issue15817@psf.upfronthosting.co.za> Message-ID: <1381759228.75.0.927824475253.issue15817@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> dmalcolm nosy: +dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:08:36 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 14 Oct 2013 14:08:36 +0000 Subject: [issue19252] Enum.py : Enum.__new__() : Test Coverage In-Reply-To: <1381740807.48.0.594318314007.issue19252@psf.upfronthosting.co.za> Message-ID: <525BFAE5.1080002@stoneleaf.us> Ethan Furman added the comment: CliffM added the comment: > > Sorry -- I could have been clearer : > > The conditional: > > if member.value == value: > > Is redundant as the tests stand. If you comment it out -- everything works. So therefore we are missing a test. Are you saying that you are commenting out the if test, but leaving in the return member? > This makes the if-clause fragile for future maintenance. So we need another test to ensure the loop is covered. In case Python for loops suddenly stop working? Sorry to be so dense, but I am not understanding the point you are trying to make... ahhhhhh! Are trying to guard against the possibility that in the future someone might accidentally delete the if test, and the unit test won't catch it? That certainly is a good reason to test values further into the loop. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:09:34 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 14 Oct 2013 14:09:34 +0000 Subject: [issue17154] the 'ignore' pdb command raises IndexError In-Reply-To: <1360259384.78.0.34764519237.issue17154@psf.upfronthosting.co.za> Message-ID: <3cz1qK2BB8z7Ljn@mail.python.org> Roundup Robot added the comment: New changeset 3507be2f94d4 by Georg Brandl in branch '3.3': Closes #17154: error out gracefully on "ignore" or "condition" without argument. http://hg.python.org/cpython/rev/3507be2f94d4 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:10:52 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 14 Oct 2013 14:10:52 +0000 Subject: [issue11471] If without else generates redundant jump In-Reply-To: <1299880156.4.0.0999870554397.issue11471@psf.upfronthosting.co.za> Message-ID: <1381759852.23.0.233995899848.issue11471@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I think it's fine with the simplification I suggested. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:11:39 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 14:11:39 +0000 Subject: [issue17294] compile-flag for single-execution to return value instead of printing it In-Reply-To: <1361797886.48.0.856864897447.issue17294@psf.upfronthosting.co.za> Message-ID: <1381759899.88.0.950042421465.issue17294@psf.upfronthosting.co.za> Georg Brandl added the comment: If you know you have an expression and would like the value, you should use the "eval" mode. In the case of "single", you can adapt sys.displayhook to change where to print (if at all) the values. Note that "single" sometimes prints multiple values (try e.g. "for i in range(10):\n i\n"). ---------- nosy: +georg.brandl resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:15:01 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 14:15:01 +0000 Subject: [issue17095] Modules/Setup *shared* support broken In-Reply-To: <1359669296.59.0.227426586133.issue17095@psf.upfronthosting.co.za> Message-ID: <1381760101.14.0.785408298988.issue17095@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:15:56 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 14:15:56 +0000 Subject: [issue16845] warnings.simplefilter should validate input In-Reply-To: <1357173726.64.0.0586309357998.issue16845@psf.upfronthosting.co.za> Message-ID: <1381760156.26.0.918711310089.issue16845@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:16:11 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 14:16:11 +0000 Subject: [issue16425] minidom replaceChild(new_child, old_child) removes new_child even if in another document In-Reply-To: <1352279150.2.0.240477416324.issue16425@psf.upfronthosting.co.za> Message-ID: <1381760171.21.0.0867583115601.issue16425@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:18:00 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 14 Oct 2013 14:18:00 +0000 Subject: [issue18965] 2to3 can produce illegal bytes literals In-Reply-To: <1378598799.8.0.0499553446902.issue18965@psf.upfronthosting.co.za> Message-ID: <1381760280.32.0.597278754375.issue18965@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I think it's too bad parsing of b-prefixed strings in Python 2 doesn't reject non-ASCII characters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:19:30 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 14:19:30 +0000 Subject: [issue15648] stderr "refs" output does not respect PYTHONIOENCODING In-Reply-To: <1344944428.64.0.0280287905357.issue15648@psf.upfronthosting.co.za> Message-ID: <1381760370.57.0.726860185182.issue15648@psf.upfronthosting.co.za> Georg Brandl added the comment: The "refs" output is only active in debug mode, and only for debugging. It is printed directly to stderr using C fprintf(), I don't think it's worth the complication. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:20:33 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 14:20:33 +0000 Subject: [issue15613] argparse ArgumentDefaultsHelpFormatter interacts badly with --arg and nargs=+ In-Reply-To: <1344578813.57.0.70269968542.issue15613@psf.upfronthosting.co.za> Message-ID: <1381760433.01.0.795359268586.issue15613@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- nosy: +bethard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:20:57 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 14:20:57 +0000 Subject: [issue15440] multiprocess fails to re-raise exception which has mandatory arguments In-Reply-To: <1343143072.3.0.822241372547.issue15440@psf.upfronthosting.co.za> Message-ID: <1381760457.2.0.565125976688.issue15440@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:21:21 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 14:21:21 +0000 Subject: [issue15371] test_cmd_line_script should include namespace package tests In-Reply-To: <1342448877.31.0.875625357245.issue15371@psf.upfronthosting.co.za> Message-ID: <1381760481.15.0.409495878329.issue15371@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:22:14 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 14:22:14 +0000 Subject: [issue18300] script_helper._asert_python should set TERM='' by default. In-Reply-To: <1372164040.52.0.568545505593.issue18300@psf.upfronthosting.co.za> Message-ID: <1381760534.18.0.74155974563.issue18300@psf.upfronthosting.co.za> Georg Brandl added the comment: Sounds good to me. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:23:18 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 14:23:18 +0000 Subject: [issue18209] Bytearray type not supported as a mutable object in the fcntl.ioctl function In-Reply-To: <1371200324.57.0.0793560197908.issue18209@psf.upfronthosting.co.za> Message-ID: <1381760598.98.0.461674674508.issue18209@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:26:09 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 14:26:09 +0000 Subject: [issue18096] bad library order returned by python-config.in In-Reply-To: <1369845924.16.0.424451971001.issue18096@psf.upfronthosting.co.za> Message-ID: <1381760769.64.0.730137887061.issue18096@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- nosy: +barry, ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:26:20 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 14:26:20 +0000 Subject: [issue18068] pickle + weakref.proxy(self) In-Reply-To: <1369594749.9.0.0448045246945.issue18068@psf.upfronthosting.co.za> Message-ID: <1381760780.54.0.200169853171.issue18068@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:27:51 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 14:27:51 +0000 Subject: [issue18254] Accessing attr dict at definition time of a class from a metaclass results in changed type. In-Reply-To: <1371550905.79.0.414140838637.issue18254@psf.upfronthosting.co.za> Message-ID: <1381760871.16.0.927806674194.issue18254@psf.upfronthosting.co.za> Georg Brandl added the comment: Only affects 3.2, so this won't be fixed anymore. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:28:35 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 14:28:35 +0000 Subject: [issue2919] Merge profile/cProfile in 3.n+1 In-Reply-To: <1211227334.77.0.551300594218.issue2919@psf.upfronthosting.co.za> Message-ID: <1381760915.3.0.628837931021.issue2919@psf.upfronthosting.co.za> Georg Brandl added the comment: Last desperate ping for 3.4? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:43:55 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 14:43:55 +0000 Subject: [issue17765] weakref.ref ignores a 'callback' keyword argument In-Reply-To: <1366139470.36.0.39573405184.issue17765@psf.upfronthosting.co.za> Message-ID: <1381761835.0.0.581439501506.issue17765@psf.upfronthosting.co.za> Georg Brandl added the comment: See attached patch, it handles this like all other builtins that don't support keyword arguments in their constructor. ---------- keywords: +patch nosy: +georg.brandl, pitrou versions: +Python 2.7, Python 3.3 Added file: http://bugs.python.org/file32118/no_weakref_kwargs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:47:23 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 14:47:23 +0000 Subject: [issue19260] "int" comment in marshal.c is outdated In-Reply-To: <1381754676.73.0.103403492624.issue19260@psf.upfronthosting.co.za> Message-ID: <1381762043.24.0.454957049109.issue19260@psf.upfronthosting.co.za> Georg Brandl added the comment: Other than that, LGTM. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:51:39 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 14:51:39 +0000 Subject: [issue12866] Add support for 24-bit samples in the audioop module In-Reply-To: <1314744712.67.0.770855933698.issue12866@psf.upfronthosting.co.za> Message-ID: <1381762299.84.0.79552567086.issue12866@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If there are no objections I will commit this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:51:57 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 14:51:57 +0000 Subject: [issue19258] Got resource warning when running wsgiref demo app In-Reply-To: <1381743615.58.0.125660440046.issue19258@psf.upfronthosting.co.za> Message-ID: <1381762317.76.0.682939650889.issue19258@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:53:42 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 14 Oct 2013 14:53:42 +0000 Subject: [issue19258] Got resource warning when running wsgiref demo app In-Reply-To: <1381743615.58.0.125660440046.issue19258@psf.upfronthosting.co.za> Message-ID: <3cz2nr5Xlbz7LjP@mail.python.org> Roundup Robot added the comment: New changeset f1e66ef64d17 by Georg Brandl in branch '3.3': Closes #19258: close WSGI server after handling request in demo code. http://hg.python.org/cpython/rev/f1e66ef64d17 New changeset 64a1e224042e by Georg Brandl in branch '2.7': Closes #19258: close WSGI server after handling request in demo code. http://hg.python.org/cpython/rev/64a1e224042e ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:54:39 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 14:54:39 +0000 Subject: [issue19138] doctest.IGNORE_EXCEPTION_DETAIL doesn't match when no detail exists In-Reply-To: <1380642891.76.0.189533758192.issue19138@psf.upfronthosting.co.za> Message-ID: <1381762479.07.0.209963513098.issue19138@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:01:51 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Oct 2013 15:01:51 +0000 Subject: [issue18068] pickle + weakref.proxy(self) In-Reply-To: <1369594749.9.0.0448045246945.issue18068@psf.upfronthosting.co.za> Message-ID: <1381762911.29.0.218988114176.issue18068@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't think weakref objects are meant to be picklable at all. At least there's no support code for that, so pickling weak proxies only works by chance. ---------- nosy: +alexandre.vassalotti type: behavior -> enhancement versions: +Python 3.4 -Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:06:07 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Oct 2013 15:06:07 +0000 Subject: [issue18209] Bytearray type not supported as a mutable object in the fcntl.ioctl function In-Reply-To: <1371200324.57.0.0793560197908.issue18209@psf.upfronthosting.co.za> Message-ID: <1381763167.49.0.675912736244.issue18209@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It doesn't work in 2.7 because bytearray only supports the new buffer API (which is more secure), not the old one. I don't think it's worth trying to fix at this point, so I'm tempted to close as won't fix. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:07:19 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Oct 2013 15:07:19 +0000 Subject: [issue17765] weakref.ref ignores a 'callback' keyword argument In-Reply-To: <1366139470.36.0.39573405184.issue17765@psf.upfronthosting.co.za> Message-ID: <1381763239.04.0.32653101958.issue17765@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Why the PyWeakref_Check() in your patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:09:11 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Oct 2013 15:09:11 +0000 Subject: [issue19260] "int" comment in marshal.c is outdated In-Reply-To: <1381754676.73.0.103403492624.issue19260@psf.upfronthosting.co.za> Message-ID: <1381763351.91.0.289579245201.issue19260@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, the comment should actually be removed, it's just pointless. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:13:10 2013 From: report at bugs.python.org (=?utf-8?q?Peder_J=C3=B8rgensen?=) Date: Mon, 14 Oct 2013 15:13:10 +0000 Subject: [issue12866] Add support for 24-bit samples in the audioop module In-Reply-To: <1314744712.67.0.770855933698.issue12866@psf.upfronthosting.co.za> Message-ID: <1381763590.06.0.807768707881.issue12866@psf.upfronthosting.co.za> Peder J?rgensen added the comment: This is great! My brother did a few more updates to it and added support for endian conversion, and i've been using it a lot with out any problems, but i must admit your patch looks a lot cleaner Serhiy. Great work. Can't wait to test it. This is going to be of great use to everyone working with audio in python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:17:01 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 14 Oct 2013 15:17:01 +0000 Subject: [issue19260] "int" comment in marshal.c is outdated In-Reply-To: <1381754676.73.0.103403492624.issue19260@psf.upfronthosting.co.za> Message-ID: <1381763821.95.0.0642240565346.issue19260@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I agree that the comment can be removed. If the code is (now) statically type-safe, there is no point in keeping it. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:21:47 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2013 15:21:47 +0000 Subject: [issue19260] "int" comment in marshal.c is outdated In-Reply-To: <1381754676.73.0.103403492624.issue19260@psf.upfronthosting.co.za> Message-ID: <1381764107.85.0.287195867311.issue19260@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:33:45 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 15:33:45 +0000 Subject: [issue18209] Bytearray type not supported as a mutable object in the fcntl.ioctl function In-Reply-To: <1371200324.57.0.0793560197908.issue18209@psf.upfronthosting.co.za> Message-ID: <1381764825.95.0.100881487489.issue18209@psf.upfronthosting.co.za> Georg Brandl added the comment: Agreed. This is not really a bugfix. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:35:20 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 15:35:20 +0000 Subject: [issue17765] weakref.ref ignores a 'callback' keyword argument In-Reply-To: <1366139470.36.0.39573405184.issue17765@psf.upfronthosting.co.za> Message-ID: <1381764920.14.0.63413282246.issue17765@psf.upfronthosting.co.za> Georg Brandl added the comment: Good point, that is pointless in __init__(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:37:24 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 15:37:24 +0000 Subject: [issue17765] weakref.ref ignores a 'callback' keyword argument In-Reply-To: <1366139470.36.0.39573405184.issue17765@psf.upfronthosting.co.za> Message-ID: <1381765044.26.0.207404749797.issue17765@psf.upfronthosting.co.za> Changes by Georg Brandl : Added file: http://bugs.python.org/file32119/no_weakref_kwargs_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:45:29 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 15:45:29 +0000 Subject: [issue11471] If without else generates redundant jump In-Reply-To: <1299880156.4.0.0999870554397.issue11471@psf.upfronthosting.co.za> Message-ID: <1381765529.46.0.555143690389.issue11471@psf.upfronthosting.co.za> Georg Brandl added the comment: Updated patch with test suite update. ---------- Added file: http://bugs.python.org/file32120/if_else_nojump_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:47:54 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 14 Oct 2013 15:47:54 +0000 Subject: [issue11471] If without else generates redundant jump In-Reply-To: <1299880156.4.0.0999870554397.issue11471@psf.upfronthosting.co.za> Message-ID: <1381765674.2.0.833744013719.issue11471@psf.upfronthosting.co.za> Benjamin Peterson added the comment: lgtm ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:48:20 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 14 Oct 2013 15:48:20 +0000 Subject: [issue18919] Unify audio modules tests In-Reply-To: <1378293110.61.0.780572869606.issue18919@psf.upfronthosting.co.za> Message-ID: <1381765700.45.0.745530186375.issue18919@psf.upfronthosting.co.za> R. David Murray added the comment: In 2.7 unexpected output is a test failure, yes. In 3.x we removed that check. But I wonder if that was wise :) (We did it for technical reasons when adding other features to regrtest). Yes, using captured_stdout and checking for the expected warnings would be a better test, IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:49:39 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Oct 2013 15:49:39 +0000 Subject: [issue11471] If without else generates redundant jump In-Reply-To: <1299880156.4.0.0999870554397.issue11471@psf.upfronthosting.co.za> Message-ID: <1381765779.07.0.298762754355.issue11471@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Just for the record, have you passed the whole test suite after cleaning up the pyc files, ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:50:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 15:50:58 +0000 Subject: [issue2259] Poor support other than 44.1khz, 16bit audio files? In-Reply-To: <1205075207.56.0.203597492215.issue2259@psf.upfronthosting.co.za> Message-ID: <1381765858.79.0.0339595626088.issue2259@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I tested 2.6, 2.7, 3.2, 3.3, and 3.4. All of them read and write 24b48k.aif. Currently 2.7, 3.3, and 3.4 have tests for 24-bit aifc files. Seems this issue is not more actual. ---------- dependencies: -Add support for 24-bit samples in the audioop module resolution: -> out of date stage: patch review -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:59:35 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 15:59:35 +0000 Subject: [issue19253] PyArg_ParseTuple: wrong use of seterror() clips helpful type error annotation In-Reply-To: <1381698493.04.0.861687446453.issue19253@psf.upfronthosting.co.za> Message-ID: <1381766375.93.0.740413479692.issue19253@psf.upfronthosting.co.za> Georg Brandl added the comment: Issue #6624 wasn't an issue, it should have been "closed-invalid" :) But you're right, a test case is needed, see new patch. ---------- Added file: http://bugs.python.org/file32121/seterror_fix_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:59:47 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 15:59:47 +0000 Subject: [issue1575020] Request wave support > 16 bit samples Message-ID: <1381766387.8.0.74256492648.issue1575020@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Currently 24-bit wave files are supported at least in 2.7, 3.3, and 3.4 (there are tests for this). The audioop module yet not supports 24-bit data, but this is another issue. ---------- dependencies: -Add support for 24-bit samples in the audioop module resolution: -> out of date stage: needs patch -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 18:00:11 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 16:00:11 +0000 Subject: [issue11471] If without else generates redundant jump In-Reply-To: <1299880156.4.0.0999870554397.issue11471@psf.upfronthosting.co.za> Message-ID: <1381766411.04.0.162261478077.issue11471@psf.upfronthosting.co.za> Georg Brandl added the comment: Yep :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 18:04:01 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 16:04:01 +0000 Subject: [issue1575020] Request wave support > 16 bit samples Message-ID: <1381766641.42.0.455157807372.issue1575020@psf.upfronthosting.co.za> Georg Brandl added the comment: Serhiy, you're welcome to set issues to pending, but please don't forget to close them after a certain time... ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 18:04:05 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 16:04:05 +0000 Subject: [issue1575020] Request wave support > 16 bit samples Message-ID: <1381766645.19.0.328154311377.issue1575020@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 18:04:52 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 16:04:52 +0000 Subject: [issue18758] Fix internal references in the documentation In-Reply-To: <1376678338.7.0.979265810368.issue18758@psf.upfronthosting.co.za> Message-ID: <1381766692.44.0.934343527146.issue18758@psf.upfronthosting.co.za> Georg Brandl added the comment: Thank you for all the effort you put into this! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 18:10:10 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 14 Oct 2013 16:10:10 +0000 Subject: [issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors In-Reply-To: <1379289654.59.0.452504541982.issue19030@psf.upfronthosting.co.za> Message-ID: <1381767010.75.0.536215134631.issue19030@psf.upfronthosting.co.za> Ethan Furman added the comment: Updated and renamed the DynamicClassAttribute tests, and discovered that classify_class_attrs is not handling instance portion correctly. class Meta(type): def __getattr__(self, name): if name == 'ham': return 'spam' return super().__getattr__(name) class VA(metaclass=Meta): @types.DynamicClassAttribute def ham(self): return 'eggs' We should see both eggs and spam, but only eggs is showing up. ---------- assignee: -> ethan.furman resolution: fixed -> stage: committed/rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 18:13:03 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 16:13:03 +0000 Subject: [issue18919] Unify audio modules tests In-Reply-To: <1378293110.61.0.780572869606.issue18919@psf.upfronthosting.co.za> Message-ID: <1381767183.7.0.64350560549.issue18919@psf.upfronthosting.co.za> Georg Brandl added the comment: Some new (I assume) ResourceWarnings from test_wave: /home/gbr/devel/python/Lib/unittest/case.py:571: ResourceWarning: unclosed file <_io.BufferedWriter name='@test_1974_tmp'> testMethod() /home/gbr/devel/python/Lib/chunk.py:61: ResourceWarning: unclosed file <_io.FileIO name='/home/gbr/devel/python/Lib/test/audiodata/pluck-pcm16.wav' mode='rb'> self.chunkname = file.read(4) /home/gbr/devel/python/Lib/chunk.py:61: ResourceWarning: unclosed file <_io.FileIO name='/home/gbr/devel/python/Lib/test/audiodata/pluck-pcm24.wav' mode='rb'> self.chunkname = file.read(4) /home/gbr/devel/python/Lib/chunk.py:61: ResourceWarning: unclosed file <_io.FileIO name='/home/gbr/devel/python/Lib/test/audiodata/pluck-pcm32.wav' mode='rb'> self.chunkname = file.read(4) /home/gbr/devel/python/Lib/chunk.py:61: ResourceWarning: unclosed file <_io.FileIO name='/home/gbr/devel/python/Lib/test/audiodata/pluck-pcm8.wav' mode='rb'> self.chunkname = file.read(4) ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 18:13:07 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 14 Oct 2013 16:13:07 +0000 Subject: [issue19082] Lib/xmlrpc/client.py demo code points to the dead server In-Reply-To: <1381747335.93.0.821562727446.issue19082@psf.upfronthosting.co.za> Message-ID: Senthil Kumaran added the comment: Sounds good.I shall update patch (.rstify the security warning). Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 18:17:29 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 16:17:29 +0000 Subject: [issue19261] Add support for 24-bit in the sunau module Message-ID: <1381767447.21.0.93278402116.issue19261@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here is a simple patch which adds support for writing 24-bit samples in the sunau module. Actually the sunau module already supports reading 24-bit samples and AUDIO_FILE_ENCODING_LINEAR_24 mentioned as supported encoding. So perhaps this should be considered as a bugfix. ---------- assignee: serhiy.storchaka components: Library (Lib) files: sunau_pcm24.patch keywords: patch messages: 199923 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Add support for 24-bit in the sunau module type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32122/sunau_pcm24.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 18:20:08 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 16:20:08 +0000 Subject: [issue18521] [cppcheck] Full report In-Reply-To: <1374408848.64.0.369654911435.issue18521@psf.upfronthosting.co.za> Message-ID: <1381767608.06.0.233293053288.issue18521@psf.upfronthosting.co.za> Georg Brandl added the comment: > Shouldn't converttuple() in getargs.c set "levels[1] = 0;" after second "levels[0] = i+1;"? I think it is fine, since convertitem() or converttuple() called from convertitem() will set their levels[0] (which is levels[1] in the original context) to zero on error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 18:20:23 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 16:20:23 +0000 Subject: [issue18521] [cppcheck] Full report In-Reply-To: <1374408848.64.0.369654911435.issue18521@psf.upfronthosting.co.za> Message-ID: <1381767623.53.0.132523328214.issue18521@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing this one as Fixed, then. Thanks everybody. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 19:06:34 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 14 Oct 2013 17:06:34 +0000 Subject: [issue18919] Unify audio modules tests In-Reply-To: <1378293110.61.0.780572869606.issue18919@psf.upfronthosting.co.za> Message-ID: <3cz5lZ0NLzz7LjP@mail.python.org> Roundup Robot added the comment: New changeset 164a60cce934 by Serhiy Storchaka in branch '2.7': Issue #18919: Catch and check warnings in the aifc module tests. http://hg.python.org/cpython/rev/164a60cce934 New changeset 9eecd00ffc28 by Serhiy Storchaka in branch '3.3': Issue #18919: Check warnings messages in the aifc module tests. http://hg.python.org/cpython/rev/9eecd00ffc28 New changeset d168f094d16d by Serhiy Storchaka in branch 'default': Issue #18919: Check warnings messages in the aifc module tests. http://hg.python.org/cpython/rev/d168f094d16d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 19:11:02 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 14 Oct 2013 17:11:02 +0000 Subject: [issue18919] Unify audio modules tests In-Reply-To: <1378293110.61.0.780572869606.issue18919@psf.upfronthosting.co.za> Message-ID: <3cz5rK0p99zQcr@mail.python.org> Roundup Robot added the comment: New changeset fd7752db1e54 by Serhiy Storchaka in branch '2.7': Issue #18919: Fixed resource leaks in audio tests. http://hg.python.org/cpython/rev/fd7752db1e54 New changeset 2850fc02f324 by Serhiy Storchaka in branch '3.3': Issue #18919: Fixed resource leaks in audio tests. http://hg.python.org/cpython/rev/2850fc02f324 New changeset 835c6ea487b1 by Serhiy Storchaka in branch 'default': Issue #18919: Fixed resource leaks in audio tests. http://hg.python.org/cpython/rev/835c6ea487b1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 19:16:52 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 17:16:52 +0000 Subject: [issue18919] Unify audio modules tests In-Reply-To: <1378293110.61.0.780572869606.issue18919@psf.upfronthosting.co.za> Message-ID: <1381771012.49.0.517580656435.issue18919@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > In 3.x we removed that check. But I wonder if that was wise :) (We did it for technical reasons when adding other features to regrtest). Actually the checks left, but there was no check for warning message. Now they are added. > Some new (I assume) ResourceWarnings from test_wave: Thank you Greg for this report. Yes, these warnings are new. The tests only existed for the aifc module (which always closes externally opened file), and when I extended it to other modules I forgot close externally opened files. Hope it now fixed. ---------- stage: patch review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 19:33:24 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 14 Oct 2013 17:33:24 +0000 Subject: [issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors In-Reply-To: <1379289654.59.0.452504541982.issue19030@psf.upfronthosting.co.za> Message-ID: <1381772004.68.0.586473052773.issue19030@psf.upfronthosting.co.za> Ethan Furman added the comment: Updated tests now passing. Will commit Thursday, or Friday at the latest. ---------- stage: -> patch review Added file: http://bugs.python.org/file32123/issue19030.stoneleaf.05.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 19:36:43 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 14 Oct 2013 17:36:43 +0000 Subject: [issue16938] pydoc confused by __dir__ In-Reply-To: <1357944129.98.0.501949279766.issue16938@psf.upfronthosting.co.za> Message-ID: <1381772203.73.0.0768809902193.issue16938@psf.upfronthosting.co.za> Ethan Furman added the comment: Discovered a problem with one of the tests, moved back to issue19030. The __class__/__objclass__ is gone, the code is simpler. When issue19030 is committed I think we can make a doc change to include __objclass__ somewhere and close this one. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 19:38:54 2013 From: report at bugs.python.org (Benjamin Root) Date: Mon, 14 Oct 2013 17:38:54 +0000 Subject: [issue10292] tarinfo should use relative symlinks In-Reply-To: <1288677491.56.0.490634807811.issue10292@psf.upfronthosting.co.za> Message-ID: <1381772333.99.0.230713552483.issue10292@psf.upfronthosting.co.za> Benjamin Root added the comment: What was the issue number for the python2.7 fix? I think I have hit upon this issue myself and I need to see if I need to file a new report. ---------- nosy: +Benjamin.Root _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 19:40:10 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 14 Oct 2013 17:40:10 +0000 Subject: [issue18919] Unify audio modules tests In-Reply-To: <1378293110.61.0.780572869606.issue18919@psf.upfronthosting.co.za> Message-ID: <1381772409.99.0.326959010084.issue18919@psf.upfronthosting.co.za> Ned Deily added the comment: The new tests fail when run from an installed Python. You also need to add all of the new test directories to LIBSUBDIRS for the libinstall target in Makefile.pre.in. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 19:40:22 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 17:40:22 +0000 Subject: [issue9170] zipfile cannot read AES encrypted files In-Reply-To: <1278351743.73.0.460439084815.issue9170@psf.upfronthosting.co.za> Message-ID: <1381772422.06.0.36890985484.issue9170@psf.upfronthosting.co.za> Georg Brandl added the comment: #8998 has been closed (among others due to legal concerns), so this need not be kept open. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 19:41:59 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 17:41:59 +0000 Subject: [issue8507] abc.abstractproperty does not copy docstring In-Reply-To: <1272029588.75.0.820614439308.issue8507@psf.upfronthosting.co.za> Message-ID: <1381772519.33.0.597339015443.issue8507@psf.upfronthosting.co.za> Georg Brandl added the comment: Confirmed; this appears fixed. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 19:47:57 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 14 Oct 2013 17:47:57 +0000 Subject: [issue19228] type.__qualname__ should not strip the module name In-Reply-To: <1381532212.21.0.0772191194155.issue19228@psf.upfronthosting.co.za> Message-ID: <1381772877.45.0.550245484976.issue19228@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 19:48:03 2013 From: report at bugs.python.org (Benjamin Root) Date: Mon, 14 Oct 2013 17:48:03 +0000 Subject: [issue10292] tarinfo should use relative symlinks In-Reply-To: <1288677491.56.0.490634807811.issue10292@psf.upfronthosting.co.za> Message-ID: <1381772883.2.0.219788374105.issue10292@psf.upfronthosting.co.za> Benjamin Root added the comment: To clarify, the bug is resolved in py2.7 -- for the most part. I think I have come upon an edge-case where if the archived symbolic link refers to a file not contained in a subdirectory, say: "foo.txt -> foobar.txt", extracting "foo.txt" would result in an exception: 'KeyError: "linkname '/foobar.txt' not found"'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 19:56:25 2013 From: report at bugs.python.org (Tim Peters) Date: Mon, 14 Oct 2013 17:56:25 +0000 Subject: [issue19246] freeing then reallocating lots of memory fails under Windows In-Reply-To: <1381665601.5.0.467418586985.issue19246@psf.upfronthosting.co.za> Message-ID: <1381773385.08.0.121330975385.issue19246@psf.upfronthosting.co.za> Tim Peters added the comment: @haypo, this has nothing to do with PyMalloc. As I reported in my first message, only 7 PyMalloc arenas are in use at the end of the program, less than 2 MB total. *All* other arenas ever used were released to the OS. And that's not surprising. The vast bulk of the memory used in the test case isn't in small objects, it's in *strings* of ever-increasing size. Those are gotten by many calls to the system malloc(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 20:17:01 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Oct 2013 18:17:01 +0000 Subject: [issue18102] except-clause with own exception class inside generator can lead to confusing warning on termination In-Reply-To: <1369928159.24.0.947067999583.issue18102@psf.upfronthosting.co.za> Message-ID: <1381774621.76.0.662187753072.issue18102@psf.upfronthosting.co.za> Antoine Pitrou added the comment: While this is easy to reproduce under 3.3, it doesn't happen anymore under 3.4. Given how tricky it would be to fix it under 3.3 (IMO), I prefer to close the bug. ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 20:20:16 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 14 Oct 2013 18:20:16 +0000 Subject: [issue18919] Unify audio modules tests In-Reply-To: <1378293110.61.0.780572869606.issue18919@psf.upfronthosting.co.za> Message-ID: <3cz7NC0Y5Xz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset de1f62a55648 by Serhiy Storchaka in branch '2.7': Issue #18919: Add test/audiodata to LIBSUBDIRS. http://hg.python.org/cpython/rev/de1f62a55648 New changeset 865bab7387f2 by Serhiy Storchaka in branch '3.3': Issue #18919: Add test/audiodata to LIBSUBDIRS. http://hg.python.org/cpython/rev/865bab7387f2 New changeset 4d5143ff58ea by Serhiy Storchaka in branch 'default': Issue #18919: Add test/audiodata to LIBSUBDIRS. http://hg.python.org/cpython/rev/4d5143ff58ea ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 20:51:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 14 Oct 2013 18:51:01 +0000 Subject: [issue19260] "int" comment in marshal.c is outdated In-Reply-To: <1381754676.73.0.103403492624.issue19260@psf.upfronthosting.co.za> Message-ID: <3cz83g4dPWz7Ljq@mail.python.org> Roundup Robot added the comment: New changeset 1309fee48908 by Antoine Pitrou in branch 'default': Close #19260: remove outdated comment in marshal.c http://hg.python.org/cpython/rev/1309fee48908 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 21:06:00 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Oct 2013 19:06:00 +0000 Subject: [issue18096] bad library order returned by python-config.in In-Reply-To: <1369845924.16.0.424451971001.issue18096@psf.upfronthosting.co.za> Message-ID: <1381777560.67.0.36757533171.issue18096@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- components: +Build, Demos and Tools nosy: +dmalcolm, doko stage: -> patch review versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 21:07:29 2013 From: report at bugs.python.org (Tim Peters) Date: Mon, 14 Oct 2013 19:07:29 +0000 Subject: [issue19246] freeing then reallocating lots of memory fails under Windows In-Reply-To: <1381665601.5.0.467418586985.issue19246@psf.upfronthosting.co.za> Message-ID: <1381777649.37.0.65217495409.issue19246@psf.upfronthosting.co.za> Tim Peters added the comment: @Esa.Peuha, fine idea! Alas, on the same box I used before, uglyhack.c displays (it varies a tiny amount from run to run): 65198 65145 99.918709% So it's not emulating enough of Python's malloc()/free() behavior to trigger the same kind of problem :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 21:09:01 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Oct 2013 19:09:01 +0000 Subject: [issue19246] freeing then reallocating lots of memory fails under Windows In-Reply-To: <1381665601.5.0.467418586985.issue19246@psf.upfronthosting.co.za> Message-ID: <1381777741.27.0.712845635258.issue19246@psf.upfronthosting.co.za> Antoine Pitrou added the comment: By the way, in Python 3.4 arena allocation is done using VirtualAlloc and VirtualFree, that may make a difference too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 21:15:08 2013 From: report at bugs.python.org (Albert Zeyer) Date: Mon, 14 Oct 2013 19:15:08 +0000 Subject: [issue17294] compile-flag for single-execution to return value instead of printing it In-Reply-To: <1361797886.48.0.856864897447.issue17294@psf.upfronthosting.co.za> Message-ID: <1381778108.26.0.746226667772.issue17294@psf.upfronthosting.co.za> Albert Zeyer added the comment: I don't know that I have an expression and I want it also to work if it is not an expression. Basically I really want the 'single' behavior. (My not-so-uncommon use case: Have an interactive shell where the output on stdout does not make sense. Also I might want to save references to returned values.) displayhook is not an option in any serious bigger project because you don't want to do overwrite that globally. ---------- resolution: rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 21:22:34 2013 From: report at bugs.python.org (Tim Peters) Date: Mon, 14 Oct 2013 19:22:34 +0000 Subject: [issue19246] freeing then reallocating lots of memory fails under Windows In-Reply-To: <1381665601.5.0.467418586985.issue19246@psf.upfronthosting.co.za> Message-ID: <1381778554.48.0.664055483168.issue19246@psf.upfronthosting.co.za> Tim Peters added the comment: @pitrou, maybe, but seems very unlikely. As explained countless times already ;-), PyMalloc allocates few arenas in the test program. "Small objects" are relatively rare here. Almost all the memory is consumed by strings of ever-increasing length. PyMalloc passes those large requests on to the system malloc(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 21:25:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Oct 2013 19:25:28 +0000 Subject: [issue19246] freeing then reallocating lots of memory fails under Windows In-Reply-To: <1381778554.48.0.664055483168.issue19246@psf.upfronthosting.co.za> Message-ID: <1381778696.2515.7.camel@fsol> Antoine Pitrou added the comment: > @pitrou, maybe, but seems very unlikely. As explained countless times > already ;-), Indeed, a 32-bit counter would already have overflowed :-D You're right that's very unlikely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 21:27:28 2013 From: report at bugs.python.org (Tim Peters) Date: Mon, 14 Oct 2013 19:27:28 +0000 Subject: [issue19246] freeing then reallocating lots of memory fails under Windows In-Reply-To: <1381665601.5.0.467418586985.issue19246@psf.upfronthosting.co.za> Message-ID: <1381778848.13.0.323068206803.issue19246@psf.upfronthosting.co.za> Tim Peters added the comment: Just to be sure, I tried under current default (3.4.0a3+). Same behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 21:27:35 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Oct 2013 19:27:35 +0000 Subject: [issue19236] Add Tornado HTTP benchmark In-Reply-To: <1381605331.62.0.22076893629.issue19236@psf.upfronthosting.co.za> Message-ID: <1381778855.83.0.139165386477.issue19236@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 21:28:33 2013 From: report at bugs.python.org (Brian Curtin) Date: Mon, 14 Oct 2013 19:28:33 +0000 Subject: [issue19246] freeing then reallocating lots of memory fails under Windows In-Reply-To: <1381665601.5.0.467418586985.issue19246@psf.upfronthosting.co.za> Message-ID: <1381778913.91.0.279963690611.issue19246@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 21:31:37 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 14 Oct 2013 19:31:37 +0000 Subject: [issue19079] chameleon benchmark fails on 3.4 In-Reply-To: <1379965342.66.0.0193650788884.issue19079@psf.upfronthosting.co.za> Message-ID: <3cz8yw3VT0z7LjR@mail.python.org> Roundup Robot added the comment: New changeset e40042a7788c by Georg Brandl in branch 'default': Closes #19079: add VersionRange decorator to benchmark suite to mark compatible Python versions. http://hg.python.org/benchmarks/rev/e40042a7788c ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 22:01:33 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 14 Oct 2013 20:01:33 +0000 Subject: [issue4965] Can doc index of html version be separately scrollable? In-Reply-To: <1232148633.29.0.602528403512.issue4965@psf.upfronthosting.co.za> Message-ID: <3cz9d36xWbz7Lk7@mail.python.org> Roundup Robot added the comment: New changeset d7ebe03fa752 by Ezio Melotti in branch '2.7': #4965: Implement intelligent scrolling of the sidebar in the docs. http://hg.python.org/cpython/rev/d7ebe03fa752 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 22:37:37 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 20:37:37 +0000 Subject: [issue1772673] Replacing char* with const char* Message-ID: <1381783057.41.0.400775344503.issue1772673@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The patch synchronized with tip. ---------- Added file: http://bugs.python.org/file32124/const_char_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 22:44:17 2013 From: report at bugs.python.org (CliffM) Date: Mon, 14 Oct 2013 20:44:17 +0000 Subject: [issue19252] Enum.py : Enum.__new__() : Test Coverage In-Reply-To: <1381697502.11.0.490856984285.issue19252@psf.upfronthosting.co.za> Message-ID: <1381783457.85.0.708475872164.issue19252@psf.upfronthosting.co.za> CliffM added the comment: Yes it's purely a coverage issue. I must try to be more explicit (rather than implicit). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 22:59:15 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 14 Oct 2013 20:59:15 +0000 Subject: [issue19246] freeing then reallocating lots of memory fails under Windows In-Reply-To: <1381665601.5.0.467418586985.issue19246@psf.upfronthosting.co.za> Message-ID: <1381784355.87.0.915751048082.issue19246@psf.upfronthosting.co.za> Richard Oudkerk added the comment: After running ugly_hack(), trying to malloc a largeish block (1MB) fails: int main(void) { int first; void *ptr; ptr = malloc(1024*1024); assert(ptr != NULL); /* succeeds */ free(ptr); first = ugly_hack(); ptr = malloc(1024*1024); assert(ptr != NULL); /* fails */ free(ptr); return 0; } ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 23:04:00 2013 From: report at bugs.python.org (paul j3) Date: Mon, 14 Oct 2013 21:04:00 +0000 Subject: [issue15613] argparse ArgumentDefaultsHelpFormatter interacts badly with --arg and nargs=+ In-Reply-To: <1344578813.57.0.70269968542.issue15613@psf.upfronthosting.co.za> Message-ID: <1381784640.11.0.341555714473.issue15613@psf.upfronthosting.co.za> paul j3 added the comment: Looks like this behavior is intentional. This subclass adds a '%(default)s' string to the help lines if: if '%(default)' not in action.help: if action.default is not SUPPRESS: defaulting_nargs = [OPTIONAL, ZERO_OR_MORE] if action.option_strings or action.nargs in defaulting_nargs: help += ' (default: %(default)s)' So it adds the default if it is an `optional`, or a `positional` with '*' or '?'. A `default` value for a required positional (including '+') does not make sense, since the user input always overwrites the default. (I recommend closing this issue). ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 23:06:19 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 14 Oct 2013 21:06:19 +0000 Subject: [issue19252] Enum.py : Enum.__new__() : Test Coverage In-Reply-To: <1381783457.85.0.708475872164.issue19252@psf.upfronthosting.co.za> Message-ID: <525C5CCD.8060506@stoneleaf.us> Ethan Furman added the comment: Well, I would say it's half a coverage issue, half a guard against accidental deletion of the if test. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 23:18:19 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 14 Oct 2013 21:18:19 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlin Message-ID: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> New submission from Guido van Rossum: I'll add the tests next. The plan is to get this in the next (last) alpha release. ---------- messages: 199953 nosy: gvanrossum, larry, pitrou priority: release blocker severity: normal stage: patch review status: open title: Add asyncio (tulip, PEP 3156) to stdlin type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 23:19:24 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 21:19:24 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlin In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381785564.29.0.83663530963.issue19262@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 23:21:02 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Oct 2013 21:21:02 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlin In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381785662.63.0.20640636569.issue19262@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It will probably need some messaging to integrate the Windows overlapped stuff? ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 23:21:26 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Oct 2013 21:21:26 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlin In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381785686.65.0.114387084556.issue19262@psf.upfronthosting.co.za> Antoine Pitrou added the comment: (massaging, probably) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 23:24:32 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 21:24:32 +0000 Subject: [issue4965] Can doc index of html version be separately scrollable? In-Reply-To: <1232148633.29.0.602528403512.issue4965@psf.upfronthosting.co.za> Message-ID: <1381785872.71.0.634512117517.issue4965@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could you please make a scrolling more smooth? Or at least optional. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 23:26:27 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 21:26:27 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381785987.45.0.149714655536.issue19262@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: Add asyncio (tulip, PEP 3156) to stdlin -> Add asyncio (tulip, PEP 3156) to stdlib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 23:28:24 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Oct 2013 21:28:24 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381786104.42.0.585600421208.issue19262@psf.upfronthosting.co.za> Georg Brandl added the comment: If you need help with docs, let me know. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 23:36:31 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 21:36:31 +0000 Subject: [issue18919] Unify audio modules tests In-Reply-To: <1378293110.61.0.780572869606.issue18919@psf.upfronthosting.co.za> Message-ID: <1381786591.49.0.959758216566.issue18919@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 23:41:23 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2013 21:41:23 +0000 Subject: [issue1772673] Replacing char* with const char* Message-ID: <1381786883.6.0.832279117214.issue1772673@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 23:51:38 2013 From: report at bugs.python.org (Tim Peters) Date: Mon, 14 Oct 2013 21:51:38 +0000 Subject: [issue19246] freeing then reallocating lots of memory fails under Windows In-Reply-To: <1381665601.5.0.467418586985.issue19246@psf.upfronthosting.co.za> Message-ID: <1381787498.38.0.915107147223.issue19246@psf.upfronthosting.co.za> Tim Peters added the comment: @sbt, excellent! Happens for me too: trying to allocate a 1MB block fails after running ugly_hack() once. That fits the symptoms: lots of smaller, varying-sized allocations, followed by free()s, followed by a "largish" allocation. Don't know _exactly_ which largish allocation is failing. Could be the next non-trivial dict resize, or, because I'm running under Python 3, a largish Unicode string allocation. Unfortunately, using the current default-branch Python in a debug build, the original test case doesn't misbehave, so I can't be more specific. That could be because, in a debug build, Python does more of the memory management itself. Or at least it used to - everything got more complicated in my absence ;-) Anyway, since "the problem" has been produced with a simple pure C program, I think we need to close this as "wont fix". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 00:16:13 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 14 Oct 2013 22:16:13 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381788973.18.0.112911462502.issue19262@psf.upfronthosting.co.za> Guido van Rossum added the comment: Here's an updated patch that doesn't botch the selectors imports. ---------- keywords: +patch Added file: http://bugs.python.org/file32125/asyncio2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 00:19:28 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2013 22:19:28 +0000 Subject: [issue19246] freeing then reallocating lots of memory fails under Windows In-Reply-To: <1381787498.38.0.915107147223.issue19246@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > Anyway, since "the problem" has been produced with a simple pure C program, I think we need to close this as "wont fix". Can someone try the low fragmentation allocator? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 00:22:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2013 22:22:52 +0000 Subject: [issue19246] freeing then reallocating lots of memory fails under Windows In-Reply-To: Message-ID: STINNER Victor added the comment: I tried jemalloc on Linux which behaves better than the (g)libc on the RSS ans VMS memory. I know that Firefox uses it on Windows (and maybe also Mac OS X). It may be interesting to try it and/or provide something to use it easily. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 00:23:57 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 14 Oct 2013 22:23:57 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381789437.17.0.248706474412.issue19262@psf.upfronthosting.co.za> Guido van Rossum added the comment: What I need help with most right now is a suggestion of where the unittests should go. There are too many of them to all put in one file. Some options: asyncio/test/*_test.py asyncio/test/test_*.py test/test_asyncio/ What's the best current practice? (I also want to add some hacks so that the files can actually be identical in the stdlib and in the separate 3rd party repo, otherwise keeping the two in sync will be too much work.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 00:33:16 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Oct 2013 22:33:16 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381789437.17.0.248706474412.issue19262@psf.upfronthosting.co.za> Message-ID: <1381789964.2515.12.camel@fsol> Antoine Pitrou added the comment: > asyncio/test/*_test.py > asyncio/test/test_*.py > test/test_asyncio/ Personally I have a preference for test/test_asyncio/test_*.py, because putting all tests in test/ makes them easier to find. However, other packages such as unittest have their dedicated test packages (unittest/test/...). As for test_*.py vs. *_test.py, test_*.py is definitely the norm in the source tree. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 00:39:46 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 14 Oct 2013 22:39:46 +0000 Subject: [issue10757] zipfile.write, arcname should be allowed to be a byte string In-Reply-To: <1293021846.1.0.84362256489.issue10757@psf.upfronthosting.co.za> Message-ID: <1381790386.58.0.88492529193.issue10757@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 00:43:18 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 14 Oct 2013 22:43:18 +0000 Subject: [issue10972] zipfile: add "unicode" option to the force the filename encoding to UTF-8 In-Reply-To: <1295611245.09.0.199855932712.issue10972@psf.upfronthosting.co.za> Message-ID: <1381790598.29.0.482239503379.issue10972@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 00:45:58 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 14 Oct 2013 22:45:58 +0000 Subject: [issue10614] ZipFile: add a filename_encoding argument In-Reply-To: <1291362121.18.0.976785403189.issue10614@psf.upfronthosting.co.za> Message-ID: <1381790758.74.0.590164402717.issue10614@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 00:47:01 2013 From: report at bugs.python.org (CliffM) Date: Mon, 14 Oct 2013 22:47:01 +0000 Subject: [issue19263] enum.py : Enum.__new__(). __objclass__ Message-ID: <1381790821.01.0.959200663601.issue19263@psf.upfronthosting.co.za> New submission from CliffM: Is the assignment __objclass__ = enum_class in enum.py(149) needed ? I cannot find any other reference to it (even Google) and it seems that __class__ is already set to enum_class : enum_member.__objclass__ = enum_class < not sure what this is doing > I have attached a patch that forces the assignment, but would rather understand what is intended here -- and test for that. ---------- components: Tests files: enum.patch keywords: patch messages: 199964 nosy: CliffM, ethan.furman priority: normal severity: normal status: open title: enum.py : Enum.__new__(). __objclass__ type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32126/enum.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 00:50:56 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 14 Oct 2013 22:50:56 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381791056.05.0.0298789958882.issue19262@psf.upfronthosting.co.za> Guido van Rossum added the comment: OK, here's a new patch that includes tests. To run the tests, I use: ./python.exe Lib/test/regrtest.py --fromfile Lib/test/test_asyncio/tests.txt --verbose There are a total of 4 individual test failures, all having to do with SSL: ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:589) Did anything change in the ssl module recently? ---------- Added file: http://bugs.python.org/file32127/asyncio3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 00:52:10 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 14 Oct 2013 22:52:10 +0000 Subject: [issue16310] zipfile: allow surrogates in filenames In-Reply-To: <1351082025.34.0.287428579283.issue16310@psf.upfronthosting.co.za> Message-ID: <1381791130.44.0.910853849599.issue16310@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 00:56:40 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 14 Oct 2013 22:56:40 +0000 Subject: [issue19263] enum.py : Enum.__new__(). __objclass__ In-Reply-To: <1381790821.01.0.959200663601.issue19263@psf.upfronthosting.co.za> Message-ID: <1381791400.76.0.246023644258.issue19263@psf.upfronthosting.co.za> Ethan Furman added the comment: It was originally put in to help inspect.classify_class_attrs, but recent subsequent changes (not yet committed, issue19030), make it unnecessary. Whether or not it stays depends on the changes to inspect being committed. ---------- assignee: -> ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 01:38:08 2013 From: report at bugs.python.org (Tim Peters) Date: Mon, 14 Oct 2013 23:38:08 +0000 Subject: [issue19246] freeing then reallocating lots of memory fails under Windows In-Reply-To: <1381665601.5.0.467418586985.issue19246@psf.upfronthosting.co.za> Message-ID: <1381793888.53.0.635923728046.issue19246@psf.upfronthosting.co.za> Tim Peters added the comment: @haypo, I'm not sure what you mean by "the low fragmentation allocator". If it's referring to this: http://msdn.microsoft.com/en-us/library/windows/desktop/aa366750(v=vs.85).aspx it doesn't sound all that promising for this failing case. But, sure, someone should try it ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 01:46:05 2013 From: report at bugs.python.org (Tim Peters) Date: Mon, 14 Oct 2013 23:46:05 +0000 Subject: [issue19246] freeing then reallocating lots of memory fails under Windows In-Reply-To: <1381665601.5.0.467418586985.issue19246@psf.upfronthosting.co.za> Message-ID: <1381794365.49.0.173098158703.issue19246@psf.upfronthosting.co.za> Tim Peters added the comment: BTW, everything I've read (including the MSDN page I linked to) says that the LFH is enabled _by default_ starting in Windows Vista (which I happen to be using). So unless Python does something to _disable_ it (I don't know), there's nothing to try here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 02:07:47 2013 From: report at bugs.python.org (Ethan Furman) Date: Tue, 15 Oct 2013 00:07:47 +0000 Subject: [issue16938] pydoc confused by __dir__ In-Reply-To: <1357944129.98.0.501949279766.issue16938@psf.upfronthosting.co.za> Message-ID: <1381795667.5.0.146174671491.issue16938@psf.upfronthosting.co.za> Ethan Furman added the comment: Ronald, if you get a chance could you try your descriptor, without the __objclass__ work around, with the latest patch in #19030? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 02:44:16 2013 From: report at bugs.python.org (Tyler B) Date: Tue, 15 Oct 2013 00:44:16 +0000 Subject: [issue19184] dis module has incorrect docs for RAISE_VARARGS In-Reply-To: <1381078012.05.0.236677780468.issue19184@psf.upfronthosting.co.za> Message-ID: <1381797856.38.0.221281106816.issue19184@psf.upfronthosting.co.za> Tyler B added the comment: Looked at the code and found differences between 3.4 and 2.7. 2.7 has 3 exceptions that can be raised while 3.4 has 4 exceptions. I propose removing the "list of parameters" from the documenation to keep things simple and not repeat the code. # 2.7 "Raises an exception. argc indicates the number of parameters to the raise statement, ranging from 0 to 3. The parameters consist of the traceback as TOS1, the value as TOS2, the exception as TOS3, and None as TOS4." # 3.4 "Raises an exception. argc indicates the number of parameters to the raise statement, ranging from 0 to 2. The parameters consist of the cause as TOS1, the exception as TOS2, and None as TOS3." How does this sound? ---------- nosy: +Tyler.B _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:18:37 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 15 Oct 2013 01:18:37 +0000 Subject: [issue4965] Can doc index of html version be separately scrollable? In-Reply-To: <1232148633.29.0.602528403512.issue4965@psf.upfronthosting.co.za> Message-ID: <1381799917.24.0.685176663037.issue4965@psf.upfronthosting.co.za> Ezio Melotti added the comment: I've looked into it, and I found that: 1) the scroll event can be triggered dozens of times per second; 2) sidebarwrapper.css(...) causes a browser repaint/reflow, which is slow; Optimizing the function doesn't seem like a good solution, so I tried to throttle it so that the position is updated at most once every 100ms (i.e. at 10fps max). On Firefox this shows that about 2-6 redraws are skipped but, as a side-effect, the sidebar might result a few pixels off due to the skipped redraws at the end (this doesn't seem noticeable though). If the value is increased over 100ms these problems start being noticeable. FTR there are more complex solutions but for now I preferred to keep it simple. These links contain other techniques (involving timers/timeouts): * https://github.com/shichuan/javascript-patterns/blob/master/jquery-patterns/window-scroll-event.html * http://underscorejs.org/docs/underscore.html#section-66 and http://underscorejs.org/#throttle Serhiy, can you try to apply the patch and fiddle a bit with it to see if you notice any improvement? You can try to change 100 with a lower or higher value, or do last_call = new Date() at the end of scroll_sidebar(). You might also have to remove the calls to console.log() if they create problems on your browser. Remember that after each change you have to do: cp Doc/tools/sphinxext/static/sidebar.js Doc/build/html/_static/sidebar.js and refresh the page to see the results. ---------- Added file: http://bugs.python.org/file32128/issue4965-throttle.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:22:00 2013 From: report at bugs.python.org (Larry Hastings) Date: Tue, 15 Oct 2013 01:22:00 +0000 Subject: [issue19260] "int" comment in marshal.c is outdated In-Reply-To: <1381754676.73.0.103403492624.issue19260@psf.upfronthosting.co.za> Message-ID: <1381800120.83.0.228117060876.issue19260@psf.upfronthosting.co.za> Larry Hastings added the comment: Martin: The code is not statically type-safe, but it is mechanically safe, which I think is why you wrote the comment in the first place. The return value of fread() is size_t, but the "read" variable is Py_ssize_t. So the function *could* theoretically return a value that would overflow the variable. However, this can't happen in practice because the input size ("n") is also Py_ssize_t. And fread() will never return a number larger than the number of bytes requested. QED the function will never return a number larger than one that could be stored in Py_ssize_t. If the comment originally had merit, then it still has merit. It was referring to this exact same situation, except back then the "n" and "read" variables were both type "int". They were both changed to "Py_ssize_t" some time ago but the comment was not updated. Since Martin contributed the original code and comment I leave it to him to decide its fate, Antoine's shooting-from-the-hip aside. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 05:28:29 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 15 Oct 2013 03:28:29 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381807709.32.0.306598836773.issue19262@psf.upfronthosting.co.za> Guido van Rossum added the comment: Found the cause of the ssl test failure -- the location of the ssl test key and cert are different. Here's a new patch with a quick fix (#4), but I think the correct solution is to either have the certificates inline in the source and write them to a temp file, or move them into the main asyncio library, or move the test_utils.py module -- since the test files are referenced from test_utils.py they should be in the same directory. Preferences? There are still some test failures, the Windows tests are being run everywhere. I'll look into how to do that later. ---------- Added file: http://bugs.python.org/file32129/asyncio4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 06:39:36 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Tue, 15 Oct 2013 04:39:36 +0000 Subject: [issue2919] Merge profile/cProfile in 3.n+1 In-Reply-To: <1211227334.77.0.551300594218.issue2919@psf.upfronthosting.co.za> Message-ID: <1381811976.98.0.4649988528.issue2919@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Let's close this. There is no point keeping this languishing any further. The profile and cProfile modules are different enough that we can't merge them without breaking compatibility. They should treated as two separate profilers. Maybe in the future we should include a drop-in module written in Python for cProfile to be used for another Python implementation. But for now, I don't see the benefit, since the profile module is good enough and alternate implementations should be able to re-do the _lsprof accelerator in their target language without too much trouble if desired. ---------- assignee: -> alexandre.vassalotti resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 06:59:54 2013 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 15 Oct 2013 04:59:54 +0000 Subject: [issue19079] chameleon benchmark fails on 3.4 In-Reply-To: <1379965342.66.0.0193650788884.issue19079@psf.upfronthosting.co.za> Message-ID: <1381813194.19.0.618870409059.issue19079@psf.upfronthosting.co.za> Stefan Behnel added the comment: This commit conflicts with the patch for issue #19108 and breaks benchmarking in Py3 (at least for me). Traceback (most recent call last): File "perf.py", line 2538, in main(sys.argv[1:]) File "perf.py", line 2481, in main base_cmd_prefix, changed_cmd_prefix) File "perf.py", line 2318, in FilterBenchmarks if not minver <= basever <= maxver: TypeError: unorderable types: str() <= bytes() It would be better to undo the parts of this change that figure out the interpreter version, then apply the other patch, and then reimplement the filtering based on it. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 07:43:16 2013 From: report at bugs.python.org (Peter Graham) Date: Tue, 15 Oct 2013 05:43:16 +0000 Subject: [issue19264] subprocess.Popen doesn't support unicode on Windows Message-ID: <1381815796.03.0.914223470735.issue19264@psf.upfronthosting.co.za> New submission from Peter Graham: On Windows, subprocess.Popen requires the executable name and working directory to be ascii. This is because it calls CreateProcess instead of CreateProcessW. ---------- components: Library (Lib), Unicode, Windows messages: 199976 nosy: ezio.melotti, peter0 priority: normal severity: normal status: open title: subprocess.Popen doesn't support unicode on Windows type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 08:14:41 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 15 Oct 2013 06:14:41 +0000 Subject: [issue19079] chameleon benchmark fails on 3.4 In-Reply-To: <1379965342.66.0.0193650788884.issue19079@psf.upfronthosting.co.za> Message-ID: <1381817681.4.0.795346074178.issue19079@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> georg.brandl nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 08:23:38 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Oct 2013 06:23:38 +0000 Subject: [issue5411] Add xz support to shutil In-Reply-To: <1236081386.1.0.884971889723.issue5411@psf.upfronthosting.co.za> Message-ID: <1381818218.7.0.914961398841.issue5411@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: 3.4 beta 1 will be soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 08:26:56 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Oct 2013 06:26:56 +0000 Subject: [issue13451] sched.py: speedup cancel() method In-Reply-To: <1321923822.73.0.49972384361.issue13451@psf.upfronthosting.co.za> Message-ID: <1381818416.52.0.851373940416.issue13451@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Giampaolo, Raymond? What are your opinions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 09:54:17 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Oct 2013 07:54:17 +0000 Subject: [issue18652] Add itertools.first_true (return first true item in iterable) In-Reply-To: <1375610934.97.0.503658757825.issue18652@psf.upfronthosting.co.za> Message-ID: <1381823657.37.0.659740587696.issue18652@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > OK, now I have a place in the non-test email code where using this would lead to easier-to-read code. Now you have not this place. ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 10:03:45 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Tue, 15 Oct 2013 08:03:45 +0000 Subject: [issue19201] Add 'x' mode to lzma.open() In-Reply-To: <1381282314.82.0.620935912444.issue19201@psf.upfronthosting.co.za> Message-ID: <1381824225.48.0.790652814117.issue19201@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Stopped the leaking after running the test by adding self.addCleanup. ---------- Added file: http://bugs.python.org/file32130/add_x_mode_to_lzma_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 10:04:38 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 15 Oct 2013 08:04:38 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381807709.32.0.306598836773.issue19262@psf.upfronthosting.co.za> Message-ID: <1071192887.79542958.1381824250884.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > Found the cause of the ssl test failure -- the location of the ssl > test key and cert are different. Here's a new patch with a quick > fix (#4), but I think the correct solution is to either have the > certificates inline in the source and write them to a temp file, or > move them into the main asyncio library, or move the test_utils.py > module -- since the test files are referenced from test_utils.py > they should be in the same directory. Preferences? You could simply reuse Lib/test/keycert.pem (when in stdlib mode). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 10:23:22 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Oct 2013 08:23:22 +0000 Subject: [issue19246] freeing then reallocating lots of memory fails under Windows In-Reply-To: <1381794365.49.0.173098158703.issue19246@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Tim> http://msdn.microsoft.com/en-us/library/windows/desktop/aa366750(v=vs.85).aspx Yes, this one. Tim> BTW, everything I've read (including the MSDN page I linked to) says that the LFH is enabled _by default_ starting in Windows Vista (which I happen to be using). So unless Python does something to _disable_ it (I don't know), there's nothing to try here. Extract of the link: "To enable the LFH for a heap, use the GetProcessHeap function to obtain a handle to the default heap of the calling process, or use the handle to a private heap created by the HeapCreate function. Then call the HeapSetInformation function with the handle." It should be enabled explicitly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 10:24:17 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Oct 2013 08:24:17 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381825457.85.0.0938694669484.issue19262@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 10:26:18 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 15 Oct 2013 08:26:18 +0000 Subject: [issue19246] freeing then reallocating lots of memory fails under Windows In-Reply-To: Message-ID: <1041751784.79623023.1381825551843.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > It should be enabled explicitly. Victor, please read your own link before posting: """The information in this topic applies to Windows Server 2003 and Windows XP. Starting with Windows Vista, the system uses the low-fragmentation heap (LFH) as needed to service memory allocation requests. Applications do not need to enable the LFH for their heaps. """ ---------- title: freeing then reallocating lots of memory fails under Windows -> freeing then reallocating lots of memory fails under Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 10:33:01 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Oct 2013 08:33:01 +0000 Subject: [issue19246] freeing then reallocating lots of memory fails under Windows In-Reply-To: <1381665601.5.0.467418586985.issue19246@psf.upfronthosting.co.za> Message-ID: <1381825981.34.0.474975429152.issue19246@psf.upfronthosting.co.za> STINNER Victor added the comment: > Victor, please read your own link before posting: Oh. I missed this part, that's why I didn't understand Tim's remark. So the issue comes the Windows heap allocator. I don't see any obvious improvment that Python can do to improve the memory usage. I close the issue. You have to modify your application to allocate objects differently, to limit manually the fragmentation of the heap. Another option, maybe more complex, is to create a subprocess to process data, and destroy the process to release the memory. multiprocessing helps to implement that. I will maybe try jemalloc on Windows, but I prefer to open a new issue if I find something interesting. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 10:33:28 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Oct 2013 08:33:28 +0000 Subject: [issue19246] high fragmentation of the memory heap on Windows In-Reply-To: <1381665601.5.0.467418586985.issue19246@psf.upfronthosting.co.za> Message-ID: <1381826008.72.0.553619973128.issue19246@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: freeing then reallocating lots of memory fails under Windows -> high fragmentation of the memory heap on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 10:53:48 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 15 Oct 2013 08:53:48 +0000 Subject: [issue19246] high fragmentation of the memory heap on Windows In-Reply-To: <1381665601.5.0.467418586985.issue19246@psf.upfronthosting.co.za> Message-ID: <1381827228.15.0.405243438292.issue19246@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: fixed -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 10:58:30 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Tue, 15 Oct 2013 08:58:30 +0000 Subject: [issue16845] warnings.simplefilter should validate input In-Reply-To: <1357173726.64.0.0586309357998.issue16845@psf.upfronthosting.co.za> Message-ID: <1381827510.3.0.996555559008.issue16845@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Here is the patch to add the validation in simplefilter with the test. ---------- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file32131/add_assert_in_simplefilter.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 11:03:51 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Oct 2013 09:03:51 +0000 Subject: [issue17221] Resort Misc/NEWS In-Reply-To: <1361135741.75.0.253129131493.issue17221@psf.upfronthosting.co.za> Message-ID: <1381827831.75.0.392618668767.issue17221@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 11:06:55 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 15 Oct 2013 09:06:55 +0000 Subject: [issue17221] Resort Misc/NEWS In-Reply-To: <1361135741.75.0.253129131493.issue17221@psf.upfronthosting.co.za> Message-ID: <3czW3f5CRdz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 484ce82b7873 by Serhiy Storchaka in branch 'default': Issue #17221: Merge 3.4.0 Alpha 1 entries before and after 3.3.1 release candidate 1. http://hg.python.org/cpython/rev/484ce82b7873 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 12:22:00 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 15 Oct 2013 10:22:00 +0000 Subject: [issue5411] Add xz support to shutil In-Reply-To: <1236081386.1.0.884971889723.issue5411@psf.upfronthosting.co.za> Message-ID: <1381832520.23.0.388817111446.issue5411@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Serhiy's patch needs a "versionchanged" or "versionadded" tag in the Docs. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 12:23:01 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 15 Oct 2013 10:23:01 +0000 Subject: [issue13451] sched.py: speedup cancel() method In-Reply-To: <1321923822.73.0.49972384361.issue13451@psf.upfronthosting.co.za> Message-ID: <1381832581.63.0.212139375273.issue13451@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Serhiy, perhaps it would be useful to see if such optimizations can apply to Tulip's (or asyncio's) event loop, since it will probably be the new standard in 3.4. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 12:24:53 2013 From: report at bugs.python.org (Tyler B) Date: Tue, 15 Oct 2013 10:24:53 +0000 Subject: [issue19184] dis module has incorrect docs for RAISE_VARARGS In-Reply-To: <1381078012.05.0.236677780468.issue19184@psf.upfronthosting.co.za> Message-ID: <1381832693.62.0.501698027773.issue19184@psf.upfronthosting.co.za> Tyler B added the comment: I wanted to make an edit so here's my revised comment: Looked at the code and found differences between 3.4 and 2.7. 2.7 has 4 exceptions that can be raised while 3.4 has 3 exceptions. I propose removing the "list of parameters" from the documenation to keep things simple and not repeat the code. # 2.7 "Raises an exception. argc indicates the number of parameters to the raise statement, ranging from 0 to 3. The parameters consist of the traceback as TOS1, the value as TOS2, the exception as TOS3, and None as TOS4." # 3.4 "Raises an exception. argc indicates the number of parameters to the raise statement, ranging from 0 to 2. The parameters consist of the cause as TOS1, the exception as TOS2, and None as TOS3." How does this sound? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 12:25:37 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 15 Oct 2013 10:25:37 +0000 Subject: [issue14407] concurrent.futures tests don't adher to test_cases protocol In-Reply-To: <1332701075.92.0.286414979411.issue14407@psf.upfronthosting.co.za> Message-ID: <1381832737.15.0.61879848353.issue14407@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think the better solution would be to fix the test inheritance hierarchy: only concrete test classes should inherit from unittest.TestCase. Then the code can be simplified by simply calling unittest.main(__name__). ---------- nosy: +pitrou stage: -> patch review versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 12:27:04 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 15 Oct 2013 10:27:04 +0000 Subject: [issue15817] Misc/gdbinit: Expose command documentation to gdb help In-Reply-To: <1346283185.13.0.0954859318202.issue15817@psf.upfronthosting.co.za> Message-ID: <1381832824.0.0.918188431213.issue15817@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This looks like a good idea. Of course, since we now have the python-gdb pluging which provides much more powerful diagnostics on modern gdbs, the usefulness of gdbinit is a bit reduced. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 12:31:09 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 15 Oct 2013 10:31:09 +0000 Subject: [issue19219] speed up marshal.loads() In-Reply-To: <1381434552.02.0.780065524081.issue19219@psf.upfronthosting.co.za> Message-ID: <1381833069.61.0.91319278327.issue19219@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 12:31:36 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 15 Oct 2013 10:31:36 +0000 Subject: [issue19256] Optimize marshal format and add version token. In-Reply-To: <1381703408.57.0.928931596293.issue19256@psf.upfronthosting.co.za> Message-ID: <1381833096.82.0.601348240622.issue19256@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 12:37:13 2013 From: report at bugs.python.org (Tyler B) Date: Tue, 15 Oct 2013 10:37:13 +0000 Subject: [issue19184] dis module has incorrect docs for RAISE_VARARGS In-Reply-To: <1381078012.05.0.236677780468.issue19184@psf.upfronthosting.co.za> Message-ID: <1381833433.85.0.310576252915.issue19184@psf.upfronthosting.co.za> Tyler B added the comment: One last edit: Looked at the code and found differences between 3.4 and 2.7. 2.7 has 4 exceptions that can be raised while 3.4 has 3 exceptions. I propose including the full list of parameters but describing the exceptions in a way that's less specific about the TOS order to keep the documentation as simple as possible. # 2.7 "Raises an exception. argc indicates the number of parameters to the raise statement, ranging from 0 to 3. The parameters can consist of the traceback as TOS1, the value as TOS2, the exception as TOS3, and None as TOS4." # 3.4 "Raises an exception. argc indicates the number of parameters to the raise statement, ranging from 0 to 2. The parameters can consist of the cause as TOS1, the exception as TOS2, and None as TOS3." How does this sound? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 13:24:40 2013 From: report at bugs.python.org (Colin Williams) Date: Tue, 15 Oct 2013 11:24:40 +0000 Subject: [issue19265] Increased test coverage for datetime pickling Message-ID: <1381836280.6.0.648453742391.issue19265@psf.upfronthosting.co.za> New submission from Colin Williams: This just increases test coverage for the datetime module by one line. ---------- components: Library (Lib) files: datetimepickling.patch keywords: patch messages: 199993 nosy: Colin.Williams priority: normal severity: normal status: open title: Increased test coverage for datetime pickling type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file32132/datetimepickling.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 13:32:38 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 15 Oct 2013 11:32:38 +0000 Subject: [issue19184] dis module has incorrect docs for RAISE_VARARGS In-Reply-To: <1381078012.05.0.236677780468.issue19184@psf.upfronthosting.co.za> Message-ID: <1381836758.89.0.671351190459.issue19184@psf.upfronthosting.co.za> Georg Brandl added the comment: Tyler, thanks for the suggestion. However it doesn't really solve the issue: the parameter order is the opposite of the current doc text (and your suggested text). ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 13:50:54 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 15 Oct 2013 11:50:54 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress Message-ID: <1381837854.83.0.526181978582.issue19266@psf.upfronthosting.co.za> New submission from Nick Coghlan: Issue 15806 added contextlib.ignored to the standard library (later renamed to contextlib.ignore), as a simple helper that allows code like: try: os.remove(fname) except FileNotFoundError: pass to instead be written as: with ignore(FileNotFoundError): os.remove('somefile.tmp') The point has been made that "ignore" may easily be taken to mean preventing the exception being raised *at all* (since truly ignoring the exception would mean not skipping the rest of the with statement), rather than suppressing the exception in the context manager's __exit__ method. If you look at the rest of the contextlib docs, as well as the docs for the with statement and context manager objects, they don't refer to returning True from __exit__ as ignoring the exception, but rather as *suppressing* it. Even the docs for contextlib.ignore now make use of the term "suppress". So I think it makes sense to rename the context manager to "suppress", while keeping the same semantics: with suppress(FileNotFoundError): os.remove('somefile.tmp') ---------- components: Library (Lib) messages: 199995 nosy: ncoghlan, rhettinger priority: normal severity: normal stage: needs patch status: open title: Rename contextlib.ignore to contextlib.suppress type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 15:01:29 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 15 Oct 2013 13:01:29 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381837854.83.0.526181978582.issue19266@psf.upfronthosting.co.za> Message-ID: <1381842089.19.0.213446205513.issue19266@psf.upfronthosting.co.za> Nick Coghlan added the comment: The specific docs quotes that persuaded me "suppress" was a better name than "ignore" for this feature (by contrast, "ignore" in this sense only appears in its own docs): >From http://docs.python.org/dev/library/stdtypes.html#contextmanager.__exit__: "Exit the runtime context and return a Boolean flag indicating if any exception that occurred should be suppressed." "Returning a true value from this method will cause the with statement to suppress the exception and continue execution with the statement immediately following the with statement. " >From http://docs.python.org/dev/reference/datamodel.html#object.__exit__ "If an exception is supplied, and the method wishes to suppress the exception (i.e., prevent it from being propagated), it should return a true value." >From http://docs.python.org/dev/library/contextlib#contextlib.contextmanager "If an exception is trapped merely in order to log it or to perform some action (rather than to suppress it entirely), the generator must reraise that exception." >From http://docs.python.org/dev/library/contextlib#contextlib.ignore (!) "As with any other mechanism that completely suppresses exceptions, it should only be used to cover very specific errors where silently ignoring the exception is known to be the right thing to do." >From http://docs.python.org/dev/library/contextlib#contextlib.ExitStack "...if an inner callback suppresses or replaces an exception, then outer callbacks will be passed arguments based on that updated state." >From http://docs.python.org/dev/library/contextlib#contextlib.ExitStack.enter_context "These context managers may suppress exceptions just as they normally would if used directly as part of a with statement." >From http://docs.python.org/dev/library/contextlib#contextlib.ExitStack.push "By returning true values, these callbacks can suppress exceptions the same way context manager __exit__() methods can." >From http://docs.python.org/dev/library/contextlib#contextlib.ExitStack.callback "Unlike the other methods, callbacks added this way cannot suppress exceptions (as they are never passed the exception details)." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 15:15:30 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 15 Oct 2013 13:15:30 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381837854.83.0.526181978582.issue19266@psf.upfronthosting.co.za> Message-ID: <1381842930.78.0.684846847871.issue19266@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 15:33:30 2013 From: report at bugs.python.org (Zero Piraeus) Date: Tue, 15 Oct 2013 13:33:30 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381837854.83.0.526181978582.issue19266@psf.upfronthosting.co.za> Message-ID: <1381844010.89.0.394946446234.issue19266@psf.upfronthosting.co.za> Zero Piraeus added the comment: This is my first submitted patch; if there's anything wrong with it, please let me know (but the testsuite passes, and make patchcheck only warns about Misc/NEWS and Misc/ACKS, which I assume is handled by committer). ---------- keywords: +patch nosy: +zero.piraeus Added file: http://bugs.python.org/file32133/cligsu.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 15:55:00 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 15 Oct 2013 13:55:00 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381837854.83.0.526181978582.issue19266@psf.upfronthosting.co.za> Message-ID: <1381845300.25.0.0742107328192.issue19266@psf.upfronthosting.co.za> Nick Coghlan added the comment: Zero's patch looks good to me, but it may be a couple of days before I can get to applying it. If anyone else can handle it before then, please feel free :) Also, Zero, if you could review and sign the contributor agreement, that would be great: http://www.python.org/psf/contrib/contrib-form/ (while this patch is mechanical enough to be OK without one, it's still good to take care of the formalities of granting the PSF clear redistribution rights for CPython contributions) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 16:03:22 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 15 Oct 2013 14:03:22 +0000 Subject: [issue19265] Increased test coverage for datetime pickling In-Reply-To: <1381836280.6.0.648453742391.issue19265@psf.upfronthosting.co.za> Message-ID: <1381845802.71.0.165819259407.issue19265@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- components: +Tests nosy: +belopolsky stage: -> patch review versions: +Python 3.4 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 16:20:31 2013 From: report at bugs.python.org (Zero Piraeus) Date: Tue, 15 Oct 2013 14:20:31 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381845300.25.0.0742107328192.issue19266@psf.upfronthosting.co.za> Message-ID: <20131015142018.GD10360@piedra> Zero Piraeus added the comment: > Zero, if you could review and sign the contributor agreement, that > would be great: http://www.python.org/psf/contrib/contrib-form/ Done :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 16:57:12 2013 From: report at bugs.python.org (Brett Cannon) Date: Tue, 15 Oct 2013 14:57:12 +0000 Subject: [issue19079] chameleon benchmark fails on 3.4 In-Reply-To: <1379965342.66.0.0193650788884.issue19079@psf.upfronthosting.co.za> Message-ID: <1381849032.17.0.67145175819.issue19079@psf.upfronthosting.co.za> Brett Cannon added the comment: I'm seeing the same error as Stefan. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 17:08:24 2013 From: report at bugs.python.org (=?utf-8?q?Pawe=C5=82_Wroniszewski?=) Date: Tue, 15 Oct 2013 15:08:24 +0000 Subject: [issue19267] Logging to file does not accept UTF16 Message-ID: <1381849704.17.0.355561894294.issue19267@psf.upfronthosting.co.za> New submission from Pawe? Wroniszewski: The following code reproduces the error: import logging logging.root.addHandler(logging.FileHandler(filename='test.log',encoding='UTF16')) logging.error( u'b\u0142\u0105d') I think the problem is in the line logging/__init__.py:860: ufs = fs.decode(stream.encoding) as Python can't really handle the following code: fs = "%s\n" print fs.decode('utf16') % u'foo' ---------- components: Library (Lib) messages: 200001 nosy: pwronisz, vinay.sajip priority: normal severity: normal status: open title: Logging to file does not accept UTF16 type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 17:11:02 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Oct 2013 15:11:02 +0000 Subject: [issue19267] Logging to file does not accept UTF16 In-Reply-To: <1381849704.17.0.355561894294.issue19267@psf.upfronthosting.co.za> Message-ID: <1381849862.23.0.438593808777.issue19267@psf.upfronthosting.co.za> STINNER Victor added the comment: The example works fine on Python3: localhost$ python3 Python 3.3.2 (default, Aug 23 2013, 19:00:04) [GCC 4.8.1 20130603 (Red Hat 4.8.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import logging >>> logging.root.addHandler(logging.FileHandler(filename='test.log',encoding='UTF16')) >>> logging.error( u'b\u0142\u0105d') >>> localhost$ hexdump test.log 0000000 feff 0062 0142 0105 0064 000a 000000c ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 17:16:25 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Oct 2013 15:16:25 +0000 Subject: [issue19267] Logging to file does not accept UTF16 In-Reply-To: <1381849704.17.0.355561894294.issue19267@psf.upfronthosting.co.za> Message-ID: <1381850185.12.0.900143020396.issue19267@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't understand the purpose of fs.decode(stream.encoding): why not directly using ufs=u'%s\n"? @Pawel: Can you please try to replace ufs=fs.decode(stream.encoding) with ufs=u'%s\n'? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 17:30:41 2013 From: report at bugs.python.org (Ivan Pozdeev) Date: Tue, 15 Oct 2013 15:30:41 +0000 Subject: [issue19268] Local variable created with reflection cannot be referenced with identifier Message-ID: <1381851041.52.0.723888518937.issue19268@psf.upfronthosting.co.za> New submission from Ivan Pozdeev: It appears that the interpreter assigns an identifier to local or global scope at compilation time rather than searching locals, then globals (i.e. vars()) at the time of execution. An example: >>> def test(): ... vars()['a']=1 ... print(a) ... >>> test() Traceback (most recent call last): File "", line 1, in File "", line 3, in test NameError: global name 'a' is not defined >>> ---------- components: Interpreter Core messages: 200004 nosy: native_api priority: normal severity: normal status: open title: Local variable created with reflection cannot be referenced with identifier type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 18:07:51 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 Oct 2013 16:07:51 +0000 Subject: [issue19268] Local variable created with reflection cannot be referenced with identifier In-Reply-To: <1381851041.52.0.723888518937.issue19268@psf.upfronthosting.co.za> Message-ID: <1381853271.16.0.99926442999.issue19268@psf.upfronthosting.co.za> R. David Murray added the comment: Not really. But locals() is not reliably modifiable, and the vars documentation also notes this. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 18:16:00 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 15 Oct 2013 16:16:00 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381853760.34.0.615037919783.issue19262@psf.upfronthosting.co.za> Guido van Rossum added the comment: Turns out there were other uses of the sample key/cert pair. The easiest solution is to just have the code try both locations if necessary. Here's a new patch to review. ---------- Added file: http://bugs.python.org/file32134/asyncio5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 18:28:43 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 15 Oct 2013 16:28:43 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381837854.83.0.526181978582.issue19266@psf.upfronthosting.co.za> Message-ID: <1381854523.5.0.156709457066.issue19266@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This patch looks fine. I'll apply it shortly. ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 20:13:21 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Oct 2013 18:13:21 +0000 Subject: [issue12866] Add support for 24-bit samples in the audioop module In-Reply-To: <1314744712.67.0.770855933698.issue12866@psf.upfronthosting.co.za> Message-ID: <1381860801.21.0.324306943704.issue12866@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch addresses Antoine's comments. ---------- Added file: http://bugs.python.org/file32135/audioop_24bit_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 20:24:17 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 15 Oct 2013 18:24:17 +0000 Subject: [issue19079] chameleon benchmark fails on 3.4 In-Reply-To: <1379965342.66.0.0193650788884.issue19079@psf.upfronthosting.co.za> Message-ID: <1381861457.32.0.380196433037.issue19079@psf.upfronthosting.co.za> Georg Brandl added the comment: Ah yes, I somehow missed running perf.py itself with Python 3. Should be fixed now; adapting the #19108 patch should be easy enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 20:24:21 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 15 Oct 2013 18:24:21 +0000 Subject: [issue19079] chameleon benchmark fails on 3.4 In-Reply-To: <1379965342.66.0.0193650788884.issue19079@psf.upfronthosting.co.za> Message-ID: <1381861461.1.0.503052107395.issue19079@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 20:24:37 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 15 Oct 2013 18:24:37 +0000 Subject: [issue18725] Multiline shortening In-Reply-To: <1376388778.3.0.982069932509.issue18725@psf.upfronthosting.co.za> Message-ID: <3czlQl3RGsz7LjW@mail.python.org> Roundup Robot added the comment: New changeset 2e8c424dc638 by Serhiy Storchaka in branch 'default': Issue #18725: The textwrap module now supports truncating multiline text. http://hg.python.org/cpython/rev/2e8c424dc638 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 20:25:55 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Oct 2013 18:25:55 +0000 Subject: [issue18725] Multiline shortening In-Reply-To: <1376388778.3.0.982069932509.issue18725@psf.upfronthosting.co.za> Message-ID: <1381861555.5.0.423574819236.issue18725@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Antoine has approved this on IRC. Thank you Ezio and Antoine for your reviews. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 20:26:39 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Oct 2013 18:26:39 +0000 Subject: [issue13451] sched.py: speedup cancel() method In-Reply-To: <1321923822.73.0.49972384361.issue13451@psf.upfronthosting.co.za> Message-ID: <1381861599.22.0.216265987808.issue13451@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, I will see. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 20:46:35 2013 From: report at bugs.python.org (=?utf-8?q?Pawe=C5=82_Wroniszewski?=) Date: Tue, 15 Oct 2013 18:46:35 +0000 Subject: [issue19267] Logging to file does not accept UTF16 In-Reply-To: <1381849704.17.0.355561894294.issue19267@psf.upfronthosting.co.za> Message-ID: <1381862795.94.0.867493610974.issue19267@psf.upfronthosting.co.za> Pawe? Wroniszewski added the comment: Hi Victor. Your fix works, but actually using simply ufs='%s\n' also seem to work, as type( '%s' % u'foo') and type( u'%s' % u'foo') returns the same - unicode. So I would suggest dropping ufs completely, and changing the two occurences to fs. It works - I checked. Maybe some code refactoring could be done then, as I'm not sure if the two nested 'try' statements are needed in such case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 20:48:49 2013 From: report at bugs.python.org (=?utf-8?q?Pawe=C5=82_Wroniszewski?=) Date: Tue, 15 Oct 2013 18:48:49 +0000 Subject: [issue19267] Logging to file does not accept UTF16 In-Reply-To: <1381849704.17.0.355561894294.issue19267@psf.upfronthosting.co.za> Message-ID: <1381862929.17.0.226636599844.issue19267@psf.upfronthosting.co.za> Pawe? Wroniszewski added the comment: Btw I also don't see the purspose of fs.decode(stream.encoding), as it should rather be encoded and not decoded... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 20:52:38 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 15 Oct 2013 18:52:38 +0000 Subject: [issue13451] sched.py: speedup cancel() method In-Reply-To: <1321923822.73.0.49972384361.issue13451@psf.upfronthosting.co.za> Message-ID: <1381863158.18.0.693437427938.issue13451@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I don't have time to look into Serhiy's changes right now but here's a brief summary: - there's a (I think) *minor* downside in terms of backward compatibility because scheduler._queue won't be updated after cancel() (basically this is the reason why this issue was waiting for Raymond's approval) - the upside (other than the great speedup) is that I doubt anyone relies on that and scheduler._queue is not supposed to be used in the first place - tulip's scheduler already provides something very similar to what this patch proposes so no action should be taken on that front I personally think this should go in but I'd like to hear an OK from Raymond first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 21:08:36 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 15 Oct 2013 19:08:36 +0000 Subject: [issue13451] sched.py: speedup cancel() method In-Reply-To: <1321923822.73.0.49972384361.issue13451@psf.upfronthosting.co.za> Message-ID: <1381864116.82.0.87954649479.issue13451@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Sorry, I failed to notice there's a scheduler.queue property which exposes the underlying _queue attribute so the patch should take that into account and return the updated list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 22:13:24 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 15 Oct 2013 20:13:24 +0000 Subject: [issue13451] sched.py: speedup cancel() method In-Reply-To: <1321923822.73.0.49972384361.issue13451@psf.upfronthosting.co.za> Message-ID: <1381868004.63.0.19031356598.issue13451@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Patch in attachment applies cleanly with the current 3.4 code (last one wasn't) and returns an updated list on scheduler.queue. I rebased my work starting from my original patch (cancel.patch) not Serhiy's because it wasn't clear to me *where* exactly the enter() speedup was introduced (enter() method apparently is untouched by cancel_2.patch). ---------- Added file: http://bugs.python.org/file32136/cancel3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 23:14:38 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 Oct 2013 21:14:38 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <1381871678.42.0.760506210852.issue19085@psf.upfronthosting.co.za> Ned Deily added the comment: With Aqua Cocoa Tcl/Tk 8.5.14 or 8.6.0 (using ActiveState's 8.5.14 or 8.6.0) on OS X 10.8.5, running test_ttk_guionly: ====================================================================== ERROR: test_class (tkinter.test.test_ttk.test_widgets.ScrollbarTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/test_ttk/test_widgets.py", line 22, in test_class self.assertEqual(widget['class'], '') File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/__init__.py", line 1267, in cget return self.tk.call(self._w, 'cget', '-' + key) _tkinter.TclError: unknown option "-class" ====================================================================== ERROR: test_style (tkinter.test.test_ttk.test_widgets.ScrollbarTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/test_ttk/test_widgets.py", line 44, in test_style self.assertEqual(widget['style'], '') File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/__init__.py", line 1267, in cget return self.tk.call(self._w, 'cget', '-' + key) _tkinter.TclError: unknown option "-style" ====================================================================== FAIL: test_orient (tkinter.test.test_ttk.test_widgets.ScrollbarTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 426, in test_orient self.checkEnumParam(widget, 'orient', 'horizontal', 'vertical') File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 244, in checkEnumParam errmsg='ambiguous' + errmsg2) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 174, in checkInvalidParam widget[name] = value AssertionError: TclError not raised ---------------------------------------------------------------------- Ran 233 tests in 2.823s FAILED (failures=1, errors=2, skipped=1) test test_ttk_guionly failed 1 test failed: test_ttk_guionly --------------- With Aqua Carbon Tcl/Tk 8.4.19 (using ActiveState's 8.4.19) on OS X 10.8.5, running test_ttk_guionly (in 32-bit mode): ===================================================================== ERROR: test_class (tkinter.test.test_ttk.test_widgets.ScrollbarTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/test_ttk/test_widgets.py", line 22, in test_class self.assertEqual(widget['class'], '') File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/__init__.py", line 1267, in cget return self.tk.call(self._w, 'cget', '-' + key) _tkinter.TclError: unknown option "-class" ====================================================================== ERROR: test_style (tkinter.test.test_ttk.test_widgets.ScrollbarTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/test_ttk/test_widgets.py", line 44, in test_style self.assertEqual(widget['style'], '') File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/__init__.py", line 1267, in cget return self.tk.call(self._w, 'cget', '-' + key) _tkinter.TclError: unknown option "-style" ====================================================================== FAIL: test_values (tkinter.test.test_ttk.test_widgets.ComboboxTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/test_ttk/test_widgets.py", line 351, in test_values self.assertEqual(self.combo['values'], '') AssertionError: () != '' ====================================================================== FAIL: test_borderwidth (tkinter.test.test_ttk.test_widgets.FrameTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 336, in test_borderwidth 0, 1.3, 2.6, 6, -2, '10p') File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 260, in checkPixelsParam conv=conv, **kwargs) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 161, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 145, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: != 0 ====================================================================== FAIL: test_height (tkinter.test.test_ttk.test_widgets.FrameTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 556, in test_height self.checkPixelsParam(widget, 'height', 100, 101.2, 102.6, -100, 0, '3c') File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 260, in checkPixelsParam conv=conv, **kwargs) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 161, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 145, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: != 100 ====================================================================== FAIL: test_width (tkinter.test.test_ttk.test_widgets.FrameTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 560, in test_width self.checkPixelsParam(widget, 'width', 402, 403.4, 404.6, -402, 0, '5i') File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 260, in checkPixelsParam conv=conv, **kwargs) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 161, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 145, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: != 402 ====================================================================== FAIL: test_borderwidth (tkinter.test.test_ttk.test_widgets.LabelFrameTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 336, in test_borderwidth 0, 1.3, 2.6, 6, -2, '10p') File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 260, in checkPixelsParam conv=conv, **kwargs) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 161, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 145, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: != 0 ====================================================================== FAIL: test_height (tkinter.test.test_ttk.test_widgets.LabelFrameTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 556, in test_height self.checkPixelsParam(widget, 'height', 100, 101.2, 102.6, -100, 0, '3c') File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 260, in checkPixelsParam conv=conv, **kwargs) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 161, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 145, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: != 100 ====================================================================== FAIL: test_width (tkinter.test.test_ttk.test_widgets.LabelFrameTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 560, in test_width self.checkPixelsParam(widget, 'width', 402, 403.4, 404.6, -402, 0, '5i') File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 260, in checkPixelsParam conv=conv, **kwargs) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 161, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 145, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: != 402 ====================================================================== FAIL: test_wraplength (tkinter.test.test_ttk.test_widgets.LabelTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 493, in test_wraplength self.checkParams(widget, 'wraplength', 100) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 186, in checkParams self.checkParam(widget, name, value, **kwargs) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 161, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 145, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: != 100 ====================================================================== FAIL: test_length (tkinter.test.test_ttk.test_widgets.ProgressbarTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/test_ttk/test_widgets.py", line 876, in test_length self.checkPixelsParam(widget, 'length', 100.1, 56.7, '2i') File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 260, in checkPixelsParam conv=conv, **kwargs) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 161, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 145, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: != 100.1 ====================================================================== FAIL: test_length (tkinter.test.test_ttk.test_widgets.ScaleTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/test_ttk/test_widgets.py", line 787, in test_length self.checkPixelsParam(widget, 'length', 130, 131.2, 135.6, '5i') File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 260, in checkPixelsParam conv=conv, **kwargs) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 161, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 145, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: != 130 ====================================================================== FAIL: test_orient (tkinter.test.test_ttk.test_widgets.ScrollbarTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 426, in test_orient self.checkEnumParam(widget, 'orient', 'horizontal', 'vertical') File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 244, in checkEnumParam errmsg='ambiguous' + errmsg2) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 174, in checkInvalidParam widget[name] = value AssertionError: TclError not raised ====================================================================== FAIL: test_height (tkinter.test.test_ttk.test_widgets.TreeviewTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 556, in test_height self.checkPixelsParam(widget, 'height', 100, 101.2, 102.6, -100, 0, '3c') File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 260, in checkPixelsParam conv=conv, **kwargs) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 161, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "/py/dev/3x/root/fwd/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/support.py", line 145, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: != 101.2 ---------------------------------------------------------------------- Ran 233 tests in 3.203s FAILED (failures=12, errors=2, skipped=1) test test_ttk_guionly failed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 23:23:29 2013 From: report at bugs.python.org (=?utf-8?q?Natal_Ng=C3=A9tal?=) Date: Tue, 15 Oct 2013 21:23:29 +0000 Subject: [issue19267] Logging to file does not accept UTF16 In-Reply-To: <1381849704.17.0.355561894294.issue19267@psf.upfronthosting.co.za> Message-ID: <1381872209.34.0.0641366904868.issue19267@psf.upfronthosting.co.za> Natal Ng?tal added the comment: Hi, here the patch to fix this bug on Python 2.7 with a test suite. ---------- nosy: +hobbestigrou Added file: http://bugs.python.org/file32137/patch_utf16 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 23:24:56 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 15 Oct 2013 21:24:56 +0000 Subject: [issue14407] concurrent.futures tests don't adher to test_cases protocol In-Reply-To: <1332701075.92.0.286414979411.issue14407@psf.upfronthosting.co.za> Message-ID: <3czqRC3qvcz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset 38243a0a1f44 by Antoine Pitrou in branch '3.3': Issue #14407: Fix unittest test discovery in test_concurrent_futures. http://hg.python.org/cpython/rev/38243a0a1f44 New changeset 9cc40bc5f02b by Antoine Pitrou in branch 'default': Issue #14407: Fix unittest test discovery in test_concurrent_futures. http://hg.python.org/cpython/rev/9cc40bc5f02b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 23:25:15 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 15 Oct 2013 21:25:15 +0000 Subject: [issue14407] concurrent.futures tests don't adher to test_cases protocol In-Reply-To: <1332701075.92.0.286414979411.issue14407@psf.upfronthosting.co.za> Message-ID: <1381872315.41.0.140690990663.issue14407@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Fixed, thanks for reporting! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 23:25:51 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Oct 2013 21:25:51 +0000 Subject: [issue19267] Logging to file does not accept UTF16 In-Reply-To: <1381849704.17.0.355561894294.issue19267@psf.upfronthosting.co.za> Message-ID: <1381872351.04.0.0764375920948.issue19267@psf.upfronthosting.co.za> STINNER Victor added the comment: patch_utf16 looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 23:26:22 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Oct 2013 21:26:22 +0000 Subject: [issue19267] Logging to file does not accept UTF16 In-Reply-To: <1381849704.17.0.355561894294.issue19267@psf.upfronthosting.co.za> Message-ID: <1381872382.1.0.681755455797.issue19267@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- components: +Unicode nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 23:37:46 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Oct 2013 21:37:46 +0000 Subject: [issue13451] sched.py: speedup cancel() method In-Reply-To: <1321923822.73.0.49972384361.issue13451@psf.upfronthosting.co.za> Message-ID: <1381873066.85.0.807501392867.issue13451@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > it wasn't clear to me *where* exactly the enter() speedup was introduced Constructing Event object. You introduced __init__(). Here is a patch which is based on my patch and new Giampaolo's patch. In additional it fixes a performance for the queue property (perhaps regression was introduced in issue18432). Unpatched: test_cancel : time=4.05863 : calls=1 : stdev=0.00000 test_empty : time=0.00499 : calls=1 : stdev=0.00000 test_enter : time=0.03537 : calls=1 : stdev=0.00000 test_queue : time=37.82003 : calls=1 : stdev=0.00000 test_run : time=0.05289 : calls=1 : stdev=0.00000 cancel3.patch: test_cancel : time=0.00649 : calls=1 : stdev=0.00000 test_empty : time=0.00704 : calls=1 : stdev=0.00000 test_enter : time=0.03959 : calls=1 : stdev=0.00000 test_queue : time=45.34278 : calls=1 : stdev=0.00000 test_run : time=0.05477 : calls=1 : stdev=0.00000 cancel_4.patch: test_cancel : time=0.00889 : calls=1 : stdev=0.00000 test_empty : time=0.00636 : calls=1 : stdev=0.00000 test_enter : time=0.03092 : calls=1 : stdev=0.00000 test_queue : time=3.93284 : calls=1 : stdev=0.00000 test_run : time=0.05294 : calls=1 : stdev=0.00000 ---------- Added file: http://bugs.python.org/file32138/cancel_4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 23:42:44 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Oct 2013 21:42:44 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <1381873364.78.0.149964947538.issue19085@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Ned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 23:48:18 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 15 Oct 2013 21:48:18 +0000 Subject: [issue19267] Logging to file does not accept UTF16 In-Reply-To: <1381849704.17.0.355561894294.issue19267@psf.upfronthosting.co.za> Message-ID: <3czqy96XVLz7LjS@mail.python.org> Roundup Robot added the comment: New changeset e94e29dab32c by Victor Stinner in branch '2.7': Close #19267: Fix support of multibyte encoding (ex: UTF-16) in the logging http://hg.python.org/cpython/rev/e94e29dab32c ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 23:50:53 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Oct 2013 21:50:53 +0000 Subject: [issue19267] Logging to file does not accept UTF16 In-Reply-To: <1381849704.17.0.355561894294.issue19267@psf.upfronthosting.co.za> Message-ID: <1381873853.93.0.829722601227.issue19267@psf.upfronthosting.co.za> STINNER Victor added the comment: This bug is specific to Python 2. I should now be fixed, thanks Pawe? for the report and Natal for the patch. @Natal: Could you please sign the Contributor Agreement for next contributions? http://www.python.org/psf/contrib/contrib-form/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 23:51:50 2013 From: report at bugs.python.org (=?utf-8?q?Pawe=C5=82_Wroniszewski?=) Date: Tue, 15 Oct 2013 21:51:50 +0000 Subject: [issue19267] Logging to file does not accept UTF16 In-Reply-To: <1381849704.17.0.355561894294.issue19267@psf.upfronthosting.co.za> Message-ID: <1381873910.24.0.250804521501.issue19267@psf.upfronthosting.co.za> Pawe? Wroniszewski added the comment: Cool - looks good to me as well. Thanks guys. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 00:50:11 2013 From: report at bugs.python.org (Ethan Furman) Date: Tue, 15 Oct 2013 22:50:11 +0000 Subject: [issue19268] Local variable created with reflection cannot be referenced with identifier In-Reply-To: <1381851041.52.0.723888518937.issue19268@psf.upfronthosting.co.za> Message-ID: <1381877411.74.0.749458559792.issue19268@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +ethan.furman resolution: invalid -> stage: committed/rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 01:36:48 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 15 Oct 2013 23:36:48 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381880208.79.0.864452937162.issue19262@psf.upfronthosting.co.za> Guido van Rossum added the comment: Here's a partial patch for Windows. (Mostly for myself; I need to integrate this into the main patch.) ---------- Added file: http://bugs.python.org/file32139/winasyncio.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 01:53:08 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 15 Oct 2013 23:53:08 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381881188.79.0.0314517695386.issue19262@psf.upfronthosting.co.za> Guido van Rossum added the comment: Here's a full new patch, with Windows project/solution changes included, and updated from the latest Tulip asyncio branch. ---------- Added file: http://bugs.python.org/file32140/asyncio6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 01:53:33 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 15 Oct 2013 23:53:33 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381881213.33.0.0977414332214.issue19262@psf.upfronthosting.co.za> Changes by Guido van Rossum : Removed file: http://bugs.python.org/file32139/winasyncio.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 02:03:56 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 16 Oct 2013 00:03:56 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381881836.02.0.534541270776.issue19262@psf.upfronthosting.co.za> Guido van Rossum added the comment: PS. There's some garbage at the start of pcbuild.sln (perhaps a BOM mark?). I'm not going to re-upload the patch for now, but please note this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 02:50:10 2013 From: report at bugs.python.org (Tyler B) Date: Wed, 16 Oct 2013 00:50:10 +0000 Subject: [issue19184] dis module has incorrect docs for RAISE_VARARGS In-Reply-To: <1381078012.05.0.236677780468.issue19184@psf.upfronthosting.co.za> Message-ID: <1381884610.87.0.887747400998.issue19184@psf.upfronthosting.co.za> Tyler B added the comment: Here's a revised suggestion that has the order changed. I have additional concerns but please provide comment on this revision. Thanks # 2.7 "Raises an exception. argc indicates the number of parameters to the raise statement, ranging from 0 to 3. The parameters can consist of None as TOS1, the exception as TOS2, the value as TOS3, and the traceback as TOS4." # 3.4 "Raises an exception. argc indicates the number of parameters to the raise statement, ranging from 0 to 2. The parameters can consist of None as TOS1, the exception as TOS2, and the cause as TOS3." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 03:31:30 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 16 Oct 2013 01:31:30 +0000 Subject: [issue14407] concurrent.futures tests don't adher to test_cases protocol In-Reply-To: <1332701075.92.0.286414979411.issue14407@psf.upfronthosting.co.za> Message-ID: <1381887090.59.0.0706152314308.issue14407@psf.upfronthosting.co.za> Zachary Ware added the comment: I had missed this issue before; issue16968 tracks the same thing. There are a couple of issues that the committed patch doesn't address. Namely, the file still uses test_main, and there is no thread or process reaping when running the file via discovery. Unfortunately, there's no clear-cut best solution in the other issue. A couple months ago, Serhiy posted a question on python-dev[1] about how to solve it, which I haven't seen any replies to. Antoine, do you have any suggestions? [1] https://mail.python.org/pipermail/python-dev/2013-August/127893.html ---------- nosy: +serhiy.storchaka, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 03:42:54 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 Oct 2013 01:42:54 +0000 Subject: [issue19268] Local variable created with reflection cannot be referenced with identifier In-Reply-To: <1381851041.52.0.723888518937.issue19268@psf.upfronthosting.co.za> Message-ID: <1381887774.3.0.0942463310793.issue19268@psf.upfronthosting.co.za> R. David Murray added the comment: Ethan, why did you reopen the issue? Do you have a different opinion, or was it just an issue-update error? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 04:31:55 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 16 Oct 2013 02:31:55 +0000 Subject: [issue19267] Logging to file does not accept UTF16 In-Reply-To: <1381849704.17.0.355561894294.issue19267@psf.upfronthosting.co.za> Message-ID: <1381890715.65.0.858475541227.issue19267@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 04:46:59 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 16 Oct 2013 02:46:59 +0000 Subject: [issue19268] Local variable created with reflection cannot be referenced with identifier In-Reply-To: <1381851041.52.0.723888518937.issue19268@psf.upfronthosting.co.za> Message-ID: <1381891619.04.0.22233792016.issue19268@psf.upfronthosting.co.za> Ethan Furman added the comment: Oops! Issue update error, I was just adding myself to nosy as it looked like it was still open. Re-closing. ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 07:09:20 2013 From: report at bugs.python.org (Pete) Date: Wed, 16 Oct 2013 05:09:20 +0000 Subject: [issue19269] subtraction of pennies incorrect rounding or truncation problem Message-ID: <1381900160.57.0.820538942315.issue19269@psf.upfronthosting.co.za> New submission from Pete: Python makes errors on simple subtraction with 'pennies'. >>> 2000.0 - 1880.98 119.01999999999998 See attached file for more examples... ---------- components: Windows files: py_subtraction_bug messages: 200035 nosy: radiokinetics.pete priority: normal severity: normal status: open title: subtraction of pennies incorrect rounding or truncation problem type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file32141/py_subtraction_bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 07:14:21 2013 From: report at bugs.python.org (Tim Peters) Date: Wed, 16 Oct 2013 05:14:21 +0000 Subject: [issue19269] subtraction of pennies incorrect rounding or truncation problem In-Reply-To: <1381900160.57.0.820538942315.issue19269@psf.upfronthosting.co.za> Message-ID: <1381900461.55.0.908622879044.issue19269@psf.upfronthosting.co.za> Tim Peters added the comment: Please read this: http://docs.python.org/2/tutorial/floatingpoint.html A web search will lead you to thousands of discussions of alternatives. Probably best to use the `decimal` module if you're working heavily with decimal values. ---------- nosy: +tim.peters resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 09:25:20 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 16 Oct 2013 07:25:20 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381837854.83.0.526181978582.issue19266@psf.upfronthosting.co.za> Message-ID: <1381908320.82.0.963994593582.issue19266@psf.upfronthosting.co.za> Raymond Hettinger added the comment: After more thought, I think that suppress() isn't as clear as ignore() and it doesn't read as well in typical use cases. I'm assigning this one back to Nick to decide. If you want to scan existing code for examples to see how well this would read, run this: $ egrep -C2 "except( [A-Za-z]+)?:" *py | grep -C2 "pass" ---------- assignee: rhettinger -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 09:38:56 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 16 Oct 2013 07:38:56 +0000 Subject: [issue18723] shorten function of textwrap module is susceptible to non-normalized whitespaces In-Reply-To: <1376375212.1.0.637444277248.issue18723@psf.upfronthosting.co.za> Message-ID: <1381909136.77.0.363772941313.issue18723@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Serhiy's commit http://hg.python.org/cpython/rev/2e8c424dc638 fixed this issue already. So I closed this ticket. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 09:47:50 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Oct 2013 07:47:50 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381837854.83.0.526181978582.issue19266@psf.upfronthosting.co.za> Message-ID: <1381909670.15.0.703416529621.issue19266@psf.upfronthosting.co.za> STINNER Victor added the comment: On python-dev, abort_on() and trap() were proposed. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 10:47:32 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Oct 2013 08:47:32 +0000 Subject: [issue19270] sched.cancel() breaks events order Message-ID: <1381913252.24.0.629122693277.issue19270@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: sched.cancel() breaks events order if events are scheduled on same time and have same priority. Patch contains tests which expose this issue. ---------- components: Library (Lib) files: sched_test_stable.patch keywords: patch messages: 200040 nosy: giampaolo.rodola, pitrou, rhettinger, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: sched.cancel() breaks events order type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32142/sched_test_stable.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 10:49:35 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Oct 2013 08:49:35 +0000 Subject: [issue13451] sched.py: speedup cancel() method In-Reply-To: <1321923822.73.0.49972384361.issue13451@psf.upfronthosting.co.za> Message-ID: <1381913375.95.0.685059360259.issue13451@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +sched.cancel() breaks events order _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 10:50:11 2013 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Oct 2013 08:50:11 +0000 Subject: [issue19271] Update OrderedDict "see also" link Message-ID: <1381913411.15.0.258294798121.issue19271@psf.upfronthosting.co.za> New submission from Mark Lawrence: Both Python 2 and 3 docs refer to Raymond Hettinger's original recipe here http://code.activestate.com/recipes/576693/. Would it be better to link to pypi https://pypi.python.org/pypi/ordereddict? ---------- assignee: docs at python components: Documentation messages: 200041 nosy: BreamoreBoy, docs at python priority: normal severity: normal status: open title: Update OrderedDict "see also" link versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 10:56:07 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 16 Oct 2013 08:56:07 +0000 Subject: [issue19271] Update OrderedDict "see also" link In-Reply-To: <1381913411.15.0.258294798121.issue19271@psf.upfronthosting.co.za> Message-ID: <1381913767.7.0.354630744337.issue19271@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 10:58:47 2013 From: report at bugs.python.org (Aaron Iles) Date: Wed, 16 Oct 2013 08:58:47 +0000 Subject: [issue16500] Add an 'atfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1381913927.8.0.439804212576.issue16500@psf.upfronthosting.co.za> Changes by Aaron Iles : ---------- nosy: +aliles _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 11:02:33 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Wed, 16 Oct 2013 09:02:33 +0000 Subject: [issue17087] Improve the repr for regular expression match objects In-Reply-To: <1359589982.45.0.929656950631.issue17087@psf.upfronthosting.co.za> Message-ID: <1381914153.19.0.442759366812.issue17087@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Serhiy, are there any left issues with my latest patch? It would be nice if we could get this into 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 11:10:25 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Oct 2013 09:10:25 +0000 Subject: [issue13451] sched.py: speedup cancel() method In-Reply-To: <1321923822.73.0.49972384361.issue13451@psf.upfronthosting.co.za> Message-ID: <1381914625.35.0.986421475378.issue13451@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: All patches have problem with stable order. Rehashifying change it. But there are even more serious problems with current code (see issue19270). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 11:11:29 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 16 Oct 2013 09:11:29 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381837854.83.0.526181978582.issue19266@psf.upfronthosting.co.za> Message-ID: <1381914689.5.0.49470174871.issue19266@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I oppose abort_on() because it implies that it aborts the program. The word trap() is accurate but will be weird-sounding and non-communicative to users without a CS background: with trap(sqlite3.OperationalError): cursor.execute('CREATE TABLE dict (key text, value text)') The word "trap" in a CS context is also archaic and falling out of use. (Remember, glob.glob() was a good name in 1990 but most people now don't get know the reference to "globbing" and so the word is meaningless gobbledygook to them). Please give some weight to the fact the ignore() was checked in for seven months, it was presented at a conference, I've put it front of working Python programmers to use in real code, and I've checked to see how it reads in the try/except/pass code examples in the standard library. Don't throw away this work on a whim. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 11:34:21 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Oct 2013 09:34:21 +0000 Subject: [issue18468] re.group() should never return a bytearray In-Reply-To: <1373931432.85.0.594082146564.issue18468@psf.upfronthosting.co.za> Message-ID: <1381916061.32.0.604790069784.issue18468@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 11:47:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 16 Oct 2013 09:47:19 +0000 Subject: [issue18468] re.group() should never return a bytearray In-Reply-To: <1373931432.85.0.594082146564.issue18468@psf.upfronthosting.co.za> Message-ID: <3d07vp4tkFz7LjT@mail.python.org> Roundup Robot added the comment: New changeset add40e9f7cbe by Serhiy Storchaka in branch 'default': Issue #18468: The re.split, re.findall, and re.sub functions and the group() http://hg.python.org/cpython/rev/add40e9f7cbe ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 11:47:44 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 16 Oct 2013 09:47:44 +0000 Subject: [issue18725] Multiline shortening In-Reply-To: <1376388778.3.0.982069932509.issue18725@psf.upfronthosting.co.za> Message-ID: <1381916864.28.0.967667510053.issue18725@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Serhiy, you forgot to add shorten to __all__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 11:52:24 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Oct 2013 09:52:24 +0000 Subject: [issue18468] re.group() should never return a bytearray In-Reply-To: <1373931432.85.0.594082146564.issue18468@psf.upfronthosting.co.za> Message-ID: <1381917144.28.0.830826452277.issue18468@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Antoine for your review. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 12:01:07 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Oct 2013 10:01:07 +0000 Subject: [issue19270] sched.cancel() breaks events order In-Reply-To: <1381913252.24.0.629122693277.issue19270@psf.upfronthosting.co.za> Message-ID: <1381917667.2.0.332415655431.issue19270@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Actually there are two bugs: 1. sched.cancel() can remove wrong event (because it uses equality instead identity). 2. sched.cancel() change order of equal (by time and priority) events. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 12:08:46 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 16 Oct 2013 10:08:46 +0000 Subject: [issue18725] Multiline shortening In-Reply-To: <1376388778.3.0.982069932509.issue18725@psf.upfronthosting.co.za> Message-ID: <3d08N83ddhz7LjT@mail.python.org> Roundup Robot added the comment: New changeset 0bd257cd3e88 by Serhiy Storchaka in branch 'default': Add shorten to __all_ (issues #18585 and #18725). http://hg.python.org/cpython/rev/0bd257cd3e88 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 12:08:46 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 16 Oct 2013 10:08:46 +0000 Subject: [issue18585] Add a text truncation function In-Reply-To: <1375102150.65.0.445691594018.issue18585@psf.upfronthosting.co.za> Message-ID: <3d08N91vCYz7LjX@mail.python.org> Roundup Robot added the comment: New changeset 0bd257cd3e88 by Serhiy Storchaka in branch 'default': Add shorten to __all_ (issues #18585 and #18725). http://hg.python.org/cpython/rev/0bd257cd3e88 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 12:09:30 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Oct 2013 10:09:30 +0000 Subject: [issue18725] Multiline shortening In-Reply-To: <1376388778.3.0.982069932509.issue18725@psf.upfronthosting.co.za> Message-ID: <1381918170.77.0.781177602763.issue18725@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Vajrasky. It's Antoine forgot. ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 12:18:46 2013 From: report at bugs.python.org (Stefan Krah) Date: Wed, 16 Oct 2013 10:18:46 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381837854.83.0.526181978582.issue19266@psf.upfronthosting.co.za> Message-ID: <1381918726.42.0.914714932374.issue19266@psf.upfronthosting.co.za> Stefan Krah added the comment: trap() is a bit ambiguous, since in floating point operations it means that something is actually raised and not suppressed. So one could write: from decimal import * c = getcontext() c.traps[Inexact] = True >>> Decimal(9) / 11 # raises now! with trap(Inexact): Decimal(9) / 11 # quiet! As for "ignore" vs. "suppress", I'm with the people who think that they are largely synonyms here. I find "ignore" slightly catchier and nicer to read. Being pedantic, one could call it "ignore_once". I would also like "catch", or pedantically, "catch_once". ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 13:28:34 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Wed, 16 Oct 2013 11:28:34 +0000 Subject: [issue17087] Improve the repr for regular expression match objects In-Reply-To: <1359589982.45.0.929656950631.issue17087@psf.upfronthosting.co.za> Message-ID: <1381922914.71.0.747953119392.issue17087@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Added the new patch, which addresses Serhiy's comments. Also, this approach fails when bytes are involved: >>> import re >>> re.search(b"a", b"a") Assertion failed: (PyUnicode_Check(op)), function _PyUnicode_CheckConsistency, file Objects/unicodeobject.c, line 309. Should a check be added for this also? ---------- Added file: http://bugs.python.org/file32143/sre_repr4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 14:16:59 2013 From: report at bugs.python.org (Zero Piraeus) Date: Wed, 16 Oct 2013 12:16:59 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381837854.83.0.526181978582.issue19266@psf.upfronthosting.co.za> Message-ID: <1381925819.74.0.698401491697.issue19266@psf.upfronthosting.co.za> Zero Piraeus added the comment: 'Ignore' and 'suppress' are not synonyms: https://www.google.com/search?q=define%3Asuppress > forcibly put an end to. > "the rising was savagely suppressed" > synonyms: subdue, repress, crush, quell, quash, squash, stamp out https://www.google.com/search?q=define%3Asuppress > refuse to take notice of or acknowledge; disregard intentionally. > "he ignored her outraged question" > synonyms: disregard, take no notice of, pay no attention to [...] I know that ncoghlan and rhettinger (and maybe others) are annoyed by what they see as bikeshedding, but there is a genuine issue here. To summarize the objection raised on python-dev, the problem is that this: with ignore(SomeException): do_something() do_something_else() ... is easily misunderstood as ignoring every occurrence of SomeException throughout the with-statement. If you understand how context managers work, it's not difficult to see why that's not the case, but the name strongly suggests the incorrect reading over the correct one. I don't think 'suppress' is perfect. At the risk of further enraging those who are already tired of this discusion, I'll re-propose 'silence', which IMO comes closest to describing what is actually going on: https://www.google.com/search?q=define%3Asilence > cause to become silent; prohibit or prevent from speaking. > "the team's performance silenced their critics" > synonyms: quiet, hush, shush I also quite like 'quash' from the list of 'suppress' synonyms above, but that's probably just because it's a nice word to say :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 14:26:45 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Oct 2013 12:26:45 +0000 Subject: [issue17087] Improve the repr for regular expression match objects In-Reply-To: <1359589982.45.0.929656950631.issue17087@psf.upfronthosting.co.za> Message-ID: <1381926405.68.0.311981037757.issue17087@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Use correct first argument to getslice(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 14:28:30 2013 From: report at bugs.python.org (Stefan Krah) Date: Wed, 16 Oct 2013 12:28:30 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381925819.74.0.698401491697.issue19266@psf.upfronthosting.co.za> Message-ID: <20131016122831.GA5480@sleipnir.bytereef.org> Stefan Krah added the comment: Zero Piraeus wrote: > 'Ignore' and 'suppress' are not synonyms: I wrote "synonyms here", meaning that in *this context* they are practically synonyms. "suppress" describes the mechanics more precisely, "ignore" descibes the human intent: suppress_and_thereby_ignore. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 14:30:21 2013 From: report at bugs.python.org (Sergio Callegari) Date: Wed, 16 Oct 2013 12:30:21 +0000 Subject: [issue5342] packaging: add tests for old versions cleanup on update In-Reply-To: <1235256230.9.0.667035234316.issue5342@psf.upfronthosting.co.za> Message-ID: <1381926621.17.0.65121953907.issue5342@psf.upfronthosting.co.za> Sergio Callegari added the comment: Getting bitten by this with numpy/scipy installations Having previous scipy installed, pip install -I scipy creates a broken scipy installation, because the previous one is not removed and gets overwritten. For instance, an old spectral.so file leftover hides the spectral.py file from the new installation causing broken behavior. Similarly trying pip uninstall scipy pip install scipy does the same, because the distutils uninstall does not uninistall anything, leaves the scipy directory there and all cheerful ends with a 'Successfully uninstalled scipy'. This is *dangerous*. Mixing old and new code could lead to the weirdest behavior. In principle, one could even use this property to craft packages such that when two subsequent versions are installed one on top of the other malicious things happen even if individually each version is innoquous. ---------- nosy: +Sergio.Callegari _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 14:31:36 2013 From: report at bugs.python.org (=?utf-8?q?Kim_Gr=C3=A4sman?=) Date: Wed, 16 Oct 2013 12:31:36 +0000 Subject: [issue18314] Have os.unlink remove junction points In-Reply-To: <1372335321.1.0.479247042071.issue18314@psf.upfronthosting.co.za> Message-ID: <1381926696.94.0.87725150573.issue18314@psf.upfronthosting.co.za> Kim Gr?sman added the comment: Gentle ping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 16:26:12 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Wed, 16 Oct 2013 14:26:12 +0000 Subject: [issue17087] Improve the repr for regular expression match objects In-Reply-To: <1359589982.45.0.929656950631.issue17087@psf.upfronthosting.co.za> Message-ID: <1381933572.59.0.937202802433.issue17087@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Latest patch attached. ---------- Added file: http://bugs.python.org/file32144/sre_repr5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 17:44:24 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 16 Oct 2013 15:44:24 +0000 Subject: [issue18999] Robustness issues in multiprocessing.{get, set}_start_method In-Reply-To: <1378824821.26.0.31883015251.issue18999@psf.upfronthosting.co.za> Message-ID: <3d0HqQ2wmQz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 72a5ac909c7a by Richard Oudkerk in branch 'default': Issue #18999: Make multiprocessing use context objects. http://hg.python.org/cpython/rev/72a5ac909c7a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 17:48:23 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 16 Oct 2013 15:48:23 +0000 Subject: [issue18999] Support different contexts in multiprocessing In-Reply-To: <1378824821.26.0.31883015251.issue18999@psf.upfronthosting.co.za> Message-ID: <1381938503.52.0.0630736737883.issue18999@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> pending title: Robustness issues in multiprocessing.{get,set}_start_method -> Support different contexts in multiprocessing type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 18:37:46 2013 From: report at bugs.python.org (Lars Buitinck) Date: Wed, 16 Oct 2013 16:37:46 +0000 Subject: [issue18999] Support different contexts in multiprocessing In-Reply-To: <1378824821.26.0.31883015251.issue18999@psf.upfronthosting.co.za> Message-ID: <1381941466.06.0.831586861638.issue18999@psf.upfronthosting.co.za> Lars Buitinck added the comment: Thanks, much better than my solution! ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 18:48:05 2013 From: report at bugs.python.org (Alan Cristhian) Date: Wed, 16 Oct 2013 16:48:05 +0000 Subject: [issue5342] packaging: add tests for old versions cleanup on update In-Reply-To: <1235256230.9.0.667035234316.issue5342@psf.upfronthosting.co.za> Message-ID: <1381942085.49.0.165849601051.issue5342@psf.upfronthosting.co.za> Changes by Alan Cristhian : ---------- nosy: +Alan.Cristhian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 18:56:36 2013 From: report at bugs.python.org (Facundo Batista) Date: Wed, 16 Oct 2013 16:56:36 +0000 Subject: [issue19272] Can't pickle lambda (while named functions are ok) Message-ID: <1381942596.3.0.421261732602.issue19272@psf.upfronthosting.co.za> New submission from Facundo Batista: This is ok: Python 3.4.0a3+ (default:86af5991c809, Oct 13 2013, 16:42:52) ... >>> import pickle >>> def f(): ... pass ... >>> pickle.dumps(f) b'\x80\x03c__main__\nf\nq\x00.' However, when trying to pickle a lambda, it fails: >>> >>> pickle.dumps(lambda: None) Traceback (most recent call last): File "", line 1, in _pickle.PicklingError: Can't pickle : attribute lookup builtins.function failed (Found this because I'm getting the same problem but when trying to use concurrent.futures.ProcessExecutor) ---------- components: Library (Lib) messages: 200062 nosy: facundobatista priority: normal severity: normal status: open title: Can't pickle lambda (while named functions are ok) type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 19:07:20 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 16 Oct 2013 17:07:20 +0000 Subject: [issue19272] Can't pickle lambda (while named functions are ok) In-Reply-To: <1381942596.3.0.421261732602.issue19272@psf.upfronthosting.co.za> Message-ID: <1381943240.24.0.689011674275.issue19272@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Functions are pickled by name, not by code. Unpickling will only work if a function with the same name is present in in the same module (__main__ in your example) This is why pickling a lambda won't work: they have no individual names. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 19:20:09 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 16 Oct 2013 17:20:09 +0000 Subject: [issue18999] Support different contexts in multiprocessing In-Reply-To: <1378824821.26.0.31883015251.issue18999@psf.upfronthosting.co.za> Message-ID: <1381944009.71.0.754317390967.issue18999@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 19:38:58 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 16 Oct 2013 17:38:58 +0000 Subject: [issue19272] Can't pickle lambda (while named functions are ok) In-Reply-To: <1381942596.3.0.421261732602.issue19272@psf.upfronthosting.co.za> Message-ID: <1381945138.01.0.949631962415.issue19272@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 19:42:48 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 16 Oct 2013 17:42:48 +0000 Subject: [issue19272] Can't pickle lambda (while named functions are ok) In-Reply-To: <1381942596.3.0.421261732602.issue19272@psf.upfronthosting.co.za> Message-ID: <1381945368.73.0.706959602114.issue19272@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Would be interesting to be able to pickle "function.__code__". Although, thinking about this, it would be not portable between Python releases, something that pickle guarantee. Thoughs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 19:45:56 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Oct 2013 17:45:56 +0000 Subject: [issue17087] Improve the repr for regular expression match objects In-Reply-To: <1359589982.45.0.929656950631.issue17087@psf.upfronthosting.co.za> Message-ID: <1381945556.01.0.263951553735.issue17087@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is too complicated (and perhaps erroneous). Why not use just self->pattern->logical_charsize? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 19:50:45 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 16 Oct 2013 17:50:45 +0000 Subject: [issue19272] Can't pickle lambda (while named functions are ok) In-Reply-To: <1381942596.3.0.421261732602.issue19272@psf.upfronthosting.co.za> Message-ID: <1381945845.42.0.979206073436.issue19272@psf.upfronthosting.co.za> Ethan Furman added the comment: According to the docs[1]: 12.1.4. What can be pickled and unpickled? The following types can be pickled: - None, True, and False - integers, floating point numbers, complex numbers - strings, bytes, bytearrays - tuples, lists, sets, and dictionaries containing only picklable objects - functions defined at the top level of a module - built-in functions defined at the top level of a module - classes that are defined at the top level of a module - instances of such classes whose __dict__ or the result of calling __getstate__() is picklable Notice that lambda is not in that list. The docs for concurrent.futures.ProcessPoolExecutor[2] state: 17.4.3. ProcessPoolExecutor The ProcessPoolExecutor class is an Executor subclass that uses a pool of processes to execute calls asynchronously. ProcessPoolExecutor uses the multiprocessing module, which allows it to side-step the Global Interpreter Lock but also means that only picklable objects can be executed and returned. [1] http://docs.python.org/3/library/pickle.html#what-can-be-pickled-and-unpickled [2] http://docs.python.org/dev/libraryconcurrent.futures.html?highlight=concurrent#processpoolexecutor ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 20:27:50 2013 From: report at bugs.python.org (Facundo Batista) Date: Wed, 16 Oct 2013 18:27:50 +0000 Subject: [issue19272] Can't pickle lambda (while named functions are ok) In-Reply-To: <1381942596.3.0.421261732602.issue19272@psf.upfronthosting.co.za> Message-ID: <1381948070.34.0.648070542575.issue19272@psf.upfronthosting.co.za> Facundo Batista added the comment: Ethan, lambda functions are included in "functions defined at the top level of a module". Probably we should note there something like "except lambdas, because function pickling is by name, not by code". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 20:29:01 2013 From: report at bugs.python.org (Facundo Batista) Date: Wed, 16 Oct 2013 18:29:01 +0000 Subject: [issue19272] Can't pickle lambda (while named functions are ok) In-Reply-To: <1381942596.3.0.421261732602.issue19272@psf.upfronthosting.co.za> Message-ID: <1381948141.32.0.500329414597.issue19272@psf.upfronthosting.co.za> Facundo Batista added the comment: Jes?s, Amaury: What if pickle would assign a random unique name to the lambda (like, an UUID) so it can be pickled and unpickled? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 20:58:14 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 16 Oct 2013 18:58:14 +0000 Subject: [issue19272] Can't pickle lambda (while named functions are ok) In-Reply-To: <1381942596.3.0.421261732602.issue19272@psf.upfronthosting.co.za> Message-ID: <1381949894.53.0.810129393878.issue19272@psf.upfronthosting.co.za> Ethan Furman added the comment: Yeah, that one line should say, "named functions defined at the top level of a module". The following three paragraphs do, however, mention "named" several times. Sounds like a doc issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 20:59:12 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 16 Oct 2013 18:59:12 +0000 Subject: [issue19272] Can't pickle lambda (while named functions are ok) In-Reply-To: <1381942596.3.0.421261732602.issue19272@psf.upfronthosting.co.za> Message-ID: <1381949952.8.0.995913569504.issue19272@psf.upfronthosting.co.za> Ethan Furman added the comment: The problem with a randam unique name is making sure you get the same random unique name across different runs, different pythons, and different orders of execution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 21:05:33 2013 From: report at bugs.python.org (Taras Prokopenko) Date: Wed, 16 Oct 2013 19:05:33 +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: <1381950333.08.0.543478117209.issue11489@psf.upfronthosting.co.za> Taras Prokopenko added the comment: You should use ensure_ascii=False option to json.dumps, ie import json unicode_bytes = '\xed\xa8\x80' unicode_string = unicode_bytes.decode("utf8") json_encoded = json.dumps(unicode_string, ensure_ascii=False) json.loads(json_encoded),unicode_string (u'\uda00', u'\uda00') cmp(json.loads(json_encoded),unicode_string) 0 ---------- nosy: +Taras.Prokopenko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 21:08:05 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 16 Oct 2013 19:08:05 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381950485.69.0.476522668091.issue19262@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 21:12:44 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 16 Oct 2013 19:12:44 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381950764.57.0.238344214231.issue19262@psf.upfronthosting.co.za> Guido van Rossum added the comment: New patch, mostly SSL hardening IIRC. ---------- Added file: http://bugs.python.org/file32145/asyncio7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 21:14:27 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 16 Oct 2013 19:14:27 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381950867.72.0.642412272074.issue19262@psf.upfronthosting.co.za> Guido van Rossum added the comment: I could use some help for two issues with the tests: (1) How do I stop regrtest.py from running the windows tests? (These import _winapi.) 2 tests failed: test_asyncio.test_windows_events test_asyncio.test_windows_utils (2) I get this message -- what does it mean and should I care? 2 tests altered the execution environment: test_asyncio.test_base_events test_asyncio.test_futures ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 21:18:21 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 Oct 2013 19:18:21 +0000 Subject: [issue19272] Can't pickle lambda (while named functions are ok) In-Reply-To: <1381942596.3.0.421261732602.issue19272@psf.upfronthosting.co.za> Message-ID: <1381951101.24.0.4826645732.issue19272@psf.upfronthosting.co.za> R. David Murray added the comment: So don't make it random, use a hash of the code object :) (I'm not sure I'm serious, the thought just popped into my head...) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 21:30:05 2013 From: report at bugs.python.org (Ned Deily) Date: Wed, 16 Oct 2013 19:30:05 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381951805.71.0.757594055203.issue19262@psf.upfronthosting.co.za> Ned Deily added the comment: 1) The test case decorator perhaps: @unittest.skipIf(sys.platform == "win32", "Does not apply to Windows") ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 21:30:48 2013 From: report at bugs.python.org (Martin Matusiak) Date: Wed, 16 Oct 2013 19:30:48 +0000 Subject: [issue8964] platform._sys_version does not parse correctly IronPython 2.x version In-Reply-To: <1276204295.1.0.731236969654.issue8964@psf.upfronthosting.co.za> Message-ID: <1381951848.61.0.718379648322.issue8964@psf.upfronthosting.co.za> Martin Matusiak added the comment: I've checked sys.version on IronPython 2.6.1, 2.6.2 (same format) and 2.7.4 (slightly different). The patch includes two new test cases. I've also taken the liberty of adding some newlines in between the items in the dict as I found this code very hard to read otherwise. ---------- keywords: +patch nosy: +numerodix Added file: http://bugs.python.org/file32146/issue8964.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 21:36:00 2013 From: report at bugs.python.org (Ned Deily) Date: Wed, 16 Oct 2013 19:36:00 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381952160.08.0.0531872298608.issue19262@psf.upfronthosting.co.za> Ned Deily added the comment: 2) See class saved_test_environment in regrtest.py. I wouldn't worry too much about it initially but it should be looked at and tidied up before release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 21:39:41 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 16 Oct 2013 19:39:41 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381950867.72.0.642412272074.issue19262@psf.upfronthosting.co.za> Message-ID: <525EEB54.3060709@gmail.com> Richard Oudkerk added the comment: On 16/10/2013 8:14pm, Guido van Rossum wrote: > (2) I get this message -- what does it mean and should I care? > 2 tests altered the execution environment: > test_asyncio.test_base_events test_asyncio.test_futures Perhaps threads from the ThreadExecutor are still alive when those tests finish. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 21:40:17 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 16 Oct 2013 19:40:17 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381952417.94.0.193004356965.issue19262@psf.upfronthosting.co.za> Guido van Rossum added the comment: I'd have to decorate a lot of tests. Is there a way to fix this at the module or at least class level? (I'd be willing to move the imports around.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 21:58:57 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 16 Oct 2013 19:58:57 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381952417.94.0.193004356965.issue19262@psf.upfronthosting.co.za> Message-ID: <525EEFD9.2030905@gmail.com> Richard Oudkerk added the comment: I think at module level you can do if sys.platform != 'win32': raise unittest.SkipTest('Windows only') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 22:23:26 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 16 Oct 2013 20:23:26 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381955006.43.0.177074823026.issue19262@psf.upfronthosting.co.za> Guido van Rossum added the comment: Yup, that works! Not uploading a new patch right now but this is in the tulip repo now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 22:25:17 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 16 Oct 2013 20:25:17 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1381955117.3.0.330013505411.issue19262@psf.upfronthosting.co.za> Benjamin Peterson added the comment: You can skip classes with skipIf as a class decorator. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 22:29:46 2013 From: report at bugs.python.org (Alexander Boyd) Date: Wed, 16 Oct 2013 20:29:46 +0000 Subject: [issue19213] platform.linux_distribution detects Oracle Linux as Red Hat Enterprise Linux In-Reply-To: <1381353298.1.0.0482171871073.issue19213@psf.upfronthosting.co.za> Message-ID: <1381955386.94.0.245778608465.issue19213@psf.upfronthosting.co.za> Alexander Boyd added the comment: They're providing both /etc/oracle-release and /etc/redhat-release (as Oracle Linux is based on RHEL). I've attached /etc/oracle-release for reference. ---------- Added file: http://bugs.python.org/file32147/oracle-release _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 22:44:25 2013 From: report at bugs.python.org (Berker Peksag) Date: Wed, 16 Oct 2013 20:44:25 +0000 Subject: [issue8964] platform._sys_version does not parse correctly IronPython 2.x version In-Reply-To: <1276204295.1.0.731236969654.issue8964@psf.upfronthosting.co.za> Message-ID: <1381956265.78.0.954396851152.issue8964@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: needs patch -> patch review versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 22:49:39 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 16 Oct 2013 20:49:39 +0000 Subject: [issue8964] platform._sys_version does not parse correctly IronPython 2.x version In-Reply-To: <1276204295.1.0.731236969654.issue8964@psf.upfronthosting.co.za> Message-ID: <1381956579.2.0.408764626038.issue8964@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: The patch looks good, except one nit: if 'IronPython' in sys_version is probably not supported in IronPython 2.0, since support for "n-char in m-char" tests were added after Python 2.1. Now, you can either leave this in and remove the IronPython 2.0 support from platform.py (which is fine, IMO), or change the test to use the .find() method. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 22:52:06 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 16 Oct 2013 20:52:06 +0000 Subject: [issue19273] Update PCbuild/readme.txt Message-ID: <1381956724.6.0.425752006149.issue19273@psf.upfronthosting.co.za> New submission from Zachary Ware: Full title: Update PCbuild/readme.txt to be more accurate, more descriptive, more complete, less repetitive, more audience-aware, and all around, hopefully, better. What started as a simple patch to fix the supported Windows versions list, the legacy build folders list, and a couple other minor factual errors turned into a nearly complete rewrite of the whole file. The changes are too extensive to list out in this message; I'll use Rietveld to point out particular changes and my reasoning for them as soon as I'm able. Also, due to the nature of the changes, it may be simpler to review the changed file itself rather than the patch, so I'll post the patched file as well. At least 90% of these changes also apply to 3.3, but not all; I'd be happy to backport this patch or provide a new patch that strictly addresses factual errors in 3.3, as desired. Thanks, Zach ---------- assignee: docs at python components: Documentation, Windows files: pcbuild_readme.diff keywords: patch messages: 200085 nosy: docs at python, zach.ware priority: normal severity: normal status: open title: Update PCbuild/readme.txt versions: Python 3.4 Added file: http://bugs.python.org/file32148/pcbuild_readme.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 22:52:48 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 16 Oct 2013 20:52:48 +0000 Subject: [issue19273] Update PCbuild/readme.txt In-Reply-To: <1381956724.6.0.425752006149.issue19273@psf.upfronthosting.co.za> Message-ID: <1381956768.6.0.102808177348.issue19273@psf.upfronthosting.co.za> Zachary Ware added the comment: Here's the patched file for easier review. ---------- Added file: http://bugs.python.org/file32149/patched_pcbuild_readme.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 22:54:39 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 Oct 2013 20:54:39 +0000 Subject: [issue19213] platform.linux_distribution detects Oracle Linux as Red Hat Enterprise Linux In-Reply-To: <1381353298.1.0.0482171871073.issue19213@psf.upfronthosting.co.za> Message-ID: <1381956879.78.0.0349660625719.issue19213@psf.upfronthosting.co.za> R. David Murray added the comment: Gah. Well, by good fortune 'o' comes before 'r' in the alphabet, so it should be enough to just add 'oracle' to the list of _supported_dists in platform.py. Can you test that and confirm it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 23:43:52 2013 From: report at bugs.python.org (Christian Tismer) Date: Wed, 16 Oct 2013 21:43:52 +0000 Subject: [issue19274] make zipfile.PyZipFile more usable Message-ID: <1381959832.11.0.559988604291.issue19274@psf.upfronthosting.co.za> New submission from Christian Tismer: zipfile.PyZipFile needs a filter function. Reason: When creating an archive of the python lib, we don't want the tests. Especially the test file "badsyntax_future3.py" does not compile. Use case: With this little addition, it becomes very easy to create a zip file of the whole python library. See the attached use case. ---------- components: Library (Lib) files: zipfile.diff keywords: patch messages: 200088 nosy: Christian.Tismer priority: normal severity: normal status: open title: make zipfile.PyZipFile more usable type: enhancement versions: Python 2.7 Added file: http://bugs.python.org/file32150/zipfile.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 16 23:59:41 2013 From: report at bugs.python.org (Christian Tismer) Date: Wed, 16 Oct 2013 21:59:41 +0000 Subject: [issue19274] make zipfile.PyZipFile more usable In-Reply-To: <1381959832.11.0.559988604291.issue19274@psf.upfronthosting.co.za> Message-ID: <1381960781.44.0.319102180214.issue19274@psf.upfronthosting.co.za> Christian Tismer added the comment: Here is my use case as an example. With this patch above, I can easily create a .zip file of the standard lib. This was no longer possible at all, after revision 17558, from 2001-04-18: """This is a test""" from __future__ import nested_scopes from __future__ import rested_snopes def f(x): def g(y): return x + y return g print f(2)(4) ---------- Added file: http://bugs.python.org/file32151/make_libzip.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 00:00:39 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 16 Oct 2013 22:00:39 +0000 Subject: [issue19272] Can't pickle lambda (while named functions are ok) In-Reply-To: <1381942596.3.0.421261732602.issue19272@psf.upfronthosting.co.za> Message-ID: <1381960839.97.0.190649260127.issue19272@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Lambdas are "anonymous" functions, by definition. And, usually, they are not top level functions, but defined inside others. If at your "top level" (module) you do: """ a = lambda x: 2*x """ You don't have an anonymous function, but a function called "a". You can argue why "def a() : return 2*x" can be picked, but "a = lambda x: 2*x" can not. They look similar. What the poster actually wanted (tell me if I am wrong), I guess, is to be able to serialize the function code and send it to other process to be executed there. Something like "mobile" code. As is, pickle doesn't allow it (that is the reason I was brainstorming about being able to pickle "function.__code__" objects), and it is good because pickle guarantees compatibilities between Python versions, but "__code__" objects are particular to a certain Python virtual machine and certain version of it. That said, projects like PYRO provide "mobile code". I think that a recipe for that would be nice in the documentation, with a big warning saying "be sure you have the same implementation in both sides", and explicit versioning in the client and version checking in the server, in the recipe (to make it clear that same version is something you need). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 00:31:31 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 16 Oct 2013 22:31:31 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381837854.83.0.526181978582.issue19266@psf.upfronthosting.co.za> Message-ID: <1381962691.91.0.338591079188.issue19266@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- dependencies: +Add context manager for the "try: ... except: pass" pattern _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 00:31:55 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 16 Oct 2013 22:31:55 +0000 Subject: [issue15806] Add context manager for the "try: ... except: pass" pattern In-Reply-To: <1346217315.31.0.832549559428.issue15806@psf.upfronthosting.co.za> Message-ID: <1381962715.84.0.910313385134.issue15806@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- superseder: -> Rename contextlib.ignore to contextlib.suppress _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 00:40:48 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 16 Oct 2013 22:40:48 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381837854.83.0.526181978582.issue19266@psf.upfronthosting.co.za> Message-ID: <1381963248.87.0.658850344427.issue19266@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > Please give some weight to the fact the ignore() was > checked in for seven months, ... +1 ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 00:55:11 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 Oct 2013 22:55:11 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381837854.83.0.526181978582.issue19266@psf.upfronthosting.co.za> Message-ID: <1381964111.56.0.591532090312.issue19266@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, in this context ingnore, suppress, and silence all have essentially the same problem, or lack of it, depending on your point of view. Catch would be fine with me :) Please note that someone *reading the thread* on python-dev misunderstood what ignore did after *reading the documentation*. So, whether or not the name is changed, the documentation should be updated to stress the fact that the with block is exited as soon as the exception is raised for the first time. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 01:02:59 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 Oct 2013 23:02:59 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381837854.83.0.526181978582.issue19266@psf.upfronthosting.co.za> Message-ID: <1381964579.03.0.753836047659.issue19266@psf.upfronthosting.co.za> R. David Murray added the comment: To be clear: I do think 'suppress' is better than 'ignore', for the reasons Nick articulated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 01:04:47 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 16 Oct 2013 23:04:47 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381964111.56.0.591532090312.issue19266@psf.upfronthosting.co.za> Message-ID: Raymond Hettinger added the comment: On Oct 16, 2013, at 3:55 PM, R. David Murray wrote: > Catch would be fine with me :) I like "catch". Raymond ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 01:18:19 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 16 Oct 2013 23:18:19 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381964579.03.0.753836047659.issue19266@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: I didn't choose suppress on a whim. I actually agree with Raymond that ignore reads better when the context manager is used correctly, but suppress is more consistent with the terminology used in the documentation (including even PEP 343), *and* I think it is slightly less vulnerable to people expecting it to mean "don't even raise the exception and continue with the next statement inside the with block" (aka the "on error resume next" misinterpretation). I think suppress reads *well enough* for it to be worth making the switch in order to gain those other benefits. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 01:21:37 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 16 Oct 2013 23:21:37 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: Message-ID: Nick Coghlan added the comment: The reason I specifically *don't* like trap or catch for this is that they both have "... and do something with it" connotations for me, whereas ignore and suppress both appropriately imply "... and silently discard it". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 01:24:02 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 16 Oct 2013 23:24:02 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381837854.83.0.526181978582.issue19266@psf.upfronthosting.co.za> Message-ID: <1381965842.74.0.105920821101.issue19266@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > Catch would be fine with me :) Both "catch" and "trap" have the same problem in my view: you don't get to eat what you have caught (or trapped). :-) > Please note that someone *reading the thread* on python-dev > misunderstood what ignore did after *reading the documentation*. I question whether the confusion was genuine. Anyone who has discovered contextlib modules should know enough about with statement, context managers and exceptions to understand how ignore() can work. Sky is the limit when it comes to documentation improvements, but in this case code is better than a thousand words: @contextmanager def ignore(*exceptions): """Context manager to ignore particular exceptions""" try: yield except exceptions: pass Here is how I understand the word "ignore" in the context of context managers. (Pun unavoidable.) The context manager implements logic of how to exit the with block. The logic of ignore() CM is to (drum roll, please) ignore the specified exception(s) if any is raised within the with block. I gave my +0 to "suppress" on the list, but with more thought and considering more examples, I like "ignore" best. It is still a close call, but "suppress" suggests more effort on the part of CM than there is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 01:29:47 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 16 Oct 2013 23:29:47 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381965842.74.0.105920821101.issue19266@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Agreed it's a close call - it's really the docs consistency issue that tipped the balance for me, since I think either ignore *or* suppress would be a suitable name for the pattern when used correctly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 01:35:20 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 16 Oct 2013 23:35:20 +0000 Subject: [issue19272] Can't pickle lambda (while named functions are ok) In-Reply-To: <1381942596.3.0.421261732602.issue19272@psf.upfronthosting.co.za> Message-ID: <1381966520.18.0.783243100344.issue19272@psf.upfronthosting.co.za> Ethan Furman added the comment: >From the pickle docs: ===================================================================== Note that functions (built-in and user-defined) are pickled by ?fully qualified? name reference, not by value. This means that only the function name is pickled, along with the name of the module the function is defined in. Neither the function?s code, nor any of its function attributes are pickled. Thus the defining module must be importable in the unpickling environment, and the module must contain the named object, otherwise an exception will be raised. Similarly, classes are pickled by named reference, ... ===================================================================== There is no bug here; there /may/ be a doc clarification here. However, if we're talking about enhancing pickle we can take 3.3 off the table, and unless somebody gets busy quick 3.4 as well. Personally, I don't see the need. Just define your functions at the top level (with def, not lambda -- lambda functions are anonymous and don't have a useful __name__ attribute). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 01:38:18 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 16 Oct 2013 23:38:18 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381837854.83.0.526181978582.issue19266@psf.upfronthosting.co.za> Message-ID: <1381966698.86.0.213016598729.issue19266@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Feel free to ignore() me if it helps to close this debate. English is not my native language and my understanding may not match that of the majority of users. Note, however, that this debate might not even have started if not for a change s/ignored/ignore/. The s/ignore/suppress/ commit may sparkle yet another round. (It is quite possible that my dislike of "suppress" stems from not being able to remember how many p's and s's this word has in its spelling. As I said - feel free to ignore me.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 01:47:02 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Oct 2013 23:47:02 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381837854.83.0.526181978582.issue19266@psf.upfronthosting.co.za> Message-ID: <1381967222.49.0.924544586054.issue19266@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 02:43:35 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 17 Oct 2013 00:43:35 +0000 Subject: [issue19273] Update PCbuild/readme.txt In-Reply-To: <1381956724.6.0.425752006149.issue19273@psf.upfronthosting.co.za> Message-ID: <1381970615.7.0.70849205806.issue19273@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +brian.curtin, christian.heimes, loewis, tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 04:04:03 2013 From: report at bugs.python.org (Ethan Furman) Date: Thu, 17 Oct 2013 02:04:03 +0000 Subject: [issue19272] Can't pickle lambda (while named functions are ok) In-Reply-To: <1381942596.3.0.421261732602.issue19272@psf.upfronthosting.co.za> Message-ID: <1381975443.75.0.117490086337.issue19272@psf.upfronthosting.co.za> Ethan Furman added the comment: Jes?s Cea Avi?n added the comment: > > If at your "top level" (module) you do: > > """ > a = lambda x: 2*x > """ > > You don't have an anonymous function, but a function called "a". Actually, you do have an anonymous function, which happens to be bound to the name "a". Compare: --> def a(): ... pass --> a.__name__ 'a' and --> a = lambda: None --> a.__name__ '' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 04:09:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 17 Oct 2013 02:09:57 +0000 Subject: [issue19252] Enum.py : Enum.__new__() : Test Coverage In-Reply-To: <1381697502.11.0.490856984285.issue19252@psf.upfronthosting.co.za> Message-ID: <3d0YjC0Yp8z7LjQ@mail.python.org> Roundup Robot added the comment: New changeset 89f6abc2e115 by Ethan Furman in branch 'default': Close #19252: better test coverage for Enum. Thanks, CliffM http://hg.python.org/cpython/rev/89f6abc2e115 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 04:39:47 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 17 Oct 2013 02:39:47 +0000 Subject: [issue18919] Unify audio modules tests In-Reply-To: <1378293110.61.0.780572869606.issue18919@psf.upfronthosting.co.za> Message-ID: <1381977587.88.0.460877935375.issue18919@psf.upfronthosting.co.za> R. David Murray added the comment: It looks like test_wave is still failing on PPC64 PowerLinux: http://buildbot.python.org/all/builders/PPC64%20PowerLinux%203.x/builds/850/steps/test/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 04:43:46 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 17 Oct 2013 02:43:46 +0000 Subject: [issue19275] test_site is failing on AMD64 Snow Leopard Message-ID: <1381977826.53.0.553154234488.issue19275@psf.upfronthosting.co.za> New submission from R. David Murray: See eg http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.x/builds/158/steps/test/logs/stdio ---------- keywords: buildbot messages: 200104 nosy: r.david.murray priority: normal severity: normal status: open title: test_site is failing on AMD64 Snow Leopard type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 04:53:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 17 Oct 2013 02:53:27 +0000 Subject: [issue18891] Master patch for content manager addtion to email package. In-Reply-To: <1377918603.72.0.362957249668.issue18891@psf.upfronthosting.co.za> Message-ID: <3d0Zgp5XjQz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 6d12285e250b by R David Murray in branch 'default': #18891: Complete new provisional email API. http://hg.python.org/cpython/rev/6d12285e250b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 05:33:15 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 17 Oct 2013 03:33:15 +0000 Subject: [issue18891] Master patch for content manager addtion to email package. In-Reply-To: <1377918603.72.0.362957249668.issue18891@psf.upfronthosting.co.za> Message-ID: <1381980795.92.0.665312327673.issue18891@psf.upfronthosting.co.za> Eric Snow added the comment: nice! Thanks for doing this. ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 05:34:40 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 17 Oct 2013 03:34:40 +0000 Subject: [issue1615] PyObject_GenericGetAttr suppresses AttributeErrors in descriptors In-Reply-To: <1197576817.5.0.617961278098.issue1615@psf.upfronthosting.co.za> Message-ID: <1381980880.12.0.684871044983.issue1615@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 05:38:02 2013 From: report at bugs.python.org (David Edelsohn) Date: Thu, 17 Oct 2013 03:38:02 +0000 Subject: [issue19276] test_wave failing on PPC64 Linux Message-ID: <1381981082.23.0.996279918128.issue19276@psf.upfronthosting.co.za> Changes by David Edelsohn : ---------- components: Extension Modules nosy: David.Edelsohn priority: normal severity: normal status: open title: test_wave failing on PPC64 Linux type: behavior versions: Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 05:54:07 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Thu, 17 Oct 2013 03:54:07 +0000 Subject: [issue18891] Master patch for content manager addition to email package In-Reply-To: <1377918603.72.0.362957249668.issue18891@psf.upfronthosting.co.za> Message-ID: <1381982047.16.0.642116036697.issue18891@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- title: Master patch for content manager addtion to email package. -> Master patch for content manager addition to email package _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 06:08:43 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 17 Oct 2013 04:08:43 +0000 Subject: [issue18678] Wrong struct members name for spwd module In-Reply-To: <1375887000.77.0.620898445025.issue18678@psf.upfronthosting.co.za> Message-ID: <1381982923.98.0.472910618846.issue18678@psf.upfronthosting.co.za> Vajrasky Kok added the comment: I think giving deprecation message when accessing incorrect attribute from spwd struct is not practical. You're right, R. David Murray, as you can see in spwd_struct_members_name_fix_v2.patch. So I make a simpler patch. I just give a deprecation message in the source code. ---------- Added file: http://bugs.python.org/file32152/spwd_struct_members_name_fix_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 06:12:27 2013 From: report at bugs.python.org (Ethan Furman) Date: Thu, 17 Oct 2013 04:12:27 +0000 Subject: [issue1615] PyObject_GenericGetAttr suppresses AttributeErrors in descriptors In-Reply-To: <1197576817.5.0.617961278098.issue1615@psf.upfronthosting.co.za> Message-ID: <1381983147.89.0.950306240442.issue1615@psf.upfronthosting.co.za> Ethan Furman added the comment: Well, attached patch doesn't segfault in debug mode, but the errors aren't any better; in fact, I'd say their worse. Here's the current output from my test script: =============================================================== getter failed for descriptor 'huh' looking up not_here looking up huh huh not in class Traceback (most recent call last): File "break_getattr.py", line 30, in print(TestEnum.one.missing) AttributeError: getter failed for descriptor 'missing' =============================================================== As you can see, we have even less information when a class level __getattr__ is /absent/, and when we do have one, there is no change (which is exactly where we really wanted the change). :( ---------- Added file: http://bugs.python.org/file32153/issue1615.stoneleaf.01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 06:15:06 2013 From: report at bugs.python.org (Ethan Furman) Date: Thu, 17 Oct 2013 04:15:06 +0000 Subject: [issue1615] PyObject_GenericGetAttr suppresses AttributeErrors in descriptors In-Reply-To: <1197576817.5.0.617961278098.issue1615@psf.upfronthosting.co.za> Message-ID: <1381983306.23.0.0280289822299.issue1615@psf.upfronthosting.co.za> Ethan Furman added the comment: If anyone with more experience wants ownership, feel free to take it from me. ;) Otherwise I'll do my best to get this figured out in time for the beta. ---------- assignee: -> ethan.furman stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 06:24:34 2013 From: report at bugs.python.org (Ethan Furman) Date: Thu, 17 Oct 2013 04:24:34 +0000 Subject: [issue8297] AttributeError message text should include module name In-Reply-To: <1270272607.93.0.943961280816.issue8297@psf.upfronthosting.co.za> Message-ID: <1381983874.36.0.391737296125.issue8297@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- assignee: -> ethan.furman versions: +Python 3.4 -Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 07:59:20 2013 From: report at bugs.python.org (Martin Matusiak) Date: Thu, 17 Oct 2013 05:59:20 +0000 Subject: [issue8964] platform._sys_version does not parse correctly IronPython 2.x version In-Reply-To: <1276204295.1.0.731236969654.issue8964@psf.upfronthosting.co.za> Message-ID: <1381989560.95.0.202847919388.issue8964@psf.upfronthosting.co.za> Martin Matusiak added the comment: Hm, I see. Actually, "in" is already used in this function a little further down: elif "PyPy" in sys_version: So we should change both occurrences then. I'm attaching a v2 with these changes. ---------- Added file: http://bugs.python.org/file32154/issue8964_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 08:19:16 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Thu, 17 Oct 2013 06:19:16 +0000 Subject: [issue17087] Improve the repr for regular expression match objects In-Reply-To: <1359589982.45.0.929656950631.issue17087@psf.upfronthosting.co.za> Message-ID: <1381990756.47.0.351919283211.issue17087@psf.upfronthosting.co.za> Claudiu.Popa added the comment: I could use self->pattern->logical_size, but it seems that I still need the call to getstring for bytes & co, to obtain the view to the underlying buffer (otherwise the group0 part from the repr will contain random bytes). I didn't find a simpler way to achieve this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 08:21:21 2013 From: report at bugs.python.org (Georg Brandl) Date: Thu, 17 Oct 2013 06:21:21 +0000 Subject: [issue19274] make zipfile.PyZipFile more usable In-Reply-To: <1381959832.11.0.559988604291.issue19274@psf.upfronthosting.co.za> Message-ID: <1381990881.49.0.757875446248.issue19274@psf.upfronthosting.co.za> Georg Brandl added the comment: Looks fine but -- as a new feature -- is 3.4 only, and needs docs and tests. ---------- nosy: +georg.brandl stage: -> patch review versions: +Python 3.4 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 09:55:31 2013 From: report at bugs.python.org (Tobias Oberstein) Date: Thu, 17 Oct 2013 07:55:31 +0000 Subject: [issue19277] zlib compressobj: missing parameter doc strings Message-ID: <1381996531.24.0.0813249128928.issue19277@psf.upfronthosting.co.za> New submission from Tobias Oberstein: Currently the `zlib` module documents zlib.compressobj([level]) However, there are more parameters present already today: zlib.compressobj([level, method, wbits]) These other parameters are used in at least 2 deployed libraries (in the context of WebSocket compression): https://github.com/tavendo/AutobahnPython/blob/master/autobahn/autobahn/compress_deflate.py#L527 http://code.google.com/p/pywebsocket/source/browse/trunk/src/mod_pywebsocket/util.py#231 ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 200113 nosy: docs at python, oberstet priority: normal severity: normal status: open title: zlib compressobj: missing parameter doc strings type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 10:05:20 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 17 Oct 2013 08:05:20 +0000 Subject: [issue19275] test_site is failing on AMD64 Snow Leopard In-Reply-To: <1381977826.53.0.553154234488.issue19275@psf.upfronthosting.co.za> Message-ID: <1381997120.22.0.89672087227.issue19275@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 10:06:27 2013 From: report at bugs.python.org (Tobias Oberstein) Date: Thu, 17 Oct 2013 08:06:27 +0000 Subject: [issue19278] zlib compressobj: expose missing knobs Message-ID: <1381997187.57.0.66132821735.issue19278@psf.upfronthosting.co.za> New submission from Tobias Oberstein: The zlib library provides a couple of knobs to control the behavior and resource consumption of compression: ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, int level, int method, int windowBits, int memLevel, int strategy)); Of these, only `level`, `method` and `windowBits` are exposed on `zlib.compressobj` (and only the first is even documented: see issue #19277). However, as was recently found from emperical evidence in the context of WebSocket compression http://www.ietf.org/mail-archive/web/hybi/current/msg10222.html the `memLevel` parameter in particular is very valuable in controlling memory consumption. For WebSocket compression (with JSON payload), the following parameter set was found to provide a useful resource-consumption/compression-ratio tradeoff: window bits=11 memory level=4 Hence, it would be useful to expose _all_ parameters in Python, that is `memLevel` and `strategy` too. ---------- components: Library (Lib) messages: 200114 nosy: oberstet priority: normal severity: normal status: open title: zlib compressobj: expose missing knobs type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 10:18:13 2013 From: report at bugs.python.org (Esa Peuha) Date: Thu, 17 Oct 2013 08:18:13 +0000 Subject: [issue19275] test_site is failing on AMD64 Snow Leopard In-Reply-To: <1381977826.53.0.553154234488.issue19275@psf.upfronthosting.co.za> Message-ID: <1381997893.36.0.454748424998.issue19275@psf.upfronthosting.co.za> Esa Peuha added the comment: Apparently related to issue 19205 and issue 19209. Looks like _osx_support imports re which imports copyreg. ---------- nosy: +Esa.Peuha _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 11:37:18 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Oct 2013 09:37:18 +0000 Subject: [issue19276] test_wave failing on PPC64 Linux Message-ID: <1382002638.37.0.562042853914.issue19276@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka components: +Library (Lib), Tests -Extension Modules nosy: +serhiy.storchaka versions: +Python 2.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 11:52:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 17 Oct 2013 09:52:32 +0000 Subject: [issue19276] test_wave failing on PPC64 Linux Message-ID: <3d0lzM2kK5z7LjT@mail.python.org> New submission from Roundup Robot: New changeset 73dad296c483 by Serhiy Storchaka in branch '2.7': Issue 19276: Fix tests for wave files on big-endian platforms. http://hg.python.org/cpython/rev/73dad296c483 New changeset 236884b40a2d by Serhiy Storchaka in branch '3.3': Issue 19276: Fix tests for wave files on big-endian platforms. http://hg.python.org/cpython/rev/236884b40a2d New changeset 8bdf5328c55b by Serhiy Storchaka in branch 'default': Issue 19276: Fix tests for wave files on big-endian platforms. http://hg.python.org/cpython/rev/8bdf5328c55b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 11:55:36 2013 From: report at bugs.python.org (Guillaume Lebourgeois) Date: Thu, 17 Oct 2013 09:55:36 +0000 Subject: [issue19279] UTF-7 to UTF-8 decoding crash Message-ID: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> New submission from Guillaume Lebourgeois: After the fetch of a webpage with a wrongly declared encoding, the use of codecs module for a conversion crashes. The issue is reproducible this way : >>> content = b"+1911\' rel=\'stylesheet\' type=\'text/css\' />\n>> codecs.utf_7_decode(content, "replace", True) Traceback (most recent call last): File "", line 1, in SystemError: invalid maximum character passed to PyUnicode_New Original issue here : https://github.com/kennethreitz/requests/issues/1682 ---------- components: Library (Lib) messages: 200117 nosy: glebourgeois priority: normal severity: normal status: open title: UTF-7 to UTF-8 decoding crash type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 11:57:27 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Oct 2013 09:57:27 +0000 Subject: [issue19279] UTF-7 to UTF-8 decoding crash In-Reply-To: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> Message-ID: <1382003847.59.0.498321373547.issue19279@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka components: +Unicode nosy: +ezio.melotti, serhiy.storchaka stage: -> needs patch versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 12:02:11 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Oct 2013 10:02:11 +0000 Subject: [issue19279] UTF-7 to UTF-8 decoding crash In-Reply-To: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> Message-ID: <1382004131.07.0.457511621293.issue19279@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 12:20:29 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 17 Oct 2013 10:20:29 +0000 Subject: [issue19275] test_site is failing on AMD64 Snow Leopard In-Reply-To: <1381977826.53.0.553154234488.issue19275@psf.upfronthosting.co.za> Message-ID: <1382005229.27.0.771521180071.issue19275@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- priority: normal -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 13:40:35 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 17 Oct 2013 11:40:35 +0000 Subject: [issue19275] test_site is failing on AMD64 Snow Leopard In-Reply-To: <1381977826.53.0.553154234488.issue19275@psf.upfronthosting.co.za> Message-ID: <3d0pMd2MQNz7LjV@mail.python.org> Roundup Robot added the comment: New changeset 58aaf7542efe by Christian Heimes in branch 'default': Issue #19275: Fix test_site on AMD64 Snow Leopard http://hg.python.org/cpython/rev/58aaf7542efe ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 13:41:55 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 17 Oct 2013 11:41:55 +0000 Subject: [issue19275] test_site is failing on AMD64 Snow Leopard In-Reply-To: <1381977826.53.0.553154234488.issue19275@psf.upfronthosting.co.za> Message-ID: <1382010115.37.0.618822826817.issue19275@psf.upfronthosting.co.za> Christian Heimes added the comment: Let's hope that did the trick. ---------- assignee: -> christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 14:38:53 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 Oct 2013 12:38:53 +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: <1382013533.29.0.361338511675.issue16129@psf.upfronthosting.co.za> Nick Coghlan added the comment: I added tests to the patch and tweaked a few details. Once the local test run gives it a clean bill of health, I'll commit it so it will be included in 3.4a4 this weekend and you can check it works with Blender. ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 14:51:56 2013 From: report at bugs.python.org (Esa Peuha) Date: Thu, 17 Oct 2013 12:51:56 +0000 Subject: [issue19275] test_site is failing on AMD64 Snow Leopard In-Reply-To: <1381977826.53.0.553154234488.issue19275@psf.upfronthosting.co.za> Message-ID: <1382014316.39.0.601598624976.issue19275@psf.upfronthosting.co.za> Esa Peuha added the comment: Just by looking at the code, there still seems to be a problem: test_site.py was changed in 0b6052f2a8ee to test that the collections module isn't imported, but due to a bug it (re)tests the re module instead (re_mods needs to be changed to collection_mods). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 15:22:05 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 17 Oct 2013 13:22:05 +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: <3d0rd56knGz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 9cd88b39ef62 by Nick Coghlan in branch 'default': Issue #16129: Add `Py_SetStandardStreamEncoding` http://hg.python.org/cpython/rev/9cd88b39ef62 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 15:23:01 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 Oct 2013 13:23:01 +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: <1382016181.56.0.54312603373.issue16129@psf.upfronthosting.co.za> Nick Coghlan added the comment: Putting this to pending for the moment - please try it out with Blender once 3.4a4 is released, and then we'll close it. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 15:27:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 17 Oct 2013 13:27:52 +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: <3d0rlP3vBYz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 537e13ca7683 by Nick Coghlan in branch 'default': Issue #16129: Move Py_SetStandardStreamEncoding declaration http://hg.python.org/cpython/rev/537e13ca7683 ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 15:30:15 2013 From: report at bugs.python.org (Bastien Montagne) Date: Thu, 17 Oct 2013 13:30:15 +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: <1382016615.72.0.089165736517.issue16129@psf.upfronthosting.co.za> Bastien Montagne added the comment: Thanks Nick, we?ll do it for sure. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 15:42:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 17 Oct 2013 13:42:52 +0000 Subject: [issue19266] Rename contextlib.ignore to contextlib.suppress In-Reply-To: <1381837854.83.0.526181978582.issue19266@psf.upfronthosting.co.za> Message-ID: <3d0s576p9Cz7LjV@mail.python.org> Roundup Robot added the comment: New changeset 22247b7d17fa by Nick Coghlan in branch 'default': Close #19266: contextlib.ignore -> contextlib.suppress http://hg.python.org/cpython/rev/22247b7d17fa ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 15:55:03 2013 From: report at bugs.python.org (David Edelsohn) Date: Thu, 17 Oct 2013 13:55:03 +0000 Subject: [issue19276] test_wave failing on PPC64 Linux In-Reply-To: <3d0lzM2kK5z7LjT@mail.python.org> Message-ID: <1382018103.24.0.806490752384.issue19276@psf.upfronthosting.co.za> David Edelsohn added the comment: The patch does not appear to fix the tests for wave on big-endian PPC64 Linux. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 16:13:03 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 17 Oct 2013 14:13:03 +0000 Subject: [issue19280] Add a datatype to represent mime types to the email module Message-ID: <1382019183.72.0.422205662358.issue19280@psf.upfronthosting.co.za> New submission from R. David Murray: In issue 18891, Stephen Turnbull wondered if adding a datatype to represent mime types would be worthwhile. I think it would be. A mimetype is a pair (maintype/subtype), and while one may test the subparts independently in logic, the representation and what needs to be passed from place to place in the code is always a pair. Most importantly, having a datatype to represent this would eliminate a common class of errors: forgetting to test the component strings case-insensitively. If one is manipulating a Message object, the get_xxx methods used to access the mimetype do do case coercion, but within the email code itself there are a number of places where the raw strings are manipulated, and I have already made, discovered, and fixed case insensitivity bugs in that code. It is not clear at this point if the object should be exposed, though I'm inclined that way. I'd propose using a string subclass with maintype and subtype attributes, and this object could then be returned by get_content_type without breaking backward compatibility. Another advantage of using a string subclass is that the original casing of the values is easily retained and easily accessible, which while not critical is something the email package normally does (preserve the case of the original data). ---------- components: email keywords: easy messages: 200128 nosy: barry, r.david.murray priority: normal severity: normal stage: needs patch status: open title: Add a datatype to represent mime types to the email module type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 16:15:31 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 17 Oct 2013 14:15:31 +0000 Subject: [issue18891] Master patch for content manager addition to email package In-Reply-To: <1377918603.72.0.362957249668.issue18891@psf.upfronthosting.co.za> Message-ID: <1382019331.87.0.75353363832.issue18891@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks everyone for the reviews. I've opened up a new issue for Stephen's mimetype object suggestion (issue 19280). I'm still planning to add some examples to the docs, so I'm going to leave this open until I do that, but I wanted to get the code itself into the next alpha. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 16:31:27 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Oct 2013 14:31:27 +0000 Subject: [issue19276] test_wave failing on PPC64 Linux In-Reply-To: <3d0lzM2kK5z7LjT@mail.python.org> Message-ID: <1382020287.64.0.855668150877.issue19276@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It fixed a bug in wave tests, but not a bug in the wave module. I'm working on this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 16:52:09 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 17 Oct 2013 14:52:09 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1382021529.23.0.602691273648.issue19227@psf.upfronthosting.co.za> Richard Oudkerk added the comment: I can reproduce the problem on the Non-Debug Gentoo buildbot using only os.fork() and os.kill(pid, signal.SIGTERM). See http://hg.python.org/cpython/file/9853d3a20849/Lib/test/_test_multiprocessing.py#l339 To investigate further I think strace and/or gdb will need to be installed on that box. P.S. Note that the Debug Gentoo buildbot is always failing at the configure stage with "No space left on device". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 16:53:29 2013 From: report at bugs.python.org (Ethan Furman) Date: Thu, 17 Oct 2013 14:53:29 +0000 Subject: [issue19272] Can't pickle lambda (while named functions are ok) In-Reply-To: <1381942596.3.0.421261732602.issue19272@psf.upfronthosting.co.za> Message-ID: <1382021609.89.0.240670288245.issue19272@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- keywords: +patch Added file: http://bugs.python.org/file32155/issue19272.stoneleaf.01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 16:54:02 2013 From: report at bugs.python.org (Matthew Barnett) Date: Thu, 17 Oct 2013 14:54:02 +0000 Subject: [issue19279] UTF-7 to UTF-8 decoding crash In-Reply-To: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> Message-ID: <1382021642.34.0.12937711156.issue19279@psf.upfronthosting.co.za> Matthew Barnett added the comment: The bytestring literal isn't valid. It starts with b" and later on has an unescaped " followed by more characters. Also, the usual way to decode by using the .decode method. I get this: >>> content = b"+1911\' rel=\'stylesheet\' type=\'text/css\' />\n>> content.decode("utf-7", "strict") Traceback (most recent call last): File "", line 1, in content.decode("utf-7", "strict") File "C:\Python33\lib\encodings\utf_7.py", line 12, in decode return codecs.utf_7_decode(input, errors, True) UnicodeDecodeError: 'utf7' codec can't decode bytes in position 0-5: partial character in shift sequence ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 17:07:30 2013 From: report at bugs.python.org (Guillaume Lebourgeois) Date: Thu, 17 Oct 2013 15:07:30 +0000 Subject: [issue19279] UTF-7 to UTF-8 decoding crash In-Reply-To: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> Message-ID: <1382022450.9.0.335199564648.issue19279@psf.upfronthosting.co.za> Guillaume Lebourgeois added the comment: My fault, bad paste. Should have written : >>> content = b'+1911\' rel=\'stylesheet\' type=\'text/css\' />\n", line 1, in SystemError: invalid maximum character passed to PyUnicode_New ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 17:13:00 2013 From: report at bugs.python.org (Guillaume Lebourgeois) Date: Thu, 17 Oct 2013 15:13:00 +0000 Subject: [issue19279] UTF-7 to UTF-8 decoding crash In-Reply-To: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> Message-ID: <1382022780.7.0.461777997677.issue19279@psf.upfronthosting.co.za> Guillaume Lebourgeois added the comment: "Also, the usual way to decode by using the .decode method." The original bug happened using requests library, so I have no leverage on the used method for decoding. But if you used the "replace" mode with your methodology, you would have raised the same Exception : >>> content = b'+1911\' rel=\'stylesheet\' type=\'text/css\' />\n", line 1, in File "/lib/python3.3/encodings/utf_7.py", line 12, in decode return codecs.utf_7_decode(input, errors, True) SystemError: invalid maximum character passed to PyUnicode_New ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 17:41:05 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 Oct 2013 15:41:05 +0000 Subject: [issue19279] UTF-7 to UTF-8 decoding crash In-Reply-To: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> Message-ID: <1382024465.03.0.558130402124.issue19279@psf.upfronthosting.co.za> Nick Coghlan added the comment: Indeed, 'utf-7' and the 'replace' error handler don't get along in this case. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 17:41:54 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 Oct 2013 15:41:54 +0000 Subject: [issue19279] UTF-7 to UTF-8 decoding crash In-Reply-To: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> Message-ID: <1382024514.57.0.646729302772.issue19279@psf.upfronthosting.co.za> Nick Coghlan added the comment: That is, I can locally reproduce the behaviour Guillaume describes on the latest tip build. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 17:46:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 17 Oct 2013 15:46:52 +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: <3d0vqp5sMTz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 51480f6428a5 by Nick Coghlan in branch 'default': Skip #16129 test until I debug cross-platform issues http://hg.python.org/cpython/rev/51480f6428a5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 17:49:08 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 Oct 2013 15:49:08 +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: <1382024948.94.0.528962279088.issue16129@psf.upfronthosting.co.za> Nick Coghlan added the comment: Buildbots weren't happy with the test case. I've done two extra commits (one to turn off the diff limit, then a second one to skip it entirely), so will hopefully be able to debug it and keep this in for the alpha. (Larry - FYI, I'll have this test fixed or the patch reverted before the alpha on the weekend) ---------- resolution: fixed -> stage: committed/rejected -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 17:52:11 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 Oct 2013 15:52:11 +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: <1382025131.46.0.760820650711.issue16129@psf.upfronthosting.co.za> Nick Coghlan added the comment: According to http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.x/builds/2716/steps/test/logs/stdio, output in the subprocess was fine, but for some reason sys.stdout.encoding and sys.stderr.encoding were None in the test itself o.O ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 17:57:14 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 Oct 2013 15:57:14 +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: <1382025434.32.0.361705603236.issue16129@psf.upfronthosting.co.za> Nick Coghlan added the comment: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.0%203.x/builds/579/steps/test/logs/stdio shows the same symptoms ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 18:04:52 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 Oct 2013 16:04:52 +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: <1382025892.26.0.0812306965216.issue16129@psf.upfronthosting.co.za> Nick Coghlan added the comment: Antoine pointed out this also needs a :versionadded: tag in the docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 18:13:19 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 Oct 2013 16:13:19 +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: <1382026399.26.0.797517110928.issue16129@psf.upfronthosting.co.za> Nick Coghlan added the comment: So reusing the run command from the buildbot still passed on my system. I thought using sys.stdout.encoding (etc) would reliably get me the default IO encoding, but it appears not :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 18:18:24 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 17 Oct 2013 16:18:24 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1382026704.73.0.0330787830237.issue19227@psf.upfronthosting.co.za> R. David Murray added the comment: I fixed the out of space last night. (Someday I'll get around to figuring out which test it is that is leaving a bunch of data around when it fails, but I haven't yet). I've installed strace and gdb on the bots, please send me your public key and I'll set up an ssh login for you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 18:29:57 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Oct 2013 16:29:57 +0000 Subject: [issue19279] UTF-7 to UTF-8 decoding crash In-Reply-To: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> Message-ID: <1382027397.52.0.585251334128.issue19279@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch for 3.3+. Other versions are affected too. They don't raise SystemError, but produce illegal unicode string on wide build. E.g. in Python 2.7: >>> 'a+/,+IKw-b'.decode('utf-7', 'replace') u'a\ufffd\U003f20acb' \U003f20ac is illegal code. As encoding and encoded data can come from external source, this can be used in secure attacks. ---------- keywords: +patch nosy: +barry, benjamin.peterson, georg.brandl, larry priority: normal -> release blocker stage: needs patch -> patch review type: crash -> security versions: +Python 2.6, Python 2.7, Python 3.2 Added file: http://bugs.python.org/file32156/utf7_errors.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 18:34:13 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Oct 2013 16:34:13 +0000 Subject: [issue18191] urllib2/urllib.parse.splitport does not handle IPv6 correctly In-Reply-To: <1370961879.5.0.532150427937.issue18191@psf.upfronthosting.co.za> Message-ID: <1382027653.9.0.113788286302.issue18191@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 18:35:25 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Oct 2013 16:35:25 +0000 Subject: [issue1644818] Allow built-in packages and submodules as well as top-level modules Message-ID: <1382027725.09.0.0358640524506.issue1644818@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 18:41:36 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Oct 2013 16:41:36 +0000 Subject: [issue16129] No good way to set 'PYTHONIOENCODING' when embedding python. In-Reply-To: <1382026399.26.0.797517110928.issue16129@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: You don't want to mention the return value (-1) on error in the doc? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 19:27:30 2013 From: report at bugs.python.org (Stefan Krah) Date: Thu, 17 Oct 2013 17:27:30 +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: <1382030850.32.0.626420948329.issue16129@psf.upfronthosting.co.za> Stefan Krah added the comment: Unfortunately the tests pass when I run them manually. On my FreeBSD bot thsi may be relevant: o LC_* is "C". o The filesystem encoding is ascii. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 19:34:03 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 17 Oct 2013 17:34:03 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1382031243.73.0.130008224972.issue19227@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > I fixed the out of space last night. (Someday I'll get around to figuring > out which test it is that is leaving a bunch of data around when it fails, > but I haven't yet). It looks like on the Debug Gentoo buildbot configure and clean are failing. http://buildbot.python.org/all/builders/x86%20Gentoo%203.x/builds/5090/steps/configure/logs/stdio http://buildbot.python.org/all/builders/x86%20Gentoo%203.x/builds/5090/steps/clean/logs/stdio > I've installed strace and gdb on the bots, please send me your public key > and I'll set up an ssh login for you. Thanks. For now I will just try starting gdb using subprocess on the custom buildbot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 19:41:06 2013 From: report at bugs.python.org (Georg Brandl) Date: Thu, 17 Oct 2013 17:41:06 +0000 Subject: [issue19278] zlib compressobj: expose missing knobs In-Reply-To: <1381997187.57.0.66132821735.issue19278@psf.upfronthosting.co.za> Message-ID: <1382031666.21.0.67639840011.issue19278@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks for the suggestion; the parameters have already been added in Python 3.3, see http://docs.python.org/3/library/zlib.html#zlib.compressobj. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 19:46:46 2013 From: report at bugs.python.org (Georg Brandl) Date: Thu, 17 Oct 2013 17:46:46 +0000 Subject: [issue19278] zlib compressobj: expose missing knobs In-Reply-To: <1381997187.57.0.66132821735.issue19278@psf.upfronthosting.co.za> Message-ID: <1382032005.99.0.253236962058.issue19278@psf.upfronthosting.co.za> Georg Brandl added the comment: Actually, compressobj() has always supported up to five arguments (named level, method, wbits, memlevel, strategy); I'll document this for 2.7 for issue 19277. The new thing in 3.3 are support for keyword arguments and the zdict parameter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 19:50:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 17 Oct 2013 17:50:30 +0000 Subject: [issue19277] zlib compressobj: missing parameter doc strings In-Reply-To: <1381996531.24.0.0813249128928.issue19277@psf.upfronthosting.co.za> Message-ID: <3d0yZS6zy9z7LjZ@mail.python.org> Roundup Robot added the comment: New changeset c54c8e71b79a by Georg Brandl in branch '2.7': Closes #19277: document all parameters of compressobj(). http://hg.python.org/cpython/rev/c54c8e71b79a ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 20:01:41 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 17 Oct 2013 18:01:41 +0000 Subject: [issue19277] zlib compressobj: missing parameter doc strings In-Reply-To: <1381996531.24.0.0813249128928.issue19277@psf.upfronthosting.co.za> Message-ID: <1382032901.73.0.254227373622.issue19277@psf.upfronthosting.co.za> R. David Murray added the comment: Hmm. Looks like the name of the temp files used by the failing test (which is in bsddb, by the way) have changed, so my delete command didn't delete them. So now /tmp is definitely clean, and the next build on that bot should work (crosses fingers). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 20:02:00 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 17 Oct 2013 18:02:00 +0000 Subject: [issue19277] zlib compressobj: missing parameter doc strings In-Reply-To: <1381996531.24.0.0813249128928.issue19277@psf.upfronthosting.co.za> Message-ID: <1382032920.15.0.432176856525.issue19277@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- Removed message: http://bugs.python.org/msg200151 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 20:02:14 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 17 Oct 2013 18:02:14 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1382032934.6.0.218624215696.issue19227@psf.upfronthosting.co.za> R. David Murray added the comment: Hmm. Looks like the name of the temp files used by the failing test (which is in bsddb, by the way) have changed, so my delete command didn't delete them. So now /tmp is definitely clean, and the next build on that bot should work (crosses fingers). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 20:13:16 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 17 Oct 2013 18:13:16 +0000 Subject: [issue18416] Move to absolute file paths for module.__file__ In-Reply-To: <1373400107.5.0.285657244525.issue18416@psf.upfronthosting.co.za> Message-ID: <1382033596.63.0.751719556353.issue18416@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 20:55:42 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Oct 2013 18:55:42 +0000 Subject: [issue19276] test_wave failing on PPC64 Linux In-Reply-To: <3d0lzM2kK5z7LjT@mail.python.org> Message-ID: <1382036142.02.0.266468851895.issue19276@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What are array.array('l').itemsize and array.array('i').itemsize on PPC64 Linux? I suppose that this patch should fix the wave module on 64-bit platforms. ---------- keywords: +patch stage: -> needs patch Added file: http://bugs.python.org/file32157/wave_ppc64.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 20:55:50 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Oct 2013 18:55:50 +0000 Subject: [issue19276] test_wave failing on PPC64 Linux In-Reply-To: <3d0lzM2kK5z7LjT@mail.python.org> Message-ID: <1382036150.79.0.647052330758.issue19276@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 21:01:55 2013 From: report at bugs.python.org (Stefan Krah) Date: Thu, 17 Oct 2013 19:01:55 +0000 Subject: [issue15237] Add capsule API to _decimal In-Reply-To: <1341136971.24.0.846129884923.issue15237@psf.upfronthosting.co.za> Message-ID: <1382036515.84.0.910879647968.issue15237@psf.upfronthosting.co.za> Stefan Krah added the comment: I've looked at this, and the question is: Do we really need a capsule API? All relevant symbols in _decimal start with Py* and shouldn't need to be static. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 21:06:58 2013 From: report at bugs.python.org (David Edelsohn) Date: Thu, 17 Oct 2013 19:06:58 +0000 Subject: [issue19276] test_wave failing on PPC64 Linux In-Reply-To: <3d0lzM2kK5z7LjT@mail.python.org> Message-ID: <1382036818.37.0.990331705105.issue19276@psf.upfronthosting.co.za> David Edelsohn added the comment: >>> import array >>> print array.array('l').itemsize 8 >>> print array.array('i').itemsize 4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 21:42:06 2013 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 17 Oct 2013 19:42:06 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1382038926.7.0.126390776592.issue19262@psf.upfronthosting.co.za> Guido van Rossum added the comment: Another day, another patch. I'd rather like to commit this (and then iterate as needed), it makes my workflow for porting to Windows a little easier. Larry??? ---------- Added file: http://bugs.python.org/file32158/asyncio8.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 21:57:36 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Oct 2013 19:57:36 +0000 Subject: [issue17087] Improve the repr for regular expression match objects In-Reply-To: <1359589982.45.0.929656950631.issue17087@psf.upfronthosting.co.za> Message-ID: <1382039856.49.0.81747523865.issue17087@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Well. Here is a patch. I have changed repr() a little. repr() now contains match type qualified name (_sre.SRE_Match). "groups" now equals len(m.groups()). "span" representation now contains a comma (as repr(m.span())). Raymond, Ezio, is it good to you? ---------- assignee: -> serhiy.storchaka Added file: http://bugs.python.org/file32159/sre_match_repr.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 21:59:05 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Oct 2013 19:59:05 +0000 Subject: [issue19276] test_wave failing on PPC64 Linux In-Reply-To: <3d0lzM2kK5z7LjT@mail.python.org> Message-ID: <1382039945.12.0.50689817293.issue19276@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you David. I suspected this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 21:59:33 2013 From: report at bugs.python.org (Larry Hastings) Date: Thu, 17 Oct 2013 19:59:33 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1382039973.62.0.69739026359.issue19262@psf.upfronthosting.co.za> Larry Hastings added the comment: Does it break anything? (Besides, possibly, itself?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 22:01:49 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 17 Oct 2013 20:01:49 +0000 Subject: [issue19276] test_wave failing on PPC64 Linux In-Reply-To: <3d0lzM2kK5z7LjT@mail.python.org> Message-ID: <1382040109.83.0.337226725156.issue19276@psf.upfronthosting.co.za> Antoine Pitrou added the comment: For the record, why would this patch fix the issue? test_wave works fine under other 64-bit platforms. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 22:05:31 2013 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 17 Oct 2013 20:05:31 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1382039973.62.0.69739026359.issue19262@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: It doesn't break anything AFAICT. (It's a pure addition except for one new extension module on Windows). However I just discovered that apparently regrtest doesn't automatically run tests in a subdirectory of the test package. I'm guessing I'll need to add some magic to test_asyncio/__init__.py. Any hints? On Thu, Oct 17, 2013 at 12:59 PM, Larry Hastings wrote: > > Larry Hastings added the comment: > > Does it break anything? (Besides, possibly, itself?) > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 22:05:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 17 Oct 2013 20:05:51 +0000 Subject: [issue19276] test_wave failing on PPC64 Linux In-Reply-To: <3d0lzM2kK5z7LjT@mail.python.org> Message-ID: <3d11b2360vz7Ll5@mail.python.org> Roundup Robot added the comment: New changeset 9d2605f24a86 by Serhiy Storchaka in branch '2.7': Issue #19276: Fixed the wave module on 64-bit big-endian platforms. http://hg.python.org/cpython/rev/9d2605f24a86 New changeset a1a4a527c699 by Serhiy Storchaka in branch '3.3': Issue #19276: Fixed the wave module on 64-bit big-endian platforms. http://hg.python.org/cpython/rev/a1a4a527c699 New changeset 7e8ad3084891 by Serhiy Storchaka in branch 'default': Issue #19276: Fixed the wave module on 64-bit big-endian platforms. http://hg.python.org/cpython/rev/7e8ad3084891 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 22:08:49 2013 From: report at bugs.python.org (Larry Hastings) Date: Thu, 17 Oct 2013 20:08:49 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1382040529.42.0.8278486539.issue19262@psf.upfronthosting.co.za> Larry Hastings added the comment: If its breakage is restricted to itself (and its tests) then you have my blessing to check it in. (Sorry, can't help you with the test expertise.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 22:09:35 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Oct 2013 20:09:35 +0000 Subject: [issue19276] test_wave failing on PPC64 Linux In-Reply-To: <3d0lzM2kK5z7LjT@mail.python.org> Message-ID: <1382040575.29.0.184480819125.issue19276@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Perhaps other 64-bit platforms are little-endian? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 22:42:49 2013 From: report at bugs.python.org (Adam Polkosnik) Date: Thu, 17 Oct 2013 20:42:49 +0000 Subject: [issue6839] zipfile can't extract file In-Reply-To: <1252094279.03.0.456295268952.issue6839@psf.upfronthosting.co.za> Message-ID: <1382042569.13.0.57904613909.issue6839@psf.upfronthosting.co.za> Adam Polkosnik added the comment: I've got bitten by a different variation of this bug. In my case the issue can be summarized by: zipfile.BadZipfile: File name in directory "Windows\TEMP\test.tmp" and header "C:\Windows\TEMP\test.tmp" differ. Attached is a patch for Python27/lib/zipfile.py. I understand that it might not be the best approach, but at least we just compare the filenames without caring much about those pesky paths preceding them. ---------- nosy: +apolkosnik versions: +Python 2.7 Added file: http://bugs.python.org/file32160/zipfile.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 22:42:53 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 17 Oct 2013 20:42:53 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1382042573.82.0.927254541777.issue19227@psf.upfronthosting.co.za> Richard Oudkerk added the comment: I finally have a gdb backtrace of a stuck child (started using os.fork() not multiprocessing): #1 0xb76194da in ?? () from /lib/libc.so.6 #2 0xb6d59755 in ?? () from /var/lib/buildslave/custom.murray-gentoo/build/build/lib.linux-i686-3.4-pydebug/_ssl.cpython-34dm.so #3 0xb6d628f0 in _fini () from /var/lib/buildslave/custom.murray-gentoo/build/build/lib.linux-i686-3.4-pydebug/_ssl.cpython-34dm.so #4 0xb770859b in ?? () from /lib/ld-linux.so.2 #5 0xb75502c7 in ?? () from /lib/libc.so.6 #6 0xb7550330 in exit () from /lib/libc.so.6 #7 0xb558f244 in ?? () from /lib/libncursesw.so.5 #8 0xb76e9f38 in fork () from /lib/libpthread.so.0 ---Type to continue, or q to quit---#9 0x08085f89 in posix_fork (self=0xb74da374, noargs=0x0) at ./Modules/posixmodule.c:5315 ... It looks as though fork() is indirectly calling something in _ssl.cpython-34dm.so which is not completing. So I guess this is pthread_atfork() related. But the child argument passed to pthread_atfork() should be NULL, so I don't really understand this: static int PySSL_RAND_atfork(void) { static int registered = 0; int retval; if (registered) return 0; retval = pthread_atfork(NULL, /* prepare */ PySSL_RAND_atfork_parent, /* parent */ NULL); /* child */ if (retval != 0) { PyErr_SetFromErrno(PyExc_OSError); return -1; } registered = 1; return 0; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 22:45:47 2013 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 17 Oct 2013 20:45:47 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1382042747.89.0.917671063138.issue19262@psf.upfronthosting.co.za> Guido van Rossum added the comment: OK, no more giant patches. It's checked in. I've also solved the regrtest issues by adding some code in __init__.py and __main__.py. I expect to iterate a bit over the next few days. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 22:46:18 2013 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 17 Oct 2013 20:46:18 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1382042778.21.0.359644903184.issue19262@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- keywords: +needs review -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 22:48:56 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 17 Oct 2013 20:48:56 +0000 Subject: [issue15237] Add capsule API to _decimal In-Reply-To: <1382036515.84.0.910879647968.issue15237@psf.upfronthosting.co.za> Message-ID: <52604D2E.4080806@egenix.com> Marc-Andre Lemburg added the comment: On 17.10.2013 21:01, Stefan Krah wrote: > > Stefan Krah added the comment: > > I've looked at this, and the question is: Do we really need a capsule > API? All relevant symbols in _decimal start with Py* and shouldn't > need to be static. You need a capsule in order to use the C API from other extension modules. See the datetime module for an example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 17 23:07:11 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 17 Oct 2013 21:07:11 +0000 Subject: [issue13146] Writing a pyc file is not atomic In-Reply-To: <1376598357.97.0.0847841116407.issue13146@psf.upfronthosting.co.za> Message-ID: <20131017170708.2e388534@anarchist> Barry A. Warsaw added the comment: On Aug 15, 2013, at 08:25 PM, Antoine Pitrou wrote: >Barry, do you still want to keep this issue open? I don't necessarily need to. We've patched the Ubuntu version to be safe, so I guess we'll just carry that delta along until 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 00:22:42 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 17 Oct 2013 22:22:42 +0000 Subject: [issue19275] test_site is failing on AMD64 Snow Leopard In-Reply-To: <1381977826.53.0.553154234488.issue19275@psf.upfronthosting.co.za> Message-ID: <3d14cX4qDDz7Ljf@mail.python.org> Roundup Robot added the comment: New changeset 510bf951210f by Ned Deily in branch 'default': Issue #19275: Fix test_site failure on OS X due to typo. http://hg.python.org/cpython/rev/510bf951210f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 00:37:01 2013 From: report at bugs.python.org (Ethan Furman) Date: Thu, 17 Oct 2013 22:37:01 +0000 Subject: [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1382049421.75.0.557517389544.issue17576@psf.upfronthosting.co.za> Ethan Furman added the comment: Where do we stand with this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 00:48:50 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 17 Oct 2013 22:48:50 +0000 Subject: [issue19275] test_site is failing on AMD64 Snow Leopard In-Reply-To: <1381977826.53.0.553154234488.issue19275@psf.upfronthosting.co.za> Message-ID: <1382050130.12.0.599686365167.issue19275@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the observation, Esa. The typo is now fixed and the test is no longer failing on OS X. ---------- nosy: +ned.deily resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 00:56:08 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Oct 2013 22:56:08 +0000 Subject: [issue19276] test_wave failing on PPC64 Linux In-Reply-To: <3d0lzM2kK5z7LjT@mail.python.org> Message-ID: <1382050568.35.0.0225259232006.issue19276@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Fixed. Thank you David for your report. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 01:04:11 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Oct 2013 23:04:11 +0000 Subject: [issue18919] Unify audio modules tests In-Reply-To: <1378293110.61.0.780572869606.issue18919@psf.upfronthosting.co.za> Message-ID: <1382051051.86.0.408603294946.issue18919@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you David. Fixed in issue19276. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 01:14:42 2013 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 17 Oct 2013 23:14:42 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1382051682.64.0.207792896219.issue1641@psf.upfronthosting.co.za> Guido van Rossum added the comment: Now asyncio/tulip has landed in the 3.4 stdlib, asyncore will be effectively obsolete starting 3.4 (even if we don't mark it so). Its presence is required for backwards compatibility, but that doesn't mean we should encourage people to keep using it by adding features. If you agree, please close this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 01:54:00 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 17 Oct 2013 23:54:00 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1382054040.87.0.363785952414.issue19227@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Actually, according to strace the call which blocks is futex(0xb7839454, FUTEX_WAIT_PRIVATE, 1, NULL ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 01:55:24 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 Oct 2013 23:55:24 +0000 Subject: [issue16129] No good way to set 'PYTHONIOENCODING' when embedding python. In-Reply-To: Message-ID: Nick Coghlan added the comment: On 18 Oct 2013 02:41, "STINNER Victor" wrote: > > > STINNER Victor added the comment: > > You don't want to mention the return value (-1) on error in the doc? I guess it should explicitly say any non-zero return value indicates an error rather than leaving that implied by the fact that zero indicates success. Something else occurred to me, though - this runs before Py_Initialize, and now I'm not sure all the API calls are valid in that context. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 01:58:17 2013 From: report at bugs.python.org (Alexander Boyd) Date: Thu, 17 Oct 2013 23:58:17 +0000 Subject: [issue19213] platform.linux_distribution detects Oracle Linux as Red Hat Enterprise Linux In-Reply-To: <1381353298.1.0.0482171871073.issue19213@psf.upfronthosting.co.za> Message-ID: <1382054297.7.0.939158232971.issue19213@psf.upfronthosting.co.za> Alexander Boyd added the comment: Yep, that fixes it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 03:09:10 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 18 Oct 2013 01:09:10 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <3d18K12v99z7Lk5@mail.python.org> Roundup Robot added the comment: New changeset 30f33e6a04c1 by Ned Deily in branch 'default': Issue #19262: Install asyncio and test_asyncio directories. http://hg.python.org/cpython/rev/30f33e6a04c1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 03:12:38 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 18 Oct 2013 01:12:38 +0000 Subject: [issue19213] platform.linux_distribution detects Oracle Linux as Red Hat Enterprise Linux In-Reply-To: <1381353298.1.0.0482171871073.issue19213@psf.upfronthosting.co.za> Message-ID: <1382058758.57.0.0171989929717.issue19213@psf.upfronthosting.co.za> R. David Murray added the comment: Based on Marc-Andre recommendation at the end of issue 11678, I plan to commit this as a bug fix, and add arch to 2.7 while I'm at it. Unless there are objections. ---------- nosy: +anikom15, eric.araujo, georg.brandl, pitrou, python-dev, terry.reedy versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 05:07:28 2013 From: report at bugs.python.org (Larry Hastings) Date: Fri, 18 Oct 2013 03:07:28 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1382065648.75.0.839843576906.issue16612@psf.upfronthosting.co.za> Larry Hastings added the comment: Attached is a patch against current trunk merging Argument Clinic. I already got the go-ahead to merge (took a poll in python-dev, got lots of +1s), but I still wanted to post it here to let it soak a little, even only if it's just a day. Unless something amazing happens I plan to merge about 24 hours from now. Ladies and gentlemen, fire up your Rietvelds! ---------- stage: needs patch -> patch review Added file: http://bugs.python.org/file32161/larry.clinic.patch.1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 08:05:32 2013 From: report at bugs.python.org (Larry Hastings) Date: Fri, 18 Oct 2013 06:05:32 +0000 Subject: [issue16612] Integrate "Argument Clinic" into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1382076332.14.0.798299040971.issue16612@psf.upfronthosting.co.za> Larry Hastings added the comment: Spelling corrections from Arfrever (thanks Arfrever!), and some eentsy teensy weentsy bugfixes from me. And with a dramatic new patch number just so everybody can keep it straight. ---------- title: Integrate "Argument Clinic" specialized preprocessor into CPython trunk -> Integrate "Argument Clinic" into CPython trunk Added file: http://bugs.python.org/file32162/larry.clinic.patch.5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 08:40:18 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Oct 2013 06:40:18 +0000 Subject: [issue5411] Add xz support to shutil In-Reply-To: <1236081386.1.0.884971889723.issue5411@psf.upfronthosting.co.za> Message-ID: <1382078418.97.0.412387861766.issue5411@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27723/shutil-lzma_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 08:41:32 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Oct 2013 06:41:32 +0000 Subject: [issue5411] Add xz support to shutil In-Reply-To: <1236081386.1.0.884971889723.issue5411@psf.upfronthosting.co.za> Message-ID: <1382078492.07.0.311321789957.issue5411@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Serhiy's patch needs a "versionchanged" or "versionadded" tag in the Docs. Done. ---------- Added file: http://bugs.python.org/file32163/shutil-lzma_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 09:07:13 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Oct 2013 07:07:13 +0000 Subject: [issue1575020] Request wave support > 16 bit samples Message-ID: <1382080033.01.0.750503356504.issue1575020@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Actually 24-bit samples are supported only on little-endian platforms (see issue19276). Here is simple patch which makes them supported on big-endian too. ---------- keywords: +patch resolution: out of date -> stage: committed/rejected -> patch review status: pending -> open versions: +Python 2.7, Python 3.3 Added file: http://bugs.python.org/file32164/wave_24bit.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 09:08:23 2013 From: report at bugs.python.org (Nick Guenther) Date: Fri, 18 Oct 2013 07:08:23 +0000 Subject: [issue10976] json.loads() raises TypeError on bytes object In-Reply-To: <1295636509.41.0.0138366952356.issue10976@psf.upfronthosting.co.za> Message-ID: <1382080103.4.0.312166947079.issue10976@psf.upfronthosting.co.za> Changes by Nick Guenther : ---------- nosy: +kousu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 09:09:21 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Oct 2013 07:09:21 +0000 Subject: [issue1575020] Request wave support > 16 bit samples Message-ID: <1382080161.65.0.917448614528.issue1575020@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And supporting the feature only on some platforms (without good reasons) is a bug. ---------- type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 09:28:05 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 18 Oct 2013 07:28:05 +0000 Subject: [issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors In-Reply-To: <1379289654.59.0.452504541982.issue19030@psf.upfronthosting.co.za> Message-ID: <3d1Jjq6ksQz7LjS@mail.python.org> Roundup Robot added the comment: New changeset 39b06c3fbe2e by Ethan Furman in branch 'default': Close #19030: inspect.getmembers and inspect.classify_class_attrs http://hg.python.org/cpython/rev/39b06c3fbe2e ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 09:30:31 2013 From: report at bugs.python.org (Sergey Dorofeev) Date: Fri, 18 Oct 2013 07:30:31 +0000 Subject: [issue10614] ZipFile: add a filename_encoding argument In-Reply-To: <1291362121.18.0.976785403189.issue10614@psf.upfronthosting.co.za> Message-ID: <1382081431.46.0.87355876622.issue10614@psf.upfronthosting.co.za> Sergey Dorofeev added the comment: I'd like to submit patch to support zip archives created on systems that use non-US codepage (e.g. russian CP866). Codepage would be specified in additional parameter of ZipFile constructor, named "codepage". If it is not specified, old behavior is preserved (use CP437). --- zipfile.py-orig 2013-09-18 16:45:56.000000000 +0400 +++ zipfile.py 2013-10-15 00:24:06.105157572 +0400 @@ -885,7 +885,7 @@ fp = None # Set here since __del__ checks it _windows_illegal_name_trans_table = None - def __init__(self, file, mode="r", compression=ZIP_STORED, allowZip64=False): + def __init__(self, file, mode="r", compression=ZIP_STORED, allowZip64=False, codepage='cp437'): """Open the ZIP file with mode read "r", write "w" or append "a".""" if mode not in ("r", "w", "a"): raise RuntimeError('ZipFile() requires mode "r", "w", or "a"') @@ -901,6 +901,7 @@ self.mode = key = mode.replace('b', '')[0] self.pwd = None self._comment = b'' + self.codepage = codepage # Check if we were passed a file-like object if isinstance(file, str): @@ -1002,7 +1003,7 @@ filename = filename.decode('utf-8') else: # Historical ZIP filename encoding - filename = filename.decode('cp437') + filename = filename.decode(self.codepage) # Create ZipInfo instance to store file information x = ZipInfo(filename) x.extra = fp.read(centdir[_CD_EXTRA_FIELD_LENGTH]) @@ -1157,7 +1158,7 @@ # UTF-8 filename fname_str = fname.decode("utf-8") else: - fname_str = fname.decode("cp437") + fname_str = fname.decode(self.codepage) if fname_str != zinfo.orig_filename: raise BadZipFile( ---------- nosy: +Sergey.Dorofeev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 09:38:55 2013 From: report at bugs.python.org (koobs) Date: Fri, 18 Oct 2013 07:38:55 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1382081935.34.0.202669049701.issue19262@psf.upfronthosting.co.za> koobs added the comment: There are 5 unique test failures that have come up in the koobs-freebsd* buildbots post the test_asyncio import. Would we prefer to create a meta issue to track them, or put them here? ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 09:39:31 2013 From: report at bugs.python.org (Ethan Furman) Date: Fri, 18 Oct 2013 07:39:31 +0000 Subject: [issue16938] pydoc confused by __dir__ In-Reply-To: <1357944129.98.0.501949279766.issue16938@psf.upfronthosting.co.za> Message-ID: <1382081971.2.0.888101272048.issue16938@psf.upfronthosting.co.za> Ethan Furman added the comment: This has been fixed in #19030: every good object will have a home class; non-good objects (the result of buggy __dir__, __getattribute__, or __getattr__ methods) will not be returned and so cannot confuse pydoc. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed superseder: -> inspect.getmembers and inspect.classify_class_attrs mishandle descriptors _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 09:41:51 2013 From: report at bugs.python.org (Ethan Furman) Date: Fri, 18 Oct 2013 07:41:51 +0000 Subject: [issue19281] add __objclass__ to the docs Message-ID: <1382082111.84.0.378259232568.issue19281@psf.upfronthosting.co.za> New submission from Ethan Furman: Currently __objclass__ is only documented in a ten-year old PEP. ---------- messages: 200190 nosy: eric.araujo, ethan.furman, ezio.melotti, georg.brandl priority: normal severity: normal status: open title: add __objclass__ to the docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 09:45:10 2013 From: report at bugs.python.org (Nick Guenther) Date: Fri, 18 Oct 2013 07:45:10 +0000 Subject: [issue19282] dbm is not a context manager Message-ID: <1382082310.98.0.0309554787542.issue19282@psf.upfronthosting.co.za> New submission from Nick Guenther: This code doesn't work. I think it should. import dbm with dbm.open("what is box.db", "c") as db: db["Bpoind"] = Boing Indeed, there is nothing supporting PEP 343 for dbm on my system: [kousu at galleon ~]$ grep -r __exit__ /usr/lib/python3.3/dbm [kousu at galleon ~]$ ---------- components: Library (Lib) messages: 200191 nosy: kousu priority: normal severity: normal status: open title: dbm is not a context manager versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 09:46:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 18 Oct 2013 07:46:13 +0000 Subject: [issue19272] Can't pickle lambda (while named functions are ok) In-Reply-To: <1381942596.3.0.421261732602.issue19272@psf.upfronthosting.co.za> Message-ID: <3d1K6l5jQwz7LjY@mail.python.org> Roundup Robot added the comment: New changeset d103ba56710e by Ethan Furman in branch 'default': Issue #19272: slight clarification of pickle docs with regard to lambda. http://hg.python.org/cpython/rev/d103ba56710e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 09:47:05 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Oct 2013 07:47:05 +0000 Subject: [issue10614] ZipFile: add a filename_encoding argument In-Reply-To: <1382081431.46.0.87355876622.issue10614@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Please rename codepage to encoding. By the way, 437 is a codepage, cp437 is a (python) encoding. I don't think that ZIP is limited to windows. I uncompressed zip files many times on various OSes, github also produces zip (and github is probably not using windows). And codepage term is only used on windows. Mac OS 9 users might produce mac roman filenames. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 09:49:33 2013 From: report at bugs.python.org (koobs) Date: Fri, 18 Oct 2013 07:49:33 +0000 Subject: [issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors In-Reply-To: <1379289654.59.0.452504541982.issue19030@psf.upfronthosting.co.za> Message-ID: <1382082573.57.0.782836360548.issue19030@psf.upfronthosting.co.za> koobs added the comment: Multiple test_pydoc failures found on koobs-freebsd* buildbots after 39b06c3fbe2e6ef78a540513d4b81f2d095d1e62 Attaching complete logs from both bots to this issue, will reference #16938 as well ---------- nosy: +koobs Added file: http://bugs.python.org/file32165/koobs-freebsd9-amd64-py3x-build183.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 09:50:10 2013 From: report at bugs.python.org (koobs) Date: Fri, 18 Oct 2013 07:50:10 +0000 Subject: [issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors In-Reply-To: <1379289654.59.0.452504541982.issue19030@psf.upfronthosting.co.za> Message-ID: <1382082610.57.0.101347422239.issue19030@psf.upfronthosting.co.za> Changes by koobs : Added file: http://bugs.python.org/file32166/koobs-freebsd10-amd64-py3x-build588.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 09:57:47 2013 From: report at bugs.python.org (Ethan Furman) Date: Fri, 18 Oct 2013 07:57:47 +0000 Subject: [issue19272] Can't pickle lambda (while named functions are ok) In-Reply-To: <1381942596.3.0.421261732602.issue19272@psf.upfronthosting.co.za> Message-ID: <1382083067.53.0.499719632111.issue19272@psf.upfronthosting.co.za> Ethan Furman added the comment: Added some clarification to the docs to make it clearer that lambda functions cannot be pickled. Facundo [1], if you want to pursue being able to pickle lambda functions please open an enhancement issue. Some of the questions that come to mind: 1) for a random name, where will the name be stored (I'm thinking a __pickle__ dict on the module)? 2) for pickling the code object itself, what are the ramifications (this is directly contrary to how pickle was designed) These questions should be discussed on PyDev, and will probably require a PEP. [1] or anyone else :) ---------- assignee: -> docs at python nosy: +docs at python resolution: -> invalid stage: -> committed/rejected status: open -> closed versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 09:59:45 2013 From: report at bugs.python.org (koobs) Date: Fri, 18 Oct 2013 07:59:45 +0000 Subject: [issue16938] pydoc confused by __dir__ In-Reply-To: <1357944129.98.0.501949279766.issue16938@psf.upfronthosting.co.za> Message-ID: <1382083185.55.0.147165423534.issue16938@psf.upfronthosting.co.za> koobs added the comment: Some test failures have cropped, I have attached buildbot logs and referenced them in #19030 ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 10:00:27 2013 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 18 Oct 2013 08:00:27 +0000 Subject: [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1382083227.91.0.392220647613.issue17576@psf.upfronthosting.co.za> Mark Dickinson added the comment: I still need to act on some of Serhiy's comments. I do plan to get this in for 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 10:22:35 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 18 Oct 2013 08:22:35 +0000 Subject: [issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors In-Reply-To: <1379289654.59.0.452504541982.issue19030@psf.upfronthosting.co.za> Message-ID: <3d1Kwj3GtZz7Ljm@mail.python.org> Roundup Robot added the comment: New changeset 02c9d26d231f by Ethan Furman in branch 'default': Issue #19030: special-cased __dict__ as the actual dict is not returned, a proxy is. http://hg.python.org/cpython/rev/02c9d26d231f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 11:08:35 2013 From: report at bugs.python.org (koobs) Date: Fri, 18 Oct 2013 09:08:35 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1382087315.49.0.385901495316.issue19262@psf.upfronthosting.co.za> koobs added the comment: Summary of 4 test failures below, will attach the complete buildbot logs for detail. ====================================================================== FAIL: test_call_later (test.test_asyncio.test_events.SelectEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/test_asyncio/test_events.py", line 241, in test_call_later self.assertTrue(0.09 <= t1-t0 <= 0.12, t1-t0) AssertionError: False is not true : 0.12008954107295722 ====================================================================== FAIL: test_signal_handling_args (test.test_asyncio.test_events.SelectEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/test_asyncio/test_events.py", line 468, in test_signal_handling_args self.assertEqual(caught, 1) AssertionError: 0 != 1 ====================================================================== FAIL: test_create_server_ssl (test.test_asyncio.test_events.KqueueEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/test_asyncio/test_events.py", line 626, in test_create_server_ssl self.assertEqual(3, proto.nbytes) AssertionError: 3 != 0 ====================================================================== Timeout (1:00:00)! Exception: Child error on test_asyncio: Exit code 1 ---------------------------------------------------------------------- ---------- Added file: http://bugs.python.org/file32198/koobs-freebsd9-py3x-build178.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 11:09:19 2013 From: report at bugs.python.org (koobs) Date: Fri, 18 Oct 2013 09:09:19 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1382087359.52.0.401568290972.issue19262@psf.upfronthosting.co.za> Changes by koobs : Added file: http://bugs.python.org/file32199/koobs-freebsd9-py3x-build180.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 11:09:42 2013 From: report at bugs.python.org (koobs) Date: Fri, 18 Oct 2013 09:09:42 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1382087382.33.0.872145845388.issue19262@psf.upfronthosting.co.za> Changes by koobs : Added file: http://bugs.python.org/file32200/koobs-freebsd9-py3x-build182.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 11:10:13 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Fri, 18 Oct 2013 09:10:13 +0000 Subject: [issue19282] dbm is not a context manager In-Reply-To: <1382082310.98.0.0309554787542.issue19282@psf.upfronthosting.co.za> Message-ID: <1382087413.2.0.777927534478.issue19282@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Working on a patch for this. ---------- nosy: +Claudiu.Popa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 11:16:50 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Oct 2013 09:16:50 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <1382087810.07.0.139358118727.issue12892@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Changed the documentation as was discussed with Ezio on IRC. Ezio, do you want commit this patch? Feel free to reword the documentation if you are feeling be better. ---------- Added file: http://bugs.python.org/file32201/utf_16_32_surrogates_6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 11:28:24 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Oct 2013 09:28:24 +0000 Subject: [issue19282] dbm is not a context manager In-Reply-To: <1382082310.98.0.0309554787542.issue19282@psf.upfronthosting.co.za> Message-ID: <1382088504.6.0.310339378692.issue19282@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> needs patch type: -> enhancement versions: -Python 3.1, Python 3.2, Python 3.3, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 11:36:45 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Oct 2013 09:36:45 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <1382089005.37.0.227902544792.issue12892@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file32201/utf_16_32_surrogates_6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 11:37:27 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Oct 2013 09:37:27 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <1382089047.75.0.61878714776.issue12892@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file32202/utf_16_32_surrogates_6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 11:39:56 2013 From: report at bugs.python.org (Stefan Krah) Date: Fri, 18 Oct 2013 09:39:56 +0000 Subject: [issue15237] Add capsule API to _decimal In-Reply-To: <52604D2E.4080806@egenix.com> Message-ID: <20131018093956.GA8774@sleipnir.bytereef.org> Stefan Krah added the comment: I believe you, but I'd like to understand why. :) It seems to me that a module and also PyInit_xxx() can be loaded portably. Say the handles to the module are cached somewhere after loading and initializing. I think this already happens in Python/dynload_shlib.c. Why can't another module use a slightly modified form of _PyImport_GetDynLoadFunc() to get any non-static function apart from PyInit_xxx() by re-using the cached handle? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 11:49:04 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 18 Oct 2013 09:49:04 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1382087315.49.0.385901495316.issue19262@psf.upfronthosting.co.za> Message-ID: <1278020598.90003920.1382089717017.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > ====================================================================== > FAIL: test_call_later > (test.test_asyncio.test_events.SelectEventLoopTests) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/test_asyncio/test_events.py", > line 241, in test_call_later > self.assertTrue(0.09 <= t1-t0 <= 0.12, t1-t0) > AssertionError: False is not true : 0.12008954107295722 This one is a classical timing issue. The test is too optimistic: many buildbots can be quite slow or loaded. Other timing tests in the stdlib allow for much more slack. (e.g. call_later with 0.5 and check that the resulting delay is between 0.4 and 1.0) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 12:02:10 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 18 Oct 2013 10:02:10 +0000 Subject: [issue15237] Add capsule API to _decimal In-Reply-To: <20131018093956.GA8774@sleipnir.bytereef.org> Message-ID: <5261072D.9030009@egenix.com> Marc-Andre Lemburg added the comment: On 18.10.2013 11:39, Stefan Krah wrote: > > Stefan Krah added the comment: > > I believe you, but I'd like to understand why. :) :-) > It seems to me that a module and also PyInit_xxx() can be loaded portably. > Say the handles to the module are cached somewhere after loading and > initializing. I think this already happens in Python/dynload_shlib.c. > > Why can't another module use a slightly modified form of _PyImport_GetDynLoadFunc() > to get any non-static function apart from PyInit_xxx() by re-using the cached > handle? This may work on Linux (and probably does if you use the right DL flags), but I don't think this works reliably or at all on other platforms such as Windows. Symbols from shared libs are not necessarily available to all other shared libraries in the same process. CObjects, which Capsules originate from, were added to address this problem in a portable way. It's the Python standard approach to "importing" C APIs from other extension modules. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 12:03:28 2013 From: report at bugs.python.org (Stefan Krah) Date: Fri, 18 Oct 2013 10:03:28 +0000 Subject: [issue18777] Cannot compile _ssl.c using openssl > 1.0 In-Reply-To: <1376890287.78.0.562230025847.issue18777@psf.upfronthosting.co.za> Message-ID: <1382090608.34.0.653461835615.issue18777@psf.upfronthosting.co.za> Stefan Krah added the comment: The hpux bot fails at the compile stage: http://buildbot.python.org/all/builders/IA64%20HP-UX%2011iv3%20%5BSB%5D%203.x/builds/2152/steps/compile/logs/stdio ld -b build/temp.hp-ux-B.11.31-ia64-3.4-pydebug/home/cpython/buildslave/3.x.snakebite-hpux11iv3-ia64-1/build/Modules/_ssl.o -L/usr/local/lib -lssl -lcrypto -o build/lib.hp-ux-B.11.31-ia64-3.4-pydebug/_ssl.so /usr/lib/hpux32/dld.so: Unsatisfied code symbol 'CRYPTO_THREADID_set_callback' in load module 'build/lib.hp-ux-B.11.31-ia64-3.4-pydebug/_ssl.so'. sh[5]: 7508 Killed *** Error exit code 137 ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 12:19:47 2013 From: report at bugs.python.org (Debarshi Goswami) Date: Fri, 18 Oct 2013 10:19:47 +0000 Subject: [issue19283] Need support to avoid Windows CRT compatibility issue. Message-ID: <1382091587.94.0.520470804942.issue19283@psf.upfronthosting.co.za> New submission from Debarshi Goswami: Some support is needed to avoid compatibility issues in different version of CRT in Windows. I have an application which embeds Python interpreter and the application is build on MSVC11, whereas I am using Python 3.3.2 which is build on MSVC10. I know there are some compatibility issues which are addressed in Issue10082 and Issue1003535. But even other Python APIs which uses FILE pointer inside are failing too. I tried the following things ? 1. PyRun_FileExFlags with MSVC11 FILE*. It crashes as expected. 2. PyRun_FileExFlags with MSVC10 FILE* using _Py_fopen() directly passing to it. It is also crashing whereas _Py_fopen() returns FILE* of MSVC10 type. 3. Py_CompileString() also crashes. I don?t know the reason, but here my application is not providing FILE* from outside. It uses FILE* of Python library which is of MSVC10 type. I did some investigation and found if I provide FILE* of MSVC10 type from my application in PyRun_File() or if I call Py_CompileString(), it crashes after parsing the file (I am not totally sure, but it seems to me). Here is the call stack ? python33.dll!PyUnicode_InternInPlace(_object * * p) Line 14220 C python33.dll!new_identifier(const char * n, compiling * c) Line 570 C python33.dll!alias_for_import_name(compiling * c, const _node * n, int store) Line 2808 C python33.dll!ast_for_import_stmt(compiling * c, const _node * n) Line 2892 C python33.dll!PyAST_FromNode(const _node * n, PyCompilerFlags * flags, const char * filename, _arena * arena) Line 724 C python33.dll!PyParser_ASTFromFile(_iobuf * fp, const char * filename, const char * enc, int start, char * ps1, char * ps2, PyCompilerFlags * flags, int * errcode, _arena * arena) Line 2124 C python33.dll!PyRun_FileExFlags(_iobuf * fp, const char * filename, int start, _object * globals, _object * locals, int closeit, PyCompilerFlags * flags) Line 1931 C It fails in PyDict_GetItem() call in PyUnicode_InternInPlace() function. Here is the snippet - /* It might be that the GetItem call fails even though the key is present in the dictionary, namely when this happens during a stack overflow. */ Py_ALLOW_RECURSION t = PyDict_GetItem(interned, s); Py_END_ALLOW_RECURSION I am not sure why PyDict_GetItem() is failing because of FILE*. It seems to me that Python is able to parse file provided successfully. I am initializing interpreter successfully and PyRun_String() API works fine. But I dont want to use PyRun_String() as it performs everything virtually and provide no debug support. ---------- components: Interpreter Core, Windows messages: 200238 nosy: debarshig priority: normal severity: normal status: open title: Need support to avoid Windows CRT compatibility issue. versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 12:21:15 2013 From: report at bugs.python.org (Debarshi Goswami) Date: Fri, 18 Oct 2013 10:21:15 +0000 Subject: [issue19283] Need support to avoid Windows CRT compatibility issue. In-Reply-To: <1382091587.94.0.520470804942.issue19283@psf.upfronthosting.co.za> Message-ID: <1382091675.72.0.0747403644494.issue19283@psf.upfronthosting.co.za> Debarshi Goswami added the comment: If any workaround is available. It is also fine. ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 12:32:06 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 18 Oct 2013 10:32:06 +0000 Subject: [issue19283] Need support to avoid Windows CRT compatibility issue. In-Reply-To: <1382091587.94.0.520470804942.issue19283@psf.upfronthosting.co.za> Message-ID: <1382092326.96.0.46136334879.issue19283@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The easy answer is: don't execute a script, import a module instead (and either do something at that module's top-level, or execute a function inside the module). Also, as for ABI issues, take a look at: http://docs.python.org/3.3/c-api/stable.html ---------- nosy: +loewis, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 12:32:53 2013 From: report at bugs.python.org (Piotr Dobrogost) Date: Fri, 18 Oct 2013 10:32:53 +0000 Subject: [issue19279] UTF-7 to UTF-8 decoding crash In-Reply-To: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> Message-ID: <1382092373.45.0.718796045281.issue19279@psf.upfronthosting.co.za> Changes by Piotr Dobrogost : ---------- nosy: +piotr.dobrogost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 12:45:46 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Fri, 18 Oct 2013 10:45:46 +0000 Subject: [issue19282] dbm is not a context manager In-Reply-To: <1382082310.98.0.0309554787542.issue19282@psf.upfronthosting.co.za> Message-ID: <1382093146.02.0.457351649135.issue19282@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Here's a patch. ---------- keywords: +patch Added file: http://bugs.python.org/file32203/dbm.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 14:02:36 2013 From: report at bugs.python.org (Debarshi Goswami) Date: Fri, 18 Oct 2013 12:02:36 +0000 Subject: [issue19283] Need support to avoid Windows CRT compatibility issue. In-Reply-To: <1382091587.94.0.520470804942.issue19283@psf.upfronthosting.co.za> Message-ID: <1382097756.26.0.425042734032.issue19283@psf.upfronthosting.co.za> Debarshi Goswami added the comment: My question is, even a FILE* of MSVC10 type is provided, why these APIs are crashing, after all it expects MSVC10 type. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 14:10:54 2013 From: report at bugs.python.org (koobs) Date: Fri, 18 Oct 2013 12:10:54 +0000 Subject: [issue13405] Add DTrace probes In-Reply-To: <1321299726.66.0.343368151185.issue13405@psf.upfronthosting.co.za> Message-ID: <1382098254.62.0.691695295221.issue13405@psf.upfronthosting.co.za> Changes by koobs : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 14:26:42 2013 From: report at bugs.python.org (koobs) Date: Fri, 18 Oct 2013 12:26:42 +0000 Subject: [issue13405] Add DTrace probes In-Reply-To: <1321299726.66.0.343368151185.issue13405@psf.upfronthosting.co.za> Message-ID: <1382099202.02.0.65096294646.issue13405@psf.upfronthosting.co.za> koobs added the comment: Marc, you just reminded me I need to ask antoine to re-create the custom DTrace builder that passes --with-dtrace, thanks :) I've been keeping both of the FreeBSD (9.x and 10.x) buildslaves as close to HEAD as possible with frequent world updates, which have been receiving a lot of DTrace love lately. I also note your follow-up on the PR you submitted, if I can help you or Jes?s make progress on this, don't hesitate to let me know. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 14:33:53 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 18 Oct 2013 12:33:53 +0000 Subject: [issue19284] subprocess._args_from_interpreter_flags() mishandles -R Message-ID: <1382099633.49.0.620998143192.issue19284@psf.upfronthosting.co.za> New submission from Nick Coghlan: Trying to provoke the buildbot failure from issue 16129 I was puzzled as to why setting PYTHONHASHSEED was behaving strangely. The subprocess._args_from_interpreter_flags() helper used by test.support (and multiprocessing) misbehaves when PYTHONHASHSEED is set to a specific value: whatever the seed is, it repeats the 'R' in -R that many times (the helper appears to assume that the only flag with a value greater than 1 will be '-v') ---------- components: Tests keywords: buildbot messages: 200244 nosy: ncoghlan priority: normal severity: normal status: open title: subprocess._args_from_interpreter_flags() mishandles -R versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 14:34:34 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 18 Oct 2013 12:34:34 +0000 Subject: [issue19284] subprocess._args_from_interpreter_flags() mishandles -R In-Reply-To: <1382099633.49.0.620998143192.issue19284@psf.upfronthosting.co.za> Message-ID: <1382099674.17.0.505177432525.issue19284@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'll deal with this as part of getting issue 16129 sorted out. ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 14:40:42 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 18 Oct 2013 12:40:42 +0000 Subject: [issue19284] subprocess._args_from_interpreter_flags() mishandles -R In-Reply-To: <1382099633.49.0.620998143192.issue19284@psf.upfronthosting.co.za> Message-ID: <3d1RfX1mCFz7LjS@mail.python.org> Roundup Robot added the comment: New changeset 0ba7280545fe by Nick Coghlan in branch 'default': Close #19284: Handle -R properly in flag helper http://hg.python.org/cpython/rev/0ba7280545fe ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 14:41:50 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 18 Oct 2013 12:41:50 +0000 Subject: [issue13405] Add DTrace probes In-Reply-To: <1382099202.02.0.65096294646.issue13405@psf.upfronthosting.co.za> Message-ID: <2098762821.90471748.1382100082452.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > Marc, you just reminded me I need to ask antoine to re-create the > custom DTrace builder that passes --with-dtrace, thanks :) Well, I don't think it makes a lot of sense to re-create it, until DTrace support is integrated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 14:48:08 2013 From: report at bugs.python.org (koobs) Date: Fri, 18 Oct 2013 12:48:08 +0000 Subject: [issue13405] Add DTrace probes In-Reply-To: <1321299726.66.0.343368151185.issue13405@psf.upfronthosting.co.za> Message-ID: <1382100488.05.0.985672453075.issue13405@psf.upfronthosting.co.za> koobs added the comment: antoine, is it possible test/pass --with-dtrace on a buildbot without including it in the master build configuration? If not, I'm happy to create a special (dedicated) slave for Jes?s so he can continue to test his branch at leisure without messing up the existing slave configurations. That will also remove the dependency on me, and our inconvenient timezone overlap for communication :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 15:13:18 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 18 Oct 2013 13:13:18 +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: <3d1SNY42d4zPb6@mail.python.org> Roundup Robot added the comment: New changeset 12d7b6171b28 by Nick Coghlan in branch 'default': Issue #16129: Py_SetStandardStreamEncoding cleanups http://hg.python.org/cpython/rev/12d7b6171b28 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 15:17:20 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 18 Oct 2013 13:17:20 +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: <1382102240.33.0.159860057608.issue16129@psf.upfronthosting.co.za> Nick Coghlan added the comment: I dealt with the comments folks made here and on python-dev regarding the docs and the limited API, as well as the fact it isn't safe to call PyErr_NoMemory() when this function fails. However, I still haven't been able to reproduce the failure seen on the buildbots. It isn't a simple cross-test interference problem, as I tried the randomization seed from the Ubuntu log and that still passed for me. I'm still trying the seed from Stefan's FreeBSD system, but I expect that will be clean here as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 15:36:34 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 18 Oct 2013 13:36:34 +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: <1382103394.77.0.201610695812.issue16129@psf.upfronthosting.co.za> Nick Coghlan added the comment: (As expected, the original FreeBSD randomization seed passed here without any problems) Before I disabled the test completely, I did a run with full error diffs enabled. Here's the FreeBSD log with full diffs: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.0%203.x/builds/580/steps/test/logs/stdio This indicates both "{0.stdout.encoding}" and "{0.stdout.encoding}" produced the string "None" in the formatting operation that creates the expected output. The Ubuntu run exhibits the same behaviour: http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.x/builds/2717/steps/test/logs/stdio Note that on both symptoms, the later run passes without a problem, and (aside from the full diff being enabled the second time), the symptoms were identical (further pushing against a cross-test compatibility problem). And the full gory list of failed logs with this error and the full diffs: http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%203.x/builds/6502/steps/test/logs/stdio http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.x/builds/170/steps/test/logs/stdio http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%203.x/builds/5175/steps/test/logs/stdio http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%203.x/builds/5508/steps/test/logs/stdio http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/8767/steps/test/logs/stdio I couldn't find a full diff failure for this one, but this log has the truncated diff: http://buildbot.python.org/all/builders/PPC64%20PowerLinux%203.x/builds/861/steps/test/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 15:44:25 2013 From: report at bugs.python.org (Stefan Krah) Date: Fri, 18 Oct 2013 13:44:25 +0000 Subject: [issue16129] No good way to set 'PYTHONIOENCODING' when embedding python. In-Reply-To: <1382103394.77.0.201610695812.issue16129@psf.upfronthosting.co.za> Message-ID: <20131018134426.GA29113@sleipnir.bytereef.org> Stefan Krah added the comment: A test order problem is indeed unlikely: I ran the tests as the buildbot user with the same random seed and they passed. Let's blame the buildbot software. ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 15:47:06 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Oct 2013 13:47:06 +0000 Subject: [issue19279] UTF-7 to UTF-8 decoding crash In-Reply-To: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> Message-ID: <1382104026.49.0.0595027057551.issue19279@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And here is a patch for 2.7. ---------- Added file: http://bugs.python.org/file32204/utf7_errors-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 15:47:56 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 18 Oct 2013 13:47:56 +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: <1382104076.89.0.502714823664.issue16129@psf.upfronthosting.co.za> Nick Coghlan added the comment: Larry - I'm kinda stumped on this one. I'm not sure how to debug the failure on the buildbots, because, as Victor said, sys.stdout/err having an encoding attribute of None *isn't* supposed to happen, so the test should be fine as it stands. And nobody has been able to reproduce the problem on a direct run. It's probably OK to leave the test disabled for the alpha (since even the failures show that *this* feature was working correctly, it was the test case itself that was breaking). While I just noticed my RHEL buildbot hit the failure as well, Stefan's inability to reproduce the problem on his FreeBSD system suggests that isn't likely to help: http://buildbot.python.org/all/builders/x86%20RHEL%206%203.x/builds/2871/steps/test/logs/stdio (And /facepalm moment, I just realised all my testing tonight has been pointless, because I forgot to remove the skip decorator from the offending test...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 15:49:15 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 18 Oct 2013 13:49:15 +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: <1382104155.69.0.163015544343.issue16129@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +larry priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 15:57:40 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 18 Oct 2013 13:57:40 +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: <1382104660.5.0.140846744098.issue16129@psf.upfronthosting.co.za> Nick Coghlan added the comment: Ah, that got it: LC_ALL=C ./python -m test -W test_capi => boom :) And, of course it's a StringIO object at that point... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 16:00:11 2013 From: report at bugs.python.org (Stefan Krah) Date: Fri, 18 Oct 2013 14:00:11 +0000 Subject: [issue15237] Add capsule API to _decimal In-Reply-To: <5261072D.9030009@egenix.com> Message-ID: <20131018140013.GA29168@sleipnir.bytereef.org> Stefan Krah added the comment: Marc-Andre Lemburg wrote: > This may work on Linux (and probably does if you use the right > DL flags), but I don't think this works reliably or at all on other > platforms such as Windows. Symbols from shared libs are not necessarily > available to all other shared libraries in the same process. Thanks. On Linux the scheme works (I stored the DLL handle in the PyModuleObject and added a function PyModule_GetSymbol()). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 16:01:09 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 18 Oct 2013 14:01:09 +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: <3d1TRM2Mfkz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset 4af20969c592 by Nick Coghlan in branch 'default': Issue #16129: this should appease the buildbots http://hg.python.org/cpython/rev/4af20969c592 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 16:01:43 2013 From: report at bugs.python.org (Larry Hastings) Date: Fri, 18 Oct 2013 14:01:43 +0000 Subject: [issue16612] Integrate "Argument Clinic" into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1382104903.34.0.638210890139.issue16612@psf.upfronthosting.co.za> Larry Hastings added the comment: Incorporated suggestions from Antoine and Berker Peksag. Thanks! ---------- Added file: http://bugs.python.org/file32205/larry.clinic.patch.6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 16:03:05 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 18 Oct 2013 14:03:05 +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: <1382104985.02.0.345657065574.issue16129@psf.upfronthosting.co.za> Nick Coghlan added the comment: So, does that mean "asked the release manager for a ruling" is the buildbot debugging equivalent of "threatened it with tech support?" :) ---------- priority: release blocker -> normal resolution: -> fixed stage: needs patch -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 16:04:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Oct 2013 14:04:52 +0000 Subject: [issue17429] platform.platform() can throw Unicode error In-Reply-To: <1363360110.07.0.662014346708.issue17429@psf.upfronthosting.co.za> Message-ID: <1382105092.2.0.479176354655.issue17429@psf.upfronthosting.co.za> STINNER Victor added the comment: Ping myself, I just installed Fedora 19 and I cannot run the Python test suite with the ASCII locale encoding, because of this bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 16:06:29 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Oct 2013 14:06:29 +0000 Subject: [issue17221] Resort Misc/NEWS In-Reply-To: <1361135741.75.0.253129131493.issue17221@psf.upfronthosting.co.za> Message-ID: <1382105189.15.0.0248432867634.issue17221@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 16:17:54 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 18 Oct 2013 14:17:54 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1382105874.25.0.830213261631.issue19262@psf.upfronthosting.co.za> Guido van Rossum added the comment: @Koobs: I'll look into these, but in the future it's better to report bugs "upstream" for now, i.e. at http://code.google.com/p/tulip/ -- they will get my immediate attention. @Antoine: while most of the timing-related tests use a simulated clock, there are still some that must use real time. I'll fix them as needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 16:23:16 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 18 Oct 2013 14:23:16 +0000 Subject: [issue19216] stat cache for import bootstrap In-Reply-To: <1381404050.43.0.806301244574.issue19216@psf.upfronthosting.co.za> Message-ID: <1382106196.13.0.721447954464.issue19216@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: brett.cannon -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 16:23:34 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 18 Oct 2013 14:23:34 +0000 Subject: [issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder In-Reply-To: <1377182986.55.0.892405433608.issue18810@psf.upfronthosting.co.za> Message-ID: <1382106214.13.0.676096455221.issue18810@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 16:31:17 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 18 Oct 2013 14:31:17 +0000 Subject: [issue12837] Patch for issue #12810 removed a valid check on socket ancillary data In-Reply-To: <1314223005.88.0.145323709249.issue12837@psf.upfronthosting.co.za> Message-ID: <1382106677.46.0.556248807133.issue12837@psf.upfronthosting.co.za> Brett Cannon added the comment: Attached is a patch that silences the warning for just the 'if' statement under Clang using pragmas. I don't know if we have ever had it out on python-dev on our view of using pragmas, but this seems like a reasonable place to use it. ---------- Added file: http://bugs.python.org/file32206/pragma.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 16:33:18 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 18 Oct 2013 14:33:18 +0000 Subject: [issue19279] UTF-7 to UTF-8 decoding crash In-Reply-To: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> Message-ID: <1382106798.34.0.881425573677.issue19279@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: 2.6.9 doesn't produce a SystemError afaict: Python 2.6.9rc1+ (unknown, Oct 18 2013, 10:29:22) [GCC 4.4.3] on linux3 Type "help", "copyright", "credits" or "license" for more information. >>> content = b'+1911\' rel=\'stylesheet\' type=\'text/css\' />\n\n _______________________________________ From report at bugs.python.org Fri Oct 18 17:06:05 2013 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 18 Oct 2013 15:06:05 +0000 Subject: [issue18606] Add statistics module to standard library In-Reply-To: <1375258820.22.0.0684222529612.issue18606@psf.upfronthosting.co.za> Message-ID: <1382108765.8.0.699466899862.issue18606@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Here is the updated version which I hope is not too late for alpha 4. Main changes: * sum is now private * docstrings have been simplified and shrunk somewhat * I have a draft .rst file, however I'm having trouble getting Sphinx working on my system and I have no idea whether the reST is working. ---------- Added file: http://bugs.python.org/file32207/statistics.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 17:16:12 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 18 Oct 2013 15:16:12 +0000 Subject: [issue16662] load_tests not invoked in package/__init__.py In-Reply-To: <1355217291.85.0.41912767842.issue16662@psf.upfronthosting.co.za> Message-ID: <1382109372.85.0.61930986215.issue16662@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: The failure in test_discovery.py is odd. It's failing because loadTestsFromModule() is being passed a keyword arguemnt use_load_tests=False. On the surface, the failure makes sense because if you look in test_discover.py, it's defining a lambda for loader.loadTestsFromModule that takes only one argument, the module name. But the deeper question is why self.loadTestsFromModule() is being passed use_load_tests=False? loadTestsFromModule() is documented to take *only* the module name: http://docs.python.org/3/library/unittest.html#unittest.TestLoader.loadTestsFromModule But then if you look at loader.py, loadTestsFromModule does indeed take an undocumented use_load_tests keyword argument. So it seems like there's two problems here. use_load_tests is undocumented, and the lambda in test_discovery.py should take that keyword argument. Michael, can you weigh in on this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 17:18:10 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 18 Oct 2013 15:18:10 +0000 Subject: [issue16662] load_tests not invoked in package/__init__.py In-Reply-To: <1355217291.85.0.41912767842.issue16662@psf.upfronthosting.co.za> Message-ID: <1382109490.38.0.667940172149.issue16662@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: On the second failure, the expected output just needs to be updated. Is that the right thing to do? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 17:26:51 2013 From: report at bugs.python.org (David Edelsohn) Date: Fri, 18 Oct 2013 15:26:51 +0000 Subject: [issue19276] test_wave failing on PPC64 Linux In-Reply-To: <3d0lzM2kK5z7LjT@mail.python.org> Message-ID: <1382110011.69.0.318436068825.issue19276@psf.upfronthosting.co.za> David Edelsohn added the comment: Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 17:31:32 2013 From: report at bugs.python.org (Michael Foord) Date: Fri, 18 Oct 2013 15:31:32 +0000 Subject: [issue16662] load_tests not invoked in package/__init__.py In-Reply-To: <1355217291.85.0.41912767842.issue16662@psf.upfronthosting.co.za> Message-ID: <1382110292.98.0.35055777157.issue16662@psf.upfronthosting.co.za> Michael Foord added the comment: use_load_tests was deliberately undocumented. IIRC it only exists to allow us to load tests from a package module (__init__.py) without invoking load_tests - it maybe that it can just go away altogether now. I'll need to look at the code to confirm. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 17:33:43 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Oct 2013 15:33:43 +0000 Subject: [issue19274] make zipfile.PyZipFile more usable In-Reply-To: <1381959832.11.0.559988604291.issue19274@psf.upfronthosting.co.za> Message-ID: <1382110423.45.0.804893087876.issue19274@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't think this is needed. You can walk a tree and call writepy() for files and directories which you want. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 17:39:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 18 Oct 2013 15:39:43 +0000 Subject: [issue18416] Move to absolute file paths for module.__file__ In-Reply-To: <1373400107.5.0.285657244525.issue18416@psf.upfronthosting.co.za> Message-ID: <3d1WdV3hpcz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset 76184b5339f2 by Brett Cannon in branch 'default': Issue #18416: Have importlib.machinery.PathFinder treat '' as the cwd http://hg.python.org/cpython/rev/76184b5339f2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 17:41:11 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 18 Oct 2013 15:41:11 +0000 Subject: [issue18416] Move to absolute file paths for module.__file__ In-Reply-To: <1373400107.5.0.285657244525.issue18416@psf.upfronthosting.co.za> Message-ID: <1382110871.65.0.561226610252.issue18416@psf.upfronthosting.co.za> Brett Cannon added the comment: I went with option 1 (changed PathFinder to consider '' the cwd) which allowed me to flat-out remove the special-casing for '' in FileFinder. Thanks for the initial patch, Madison! ---------- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 17:42:02 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 18 Oct 2013 15:42:02 +0000 Subject: [issue19170] telnetlib: use selectors In-Reply-To: <1380978969.74.0.714959132131.issue19170@psf.upfronthosting.co.za> Message-ID: <1382110922.11.0.370869656617.issue19170@psf.upfronthosting.co.za> Changes by Charles-Fran?ois Natali : ---------- nosy: +haypo, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 17:49:40 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 18 Oct 2013 15:49:40 +0000 Subject: [issue18716] Deprecate the formatter module In-Reply-To: <1376334968.93.0.863346638514.issue18716@psf.upfronthosting.co.za> Message-ID: <1382111380.52.0.0129690599422.issue18716@psf.upfronthosting.co.za> Brett Cannon added the comment: Documented in f1fde6ef92e2 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 17:56:02 2013 From: report at bugs.python.org (Christian Tismer) Date: Fri, 18 Oct 2013 15:56:02 +0000 Subject: [issue19274] make zipfile.PyZipFile more usable In-Reply-To: <1381959832.11.0.559988604291.issue19274@psf.upfronthosting.co.za> Message-ID: <1382111762.24.0.289857159795.issue19274@psf.upfronthosting.co.za> Christian Tismer added the comment: @serhiy.storchaka > I don't think this is needed. You can walk a tree and call writepy() > for files and directories which you want. What exactly do mean by "this" and "needed"? I cannot see the connection of my initial post and your reply. Running PyZipFile on a package dir of the standard lib _does_ traverse the tree, and there is no way to stop it from doing that. That was the whole point of the issue. Please correct me if I'm missing something. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 18:01:35 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 18 Oct 2013 16:01:35 +0000 Subject: [issue18416] Move to absolute file paths for module.__file__ In-Reply-To: <1373400107.5.0.285657244525.issue18416@psf.upfronthosting.co.za> Message-ID: <3d1X6L1Q8rzSkd@mail.python.org> Roundup Robot added the comment: New changeset 33844153cd02 by Brett Cannon in branch 'default': Issue #18416: Fix various os calls in importlib.machinery.FileFinder http://hg.python.org/cpython/rev/33844153cd02 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 18:17:11 2013 From: report at bugs.python.org (Georg Brandl) Date: Fri, 18 Oct 2013 16:17:11 +0000 Subject: [issue18606] Add statistics module to standard library In-Reply-To: <1375258820.22.0.0684222529612.issue18606@psf.upfronthosting.co.za> Message-ID: <1382113031.27.0.474159082955.issue18606@psf.upfronthosting.co.za> Georg Brandl added the comment: The rst file is missing from your patch. I already posted a patch with statistics.rst five days ago. I have no idea why you ignored it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 18:34:19 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Oct 2013 16:34:19 +0000 Subject: [issue19274] make zipfile.PyZipFile more usable In-Reply-To: <1381959832.11.0.559988604291.issue19274@psf.upfronthosting.co.za> Message-ID: <1382114059.84.0.49880913133.issue19274@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: "this" is a filter function. "Not needed" means that you can got what you want without adding a filter function to zipfile.PyZipFile. Just don't call writepy() on directories which contains files which shouldn't be zipped. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 18:49:02 2013 From: report at bugs.python.org (Stefan Krah) Date: Fri, 18 Oct 2013 16:49:02 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1382114942.31.0.595903793809.issue19262@psf.upfronthosting.co.za> Stefan Krah added the comment: The --without-threads buildbot fails, so I guess all tests need to be skipped in that case: http://buildbot.python.org/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/5333/steps/test/logs/stdio ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 18:54:01 2013 From: report at bugs.python.org (Zachary Ware) Date: Fri, 18 Oct 2013 16:54:01 +0000 Subject: [issue19229] operator.py: move the Python implementation in the else block of try/except ImportError In-Reply-To: <1381535351.94.0.0685942795619.issue19229@psf.upfronthosting.co.za> Message-ID: <1382115241.74.0.0458151035311.issue19229@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 19:20:23 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 18 Oct 2013 17:20:23 +0000 Subject: [issue17759] test_urllibnet.test_bad_address() fails on Ubuntu 13.04 In-Reply-To: <1366120788.32.0.41011359208.issue17759@psf.upfronthosting.co.za> Message-ID: <1382116823.14.0.0648567923112.issue17759@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I'm going to close this as invalid: Python 3.3.2+ (3.3:247344a0d12e, Oct 18 2013, 13:14:59) [GCC 4.8.1] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from socket import * >>> gethostbyname('in.val.id') Traceback (most recent call last): File "", line 1, in socket.gaierror: [Errno -5] No address associated with hostname Same goes for 2.7 and 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 19:20:40 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 18 Oct 2013 17:20:40 +0000 Subject: [issue17759] test_urllibnet.test_bad_address() fails on Ubuntu 13.04 In-Reply-To: <1366120788.32.0.41011359208.issue17759@psf.upfronthosting.co.za> Message-ID: <1382116840.32.0.911437394856.issue17759@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 19:20:37 2013 From: report at bugs.python.org (Zachary Ware) Date: Fri, 18 Oct 2013 17:20:37 +0000 Subject: [issue19259] Provide Python implementation of operator.compare_digest() In-Reply-To: <1381750256.83.0.263124716214.issue19259@psf.upfronthosting.co.za> Message-ID: <1382116837.94.0.0798724056162.issue19259@psf.upfronthosting.co.za> Zachary Ware added the comment: Even after reading through #15061, I still wonder why _compare_digest is in _operator at all. It makes even less sense to me to put a Python implementation in operator; shouldn't the Python implementation be in the module that actually uses it? Branching from the recent discussion[1] about where to place a PBKDF2 wrapper, it would make the most sense to me to move hmac into hashlib as suggested and move _compare_digest into hashlib's C somewhere. For the record, the reason I didn't try to implement a _compare_digest in operator.py in the first place was because #15061 made it pretty clear that operator.c was just a convenient place to stick the function, not that it was supposed to actually be part of the operator module. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 19:20:28 2013 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 18 Oct 2013 17:20:28 +0000 Subject: [issue18606] Add statistics module to standard library In-Reply-To: <1375258820.22.0.0684222529612.issue18606@psf.upfronthosting.co.za> Message-ID: <1382116828.1.0.613896627811.issue18606@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Georg Brandl wrote: > The rst file is missing from your patch. Oops! Sorry about that. Fixed now. > I already posted a patch with statistics.rst five days ago. > I have no idea why you ignored it. I'm sorry if I stepped on your toes, but I didn't ignore your patch. If I've failed to follow the right procedure, it is due to inexperience, not malice. You yourself suggested it was only a temporary version just good enough to get the module committed, and in any case, it was already out of date since I've made sum private. ---------- Added file: http://bugs.python.org/file32208/statistics.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 19:21:39 2013 From: report at bugs.python.org (Zachary Ware) Date: Fri, 18 Oct 2013 17:21:39 +0000 Subject: [issue19259] Provide Python implementation of operator.compare_digest() In-Reply-To: <1381750256.83.0.263124716214.issue19259@psf.upfronthosting.co.za> Message-ID: <1382116899.58.0.799638873619.issue19259@psf.upfronthosting.co.za> Zachary Ware added the comment: Oops, forgot to provide the [1] link... [1] https://mail.python.org/pipermail/python-dev/2013-October/129477.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 19:22:07 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 18 Oct 2013 17:22:07 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1382116927.94.0.872228190238.issue19262@psf.upfronthosting.co.za> Guido van Rossum added the comment: Maybe adding something that returns [] from suite() if therea re no threads in test/test_asyncio/__init__.py would help? I don't have time to test this, but go ahead and commit something if it's a release blocker. Even better would or course be to fix asyncio to actually work if there are no threads -- the only issue is what to do about run_in_executor(), I guess it will have to run the function in-line... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 19:24:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 18 Oct 2013 17:24:43 +0000 Subject: [issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder In-Reply-To: <1377182986.55.0.892405433608.issue18810@psf.upfronthosting.co.za> Message-ID: <3d1YyG1Nnlz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 11f2f4af1979 by Brett Cannon in branch 'default': Issue #18810: Be optimistic with stat calls when seeing if a directory http://hg.python.org/cpython/rev/11f2f4af1979 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 19:24:55 2013 From: report at bugs.python.org (Christian Tismer) Date: Fri, 18 Oct 2013 17:24:55 +0000 Subject: [issue19274] make zipfile.PyZipFile more usable In-Reply-To: <1381959832.11.0.559988604291.issue19274@psf.upfronthosting.co.za> Message-ID: <1382117095.34.0.95918282523.issue19274@psf.upfronthosting.co.za> Christian Tismer added the comment: Ah, I understand: The case that does not compile comes from the toplevel "test" folder, which I could have excluded explicitly. But it is not a complete solution: If I want to add every package from the standard lib, then I necessarily encounter enclosed test folders, for instance: Lib/unittest contains Lib/unittest/test Your hint to just not call writepy() on directories which contain files which shouldn't be zipped means that I cannot use writepy at all, because many library packages contain tests. But that is the only purpose of class PyZipFile, therefore the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 19:26:03 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 18 Oct 2013 17:26:03 +0000 Subject: [issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder In-Reply-To: <1377182986.55.0.892405433608.issue18810@psf.upfronthosting.co.za> Message-ID: <1382117163.16.0.0834374038852.issue18810@psf.upfronthosting.co.za> Brett Cannon added the comment: The directory savings has actually been handled w/o semantics changes; in the last commit for this issue. The possibility of leaning on file extensions has been asked on python-dev. Once that is resolved then this issue will either get another commit or simply be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 19:29:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 18 Oct 2013 17:29:32 +0000 Subject: [issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder In-Reply-To: <1377182986.55.0.892405433608.issue18810@psf.upfronthosting.co.za> Message-ID: <3d1Z3p3lSZz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 9895a9c20e8a by Brett Cannon in branch 'default': Add NEWS entry for issue #18810 http://hg.python.org/cpython/rev/9895a9c20e8a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 19:40:53 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 18 Oct 2013 17:40:53 +0000 Subject: [issue8964] platform._sys_version does not parse correctly IronPython 2.x version In-Reply-To: <1276204295.1.0.731236969654.issue8964@psf.upfronthosting.co.za> Message-ID: <1382118053.65.0.296975940645.issue8964@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 20:31:57 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Oct 2013 18:31:57 +0000 Subject: [issue16612] Integrate "Argument Clinic" into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1382121117.9.0.244293149805.issue16612@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is awesome! Clinic adds too much visual garbage. Could we move all generated content into separated *_clinic.h files? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 20:37:42 2013 From: report at bugs.python.org (Stefan Krah) Date: Fri, 18 Oct 2013 18:37:42 +0000 Subject: [issue19285] test_asyncio failures on FreeBSD Message-ID: <1382121462.63.0.212652473904.issue19285@psf.upfronthosting.co.za> New submission from Stefan Krah: I'm splitting this off of #19262, since certain failures (hanging for one hour) remind me of #15599, which is an issue of epic proportions. Also it should not be a release blocker, since threading failures under FreeBSD-9 (running under KVM!) aren't uncommon. ---------- keywords: buildbot messages: 200294 nosy: gvanrossum, koobs, pitrou, skrah priority: normal severity: normal stage: needs patch status: open title: test_asyncio failures on FreeBSD type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 20:40:46 2013 From: report at bugs.python.org (Larry Hastings) Date: Fri, 18 Oct 2013 18:40:46 +0000 Subject: [issue16612] Integrate "Argument Clinic" into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1382121646.83.0.980664161185.issue16612@psf.upfronthosting.co.za> Larry Hastings added the comment: I played with that at one point. Guido suggested it was a bad idea. If you redirect stuff into a second file then you have way more points of failure--the files could get out sync, for example. I tend to agree. We could, however, change Clinic so it generated most of the junk at the bottom of the file, where you don't need to look at it. Or we could copy a page out of the PyPy playbook: generate a mandlebrot as a comment at column 0, then put the real text at column 80+. In the right editor you'd never see it again! In any case let's leave it for now. We can revisit it later once we've had a little more experience living with Clinic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 20:49:11 2013 From: report at bugs.python.org (Stefan Krah) Date: Fri, 18 Oct 2013 18:49:11 +0000 Subject: [issue19285] test_asyncio failures on FreeBSD In-Reply-To: <1382121462.63.0.212652473904.issue19285@psf.upfronthosting.co.za> Message-ID: <1382122151.69.0.816307225563.issue19285@psf.upfronthosting.co.za> Stefan Krah added the comment: If the FreeBSD-9.0 bot is heavily loaded, some tests have to be relaxed (see patch). I can make them conditional on FreeBSD if you prefer. The hanging still occurs sporadically. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 20:51:13 2013 From: report at bugs.python.org (Stefan Krah) Date: Fri, 18 Oct 2013 18:51:13 +0000 Subject: [issue19285] test_asyncio failures on FreeBSD In-Reply-To: <1382121462.63.0.212652473904.issue19285@psf.upfronthosting.co.za> Message-ID: <1382122273.22.0.966902968119.issue19285@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- keywords: +patch Added file: http://bugs.python.org/file32209/issue19285.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 20:53:57 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Oct 2013 18:53:57 +0000 Subject: [issue16612] Integrate "Argument Clinic" into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1382122437.62.0.718686689906.issue16612@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > If you redirect stuff into a second file then you have way more points of failure--the files could get out sync, for example. Clinic can define a macro with a random value in a main file before including generated file and check this value by preprocessor in generated file. It will guard us from unintentional desynchronization. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 21:11:00 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 18 Oct 2013 19:11:00 +0000 Subject: [issue19286] error: can't copy '': doesn't exist or not a regular file Message-ID: <1382123460.13.0.176528626985.issue19286@psf.upfronthosting.co.za> New submission from Jason R. Coombs: On Python 2.7 and 3.3, if the package_data glob happens to match a directory, it will trigger this error during build: error: can't copy '/': doesn't exist or not a regular file It seems that package_data is not very smart about filtering out directories, and assumes every name matched in the glob is a file. This is particularly inconvenient when one has a directory structure of package data. Consider: package_data={ 'bug_pkg': ( [ 'html/*.*', 'html/something-1.0/*.*', ] ), }, with a directory structure of: . ? setup.py ? ????bug_pkg ? __init__.py ? ????html ? index.html ? ????something-1.0 index.dat Since 'html/*.*' matches 'something-1.0', distutils assumes something-1.0 is a file and tries to copy it and fails with: error: can't copy 'bug_pkg/html/something-1.0': doesn't exist or not a regular file I believe distutils should be filtering out folders from package_data. In the past, users (including myself) have worked around the issue by using '*.*' to match only files, but that's a poor heuristic is the above example demonstrates. This issue was encountered when using sphinx-bootstrap-theme, which adds directories to sphinx HTML docs with directories like 'bootstrap-3.0.0', which are difficult to not match in a glob. Is there any reason why globs specified in package_data should not exclude all directories? ---------- assignee: eric.araujo components: Distutils messages: 200298 nosy: eric.araujo, jason.coombs, tarek priority: normal severity: normal status: open title: error: can't copy '': doesn't exist or not a regular file versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 21:12:49 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 18 Oct 2013 19:12:49 +0000 Subject: [issue16803] Make test_import & test_importlib run tests under both _frozen_importlib and importlib._bootstrap In-Reply-To: <1356718069.62.0.143946538677.issue16803@psf.upfronthosting.co.za> Message-ID: <3d1cLz3HsXz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 66e219519279 by Brett Cannon in branch 'default': Issue #16803: Have test_importlib.test_locks use frozen and source http://hg.python.org/cpython/rev/66e219519279 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 21:16:08 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 18 Oct 2013 19:16:08 +0000 Subject: [issue19286] error: can't copy '': doesn't exist or not a regular file In-Reply-To: <1382123460.13.0.176528626985.issue19286@psf.upfronthosting.co.za> Message-ID: <1382123768.73.0.660017008472.issue19286@psf.upfronthosting.co.za> Jason R. Coombs added the comment: The attached example minimally replicates the issue. ---------- Added file: http://bugs.python.org/file32210/example.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 21:40:39 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 18 Oct 2013 19:40:39 +0000 Subject: [issue16803] Make test_import & test_importlib run tests under both _frozen_importlib and importlib._bootstrap In-Reply-To: <1356718069.62.0.143946538677.issue16803@psf.upfronthosting.co.za> Message-ID: <3d1cz56gZXzSDJ@mail.python.org> Roundup Robot added the comment: New changeset 862043d74fae by Brett Cannon in branch 'default': Issue #16803: Move test_importlib.test_util to use both frozen and http://hg.python.org/cpython/rev/862043d74fae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 21:41:20 2013 From: report at bugs.python.org (CliffM) Date: Fri, 18 Oct 2013 19:41:20 +0000 Subject: [issue19281] add __objclass__ to the docs In-Reply-To: <1382082111.84.0.378259232568.issue19281@psf.upfronthosting.co.za> Message-ID: <1382125280.89.0.560318651065.issue19281@psf.upfronthosting.co.za> Changes by CliffM : ---------- nosy: +CliffM _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 21:55:52 2013 From: report at bugs.python.org (Andres Riancho) Date: Fri, 18 Oct 2013 19:55:52 +0000 Subject: [issue14881] multiprocessing.dummy craches when self._parent._children does not exist In-Reply-To: <1337676670.99.0.0296506896441.issue14881@psf.upfronthosting.co.za> Message-ID: <1382126152.32.0.166549113836.issue14881@psf.upfronthosting.co.za> Andres Riancho added the comment: Is this a duplicate for http://bugs.python.org/issue10015 #10015 ? ---------- nosy: +Andres.Riancho _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 21:57:22 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 18 Oct 2013 19:57:22 +0000 Subject: [issue19287] __contains__() of dbm.ndbm databases fails with str Message-ID: <1382126242.51.0.42060822734.issue19287@psf.upfronthosting.co.za> New submission from Arfrever Frehtes Taifersar Arahesis: __contains__() of dbm.ndbm databases fails with str, probably since 8beaa9a37387. This is a regression in Python 3.3. $ python3.2 -c 'import dbm.ndbm; db=dbm.ndbm.open("/tmp/db1", "c"); db["key"]="value"; print(b"key" in db); print("key" in db)' True True $ python3.3 -c 'import dbm.ndbm; db=dbm.ndbm.open("/tmp/db2", "c"); db["key"]="value"; print(b"key" in db); print("key" in db)' True Traceback (most recent call last): File "", line 1, in TypeError: dbm key must be string, not str $ python3.4 -c 'import dbm.ndbm; db=dbm.ndbm.open("/tmp/db3", "c"); db["key"]="value"; print(b"key" in db); print("key" in db)' True Traceback (most recent call last): File "", line 1, in TypeError: dbm key must be string, not str Also please improve error message to e.g. "dbm key must be bytes or string, not %.100s". ---------- components: Library (Lib) keywords: 3.3regression messages: 200303 nosy: Arfrever, loewis priority: normal severity: normal status: open title: __contains__() of dbm.ndbm databases fails with str versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 22:17:54 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 18 Oct 2013 20:17:54 +0000 Subject: [issue19285] test_asyncio failures on FreeBSD In-Reply-To: <1382122273.26.0.321867081626.issue19285@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Lgtm. Check it in if you can, otherwise I'll take care of it later. --Guido van Rossum (sent from Android phone) On Oct 18, 2013 11:51 AM, "Stefan Krah" wrote: > > Changes by Stefan Krah : > > > ---------- > keywords: +patch > Added file: http://bugs.python.org/file32209/issue19285.patch > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 22:23:13 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 18 Oct 2013 20:23:13 +0000 Subject: [issue19288] __contains__() of dbm.gnu databases fails with str Message-ID: <1382127793.56.0.416420933735.issue19288@psf.upfronthosting.co.za> New submission from Arfrever Frehtes Taifersar Arahesis: __contains__() of dbm.gnu databases fails with str. This is inconsistent with other databases (dbm.ndbm (issue #19287) and dbm.dumb). $ python3.2 -c 'import dbm.ndbm; db=dbm.ndbm.open("/tmp/ndbm_db", "c"); db["key"]="value"; print(b"key" in db); print("key" in db)' True True $ python3.4 -c 'import dbm.dumb; db=dbm.dumb.open("/tmp/dumb_db", "c"); db["key"]="value"; print(b"key" in db); print("key" in db)' True True $ python3.4 -c 'import dbm.gnu; db=dbm.gnu.open("/tmp/gdbm_db", "c"); db["key"]="value"; print(b"key" in db); print("key" in db)' True Traceback (most recent call last): File "", line 1, in TypeError: gdbm key must be bytes, not str ---------- components: Library (Lib) messages: 200305 nosy: Arfrever priority: normal severity: normal status: open title: __contains__() of dbm.gnu databases fails with str versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 22:32:25 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 18 Oct 2013 20:32:25 +0000 Subject: [issue19281] add __objclass__ to the docs In-Reply-To: <1382082111.84.0.378259232568.issue19281@psf.upfronthosting.co.za> Message-ID: <1382128345.9.0.359581057796.issue19281@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 22:33:00 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Fri, 18 Oct 2013 20:33:00 +0000 Subject: [issue10015] Creating a multiprocess.pool.ThreadPool from a child thread blows up. In-Reply-To: <1286028029.62.0.429525925265.issue10015@psf.upfronthosting.co.za> Message-ID: <1382128380.99.0.34947569922.issue10015@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 22:38:38 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 18 Oct 2013 20:38:38 +0000 Subject: [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1382128718.44.0.0398359293037.issue17576@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 22:39:33 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 18 Oct 2013 20:39:33 +0000 Subject: [issue5411] Add xz support to shutil In-Reply-To: <1236081386.1.0.884971889723.issue5411@psf.upfronthosting.co.za> Message-ID: <1382128773.08.0.544716355242.issue5411@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 22:40:43 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 18 Oct 2013 20:40:43 +0000 Subject: [issue19282] dbm is not a context manager In-Reply-To: <1382082310.98.0.0309554787542.issue19282@psf.upfronthosting.co.za> Message-ID: <1382128843.32.0.694491550463.issue19282@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 22:56:55 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Oct 2013 20:56:55 +0000 Subject: [issue16612] Integrate "Argument Clinic" into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1382129815.57.0.349910303213.issue16612@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have added a handful of nitpicks on Rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 23:29:38 2013 From: report at bugs.python.org (David Edelsohn) Date: Fri, 18 Oct 2013 21:29:38 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1382131778.87.0.198656288634.issue19262@psf.upfronthosting.co.za> David Edelsohn added the comment: AIX buildbot is experiencing a similar failure: [276/382/4] test_asyncio Timeout (1:00:00)! Thread 0x00000001: File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/selectors.py", line 265 in select File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/asyncio/base_events.py", line 576 in _run_once File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/asyncio/base_events.py", line 153 in run_forever File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/asyncio/base_events.py", line 172 in run_until_complete File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_asyncio/test_events.py", line 1012 in test_subprocess_interactive ---------- nosy: +David.Edelsohn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 23:31:41 2013 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 18 Oct 2013 21:31:41 +0000 Subject: [issue19289] Incorrect documentation for format's fill character. Message-ID: <1382131901.96.0.924496461441.issue19289@psf.upfronthosting.co.za> New submission from Eric V. Smith: In http://docs.python.org/library/string.html#format-specification-mini-language, it says "The fill character can be any character other than ?{? or ?}?." But that's not actually true. It's only true when using str.format, as it does the parsing and the { and } mean special things for that parser. But for format itself there is no restriction: >>> format(3, '{>10') '{{{{{{{{{3' As this section should be documenting the format specifiers themselves, I think it should not concern itself with restrictions imposed by str.format. ---------- assignee: docs at python components: Documentation messages: 200308 nosy: docs at python, eric.smith priority: low severity: normal status: open title: Incorrect documentation for format's fill character. versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 23:34:24 2013 From: report at bugs.python.org (koobs) Date: Fri, 18 Oct 2013 21:34:24 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1382132064.9.0.763852336946.issue19262@psf.upfronthosting.co.za> koobs added the comment: @Guido, another expected delay test failure: ====================================================================== FAIL: test_run_until_complete (test.test_asyncio.test_events.KqueueEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/test_asyncio/test_events.py", line 218, in test_run_until_complete self.assertTrue(0.08 <= t1-t0 <= 0.12, t1-t0) AssertionError: False is not true : 0.12018337799236178 Note: Also referenced "upstream" :] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 18 23:35:42 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 18 Oct 2013 21:35:42 +0000 Subject: [issue16612] Integrate "Argument Clinic" into CPython trunk In-Reply-To: <1382121646.83.0.980664161185.issue16612@psf.upfronthosting.co.za> Message-ID: <1382132109.2485.0.camel@fsol> Antoine Pitrou added the comment: > Or we could copy a page out of the PyPy playbook: generate a mandlebrot > as a comment at column 0, then put the real text at column 80+. In the > right editor you'd never see it again! That's only good if editing the file needs 3GB RAM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 00:08:51 2013 From: report at bugs.python.org (Sergey Dorofeev) Date: Fri, 18 Oct 2013 22:08:51 +0000 Subject: [issue10614] ZipFile: add a filename_encoding argument In-Reply-To: Message-ID: Sergey Dorofeev added the comment: OK, here you are: --- zipfile.py-orig 2013-09-18 16:45:56.000000000 +0400 +++ zipfile.py 2013-10-19 01:59:07.444346674 +0400 @@ -885,7 +885,7 @@ fp = None # Set here since __del__ checks it _windows_illegal_name_trans_table = None - def __init__(self, file, mode="r", compression=ZIP_STORED, allowZip64=False): + def __init__(self, file, mode="r", compression=ZIP_STORED, allowZip64=False, encoding='cp437'): """Open the ZIP file with mode read "r", write "w" or append "a".""" if mode not in ("r", "w", "a"): raise RuntimeError('ZipFile() requires mode "r", "w", or "a"') @@ -901,6 +901,7 @@ self.mode = key = mode.replace('b', '')[0] self.pwd = None self._comment = b'' + self.encoding = encoding # Check if we were passed a file-like object if isinstance(file, str): @@ -1001,8 +1002,8 @@ # UTF-8 file names extension filename = filename.decode('utf-8') else: - # Historical ZIP filename encoding - filename = filename.decode('cp437') + # Historical ZIP filename encoding, default is CP437 + filename = filename.decode(self.encoding) # Create ZipInfo instance to store file information x = ZipInfo(filename) x.extra = fp.read(centdir[_CD_EXTRA_FIELD_LENGTH]) @@ -1157,7 +1158,7 @@ # UTF-8 filename fname_str = fname.decode("utf-8") else: - fname_str = fname.decode("cp437") + fname_str = fname.decode(self.encoding) if fname_str != zinfo.orig_filename: raise BadZipFile( On Fri, Oct 18, 2013 at 11:47 AM, STINNER Victor wrote: > > STINNER Victor added the comment: > > Please rename codepage to encoding. By the way, 437 is a codepage, cp437 is > a (python) encoding. > > I don't think that ZIP is limited to windows. I uncompressed zip files many > times on various OSes, github also produces zip (and github is probably not > using windows). And codepage term is only used on windows. Mac OS 9 users > might produce mac roman filenames. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 00:11:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 18 Oct 2013 22:11:38 +0000 Subject: [issue19222] Add 'x' mode to gzip.open() In-Reply-To: <1381440732.5.0.887732797238.issue19222@psf.upfronthosting.co.za> Message-ID: <3d1hKk27MGz7LjM@mail.python.org> Roundup Robot added the comment: New changeset a728a7d46553 by Nadeem Vawda in branch 'default': Issue #19222: Add support for the 'x' mode to the gzip module. http://hg.python.org/cpython/rev/a728a7d46553 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 00:11:37 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 18 Oct 2013 22:11:37 +0000 Subject: [issue19201] Add 'x' mode to lzma.open() In-Reply-To: <1381282314.82.0.620935912444.issue19201@psf.upfronthosting.co.za> Message-ID: <3d1hKh5Zr1z7LjM@mail.python.org> Roundup Robot added the comment: New changeset b7948aaca1dd by Nadeem Vawda in branch 'default': Issue #19201: Add support for the 'x' mode to the lzma module. http://hg.python.org/cpython/rev/b7948aaca1dd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 00:11:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 18 Oct 2013 22:11:38 +0000 Subject: [issue19223] Add 'x' mode to bz2.open() In-Reply-To: <1381440875.62.0.537853075258.issue19223@psf.upfronthosting.co.za> Message-ID: <3d1hKj3pMcz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 5abc04e6579b by Nadeem Vawda in branch 'default': Issue #19223: Add support for the 'x' mode to the bz2 module. http://hg.python.org/cpython/rev/5abc04e6579b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 00:12:46 2013 From: report at bugs.python.org (Nadeem Vawda) Date: Fri, 18 Oct 2013 22:12:46 +0000 Subject: [issue19223] Add 'x' mode to bz2.open() In-Reply-To: <1381440875.62.0.537853075258.issue19223@psf.upfronthosting.co.za> Message-ID: <1382134366.05.0.118181544596.issue19223@psf.upfronthosting.co.za> Changes by Nadeem Vawda : ---------- assignee: -> nadeem.vawda resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 00:12:45 2013 From: report at bugs.python.org (Nadeem Vawda) Date: Fri, 18 Oct 2013 22:12:45 +0000 Subject: [issue19222] Add 'x' mode to gzip.open() In-Reply-To: <1381440732.5.0.887732797238.issue19222@psf.upfronthosting.co.za> Message-ID: <1382134364.99.0.414710973897.issue19222@psf.upfronthosting.co.za> Changes by Nadeem Vawda : ---------- assignee: -> nadeem.vawda nosy: +nadeem.vawda resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 00:17:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 18 Oct 2013 22:17:57 +0000 Subject: [issue19285] test_asyncio failures on FreeBSD In-Reply-To: <1382121462.63.0.212652473904.issue19285@psf.upfronthosting.co.za> Message-ID: <3d1hSc1Ybbz7LjM@mail.python.org> Roundup Robot added the comment: New changeset e042deeeb703 by Guido van Rossum in branch 'default': Relax some asyncio test timeouts (http://bugs.python.org/issue19285). http://hg.python.org/cpython/rev/e042deeeb703 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 00:21:02 2013 From: report at bugs.python.org (Martin Marcher) Date: Fri, 18 Oct 2013 22:21:02 +0000 Subject: [issue13405] Add DTrace probes In-Reply-To: <1321299726.66.0.343368151185.issue13405@psf.upfronthosting.co.za> Message-ID: <1382134862.23.0.852812132217.issue13405@psf.upfronthosting.co.za> Changes by Martin Marcher : ---------- nosy: -serverhorror _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 00:22:49 2013 From: report at bugs.python.org (Nadeem Vawda) Date: Fri, 18 Oct 2013 22:22:49 +0000 Subject: [issue19201] Add 'x' mode to lzma.open() In-Reply-To: <1381282314.82.0.620935912444.issue19201@psf.upfronthosting.co.za> Message-ID: <1382134969.05.0.762224108597.issue19201@psf.upfronthosting.co.za> Nadeem Vawda added the comment: Fix committed. Thanks for the patches! As Jes?s and Terry have said, this won't be backported to 3.3/2.7, since it is a new feature. [oylenshpeegul] | It's weird how different these three patches are! We're | essentially doing the same thing: "please allow the x option to pass | through to builtins.open." Why don't these three modules look more alike? Mostly because they were written at different times, by different people, with different things to be backward-compatible with. Ideally they would share the bulk of their code, but it's tricky to do that without changing behavior in some corner cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 00:23:40 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 18 Oct 2013 22:23:40 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1382132064.9.0.763852336946.issue19262@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Relaxed a bunch of timeouts. No news on the --without-threads case, that will have to happen post-alpha-4 I expect. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 00:25:32 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Oct 2013 22:25:32 +0000 Subject: [issue19290] Clarify compile and eval interaction. Message-ID: <1382135132.91.0.187309157375.issue19290@psf.upfronthosting.co.za> New submission from Terry J. Reedy: This issue was stimulated by #17294 where there seems to be some confusion over the purpose of the compile modes with regards to return values. I then noticed that the eval doc starts wrong and later corrects itself. I think the following sentence from the compile doc could be improved. The current version: "The mode argument specifies what kind of code must be compiled; it can be 'exec' if source consists of a sequence of statements, 'eval' if it consists of a single expression, or 'single' if it consists of a single interactive statement (in the latter case, expression statements that evaluate to something other than None will be printed)." My suggestion: "The mode argument specifies the allowed source and the return value when the result is passed to eval(). It can be 'exec' for any source (a sequence of 0 to many statements); the return value will be None. It can be 'eval' if the source is a single expression; the return value will be the value of the expression. It can be 'single' if the source is a single non-empty interactive statement; the return value will be None, as with 'exec', but if the statement is an expression that evaluates to something other than None, the value will be printed." (#13677 is about changing the doc and docstring for the compile flags argument. Patches for that and this should be disjoint.) The eval(expression, ..) doc say that expression is a string. It much later says that it can also be a code object. I think the eval doc should follow the exec doc and call the first positional-only arg 'object' and then say the same thing: 'object must be either a string or a code object.' I don't have a complete suggested revision yet. ---------- assignee: docs at python components: Documentation messages: 200318 nosy: docs at python, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Clarify compile and eval interaction. versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 00:31:32 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 18 Oct 2013 22:31:32 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1382135492.97.0.823772976557.issue19262@psf.upfronthosting.co.za> Guido van Rossum added the comment: I've landed a bunch of stuff, and now I am pretty happy. It's also soon going to be weekend, which means family time, so I really hope everyone else is also happy. :-) A summary of what changed since the initial asyncio checkin: - Rename the logger to plain "logger". - Rename Transport.pause/resume to pause_reading/pause_writing. - Important race condition fix. - Write flow control for asyncio! (And asyncio/streams.py overhaul.) And in the tests: - Make the tests run on Windows. - Relax various test timeouts to reduce flakiness on slow buildbots. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 00:31:56 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 18 Oct 2013 22:31:56 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1382135516.89.0.510483346073.issue19262@psf.upfronthosting.co.za> Guido van Rossum added the comment: Ready for release! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 00:41:36 2013 From: report at bugs.python.org (Nadeem Vawda) Date: Fri, 18 Oct 2013 22:41:36 +0000 Subject: [issue19201] Add 'x' mode to lzma.open() In-Reply-To: <1381282314.82.0.620935912444.issue19201@psf.upfronthosting.co.za> Message-ID: <1382136096.66.0.997259752237.issue19201@psf.upfronthosting.co.za> Nadeem Vawda added the comment: [terry.reedy] | Arfrever's point about the order of characters makes me wonder why mode | strings (as opposed to characters in the strings) are being checked. | The following tests that exactly one of w, a, x appear in mode. | if len({'w', 'a', 'x'} & set(mode)) == 1: | If mode is eventually passed to open(), the latter would do what ever | it does with junk chars in mode (such as 'q'). There are two separate questions here - how rigid we are about modes containing only valid characters, and how we handle invalid characters. I don't think there's any point in passing through unrecognized chars to builtins.open(), since it results in a ValueError either way. On the first point, the code only accepts modes like 'r' and 'rb' (but not 'br') for the sake of simplicity. There doesn't seem to be much practical value in accepting arbitrarily-ordered modes, but if someone has a compelling use-case (or a patch that's no more complex than the status quo), please bring it up in a separate issue. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 00:42:07 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Oct 2013 22:42:07 +0000 Subject: [issue17294] compile-flag for single-execution to return value instead of printing it In-Reply-To: <1361797886.48.0.856864897447.issue17294@psf.upfronthosting.co.za> Message-ID: <1382136127.74.0.85231198454.issue17294@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Albert: enhancements can only go in future releases. Also, when a core developer rejects a suggestion and closes an issue, it is better to just request a re-open, or otherwise post to python-list or python-ideas to refine the idea and possible gather more support. We really do not like Status header setting wars. Mode 'single' is not what you actually want. Its only purpose is add the print that you do not want*. It is otherwise the same as mode 'exec' (except for requiring exactly 1 statement rather than 0 to n). What you are asking is that 'single' act like 'eval' for expressions. That is what your interactive_py_compile effectively does. However, this can be done much easier and without being CPython 2 specific as follows: def ee_compile(code, src=''): try: return compile(code, src, 'eval') except SyntaxError: return compile(code, src, 'exec') # or 'single' would work a = eval(ee_compile('1+1')) b = eval(ee_compile('c = 3')) print(a, b, c) # 2 None 3 With 2.7, your function gives the exact same result. I could not get it to run on 3.3: even after removing the ord calls and changing chr to bytes (and making the arg a tuple), the CodeType call failed. * I believe the only reason 'single' exists, as a variant of 'exec', is to make loops like the following print non-None values of expressions but otherwise ignore them. for statement in user_input(): if statement: exec(compile(statement, '', 'single')) You can replace the last line with v = eval(ee_compile(statement, '', 'single')) process(v) Anyway, I agree with Georg that we do not need to modify compile. I have opened a separate issue #19290 about clarifying compile modes and their interaction with eval. ---------- nosy: +terry.reedy resolution: -> rejected stage: -> committed/rejected status: open -> closed versions: -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 00:47:11 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Oct 2013 22:47:11 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1382135516.89.0.510483346073.issue19262@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: 2013/10/19 Guido van Rossum : > Ready for release! > > resolution: -> fixed > status: open -> closed The new module has no documentation at all. Do you plan to open a new issue for the documentation? Or maybe you don't plan to add documentation? :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 00:50:04 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Oct 2013 22:50:04 +0000 Subject: [issue19285] test_asyncio failures on FreeBSD In-Reply-To: <1382121462.63.0.212652473904.issue19285@psf.upfronthosting.co.za> Message-ID: <1382136604.49.0.920613563986.issue19285@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 00:58:39 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 18 Oct 2013 22:58:39 +0000 Subject: [issue19291] Add docs for asyncio package (Tulip, PEP 3156) Message-ID: <1382137119.85.0.0934203099722.issue19291@psf.upfronthosting.co.za> New submission from Guido van Rossum: The asyncio module needs documentation. I'll work on this in time for the beta 1 release. Until then, please refer to PEP 3156. ---------- assignee: gvanrossum messages: 200324 nosy: gvanrossum priority: deferred blocker severity: normal status: open title: Add docs for asyncio package (Tulip, PEP 3156) versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 00:59:32 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 18 Oct 2013 22:59:32 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1382137172.48.0.210146746648.issue19262@psf.upfronthosting.co.za> Guido van Rossum added the comment: I'll track that separately: http://bugs.python.org/issue19291 For now, PEP 3156 has a lot of information. (But the PEP also needs to be updated to track recent developments.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 01:06:04 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Oct 2013 23:06:04 +0000 Subject: [issue19237] Proposal : LCM function to complement GCD In-Reply-To: <1381613985.13.0.579421159234.issue19237@psf.upfronthosting.co.za> Message-ID: <1382137564.67.0.0255006566896.issue19237@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am -0 (or more negative) for the same reason. The need for lcm is very rare. I think the gcd doc should give the lcm formula, with perhaps an index entry. The gcd doc might also mention that gcd is associative: gcd(a,b,c) = gcd(gcd(a,b),c). The math module is nearly all float math. The integer only math.factorial(n) is relatively recent. Gcd in in fractions because we do not have an imath module and because the only use of gcd in the stdlib is for reducing fractions. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 01:07:17 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Oct 2013 23:07:17 +0000 Subject: [issue19238] Misleading explanation of fill and align in format_spec In-Reply-To: <1381616869.75.0.196962613989.issue19238@psf.upfronthosting.co.za> Message-ID: <1382137637.85.0.296193845241.issue19238@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +terry.reedy versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 01:15:40 2013 From: report at bugs.python.org (Brian Quinlan) Date: Fri, 18 Oct 2013 23:15:40 +0000 Subject: [issue7200] multiprocessing deadlock on Mac OS X when queue collected before process terminates In-Reply-To: <1256425837.07.0.628633816678.issue7200@psf.upfronthosting.co.za> Message-ID: <1382138140.49.0.29131953395.issue7200@psf.upfronthosting.co.za> Brian Quinlan added the comment: OK, working as intended. ---------- resolution: -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 01:18:54 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 18 Oct 2013 23:18:54 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows Message-ID: <1382138334.23.0.419355699391.issue19292@psf.upfronthosting.co.za> New submission from Guido van Rossum: See discussion on https://groups.google.com/forum/#!topic/python-tulip/c_lqdFjPEbE . If you set sslcontext.verify_mode = ssl.CERT_REQUIRED and call sslcontext.set_default_verify_paths(), the stdlib ought to have enough smarts to use the system root certificates. I understand this is difficult, as the location of the root certificates may vary between Windows versions or installations. But if we leave this up to the app developer they are much more likely to disable certificate verification by setting verify_mode to CERT_NONE than to provide secure root certs (or do even less secure things, like using plain HTTP :-). ---------- messages: 200328 nosy: gvanrossum priority: normal severity: normal stage: needs patch status: open title: Make SSLContext.set_default_verify_paths() work on Windows type: security versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 01:21:16 2013 From: report at bugs.python.org (Brian Quinlan) Date: Fri, 18 Oct 2013 23:21:16 +0000 Subject: [issue10918] **kwargs unnecessarily restricted in concurrent.futures 'submit' API In-Reply-To: <1295192992.12.0.880697566702.issue10918@psf.upfronthosting.co.za> Message-ID: <1382138476.56.0.457240361133.issue10918@psf.upfronthosting.co.za> Brian Quinlan added the comment: I think that we are happy to not fix this. ---------- resolution: accepted -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 01:26:58 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Oct 2013 23:26:58 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1382138818.28.0.350215514463.issue19251@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 'XOR of two bytes in one place' strikes me as a thin excuse for a new feature that abbreviates a simple, short, one-liner. To me, bytes(x ^ y for x, y in zip(a, b)) looks fine. a and b can be any iterables of ints. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 01:36:07 2013 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 18 Oct 2013 23:36:07 +0000 Subject: [issue19289] Incorrect documentation for format's fill character. In-Reply-To: <1382131901.96.0.924496461441.issue19289@psf.upfronthosting.co.za> Message-ID: <1382139367.18.0.0692343558565.issue19289@psf.upfronthosting.co.za> Eric V. Smith added the comment: See also issue 19238. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 01:36:35 2013 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 18 Oct 2013 23:36:35 +0000 Subject: [issue19238] Misleading explanation of fill and align in format_spec In-Reply-To: <1381616869.75.0.196962613989.issue19238@psf.upfronthosting.co.za> Message-ID: <1382139395.66.0.274695839038.issue19238@psf.upfronthosting.co.za> Eric V. Smith added the comment: See also issue 19289. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 01:38:47 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Oct 2013 23:38:47 +0000 Subject: [issue19259] Provide Python implementation of operator.compare_digest() In-Reply-To: <1381750256.83.0.263124716214.issue19259@psf.upfronthosting.co.za> Message-ID: <1382139527.43.0.383255141756.issue19259@psf.upfronthosting.co.za> Terry J. Reedy added the comment: -1 "The operator module exports a set of efficient functions corresponding to the intrinsic operators of Python." As far as I know, _compare_digest does not correspond to any operator. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 01:56:42 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Oct 2013 23:56:42 +0000 Subject: [issue19264] subprocess.Popen doesn't support unicode on Windows In-Reply-To: <1381815796.03.0.914223470735.issue19264@psf.upfronthosting.co.za> Message-ID: <1382140602.96.0.0368636389644.issue19264@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The docs say that args should be a string or sequence of strings. It also says "On Windows, the class uses the Windows CreateProcess() function.", so it is not a bug for it to do that. However, CreateProcessW sounds like a good (and overdue, and overlooked) enhancement, if it indeed is still not used in 3.4. (Have you checked?) On 2.7, 'string' may or may not include unicode strings. On 3.x, it definitely does, and may or may not include bytes. If 3.x restricts unicode strings to ascii text (at least on Windows), the doc should say so. ---------- nosy: +terry.reedy type: behavior -> enhancement versions: +Python 3.4 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 01:58:15 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 18 Oct 2013 23:58:15 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: <1382138334.23.0.419355699391.issue19292@psf.upfronthosting.co.za> Message-ID: <1382140695.08.0.154973606668.issue19292@psf.upfronthosting.co.za> Guido van Rossum added the comment: Maybe once this is addressed we could also change urllib.request.urlopen() to default to cadefault=True? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 02:16:08 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 19 Oct 2013 00:16:08 +0000 Subject: [issue19282] dbm.open should be a context manager In-Reply-To: <1382082310.98.0.0309554787542.issue19282@psf.upfronthosting.co.za> Message-ID: <1382141768.02.0.982182383036.issue19282@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I agree with the revised title. Test_context_manager() should also test that db is actually closed after the with statement. I presume you can use self.assertRaises and try to do something with db that will fail if it is properly closed. with self.assertRaises(): db['a'] = 'a' # or whatever I haven't looked at the C code. ---------- nosy: +terry.reedy stage: needs patch -> patch review title: dbm is not a context manager -> dbm.open should be a context manager _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 02:28:19 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 19 Oct 2013 00:28:19 +0000 Subject: [issue14881] multiprocessing.dummy craches when self._parent._children does not exist In-Reply-To: <1337676670.99.0.0296506896441.issue14881@psf.upfronthosting.co.za> Message-ID: <1382142499.36.0.400192596276.issue14881@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Since this is already fixed and closed, the question is more relevant to #10015 and whether it should be closed. The answer seems to be yes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 02:33:25 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 19 Oct 2013 00:33:25 +0000 Subject: [issue14881] multiprocessing.dummy craches when self._parent._children does not exist In-Reply-To: <1337676670.99.0.0296506896441.issue14881@psf.upfronthosting.co.za> Message-ID: <1382142805.33.0.793433255646.issue14881@psf.upfronthosting.co.za> Terry J. Reedy added the comment: By the way, thanks for noticing, so it *can* be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 02:33:30 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 19 Oct 2013 00:33:30 +0000 Subject: [issue10015] Creating a multiprocess.pool.ThreadPool from a child thread blows up. In-Reply-To: <1286028029.62.0.429525925265.issue10015@psf.upfronthosting.co.za> Message-ID: <1382142810.71.0.743706338079.issue10015@psf.upfronthosting.co.za> Terry J. Reedy added the comment: #14881 seems to be a duplicate of this. It was closed in May 2012 after 2.7, 3.2, and 3.3 were patched. The three tests in potential_issue_demo.py now pass with 2.7.5 and 3.3.2. So closing. ---------- nosy: +terry.reedy resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> multiprocessing.dummy craches when self._parent._children does not exist _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 02:40:56 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 00:40:56 +0000 Subject: [issue16742] PyOS_Readline drops GIL and calls PyOS_StdioReadline, which isn't thread safe In-Reply-To: <1356086390.48.0.327620937355.issue16742@psf.upfronthosting.co.za> Message-ID: <3d1ldy73j2z7LjM@mail.python.org> Roundup Robot added the comment: New changeset 6c9050ad1afc by Victor Stinner in branch 'default': Issue #16742: My fix on PyOS_StdioReadline() was incomplete, PyMem_FREE() was http://hg.python.org/cpython/rev/6c9050ad1afc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 02:46:32 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 19 Oct 2013 00:46:32 +0000 Subject: [issue19291] Add docs for asyncio package (Tulip, PEP 3156) In-Reply-To: <1382137119.85.0.0934203099722.issue19291@psf.upfronthosting.co.za> Message-ID: <1382143592.05.0.117041800522.issue19291@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 02:46:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 19 Oct 2013 00:46:52 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1382143612.91.0.103393159555.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: Update the patch to the last implementation. ---------- Added file: http://bugs.python.org/file32211/57ae01bf96cb.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 02:47:13 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 19 Oct 2013 00:47:13 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1382143633.6.0.14917344536.issue18874@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file31976/ec121a72e848.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 03:00:04 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 19 Oct 2013 01:00:04 +0000 Subject: [issue16612] Integrate "Argument Clinic" into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1382144404.0.0.214232198864.issue16612@psf.upfronthosting.co.za> Larry Hastings added the comment: Incorporated a small change from Antoine and a ton of small changes from Serhiy. Thanks guys! ---------- Added file: http://bugs.python.org/file32212/larry.clinic.patch.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 03:17:53 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 19 Oct 2013 01:17:53 +0000 Subject: [issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238) In-Reply-To: <1376307172.38.0.0558370001214.issue18709@psf.upfronthosting.co.za> Message-ID: <1382145473.89.0.000543135142494.issue18709@psf.upfronthosting.co.za> Larry Hastings added the comment: So, this is fixed, but there's some suspicion of a memory leak? If that's true, maybe we could mark this as closed then open a new bug for the leak? This shows up as a big scary "release blocker" against 3.4, and I'm like making releases and stuff. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 03:19:32 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 19 Oct 2013 01:19:32 +0000 Subject: [issue18747] Re-seed OpenSSL's PRNG after fork In-Reply-To: <1376570101.71.0.249202475923.issue18747@psf.upfronthosting.co.za> Message-ID: <1382145572.24.0.173610115696.issue18747@psf.upfronthosting.co.za> Larry Hastings added the comment: I can't follow all this. Is this considered fixed in 3.4 or not? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 03:20:09 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 19 Oct 2013 01:20:09 +0000 Subject: [issue16043] xmlrpc: gzip_decode has unlimited read() In-Reply-To: <1348570326.9.0.587983624118.issue16043@psf.upfronthosting.co.za> Message-ID: <1382145609.95.0.517974474927.issue16043@psf.upfronthosting.co.za> Larry Hastings added the comment: Ping. Can we get this fixed before beta 1? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 03:20:44 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 19 Oct 2013 01:20:44 +0000 Subject: [issue16039] imaplib: unlimited readline() from connection In-Reply-To: <1348569370.53.0.568109495954.issue16039@psf.upfronthosting.co.za> Message-ID: <1382145644.27.0.777801953463.issue16039@psf.upfronthosting.co.za> Larry Hastings added the comment: Ping. Please fix before "beta 1". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 03:21:34 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 19 Oct 2013 01:21:34 +0000 Subject: [issue16042] smtplib: unlimited readline() from connection In-Reply-To: <1348569609.82.0.499861906556.issue16042@psf.upfronthosting.co.za> Message-ID: <1382145694.08.0.608697748463.issue16042@psf.upfronthosting.co.za> Larry Hastings added the comment: Can we get this fixed in more recent versions? Like, maybe, trunk, before "beta 1"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 03:22:30 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 19 Oct 2013 01:22:30 +0000 Subject: [issue16038] ftplib: unlimited readline() from connection In-Reply-To: <1348569175.14.0.867789583045.issue16038@psf.upfronthosting.co.za> Message-ID: <1382145750.44.0.4063925985.issue16038@psf.upfronthosting.co.za> Larry Hastings added the comment: Ping. Please fix before "beta 1". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 03:22:47 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 19 Oct 2013 01:22:47 +0000 Subject: [issue16037] httplib: header parsing is unlimited In-Reply-To: <1348568722.91.0.654032066819.issue16037@psf.upfronthosting.co.za> Message-ID: <1382145767.93.0.0997070318337.issue16037@psf.upfronthosting.co.za> Larry Hastings added the comment: Ping. Please fix before "beta 1". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 03:23:04 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 19 Oct 2013 01:23:04 +0000 Subject: [issue16041] poplib: unlimited readline() from connection In-Reply-To: <1348569563.2.0.69634867698.issue16041@psf.upfronthosting.co.za> Message-ID: <1382145784.07.0.37554946008.issue16041@psf.upfronthosting.co.za> Larry Hastings added the comment: Ping. Please fix before "beta 1". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 03:23:16 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 19 Oct 2013 01:23:16 +0000 Subject: [issue16040] nntplib: unlimited readline() from connection In-Reply-To: <1348569525.38.0.219080768405.issue16040@psf.upfronthosting.co.za> Message-ID: <1382145796.68.0.159174011651.issue16040@psf.upfronthosting.co.za> Larry Hastings added the comment: Ping. Please fix before "beta 1". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 03:24:11 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 19 Oct 2013 01:24:11 +0000 Subject: [issue18509] CJK decoders should return MBERR_EXCEPTION on PyUnicodeWriter error In-Reply-To: <1374271247.45.0.0168623931287.issue18509@psf.upfronthosting.co.za> Message-ID: <1382145851.25.0.682598279966.issue18509@psf.upfronthosting.co.za> Larry Hastings added the comment: Victor, are you going to write a patch for this before beta 1? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 03:24:47 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 19 Oct 2013 01:24:47 +0000 Subject: [issue19279] UTF-7 to UTF-8 decoding crash In-Reply-To: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> Message-ID: <1382145887.24.0.419677196317.issue19279@psf.upfronthosting.co.za> Larry Hastings added the comment: Ping. Please fix before "beta 1". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 03:29:49 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 01:29:49 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: <1382138334.23.0.419355699391.issue19292@psf.upfronthosting.co.za> Message-ID: <1382146188.99.0.439060951094.issue19292@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +christian.heimes type: security -> enhancement versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 03:33:20 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 19 Oct 2013 01:33:20 +0000 Subject: [issue18509] CJK decoders should return MBERR_EXCEPTION on PyUnicodeWriter error In-Reply-To: <1382145851.25.0.682598279966.issue18509@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > Victor, are you going to write a patch for this before beta 1? Not before at least one week, I'm busy on tracemalloc. If anyone is interesting, please write a patch and I will review it :-) (The CJK macros are ugly!) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 03:35:04 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 01:35:04 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: <1382138334.23.0.419355699391.issue19292@psf.upfronthosting.co.za> Message-ID: <1382146504.74.0.1907502644.issue19292@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Maybe once this is addressed we could also change urllib.request.urlopen() to default to cadefault=True? I don't think it's ok to change the default and break compatibility. Passing True manually is easy enough. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 03:40:32 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 19 Oct 2013 01:40:32 +0000 Subject: [issue17087] Improve the repr for regular expression match objects In-Reply-To: <1359589982.45.0.929656950631.issue17087@psf.upfronthosting.co.za> Message-ID: <1382146832.15.0.886075870717.issue17087@psf.upfronthosting.co.za> Ezio Melotti added the comment: I discussed this briefly with Serhiy on IRC and I think the repr can be improved. Currently it looks like: >>> re.compile(r'[/\\]([.]svn)').match('/.svn') <_sre.SRE_Match object: groups=1, span=(0, 5), group0='/.svn'> One problem is that the group count doesn't include group 0, so from the example repr one would expect that the info are about the 1 (and only) group in "groups=", whereas that is actually group 0 and there's an additional group 1 that is not included in the repr. A possible solution is to separate the group count from the info about group 0: <_sre.SRE_Match object (1 group); group0='/.svn', span=(0, 5)> To make things even less confusing we could avoid calling it group0 and use something like "match=", or alternatively remove the group count (doesn't the count depend only on the regex, and not on the string?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 03:43:24 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 19 Oct 2013 01:43:24 +0000 Subject: [issue18509] CJK decoders should return MBERR_EXCEPTION on PyUnicodeWriter error In-Reply-To: <1374271247.45.0.0168623931287.issue18509@psf.upfronthosting.co.za> Message-ID: <1382147004.2.0.498387781833.issue18509@psf.upfronthosting.co.za> Larry Hastings added the comment: It's a month before beta 1. This weekend is alpha 4; it'd be nice if it were fixed for that, of course, but that does not seem likely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 04:07:11 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 02:07:11 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: <1382138334.23.0.419355699391.issue19292@psf.upfronthosting.co.za> Message-ID: <1382148431.62.0.979877534199.issue19292@psf.upfronthosting.co.za> Guido van Rossum added the comment: Why is this not a security patch? Because it's not a "vulnerability" in the narrow technical sense? I expect that it will greatly increase the actual practical security, by making it easier to do the right thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 05:44:34 2013 From: report at bugs.python.org (Ramchandra Apte) Date: Sat, 19 Oct 2013 03:44:34 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1382138818.28.0.350215514463.issue19251@psf.upfronthosting.co.za> Message-ID: Ramchandra Apte added the comment: On 19 October 2013 04:56, Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > 'XOR of two bytes in one place' strikes me as a thin excuse for a new > feature that abbreviates a simple, short, one-liner. To me, bytes(x ^ y for > x, y in zip(a, b)) looks fine. a and b can be any iterables of ints. > > ---------- > nosy: +terry.reedy > > _______________________________________ > Python tracker > > _______________________________________ > Hm... I think you are right. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 05:47:01 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 19 Oct 2013 03:47:01 +0000 Subject: [issue18958] Exception('No JSON object could be decoded') when parsing a valid JSON In-Reply-To: <1378557195.07.0.581794298686.issue18958@psf.upfronthosting.co.za> Message-ID: <1382154421.18.0.141729313063.issue18958@psf.upfronthosting.co.za> Ezio Melotti added the comment: I'm not sure this should be documented in json.load/loads, and I'm not sure people will look there once they get this exception. The error is raised because the wrong codec is used (either by open() before passing the file object to json.load or by json.loads), so it's a user error rather than a problem with the json module. The error turns out to be particularly misleading because the decoding is successful even though it produces a wrong result, and the problem becomes apparent only once it reaches json. ISTM that the documentation is already clear enough that json doesn't auto-detect encodings and uses UTF-8 by default, and that different encodings should be specified explicitly. I think that a better and backward-compatible solution would be to detect the UTF-8 BOM and provide a better error message hinting at utf-8-sig. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 06:08:24 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 19 Oct 2013 04:08:24 +0000 Subject: [issue18958] Exception('No JSON object could be decoded') when parsing a valid JSON In-Reply-To: <1378557195.07.0.581794298686.issue18958@psf.upfronthosting.co.za> Message-ID: <1382155704.03.0.419375939602.issue18958@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here is a proof of concept that raises this error: >>> import json; json.load(open('input.json')) Traceback (most recent call last): File "", line 1, in File "/home/wolf/dev/py/2.7/Lib/json/__init__.py", line 290, in load **kw) File "/home/wolf/dev/py/2.7/Lib/json/__init__.py", line 338, in loads return _default_decoder.decode(s) File "/home/wolf/dev/py/2.7/Lib/json/decoder.py", line 365, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/home/wolf/dev/py/2.7/Lib/json/decoder.py", line 381, in raw_decode obj, end = self.scan_once(s, idx) ValueError: Unexpected UTF-8 BOM (decode using utf-8-sig): line 1 column 1 (char 0) If the idea is OK I will add tests and implement it for the Python scanner too (and possibly tweak the error message if you have better suggestions). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 06:08:43 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 19 Oct 2013 04:08:43 +0000 Subject: [issue18958] Exception('No JSON object could be decoded') when parsing a valid JSON In-Reply-To: <1378557195.07.0.581794298686.issue18958@psf.upfronthosting.co.za> Message-ID: <1382155723.14.0.513359635149.issue18958@psf.upfronthosting.co.za> Changes by Ezio Melotti : Added file: http://bugs.python.org/file32213/issue18958.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 06:09:56 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 19 Oct 2013 04:09:56 +0000 Subject: [issue18958] Exception('No JSON object could be decoded') when parsing a valid JSON In-Reply-To: <1378557195.07.0.581794298686.issue18958@psf.upfronthosting.co.za> Message-ID: <1382155796.59.0.936860477111.issue18958@psf.upfronthosting.co.za> Ezio Melotti added the comment: Forgot to add that the patch is for 2.7, and it also needs to be implemented in the unicode scanner. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 06:11:19 2013 From: report at bugs.python.org (David Edelsohn) Date: Sat, 19 Oct 2013 04:11:19 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1382155879.49.0.6931436088.issue19262@psf.upfronthosting.co.za> David Edelsohn added the comment: How is this ready for release? The patch does not work on numerous POSIX systems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 06:20:35 2013 From: report at bugs.python.org (David Edelsohn) Date: Sat, 19 Oct 2013 04:20:35 +0000 Subject: [issue19293] test_asyncio failures on AIX Message-ID: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> New submission from David Edelsohn: test_asyncio times out after one hour on AIX and leaves a process consuming 100% of a thread. [145/382/3] test_asyncio Timeout (1:00:00)! Thread 0x00000001: File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/selectors.py", line 265 in select File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/asyncio/base_events.py", line 576 in _run_once File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/asyncio/base_events.py", line 153 in run_forever File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/asyncio/base_events.py", line 172 in run_until_complete File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_asyncio/test_events.py", line 1012 in test_subprocess_interactive File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/case.py", line 571 in run File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/case.py", line 610 in __call__ File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/suite.py", line 117 in run File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/suite.py", line 79 in __call__ File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/suite.py", line 117 in run File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/suite.py", line 79 in __call__ File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/suite.py", line 117 in run File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/suite.py", line 79 in __call__ File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/runner.py", line 168 in run File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/support/__init__.py", line 1661 in _run_suite File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/support/__init__.py", line 1695 in run_unittest File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_asyncio/__init__.py", line 26 in test_main File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/regrtest.py", line 1276 in runtest_inner File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/regrtest.py", line 965 in runtest File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/regrtest.py", line 761 in main File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/regrtest.py", line 1560 in main_in_temp_cwd File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/__main__.py", line 3 in File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/runpy.py", line 73 in _run_code File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/runpy.py", line 160 in _run_module_as_main make: 1254-004 The error code from the last command is 1. ---------- messages: 200364 nosy: David.Edelsohn priority: normal severity: normal status: open title: test_asyncio failures on AIX type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 06:33:56 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 19 Oct 2013 04:33:56 +0000 Subject: [issue19287] __contains__() of dbm.ndbm databases fails with str In-Reply-To: <1382126242.51.0.42060822734.issue19287@psf.upfronthosting.co.za> Message-ID: <1382157236.95.0.379356310081.issue19287@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- keywords: +patch Added file: http://bugs.python.org/file32214/issue19287.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 06:34:56 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 19 Oct 2013 04:34:56 +0000 Subject: [issue19287] __contains__() of dbm.ndbm databases fails with str In-Reply-To: <1382126242.51.0.42060822734.issue19287@psf.upfronthosting.co.za> Message-ID: <1382157296.39.0.295880191499.issue19287@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- keywords: +easy stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 06:36:24 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 04:36:24 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <3d1rsg5h7kz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 7f69f4fadfd8 by Ned Deily in branch 'default': Issue #15663: Update OS X installer to use Tcl/Tk 8.5.15. http://hg.python.org/cpython/rev/7f69f4fadfd8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 06:36:46 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 04:36:46 +0000 Subject: [issue19019] Investigate using Apple clang for building OS X installers In-Reply-To: <1379190673.82.0.353716409802.issue19019@psf.upfronthosting.co.za> Message-ID: <3d1rsj2Jfzz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 5e385dcfbd32 by Ned Deily in branch 'default': Issue #19019: Change the OS X installer build script to use CFLAGS instead http://hg.python.org/cpython/rev/5e385dcfbd32 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 06:36:46 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 04:36:46 +0000 Subject: [issue14499] Extension module builds fail with Xcode 4.3 on OS X 10.7 due to SDK move In-Reply-To: <1333576900.91.0.0583021085072.issue14499@psf.upfronthosting.co.za> Message-ID: <3d1rsh3zQrz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 73532f33fbb3 by Ned Deily in branch 'default': Issue #14499: Fix several problems with OS X universal build support: http://hg.python.org/cpython/rev/73532f33fbb3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 06:37:21 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 Oct 2013 04:37:21 +0000 Subject: [issue18958] Exception('No JSON object could be decoded') when parsing a valid JSON In-Reply-To: <1378557195.07.0.581794298686.issue18958@psf.upfronthosting.co.za> Message-ID: <1382157441.5.0.232005828698.issue18958@psf.upfronthosting.co.za> Nick Coghlan added the comment: I like the new error message as a low-risk immediate improvement that nudges people in the direction of utf8-sig. It also leaves the door open to silently ignoring the BoM in the future without immediately committing to that approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 06:41:49 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 19 Oct 2013 04:41:49 +0000 Subject: [issue18985] Improve the documentation in fcntl module In-Reply-To: <1378722919.93.0.901392318122.issue18985@psf.upfronthosting.co.za> Message-ID: <1382157709.11.0.654285042666.issue18985@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 06:44:20 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 19 Oct 2013 04:44:20 +0000 Subject: [issue18918] help('FILES') finds no documentation In-Reply-To: <1378269620.52.0.763555902483.issue18918@psf.upfronthosting.co.za> Message-ID: <1382157860.59.0.873568264317.issue18918@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +georg.brandl stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 07:00:06 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 05:00:06 +0000 Subject: [issue19262] Add asyncio (tulip, PEP 3156) to stdlib In-Reply-To: <1381785499.02.0.594919468001.issue19262@psf.upfronthosting.co.za> Message-ID: <1382158806.86.0.481550500255.issue19262@psf.upfronthosting.co.za> Guido van Rossum added the comment: Please be more specific. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 07:06:21 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sat, 19 Oct 2013 05:06:21 +0000 Subject: [issue8964] platform._sys_version does not parse correctly IronPython 2.x version In-Reply-To: <1276204295.1.0.731236969654.issue8964@psf.upfronthosting.co.za> Message-ID: <1382159181.93.0.139770689129.issue8964@psf.upfronthosting.co.za> Martin Matusiak added the comment: It seems the versions of IronPython 1.0 mentioned in test cases do actually support the "in" keyword, so the first version of the patch is probably sufficient. Example session: >>> sys.version IronPython 1.0.60816 on .NET 2.0.50727.3643 >>> "IronPython" in sys.version True >>> sys.version.startswith("IronPython") True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 07:06:37 2013 From: report at bugs.python.org (koobs) Date: Sat, 19 Oct 2013 05:06:37 +0000 Subject: [issue877121] configure detects incorrect compiler optimization Message-ID: <1382159197.71.0.717861459388.issue877121@psf.upfronthosting.co.za> koobs added the comment: This also affects Python 2.7 / 3.1 on FreeBSD 10.x with CC=clang Referencing the PR here: http://www.freebsd.org/cgi/query-pr.cgi?pr=182952 Would like to see the commit backported as well. ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 07:07:22 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 05:07:22 +0000 Subject: [issue19293] test_asyncio failures on AIX In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382159242.47.0.42728900597.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: Is that traceback upside down compared to normal Python tracebacks? ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 07:10:56 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 19 Oct 2013 05:10:56 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1382159456.17.0.643085785647.issue2771@psf.upfronthosting.co.za> Ezio Melotti added the comment: Ping. ---------- nosy: -berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 07:12:28 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 05:12:28 +0000 Subject: [issue19293] test_asyncio failures on AIX In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382159548.28.0.105576389024.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: Assuming it is, it is hanging in the poll() syscall, here: http://hg.python.org/cpython/file/f3a2dab1623b/Lib/selectors.py#265 Could you see if it works better with select()? Comment out lines 402, 403 in that file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 07:15:46 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 19 Oct 2013 05:15:46 +0000 Subject: [issue19238] Misleading explanation of fill and align in format_spec In-Reply-To: <1381616869.75.0.196962613989.issue19238@psf.upfronthosting.co.za> Message-ID: <1382159746.83.0.191404929694.issue19238@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 07:16:02 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 19 Oct 2013 05:16:02 +0000 Subject: [issue19289] Incorrect documentation for format's fill character. In-Reply-To: <1382131901.96.0.924496461441.issue19289@psf.upfronthosting.co.za> Message-ID: <1382159762.35.0.809355544801.issue19289@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 07:17:03 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 19 Oct 2013 05:17:03 +0000 Subject: [issue19265] Increased test coverage for datetime pickling In-Reply-To: <1381836280.6.0.648453742391.issue19265@psf.upfronthosting.co.za> Message-ID: <1382159823.51.0.635335137312.issue19265@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 07:17:27 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 19 Oct 2013 05:17:27 +0000 Subject: [issue19271] Update OrderedDict "see also" link In-Reply-To: <1381913411.15.0.258294798121.issue19271@psf.upfronthosting.co.za> Message-ID: <1382159847.77.0.249416711354.issue19271@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 07:18:25 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 19 Oct 2013 05:18:25 +0000 Subject: [issue19273] Update PCbuild/readme.txt In-Reply-To: <1381956724.6.0.425752006149.issue19273@psf.upfronthosting.co.za> Message-ID: <1382159905.04.0.404066538003.issue19273@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 07:18:50 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 19 Oct 2013 05:18:50 +0000 Subject: [issue19280] Add a datatype to represent mime types to the email module In-Reply-To: <1382019183.72.0.422205662358.issue19280@psf.upfronthosting.co.za> Message-ID: <1382159930.57.0.162197696351.issue19280@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 07:49:17 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 19 Oct 2013 05:49:17 +0000 Subject: [issue19265] Increased test coverage for datetime pickling In-Reply-To: <1381836280.6.0.648453742391.issue19265@psf.upfronthosting.co.za> Message-ID: <1382161757.21.0.684378209412.issue19265@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I guess the extra coverage is in "if getstate" branch of class tzinfo: ... def __reduce__(self): getinitargs = getattr(self, "__getinitargs__", None) if getinitargs: args = getinitargs() else: args = () getstate = getattr(self, "__getstate__", None) if getstate: state = getstate() else: state = getattr(self, "__dict__", None) or None if state is None: return (self.__class__, args) else: return (self.__class__, args, state) The other branch is probably covered by timezone class tests. The patch looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 08:29:34 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Sat, 19 Oct 2013 06:29:34 +0000 Subject: [issue19282] dbm.open should be a context manager In-Reply-To: <1382082310.98.0.0309554787542.issue19282@psf.upfronthosting.co.za> Message-ID: <1382164174.21.0.0746613752247.issue19282@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Attached patch checks that the db is actually closed after the `with`. Also, I noticed that dbm.dumb doesn't behave like the rest of the variants, as seen in the following: >>> import dbm.dumb as d >>> db = d.open('test.dat', 'c') >>> db.close() >>> db.keys() Traceback (most recent call last): File "", line 1, in File "/tank/libs/cpython/Lib/dbm/dumb.py", line 212, in keys return list(self._index.keys()) AttributeError: 'NoneType' object has no attribute 'keys' >>> vs >>> import dbm.gnu as g >>> db = g.open('test.dat', 'c') >>> db.close() >>> db.keys() Traceback (most recent call last): File "", line 1, in _gdbm.error: GDBM object has already been closed >>> ---------- Added file: http://bugs.python.org/file32215/dbm1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 08:36:41 2013 From: report at bugs.python.org (=?utf-8?q?Mat=C4=9Bj_Stuchl=C3=ADk?=) Date: Sat, 19 Oct 2013 06:36:41 +0000 Subject: [issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238) In-Reply-To: <1376307172.38.0.0558370001214.issue18709@psf.upfronthosting.co.za> Message-ID: <1382164601.34.0.0390723838964.issue18709@psf.upfronthosting.co.za> Mat?j Stuchl?k added the comment: There's no longer any suspicion, no, at least from my side. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 08:57:08 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Sat, 19 Oct 2013 06:57:08 +0000 Subject: [issue17087] Improve the repr for regular expression match objects In-Reply-To: <1359589982.45.0.929656950631.issue17087@psf.upfronthosting.co.za> Message-ID: <1382165828.71.0.694448962705.issue17087@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Added patch based on Serhiy's, which addresses your comments. It drops the group count and renames group0 to `match`. ---------- Added file: http://bugs.python.org/file32216/sre_repr6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 08:58:16 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 19 Oct 2013 06:58:16 +0000 Subject: [issue969718] BASECFLAGS are not passed to module build line Message-ID: <1382165896.25.0.461529004874.issue969718@psf.upfronthosting.co.za> Ned Deily added the comment: Since I just noticed this and haven't seen it mentioned already: for the record, the Python Makefile for current versions is affected by this issue. The "sharedmods" target, which calls setup.py to build the standard library shared modules, explicitly passes into Distutils via shell variables values for CC, LDSHARED, and OPT. Unfortunately, as noted in this issue, Distutils does not look for an OPT variable. So, while CC and LDSHARED can be overridden from the make command with either macro arguments or env vars, OPT cannot: only the value determined at configure time will be used. I think that Chris's original distutils_opt_flag.patch should be applied to allow OPT to be overridden, without changing any other current behavior. AFAICT, the only compatibility issue would be if a script happened to already have an OPT env variable defined which would now get used by Distutils. I think the risks of that are pretty small and, in case, much smaller than the more extensive tweaking of Distutils behavior as is done in the Debian patches. My interest in this comes from discovering that the OS X installer build script has been overriding OPT for its own purposes, thereby inadvertently dropping compiler options determined by configure (things like -fwrapv) which can result in a broken interpreter. I've changed the installer build to no longer do that. But that does mean that users of the OS X installer will now see those missing compiler options during extension module builds and it is conceivable that could cause problems for some ext modules and there wouldn't be a simple way to work around them (e.g. by setting an OPT env value). If no one has any strong objections, I'll plan to commit that patch soon. ---------- components: -Distutils2 nosy: +ned.deily versions: -3rd party, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 09:03:19 2013 From: report at bugs.python.org (koobs) Date: Sat, 19 Oct 2013 07:03:19 +0000 Subject: [issue969718] BASECFLAGS are not passed to module build line Message-ID: <1382166199.73.0.705130935571.issue969718@psf.upfronthosting.co.za> Changes by koobs : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 09:09:50 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 07:09:50 +0000 Subject: [issue16612] Integrate "Argument Clinic" into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <3d1wGk25lwzSB7@mail.python.org> Roundup Robot added the comment: New changeset 8fde1a2c94dc by Larry Hastings in branch 'default': Issue #16612: Add "Argument Clinic", a compile-time preprocessor http://hg.python.org/cpython/rev/8fde1a2c94dc ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 09:10:52 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 19 Oct 2013 07:10:52 +0000 Subject: [issue16612] Integrate "Argument Clinic" into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1382166652.69.0.608533503151.issue16612@psf.upfronthosting.co.za> Larry Hastings added the comment: Checked in. Thanks everybody! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 09:23:42 2013 From: report at bugs.python.org (koobs) Date: Sat, 19 Oct 2013 07:23:42 +0000 Subject: [issue16612] Integrate "Argument Clinic" into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1382167422.53.0.970186075448.issue16612@psf.upfronthosting.co.za> koobs added the comment: _curses and _curses_panel fail to build after this commit on koobs-freebsd10 buildslave, with some lovely clang warnings too. Attaching full log here. ---------- nosy: +koobs Added file: http://bugs.python.org/file32217/koobs-freebsd10-py3x-build-610.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 09:29:37 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 19 Oct 2013 07:29:37 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1382167777.82.0.226699394341.issue1222585@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : Added file: http://bugs.python.org/file32218/python-2.7-distutils-C++.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 09:29:58 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 19 Oct 2013 07:29:58 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1382167798.49.0.797831733832.issue1222585@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : Added file: http://bugs.python.org/file32219/python-3.3-distutils-C++.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 09:30:13 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 19 Oct 2013 07:30:13 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1382167813.32.0.107724115668.issue1222585@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : Added file: http://bugs.python.org/file32220/python-3.4-distutils-C++.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 09:30:24 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 19 Oct 2013 07:30:24 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1382167824.57.0.778977879288.issue1222585@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : Removed file: http://bugs.python.org/file28508/python-2.7-distutils-C++.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 09:30:27 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 19 Oct 2013 07:30:27 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1382167827.17.0.274461511944.issue1222585@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : Removed file: http://bugs.python.org/file28509/python-3.2-distutils-C++.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 09:30:32 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 19 Oct 2013 07:30:32 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1382167832.97.0.326216224125.issue1222585@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : Removed file: http://bugs.python.org/file28511/python-3.4-distutils-C++.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 09:30:29 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 19 Oct 2013 07:30:29 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1382167829.46.0.0912132105632.issue1222585@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : Removed file: http://bugs.python.org/file28510/python-3.3-distutils-C++.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 09:33:09 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 19 Oct 2013 07:33:09 +0000 Subject: [issue969718] BASECFLAGS are not passed to module build line Message-ID: <1382167989.38.0.650653258444.issue969718@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: OPT should not be used in Distutils at all. Lib/distutils/sysconfig.py should have: if 'CFLAGS' in os.environ: cflags = os.environ['CFLAGS'] Makefile.pre.in should have: $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' CFLAGS='$(PY_CFLAGS)' \ _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build PY_CFLAGS is defined as: PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) So then OPT could be overriden when calling `make`. See my patch for Distutils in bug #1222585. That patch also cleans handling of flags. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 09:47:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 07:47:31 +0000 Subject: [issue16612] Integrate "Argument Clinic" into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <3d1x5n4wC9z7LjP@mail.python.org> Roundup Robot added the comment: New changeset 47618b00405b by Serhiy Storchaka in branch 'default': Fix compilation of the curses module (broken by issue #16612). http://hg.python.org/cpython/rev/47618b00405b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 09:49:27 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 19 Oct 2013 07:49:27 +0000 Subject: [issue969718] BASECFLAGS are not passed to module build line Message-ID: <1382168967.32.0.335590965008.issue969718@psf.upfronthosting.co.za> Ned Deily added the comment: Arfrever, your proposal is certainly one of many possible solutions and one that would be appropriate if we were designing the Python configure, Makefile, and Distutils components from scratch or looking at major changes to Distutils. But we're not at this point. We all know that Distutils is brittle and I think at this point in its life it is best to change as little as possible without really good reason. For better or worse, most distributors and package maintainers have figured out how to make Distutils do what they need to do until the next generation of package building starts being addressed post-3.4. The proposed patch solves a very specific problem with very little risk (IMO) to breaking anyone's current solutions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 09:51:50 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 19 Oct 2013 07:51:50 +0000 Subject: [issue16038] ftplib: unlimited readline() from connection In-Reply-To: <1348569175.14.0.867789583045.issue16038@psf.upfronthosting.co.za> Message-ID: <1382169110.67.0.272792441622.issue16038@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I think this is already fixed. Barry can we close this out? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 10:00:29 2013 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 19 Oct 2013 08:00:29 +0000 Subject: [issue16612] Integrate "Argument Clinic" into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1382169629.93.0.421960537668.issue16612@psf.upfronthosting.co.za> Changes by Stefan Behnel : ---------- nosy: -scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 10:13:47 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 19 Oct 2013 08:13:47 +0000 Subject: [issue16038] ftplib: unlimited readline() from connection In-Reply-To: <1348569175.14.0.867789583045.issue16038@psf.upfronthosting.co.za> Message-ID: <1382170427.25.0.608059451925.issue16038@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: It is fixed in Python 2.6, but not 2.7, 3.1, 3.2, 3.3, 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 10:36:40 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 19 Oct 2013 08:36:40 +0000 Subject: [issue8964] platform._sys_version does not parse correctly IronPython 2.x version In-Reply-To: <1382159181.93.0.139770689129.issue8964@psf.upfronthosting.co.za> Message-ID: <52624490.1000206@egenix.com> Marc-Andre Lemburg added the comment: On 19.10.2013 07:06, Martin Matusiak wrote: > > Martin Matusiak added the comment: > > It seems the versions of IronPython 1.0 mentioned in test cases do actually support the "in" keyword, so the first version of the patch is probably sufficient. > > Example session: > >>>> sys.version > IronPython 1.0.60816 on .NET 2.0.50727.3643 >>>> "IronPython" in sys.version > True >>>> sys.version.startswith("IronPython") > True In that case, I'm +1 on using both to clean up the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 10:46:44 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 19 Oct 2013 08:46:44 +0000 Subject: [issue19294] test_asyncio fails intermittently on OS X 10.4 Message-ID: <1382172404.1.0.731084144387.issue19294@psf.upfronthosting.co.za> New submission from Ned Deily: Since asyncio was checked in, there have been a couple of similar buildbot failures on the OS X 10.4 (Tiger) buildbot sandwiched around a successful run. I also saw a similar failure on a 10.4 system I have. So far, the OS X 10.6 (Snow Leopard) buildbot has not had any failures nor have I seen any so far in limited testing on other OS X version (newer than 10.4). http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/7093 http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/7095 >From the ====================================================================== ERROR: test_subprocess_shell (test.test_asyncio.test_events.KqueueEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_asyncio/test_events.py", line 1034, in test_subprocess_shell self.loop.run_until_complete(connect()) File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/base_events.py", line 177, in run_until_complete return future.result() File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/futures.py", line 221, in result raise self._exception File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/tasks.py", line 261, in _step result = next(coro) File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_asyncio/test_events.py", line 1031, in connect 'echo "Python"') File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/base_events.py", line 521, in subprocess_shell protocol, cmd, True, stdin, stdout, stderr, bufsize, **kwargs) File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/unix_events.py", line 161, in _make_subprocess_transport yield from transp._post_init() File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/unix_events.py", line 483, in _post_init proc.stdin) File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/base_events.py", line 507, in connect_write_pipe transport = self._make_write_pipe_transport(pipe, protocol, waiter) File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/unix_events.py", line 150, in _make_write_pipe_transport return _UnixWritePipeTransport(self, pipe, protocol, waiter, extra) File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/unix_events.py", line 273, in __init__ if not stat.S_ISFIFO(os.fstat(self._fileno).st_mode): OSError: [Errno 9] Bad file descriptor ====================================================================== ERROR: test_subprocess_shell (test.test_asyncio.test_events.SelectEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_asyncio/test_events.py", line 1034, in test_subprocess_shell self.loop.run_until_complete(connect()) File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/base_events.py", line 177, in run_until_complete return future.result() File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/futures.py", line 221, in result raise self._exception File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/tasks.py", line 261, in _step result = next(coro) File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_asyncio/test_events.py", line 1031, in connect 'echo "Python"') File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/base_events.py", line 521, in subprocess_shell protocol, cmd, True, stdin, stdout, stderr, bufsize, **kwargs) File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/unix_events.py", line 161, in _make_subprocess_transport yield from transp._post_init() File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/unix_events.py", line 483, in _post_init proc.stdin) File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/base_events.py", line 507, in connect_write_pipe transport = self._make_write_pipe_transport(pipe, protocol, waiter) File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/unix_events.py", line 150, in _make_write_pipe_transport return _UnixWritePipeTransport(self, pipe, protocol, waiter, extra) File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/unix_events.py", line 273, in __init__ if not stat.S_ISFIFO(os.fstat(self._fileno).st_mode): OSError: [Errno 9] Bad file descriptor ---------- components: Tests keywords: buildbot messages: 200389 nosy: gvanrossum, ned.deily priority: normal severity: normal status: open title: test_asyncio fails intermittently on OS X 10.4 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 11:48:08 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sat, 19 Oct 2013 09:48:08 +0000 Subject: [issue16742] PyOS_Readline drops GIL and calls PyOS_StdioReadline, which isn't thread safe In-Reply-To: <1356086390.48.0.327620937355.issue16742@psf.upfronthosting.co.za> Message-ID: <1382176088.64.0.477381196965.issue16742@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Perhaps in debug builds the memory apis should verify consistency and matching useage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 11:48:25 2013 From: report at bugs.python.org (CliffM) Date: Sat, 19 Oct 2013 09:48:25 +0000 Subject: [issue19249] Enumeration.__eq__ In-Reply-To: <1381693100.88.0.523701824631.issue19249@psf.upfronthosting.co.za> Message-ID: <1382176105.31.0.912399739066.issue19249@psf.upfronthosting.co.za> CliffM added the comment: It is appropriate to modify the pickle-module to trap (a potential) the singletonicity-breaking event and raise a warning ? (I'm guessing an exception would be far too rude) I like the idea of using identity-equality, but without the above trap one might get really weird bugs without a deep reading of the docs and/or code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 12:00:25 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 19 Oct 2013 10:00:25 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: <1382138334.23.0.419355699391.issue19292@psf.upfronthosting.co.za> Message-ID: <1382176825.57.0.484963259291.issue19292@psf.upfronthosting.co.za> Christian Heimes added the comment: I've implemented most of the necessarily bindings in #17134. It's still missing trust setting checks and #16487 to load certs from memory or file object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 12:11:21 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sat, 19 Oct 2013 10:11:21 +0000 Subject: [issue8964] platform._sys_version does not parse correctly IronPython 2.x version In-Reply-To: <1276204295.1.0.731236969654.issue8964@psf.upfronthosting.co.za> Message-ID: <1382177481.26.0.14185970236.issue8964@psf.upfronthosting.co.za> Martin Matusiak added the comment: Attaching a v3 which uses "in" and "startswith". Just for good measure I ran this module on IronPython 1.0 and it fails on import: - bytes literal: b'(__libc_init)' - "if" as infix operator: line 177 - "unexpected token open": use of "with" context manager on line 334 - "as" keyword: except OSError as why: line 430 - ImportError: No module named os. os and subprocess are missing altogether in IronPython 1.0. That's as far as I looked - there may be other issues still. So I decided to isolate this one function and see if it works. It fails because re.ASCII does not exist. If I remove that then the function runs and parses its own sys.version correctly. But it may be a bit of a stretch at this point to stay compatible that far back. ---------- Added file: http://bugs.python.org/file32221/issue8964_v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 12:13:35 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 19 Oct 2013 10:13:35 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: <1382138334.23.0.419355699391.issue19292@psf.upfronthosting.co.za> Message-ID: <1382177615.53.0.483229006152.issue19292@psf.upfronthosting.co.za> Christian Heimes added the comment: http://www.python.org/dev/peps/pep-0453/#bundling-ca-certificates-with-cpython proposes that ensurepip comes with a default CA cert bundle, too. I see two issues with the proposal: 1) We must have a way to update the cert bundle outside the release cycle, e.g. with a download-able package from PyPI 2) CA certs can have an implicit purpose that is not part of the X.509 cert. A cert may only apply to server certs, client certs, S/MIME and/or other purposes like software signing. I have found a couple of issues in NSS certdata parsers and cert bundles like curl, Egenix OpenSSL (both fixed) and Ubuntu (not fixed yet). In order to get it right we need a separate bundle for every purpose. See https://bugs.launchpad.net/ubuntu/+source/ca-certificates/+bug/1207004 A while ago I started a PEP about the topic but it's not done yet. https://bitbucket.org/tiran/peps/src/tip/pep-9999.txt ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 12:17:50 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 19 Oct 2013 10:17:50 +0000 Subject: [issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238) In-Reply-To: <1376307172.38.0.0558370001214.issue18709@psf.upfronthosting.co.za> Message-ID: <1382177870.34.0.10857501076.issue18709@psf.upfronthosting.co.za> Christian Heimes added the comment: I don't get it. Has somebody found a memory leak in my patch? Larry, I have removed 2.7, 3.3 and 3.4 from the affected versions. They fix has already landed. 3.1 and 3.2 are still open, though. Georg, the patch for 3.2 is still up to date. Are you going to commit it? ---------- versions: -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 12:21:58 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 19 Oct 2013 10:21:58 +0000 Subject: [issue19287] __contains__() of dbm.ndbm databases fails with str In-Reply-To: <1382126242.51.0.42060822734.issue19287@psf.upfronthosting.co.za> Message-ID: <1382178118.98.0.923777341993.issue19287@psf.upfronthosting.co.za> Vajrasky Kok added the comment: What about dbm.gnu and dbm.dumb? Should we add string key support as well? ---------- nosy: +vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 12:25:46 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 19 Oct 2013 10:25:46 +0000 Subject: [issue8964] platform._sys_version does not parse correctly IronPython 2.x version In-Reply-To: <1382177481.26.0.14185970236.issue8964@psf.upfronthosting.co.za> Message-ID: <52625E21.1080401@egenix.com> Marc-Andre Lemburg added the comment: On 19.10.2013 12:11, Martin Matusiak wrote: > > Attaching a v3 which uses "in" and "startswith". > > > Just for good measure I ran this module on IronPython 1.0 and it fails on import: > > - bytes literal: b'(__libc_init)' > - "if" as infix operator: line 177 > - "unexpected token open": use of "with" context manager on line 334 > - "as" keyword: except OSError as why: line 430 > - ImportError: No module named os. os and subprocess are missing altogether in IronPython 1.0. > > That's as far as I looked - there may be other issues still. > > So I decided to isolate this one function and see if it works. It fails because re.ASCII does not exist. If I remove that then the function runs and parses its own sys.version correctly. > > But it may be a bit of a stretch at this point to stay compatible that far back. Well, there's a catch here: the trunk version of platform.py is for Python 3. This does not need to stay backwards compatible to Python 2 (but keeping it close to the Python 2 version helps make merges easier). Then there's the Python 2.7 version, which receives patches like yours. This has to stay compatible for Python versions relying on it, which are in particular older IronPython and Jython versions that don't ship with their own stdlib. I think it's ok to use Python 2.4 as the latest version supported by the Python 2.7 platform.py. The module is used for creating Python packages and 2.4 is still used by some Zope/Plone installations. If IronPython 1.0 does not support Python 2.4, we don't need to support it in the 2.7 version of platform.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 12:28:13 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 19 Oct 2013 10:28:13 +0000 Subject: [issue19287] __contains__() of dbm.ndbm databases fails with str In-Reply-To: <1382126242.51.0.42060822734.issue19287@psf.upfronthosting.co.za> Message-ID: <1382178493.28.0.685907745364.issue19287@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Sorry, I just found out that you already created a separate ticket for dbm.gnu. http://bugs.python.org/issue19288 What about dbm.dumb? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 12:31:06 2013 From: report at bugs.python.org (Stefan Krah) Date: Sat, 19 Oct 2013 10:31:06 +0000 Subject: [issue19295] Make asyncio work without threads Message-ID: <1382178666.39.0.442915890559.issue19295@psf.upfronthosting.co.za> New submission from Stefan Krah: I'm referring to msg200288. I guess this is low priority, since not many people will want to use asyncio on a build --without-threads. ---------- keywords: buildbot messages: 200399 nosy: gvanrossum, skrah priority: low severity: normal stage: needs patch status: open title: Make asyncio work without threads type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 12:37:08 2013 From: report at bugs.python.org (Stefan Krah) Date: Sat, 19 Oct 2013 10:37:08 +0000 Subject: [issue19295] Make asyncio work without threads In-Reply-To: <1382178666.39.0.442915890559.issue19295@psf.upfronthosting.co.za> Message-ID: <1382179028.76.0.156233540181.issue19295@psf.upfronthosting.co.za> Stefan Krah added the comment: Meanwhile, the patch addresses the buildbot failure. I currently don't have access to the machine with my ssh-key, so I can't commit the patch right now. ---------- keywords: +patch Added file: http://bugs.python.org/file32222/issue19295.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 12:41:50 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 19 Oct 2013 10:41:50 +0000 Subject: [issue18777] Cannot compile _ssl.c using openssl > 1.0 In-Reply-To: <1376890287.78.0.562230025847.issue18777@psf.upfronthosting.co.za> Message-ID: <1382179310.82.0.30050409775.issue18777@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 12:56:52 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 19 Oct 2013 10:56:52 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1382180212.29.0.284873113196.issue19251@psf.upfronthosting.co.za> Christian Heimes added the comment: bytes(x ^ y for x, y in zip(a, b)) is super-slow if you have to do XOR inside a hot loop for a couple of ten thousand times. int.from_bytes + int.to_bytes is about ten times faster. I expect bitwise ops of bytes to be even faster and more readable. $ python3.3 -m timeit -n 100000 -s "a = b'a'*64; b = b'b'*64" "bytes(x ^ y for x, y in zip(a, b))" 100000 loops, best of 3: 7.5 usec per loop $ python3.3 -m timeit -n 100000 -s "a = b'a'*64; b = b'b'*64" "i = int.from_bytes(a, 'little') ^ int.from_bytes(b, 'little'); i.to_bytes(64, 'little')" 100000 loops, best of 3: 0.866 usec per loop ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 13:02:46 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 19 Oct 2013 11:02:46 +0000 Subject: [issue19296] Compiler warning when compiling dbm module Message-ID: <1382180566.13.0.638248121089.issue19296@psf.upfronthosting.co.za> New submission from Vajrasky Kok: I got this warning when compiling dbm module with Python 3.4. /home/sky/Code/python/programming_language/cpython/Modules/_dbmmodule.c: In function ?newdbmobject?: /home/sky/Code/python/programming_language/cpython/Modules/_dbmmodule.c:55:5: warning: passing argument 1 of ?dbm_open? discards ?const? qualifier from pointer target type [enabled by default] In file included from /home/sky/Code/python/programming_language/cpython/Modules/_dbmmodule.c:16:0: /usr/include/ndbm.h:55:14: note: expected ?char *? but argument is of type ?const char *? I have two ndbm.h. /usr/include/ndbm.h /usr/include/gdbm/ndbm.h Both of them expect char *file not const char *file in dbm_open. I downloaded the newest GNU database manager from http://www.gnu.org.ua/software/gdbm/download.html (gdbm-1.10.tar.gz). It expects char *file as well in dbm_open. Attached the patch to silent the compiler warning. But when I searched 'dbm_open' in search engines or did "man dbm_open", I got: DBM *dbm_open(const char *file, int open_flags, mode_t file_mode); So I am not really sure about this. Feel free to close this ticket if it is not valid. ---------- components: Extension Modules files: silent_compiler_warning_dbm_module.patch keywords: patch messages: 200402 nosy: vajrasky priority: normal severity: normal status: open title: Compiler warning when compiling dbm module versions: Python 3.4 Added file: http://bugs.python.org/file32223/silent_compiler_warning_dbm_module.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 13:16:17 2013 From: report at bugs.python.org (Berker Peksag) Date: Sat, 19 Oct 2013 11:16:17 +0000 Subject: [issue19287] __contains__() of dbm.ndbm databases fails with str In-Reply-To: <1382126242.51.0.42060822734.issue19287@psf.upfronthosting.co.za> Message-ID: <1382181377.27.0.53177308563.issue19287@psf.upfronthosting.co.za> Berker Peksag added the comment: > What about dbm.dumb? dbm.dumb works fine with str: $ python3.3 -c 'from dbm import dumb; db=dumb.open("/tmp/db2", "c"); db["key"]="value"; print(b"key" in db); print("key" in db)' True True $ ./python -c 'from dbm import dumb; db=dumb.open("/tmp/db2", "c"); db["key"]="value"; print(b"key" in db); print("key" in db)' True True http://hg.python.org/cpython/file/47618b00405b/Lib/dbm/dumb.py#l217 ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 13:34:40 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 19 Oct 2013 11:34:40 +0000 Subject: [issue16742] PyOS_Readline drops GIL and calls PyOS_StdioReadline, which isn't thread safe In-Reply-To: <1382176088.64.0.477381196965.issue16742@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > Kristj?n Valur J?nsson added the comment: > > Perhaps in debug builds the memory apis should verify consistency and matching useage. Python does check usage of apis in debug mode. Memory allocation failure are almost never checked. See my pyfailmalloc module for that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 13:37:46 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sat, 19 Oct 2013 11:37:46 +0000 Subject: [issue8964] platform._sys_version does not parse correctly IronPython 2.x version In-Reply-To: <1276204295.1.0.731236969654.issue8964@psf.upfronthosting.co.za> Message-ID: <1382182666.17.0.992921899703.issue8964@psf.upfronthosting.co.za> Martin Matusiak added the comment: Double checked that the test passes against both default and 2.7 branches. Is there anything else that needs to happen here or are you satisfied, Marc-Andre? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 13:50:02 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 19 Oct 2013 11:50:02 +0000 Subject: [issue18777] Cannot compile _ssl.c using openssl > 1.0 In-Reply-To: <1376890287.78.0.562230025847.issue18777@psf.upfronthosting.co.za> Message-ID: <1382183402.79.0.637384622956.issue18777@psf.upfronthosting.co.za> Christian Heimes added the comment: Trent, can you have a look? There seems to be a hickup with the linker and dynamic loader. Python picks up the ssl libraries from /usr/lib instead of /usr/local/lib ld -b build/temp.hp-ux-B.11.31-ia64-3.4/home/cpython/cpython/Modules/_ssl.o -L/usr/local/lib -lssl -lcrypto -o build/lib.hp-ux-B.11.31-ia64-3.4/_ssl.so /usr/lib/hpux32/dld.so: Unsatisfied code symbol 'CRYPTO_THREADID_set_callback' in load module 'build/lib.hp-ux-B.11.31-ia64-3.4/_ssl.so'. % ldd build/lib.hp-ux-B.11.31-ia64-3.4/_ssl.so libssl.so.1 => /usr/lib/hpux32/libssl.so.1 libcrypto.so.1 => /usr/lib/hpux32/libcrypto.so.1 libdl.so.1 => /usr/lib/hpux32/libdl.so.1 libc.so.1 => /usr/lib/hpux32/libc.so.1 libdl.so.1 => /usr/lib/hpux32/libdl.so.1 % strings /usr/lib/hpux32/libcrypto.so.1 | grep -i thread __thread_specific_seg BN_BLINDING_get_thread_id BN_BLINDING_set_thread_id CRYPTO_thread_id ---- But: % strings /usr/local/lib/hpux32/libcrypto.so | grep -i thread __thread_specific_seg BN_BLINDING_get_thread_id BN_BLINDING_set_thread_id CRYPTO_THREADID_current CRYPTO_THREADID_set_numeric CRYPTO_THREADID_get_callback CRYPTO_THREADID_set_callback Christian ---------- assignee: christian.heimes -> trent nosy: +trent priority: critical -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 13:53:07 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 11:53:07 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: <1382148431.62.0.979877534199.issue19292@psf.upfronthosting.co.za> Message-ID: <1382183555.2517.7.camel@fsol> Antoine Pitrou added the comment: > Why is this not a security patch? Because it's not a "vulnerability" > in the narrow technical sense? I expect that it will greatly increase > the actual practical security, by making it easier to do the right > thing. IMO it's not a vulnerability. It's not a security hole in Python: the flag is there for people to turn on or off, and the whole thing is documented (with a highly visible red warning). The situation is actually much better than in 2.7. I would also like to point out Python isn't a Web browser: its use cases are wider, and there's no default interactive UI to allow the user to bypass certificate issues (which are still common nowadays on the Internet). I think it makes it much less appropriate to be "strict by default". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 14:12:12 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 12:12:12 +0000 Subject: [issue19254] Python implementation of PBKDF2_HMAC In-Reply-To: <1381699880.62.0.48701357342.issue19254@psf.upfronthosting.co.za> Message-ID: <3d22zb3MR8z7LjP@mail.python.org> Roundup Robot added the comment: New changeset e73627483d2f by Christian Heimes in branch 'default': Issue #19254: Provide an optimized Python implementation of PBKDF2_HMAC http://hg.python.org/cpython/rev/e73627483d2f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 14:13:41 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 19 Oct 2013 12:13:41 +0000 Subject: [issue19254] Python implementation of PBKDF2_HMAC In-Reply-To: <1381699880.62.0.48701357342.issue19254@psf.upfronthosting.co.za> Message-ID: <1382184821.04.0.95240128744.issue19254@psf.upfronthosting.co.za> Christian Heimes added the comment: Serhiy, I have taken your review into account. I still need to use memoryview() in order to handle all types that are supported by the format char "y*". ---------- components: +Library (Lib) resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 14:25:47 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 12:25:47 +0000 Subject: [issue18582] PBKDF2 support In-Reply-To: <1375024279.36.0.0953079533445.issue18582@psf.upfronthosting.co.za> Message-ID: <3d23Gs6GVcz7LkC@mail.python.org> Roundup Robot added the comment: New changeset 0a26ef834a49 by Christian Heimes in branch 'default': Issue #18582: provide a faster C implementation of pbkdf2_hmac that works with OpenSSL < 1.0 http://hg.python.org/cpython/rev/0a26ef834a49 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 14:32:22 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 19 Oct 2013 12:32:22 +0000 Subject: [issue8964] platform._sys_version does not parse correctly IronPython 2.x version In-Reply-To: <1382182666.17.0.992921899703.issue8964@psf.upfronthosting.co.za> Message-ID: <52627BCE.1020709@egenix.com> Marc-Andre Lemburg added the comment: On 19.10.2013 13:37, Martin Matusiak wrote: > > Martin Matusiak added the comment: > > Double checked that the test passes against both default and 2.7 branches. > > Is there anything else that needs to happen here or are you satisfied, Marc-Andre? No, that's all :-) Thanks, Martin. Unfortunately, I don't have time in the next few days to check this in. Could one of the other core devs please do ? Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 14:52:39 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 19 Oct 2013 12:52:39 +0000 Subject: [issue19259] Provide Python implementation of operator.compare_digest() In-Reply-To: <1381750256.83.0.263124716214.issue19259@psf.upfronthosting.co.za> Message-ID: <1382187159.62.0.0955058759385.issue19259@psf.upfronthosting.co.za> Christian Heimes added the comment: it's in the _operator module because we needed a place to put it that is *always* available. The C backend for the hashlib module is only available on platforms with OpenSSL (hence the internal name Modules/_hashopenssl.c). The operator module already contains additional stuff like attrgetter() or itemgetter(). compare_digest is a special case of __eq__ with limited data types and a constant timing algorithm. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 14:56:08 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 19 Oct 2013 12:56:08 +0000 Subject: [issue18747] Re-seed OpenSSL's PRNG after fork In-Reply-To: <1376570101.71.0.249202475923.issue18747@psf.upfronthosting.co.za> Message-ID: <1382187368.68.0.0392010837122.issue18747@psf.upfronthosting.co.za> Christian Heimes added the comment: It's considered fixed but we have seen issues. The issues are tracked in #19227. AFAIK the fixed hasn't landed in 3.2 yet. I'm removing 2,7, 3.3 and 3.4 from the versions list. ---------- versions: -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 14:57:08 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 19 Oct 2013 12:57:08 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1382187428.67.0.966469337405.issue19227@psf.upfronthosting.co.za> Christian Heimes added the comment: Does 2.7 also hang? The pthread_atfork() handler is also installed in 2.7. Can you install the debugging symbols for libc and openssl on your machine? ---------- nosy: +benjamin.peterson, georg.brandl, larry priority: critical -> release blocker versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 15:07:56 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 19 Oct 2013 13:07:56 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1382054040.87.0.363785952414.issue19227@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > It looks as though fork() is indirectly calling something in _ssl.cpython-34dm.so which is not > completing. The stack is strange: what is /lib/libncursesw.so.5 doing there? Also, we can see exit() is being called. And indeed, _fini() is some shared libraary deallocation code... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 15:15:39 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 19 Oct 2013 13:15:39 +0000 Subject: [issue18777] Cannot compile _ssl.c using openssl > 1.0 In-Reply-To: <1376890287.78.0.562230025847.issue18777@psf.upfronthosting.co.za> Message-ID: <1382188539.98.0.616839485105.issue18777@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: -giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 15:20:17 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 19 Oct 2013 13:20:17 +0000 Subject: [issue18747] Re-seed OpenSSL's PRNG after fork In-Reply-To: <1376570101.71.0.249202475923.issue18747@psf.upfronthosting.co.za> Message-ID: <1382188817.0.0.601498567829.issue18747@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Well, I don't mean to be a pain, but I still think this patch shouldn't have been applied: it makes fork() not async-safe, which can trigger hard to debug, random bugs (#19227 might or might not be a direct consequence). at the very least, I still it shouldn't have been backported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 15:33:32 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 Oct 2013 13:33:32 +0000 Subject: [issue12029] Catching virtual subclasses in except clauses In-Reply-To: <1304844823.89.0.48444500115.issue12029@psf.upfronthosting.co.za> Message-ID: <1382189612.67.0.984952994858.issue12029@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 15:49:32 2013 From: report at bugs.python.org (Stefan Krah) Date: Sat, 19 Oct 2013 13:49:32 +0000 Subject: [issue19297] test_asyncio: unclosed sockets Message-ID: <1382190572.42.0.767959680712.issue19297@psf.upfronthosting.co.za> New submission from Stefan Krah: unittest produces the following resource warnings: $ ./python -m test -uall test_asyncio [1/1] test_asyncio /home/stefan/hg/master/Lib/unittest/case.py:571: ResourceWarning: unclosed testMethod() /home/stefan/hg/master/Lib/unittest/case.py:571: ResourceWarning: unclosed testMethod() /home/stefan/hg/master/Lib/unittest/case.py:571: ResourceWarning: unclosed testMethod() [...] It seems to happen whenever run_test_server() from asyncio/test_utils.py is used. ---------- components: Tests messages: 200417 nosy: skrah priority: normal severity: normal status: open title: test_asyncio: unclosed sockets versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 15:54:25 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 Oct 2013 13:54:25 +0000 Subject: [issue12029] Catching virtual subclasses in except clauses In-Reply-To: <1304844823.89.0.48444500115.issue12029@psf.upfronthosting.co.za> Message-ID: <1382190865.44.0.18203789375.issue12029@psf.upfronthosting.co.za> Nick Coghlan added the comment: The performance hit is that such a change would potentially make it more expensive to figure out that a raised exception *doesn't* match a given "except" clause, along with the complexity of introducing execution of arbitrary code while still unwinding the stack looking for an exception handler for the original exception. As Benjamin noted above we already support dynamic exception handling through dynamically bound tuple lookups, so I don't think this feature is needed for the Django used case: >>> caught_exceptions = () >>> def f(to_raise): ... try: ... raise to_raise ... except caught_exceptions: ... print("Caught the exception") ... >>> f(Exception) Traceback (most recent call last): File "", line 1, in File "", line 3, in f Exception >>> caught_exceptions = (Exception,) >>> f(Exception) Caught the exception I know Guido indicated above that he considers the current behaviour a bug, and I even agree that enshrining the two slightly different definitions of "issubclass" is ugly, but the complete lack of use cases without other solutions and the complex implications of unifying them mean that I think it may be worth accepting the additional complexity in the language definition instead. That means the question in my mind is whether we can make it less surprising/user-hostile by issuing a warning at class definition time. Since all exceptions are required to inherit from BaseException in order to be permitted in raise statements *or* except clauses, it seems to me that having a check in PyType ready that emits a warning when it detects the use of the virtual subclass machinery should suffice. That is, all of these should emit a warning: class BadExceptionABC_1(BaseException, metaclass=abc.ABCMeta): pass class BadExceptionABC_2(abc.ABC, BaseException): pass class BadExceptionABC_3(BaseException): def __instancecheck__(*args): return False class BadExceptionABC_4(BaseException): def __subclasscheck__(*args): return False We could even go further and make it a DeprecationWarning intially and upgrade to a full TypeError in a later release (although we obviously can't do that if Guido would prefer to unify the behaviour instead). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 15:59:48 2013 From: report at bugs.python.org (Brett Cannon) Date: Sat, 19 Oct 2013 13:59:48 +0000 Subject: [issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder In-Reply-To: <1377182986.55.0.892405433608.issue18810@psf.upfronthosting.co.za> Message-ID: <1382191188.64.0.141163567888.issue18810@psf.upfronthosting.co.za> Brett Cannon added the comment: Nick pointed out that the change to FileFinder is possibly going to break subclasses since the os module code doesn't treat '' as the cwd (which is unfortunate) and so people may have been relying on that never being the case. Really shouldn't matter all that much to the typical import though since PathFinder will still pass the full directory down to FileFinder. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 16:07:14 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 Oct 2013 14:07:14 +0000 Subject: [issue12029] Catching virtual subclasses in except clauses In-Reply-To: <1304844823.89.0.48444500115.issue12029@psf.upfronthosting.co.za> Message-ID: <1382191634.83.0.863750681734.issue12029@psf.upfronthosting.co.za> Nick Coghlan added the comment: Actually, I take back the performance comment - Jim's right that in the normal case, the slowdown should be minimal (it's just some additional checks that certain slots aren't populated on each listed exception class), and types can already influence that by messing with the MRO. That just leaves the complexity argument associated with running arbitrary code at an unexpected place in the eval loop, and for that the tests in the patch would need to be strengthened with some pathological examples like: - __subclasscheck__ raising an exception - __subclasscheck__ raising and then suppressing an exception - __subclasscheck__ invoking the garbage collector - __subclasscheck__ hitting the recursion limit - __subclasscheck__ provoking MemoryError The games the current patch already has to play with the recursion limit also bother me. However, if an alternate approach could be found that avoids the adjustment of the recursion limit in the eval loop, that also sensibly survived the kinds of arbitrary code execution torture tests I mention above, then I'd be far more sanguine about the idea of actually resolving the discrepancy rather than formalising it as part of the general fact that the exception hierarchy isn't as flexible as most of the rest of the language. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 16:10:47 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 14:10:47 +0000 Subject: [issue12029] Catching virtual subclasses in except clauses In-Reply-To: <1382191634.83.0.863750681734.issue12029@psf.upfronthosting.co.za> Message-ID: <1382191815.2517.12.camel@fsol> Antoine Pitrou added the comment: > Actually, I take back the performance comment - Jim's right that in > the normal case, the slowdown should be minimal (it's just some > additional checks that certain slots aren't populated on each listed > exception class), and types can already influence that by messing with > the MRO. I think that the performance question can only really be answered by running (micro-)benchmarks here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 16:26:28 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 19 Oct 2013 14:26:28 +0000 Subject: [issue19297] test_asyncio: unclosed sockets In-Reply-To: <1382190572.42.0.767959680712.issue19297@psf.upfronthosting.co.za> Message-ID: <1382192788.71.0.46728287373.issue19297@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Attached the patch to fix the resource warning problem. ---------- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file32224/close_httpd_server_in_asyncio_test_utils.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 16:37:31 2013 From: report at bugs.python.org (Brett Cannon) Date: Sat, 19 Oct 2013 14:37:31 +0000 Subject: [issue19298] Use __atribute__(cleanup ...) to detect refleaks Message-ID: <1382193451.78.0.278113981899.issue19298@psf.upfronthosting.co.za> New submission from Brett Cannon: GCC defines an __attribute__ called 'cleanup' which attaches to a variable declaration and specifies a function to execute with an argument of a pointer to the variable when the block scope is left. Typically this is used to automate cleanup (much like smart pointers in C++), but we can't do that if we want to support compilers other than GCC (and Clang based on my testing). Cleanup's definition can be found at http://gcc.gnu.org/onlinedocs/gcc/Variable-Attributes.html . But what we can use it for is refcount verification. So if we defined a freed(PyObject **) cleanup function we could verify in a debug build that the memory in fact was erased with the memory pattern that a debug build overwrites memory with. If something is expected to have <= 1 refcount (i.e. the variable's value is to be returned assuming nothing went wrong) then we could check if it was freed or if it had exactly a refcount of 1. This obviously only works for local variables which are assigned fresh objects (since there is no way to measure the delta of a refcount from assignment to block exit), but it would still help detect some refleaks. It would also potentially help with Dave Malcolm's gcc refleak detector by providing hints as to what the expected outcome is. Credit to David Stutzbach for suggesting this usage. ---------- components: Extension Modules, Interpreter Core messages: 200423 nosy: brett.cannon, dmalcolm, stutzbach priority: normal severity: normal stage: test needed status: open title: Use __atribute__(cleanup ...) to detect refleaks type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 16:56:38 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 14:56:38 +0000 Subject: [issue19297] test_asyncio: unclosed sockets In-Reply-To: <1382190572.42.0.767959680712.issue19297@psf.upfronthosting.co.za> Message-ID: <1382194598.84.0.231888967626.issue19297@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +gvanrossum stage: -> patch review type: -> resource usage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 16:57:58 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 19 Oct 2013 14:57:58 +0000 Subject: [issue19298] Use __atribute__(cleanup ...) to detect refleaks In-Reply-To: <1382193451.78.0.278113981899.issue19298@psf.upfronthosting.co.za> Message-ID: <1382194678.97.0.479744457977.issue19298@psf.upfronthosting.co.za> Christian Heimes added the comment: That's a fantastic idea! :) ---------- nosy: +christian.heimes versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 17:04:04 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 15:04:04 +0000 Subject: [issue19299] test_asyncio refleak failures Message-ID: <1382195044.62.0.738507777021.issue19299@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Either the tests forget to cleanup resources at the end, or the library itself has resource management issues. $ ./python -Wi -m test -R 3:3 test_asyncio [1/1] test_asyncio beginning 6 repetitions 123456 ...... test_asyncio leaked [240, -677, -158] references, sum=-595 test_asyncio leaked [36, -116, -29] memory blocks, sum=-109 ---------- components: Library (Lib), Tests messages: 200425 nosy: gvanrossum, pitrou priority: high severity: normal stage: needs patch status: open title: test_asyncio refleak failures type: resource usage versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 17:04:10 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 15:04:10 +0000 Subject: [issue19299] test_asyncio refleak failures In-Reply-To: <1382195044.62.0.738507777021.issue19299@psf.upfronthosting.co.za> Message-ID: <1382195050.24.0.464974133471.issue19299@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 17:08:08 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 15:08:08 +0000 Subject: [issue19291] Add docs for asyncio package (Tulip, PEP 3156) In-Reply-To: <1382137119.85.0.0934203099722.issue19291@psf.upfronthosting.co.za> Message-ID: <1382195288.23.0.939410198658.issue19291@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +eric.araujo, ezio.melotti, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 17:40:45 2013 From: report at bugs.python.org (David Edelsohn) Date: Sat, 19 Oct 2013 15:40:45 +0000 Subject: [issue19293] test_asyncio failures on AIX In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382197245.9.0.995340218897.issue19293@psf.upfronthosting.co.za> David Edelsohn added the comment: Commenting out poll in selectors.py does not help. AIX has its own epoll/kqueue efficient I/O event polling feature "pollset", which I will open as a separate enhancement request issue. Some of the subprocess tests in test_asyncio/test_events.py related to signals are hanging on AIX: test_subprocess_interactive, test_subprocess_kill and test_subprocess_send_signal all hang. This probably is related to Issue #18238 and the tests skipped in test_signal.py. The attached patch skips those tests on AIX. ---------- components: +Tests keywords: +patch Added file: http://bugs.python.org/file32225/issue19293.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 17:44:34 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 15:44:34 +0000 Subject: [issue19294] test_asyncio fails intermittently on OS X 10.4 In-Reply-To: <1382172404.1.0.731084144387.issue19294@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Thanks for reporting these. These tests sometimes pass and sometimes fail, right? I suspect that there's a race condition in the test and slower machines provoke it more often. I'm not sure what to do -- I won't have time to properly debug this until after the release; perhaps it's best to temporarily disable the failing tests? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 17:49:41 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 15:49:41 +0000 Subject: [issue19295] Make asyncio work without threads In-Reply-To: <1382178666.39.0.442915890559.issue19295@psf.upfronthosting.co.za> Message-ID: <3d27p76fSWz7LjS@mail.python.org> Roundup Robot added the comment: New changeset 1c281f3de48f by Guido van Rossum in branch 'default': Skip the asyncio tests when threads are not available. http://hg.python.org/cpython/rev/1c281f3de48f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 18:00:17 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 16:00:17 +0000 Subject: [issue18582] PBKDF2 support In-Reply-To: <1375024279.36.0.0953079533445.issue18582@psf.upfronthosting.co.za> Message-ID: <3d282M4Vtbz7LjS@mail.python.org> Roundup Robot added the comment: New changeset 88fac1574049 by Christian Heimes in branch 'default': Issue #18582: HMAC_CTX_copy() is not available on OpenSSL < 1.0 http://hg.python.org/cpython/rev/88fac1574049 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 18:02:19 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 16:02:19 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: <1382183555.2517.7.camel@fsol> Message-ID: Guido van Rossum added the comment: @Christian: What is holding up those patches? I don't believe we should be in the business of distributing certificates -- we should however make it easy to use the system certificates. @Antoine: I still claim that a flag that defaults to no security is a vulnerability -- nobody reads warnings in docs until *after* they've been bitten. It should be an explicit choice in the script or app to disable certificate checking. If you can't access a server because its certificate is expired, how is that different than any other misconfiguration that makes a server inaccessible until its administrator fixes it? On Sat, Oct 19, 2013 at 4:53 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > > Why is this not a security patch? Because it's not a "vulnerability" > > in the narrow technical sense? I expect that it will greatly increase > > the actual practical security, by making it easier to do the right > > thing. > > IMO it's not a vulnerability. It's not a security hole in Python: the > flag is there for people to turn on or off, and the whole thing is > documented (with a highly visible red warning). The situation is > actually much better than in 2.7. > > I would also like to point out Python isn't a Web browser: its use cases > are wider, and there's no default interactive UI to allow the user to > bypass certificate issues (which are still common nowadays on the > Internet). I think it makes it much less appropriate to be "strict by > default". > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 18:08:19 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 16:08:19 +0000 Subject: [issue19297] test_asyncio: unclosed sockets In-Reply-To: <1382190572.42.0.767959680712.issue19297@psf.upfronthosting.co.za> Message-ID: <1382198899.71.0.925458967895.issue19297@psf.upfronthosting.co.za> Guido van Rossum added the comment: I noticed this previously and was told it wasn't very important. Can I delay the fix until after the alpha 4 release? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 18:09:50 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 19 Oct 2013 16:09:50 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: Message-ID: <5262AECC.9080109@cheimes.de> Christian Heimes added the comment: Am 19.10.2013 18:02, schrieb Guido van Rossum: > @Christian: What is holding up those patches? I don't believe we should be > in the business of distributing certificates -- we should however make it > easy to use the system certificates. The usual issues: lack of time and too much to do. > > @Antoine: I still claim that a flag that defaults to no security is a > vulnerability -- nobody reads warnings in docs until *after* they've been > bitten. It should be an explicit choice in the script or app to disable > certificate checking. If you can't access a server because its certificate > is expired, how is that different than any other misconfiguration that > makes a server inaccessible until its administrator fixes it? It would be nice to add a feature to the SSL module that behaves like browsers: white list a cert's SPKI (subject private key info) for a FQDN + Port. Christian ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 18:10:46 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 16:10:46 +0000 Subject: [issue19293] test_asyncio failures on AIX In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <3d28Gt0sQnz7LjX@mail.python.org> Roundup Robot added the comment: New changeset 41a841fac7fb by Guido van Rossum in branch 'default': Disable some subprocess tests that hang on AIX. http://hg.python.org/cpython/rev/41a841fac7fb ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 18:18:20 2013 From: report at bugs.python.org (Stefan Krah) Date: Sat, 19 Oct 2013 16:18:20 +0000 Subject: [issue19297] test_asyncio: unclosed sockets In-Reply-To: <1382190572.42.0.767959680712.issue19297@psf.upfronthosting.co.za> Message-ID: <1382199500.43.0.870956311856.issue19297@psf.upfronthosting.co.za> Stefan Krah added the comment: Yes, the fix can certainly be delayed -- it's just a minor thing that's as little distracting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 18:18:25 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 16:18:25 +0000 Subject: [issue19293] test_asyncio failures on AIX In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382199505.53.0.793580386915.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks for the investigation and the patch. As to the deeper issue, I'm not sure I understand what's going on -- is this a bug in Python or in AIX? Is there a better work-around than disabling the test? The issue 18238 that you mention seems to be closed by disabling tests too, but that seems unsatisfactory. Is the real issue that select() and poll() on AIX cannot be interrupted by signals? That sounds really sad. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 18:22:48 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 16:22:48 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: Message-ID: <1382199734.2517.20.camel@fsol> Antoine Pitrou added the comment: > @Antoine: I still claim that a flag that defaults to no security is a > vulnerability -- nobody reads warnings in docs until *after* they've been > bitten. It should be an explicit choice in the script or app to disable > certificate checking. If we were introducing urllib right now, I agree it would be better to be "secure by default". But urlopen() has been there for a long time, it's used a lot and changing the default will break some of the scripts or apps that have been working fine for ages. > If you can't access a server because its certificate > is expired, how is that different than any other misconfiguration that > makes a server inaccessible until its administrator fixes it? It's different because the server isn't inaccessible. Its HTTPS service works fine, it's just that the certificate is untrustable according to some chosen security settings. (besides, an expired certificate is not a "misconfiguration"; it worked fine until it expired; not all systems have dedicated paid administrators, so this situation is not uncommon) Again, I think it may be reasonable to change in 3.4, but not in bugfix versions. By the way, I seem to remember even svn.python.org used a CACert-emitted certificate during a long time... a cert that wasn't validated by major browsers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 18:25:38 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 19 Oct 2013 16:25:38 +0000 Subject: [issue19293] test_asyncio failures on AIX In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382199938.61.0.0200640681268.issue19293@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Does AIX have an equivalent to Linux's strace? If yes, having a sample output would be helpful. Otherwise, maybe just adding manual debug traces to PollSelector.select() would help to see which events are reported. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 18:26:33 2013 From: report at bugs.python.org (Stefan Krah) Date: Sat, 19 Oct 2013 16:26:33 +0000 Subject: [issue19293] test_asyncio failures on AIX In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382199993.27.0.864260612139.issue19293@psf.upfronthosting.co.za> Stefan Krah added the comment: I think the failure is not only on AIX. The FreeBSD bots had similar failures, and here is one on PPC Linux: http://buildbot.python.org/all/builders/PPC64%20PowerLinux%203.x/builds/881/steps/test/logs/stdio Timeout (1:00:00)! Thread 0x0000008074e46670: File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/selectors.py", line 313 in select File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/asyncio/base_events.py", line 576 in _run_once File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/asyncio/base_events.py", line 153 in run_forever File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/asyncio/base_events.py", line 172 in run_until_complete File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/test_asyncio/test_events.py", line 1078 in test_subprocess_close_after_finish File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/unittest/case.py", line 571 in run File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/unittest/case.py", line 610 in __call__ File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/unittest/suite.py", line 117 in run File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/unittest/suite.py", line 79 in __call__ File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/unittest/suite.py", line 117 in run File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/unittest/suite.py", line 79 in __call__ File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/unittest/suite.py", line 117 in run File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/unittest/suite.py", line 79 in __call__ File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/unittest/runner.py", line 168 in run File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/support/__init__.py", line 1661 in _run_suite File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/support/__init__.py", line 1695 in run_unittest File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/test_asyncio/__init__.py", line 26 in test_main File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/regrtest.py", line 1276 in runtest_inner File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/regrtest.py", line 965 in runtest File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/regrtest.py", line 761 in main File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/regrtest.py", line 1560 in main_in_temp_cwd File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/__main__.py", line 3 in File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/runpy.py", line 73 in _run_code File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/runpy.py", line 160 in _run_module_as_main make: *** [buildbottest] Error 1 ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 18:29:42 2013 From: report at bugs.python.org (Stefan Krah) Date: Sat, 19 Oct 2013 16:29:42 +0000 Subject: [issue19285] test_asyncio failures on FreeBSD In-Reply-To: <1382121462.63.0.212652473904.issue19285@psf.upfronthosting.co.za> Message-ID: <1382200182.31.0.0995155906378.issue19285@psf.upfronthosting.co.za> Stefan Krah added the comment: Ok, the timings have been adjusted, so I'm making #19293 a superseder for the hanging issue. ---------- resolution: -> duplicate status: open -> closed superseder: -> test_asyncio failures on AIX _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 18:31:06 2013 From: report at bugs.python.org (Stefan Krah) Date: Sat, 19 Oct 2013 16:31:06 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382200266.76.0.7248573991.issue19293@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- title: test_asyncio failures on AIX -> test_asyncio hanging for 1 hour _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 18:40:25 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 16:40:25 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382200825.52.0.786692789537.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: [Off-topic: Heck, another one of those upside-down tracebacks. WHY???] I'll need a lot of help from folks on the affected platforms in debugging this, since these tests work fine when I run them on the platforms to which I have access (Ubuntu and OS X). I would also like to point out http://code.google.com/p/tulip/issues/detail?id=67 (and the thread referenced in my last message there) as well as http://code.google.com/p/tulip/issues/detail?id=68. Perhaps there are clues there. I hope that we'll be able to sort this out before the beta release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 18:41:07 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 16:41:07 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382200867.0.0.393411992067.issue19293@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- assignee: -> gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 18:48:20 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 16:48:20 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: <1382199734.2517.20.camel@fsol> Message-ID: Guido van Rossum added the comment: So you agree that we should change the urllib default in 3.4? I'm all for that. Tools like svn and hg have extensive configurations for this purpose, and (at least hg) secure defaults; I certainly remember having to deal with hg complaining about the security of some repo site, where the fix was something I had to put in my .hgrc. That's interactive enough. These days, I wouldn't trust a site that lets its certificate expire with anything important. On Sat, Oct 19, 2013 at 9:22 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > > @Antoine: I still claim that a flag that defaults to no security is a > > vulnerability -- nobody reads warnings in docs until *after* they've been > > bitten. It should be an explicit choice in the script or app to disable > > certificate checking. > > If we were introducing urllib right now, I agree it would be better to > be "secure by default". But urlopen() has been there for a long time, > it's used a lot and changing the default will break some of the scripts > or apps that have been working fine for ages. > > > If you can't access a server because its certificate > > is expired, how is that different than any other misconfiguration that > > makes a server inaccessible until its administrator fixes it? > > It's different because the server isn't inaccessible. Its HTTPS service > works fine, it's just that the certificate is untrustable according to > some chosen security settings. > > (besides, an expired certificate is not a "misconfiguration"; it worked > fine until it expired; not all systems have dedicated paid > administrators, so this situation is not uncommon) > > Again, I think it may be reasonable to change in 3.4, but not in bugfix > versions. > > By the way, I seem to remember even svn.python.org used a CACert-emitted > certificate during a long time... a cert that wasn't validated by major > browsers. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 18:51:52 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 16:51:52 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: Message-ID: <1382201480.2517.24.camel@fsol> Antoine Pitrou added the comment: > Tools like svn and hg have extensive configurations for this purpose, and > (at least hg) secure defaults; I certainly remember having to deal with hg > complaining about the security of some repo site, where the fix was > something I had to put in my .hgrc. That's interactive enough. It is not about svn and hg, it was just an example that even in the python.org realm we have used certificates that were (deliberately, in a way) untrusted by major software. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 18:53:56 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 16:53:56 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: <1382201480.2517.24.camel@fsol> Message-ID: Guido van Rossum added the comment: But do you agree that the urllib default should be changed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 18:55:18 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 16:55:18 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: Message-ID: <1382201687.2517.25.camel@fsol> Antoine Pitrou added the comment: > But do you agree that the urllib default should be changed? Well, I'm fine for 3.4, even though I'm not particularly enthusiastic :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 19:06:22 2013 From: report at bugs.python.org (py.user) Date: Sat, 19 Oct 2013 17:06:22 +0000 Subject: [issue19300] Swap keyword arguments in open() to make encoding easier to use Message-ID: <1382202382.72.0.542427782667.issue19300@psf.upfronthosting.co.za> New submission from py.user: >>> print(open.__doc__) open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None) -> file object It would be handy to use open('file.txt', 'r', 'utf-8') instead of open('file.txt', 'r', encoding='utf-8') ---------- components: Interpreter Core messages: 200445 nosy: py.user priority: normal severity: normal status: open title: Swap keyword arguments in open() to make encoding easier to use type: enhancement versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 19:08:10 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 19 Oct 2013 17:08:10 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: <1382138334.23.0.419355699391.issue19292@psf.upfronthosting.co.za> Message-ID: <1382202490.54.0.300750130537.issue19292@psf.upfronthosting.co.za> Christian Heimes added the comment: I fear it's a bit too late in the release cycle to get it right. Feature freeze is in about a month and this is a major change. The set_default_verify_paths() works only on some Unix platforms when OpenSSL configured with the distribution-specific paths to CAfile or CApath. A user installation of OpenSSL will most probably not work correctly. And there is Mac OS X ... Apple has deprecated OpenSSL and doesn't provide certificates as files. Apple's build of OpenSSL is patched and re-uses the keychain API. My Windows patch only offers certificates that already exist in Windows' cert stores. IE can trigger background downloads of yet unknown CA certs... IMHO we should add root CA certs for every purpose with Python and implement a way to replace the shipped certs with update packages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 19:08:57 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 19 Oct 2013 17:08:57 +0000 Subject: [issue19300] Swap keyword arguments in open() to make encoding easier to use In-Reply-To: <1382202382.72.0.542427782667.issue19300@psf.upfronthosting.co.za> Message-ID: <1382202537.21.0.0495510255195.issue19300@psf.upfronthosting.co.za> Ezio Melotti added the comment: That would be backward incompatible. ---------- nosy: +ezio.melotti resolution: -> rejected stage: -> committed/rejected status: open -> closed versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 19:31:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 19 Oct 2013 17:31:14 +0000 Subject: [issue16612] Integrate "Argument Clinic" into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1382203874.92.0.111944292146.issue16612@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch with yet some tiny changes (but they are too large for just comment). It corrects misleading docstrings of permute_*_option_groups() and simplifies rstrip_lines() and permute_optional_groups(). Fill free to apply those of them which look good to you. ---------- Added file: http://bugs.python.org/file32226/clinic_tiny_changes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 19:36:21 2013 From: report at bugs.python.org (David Edelsohn) Date: Sat, 19 Oct 2013 17:36:21 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382204181.74.0.53121230751.issue19293@psf.upfronthosting.co.za> David Edelsohn added the comment: My understanding of the issue is POSIX and The Open Group specification are ambiguous about the handling of Unix socket API calls when interrupted by a signal. Linux implements a more liberal, accommodating behavior and the Python Async I/O implementation is assuming those semantics. AIX inherited a lot from OSF, Mac OS X/Darwin inherited a lot from FreeBSD, both of which adopted more "unforgiving behavior". The following web page seems to summarize the issue: http://www.madore.org/~david/computers/connect-intr.html I don't know if the description still is accurate for BSDs, but AIX likely implemented more pedantic, unforgiving semantics. The standard seems to allow the behavior seen in AIX and FreeBSD, regardless of whether it is less useful / pleasant. From a pedantic standpoint, I think this is a bug in the Python implementation of Async I/O because it assumes behavior (implemented by Linux) not required by an implementation that conforms to the POSIX and Open Group specifications. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 19:39:55 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 17:39:55 +0000 Subject: [issue19279] UTF-7 to UTF-8 decoding crash In-Reply-To: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> Message-ID: <3d2BFl07jJzQmw@mail.python.org> Roundup Robot added the comment: New changeset 214c0aac7540 by Serhiy Storchaka in branch '2.7': Issue #19279: UTF-7 decoder no more produces illegal unicode strings. http://hg.python.org/cpython/rev/214c0aac7540 New changeset f471f2f05621 by Serhiy Storchaka in branch '3.3': Issue #19279: UTF-7 decoder no more produces illegal strings. http://hg.python.org/cpython/rev/f471f2f05621 New changeset 7dde9c553f16 by Serhiy Storchaka in branch 'default': Issue #19279: UTF-7 decoder no more produces illegal strings. http://hg.python.org/cpython/rev/7dde9c553f16 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 19:41:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 17:41:19 +0000 Subject: [issue18582] PBKDF2 support In-Reply-To: <1375024279.36.0.0953079533445.issue18582@psf.upfronthosting.co.za> Message-ID: <3d2BGx3xnyzQvx@mail.python.org> Roundup Robot added the comment: New changeset a15fcb847515 by Christian Heimes in branch 'default': Issue #18582: skip test of _hashlib.pbkdf2_hmac if OpenSSL is not available or too old http://hg.python.org/cpython/rev/a15fcb847515 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 19:47:40 2013 From: report at bugs.python.org (David Edelsohn) Date: Sat, 19 Oct 2013 17:47:40 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382204860.26.0.984115339096.issue19293@psf.upfronthosting.co.za> David Edelsohn added the comment: Also, the Python buildbot for AIX is running on a POWER AIX 7.1 system at OSU OSL that is a member of the "GCC Compile Farm" cluster on which FOSS developers can obtain free accounts. If you want access to an AIX system for testing, it's available. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 19:56:32 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 19 Oct 2013 17:56:32 +0000 Subject: [issue19301] Globals declared in function scope have wrong __qualname__ Message-ID: <1382205392.94.0.868971273395.issue19301@psf.upfronthosting.co.za> New submission from Alexandre Vassalotti: The value of __qualname__ for globals declared in function scope doesn't seems right to me: >>> def f(): ... global C ... class C: pass ... return C.__qualname__ ... >>> f() 'f..C' It would be much more useful to return 'C' in this case. In my case, fixing this would help me write cleaner unit tests for pickle, since it would allow me to keep test classes with their test code. ---------- assignee: alexandre.vassalotti messages: 200453 nosy: alexandre.vassalotti, pitrou priority: high severity: normal stage: needs patch status: open title: Globals declared in function scope have wrong __qualname__ type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 19:59:51 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 19 Oct 2013 17:59:51 +0000 Subject: [issue19259] Provide Python implementation of operator.compare_digest() In-Reply-To: <1381750256.83.0.263124716214.issue19259@psf.upfronthosting.co.za> Message-ID: <1382205591.59.0.500903638602.issue19259@psf.upfronthosting.co.za> Terry J. Reedy added the comment: attrgetter and itemgetter are partial versions of getattr (. operator) and op.getitem ([] operator). I see now that _compare_digest might have more clearly been named _eq_strng_slow ;-). ('Compare' implies to me a -1, 0, 1 return.) Are you planning to leave the initial '_' and if so, would this function be documented? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:01:06 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 18:01:06 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: <1382202490.54.0.300750130537.issue19292@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: No, please let's not get in the business of shipping certs. Please not. There should be only *one* place per system where sysadmins have to update certs. It would not scale if every language implementation were to have its own set of certs. Trusting only certs already on the system sounds fine. Reading certs from memory sounds like a good start no matter whether we manage to get the rest working, so please prioritize that. The next step should be fixing set_default_verify_paths() for Windows (at least for somewhat recent versions). On OS X it becomes a priority once the default build no longers use the system openssl. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:03:29 2013 From: report at bugs.python.org (David Edelsohn) Date: Sat, 19 Oct 2013 18:03:29 +0000 Subject: [issue19302] Add support for AIX pollset efficient event I/O polling Message-ID: <1382205809.97.0.496335957362.issue19302@psf.upfronthosting.co.za> New submission from David Edelsohn: Implement AIX pollset in Modules/selectmodule.c ---------- components: Extension Modules messages: 200457 nosy: David.Edelsohn priority: normal severity: normal status: open title: Add support for AIX pollset efficient event I/O polling type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:03:28 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 19 Oct 2013 18:03:28 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382204860.26.0.984115339096.issue19293@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: Wait, I think there's a misunderstanding here. POSIX does indeed leave undefined the behavior of syscalls when a signal is received: whether or not it fails with EINTR depends on the operating system, the SA_RESTART flag, etc. But the tests we're talking about send signals whose default actions are to terminate the process (e.g. SIGTERM, SIGHUP, etc): I cannot beleive AIX doesn't terminate the processes in these situations, I think it's a bug in asyncio which prevent the termination from being detected (David, you can just use "ps" to check that the processes are indeed terminated). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:04:04 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 18:04:04 +0000 Subject: [issue1772673] Replacing char* with const char* Message-ID: <3d2Bnb4mq5zR4L@mail.python.org> Roundup Robot added the comment: New changeset 3055e61f1e66 by Serhiy Storchaka in branch 'default': Issue #1772673: The type of `char*` arguments now changed to `const char*`. http://hg.python.org/cpython/rev/3055e61f1e66 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:05:11 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 19 Oct 2013 18:05:11 +0000 Subject: [issue1772673] Replacing char* with const char* Message-ID: <1382205911.72.0.831011881311.issue1772673@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:05:27 2013 From: report at bugs.python.org (David Edelsohn) Date: Sat, 19 Oct 2013 18:05:27 +0000 Subject: [issue19302] Add support for AIX pollset efficient event I/O polling In-Reply-To: <1382205809.97.0.496335957362.issue19302@psf.upfronthosting.co.za> Message-ID: <1382205927.98.0.681583507766.issue19302@psf.upfronthosting.co.za> David Edelsohn added the comment: Either create new pollset object or use pollset to provide implementation of Python epoll API on AIX. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:05:38 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 19 Oct 2013 18:05:38 +0000 Subject: [issue19301] Globals declared in function scope have wrong __qualname__ In-Reply-To: <1382205392.94.0.868971273395.issue19301@psf.upfronthosting.co.za> Message-ID: <1382205938.0.0.966884027341.issue19301@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:07:14 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 19 Oct 2013 18:07:14 +0000 Subject: [issue19298] Use __atribute__(cleanup ...) to detect refleaks In-Reply-To: <1382193451.78.0.278113981899.issue19298@psf.upfronthosting.co.za> Message-ID: <1382206034.19.0.131610168143.issue19298@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:09:29 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 18:09:29 +0000 Subject: [issue19301] Globals declared in function scope have wrong __qualname__ In-Reply-To: <1382205392.94.0.868971273395.issue19301@psf.upfronthosting.co.za> Message-ID: <1382206169.32.0.0272183708848.issue19301@psf.upfronthosting.co.za> Antoine Pitrou added the comment: That's interesting. I suppose it requires some tweaking in the compiler to get right. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:09:35 2013 From: report at bugs.python.org (David Edelsohn) Date: Sat, 19 Oct 2013 18:09:35 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382206175.86.0.0625789737402.issue19293@psf.upfronthosting.co.za> David Edelsohn added the comment: Check that which processes are terminated? The test eventually timed out after 1 hour and the process running echo.py continued to run. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:09:36 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 19 Oct 2013 18:09:36 +0000 Subject: [issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder In-Reply-To: <1377182986.55.0.892405433608.issue18810@psf.upfronthosting.co.za> Message-ID: <1382206176.27.0.0869420074266.issue18810@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:11:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 18:11:30 +0000 Subject: [issue12866] Add support for 24-bit samples in the audioop module In-Reply-To: <1314744712.67.0.770855933698.issue12866@psf.upfronthosting.co.za> Message-ID: <3d2Bxm6Pgvz7Ljt@mail.python.org> Roundup Robot added the comment: New changeset e1fa70053828 by Serhiy Storchaka in branch 'default': Issue #12866: The audioop module now supports 24-bit samples. http://hg.python.org/cpython/rev/e1fa70053828 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:11:35 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 18:11:35 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: Message-ID: Guido van Rossum added the comment: Actually, I think we're talking about the actual select() syscal not returning when SIGCHLD is received and handled. Running the C-level handler isn't enough, the syscall must return with EINTR so the Python handler can run (which then writes a byte to the self-pipe to ensure select() returns, but that seems too late). Maybe twiddling with SA_RESTART can fix this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:15:39 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 19 Oct 2013 18:15:39 +0000 Subject: [issue19301] Globals declared in function scope have wrong __qualname__ In-Reply-To: <1382205392.94.0.868971273395.issue19301@psf.upfronthosting.co.za> Message-ID: <1382206539.73.0.316855945067.issue19301@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I suppose it would also be desirable to have def f(): C = None def g(): nonlocal C class C: pass return g() have a different qualname, too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:17:20 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 18:17:20 +0000 Subject: [issue19279] UTF-7 to UTF-8 decoding crash In-Reply-To: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> Message-ID: <3d2C4v35xKzR4L@mail.python.org> Roundup Robot added the comment: New changeset 73ab6aba24e5 by Serhiy Storchaka in branch '3.3': Fixed tests for issue #19279. http://hg.python.org/cpython/rev/73ab6aba24e5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:17:26 2013 From: report at bugs.python.org (David Edelsohn) Date: Sat, 19 Oct 2013 18:17:26 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382206646.22.0.185069389011.issue19293@psf.upfronthosting.co.za> David Edelsohn added the comment: poll() vs select() does not make a difference. Using the default poll(), if I run python in GDB, test_process_interactive hangs in poll(). The top of the traceback looks like: #0 0xd02389d4 in __fd_poll () from /usr/lib/libc.a(shr.o) #1 0xd717e604 in poll (__listptr=0x2023e150, __nfds=1, __timeout=-1) at /usr/include/sys/poll.h:107 #2 0xd71800f8 in poll_poll (self=0x30696d10, args=0x304723b4) at /home/dje/src/cpython/Modules/selectmodule.c:543 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:18:08 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 19 Oct 2013 18:18:08 +0000 Subject: [issue12866] Add support for 24-bit samples in the audioop module In-Reply-To: <1314744712.67.0.770855933698.issue12866@psf.upfronthosting.co.za> Message-ID: <1382206688.74.0.975974480176.issue12866@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your review Antoine. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:19:58 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 19 Oct 2013 18:19:58 +0000 Subject: [issue19301] Globals declared in function scope have wrong __qualname__ In-Reply-To: <1382205392.94.0.868971273395.issue19301@psf.upfronthosting.co.za> Message-ID: <1382206798.52.0.169899286096.issue19301@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Supporting nonlocal variables would be nice. However, unless it is easy to implement, I don't think it is worth the effort since these variables can't be accessed outside the enclosing function's scope. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:23:14 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 19 Oct 2013 18:23:14 +0000 Subject: [issue1772673] Replacing char* with const char* Message-ID: <1382206994.57.0.466775824099.issue1772673@psf.upfronthosting.co.za> Ned Deily added the comment: Compile errors on OS X 10.8 with clang: cc -Wno-unused-result -Werror=declaration-after-statement -g -O0 -Wall -Wstrict-prototypes -I. -IInclude -I../../source/Include -DPy_BUILD_CORE -c ../../source/Modules/posixmodule.c -o Modules/posixmodule.o In file included from ../../source/Modules/posixmodule.c:5959: /usr/include/util.h:94:5: error: conflicting types for 'openpty' int openpty(int *, int *, char *, struct termios *, ^ ../../source/Include/pyport.h:676:12: note: previous declaration is here extern int openpty(int *, int *, char *, ^ In file included from ../../source/Modules/posixmodule.c:5959: /usr/include/util.h:97:7: error: conflicting types for 'forkpty' pid_t forkpty(int *, char *, struct termios *, struct winsize *); ^ ../../source/Include/pyport.h:678:14: note: previous declaration is here extern pid_t forkpty(int *, char *, ^ 2 errors generated. make: *** [Modules/posixmodule.o] Error 1 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:24:17 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 19 Oct 2013 18:24:17 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: Message-ID: Charles-Fran?ois Natali added the comment: > Guido van Rossum added the comment: > > Actually, I think we're talking about the actual select() syscal not > returning when SIGCHLD is received and handled. Running the C-level handler > isn't enough, the syscall must return with EINTR so the Python handler can > run (which then writes a byte to the self-pipe to ensure select() returns, > but that seems too late). Maybe twiddling with SA_RESTART can fix this? Hum, I just check asyncio's code, and it's not doing what I thought it was doing. SA_RESTART won't help: PyOS_setsig() already doesn't set it, and also calls siginterrupt() to ensure the syscall will be interrupted, but as can been seen here, that's not portable. The correct way to do this, IMO, would be to simply change BaseSelectorEventLoop._read_from_self() to read the signal number from the wakeup FD (Python's signal handler writes the signal number to this FD): then, we could call directly call the relevant signal handler. This way, this would succeed even if select()/poll()/whatever doesn't fail with EINTR (it'll also be a bit simpler/faster). I thought that's how it was done in tulip! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:32:28 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 19 Oct 2013 18:32:28 +0000 Subject: [issue19288] __contains__() of dbm.gnu databases fails with str In-Reply-To: <1382127793.56.0.416420933735.issue19288@psf.upfronthosting.co.za> Message-ID: <1382207548.22.0.408418746784.issue19288@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- keywords: +easy, patch stage: -> patch review Added file: http://bugs.python.org/file32227/issue19288.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:32:48 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 19 Oct 2013 18:32:48 +0000 Subject: [issue18606] Add statistics module to standard library In-Reply-To: <1375258820.22.0.0684222529612.issue18606@psf.upfronthosting.co.za> Message-ID: <1382207568.86.0.320367595776.issue18606@psf.upfronthosting.co.za> Larry Hastings added the comment: Mr. D'Aprano emailed me about getting this in for alpha 4. Since nobody else stepped up, I volunteered to check it in for him. There were some minor ReST errors in statistics.rst but I fixed 'em. ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:35:18 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 18:35:18 +0000 Subject: [issue18606] Add statistics module to standard library In-Reply-To: <1382207568.86.0.320367595776.issue18606@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Thanks Larry! On Sat, Oct 19, 2013 at 11:32 AM, Larry Hastings wrote: > > Larry Hastings added the comment: > > Mr. D'Aprano emailed me about getting this in for alpha 4. Since nobody > else stepped up, I volunteered to check it in for him. There were some > minor ReST errors in statistics.rst but I fixed 'em. > > ---------- > nosy: +larry > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:39:55 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 19 Oct 2013 18:39:55 +0000 Subject: [issue18235] _sysconfigdata.py wrong on AIX installations In-Reply-To: <1371429201.94.0.372851990361.issue18235@psf.upfronthosting.co.za> Message-ID: <1382207995.11.0.0132240048156.issue18235@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:40:15 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 18:40:15 +0000 Subject: [issue1772673] Replacing char* with const char* Message-ID: <3d2CZx42L8z7LjR@mail.python.org> Roundup Robot added the comment: New changeset 8bd69bd6e129 by Serhiy Storchaka in branch 'default': Restore prototypes for the 'openpty' and 'forkpty' on BSDI (broken in issue #1772673). http://hg.python.org/cpython/rev/8bd69bd6e129 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:43:55 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sat, 19 Oct 2013 18:43:55 +0000 Subject: [issue19303] Typo in devguide - coverage Message-ID: <1382208235.18.0.0734246482972.issue19303@psf.upfronthosting.co.za> New submission from Martin Matusiak: - Another option is to use an installed copy of coverage.py if you already have an installed copy. ---------- components: Devguide files: typo_coverage.diff keywords: patch messages: 200474 nosy: ezio.melotti, numerodix priority: normal severity: normal status: open title: Typo in devguide - coverage Added file: http://bugs.python.org/file32228/typo_coverage.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:44:36 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 18:44:36 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382208276.45.0.856398762933.issue19293@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > [Off-topic: Heck, another one of those upside-down tracebacks. WHY???] These are tracebacks emitted by the faulthandler module. They don't use the normal traceback printing machinery because it is impossible to do so in the conditions where those tracebacks are printed (e.g. from a signal handler). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:48:19 2013 From: report at bugs.python.org (David Edelsohn) Date: Sat, 19 Oct 2013 18:48:19 +0000 Subject: [issue18235] _sysconfigdata.py wrong on AIX installations In-Reply-To: <1371429201.94.0.372851990361.issue18235@psf.upfronthosting.co.za> Message-ID: <1382208499.9.0.928687257295.issue18235@psf.upfronthosting.co.za> David Edelsohn added the comment: Patch against current trunk ---------- keywords: +patch Added file: http://bugs.python.org/file32229/issue18235.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:50:26 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 18:50:26 +0000 Subject: [issue18606] Add statistics module to standard library In-Reply-To: <1375258820.22.0.0684222529612.issue18606@psf.upfronthosting.co.za> Message-ID: <3d2Cq52F7hz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 685e044bed5e by Larry Hastings in branch 'default': Issue #18606: Add the new "statistics" module (PEP 450). Contributed http://hg.python.org/cpython/rev/685e044bed5e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 20:52:09 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 19 Oct 2013 18:52:09 +0000 Subject: [issue18606] Add statistics module to standard library In-Reply-To: <1375258820.22.0.0684222529612.issue18606@psf.upfronthosting.co.za> Message-ID: <1382208729.37.0.804775690697.issue18606@psf.upfronthosting.co.za> Larry Hastings added the comment: Checked in. Thanks, Mr. D'Aprano! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 21:02:44 2013 From: report at bugs.python.org (David Edelsohn) Date: Sat, 19 Oct 2013 19:02:44 +0000 Subject: [issue18235] _sysconfigdata.py wrong on AIX installations In-Reply-To: <1371429201.94.0.372851990361.issue18235@psf.upfronthosting.co.za> Message-ID: <1382209364.41.0.530244499601.issue18235@psf.upfronthosting.co.za> David Edelsohn added the comment: With my patch applied, _sysconfig.py looks like 'BLDSHARED': '/usr/local/lib/python3.4/config/ld_so_aix gcc -pthread ' '-bI:/usr/local/lib/python3.4/config/python.exp', 'LDSHARED': '/usr/local/lib/python3.4/config/ld_so_aix gcc -pthread ' '-bI:/usr/local/lib/python3.4/config/python.exp', ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 21:07:19 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Sat, 19 Oct 2013 19:07:19 +0000 Subject: [issue19304] Typo in statistics.rst Message-ID: <1382209639.62.0.731892223733.issue19304@psf.upfronthosting.co.za> New submission from Claudiu.Popa: There are two small typos in statistics.rst. ---------- assignee: docs at python components: Documentation files: typos.patch keywords: patch messages: 200480 nosy: Claudiu.Popa, docs at python priority: normal severity: normal status: open title: Typo in statistics.rst versions: Python 3.4 Added file: http://bugs.python.org/file32230/typos.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 21:10:53 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 19:10:53 +0000 Subject: [issue19304] Typo in statistics.rst In-Reply-To: <1382209639.62.0.731892223733.issue19304@psf.upfronthosting.co.za> Message-ID: <3d2DGH44H0zSB7@mail.python.org> Roundup Robot added the comment: New changeset 900460f0fb2a by Ned Deily in branch 'default': Issue #19304: Fix typos noted by Claudiu Popa. http://hg.python.org/cpython/rev/900460f0fb2a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 21:11:00 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 19:11:00 +0000 Subject: [issue19299] test_asyncio refleak failures In-Reply-To: <1382195044.62.0.738507777021.issue19299@psf.upfronthosting.co.za> Message-ID: <1382209860.09.0.897771200616.issue19299@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It seems the attached patch solves it. ---------- assignee: -> gvanrossum keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file32231/base_event_close.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 21:11:34 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 19:11:34 +0000 Subject: [issue19299] test_asyncio refleak failures In-Reply-To: <1382195044.62.0.738507777021.issue19299@psf.upfronthosting.co.za> Message-ID: <1382209894.86.0.00466496810571.issue19299@psf.upfronthosting.co.za> Antoine Pitrou added the comment: (by the way, the part that really made a difference was losing the reference to the executor. I added the rest out of completeness.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 21:11:34 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 19 Oct 2013 19:11:34 +0000 Subject: [issue19304] Typo in statistics.rst In-Reply-To: <1382209639.62.0.731892223733.issue19304@psf.upfronthosting.co.za> Message-ID: <1382209894.27.0.503906122648.issue19304@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the patch. ---------- nosy: +ned.deily resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 21:20:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 19:20:43 +0000 Subject: [issue19303] Typo in devguide - coverage In-Reply-To: <1382208235.18.0.0734246482972.issue19303@psf.upfronthosting.co.za> Message-ID: <3d2DTf0dVCz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 72c9907e208e by Ned Deily in branch 'default': Issue #19303: Fix typo noted by Martin Matusiak. http://hg.python.org/devguide/rev/72c9907e208e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 21:21:23 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 19 Oct 2013 19:21:23 +0000 Subject: [issue19303] Typo in devguide - coverage In-Reply-To: <1382208235.18.0.0734246482972.issue19303@psf.upfronthosting.co.za> Message-ID: <1382210483.61.0.714969429525.issue19303@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the patch. ---------- nosy: +ned.deily resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 21:53:57 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 19 Oct 2013 19:53:57 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382212437.07.0.0162775195528.issue19293@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Here's a patch changing asyncio to not rely on a Python-level signal handler at all: it reads the signal number from the self-pipe. It should therefore work even if the select()/poll()/etc syscall doesn't fail with EINTR, and incidentally require only one wakup per signal. Also, it gets rid of BaseEventLoop._add_callback_signalsafe(). I just had to update a test which was timing-dependent (basically, before when a signal was received you had to add the handler to the ready list and issue a self-write to wakeup the main loop, now the handler is added to the ready list and the loop is automatically woken up). This should fix the PPC Linux and FreeBSD failures. I'm not so sure about AIX, since the error looks different. ---------- Added file: http://bugs.python.org/file32232/asyncio_signal.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 22:00:13 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 20:00:13 +0000 Subject: [issue18235] _sysconfigdata.py wrong on AIX installations In-Reply-To: <1371429201.94.0.372851990361.issue18235@psf.upfronthosting.co.za> Message-ID: <1382212813.25.0.971894327786.issue18235@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ha, that code dates back to 2000 and 2001 (f1e40abbedb3 and c958678720fd, respectively). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 22:06:17 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 20:06:17 +0000 Subject: [issue19301] Globals declared in function scope have wrong __qualname__ In-Reply-To: <1382205392.94.0.868971273395.issue19301@psf.upfronthosting.co.za> Message-ID: <3d2FVd0S2wz7LjX@mail.python.org> Roundup Robot added the comment: New changeset 35b384ed594b by Benjamin Peterson in branch 'default': give explicitly global functions and classes a global __qualname__ (closes #19301) http://hg.python.org/cpython/rev/35b384ed594b ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 22:07:24 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 19 Oct 2013 20:07:24 +0000 Subject: [issue19301] Globals declared in function scope have wrong __qualname__ In-Reply-To: <1382205392.94.0.868971273395.issue19301@psf.upfronthosting.co.za> Message-ID: <1382213244.14.0.303121390213.issue19301@psf.upfronthosting.co.za> Benjamin Peterson added the comment: There you go. I could do nonlocal, but that's a more work for no real benefit besides consistency. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 22:07:54 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 20:07:54 +0000 Subject: [issue18235] _sysconfigdata.py wrong on AIX installations In-Reply-To: <1371429201.94.0.372851990361.issue18235@psf.upfronthosting.co.za> Message-ID: <3d2FXV1JF0z7Ljb@mail.python.org> Roundup Robot added the comment: New changeset c554194240fc by Antoine Pitrou in branch '3.3': Issue #18235: Fix the sysconfig variables LDSHARED and BLDSHARED under AIX. http://hg.python.org/cpython/rev/c554194240fc New changeset e3ac917fcf9c by Antoine Pitrou in branch 'default': Issue #18235: Fix the sysconfig variables LDSHARED and BLDSHARED under AIX. http://hg.python.org/cpython/rev/e3ac917fcf9c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 22:08:38 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 20:08:38 +0000 Subject: [issue18235] _sysconfigdata.py wrong on AIX installations In-Reply-To: <1371429201.94.0.372851990361.issue18235@psf.upfronthosting.co.za> Message-ID: <1382213318.57.0.193519614122.issue18235@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed the patch. I trust you that you got it right! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 22:11:17 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 19 Oct 2013 20:11:17 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: <1382138334.23.0.419355699391.issue19292@psf.upfronthosting.co.za> Message-ID: <1382213477.26.0.149339963821.issue19292@psf.upfronthosting.co.za> Christian Heimes added the comment: Can somebody step in for #16487 please? For my stuff I just need to load DER as bytes and maybe PEM as str. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 22:35:54 2013 From: report at bugs.python.org (David Edelsohn) Date: Sat, 19 Oct 2013 20:35:54 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382214954.52.0.167512502911.issue19293@psf.upfronthosting.co.za> David Edelsohn added the comment: The patch cleans up a lot of the other failures for asyncio on AIX, but does not fix the hang. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 22:45:24 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 19 Oct 2013 20:45:24 +0000 Subject: [issue19287] __contains__() of dbm.ndbm databases fails with str In-Reply-To: <1382126242.51.0.42060822734.issue19287@psf.upfronthosting.co.za> Message-ID: <1382215524.01.0.973002389193.issue19287@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +georg.brandl, larry priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 22:58:47 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Oct 2013 20:58:47 +0000 Subject: [issue18606] Add statistics module to standard library In-Reply-To: <1375258820.22.0.0684222529612.issue18606@psf.upfronthosting.co.za> Message-ID: <1382216327.08.0.907008042306.issue18606@psf.upfronthosting.co.za> Georg Brandl added the comment: > I'm sorry if I stepped on your toes, but I didn't ignore your patch. If I've failed to follow the right procedure, it is due to inexperience, not malice. You yourself suggested it was only a temporary version just good enough to get the module committed, and in any case, it was already out of date since I've made sum private. No problem, just hate to see work being done twice. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 23:01:07 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 21:01:07 +0000 Subject: [issue19216] stat cache for import bootstrap In-Reply-To: <1381404050.43.0.806301244574.issue19216@psf.upfronthosting.co.za> Message-ID: <1382216467.0.0.952260680017.issue19216@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The real problem here is that the definition of "bootstrap" or "startup" is fuzzy. How do you decide when you stop caching? The only workable approach IMO is to adopt a time-based heuristic, which I did in issue14067. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 23:02:45 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 19 Oct 2013 21:02:45 +0000 Subject: [issue14067] Avoid more stat() calls in importlib In-Reply-To: <1329772687.53.0.782755770398.issue14067@psf.upfronthosting.co.za> Message-ID: <1382216565.23.0.106580952557.issue14067@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 23:02:55 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 19 Oct 2013 21:02:55 +0000 Subject: [issue19216] stat cache for import bootstrap In-Reply-To: <1381404050.43.0.806301244574.issue19216@psf.upfronthosting.co.za> Message-ID: <1382216575.09.0.400471263389.issue19216@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 23:07:03 2013 From: report at bugs.python.org (Lars Buitinck) Date: Sat, 19 Oct 2013 21:07:03 +0000 Subject: [issue18999] Support different contexts in multiprocessing In-Reply-To: <1378824821.26.0.31883015251.issue18999@psf.upfronthosting.co.za> Message-ID: <1382216823.36.0.548289334965.issue18999@psf.upfronthosting.co.za> Lars Buitinck added the comment: Strange, I can't actually get it to work: >>> from multiprocessing import Pool, get_context >>> forkserver = get_context('forkserver') >>> Pool(context=forkserver) Traceback (most recent call last): File "", line 1, in TypeError: Pool() got an unexpected keyword argument 'context' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 23:12:26 2013 From: report at bugs.python.org (Eric Snow) Date: Sat, 19 Oct 2013 21:12:26 +0000 Subject: [issue19216] stat cache for import bootstrap In-Reply-To: <1381404050.43.0.806301244574.issue19216@psf.upfronthosting.co.za> Message-ID: <1382217146.47.0.845762782495.issue19216@psf.upfronthosting.co.za> Eric Snow added the comment: Would it be feasible to have an explicit (but private?) flag in importlib indicating stat checking (or even all FS checking) should be disabled, defaulting to True? runpy could set it to False after initializing importlib and then back to True when startup is done. If that was useful for more than just startup, we could also add a contextmanager for it in importlib.util. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 23:12:50 2013 From: report at bugs.python.org (Lars Buitinck) Date: Sat, 19 Oct 2013 21:12:50 +0000 Subject: [issue18999] Support different contexts in multiprocessing In-Reply-To: <1378824821.26.0.31883015251.issue18999@psf.upfronthosting.co.za> Message-ID: <1382217170.49.0.0983225061592.issue18999@psf.upfronthosting.co.za> Lars Buitinck added the comment: I also tried from multiprocessing.pool import Pool but that died with ImportError: cannot import name get_context ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 23:14:42 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 21:14:42 +0000 Subject: [issue19216] stat cache for import bootstrap In-Reply-To: <1382217146.47.0.845762782495.issue19216@psf.upfronthosting.co.za> Message-ID: <1382217250.2517.26.camel@fsol> Antoine Pitrou added the comment: > Would it be feasible to have an explicit (but private?) flag in > importlib indicating stat checking (or even all FS checking) should be > disabled, defaulting to True? runpy could set it to False after > initializing importlib and then back to True when startup is done. I don't really understand the algorithm you're proposing. Also, have you read what I've just posted? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 23:20:56 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 19 Oct 2013 21:20:56 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <1382217656.2.0.316875099608.issue15663@psf.upfronthosting.co.za> Ned Deily added the comment: I guess the one remaining question about this issue is whether it should be backported to 2.7.x and/or 3.3.x. The implementation depends on the build changes implemented in Issue1584 to provide options to override default search paths for Tcl and Tk so that would have to be back ported as well. IMO, the entire set of changes are fairly well isolated and should be low risk: basically, they are all build-related changes and mostly isolated to OS X. The primary argument for backporting is that Tk support on current releases of OS X (from 10.6 Snow Leopard on) has been a major pain for our users, such that we have to keep recommending that they install a newer third-party Tcl/Tk to use IDLE or anything else Tkinter-based. So that goes against the batteries-included mission of the python.org installer, especially since the third-party version (ActiveTcl) is not totally free and open source (although it is free as in beer for most uses). On the other hand, one can argue that this is a new feature and thus prohibited in maintenance releases. On the other other hand, one can argue that this is a change driven by changes (or lack thereof) in the underlying OS platform and *essentially* only changes the building of the python.org OS X installer, so it is similar in concept to any other third-party distributor of Python changing an underlying system library. I would be OK with backporting or not but the decision needs to be made by the release managers. Benjamin? Georg? ---------- nosy: +benjamin.peterson, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 23:37:26 2013 From: report at bugs.python.org (Eric Snow) Date: Sat, 19 Oct 2013 21:37:26 +0000 Subject: [issue19216] stat cache for import bootstrap In-Reply-To: <1381404050.43.0.806301244574.issue19216@psf.upfronthosting.co.za> Message-ID: <1382218646.09.0.534911981579.issue19216@psf.upfronthosting.co.za> Eric Snow added the comment: > I don't really understand the algorithm you're proposing. In importlib._bootstrap: We have some global like "_CHECK_STAT=True". FileFinder would use it to decide on using stat checks or not. In Python/pythonrun.c: At the end of import_init(), we set importlib._bootstrap _CHECK_STAT to False. Then at the end of _Py_InitializeEx_Private() we set it back to True. (As an alternative, we could always not do stat checking for just the standard library) > Also, have you read what I've just posted? About the fuzziness of when startup is finished? As implied above, I'd say at the end of Py_Initialize(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 23:45:34 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 21:45:34 +0000 Subject: [issue19216] stat cache for import bootstrap In-Reply-To: <1382218646.09.0.534911981579.issue19216@psf.upfronthosting.co.za> Message-ID: <1382219102.2517.31.camel@fsol> Antoine Pitrou added the comment: > > Also, have you read what I've just posted? > > About the fuzziness of when startup is finished? As implied above, > I'd say at the end of Py_Initialize(). You only have imported a handful of modules by then. Real-world applications will import many more afterwards. Here's a little experiment (done with a system install of Python 2.7): $ python -v -c pass 2>&1 | grep "^import" | wc -l 33 $ python -v `which hg` 2>&1 | grep "^import" | wc -l 117 Note that Mercurial has a lazy importer in order to improve startup time, otherwise the number would be higher yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 19 23:47:49 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 19 Oct 2013 21:47:49 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <1382219269.15.0.439122465917.issue15663@psf.upfronthosting.co.za> Benjamin Peterson added the comment: We've upgraded the versions of other embedded libraries in 2.7 bugfix releases, so I'm okay with this for 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 00:09:28 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 19 Oct 2013 22:09:28 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382214954.52.0.167512502911.issue19293@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > The patch cleans up a lot of the other failures for asyncio on AIX Great. > but does not fix the hang. I was expecting this :-) Note that the hang is really strange, especially since the first run_until_complete() succeeds. Without more information, it'll be really hard to debug. If you don't have an strace equivalent, then the only option is to add ad-hoc debug statements to see: - if the data gets written to the pipe - if data is read from the pipe There's something strange in the stack you posted above: there seems to be a single FD in the poll() set, whereas there should be at least 3 (stdin, stdout and stderr). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 00:13:56 2013 From: report at bugs.python.org (Ron Adam) Date: Sat, 19 Oct 2013 22:13:56 +0000 Subject: [issue18387] Add 'symbols' link to pydoc's html menu bar. In-Reply-To: <1373131695.63.0.960870867634.issue18387@psf.upfronthosting.co.za> Message-ID: <1382220836.43.0.846306924109.issue18387@psf.upfronthosting.co.za> Ron Adam added the comment: Adding you Nick, I don't have commit rights. This probably doesn't need much.. maybe a one line comment in news is all. (And maybe not even that.) ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 00:28:50 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Sat, 19 Oct 2013 22:28:50 +0000 Subject: [issue18999] Support different contexts in multiprocessing In-Reply-To: <1378824821.26.0.31883015251.issue18999@psf.upfronthosting.co.za> Message-ID: <1382221730.1.0.740227360548.issue18999@psf.upfronthosting.co.za> Richard Oudkerk added the comment: I guess this should be clarified in the docs, but multiprocessing.pool.Pool is a *class* whose constructor takes a context argument, where as multiprocessing.Pool() is a *bound method* of the default context. (In previous versions multiprocessing.Pool was a *function*.) The only reason you might need the context argument is if you have subclassed multiprocessing.pool.Pool. >>> from multiprocessing import pool, get_context >>> forkserver = get_context('forkserver') >>> p = forkserver.Pool() >>> q = pool.Pool(context=forkserver) >>> p, q (, ) I suppose we could just make the bound methods accept a context argument which (if not None) is used instead of self. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 00:32:32 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 22:32:32 +0000 Subject: [issue19299] test_asyncio refleak failures In-Reply-To: <1382195044.62.0.738507777021.issue19299@psf.upfronthosting.co.za> Message-ID: <1382221952.56.0.521470944599.issue19299@psf.upfronthosting.co.za> Guido van Rossum added the comment: Looks good. How about adding executor.shutdown(wait=False)? E.g. def close(self): self._ready.clear() self._scheduled.clear() executor = self._default_executor if executor is not None: self._default_executor = None executor.shutdown(wait=False) If that works for you, please commit. ---------- assignee: gvanrossum -> pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 00:33:02 2013 From: report at bugs.python.org (Ethan Furman) Date: Sat, 19 Oct 2013 22:33:02 +0000 Subject: [issue19249] Enumeration.__eq__ In-Reply-To: <1381693100.88.0.523701824631.issue19249@psf.upfronthosting.co.za> Message-ID: <1382221982.21.0.471794198221.issue19249@psf.upfronthosting.co.za> Ethan Furman added the comment: Given the rarity of singletons, I don't think changing pickle in that way is appropriate. Besides, pickle protocol 2 and above don't have the problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 00:50:22 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 22:50:22 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382223022.86.0.0341052141639.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: I guess it's a shame that the two issues got merged, since now it looks like they may have to be unmerged again. I sent a few comments to neologix' patch that should be easy to address; for AIX I'm afraid we're still looking for more info from David. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 00:55:26 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 22:55:26 +0000 Subject: [issue19299] test_asyncio refleak failures In-Reply-To: <1382195044.62.0.738507777021.issue19299@psf.upfronthosting.co.za> Message-ID: <3d2KFP0wvvz7Ljs@mail.python.org> Roundup Robot added the comment: New changeset 4019694a1ce4 by Antoine Pitrou in branch 'default': Issue #19299: fix refleak test failures in test_asyncio http://hg.python.org/cpython/rev/4019694a1ce4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 00:55:54 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 22:55:54 +0000 Subject: [issue19299] test_asyncio refleak failures In-Reply-To: <1382195044.62.0.738507777021.issue19299@psf.upfronthosting.co.za> Message-ID: <1382223354.71.0.72824789147.issue19299@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, should be fixed now! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 01:13:51 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 23:13:51 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382224431.53.0.551154261699.issue19293@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The exact same hanging seems to happen under Ubuntu 8.04 LTS: http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/8803/steps/test/logs/stdio [176/383] test_asyncio Timeout (1:00:00)! Thread 0x404e48c0: File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/selectors.py", line 313 in select File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/asyncio/base_events.py", line 576 in _run_once File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/asyncio/base_events.py", line 153 in run_forever File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/asyncio/base_events.py", line 172 in run_until_complete File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_asyncio/test_events.py", line 1081 in test_subprocess_close_after_finish File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/case.py", line 571 in run File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/case.py", line 610 in __call__ File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/suite.py", line 117 in run File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/suite.py", line 79 in __call__ File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/suite.py", line 117 in run File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/suite.py", line 79 in __call__ File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/suite.py", line 117 in run File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/suite.py", line 79 in __call__ File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/runner.py", line 168 in run File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/__init__.py", line 1661 in _run_suite File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/__init__.py", line 1695 in run_unittest File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_asyncio/__init__.py", line 31 in test_main File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/regrtest.py", line 1276 in runtest_inner File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/regrtest.py", line 965 in runtest File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/regrtest.py", line 761 in main File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/regrtest.py", line 1560 in main_in_temp_cwd File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/__main__.py", line 3 in File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/runpy.py", line 73 in _run_code File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/runpy.py", line 160 in _run_module_as_main ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 01:14:20 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 19 Oct 2013 23:14:20 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382224460.21.0.511250449931.issue19293@psf.upfronthosting.co.za> Larry Hastings added the comment: There's also a test that hangs for 1 hour on the Ubuntu x86 buildbot. Sample failure: http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/8803/ ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 01:18:45 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 23:18:45 +0000 Subject: [issue19305] sporadic test_asyncio failure under FreeBSD Message-ID: <1382224725.63.0.152708776647.issue19305@psf.upfronthosting.co.za> New submission from Antoine Pitrou: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.0%203.x/builds/626/steps/test/logs/stdio ====================================================================== FAIL: test_create_server (test.test_asyncio.test_events.SelectEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/koobs-freebsd10/3.x.koobs-freebsd10/build/Lib/test/test_asyncio/test_events.py", line 568, in test_create_server self.assertEqual(3, proto.nbytes) AssertionError: 3 != 0 ---------- components: Library (Lib), Tests keywords: buildbot messages: 200515 nosy: gvanrossum, koobs, pitrou priority: normal severity: normal stage: needs patch status: open title: sporadic test_asyncio failure under FreeBSD type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 01:26:56 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 23:26:56 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382225216.69.0.408054186262.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: If CF's patch fixes the Ubuntu hang, commit it! We can iterate on my nits post-alpha. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 01:31:06 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 23:31:06 +0000 Subject: [issue19305] sporadic test_asyncio failure under FreeBSD In-Reply-To: <1382224725.63.0.152708776647.issue19305@psf.upfronthosting.co.za> Message-ID: <1382225466.87.0.482193877232.issue19305@psf.upfronthosting.co.za> Guido van Rossum added the comment: I'm guessing there's a whole lot of tests calling run_briefly() that really need to be fixed along these lines: http://code.google.com/p/tulip/source/detail?r=44e4c8257a9d I'd like to add a new method to test_utils.py for that purpose. But if at all possible I'd like to do that post alpha release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 01:31:37 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 23:31:37 +0000 Subject: [issue19305] sporadic test_asyncio failure under FreeBSD In-Reply-To: <1382224725.63.0.152708776647.issue19305@psf.upfronthosting.co.za> Message-ID: <1382225497.47.0.677819569387.issue19305@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- assignee: -> gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 01:34:07 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 19 Oct 2013 23:34:07 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: Message-ID: Charles-Fran?ois Natali added the comment: > Guido van Rossum added the comment: > > Actually, I think we're talking about the actual select() syscal not > returning when SIGCHLD is received and handled. Running the C-level handler > isn't enough, the syscall must return with EINTR so the Python handler can > run (which then writes a byte to the self-pipe to ensure select() returns, > but that seems too late). I just realized the following: there's no need for EINTR to break out of select(), that's what the self-pipe is for: since the write-end is registered as wakeup FD, and the read-end is registered in the selector, when the C-level signal handler is executed, it writes to the wakeup FD, therefore the select() syscall should return with the read-end ready, or more likely fail with EINTR. And then, the Python-level signal handler should be executed (from the main loop), scheduling a callback, and re-trigerring a wakup through the self-pipe. If this doesn't work as-is, I only see two explanations: - the C-level signal handler doesn't get called, which seems impossible - the python-level signal handler doesn't get executed before the main loop re-enters select(), but since the new GIL signal handlers are called at each eval loop In short, I'm puzzled. I can tell why my patch should work, but I'm not sure why the current approach doesn't. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 01:39:59 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 23:39:59 +0000 Subject: [issue19305] sporadic test_asyncio failure under FreeBSD In-Reply-To: <1382224725.63.0.152708776647.issue19305@psf.upfronthosting.co.za> Message-ID: <1382225999.01.0.92424596358.issue19305@psf.upfronthosting.co.za> Antoine Pitrou added the comment: How about the following? I was a bit annoyed I had to pass the loop explicitly to task.sleep(). ---------- assignee: gvanrossum -> keywords: +patch Added file: http://bugs.python.org/file32233/asyncio_wait_for.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 01:42:31 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 23:42:31 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382226151.74.0.648235713264.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: Hm... Maybe the wakeup_fd machinery is broken on some systems? Has anybody been able to confirm that CF's patch fixes the hang on any non-AIX system? If so, maybe we should commit first, understand later... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 01:43:55 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 23:43:55 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382226235.21.0.0712496053726.issue19293@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't have access to an Ubuntu 8.04 box, but if David Bolen can test the patch it would be great. ---------- nosy: +db3l _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 01:47:44 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 23:47:44 +0000 Subject: [issue19305] sporadic test_asyncio failure under FreeBSD In-Reply-To: <1382224725.63.0.152708776647.issue19305@psf.upfronthosting.co.za> Message-ID: <1382226464.9.0.370739790957.issue19305@psf.upfronthosting.co.za> Guido van Rossum added the comment: That patch looks good except please don't call it wait_for(), since there's already tasks.wait_for(). You can call it run_until(). Having to pass the loop to sleep() is only really required in the tests -- there was a movement a while ago (started by Alex Gaynor and supported by Glyph) to always pass in an explicit loop; my compromise was to force the tests to always pass in a loop (by using set_event_loop(None)). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 01:51:33 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Oct 2013 23:51:33 +0000 Subject: [issue19305] sporadic test_asyncio failure under FreeBSD In-Reply-To: <1382224725.63.0.152708776647.issue19305@psf.upfronthosting.co.za> Message-ID: <3d2LVX60v9z7LjR@mail.python.org> Roundup Robot added the comment: New changeset f1447c152fb7 by Antoine Pitrou in branch 'default': Issue #19305: try to fix sporadic test_asyncio failure on FreeBSD 10.0 http://hg.python.org/cpython/rev/f1447c152fb7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 01:52:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Oct 2013 23:52:23 +0000 Subject: [issue19305] sporadic test_asyncio failure under FreeBSD In-Reply-To: <1382224725.63.0.152708776647.issue19305@psf.upfronthosting.co.za> Message-ID: <1382226743.65.0.193385942559.issue19305@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, I called it run_until. Hopefully this will manage to appease the buildbot. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 01:55:54 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Oct 2013 23:55:54 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382226954.44.0.20058057848.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: Separate question for David: if CF's patch were committed, would we still need your patch to disable three subprocess-related tests on AIX? (That can be dealt with after the alpha release though -- in fact I propose not to wait for AIX if we can get the other platforms to stop hanging.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 02:00:08 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 Oct 2013 00:00:08 +0000 Subject: [issue19305] sporadic test_asyncio failure under FreeBSD In-Reply-To: <1382224725.63.0.152708776647.issue19305@psf.upfronthosting.co.za> Message-ID: <1382227208.55.0.771448859428.issue19305@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Looks ok on the buildbot. ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 02:23:25 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 20 Oct 2013 00:23:25 +0000 Subject: [issue19306] Warn unsuspecting readers that thread stacks are in reverse order Message-ID: <1382228605.25.0.0617949824826.issue19306@psf.upfronthosting.co.za> New submission from Guido van Rossum: I was confused for a while when seeing the thread stacks dumped by the faulthandler module. (See issue 19293.) I propose the following tweaks of the output to make this more obvious. The first chunk changes the header written when called as _Py_DumpTraceback(), the second change the per-thread headers printed by _Py_DumpTracebackThreads(). diff -r 02f6922e6a7e Python/traceback.c --- a/Python/traceback.c Sat Oct 19 17:04:25 2013 -0700 +++ b/Python/traceback.c Sat Oct 19 17:19:29 2013 -0700 @@ -603,7 +603,7 @@ unsigned int depth; if (write_header) - PUTS(fd, "Traceback (most recent call first):\n"); + PUTS(fd, "Stack (most recent call first):\n"); frame = _PyThreadState_GetFrame(tstate); if (frame == NULL) @@ -642,7 +642,7 @@ else PUTS(fd, "Thread 0x"); dump_hexadecimal(sizeof(long)*2, (unsigned long)tstate->thread_id, fd); - PUTS(fd, ":\n"); + PUTS(fd, " (most recent call first):\n"); } const char* ---------- assignee: pitrou keywords: easy messages: 200527 nosy: gvanrossum, pitrou priority: low severity: normal stage: patch review status: open title: Warn unsuspecting readers that thread stacks are in reverse order type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 02:28:56 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 Oct 2013 00:28:56 +0000 Subject: [issue19306] Warn unsuspecting readers that thread stacks are in reverse order In-Reply-To: <1382228605.25.0.0617949824826.issue19306@psf.upfronthosting.co.za> Message-ID: <1382228936.78.0.56173996462.issue19306@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: pitrou -> haypo nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 02:34:16 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 20 Oct 2013 00:34:16 +0000 Subject: [issue19295] Make asyncio work without threads In-Reply-To: <1382178666.39.0.442915890559.issue19295@psf.upfronthosting.co.za> Message-ID: <1382229256.61.0.172918689259.issue19295@psf.upfronthosting.co.za> Guido van Rossum added the comment: I looked into this a bit more and it's tricky, because without threads, asyncio/futures.py can't import some base exceptions concurrent.futures. Also, some tests create servers in separate threads, and getaddrinfo() would of course block. Not sure if I'll ever want to support this... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 03:09:02 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 20 Oct 2013 01:09:02 +0000 Subject: [issue17134] Use Windows' certificate store for CA certs In-Reply-To: <1360078143.8.0.938168290854.issue17134@psf.upfronthosting.co.za> Message-ID: <1382231342.89.0.78976712014.issue17134@psf.upfronthosting.co.za> Christian Heimes added the comment: The new patch splits up the one function into enum_certificates() and enum_crls(). enum_certificates() now returns also trust settings for the certificate. Internally it maps the most common OIDs to human readable names. The patch comes without doc updates yet. ---------- Added file: http://bugs.python.org/file32234/enum_cert_trust.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 03:09:18 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 20 Oct 2013 01:09:18 +0000 Subject: [issue17134] Use Windows' certificate store for CA certs In-Reply-To: <1360078143.8.0.938168290854.issue17134@psf.upfronthosting.co.za> Message-ID: <1382231358.18.0.898205626926.issue17134@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file28964/certstore.cpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 03:29:55 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 Oct 2013 01:29:55 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382232595.79.0.76292754749.issue19293@psf.upfronthosting.co.za> Antoine Pitrou added the comment: RHEL 6 too: http://buildbot.python.org/all/builders/x86%20RHEL%206%203.x/builds/2911/steps/test/logs/stdio ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 03:31:12 2013 From: report at bugs.python.org (David Edelsohn) Date: Sun, 20 Oct 2013 01:31:12 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382232672.35.0.281978926808.issue19293@psf.upfronthosting.co.za> David Edelsohn added the comment: AIX has an equivalent to strace (called truss). I have recorded all AIX system calls and signals for test_process_interactive, which hangs, following all children created by fock. The uncompressed file is 82MB or 939KB compressed. The highlights are: test_subprocess_interactive (test.test_asyncio.test_events.PollEventLoopTests) ... 4588380: 64422135: close(3) = 0 4588380: 64422135: statx("/home/dje/src/cpython/Lib/test/test_asyncio/echo.py", 0x2FF20870, 128, 010) = 0 4588380: 64422135: kopen("/home/dje/src/cpython/Lib/test/test_asyncio/echo.py", O_RDONLY|O_LARGEFILE) = 3 4588380: 64422135: kioctl(3, 22528, 0x00000000, 0x00000000) Err#25 ENOTTY 4588380: 64422135: kfcntl(3, F_SETFD, 0x00000001) = 0 4588380: 64422135: fstatx(0x00000003, 0x2FF229E8, 0x00000080, 0x00000008) = 0x00000000 4588380: 64422135: kioctl(3, 22528, 0x00000000, 0x00000000) Err#25 ENOTTY 4588380: 64422135: lseek(0x00000003, 0x00000000, 0x00000001) = 0x00000000 4588380: 64422135: kioctl(3, 22528, 0x00000000, 0x00000000) Err#25 ENOTTY 4588380: 64422135: kread(3, " i m p o r t o s\n\n i".., 4096) = 110 4588380: 64422135: klseek(3, 4294967295, -108, 0x00000001) = 0 4588380: 64422135: klseek(3, 0, 0, 0x00000000) = 0 4588380: 64422135: kread(3, " i m p o r t o s\n\n i".., 4096) = 110 4588380: 64422135: kread(3, " i m p o r t o s\n\n i".., 4096) = 0 4588380: 64422135: close(3) = 0 4588380: 64422135: kread(0, " P y t h o n ? ? ? ? ?".., 1024) = 7 4588380: 64422135: kwrite(0x00000001, 0x200CD0A0, 0x00000007) = 0x00000007 4588380: 0x00000000: " P y t h o n ? ? ? ? ?".. 59244954: 33161535: _poll(0x2067A970, 3, -1) = 1 4588380: 64422135: kread(0, " ? ? ? ? ? ? ? ? ? ? ? ?".., 1024) = 0 4588380: 64422135: kwrite(0x00000001, 0x200CD0F0, 0x00000000) = 0x00000000 4588380: 0x00000000: " ? ? ? ? ? ? ? ? ? ? ? ?".. 4588380: 64422135: kread(0, " ? ? ? ? ? ? ? ? ? ? ? ?".., 1024) = 0 59244954: 33161535: __libc_sbrk(0x00000000) = 0x20691220 4588380: 64422135: kwrite(0x00000001, 0x200CD140, 0x00000000) = 0x00000000 4588380: 0x00000000: " ? ? ? ? ? ? ? ? ? ? ? ?".. 4588380: 64422135: kread(0, " ? ? ? ? ? ? ? ? ? ? ? ?".., 1024) = 0 4588380: 64422135: kwrite(0x00000001, 0x200CD190, 0x00000000) = 0x00000000 4588380: 0x00000000: " ? ? ? ? ? ? ? ? ? ? ? ?".. 59244954: 33161535: kread(9, " P y t h o n ? ? ? ? ?".., 262144) = 7 4588380: 64422135: kread(0, " ? ? ? ? ? ? ? ? ? ? ? ?".., 1024) = 0 4588380: 64422135: kwrite(0x00000001, 0x200CD1E0, 0x00000000) = 0x00000000 4588380: 0x00000000: " ? ? ? ? ? ? ? ? ? ? ? ?".. 59244954: 33161535: _poll(0x2067A970, 3, 0) = 0 4588380: 64422135: kread(0, " ? ? ? ? ? ? ? ? ? ? ? ?".., 1024) = 0 4588380: 64422135: kwrite(0x00000001, 0x200D66C0, 0x00000000) = 0x00000000 4588380: 0x00000000: " ? ? ? ? ? ? ? ? ? ? ? ?".. 59244954: 33161535: _poll(0x2067A970, 3, 0) = 0 4588380: 64422135: kread(0, " ? ? ? ? ? ? ? ? ? ? ? ?".., 1024) = 0 4588380: 64422135: kwrite(0x00000001, 0x200CD0A0, 0x00000000) = 0x00000000 4588380: 0x00000000: " ? ? ? ? ? ? ? ? ? ? ? ?".. 59244954: 33161535: _poll(0x2067A970, 3, 0) = 04588380: 64422135: kread(0, " ? ? ? ? ? ? ? ? ? ? ? ?".. , 1024) = 0 4588380: 64422135: kwrite(0x00000001, 0x200CD0F0, 0x00000000) = 0x00000000 4588380: 0x00000000: " ? ? ? ? ? ? ? ? ? ? ? ?".. 4588380: 64422135: kread(0, " ? ? ? ? ? ? ? ? ? ? ? ?".., 1024) = 0 59244954: 33161535: _poll(0x2067A970, 3, 0) = 0 4588380: 64422135: kwrite(0x00000001, 0x200CD140, 0x00000000) = 0x00000000 4588380: 0x00000000: " ? ? ? ? ? ? ? ? ? ? ? ?".. 4588380: 64422135: kread(0, " ? ? ? ? ? ? ? ? ? ? ? ?".., 1024) = 0 4588380: 64422135: kwrite(0x00000001, 0x200CD190, 0x00000000) = 0x00000000 4588380: 0x00000000: " ? ? ? ? ? ? ? ? ? ? ? ?".. 4588380: 64422135: kread(0, " ? ? ? ? ? ? ? ? ? ? ? ?".., 1024) = 0 4588380: 64422135: kwrite(0x00000001, 0x200CD1E0, 0x00000000) = 0x00000000 4588380: 0x00000000: " ? ? ? ? ? ? ? ? ? ? ? ?".. 4588380: 64422135: kread(0, " ? ? ? ? ? ? ? ? ? ? ? ?".., 1024) = 0 4588380: 64422135: kwrite(0x00000001, 0x200D66C0, 0x00000000) = 0x00000000 4588380: 0x00000000: " ? ? ? ? ? ? ? ? ? ? ? ?".. 4588380: 64422135: kread(0, " ? ? ? ? ? ? ? ? ? ? ? ?".., 1024) = 0 4588380: 64422135: kwrite(0x00000001, 0x200CD0A0, 0x00000000) = 0x00000000 4588380: 0x00000000: " ? ? ? ? ? ? ? ? ? ? ? ?".. And it sits in this read/write loop with some intermittent _poll timeouts until I send SIGINT. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 03:35:59 2013 From: report at bugs.python.org (David Edelsohn) Date: Sun, 20 Oct 2013 01:35:59 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382232959.9.0.0267175737084.issue19293@psf.upfronthosting.co.za> David Edelsohn added the comment: Separate question for David: if CF's patch were committed, would we still need your patch to disable three subprocess-related tests on AIX? (That can be dealt with after the alpha release though -- in fact I propose not to wait for AIX if we can get the other platforms to stop hanging.) CF's patch does not fix the hangs on AIX and my patch still is needed. And I never was suggesting that correct functionality on AIX is a blocker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 03:40:52 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 Oct 2013 01:40:52 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382232672.35.0.281978926808.issue19293@psf.upfronthosting.co.za> Message-ID: <1382233219.2517.34.camel@fsol> Antoine Pitrou added the comment: > test_subprocess_interactive (test.test_asyncio.test_events.PollEventLoopTests) ... > 4588380: 64422135: close(3) = 0 > 4588380: 64422135: statx("/home/dje/src/cpython/Lib/test/test_asyncio/echo.py", 0x2FF20870, 128, 010) = 0 > 4588380: 64422135: kopen("/home/dje/src/cpython/Lib/test/test_asyncio/echo.py", O_RDONLY|O_LARGEFILE) = 3 > 4588380: 64422135: kioctl(3, 22528, 0x00000000, 0x00000000) Err#25 ENOTTY > 4588380: 64422135: kfcntl(3, F_SETFD, 0x00000001) = 0 > 4588380: 64422135: fstatx(0x00000003, 0x2FF229E8, 0x00000080, 0x00000008) = 0x00000000 > 4588380: 64422135: kioctl(3, 22528, 0x00000000, 0x00000000) Err#25 ENOTTY > 4588380: 64422135: lseek(0x00000003, 0x00000000, 0x00000001) = 0x00000000 > 4588380: 64422135: kioctl(3, 22528, 0x00000000, 0x00000000) Err#25 ENOTTY > 4588380: 64422135: kread(3, " i m p o r t o s\n\n i".., 4096) = 110 > 4588380: 64422135: klseek(3, 4294967295, -108, 0x00000001) = 0 > 4588380: 64422135: klseek(3, 0, 0, 0x00000000) = 0 > 4588380: 64422135: kread(3, " i m p o r t o s\n\n i".., 4096) = 110 > 4588380: 64422135: kread(3, " i m p o r t o s\n\n i".., 4096) = 0 > 4588380: 64422135: close(3) = 0 > 4588380: 64422135: kread(0, " P y t h o n ? ? ? ? ?".., 1024) = 7 > 4588380: 64422135: kwrite(0x00000001, 0x200CD0A0, 0x00000007) = 0x00000007 > 4588380: 0x00000000: " P y t h o n ? ? ? ? ?".. > 59244954: 33161535: _poll(0x2067A970, 3, -1) = 1 > 4588380: 64422135: kread(0, " ? ? ? ? ? ? ? ? ? ? ? ?".., 1024) = 0 > 4588380: 64422135: kwrite(0x00000001, 0x200CD0F0, 0x00000000) = 0x00000000 > 4588380: 0x00000000: " ? ? ? ? ? ? ? ? ? ? ? ?".. It seems echo.py should at least exit on EOF, which would prevent the hangs (right now it's stuck in a busy loop calling os.read(0) which always returns immediately). (same for echo3.py) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 04:45:40 2013 From: report at bugs.python.org (David Edelsohn) Date: Sun, 20 Oct 2013 02:45:40 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382237140.17.0.876748290415.issue19293@psf.upfronthosting.co.za> David Edelsohn added the comment: I added if not buf: break after buf = os.read() to echo.py, echo2.py and echo3.py. They now exit and do not spin, but the test still hangs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 05:07:34 2013 From: report at bugs.python.org (koobs) Date: Sun, 20 Oct 2013 03:07:34 +0000 Subject: [issue19305] sporadic test_asyncio failure under FreeBSD In-Reply-To: <1382224725.63.0.152708776647.issue19305@psf.upfronthosting.co.za> Message-ID: <1382238454.25.0.890926386017.issue19305@psf.upfronthosting.co.za> koobs added the comment: You rock Antoine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 05:23:28 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 20 Oct 2013 03:23:28 +0000 Subject: [issue18958] Exception('No JSON object could be decoded') when parsing a valid JSON In-Reply-To: <1378557195.07.0.581794298686.issue18958@psf.upfronthosting.co.za> Message-ID: <1382239408.5.0.410330970235.issue18958@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here is an updated patch with tests. ---------- stage: needs patch -> patch review Added file: http://bugs.python.org/file32235/issue18958-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 05:26:56 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 20 Oct 2013 03:26:56 +0000 Subject: [issue19306] Warn unsuspecting readers that thread stacks are in reverse order In-Reply-To: <1382228605.25.0.0617949824826.issue19306@psf.upfronthosting.co.za> Message-ID: <1382239616.84.0.587724405351.issue19306@psf.upfronthosting.co.za> Guido van Rossum added the comment: BTW, another oddity in traceback.c: dump_hexadecimal() has the "int fd" argument at the end, while all other dump_*() functions have it at the front -- even its cousin dump_decimal(). Here's a patch that includes a fix. ---------- keywords: +patch Added file: http://bugs.python.org/file32236/traceback.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 05:32:26 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 20 Oct 2013 03:32:26 +0000 Subject: [issue18958] Exception('No JSON object could be decoded') when parsing a valid JSON In-Reply-To: <1378557195.07.0.581794298686.issue18958@psf.upfronthosting.co.za> Message-ID: <1382239946.06.0.513305661362.issue18958@psf.upfronthosting.co.za> Nick Coghlan added the comment: Updated patch looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 05:44:55 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 20 Oct 2013 03:44:55 +0000 Subject: [issue18958] Exception('No JSON object could be decoded') when parsing a valid JSON In-Reply-To: <1378557195.07.0.581794298686.issue18958@psf.upfronthosting.co.za> Message-ID: <1382240695.74.0.928465199479.issue18958@psf.upfronthosting.co.za> Changes by Ezio Melotti : Added file: http://bugs.python.org/file32237/issue18958-2-py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 05:49:14 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 20 Oct 2013 03:49:14 +0000 Subject: [issue18387] Add 'symbols' link to pydoc's html menu bar. In-Reply-To: <1373131695.63.0.960870867634.issue18387@psf.upfronthosting.co.za> Message-ID: <1382240954.33.0.905323977081.issue18387@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'll take a closer look at this prior to beta 1. In the meantime, Ron, I just noticed we don't have a Contributor Licensing Agreement in place for you. Given your past contributions, we should probably fix that :) The form can be signed electronically these days: http://www.python.org/psf/contrib/contrib-form/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 05:52:01 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 20 Oct 2013 03:52:01 +0000 Subject: [issue18958] Exception('No JSON object could be decoded') when parsing a valid JSON In-Reply-To: <1378557195.07.0.581794298686.issue18958@psf.upfronthosting.co.za> Message-ID: <1382241121.93.0.0311932512351.issue18958@psf.upfronthosting.co.za> Nick Coghlan added the comment: As does the Py3k version :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 05:56:17 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 20 Oct 2013 03:56:17 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382237140.17.0.876748290415.issue19293@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: I wonder if subprocess pipes have a version of the race condition I fixed for sockets yesterday: http://code.google.com/p/tulip/source/detail?r=2d392599fa067038b5fc9eeaf051011307aeadee The pipe code seems derived from the socket code long ago. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 06:12:52 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 20 Oct 2013 04:12:52 +0000 Subject: [issue18958] Exception('No JSON object could be decoded') when parsing a valid JSON In-Reply-To: <1378557195.07.0.581794298686.issue18958@psf.upfronthosting.co.za> Message-ID: <1382242372.59.0.485282156757.issue18958@psf.upfronthosting.co.za> Nick Coghlan added the comment: Discussing this with Ezio on IRC, we decided that it probably makes more sense to do this check outside the scanner as preliminary validation of the input passed in via the public API. That will minimise the overhead and also avoids any potential side effects if "idx==0" is ever true in cases we're not currently testing. The tests from the current patches should be OK, though. Ezio also found that, for Py3k, adding an explicit check for non-str input and throwing an appropriate error would also be an improvement over the status quo: >>> import json >>> json.loads(b'') Traceback (most recent call last): File "", line 1, in File "/home/ncoghlan/devel/py3k/Lib/json/__init__.py", line 316, in loads return _default_decoder.decode(s) File "/home/ncoghlan/devel/py3k/Lib/json/decoder.py", line 344, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) TypeError: can't use a string pattern on a bytes-like object ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 06:20:58 2013 From: report at bugs.python.org (David Bolen) Date: Sun, 20 Oct 2013 04:20:58 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382242858.42.0.359281781379.issue19293@psf.upfronthosting.co.za> David Bolen added the comment: I've been trying to test this on the Ubuntu 8.04 buildbot, but so far, using the latest hg default head, haven't gotten test_asyncio to hang even before the patch. It also looks like the last 4 regular buildbot builds were fine too. I even tried rolling back to one of the revisions that did fail a buildbot build, but it went ok as well. I'm guessing it's just a timing or race condition but without some way to reproduce reliably, I can't say much about the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 06:30:40 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 20 Oct 2013 04:30:40 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382243440.23.0.724480316085.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: Let's just release the alpha with this as?it stands; I will look at the race condition later, and also at CF's patch (which may be a good idea regardless of what it fixes). I did add the breaks to echo and echo3 since the busy-waiting just makes tracing this that much harder. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 07:16:39 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 20 Oct 2013 05:16:39 +0000 Subject: [issue19307] Improve TypeError message in json.loads() Message-ID: <1382246199.49.0.284372498766.issue19307@psf.upfronthosting.co.za> New submission from Ezio Melotti: Currently the error raised when bytes are passed to json.loads() is not very clear: >>> json.loads(b'') Traceback (most recent call last): File "", line 1, in File "/home/wolf/dev/py/py3k/Lib/json/__init__.py", line 316, in loads return _default_decoder.decode(s) File "/home/wolf/dev/py/py3k/Lib/json/decoder.py", line 344, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) TypeError: can't use a string pattern on a bytes-like object The attached patch changes the error message to: >>> json.loads(b'') Traceback (most recent call last): File "", line 1, in File "/home/wolf/dev/py/py3k/Lib/json/__init__.py", line 315, in loads s.__class__.__name__)) TypeError: the JSON object must be str, not 'bytes' (This came up on #18958, and it's required in order to check for a UTF-8 BOM without producing an even more misleading error message.) ---------- assignee: ezio.melotti components: Library (Lib) files: json-error-msg.diff keywords: patch messages: 200545 nosy: ezio.melotti, ncoghlan, pitrou, rhettinger, serhiy.storchaka priority: normal severity: normal stage: commit review status: open title: Improve TypeError message in json.loads() type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32238/json-error-msg.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 07:24:07 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 20 Oct 2013 05:24:07 +0000 Subject: [issue18958] Exception('No JSON object could be decoded') when parsing a valid JSON In-Reply-To: <1378557195.07.0.581794298686.issue18958@psf.upfronthosting.co.za> Message-ID: <1382246647.14.0.640226507591.issue18958@psf.upfronthosting.co.za> Ezio Melotti added the comment: I opened a new issue about improving the error message: #19307. After further discussion on IRC, we think that both #19307 and this issue should only be applied on 3.4 (the attached patch produces an even more misleading error that would require backporting #19307). ---------- dependencies: +Improve TypeError message in json.loads() versions: +Python 3.4 -Python 2.7 Added file: http://bugs.python.org/file32239/issue18958-3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 08:37:40 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 20 Oct 2013 06:37:40 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382251060.66.0.0369456211695.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: I'm trying to let go of the AIX hang. Here's a brain dump of what I've figured out so far. * There were a lot of red herrings in the early discussion. This hang doesn't seem to have anything to do with nonblocking connect() or sockets, nor even signals. * Summary of what the test (test_subprocess_interactive) tries to do: it starts an echo subprocess, writes a string to it, reads the string back, writes another string to it, reads that back, and then closes the transport. * The test hangs after seeing the first string echoed back but not the second, and in between somehow the stdin pipe is broken. * If I read David's truss log correctly, the following things have happened: - the parent wrote 'Python ' to the pipe for the subprocess's stdin (this is not shown in the extract but it must have happened because we see the string arrive in the subprocess) - the echo.py subprocess started and began to read from stdin - the subprocess read 'Python ' from its stdin - the subprocess wrote 'Python ' back to its stdout - poll() in the parent woke up - the parent allocated some memory and read 'Python ' from the pipe for the subprocess's stdout At this point apparently the pipe for the subprocess stdin got closed so the subprocess received an EOF (over and over due to the missing test+break). We also know that the parent now hangs in the last run_until_complete() call, which means that it has at least attempted to write 'The Winner' -- but there is no evidence of this in the truss extract so it is possible that that string is still in the transport's write buffer. It is also possible that David simply missed it in the endless stream of ineffective calls due to the looping bug. I'm actually curious why it seems that poll() keeps returning 0 in the parent -- shouldn't it have an infinite timeout, since there's nothing left to do? Another theory is one or more *connection_lost() methods on the protocol are actually being called but the test stubbornly keeps waiting until proto.got_data[1] becomes set. I'd be very interested in the truss output with the fix to echo.py in place (which is now in the repo). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 08:43:28 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 20 Oct 2013 06:43:28 +0000 Subject: [issue12866] Add support for 24-bit samples in the audioop module In-Reply-To: <1314744712.67.0.770855933698.issue12866@psf.upfronthosting.co.za> Message-ID: <3d2WdR236Mz7LjZ@mail.python.org> Roundup Robot added the comment: New changeset 97ad9af5d5e7 by Serhiy Storchaka in branch 'default': Issue #12866: Fix bias() for 24-bit. Add more tests. http://hg.python.org/cpython/rev/97ad9af5d5e7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 09:33:33 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 Oct 2013 07:33:33 +0000 Subject: [issue17087] Improve the repr for regular expression match objects In-Reply-To: <1359589982.45.0.929656950631.issue17087@psf.upfronthosting.co.za> Message-ID: <1382254413.09.0.985803477122.issue17087@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM (except unrelated empty line at the end of Modules/_sre.c). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 09:41:23 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 20 Oct 2013 07:41:23 +0000 Subject: [issue19306] Warn unsuspecting readers that thread stacks are in reverse order In-Reply-To: <1382239616.84.0.587724405351.issue19306@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: You must update unit tests in test_faulthandler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 10:26:43 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 20 Oct 2013 08:26:43 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382232672.35.0.281978926808.issue19293@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > David Edelsohn added the comment: > > AIX has an equivalent to strace (called truss). I have recorded all AIX system calls and signals for test_process_interactive, which hangs, following all children created by fock. The uncompressed file is 82MB or 939KB compressed. The highlights are: Apparently, the stdout pipe was closed by the parent process: it would be nice to see where/how (it should be FD 7 according to strace on my Linux box). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 10:42:09 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 20 Oct 2013 08:42:09 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: Message-ID: Guido van Rossum added the comment: > Apparently, the stdout pipe was closed by the parent process Could it be that selecting for *read* on the *write* end of a pipe is always ready? In _UnixWritePipeTransport there's a read handler that immediately closes the pipe as soon as it called. I vaguely remember a discussion on python-tulip that this might be Linux-specific behavior. (The reason is that otherwise you can't find out whether the other end was closed unless you attempt to write to the pipe.) To test this theory, it should be sufficient to comment out line 280 self._loop.add_reader(self._fileno, self._read_ready) from unix_events.py. This will make test_subprocess_kill() hang but it should not affect test_subprocess_interactive. (So it is not a fix, just a way to confirm the theory.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 10:52:08 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 20 Oct 2013 08:52:08 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: Message-ID: Charles-Fran?ois Natali added the comment: > Guido van Rossum added the comment: > >> Apparently, the stdout pipe was closed by the parent process > > Could it be that selecting for *read* on the *write* end of a pipe is > always ready? That's exactly what I was thinking when I read the code below: that's definitely a possibility on AIX. > In _UnixWritePipeTransport there's a read handler that > immediately closes the pipe as soon as it called. I vaguely remember a > discussion on python-tulip that this might be Linux-specific behavior. (The > reason is that otherwise you can't find out whether the other end was > closed unless you attempt to write to the pipe.) Normally, if the pipe is closed, it should be reported by a POLLHUP/write ready. Then you only consider it closed when write fails with EPIPE. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 11:24:14 2013 From: report at bugs.python.org (David Coles) Date: Sun, 20 Oct 2013 09:24:14 +0000 Subject: [issue19308] Tools/gdb/libpython.py does not support GDB linked against Python 3 Message-ID: <1382261054.14.0.65764193658.issue19308@psf.upfronthosting.co.za> New submission from David Coles: Tools/gdb/libpython.py is currently Python 3 incompatible. Unfortunately recent versions of gdb (such as the one provided in Ubuntu 13.10) may be linked against Python 3 rather than Python 2, breaking debugging support. Most of the issues appear to be trivial issues such as the print statement syntax and removal of functions like xrange, unichr and long. ---------- components: Demos and Tools messages: 200554 nosy: dcoles priority: normal severity: normal status: open title: Tools/gdb/libpython.py does not support GDB linked against Python 3 versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 11:36:02 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 20 Oct 2013 09:36:02 +0000 Subject: [issue19308] Tools/gdb/libpython.py does not support GDB linked against Python 3 In-Reply-To: <1382261054.14.0.65764193658.issue19308@psf.upfronthosting.co.za> Message-ID: <1382261762.26.0.252272928767.issue19308@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 11:51:57 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 20 Oct 2013 09:51:57 +0000 Subject: [issue19309] asyncio: fix handling of processes in a different process group Message-ID: <1382262717.42.0.688031898655.issue19309@psf.upfronthosting.co.za> New submission from Charles-Fran?ois Natali: See https://groups.google.com/forum/#!topic/python-tulip/9T2_tGWe0Sc The attached patch just changes waitpid(0) to waitpid(-1), and comes with a trivial test. ---------- components: Library (Lib) files: asyncio_process_group.diff keywords: easy, needs review, patch messages: 200555 nosy: gvanrossum, neologix priority: normal severity: normal stage: patch review status: open title: asyncio: fix handling of processes in a different process group type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file32240/asyncio_process_group.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 12:01:43 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 Oct 2013 10:01:43 +0000 Subject: [issue16685] audioop functions shouldn't accept strings In-Reply-To: <1355506655.59.0.00344503753899.issue16685@psf.upfronthosting.co.za> Message-ID: <1382263303.98.0.90997670926.issue16685@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch. Now audioop functions no more accept str, but accept bytes-like objects instead. ---------- keywords: +patch stage: needs patch -> patch review title: Deprecate accepting strings as arguments in audioop functions -> audioop functions shouldn't accept strings Added file: http://bugs.python.org/file32241/audioop_buffer.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 12:09:54 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 20 Oct 2013 10:09:54 +0000 Subject: [issue19307] Improve TypeError message in json.loads() In-Reply-To: <1382246199.49.0.284372498766.issue19307@psf.upfronthosting.co.za> Message-ID: <1382263794.47.0.20384139506.issue19307@psf.upfronthosting.co.za> Nick Coghlan added the comment: Looks good to me: +1 :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 12:13:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 20 Oct 2013 10:13:52 +0000 Subject: [issue17087] Improve the repr for regular expression match objects In-Reply-To: <1359589982.45.0.929656950631.issue17087@psf.upfronthosting.co.za> Message-ID: <3d2cJb6z80z7LjT@mail.python.org> Roundup Robot added the comment: New changeset 29764a7bd6ba by Serhiy Storchaka in branch 'default': Issue #17087: Improved the repr for regular expression match objects. http://hg.python.org/cpython/rev/29764a7bd6ba ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 12:16:20 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 Oct 2013 10:16:20 +0000 Subject: [issue17087] Improve the repr for regular expression match objects In-Reply-To: <1359589982.45.0.929656950631.issue17087@psf.upfronthosting.co.za> Message-ID: <1382264180.91.0.874527417187.issue17087@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks all participants for the discussion. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 12:25:11 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 20 Oct 2013 10:25:11 +0000 Subject: [issue18958] Exception('No JSON object could be decoded') when parsing a valid JSON In-Reply-To: <1378557195.07.0.581794298686.issue18958@psf.upfronthosting.co.za> Message-ID: <1382264711.18.0.288060155515.issue18958@psf.upfronthosting.co.za> Nick Coghlan added the comment: The patch needs to be rebased on top of the issue 19307 patch, but I like this approach. I say go ahead and commit it whenever you're ready :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 12:33:29 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 20 Oct 2013 10:33:29 +0000 Subject: [issue19310] asyncio: fix waitpid() logic Message-ID: <1382265209.42.0.484907222023.issue19310@psf.upfronthosting.co.za> New submission from Charles-Fran?ois Natali: The current SIGCHILD handler has two bugs: - it reschedules itself if waitpid() returns 0: so if this ever happens, it will enter a busy-loop until all children have exited - it doesn't reschedule itself if waitpid() succeeds in reaping a child: since signals can be coalesced, we must keep calling waitpid() as long as it succeeds, since the incoming SIGCHLD signal could actually be due to more than one child exited (and there won't be a SIGCHILD coming later for the processes we didn't wait right away). ---------- components: Library (Lib) files: asyncio_waitpid_loop.diff keywords: needs review, patch messages: 200561 nosy: gvanrossum, neologix priority: normal severity: normal stage: patch review status: open title: asyncio: fix waitpid() logic type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file32242/asyncio_waitpid_loop.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 12:43:26 2013 From: report at bugs.python.org (Stefan Krah) Date: Sun, 20 Oct 2013 10:43:26 +0000 Subject: [issue19295] Make asyncio work without threads In-Reply-To: <1382178666.39.0.442915890559.issue19295@psf.upfronthosting.co.za> Message-ID: <1382265806.51.0.105356974305.issue19295@psf.upfronthosting.co.za> Stefan Krah added the comment: > Not sure if I'll ever want to support this... I think it can be closed as "wont-fix". We had a poll on python-dev about --without-threads a while ago, and the only systems that needed it were older OpenBSD systems and a Fujitsu supercomputer with the Fujitsu compiler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 12:43:42 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 20 Oct 2013 10:43:42 +0000 Subject: [issue18650] intermittent test_pydoc failure on 3.4.0a1 In-Reply-To: <1375567563.7.0.0482703899635.issue18650@psf.upfronthosting.co.za> Message-ID: <1382265822.89.0.490555676633.issue18650@psf.upfronthosting.co.za> Ned Deily added the comment: Still intermittently failing on 3.4.0a4 when running the entire test suite. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 12:56:04 2013 From: report at bugs.python.org (Stefan Krah) Date: Sun, 20 Oct 2013 10:56:04 +0000 Subject: [issue11871] test_default_timeout() of test_threading.BarrierTests failure: BrokenBarrierError In-Reply-To: <1303163944.05.0.666091618845.issue11871@psf.upfronthosting.co.za> Message-ID: <1382266564.65.0.91317603601.issue11871@psf.upfronthosting.co.za> Stefan Krah added the comment: It looks like it happened again: http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%203.x/builds/5223/steps/test/logs/stdio ====================================================================== ERROR: test_default_timeout (test.test_threading.BarrierTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/lock_tests.py", line 876, in test_default_timeout self.run_threads(f) File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/lock_tests.py", line 705, in run_threads f() File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/lock_tests.py", line 871, in f i = barrier.wait() File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 616, in wait self._wait(timeout) File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 654, in _wait raise BrokenBarrierError threading.BrokenBarrierError ---------------------------------------------------------------------- Ran 138 tests in 22.880s ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 12:57:20 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sun, 20 Oct 2013 10:57:20 +0000 Subject: [issue19311] devguide: hg bisect section could be clearer Message-ID: <1382266640.75.0.952779110911.issue19311@psf.upfronthosting.co.za> New submission from Martin Matusiak: The offending section: http://docs.python.org/devguide/faq.html#how-do-i-find-which-changeset-introduced-a-bug-or-regression I think this could be improved a bit. The key point is that "hg bisect --bad/good" is a command relative to the checked out changeset. So the instructions tell me to run "hg bisect --bad" and then "hg bisect --good", but they could do with a more explicit instruction to run "hg update " in between. - You can conveniently choose a faraway changeset (for example a former release), and check that it is indeed ?good? This could be construed as just peeking at the changeset using hg log or whatever, not actually checking it out. - Mercurial will automatically bisect so as to narrow the range of possible culprits, until a single changeset is isolated. Here too it could be made more explicit that mercurial will navigate to (ie. check out each changeset) as it's doing this, so that at every invocation of "hg bisect --bad/good" the changeset to be tested is checked out for you, not merely computed. ---------- components: Devguide messages: 200565 nosy: ezio.melotti, numerodix priority: normal severity: normal status: open title: devguide: hg bisect section could be clearer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 13:09:59 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 20 Oct 2013 11:09:59 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <1382267399.2.0.974649546431.issue15663@psf.upfronthosting.co.za> Georg Brandl added the comment: Yep (should there be a policy about this somewhere)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 13:52:19 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sun, 20 Oct 2013 11:52:19 +0000 Subject: [issue19312] Typo in devguide - compiler Message-ID: <1382269939.53.0.178642768375.issue19312@psf.upfronthosting.co.za> New submission from Martin Matusiak: - The purpose of this document is to outline how the latter three steps of the process works. work ---------- components: Devguide files: typo_compiler.diff keywords: patch messages: 200567 nosy: ezio.melotti, numerodix priority: normal severity: normal status: open title: Typo in devguide - compiler Added file: http://bugs.python.org/file32243/typo_compiler.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 14:03:02 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 Oct 2013 12:03:02 +0000 Subject: [issue19313] reference leaks Message-ID: <1382270582.6.0.446986399732.issue19313@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Given the huge leakage in test_ast, it looks like a compiler issue. results for 68a7bc8bb663 on branch "default" -------------------------------------------- test_grammar leaked [3, 3, 3] references, sum=9 test_opcodes leaked [16, 16, 16] references, sum=48 test_builtin leaked [11, 11, 11] references, sum=33 test_unittest leaked [7, 7, 7] references, sum=21 test_doctest leaked [55, 55, 55] references, sum=165 test_doctest leaked [3, 3, 3] memory blocks, sum=9 test_support leaked [9, 9, 9] references, sum=27 test_support leaked [8, 8, 8] memory blocks, sum=24 test_ast leaked [6885, 6885, 6885] references, sum=20655 test_ast leaked [4888, 4890, 4890] memory blocks, sum=14668 test_atexit leaked [2, 2, 2] references, sum=6 test_cgi leaked [9, 9, 9] references, sum=27 test_cgi leaked [8, 8, 8] memory blocks, sum=24 test_cmd leaked [2, 2, 2] references, sum=6 test_cmd_line_script leaked [12, 12, 12] references, sum=36 test_code leaked [7, 7, 7] references, sum=21 test_codeop leaked [44, 44, 44] references, sum=132 test_codeop leaked [4, 4, 4] memory blocks, sum=12 test_collections leaked [243, 243, 243] references, sum=729 test_collections leaked [216, 216, 216] memory blocks, sum=648 test_compile leaked [122, 122, 122] references, sum=366 test_compile leaked [108, 108, 108] memory blocks, sum=324 test_ctypes leaked [1, 1, 1] references, sum=3 test_decorators leaked [4, 4, 4] references, sum=12 test_deque leaked [4, 4, 4] references, sum=12 test_descrtut leaked [39, 39, 39] references, sum=117 test_descrtut leaked [19, 19, 19] memory blocks, sum=57 test_difflib leaked [2, 2, 2] references, sum=6 test_dis leaked [769, 769, 769] references, sum=2307 test_distutils leaked [2, 2, 2] references, sum=6 test_dynamic leaked [1, 1, 1] references, sum=3 test_extcall leaked [35, 35, 35] references, sum=105 test_extcall leaked [9, 9, 9] memory blocks, sum=27 test_funcattrs leaked [1, 1, 1] references, sum=3 test_gc leaked [1, 1, 1] references, sum=3 test_generators leaked [110, 110, 110] references, sum=330 test_generators leaked [25, 25, 25] memory blocks, sum=75 test_genexps leaked [30, 30, 30] references, sum=90 test_genexps leaked [4, 4, 4] memory blocks, sum=12 test_gettext leaked [25, 25, 25] references, sum=75 test_import leaked [4, 4, 4] references, sum=12 test_importlib leaked [36, 36, 36] references, sum=108 test_importlib leaked [32, 32, 32] memory blocks, sum=96 test_inspect leaked [45, 45, 45] references, sum=135 test_itertools leaked [22, 22, 22] references, sum=66 test_itertools leaked [2, 2, 2] memory blocks, sum=6 test_json leaked [2, 2, 2] references, sum=6 test_keywordonlyarg leaked [1, 1, 1] references, sum=3 test_listcomps leaked [39, 39, 39] references, sum=117 test_listcomps leaked [19, 19, 19] memory blocks, sum=57 test_marshal leaked [2, 2, 2] references, sum=6 test_math leaked [1, 1, 1] references, sum=3 test_metaclass leaked [38, 38, 38] references, sum=114 test_metaclass leaked [10, 10, 10] memory blocks, sum=30 test_module leaked [3, 3, 3] references, sum=9 test_module leaked [2, 2, 2] memory blocks, sum=6 test_modulefinder leaked [17, 17, 17] references, sum=51 test_modulefinder leaked [12, 12, 12] memory blocks, sum=36 test_peepholer leaked [1, 1, 1] references, sum=3 test_pydoc leaked [9, 9, 9] references, sum=27 test_pydoc leaked [8, 8, 8] memory blocks, sum=24 test_runpy leaked [35, 35, 35] references, sum=105 test_scope leaked [27, 27, 27] references, sum=81 test_scope leaked [18, 18, 18] memory blocks, sum=54 test_setcomps leaked [40, 40, 40] references, sum=120 test_setcomps leaked [19, 19, 19] memory blocks, sum=57 test_site leaked [0, 0, 2] references, sum=2 test_site leaked [0, 0, 2] memory blocks, sum=2 test_super leaked [2, 2, 2] references, sum=6 test_syntax leaked [4, 4, 4] references, sum=12 test_sys_settrace leaked [2, 2, 2] references, sum=6 test_threaded_import leaked [1, 1, 1] references, sum=3 test_threading leaked [22, 22, 22] references, sum=66 test_threading leaked [17, 17, 17] memory blocks, sum=51 test_threading_local leaked [10, 10, 10] references, sum=30 test_threading_local leaked [4, 4, 4] memory blocks, sum=12 test_timeit leaked [22, 22, 22] references, sum=66 test_tools leaked [44, 44, 44] references, sum=132 test_tools leaked [18, 18, 18] memory blocks, sum=54 test_trace leaked [1599, 1599, 1599] references, sum=4797 test_trace leaked [1125, 1127, 1127] memory blocks, sum=3379 test_unpack leaked [5, 5, 5] references, sum=15 test_unpack leaked [2, 2, 2] memory blocks, sum=6 test_unpack_ex leaked [7, 7, 7] references, sum=21 test_unpack_ex leaked [2, 2, 2] memory blocks, sum=6 test_weakref leaked [8, 8, 8] references, sum=24 test_weakref leaked [2, 2, 2] memory blocks, sum=6 test_zipimport leaked [38, 38, 38] references, sum=114 test_zipimport_support leaked [84, 84, 84] references, sum=252 test_zipimport_support leaked [20, 20, 20] memory blocks, sum=60 Command line was: ['./python', '-m', 'test.regrtest', '-uall', '-R', '3:3:/home/antoine/cpython/refleaks/reflogYgMGKS', '-x'] ---------- assignee: benjamin.peterson components: Interpreter Core messages: 200568 nosy: benjamin.peterson, larry, pitrou priority: release blocker severity: normal status: open title: reference leaks type: resource usage versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 14:03:15 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sun, 20 Oct 2013 12:03:15 +0000 Subject: [issue19314] Typo in devguide - compiler Message-ID: <1382270595.82.0.866623736172.issue19314@psf.upfronthosting.co.za> New submission from Martin Matusiak: - Querying data from the node structs can be done with the following macros (which are all defined in Include/token.h They are actually in Include/node.h, which is logical, because that is where "node" is defined. ---------- components: Devguide files: typo_compiler_nodeh.diff keywords: patch messages: 200569 nosy: ezio.melotti, numerodix priority: normal severity: normal status: open title: Typo in devguide - compiler Added file: http://bugs.python.org/file32244/typo_compiler_nodeh.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 14:12:53 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sun, 20 Oct 2013 12:12:53 +0000 Subject: [issue19315] devguide: compiler - poor wording Message-ID: <1382271173.25.0.518279475594.issue19315@psf.upfronthosting.co.za> New submission from Martin Matusiak: Location: http://docs.python.org/devguide/compiler.html#parse-trees - To tie all of this example, consider the rule for ?while?: Probably meant to be: To tie all of this together with an example, ... - The node representing this will have TYPE(node) == while_stmt and the number of children can be 4 or 7 depending on if there is an ?else? statement. s/if/whether/g is slightly better English imo - To access what should be the first ?:? and require it be an actual ?:? token, (REQ(CHILD(node, 2), COLON)`. Understandable with some effort on the reader's part, but it's not very well worded. Notice also the closing backtick: markup typo. ---------- components: Devguide messages: 200570 nosy: ezio.melotti, numerodix priority: normal severity: normal status: open title: devguide: compiler - poor wording _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 14:15:15 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 Oct 2013 12:15:15 +0000 Subject: [issue18702] Report skipped tests as skipped In-Reply-To: <1376132966.91.0.713996712724.issue18702@psf.upfronthosting.co.za> Message-ID: <1382271315.34.0.874101402798.issue18702@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch is rebased to tip. ---------- Added file: http://bugs.python.org/file32245/skip_tests_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 14:15:24 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 20 Oct 2013 12:15:24 +0000 Subject: [issue19313] reference leaks In-Reply-To: <1382270582.6.0.446986399732.issue19313@psf.upfronthosting.co.za> Message-ID: <1382271324.59.0.82621557176.issue19313@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 14:24:54 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 20 Oct 2013 12:24:54 +0000 Subject: [issue19307] Improve TypeError message in json.loads() In-Reply-To: <1382246199.49.0.284372498766.issue19307@psf.upfronthosting.co.za> Message-ID: <1382271894.78.0.297206599281.issue19307@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 14:28:46 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sun, 20 Oct 2013 12:28:46 +0000 Subject: [issue19316] devguide: compiler - wording Message-ID: <1382272126.03.0.859419260116.issue19316@psf.upfronthosting.co.za> New submission from Martin Matusiak: - All code relating to the arena is in either Include/pyarena.h or Python/pyarena.c . I propose: All code relating to the arena is either in Include/pyarena.h or in Python/pyarena.c . ---------- components: Devguide files: wording_compiler.diff keywords: patch messages: 200572 nosy: ezio.melotti, numerodix priority: normal severity: normal status: open title: devguide: compiler - wording Added file: http://bugs.python.org/file32246/wording_compiler.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 14:31:35 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sun, 20 Oct 2013 12:31:35 +0000 Subject: [issue19316] devguide: compiler - wording In-Reply-To: <1382272126.03.0.859419260116.issue19316@psf.upfronthosting.co.za> Message-ID: <1382272295.83.0.100335805935.issue19316@psf.upfronthosting.co.za> Martin Matusiak added the comment: - This needs to only be called in strategic areas where the compiler exits. I propose: This only needs to be called in strategic areas where the compiler exits. ---------- Added file: http://bugs.python.org/file32247/wording_compiler2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 14:37:50 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 20 Oct 2013 12:37:50 +0000 Subject: [issue19313] reference leaks In-Reply-To: <1382270582.6.0.446986399732.issue19313@psf.upfronthosting.co.za> Message-ID: <1382272670.84.0.941285013484.issue19313@psf.upfronthosting.co.za> Nick Coghlan added the comment: Just spotted the bug in http://hg.python.org/cpython/rev/b4a325275fb0 The "Py_XINCREF(name);" call should have been removed, as it's the counterpart to the removed "Py_CLEAR(u->u_qualname);" call ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 14:38:06 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 20 Oct 2013 12:38:06 +0000 Subject: [issue19313] reference leaks In-Reply-To: <1382270582.6.0.446986399732.issue19313@psf.upfronthosting.co.za> Message-ID: <1382272686.34.0.127264994956.issue19313@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: benjamin.peterson -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 14:44:35 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 20 Oct 2013 12:44:35 +0000 Subject: [issue19313] reference leaks In-Reply-To: <1382270582.6.0.446986399732.issue19313@psf.upfronthosting.co.za> Message-ID: <3d2gf60VYlz7Ljb@mail.python.org> Roundup Robot added the comment: New changeset 84a8b797c5c5 by Nick Coghlan in branch 'default': Close #19313: remove no longer needed Py_XINCREF http://hg.python.org/cpython/rev/84a8b797c5c5 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 14:49:00 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sun, 20 Oct 2013 12:49:00 +0000 Subject: [issue19316] devguide: compiler - wording In-Reply-To: <1382272126.03.0.859419260116.issue19316@psf.upfronthosting.co.za> Message-ID: <1382273340.55.0.0967720587246.issue19316@psf.upfronthosting.co.za> Martin Matusiak added the comment: - The functions called to generate AST nodes from the parse tree all have the name ast_for_xx where xx is what the grammar rule that the function handles (alias_for_import_name is the exception to this). I'm not sure if this ought to be "where xx is the grammar rule that the function handles" or "where xx is the name of the grammar rule that the function handles". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 14:50:32 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 20 Oct 2013 12:50:32 +0000 Subject: [issue19313] reference leaks In-Reply-To: <1382270582.6.0.446986399732.issue19313@psf.upfronthosting.co.za> Message-ID: <1382273432.16.0.268742924459.issue19313@psf.upfronthosting.co.za> Nick Coghlan added the comment: Before: $ ./python -m test -R 3:3 test_ast [1/1] test_ast beginning 6 repetitions 123456 ...... test_ast leaked [6885, 6885, 6885] references, sum=20655 test_ast leaked [4888, 4890, 4890] memory blocks, sum=14668 1 test failed: test_ast After: $ ./python -m test -R 3:3 test_ast [1/1] test_ast beginning 6 repetitions 123456 ...... 1 test OK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 14:51:11 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sun, 20 Oct 2013 12:51:11 +0000 Subject: [issue19316] devguide: compiler - wording In-Reply-To: <1382272126.03.0.859419260116.issue19316@psf.upfronthosting.co.za> Message-ID: <1382273471.93.0.567905334757.issue19316@psf.upfronthosting.co.za> Martin Matusiak added the comment: - Function and macros for creating and using asdl_seq * types as found in Python/asdl.c and Include/asdl.h: I propose: The following are functions and macros for creating and using asdl_seq * types as found in Python/asdl.c and Include/asdl.h: ---------- Added file: http://bugs.python.org/file32248/wording_compiler3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 15:12:19 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sun, 20 Oct 2013 13:12:19 +0000 Subject: [issue19316] devguide: compiler - wording In-Reply-To: <1382272126.03.0.859419260116.issue19316@psf.upfronthosting.co.za> Message-ID: <1382274739.47.0.990003386294.issue19316@psf.upfronthosting.co.za> Martin Matusiak added the comment: - As for handling the line number on which a statement is defined, is handled by compiler_visit_stmt() and thus is not a worry. I don't understand the final clause here. What is not a worry and why would it be a worry? The grammar is awkward as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 15:32:47 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sun, 20 Oct 2013 13:32:47 +0000 Subject: [issue19316] devguide: compiler - wording In-Reply-To: <1382272126.03.0.859419260116.issue19316@psf.upfronthosting.co.za> Message-ID: <1382275967.44.0.915835839403.issue19316@psf.upfronthosting.co.za> Martin Matusiak added the comment: - But you will also need to change the ?compiler? package. The key files to do that are Lib/compiler/pyassem.py and Lib/compiler/pycodegen.py . "compiler" was removed in 2.6 or 2.7 iirc. I think it's safe to remove these two sentences. ---------- Added file: http://bugs.python.org/file32249/wording_compiler_oldpackage.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 15:35:06 2013 From: report at bugs.python.org (Matthias Klose) Date: Sun, 20 Oct 2013 13:35:06 +0000 Subject: [issue19308] Tools/gdb/libpython.py does not support GDB linked against Python 3 In-Reply-To: <1382261054.14.0.65764193658.issue19308@psf.upfronthosting.co.za> Message-ID: <1382276106.18.0.34948921459.issue19308@psf.upfronthosting.co.za> Matthias Klose added the comment: should go into 2.7 as well. ---------- nosy: +doko versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 15:44:20 2013 From: report at bugs.python.org (David Edelsohn) Date: Sun, 20 Oct 2013 13:44:20 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382276660.19.0.163902926817.issue19293@psf.upfronthosting.co.za> David Edelsohn added the comment: > To test this theory, it should be sufficient to comment out > self._loop.add_reader(self._fileno, self._read_ready) When I comment out this line, test_subprocess_interactive succeeds on AIX. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 15:46:21 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sun, 20 Oct 2013 13:46:21 +0000 Subject: [issue19316] devguide: compiler - wording In-Reply-To: <1382272126.03.0.859419260116.issue19316@psf.upfronthosting.co.za> Message-ID: <1382276781.18.0.580414699711.issue19316@psf.upfronthosting.co.za> Martin Matusiak added the comment: - If you wish to make changes that affect the output of bytecode without having to update the magic number each time (while testing your changes) you can just delete your old .py(c|o) files! Even though you will end up changing the magic number if you change the bytecode, while you are debugging your work you will be changing the bytecode output without constantly bumping up the magic number. This means you end up with stale .pyc files that will not be recreated. Running find . -name '*.py[co]' -exec rm -f {} ';' should delete all .pyc files you have, forcing new ones to be created and thus allow you test out your new bytecode properly. I propose: Any time you make changes that affect the output of bytecode you will need to update the magic number as well, otherwise Python will reuse your old .pyc files and you will not be able to test your new bytecode properly. If you do not wish to constantly bump the magic number you can just delete the old .pyc files each time by running find . -name '*.py[co]' -exec rm -f {} ';' ---------- Added file: http://bugs.python.org/file32250/wording_compiler4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 15:55:51 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sun, 20 Oct 2013 13:55:51 +0000 Subject: [issue19316] devguide: compiler - wording In-Reply-To: <1382272126.03.0.859419260116.issue19316@psf.upfronthosting.co.za> Message-ID: <1382277351.44.0.844726289386.issue19316@psf.upfronthosting.co.za> Martin Matusiak added the comment: - marshaling marshalling ---------- Added file: http://bugs.python.org/file32251/wording_typo.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 15:58:31 2013 From: report at bugs.python.org (Elazar Gershuni) Date: Sun, 20 Oct 2013 13:58:31 +0000 Subject: [issue19235] Add a dedicated subclass for recursion errors In-Reply-To: <1381596107.9.0.320701037292.issue19235@psf.upfronthosting.co.za> Message-ID: <1382277511.26.0.613964840406.issue19235@psf.upfronthosting.co.za> Elazar Gershuni added the comment: Looks good to me. Is it possible to add it to 2.7? I think it won't break any PEP8-following code (e.g. not testing for type equality/identity) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 15:59:39 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sun, 20 Oct 2013 13:59:39 +0000 Subject: [issue19316] devguide: compiler - wording In-Reply-To: <1382272126.03.0.859419260116.issue19316@psf.upfronthosting.co.za> Message-ID: <1382277579.25.0.5291194622.issue19316@psf.upfronthosting.co.za> Martin Matusiak added the comment: - import.c - Home of the magic number (named MAGIC) for bytecode versioning Probably out of date. I cannot find MAGIC being defined in this file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 16:02:23 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sun, 20 Oct 2013 14:02:23 +0000 Subject: [issue19316] devguide: compiler - wording In-Reply-To: <1382272126.03.0.859419260116.issue19316@psf.upfronthosting.co.za> Message-ID: <1382277743.23.0.200120850089.issue19316@psf.upfronthosting.co.za> Martin Matusiak added the comment: - Lib/ - compiler/ - pyassem.py - One of the files that must be modified if Include/opcode.h is changed. - pycodegen.py - One of the files that must be modified if Include/opcode.h is changed. More mentions of the compiler package. ---------- Added file: http://bugs.python.org/file32252/wording_compiler_oldpackage2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 16:02:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 20 Oct 2013 14:02:57 +0000 Subject: [issue16038] ftplib: unlimited readline() from connection In-Reply-To: <1348569175.14.0.867789583045.issue16038@psf.upfronthosting.co.za> Message-ID: <3d2jNX1TYdz7Ljy@mail.python.org> Roundup Robot added the comment: New changeset 44ac81e6d584 by Serhiy Storchaka in branch '2.7': Issue #16038: CVE-2013-1752: ftplib: Limit amount of data read by http://hg.python.org/cpython/rev/44ac81e6d584 New changeset 38db4d0726bd by Serhiy Storchaka in branch '3.3': Issue #16038: CVE-2013-1752: ftplib: Limit amount of data read by http://hg.python.org/cpython/rev/38db4d0726bd New changeset 0c48fe975c54 by Serhiy Storchaka in branch 'default': Issue #16038: CVE-2013-1752: ftplib: Limit amount of data read by http://hg.python.org/cpython/rev/0c48fe975c54 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 16:03:38 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 Oct 2013 14:03:38 +0000 Subject: [issue16038] ftplib: unlimited readline() from connection In-Reply-To: <1348569175.14.0.867789583045.issue16038@psf.upfronthosting.co.za> Message-ID: <1382277818.58.0.173565833932.issue16038@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: -Python 2.7, Python 3.1, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 16:08:36 2013 From: report at bugs.python.org (David Edelsohn) Date: Sun, 20 Oct 2013 14:08:36 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382278116.26.0.329879262574.issue19293@psf.upfronthosting.co.za> David Edelsohn added the comment: For completeness, the highlights of the new truss trace output after the echo.py change and only tracing the main process to avoid confusion from the interleaved output: test_subprocess_interactive (test.test_asyncio.test_events.PollEventLoopTests) ... socketpair(1, 1, 0, 0x2FF112F0) = 0 kfcntl(5, F_SETFD, 0x00000001) = 0 kfcntl(6, F_SETFD, 0x00000001) = 0 kfcntl(5, F_GETFL, 0x00000000) = 2 kioctl(5, -2147195266, 0x2FF12610, 0x00000000) = 0 kioctl(5, -2147195267, 0x2FF12610, 0x00000000) = 0 kfcntl(5, F_SETFL, 0x00000006) = 0 kfcntl(6, F_GETFL, 0x00000000) = 2 kioctl(6, -2147195266, 0x2FF12610, 0x00000000) = 0 kioctl(6, -2147195267, 0x2FF12610, 0x00000000) = 0 kfcntl(6, F_SETFL, 0x00000006) = 0 _poll(0x201A9B00, 1, 0) = 0 fstatx(6, 0x2FF0F0F0, 128, 010) = 0 sigprocmask(2, 0xF0296960, 0x2FF0F0A0) = 0 _sigaction(20, 0x2FF0F0F8, 0x2FF0F108) = 0 thread_setmymask_fast(0x00000000, 0x00000000, 0x00000000, 0x14260153, 0x00000003, 0x00000110, 0x00000000, 0x00000000) = 0x00000000 pipe(0x2FF0E2F0) = 0 kfcntl(7, F_SETFD, 0x00000001) = 0 kfcntl(8, F_SETFD, 0x00000001) = 0 pipe(0x2FF0E2F0) = 0 kfcntl(9, F_SETFD, 0x00000001) = 0 kfcntl(10, F_SETFD, 0x00000001) = 0 pipe(0x2FF0E2F0) = 0 kfcntl(11, F_SETFD, 0x00000001) = 0 kfcntl(12, F_SETFD, 0x00000001) = 0 fstatx(8, 0x2FF0E748, 128, 010) = 0 fstatx(8, 0x2FF0E748, 128, 010) = 0 kioctl(8, 22528, 0x00000000, 0x00000000) Err#25 ENOTTY fstatx(9, 0x2FF0E748, 128, 010) = 0 fstatx(9, 0x2FF0E748, 128, 010) = 0 kioctl(9, 22528, 0x00000000, 0x00000000) Err#25 ENOTTY fstatx(11, 0x2FF0E748, 128, 010) = 0 fstatx(11, 0x2FF0E748, 128, 010) = 0 kioctl(11, 22528, 0x00000000, 0x00000000) Err#25 ENOTTY pipe(0x2FF0E1C0) = 0 kfcntl(13, F_SETFD, 0x00000001) = 0 kfcntl(14, F_SETFD, 0x00000001) = 0 sigprocmask(0, 0xF0296960, 0xF0296968) = 0 kfork() = 51773770 thread_setmymask_fast(0x00000000, 0x00000000, 0x00000000, 0xD0528F00, 0x00000000, 0x14260153, 0x14260153, 0x00000000) = 0x00000000 _getpid() = 65077750 close(14) = 0 close(7) = 0 close(10) = 0 close(12) = 0 kread(13, " ? ? ? ? ? ? ? ? ? ? ? ?".., 50000) = 0 close(13) = 0 fstatx(8, 0x2FF0DB58, 128, 010) = 0 kfcntl(8, F_GETFL, 0x00000000) = 1 kioctl(8, -2147195266, 0x2FF0CDD0, 0x00000000) = 0 kioctl(8, -2147195267, 0x2FF0CDD0, 0x00000000) = 0 kfcntl(8, F_SETFL, 0x00000005) = 0 _poll(0x204DBB90, 2, 0) = 0 _poll(0x204DBB90, 2, 0) = 0 kfcntl(9, F_GETFL, 0x00000000) = 0 kioctl(9, -2147195266, 0x2FF0C360, 0x00000000) = 0 kioctl(9, -2147195267, 0x2FF0C360, 0x00000000) = 0 kfcntl(9, F_SETFL, 0x00000004) = 0 _poll(0x204DBB90, 3, 0) = 0 _poll(0x204DBB90, 3, 0) = 0 kfcntl(11, F_GETFL, 0x00000000) = 0 kioctl(11, -2147195266, 0x2FF0C360, 0x00000000) = 0 kioctl(11, -2147195267, 0x2FF0C360, 0x00000000) = 0 kfcntl(11, F_SETFL, 0x00000004) = 0 _poll(0x2050B8C0, 4, 0) = 0 _poll(0x2050B8C0, 4, 0) = 0 _poll(0x2050B8C0, 4, 0) = 0 _poll(0x2050B8C0, 4, 0) = 0 kwrite(8, " P y t h o n ", 7) = 7 _poll(0x2050B8C0, 4, 0) = 1 _poll(0x2050B8C0, 3, 0) = 0 close(8) = 0 _poll(0x2050B8C0, 3, 0) = 0 _poll(0x2050B8C0, 3, -1) = 1 __libc_sbrk(0x00000000) = 0x20541130 kread(9, " P y t h o n ? ? ? ? ?".., 262144) = 7 _poll(0x2050B8C0, 3, 0) = 0 _poll(0x2050B8C0, 3, 0) = 0 _poll(0x2050B8C0, 3, 0) = 0 _poll(0x2050B8C0, 3, 0) = 0 _poll(0x2050B8C0, 3, -1) = 2 kread(9, " ? ? ? ? ? ? ? ? ? ? ? ?".., 262144) = 0 kread(11, " ? ? ? ? ? ? ? ? ? ? ? ?".., 262144) = 0 _poll(0x2050B8C0, 1, 0) = 0 close(9) = 0 close(11) = 0 Received signal #20, SIGCHLD [caught] _getpid() = 65077750 kwrite(6, "14", 1) = 1 ksetcontext_sigreturn(0x2FF11D70, 0x200868EC, 0x00000008, 0xD0528CA4, 0x00000000, 0x14260153, 0x2FF22FF8, 0x00000000) _poll(0x2050B8C0, 1, 0) = 1 _erecv(5, 0x3075C820, 1, 0, 0x00000000) = 1 _poll(0x2050B8C0, 1, 0) = 0 kwaitpid(0x2FF12134, 0, 5, 0x00000000, 0x00000000) = 51773770 _poll(0x2050B8C0, 1, 0) = 0 _poll(0x2050B8C0, 1, -1) (sleeping...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 16:12:56 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 20 Oct 2013 14:12:56 +0000 Subject: [issue19065] sqlite3 timestamp adapter chokes on timezones In-Reply-To: <1379808201.46.0.645672081963.issue19065@psf.upfronthosting.co.za> Message-ID: <1382278376.88.0.539541783264.issue19065@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Added patch to add timezone support for sqlite3 datetime adapter. ---------- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file32253/add_timezone_support_for_sqlite3_datetime_adapter.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 16:47:41 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 Oct 2013 14:47:41 +0000 Subject: [issue16042] smtplib: unlimited readline() from connection In-Reply-To: <1348569609.82.0.499861906556.issue16042@psf.upfronthosting.co.za> Message-ID: <1382280461.6.0.908532219611.issue16042@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a port of changeset 8a6def3add5b for 2.7. However getreply() is not tested yet. ---------- Added file: http://bugs.python.org/file32254/smtplib_maxline-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 17:08:07 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 20 Oct 2013 15:08:07 +0000 Subject: [issue16038] ftplib: unlimited readline() from connection In-Reply-To: <1348569175.14.0.867789583045.issue16038@psf.upfronthosting.co.za> Message-ID: <1382281687.19.0.143094165799.issue16038@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: (3.1 branch is open to security fixes.) ---------- versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 17:31:38 2013 From: report at bugs.python.org (=?utf-8?q?Maciej_Blizi=C5=84ski?=) Date: Sun, 20 Oct 2013 15:31:38 +0000 Subject: [issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris Message-ID: <1382283098.83.0.173984225129.issue19317@psf.upfronthosting.co.za> New submission from Maciej Blizi?ski: On Solaris, when you want to link shared libraries from custom directories, you most often don't modify the system search path, but instead set RPATH in your binaries. For example, OpenCSW packages Python into /opt/csw, and sets Python executable's RPATH to /opt/csw/lib. Therefore, dynamically opening shared libraries will by default look into /opt/csw/lib first, and find_library should do the same. I wrote a sample implementation. ---------- components: ctypes files: find_library_looks_into_rpath.patch keywords: patch messages: 200593 nosy: automatthias priority: normal severity: normal status: open title: ctypes.util.find_library should examine binary's RPATH on Solaris type: enhancement versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32255/find_library_looks_into_rpath.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 17:32:24 2013 From: report at bugs.python.org (=?utf-8?q?Maciej_Blizi=C5=84ski?=) Date: Sun, 20 Oct 2013 15:32:24 +0000 Subject: [issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris In-Reply-To: <1382283098.83.0.173984225129.issue19317@psf.upfronthosting.co.za> Message-ID: <1382283144.85.0.400529604131.issue19317@psf.upfronthosting.co.za> Changes by Maciej Blizi?ski : Removed file: http://bugs.python.org/file32255/find_library_looks_into_rpath.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 17:35:31 2013 From: report at bugs.python.org (=?utf-8?q?Maciej_Blizi=C5=84ski?=) Date: Sun, 20 Oct 2013 15:35:31 +0000 Subject: [issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris In-Reply-To: <1382283098.83.0.173984225129.issue19317@psf.upfronthosting.co.za> Message-ID: <1382283331.49.0.187325389963.issue19317@psf.upfronthosting.co.za> Changes by Maciej Blizi?ski : Added file: http://bugs.python.org/file32256/find_library_looks_into_rpath.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 17:38:55 2013 From: report at bugs.python.org (=?utf-8?q?Maciej_Blizi=C5=84ski?=) Date: Sun, 20 Oct 2013 15:38:55 +0000 Subject: [issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris In-Reply-To: <1382283098.83.0.173984225129.issue19317@psf.upfronthosting.co.za> Message-ID: <1382283535.6.0.52343823462.issue19317@psf.upfronthosting.co.za> Changes by Maciej Blizi?ski : Removed file: http://bugs.python.org/file32256/find_library_looks_into_rpath.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 17:43:42 2013 From: report at bugs.python.org (=?utf-8?q?Maciej_Blizi=C5=84ski?=) Date: Sun, 20 Oct 2013 15:43:42 +0000 Subject: [issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris In-Reply-To: <1382283098.83.0.173984225129.issue19317@psf.upfronthosting.co.za> Message-ID: <1382283822.23.0.548148978116.issue19317@psf.upfronthosting.co.za> Changes by Maciej Blizi?ski : Added file: http://bugs.python.org/file32257/find_library_looks_into_rpath.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 17:56:23 2013 From: report at bugs.python.org (Sunny K) Date: Sun, 20 Oct 2013 15:56:23 +0000 Subject: [issue14680] pydoc with -w option does not work for a lot of help topics In-Reply-To: <1335478272.08.0.215124599111.issue14680@psf.upfronthosting.co.za> Message-ID: <1382284583.48.0.822241867588.issue14680@psf.upfronthosting.co.za> Sunny K added the comment: This issue is present in 3.4 too. Added patch for 3.4. ---------- keywords: +patch nosy: +sunfinite versions: +Python 3.4 Added file: http://bugs.python.org/file32258/pydoc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 18:36:50 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 20 Oct 2013 16:36:50 +0000 Subject: [issue19309] asyncio: fix handling of processes in a different process group In-Reply-To: <1382262717.42.0.688031898655.issue19309@psf.upfronthosting.co.za> Message-ID: <1382287010.37.0.323792555259.issue19309@psf.upfronthosting.co.za> Guido van Rossum added the comment: I added an LGTM plus a pointer to http://code.google.com/p/tulip/issues/detail?id=68 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 18:37:52 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 20 Oct 2013 16:37:52 +0000 Subject: [issue19310] asyncio: fix waitpid() logic In-Reply-To: <1382265209.42.0.484907222023.issue19310@psf.upfronthosting.co.za> Message-ID: <1382287072.59.0.0961610999526.issue19310@psf.upfronthosting.co.za> Guido van Rossum added the comment: Ah, sorry, I didn't see this before reviewing your other change to the same code. Your 2nd bullet is http://code.google.com/p/tulip/issues/detail?id=68 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 18:44:52 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 20 Oct 2013 16:44:52 +0000 Subject: [issue19295] Make asyncio work without threads In-Reply-To: <1382178666.39.0.442915890559.issue19295@psf.upfronthosting.co.za> Message-ID: <1382287492.33.0.0544925101424.issue19295@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- assignee: -> gvanrossum resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 18:55:54 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 20 Oct 2013 16:55:54 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: Message-ID: Guido van Rossum added the comment: > > Could it be that selecting for *read* on the *write* end of a pipe is > > always ready? > > That's exactly what I was thinking when I read the code below: that's > definitely a possibility on AIX. David confirmed that it is the _read_ready() that closes the pipe prematurely. (Thanks David!) > > In _UnixWritePipeTransport there's a read handler that > > immediately closes the pipe as soon as it called. I vaguely remember a > > discussion on python-tulip that this might be Linux-specific behavior. (The > > reason is that otherwise you can't find out whether the other end was > > closed unless you attempt to write to the pipe.) > > Normally, if the pipe is closed, it should be reported by a POLLHUP/write ready. > Then you only consider it closed when write fails with EPIPE. That's no good though unless the app wants to write -- the write end also reports write ready when it is empty (or nearly so), so this won't help an app that has done all the writing it wants to (at least for a while) but still wants to be notified when the other end has closed it. Now, there are other indications, such as the pipe in the other direction giving an EOF, or the process exiting, but sometimes neither of those happens, and then we're stuck. I guess we'll have to write platform-dependent code and make this an optional feature. (Essentially, on platforms like AIX, for a write-pipe, connection_lost() won't be called unless you try to write some more bytes to it.) I do believe that so far this problem only occurs on AIX so I am tempted to make it an explicit test for AIX -- if it's AIX, don't register the _read_ready handler. We'll also have to skip or adjust one or two tests that will fail if this feature is missing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 19:19:32 2013 From: report at bugs.python.org (=?utf-8?q?Maciej_Blizi=C5=84ski?=) Date: Sun, 20 Oct 2013 17:19:32 +0000 Subject: [issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris In-Reply-To: <1382283098.83.0.173984225129.issue19317@psf.upfronthosting.co.za> Message-ID: <1382289572.8.0.105479052675.issue19317@psf.upfronthosting.co.za> Changes by Maciej Blizi?ski : Added file: http://bugs.python.org/file32259/find_library_looks_into_rpath.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 19:19:41 2013 From: report at bugs.python.org (=?utf-8?q?Maciej_Blizi=C5=84ski?=) Date: Sun, 20 Oct 2013 17:19:41 +0000 Subject: [issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris In-Reply-To: <1382283098.83.0.173984225129.issue19317@psf.upfronthosting.co.za> Message-ID: <1382289581.88.0.924849053354.issue19317@psf.upfronthosting.co.za> Changes by Maciej Blizi?ski : Removed file: http://bugs.python.org/file32257/find_library_looks_into_rpath.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 19:36:37 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 20 Oct 2013 17:36:37 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: Message-ID: Charles-Fran?ois Natali added the comment: > I guess we'll have to write platform-dependent code and make this an > optional feature. (Essentially, on platforms like AIX, for a > write-pipe, connection_lost() won't be called unless you try to write > some more bytes to it.) > > I do believe that so far this problem only occurs on AIX so I am > tempted to make it an explicit test for AIX -- if it's AIX, don't > register the _read_ready handler. We'll also have to skip or adjust > one or two tests that will fail if this feature is missing. Hmm... Not calling connection_lost() when the read-end of the pipe is closed is OK, since there's no portable way to detect this on e.g. AIX, but AFAICT the current process-termination logic is buggy: When SIGCHLD is received, _sig_chld() is executed: def _sig_chld(self): [...] transp = self._subprocesses.get(pid) if transp is not None: transp._process_exited(returncode) Then, here's _process_exited(): def _process_exited(self, returncode): assert returncode is not None, returncode assert self._returncode is None, self._returncode self._returncode = returncode self._loop._subprocess_closed(self) self._call(self._protocol.process_exited) self._try_finish() And here's _try_finish(): def _try_finish(self): assert not self._finished if self._returncode is None: return if all(p is not None and p.disconnected for p in self._pipes.values()): self._finished = True self._loop.call_soon(self._call_connection_lost, None) Thus, _UnixSubprocessTransport protocol's connection_lost is only called if the all() expression is true: and it's true only if all the subprocess pipes have been disconnected (or if we didn't setup any pipe). Unfortunately, this might very well never happen: imagine that the subprocess forks a process: this grand-child process inherits the child process's pipes, so when the child process exits, we won't receive any notification, since this grand-child process still has open FDs pointing to the original child's stdin/stdout/stderr. The following simple test will hang until the background 'sleep' exits: """ diff -r 47618b00405b Lib/test/test_asyncio/test_events.py --- a/Lib/test/test_asyncio/test_events.py Sat Oct 19 10:45:48 2013 +0300 +++ b/Lib/test/test_asyncio/test_events.py Sun Oct 20 19:32:37 2013 +0200 @@ -1059,6 +1059,23 @@ @unittest.skipIf(sys.platform == 'win32', "Don't support subprocess for Windows yet") + def test_subprocess_inherit_fds(self): + proto = None + + @tasks.coroutine + def connect(): + nonlocal proto + transp, proto = yield from self.loop.subprocess_shell( + functools.partial(MySubprocessProtocol, self.loop), + 'sleep 60 &') + self.assertIsInstance(proto, MySubprocessProtocol) + + self.loop.run_until_complete(connect()) + self.loop.run_until_complete(proto.completed) + self.assertEqual(0, proto.returncode) + + @unittest.skipIf(sys.platform == 'win32', + "Don't support subprocess for Windows yet") def test_subprocess_close_after_finish(self): proto = None transp = None """ If waitpid() returns a process's PID, then the process is done, there's no reason to further wait for pipe's disconnection: they can be used as a hint that the process terminated, but there's definitely not required... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 19:37:10 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 20 Oct 2013 17:37:10 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382290630.75.0.873899733542.issue19293@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > I guess we'll have to write platform-dependent code and make this an > optional feature. (Essentially, on platforms like AIX, for a > write-pipe, connection_lost() won't be called unless you try to write > some more bytes to it.) If we are not capturing stdout/stderr then we could "leak" the write end of a pipe to the child. When the read end becomes readable we can call the process protocol's connection_lost(). Or we could just call connection_lost() when reaping the pid. ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 19:50:13 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sun, 20 Oct 2013 17:50:13 +0000 Subject: [issue18401] Tests for pdb import ~/.pdbrc In-Reply-To: <1373261746.39.0.598108958249.issue18401@psf.upfronthosting.co.za> Message-ID: <1382291413.95.0.777495517882.issue18401@psf.upfronthosting.co.za> Martin Matusiak added the comment: I have been thinking about a fix for this. A straightforward fix would be to add a kwarg readrc=True to the constructor of Pdb that will default to reading the rc files as it does now, and allows disabling this default. The implication is that all tests in stdlib will need to use pdb.Pdb(readrc=False).set_trace() instead of just pdb.set_trace(). This would impact (from what I can see) doctest.py, test_pdb.py and test_doctest.py, and would also require some kind of warning/notice instructing test writers to follow this convention. I started working on a patch for this (attached), which works for test_pdb, but I can't get the tests in test_doctest to work yet. It would also be useful to have a test that demonstrates this problem and I'm not sure what the best approach is... should it show that doctests fail? If so, and knowing that Pdb reads rc files from a) $HOME/.pdbrc and b) ./.pdbrc, the test could: a) unset os.environ['HOME'] b) use a tmpdir and put a temporary .pdbrc file there, with some invalid Python code c) chdir to that tmpdir Then to trigger the problem it could write a small script containing a doctest that internally does pdb.set_trace(), run the module and demonstrate that the doctest failed. And then teardown all the temporary resources in a finally block. ---------- keywords: +patch nosy: +numerodix Added file: http://bugs.python.org/file32260/pdb_add_readrc_kwarg.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 20:08:58 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 20 Oct 2013 18:08:58 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1382292538.51.0.355167042617.issue19227@psf.upfronthosting.co.za> Christian Heimes added the comment: I think it's more likely that my patch is triggering an existing bug. The locking code for the SSL module and OpenSSL doesn't release locks on fork. I have attached an experimental patch that unlocks all locks in the client. Please try if it resolves the issue. ---------- keywords: +patch Added file: http://bugs.python.org/file32261/unlock_ssl_locks.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 20:17:05 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 20 Oct 2013 18:17:05 +0000 Subject: [issue16038] ftplib: unlimited readline() from connection In-Reply-To: <1382281687.19.0.143094165799.issue16038@psf.upfronthosting.co.za> Message-ID: Giampaolo Rodola' added the comment: You are right. I will try to provide patches for other Python versions later next week. On Sun, Oct 20, 2013 at 5:08 PM, Arfrever Frehtes Taifersar Arahesis < report at bugs.python.org> wrote: > > Arfrever Frehtes Taifersar Arahesis added the comment: > > (3.1 branch is open to security fixes.) > > ---------- > versions: +Python 3.1 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 20:19:17 2013 From: report at bugs.python.org (James Lu) Date: Sun, 20 Oct 2013 18:19:17 +0000 Subject: [issue19318] break more than once Message-ID: <1382293157.67.0.695051872631.issue19318@psf.upfronthosting.co.za> New submission from James Lu: break 2 would break out of one loop then break out of another. break break would just break once and not execute the second break. break 2 when there are only 1 thing to break would raise raise a SyntaxError: Can only break 1 time, need to break 2 times. ---------- messages: 200603 nosy: James.Lu priority: normal severity: normal status: open title: break more than once _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 20:19:33 2013 From: report at bugs.python.org (Christoph Baumgartner) Date: Sun, 20 Oct 2013 18:19:33 +0000 Subject: [issue19319] misleading comment regarding C Message-ID: <1382293173.85.0.561092351963.issue19319@psf.upfronthosting.co.za> New submission from Christoph Baumgartner: The documentation about ctypes.sizeof: "Returns the size in bytes of a ctypes type or instance memory buffer. Does the same as the C sizeof() function." 'sizeof' is an operator. I would drop the parentheses as well. ---------- assignee: docs at python components: Documentation messages: 200604 nosy: Christoph.Baumgartner, docs at python priority: normal severity: normal status: open title: misleading comment regarding C _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 20:21:42 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sun, 20 Oct 2013 18:21:42 +0000 Subject: [issue7757] sys.path is incorrect when prefix is "" In-Reply-To: <1264178776.01.0.552667161926.issue7757@psf.upfronthosting.co.za> Message-ID: <1382293302.51.0.964532361033.issue7757@psf.upfronthosting.co.za> Changes by Martin Matusiak : ---------- nosy: +numerodix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 20:22:13 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sun, 20 Oct 2013 18:22:13 +0000 Subject: [issue8083] urllib proxy interface is too limited In-Reply-To: <1267960974.57.0.282582505856.issue8083@psf.upfronthosting.co.za> Message-ID: <1382293333.39.0.604970488885.issue8083@psf.upfronthosting.co.za> Changes by Martin Matusiak : ---------- nosy: +numerodix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 20:23:43 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sun, 20 Oct 2013 18:23:43 +0000 Subject: [issue19318] break more than once In-Reply-To: <1382293157.67.0.695051872631.issue19318@psf.upfronthosting.co.za> Message-ID: <1382293423.24.0.12100500036.issue19318@psf.upfronthosting.co.za> Changes by Martin Matusiak : ---------- nosy: +numerodix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 20:24:22 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sun, 20 Oct 2013 18:24:22 +0000 Subject: [issue19319] misleading comment regarding C In-Reply-To: <1382293173.85.0.561092351963.issue19319@psf.upfronthosting.co.za> Message-ID: <1382293462.89.0.799795176331.issue19319@psf.upfronthosting.co.za> Changes by Martin Matusiak : ---------- nosy: +numerodix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 20:25:20 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sun, 20 Oct 2013 18:25:20 +0000 Subject: [issue17951] TypeError during gdb backtracing In-Reply-To: <1368228204.29.0.543705311064.issue17951@psf.upfronthosting.co.za> Message-ID: <1382293520.19.0.900906935606.issue17951@psf.upfronthosting.co.za> Changes by Martin Matusiak : ---------- nosy: +numerodix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 20:27:18 2013 From: report at bugs.python.org (James Lu) Date: Sun, 20 Oct 2013 18:27:18 +0000 Subject: [issue19318] break more than once In-Reply-To: <1382293157.67.0.695051872631.issue19318@psf.upfronthosting.co.za> Message-ID: <1382293638.82.0.156697403885.issue19318@psf.upfronthosting.co.za> James Lu added the comment: You would have to do this: for i in range(1,10): broke = True for x in range(2,5): break else: broke = False if broke: break to break twice, and you can't break only once! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 20:30:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 20 Oct 2013 18:30:31 +0000 Subject: [issue19309] asyncio: fix handling of processes in a different process group In-Reply-To: <1382262717.42.0.688031898655.issue19309@psf.upfronthosting.co.za> Message-ID: <3d2qKf3vlbz7LjX@mail.python.org> Roundup Robot added the comment: New changeset 4cdb9f04494b by Charles-Fran?ois Natali in branch 'default': Issue #19309: asyncio: make waitpid() wait for all child processes, not only http://hg.python.org/cpython/rev/4cdb9f04494b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 20:32:28 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 Oct 2013 18:32:28 +0000 Subject: [issue16991] Add OrderedDict written in C In-Reply-To: <1358482110.59.0.347859163753.issue16991@psf.upfronthosting.co.za> Message-ID: <1382293948.17.0.257422799979.issue16991@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Rebase patch to tip. ---------- Added file: http://bugs.python.org/file32262/cOrderedDict-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 20:32:43 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 20 Oct 2013 18:32:43 +0000 Subject: [issue19309] asyncio: fix handling of processes in a different process group In-Reply-To: <1382262717.42.0.688031898655.issue19309@psf.upfronthosting.co.za> Message-ID: <1382293963.74.0.636364701715.issue19309@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Committed! (The retry loop is addressed in another issue). ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 20:36:19 2013 From: report at bugs.python.org (Martin Matusiak) Date: Sun, 20 Oct 2013 18:36:19 +0000 Subject: [issue19318] break more than once In-Reply-To: <1382293157.67.0.695051872631.issue19318@psf.upfronthosting.co.za> Message-ID: <1382294179.2.0.772931257148.issue19318@psf.upfronthosting.co.za> Martin Matusiak added the comment: I see one potential problem with this, namely that refactoring code that contains "break n" statements would become more error prone whenever the depth of the code block gets modified. So if you had something like: for i in range(10): for j in range(10): for k in range(10): if cond: break 2 And then you decided to remove the middle loop (on j), the break 2 would send you to the top level, whereas you might have meant for it to break to the first level, inside the loop on i. This is a micro example, of course, but if you imagine the bodies of these loops being quite long then it could get complicated fast. ---------- components: +Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 20:40:59 2013 From: report at bugs.python.org (James Lu) Date: Sun, 20 Oct 2013 18:40:59 +0000 Subject: [issue19318] break more than once In-Reply-To: <1382294179.2.0.772931257148.issue19318@psf.upfronthosting.co.za> Message-ID: James Lu added the comment: Big example: pygame, event proccessing loop running. the user clicks "Quit", you do break 2. psuedocode: while True: for event in pygame.events.get(): if event.type==pygame.QUIT: break 2 james On Sun, Oct 20, 2013 at 2:36 PM, Martin Matusiak wrote: > > Martin Matusiak added the comment: > > I see one potential problem with this, namely that refactoring code that > contains "break n" statements would become more error prone whenever the > depth of the code block gets modified. So if you had something like: > > for i in range(10): > for j in range(10): > for k in range(10): > if cond: > break 2 > > And then you decided to remove the middle loop (on j), the break 2 would > send you to the top level, whereas you might have meant for it to break to > the first level, inside the loop on i. > > This is a micro example, of course, but if you imagine the bodies of these > loops being quite long then it could get complicated fast. > > ---------- > components: +Interpreter Core > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 20:43:35 2013 From: report at bugs.python.org (James Lu) Date: Sun, 20 Oct 2013 18:43:35 +0000 Subject: [issue19318] break more than once In-Reply-To: <1382293157.67.0.695051872631.issue19318@psf.upfronthosting.co.za> Message-ID: <1382294615.02.0.241646495578.issue19318@psf.upfronthosting.co.za> James Lu added the comment: Every new feature takes on new challenges and harder ways to debug. But what about using that very confusing code that I showed that only let's you break one amount, that would be harder to debug! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 20:50:38 2013 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 20 Oct 2013 18:50:38 +0000 Subject: [issue19318] break more than once In-Reply-To: <1382293157.67.0.695051872631.issue19318@psf.upfronthosting.co.za> Message-ID: <1382295038.03.0.653491147883.issue19318@psf.upfronthosting.co.za> Mark Lawrence added the comment: I suggest that there is a zero chance of this being actioned unless the OP wants to do all of the work and attach all of the required patches to this issue. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 20:55:44 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 20 Oct 2013 18:55:44 +0000 Subject: [issue19318] break more than once In-Reply-To: <1382293157.67.0.695051872631.issue19318@psf.upfronthosting.co.za> Message-ID: <1382295344.41.0.213063029233.issue19318@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: 'continue' also should support this feature. ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 20:57:57 2013 From: report at bugs.python.org (James Lu) Date: Sun, 20 Oct 2013 18:57:57 +0000 Subject: [issue19318] break more than once In-Reply-To: <1382295344.41.0.213063029233.issue19318@psf.upfronthosting.co.za> Message-ID: James Lu added the comment: Oh, yes,yes,yes! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 21:01:42 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 20 Oct 2013 19:01:42 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382290630.75.0.873899733542.issue19293@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: No, there's a use case for reading after the child exited, if there is a grandchild still writing. --Guido van Rossum (sent from Android phone) On Oct 20, 2013 10:37 AM, "Richard Oudkerk" wrote: > > Richard Oudkerk added the comment: > > > I guess we'll have to write platform-dependent code and make this an > > optional feature. (Essentially, on platforms like AIX, for a > > write-pipe, connection_lost() won't be called unless you try to write > > some more bytes to it.) > > If we are not capturing stdout/stderr then we could "leak" the write end > of a pipe to the child. When the read end becomes readable we can call the > process protocol's connection_lost(). > > Or we could just call connection_lost() when reaping the pid. > > ---------- > nosy: +sbt > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 21:06:38 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 Oct 2013 19:06:38 +0000 Subject: [issue19318] break more than once In-Reply-To: <1382293157.67.0.695051872631.issue19318@psf.upfronthosting.co.za> Message-ID: <1382295998.71.0.206729478367.issue19318@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Language ideas such as this are best discussed on the python-ideas mailing-list: https://mail.python.org/mailman/listinfo/python-ideas (note that IMO this particular one has very little chance to succeed :-)) ---------- nosy: +pitrou resolution: -> postponed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 21:11:29 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 Oct 2013 19:11:29 +0000 Subject: [issue19308] Tools/gdb/libpython.py does not support GDB linked against Python 3 In-Reply-To: <1382261054.14.0.65764193658.issue19308@psf.upfronthosting.co.za> Message-ID: <1382296289.46.0.612373606934.issue19308@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Do you want to provide a patch? It's hard for someone with a py2-linked gcc to make sure that the libpython pluging works properly. ---------- nosy: +pitrou priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 21:13:58 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 Oct 2013 19:13:58 +0000 Subject: [issue19311] devguide: hg bisect section could be clearer In-Reply-To: <1382266640.75.0.952779110911.issue19311@psf.upfronthosting.co.za> Message-ID: <1382296438.34.0.677492807631.issue19311@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't think we want the devguide to become a Mercurial manual. Also, it is easy to get help for a Mercurial command: just type "hg help bisect". ---------- nosy: +pitrou resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 21:17:20 2013 From: report at bugs.python.org (David Coles) Date: Sun, 20 Oct 2013 19:17:20 +0000 Subject: [issue19308] Tools/gdb/libpython.py does not support GDB linked against Python 3 In-Reply-To: <1382261054.14.0.65764193658.issue19308@psf.upfronthosting.co.za> Message-ID: <1382296640.27.0.636923721286.issue19308@psf.upfronthosting.co.za> David Coles added the comment: Sure thing. I've got a patch attached to https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1241668 but want to make sure that it doesn't break things on the py2-linked version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 21:31:45 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 Oct 2013 19:31:45 +0000 Subject: [issue19236] Add Tornado HTTP benchmark In-Reply-To: <1381605331.62.0.22076893629.issue19236@psf.upfronthosting.co.za> Message-ID: <1382297505.08.0.274988622812.issue19236@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Attached patch makes the get() function asynchronous. ---------- Added file: http://bugs.python.org/file32263/tornado_bench2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 21:40:24 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 Oct 2013 19:40:24 +0000 Subject: [issue19308] Tools/gdb/libpython.py does not support GDB linked against Python 3 In-Reply-To: <1382261054.14.0.65764193658.issue19308@psf.upfronthosting.co.za> Message-ID: <1382298024.36.0.629175577935.issue19308@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Can you please try the attached updated patch? ---------- keywords: +patch stage: -> patch review type: -> behavior Added file: http://bugs.python.org/file32264/gdb_py3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 21:41:21 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 Oct 2013 19:41:21 +0000 Subject: [issue18958] Exception('No JSON object could be decoded') when parsing a valid JSON In-Reply-To: <1378557195.07.0.581794298686.issue18958@psf.upfronthosting.co.za> Message-ID: <1382298081.78.0.334105392907.issue18958@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 21:43:22 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 Oct 2013 19:43:22 +0000 Subject: [issue19307] Improve TypeError message in json.loads() In-Reply-To: <1382246199.49.0.284372498766.issue19307@psf.upfronthosting.co.za> Message-ID: <1382298202.6.0.962457208162.issue19307@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. But perhaps it's worth to test json.load() with binary file. I don't see much sense in testing json.loads() with numbers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 21:45:07 2013 From: report at bugs.python.org (Sunny K) Date: Sun, 20 Oct 2013 19:45:07 +0000 Subject: [issue11698] Improve repr for structseq objects to show named, but unindexed fields In-Reply-To: <1301264097.04.0.982421975108.issue11698@psf.upfronthosting.co.za> Message-ID: <1382298307.44.0.918263142734.issue11698@psf.upfronthosting.co.za> Sunny K added the comment: Added patch for 3.4. The patch demarcates the output by adding a {...} around the dictionary portion. Please let me know if this is the right format or if not required at all. It is a simple change. ---------- nosy: +sunfinite Added file: http://bugs.python.org/file32265/structseq.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 21:53:31 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 Oct 2013 19:53:31 +0000 Subject: [issue18913] ssl._ssl._test_decode_cert seems to leak memory with certain certificates in Python 2.6 In-Reply-To: <1378208801.81.0.941164435803.issue18913@psf.upfronthosting.co.za> Message-ID: <1382298811.87.0.117243184044.issue18913@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 21:54:07 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 Oct 2013 19:54:07 +0000 Subject: [issue18527] Upgrade Modules/zlib to 1.2.8 In-Reply-To: <1374483245.68.0.946100267151.issue18527@psf.upfronthosting.co.za> Message-ID: <1382298847.08.0.0297918012736.issue18527@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Unless it's a security issue, it should probably only go into 3.4. ---------- nosy: +pitrou versions: -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 21:59:06 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 Oct 2013 19:59:06 +0000 Subject: [issue19310] asyncio: fix waitpid() logic In-Reply-To: <1382265209.42.0.484907222023.issue19310@psf.upfronthosting.co.za> Message-ID: <1382299146.61.0.465355439867.issue19310@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Unrelated, but transp._process_exited will be called from the main thread even if the loop is running from another thread. Shouldn't call_soon_threadsafe be used here? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 22:05:19 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 Oct 2013 20:05:19 +0000 Subject: [issue19310] asyncio: fix waitpid() logic In-Reply-To: <1382265209.42.0.484907222023.issue19310@psf.upfronthosting.co.za> Message-ID: <1382299519.42.0.69157344087.issue19310@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Sorry, scratch that. add_signal_handler() won't even accept being called from a non-main thread, according to the comments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 22:11:07 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 Oct 2013 20:11:07 +0000 Subject: [issue19297] test_asyncio: unclosed sockets In-Reply-To: <1382190572.42.0.767959680712.issue19297@psf.upfronthosting.co.za> Message-ID: <1382299867.07.0.726820437704.issue19297@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Since the alpha appears to have been delayed, I think it would be good to commit. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 22:23:05 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 Oct 2013 20:23:05 +0000 Subject: [issue19302] Add support for AIX pollset efficient event I/O polling In-Reply-To: <1382205809.97.0.496335957362.issue19302@psf.upfronthosting.co.za> Message-ID: <1382300585.04.0.0744900093154.issue19302@psf.upfronthosting.co.za> Antoine Pitrou added the comment: You should probably also add support to the new selectors module. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 22:47:36 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 Oct 2013 20:47:36 +0000 Subject: [issue19320] Tkinter tests ran with wantobjects is false Message-ID: <1382302056.06.0.500513298536.issue19320@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: On some Windows buildbots (e.g. [1]) Tkinter tests ran with wantobjects is false. This brake some tests purposed to check converting values between Python and Tcl. There are two solutions. 1) Skip these tests if wantobjects is false. 2) If wantobjects is false tests with other expected values. [1] http://buildbot.python.org/all/builders/x86%20Windows%20Server%202003%20%5BSB%5D%202.7 ---------- components: Library (Lib), Tkinter messages: 200630 nosy: gpolo, serhiy.storchaka priority: normal severity: normal status: open title: Tkinter tests ran with wantobjects is false type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 22:51:07 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sun, 20 Oct 2013 20:51:07 +0000 Subject: [issue19301] Globals declared in function scope have wrong __qualname__ In-Reply-To: <1382205392.94.0.868971273395.issue19301@psf.upfronthosting.co.za> Message-ID: <1382302267.83.0.890710724475.issue19301@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: It seems that we are missing support for nested globals: >>> def f(): ... global C ... class C: ... class D: ... pass ... >>> f() >>> C.D.__qualname__ 'f..C.D' ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 22:54:38 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 20 Oct 2013 20:54:38 +0000 Subject: [issue19301] Globals declared in function scope have wrong __qualname__ In-Reply-To: <1382205392.94.0.868971273395.issue19301@psf.upfronthosting.co.za> Message-ID: <1382302478.33.0.138568877852.issue19301@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Oh, phoey. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 23:00:32 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 Oct 2013 21:00:32 +0000 Subject: [issue19321] memoryview should be a context manager Message-ID: <1382302832.21.0.943595938282.issue19321@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: memoryview() acquires resource but it rarely released explicitly. I propose to made memoryview a context manager which calls the release() method in the __exit__() method. Perhaps it worth also add resource warning in the __del__() method if a memoryview was not released. ---------- components: Interpreter Core keywords: easy messages: 200633 nosy: serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: memoryview should be a context manager type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 23:01:24 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 20 Oct 2013 21:01:24 +0000 Subject: [issue19297] test_asyncio: unclosed sockets In-Reply-To: <1382299867.07.0.726820437704.issue19297@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Is there a patch yet? --Guido van Rossum (sent from Android phone) On Oct 20, 2013 1:11 PM, "Antoine Pitrou" wrote: > > Antoine Pitrou added the comment: > > Since the alpha appears to have been delayed, I think it would be good to > commit. > > ---------- > nosy: +pitrou > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 23:01:31 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 Oct 2013 21:01:31 +0000 Subject: [issue19321] memoryview should be a context manager In-Reply-To: <1382302832.21.0.943595938282.issue19321@psf.upfronthosting.co.za> Message-ID: <1382302891.06.0.474961033644.issue19321@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +pitrou, skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 23:02:42 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 Oct 2013 21:02:42 +0000 Subject: [issue19321] memoryview should be a context manager In-Reply-To: <1382302832.21.0.943595938282.issue19321@psf.upfronthosting.co.za> Message-ID: <1382302962.62.0.190718885011.issue19321@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Already proposed in issue9757. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 23:03:56 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 20 Oct 2013 21:03:56 +0000 Subject: [issue19310] asyncio: fix waitpid() logic In-Reply-To: <1382299519.42.0.69157344087.issue19310@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: CF, feel free to commit this fix too. --Guido van Rossum (sent from Android phone) On Oct 20, 2013 1:05 PM, "Antoine Pitrou" wrote: > > Antoine Pitrou added the comment: > > Sorry, scratch that. add_signal_handler() won't even accept being called > from a non-main thread, according to the comments. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 23:06:11 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 Oct 2013 21:06:11 +0000 Subject: [issue19297] test_asyncio: unclosed sockets In-Reply-To: <1382190572.42.0.767959680712.issue19297@psf.upfronthosting.co.za> Message-ID: <1382303171.36.0.876925712256.issue19297@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Yes, there is one :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 23:15:25 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 20 Oct 2013 21:15:25 +0000 Subject: [issue12029] Catching virtual subclasses in except clauses In-Reply-To: <1304844823.89.0.48444500115.issue12029@psf.upfronthosting.co.za> Message-ID: <1382303725.48.0.201240304426.issue12029@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 23:17:47 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 20 Oct 2013 21:17:47 +0000 Subject: [issue19280] Add a datatype to represent mime types to the email module In-Reply-To: <1382019183.72.0.422205662358.issue19280@psf.upfronthosting.co.za> Message-ID: <1382303867.94.0.502036019627.issue19280@psf.upfronthosting.co.za> R. David Murray added the comment: Well, it's about backward compatibility, and the email module already uses str subclasses for headers in the new code, for backward compatibility reasons. I hope this does not prove fragile in practice, but I have no way of knowing for sure, of course. It occurs to me, however, that the (new) content-type header's value already has the maintype/subtype attributes, so there's really no need to change the return type of the get_content_type method. For internal use...a named tuple is not adequate, since I need to preserve the original case of the values. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 23:22:56 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 20 Oct 2013 21:22:56 +0000 Subject: [issue19297] test_asyncio: unclosed sockets In-Reply-To: <1382303171.36.0.876925712256.issue19297@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: OK, commit it. --Guido van Rossum (sent from Android phone) On Oct 20, 2013 2:06 PM, "Antoine Pitrou" wrote: > > Antoine Pitrou added the comment: > > Yes, there is one :) > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 23:23:39 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 20 Oct 2013 21:23:39 +0000 Subject: [issue19310] asyncio: fix waitpid() logic In-Reply-To: <1382265209.42.0.484907222023.issue19310@psf.upfronthosting.co.za> Message-ID: <3d2v9Q71gDzT1q@mail.python.org> Roundup Robot added the comment: New changeset 28397ecf2316 by Charles-Fran?ois Natali in branch 'default': Issue #19310: asyncio: fix child processes reaping logic. http://hg.python.org/cpython/rev/28397ecf2316 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 23:26:29 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 20 Oct 2013 21:26:29 +0000 Subject: [issue19297] test_asyncio: unclosed sockets In-Reply-To: <1382190572.42.0.767959680712.issue19297@psf.upfronthosting.co.za> Message-ID: <3d2vDh6JgLz7Ljg@mail.python.org> Roundup Robot added the comment: New changeset 8ad3e9cf9590 by Antoine Pitrou in branch 'default': Close #19297: fix resource warnings in test_asyncio. Patch by Vajrasky Kok. http://hg.python.org/cpython/rev/8ad3e9cf9590 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 23:32:20 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 20 Oct 2013 21:32:20 +0000 Subject: [issue19302] Add support for AIX pollset efficient event I/O polling In-Reply-To: <1382205809.97.0.496335957362.issue19302@psf.upfronthosting.co.za> Message-ID: <1382304740.34.0.229310764548.issue19302@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: I don't mean to be rude, but AIX is IMO a niche platform: proprietary Unices are doomed to disappear sooner or later. As such, I'm not convinced that adding an AIX-specific polling interface is really worth it. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 23:48:46 2013 From: report at bugs.python.org (David Edelsohn) Date: Sun, 20 Oct 2013 21:48:46 +0000 Subject: [issue19302] Add support for AIX pollset efficient event I/O polling In-Reply-To: <1382205809.97.0.496335957362.issue19302@psf.upfronthosting.co.za> Message-ID: <1382305726.51.0.0816750248654.issue19302@psf.upfronthosting.co.za> David Edelsohn added the comment: CF, If you don't mean to be rude, then don't be rude. I never claimed that AIX is the most widely used or most important platform. It implements POSIX and Open Group specifications correctly, so it is a good cross-check that features are implemented portably without Linux or BSD assumptions. This enhancement issue is not a demand that you or anyone else in the Python community volunteer to implement it. AIX is a very lucrative business and deployed in many businesses that the Python community would like to reach. Maybe you should broaden your viewpoint and think about why support for a "niche platform" could be beneficial for Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 20 23:51:00 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 20 Oct 2013 21:51:00 +0000 Subject: [issue19301] Globals declared in function scope have wrong __qualname__ In-Reply-To: <1382205392.94.0.868971273395.issue19301@psf.upfronthosting.co.za> Message-ID: <3d2vmz709Rz7LjX@mail.python.org> Roundup Robot added the comment: New changeset bb2affc1e317 by Benjamin Peterson in branch 'default': cleanup the construction of __qualname__ (closes #19301 again) http://hg.python.org/cpython/rev/bb2affc1e317 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 00:32:56 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 20 Oct 2013 22:32:56 +0000 Subject: [issue19310] asyncio: fix waitpid() logic In-Reply-To: <1382265209.42.0.484907222023.issue19310@psf.upfronthosting.co.za> Message-ID: <1382308376.13.0.611820758784.issue19310@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 00:38:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 20 Oct 2013 22:38:43 +0000 Subject: [issue19311] devguide: hg bisect section could be clearer In-Reply-To: <1382266640.75.0.952779110911.issue19311@psf.upfronthosting.co.za> Message-ID: <3d2wr31fDCzN1Q@mail.python.org> Roundup Robot added the comment: New changeset 24c2cfee3b06 by Ezio Melotti in branch 'default': #19311: mention hg update in the bisect faq. http://hg.python.org/devguide/rev/24c2cfee3b06 ---------- nosy: +python-dev status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 00:40:44 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 20 Oct 2013 22:40:44 +0000 Subject: [issue19311] devguide: hg bisect section could be clearer In-Reply-To: <1382266640.75.0.952779110911.issue19311@psf.upfronthosting.co.za> Message-ID: <1382308844.79.0.343393345194.issue19311@psf.upfronthosting.co.za> Ezio Melotti added the comment: I agree with Antoine, but mentioning hg update is a good idea so I changed that. ---------- assignee: -> ezio.melotti resolution: wont fix -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 00:53:07 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 20 Oct 2013 22:53:07 +0000 Subject: [issue19307] Improve TypeError message in json.loads() In-Reply-To: <1382246199.49.0.284372498766.issue19307@psf.upfronthosting.co.za> Message-ID: <3d2x8G0Zv8z7LjX@mail.python.org> Roundup Robot added the comment: New changeset 241996bd3c6b by Ezio Melotti in branch 'default': #19307: Improve error message for json.load(s) while passing objects of the wrong type. http://hg.python.org/cpython/rev/241996bd3c6b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 00:59:40 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 20 Oct 2013 22:59:40 +0000 Subject: [issue19307] Improve TypeError message in json.loads() In-Reply-To: <1382246199.49.0.284372498766.issue19307@psf.upfronthosting.co.za> Message-ID: <1382309980.6.0.468511911379.issue19307@psf.upfronthosting.co.za> Ezio Melotti added the comment: I added a test with json.load() too. json.load(fp) just calls json.loads(fp.read()), but it's better to avoid white-box testing. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 01:01:37 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 20 Oct 2013 23:01:37 +0000 Subject: [issue18702] Report skipped tests as skipped In-Reply-To: <1376132966.91.0.713996712724.issue18702@psf.upfronthosting.co.za> Message-ID: <1382310097.12.0.994610474017.issue18702@psf.upfronthosting.co.za> Ned Deily added the comment: I took a quick look at the revised patch. Clearly, it's too big to review at a detailed level. I tried the approach of running two complete verbose regrtest runs (-m test -v -uall), before and after the patch, and diffing the results in a "smart" diff app. Again, this is extremely tedious: while some simple filtering could be done to mask some differences (like elapsed times and time stamps), the non-deterministic output of many tests remains (and demonstrates how difficult it currently is to automatically compare regrtest run results). I did a spot check of the results and didn't notice any glaring problems and *did* notice that some tests were now being reported as skipped, as expected. Overall, I think this is a useful change to the test suite so I would say apply it to default (for 3.4.0) but I'm ambivalent about applying it to 3.3 at this point. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 01:04:21 2013 From: report at bugs.python.org (Ben Wolfson) Date: Sun, 20 Oct 2013 23:04:21 +0000 Subject: [issue12014] str.format parses replacement field incorrectly In-Reply-To: <1304646359.82.0.599761597998.issue12014@psf.upfronthosting.co.za> Message-ID: <1382310261.45.0.211067494026.issue12014@psf.upfronthosting.co.za> Changes by Ben Wolfson : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 01:11:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 20 Oct 2013 23:11:30 +0000 Subject: [issue18958] Exception('No JSON object could be decoded') when parsing a valid JSON In-Reply-To: <1378557195.07.0.581794298686.issue18958@psf.upfronthosting.co.za> Message-ID: <3d2xYS6jfBz7Ljy@mail.python.org> Roundup Robot added the comment: New changeset ac016cba7e64 by Ezio Melotti in branch 'default': #18958: Improve error message for json.load(s) while passing a string that starts with a UTF-8 BOM. http://hg.python.org/cpython/rev/ac016cba7e64 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 01:11:58 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 20 Oct 2013 23:11:58 +0000 Subject: [issue18958] Exception('No JSON object could be decoded') when parsing a valid JSON In-Reply-To: <1378557195.07.0.581794298686.issue18958@psf.upfronthosting.co.za> Message-ID: <1382310718.23.0.859508356908.issue18958@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the feedback! ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 01:35:34 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 20 Oct 2013 23:35:34 +0000 Subject: [issue19238] Misleading explanation of fill and align in format_spec In-Reply-To: <1381616869.75.0.196962613989.issue19238@psf.upfronthosting.co.za> Message-ID: <1382312134.38.0.485810912424.issue19238@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here's a patch. This also include a fix for #19289. ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file32266/issue19238.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 01:36:12 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 20 Oct 2013 23:36:12 +0000 Subject: [issue19289] Incorrect documentation for format's fill character. In-Reply-To: <1382131901.96.0.924496461441.issue19289@psf.upfronthosting.co.za> Message-ID: <1382312172.58.0.200005490268.issue19289@psf.upfronthosting.co.za> Ezio Melotti added the comment: I uploaded a patch on #19238 that also fixes this. ---------- stage: -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 01:40:30 2013 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 20 Oct 2013 23:40:30 +0000 Subject: [issue19238] Misleading explanation of fill and align in format_spec In-Reply-To: <1381616869.75.0.196962613989.issue19238@psf.upfronthosting.co.za> Message-ID: <1382312430.85.0.453675956499.issue19238@psf.upfronthosting.co.za> Eric V. Smith added the comment: Looks good to me. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 01:41:44 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 20 Oct 2013 23:41:44 +0000 Subject: [issue19306] Warn unsuspecting readers that thread stacks are in reverse order In-Reply-To: <1382228605.25.0.0617949824826.issue19306@psf.upfronthosting.co.za> Message-ID: <1382312504.74.0.33387402564.issue19306@psf.upfronthosting.co.za> Guido van Rossum added the comment: New patch, with fixed test. TBH now I'm getting worried that other programs may exist that parse this format and will get confused. ---------- Added file: http://bugs.python.org/file32267/traceback2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 01:45:57 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 20 Oct 2013 23:45:57 +0000 Subject: [issue19271] Update OrderedDict "see also" link In-Reply-To: <1381913411.15.0.258294798121.issue19271@psf.upfronthosting.co.za> Message-ID: <1382312757.7.0.383767368852.issue19271@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here's a patch. The request seems reasonable to me, more so since the PyPI page links to the recipe. If the goal of the link is to show the code of the implementation, the :source: directive can also be used. ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file32268/issue19271.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 01:54:33 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 20 Oct 2013 23:54:33 +0000 Subject: [issue19238] Misleading explanation of fill and align in format_spec In-Reply-To: <1381616869.75.0.196962613989.issue19238@psf.upfronthosting.co.za> Message-ID: <3d2yW82F6hz7LjX@mail.python.org> Roundup Robot added the comment: New changeset e3ff2065c548 by Ezio Melotti in branch '3.3': #19238, #19289: fix description of the align and fill values of the format specification. http://hg.python.org/cpython/rev/e3ff2065c548 New changeset f52892642c15 by Ezio Melotti in branch 'default': #19238, #19289: merge with 3.3. http://hg.python.org/cpython/rev/f52892642c15 New changeset 0592dc076bb7 by Ezio Melotti in branch '2.7': #19238, #19289: fix description of the align and fill values of the format specification. http://hg.python.org/cpython/rev/0592dc076bb7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 01:54:34 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 20 Oct 2013 23:54:34 +0000 Subject: [issue19289] Incorrect documentation for format's fill character. In-Reply-To: <1382131901.96.0.924496461441.issue19289@psf.upfronthosting.co.za> Message-ID: <3d2yW90VlDz7Ljg@mail.python.org> Roundup Robot added the comment: New changeset e3ff2065c548 by Ezio Melotti in branch '3.3': #19238, #19289: fix description of the align and fill values of the format specification. http://hg.python.org/cpython/rev/e3ff2065c548 New changeset f52892642c15 by Ezio Melotti in branch 'default': #19238, #19289: merge with 3.3. http://hg.python.org/cpython/rev/f52892642c15 New changeset 0592dc076bb7 by Ezio Melotti in branch '2.7': #19238, #19289: fix description of the align and fill values of the format specification. http://hg.python.org/cpython/rev/0592dc076bb7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 01:55:27 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 20 Oct 2013 23:55:27 +0000 Subject: [issue19238] Misleading explanation of fill and align in format_spec In-Reply-To: <1381616869.75.0.196962613989.issue19238@psf.upfronthosting.co.za> Message-ID: <1382313327.32.0.818129560604.issue19238@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the review! ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 01:55:47 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 20 Oct 2013 23:55:47 +0000 Subject: [issue19289] Incorrect documentation for format's fill character. In-Reply-To: <1382131901.96.0.924496461441.issue19289@psf.upfronthosting.co.za> Message-ID: <1382313347.12.0.880812941216.issue19289@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 02:03:39 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 00:03:39 +0000 Subject: [issue19306] Warn unsuspecting readers that thread stacks are in reverse order In-Reply-To: <1382228605.25.0.0617949824826.issue19306@psf.upfronthosting.co.za> Message-ID: <1382313819.0.0.0474241393287.issue19306@psf.upfronthosting.co.za> STINNER Victor added the comment: > TBH now I'm getting worried that other programs may exist that parse this format and will get confused. A program parsing faulthandler output? Seriously? It would be nice, but I don't know any. Anyway, such program would probably use a regex to parse the output, and it's very easy to support Python 3.3 format and patched (future 3.4) format. > New patch, with fixed test. Thanks. The patch looks good to me, you can push it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 02:06:22 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 21 Oct 2013 00:06:22 +0000 Subject: [issue8964] platform._sys_version does not parse correctly IronPython 2.x version In-Reply-To: <1276204295.1.0.731236969654.issue8964@psf.upfronthosting.co.za> Message-ID: <3d2ymm526SzQXg@mail.python.org> Roundup Robot added the comment: New changeset 04a163f93ad4 by Ezio Melotti in branch '2.7': #8964: fix platform._sys_version to handle IronPython 2.6+. http://hg.python.org/cpython/rev/04a163f93ad4 New changeset 10a261824b62 by Ezio Melotti in branch '3.3': #8964: fix platform._sys_version to handle IronPython 2.6+. http://hg.python.org/cpython/rev/10a261824b62 New changeset 1f7d8a42904c by Ezio Melotti in branch 'default': #8964: merge with 3.3. http://hg.python.org/cpython/rev/1f7d8a42904c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 02:06:59 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 21 Oct 2013 00:06:59 +0000 Subject: [issue8964] platform._sys_version does not parse correctly IronPython 2.x version In-Reply-To: <1276204295.1.0.731236969654.issue8964@psf.upfronthosting.co.za> Message-ID: <1382314019.94.0.752831372876.issue8964@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: -> ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 02:08:04 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 21 Oct 2013 00:08:04 +0000 Subject: [issue19291] Add docs for asyncio package (Tulip, PEP 3156) In-Reply-To: <1382137119.85.0.0934203099722.issue19291@psf.upfronthosting.co.za> Message-ID: <1382314084.22.0.701581221395.issue19291@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- components: +Documentation stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 02:10:37 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 00:10:37 +0000 Subject: [issue19302] Add support for AIX pollset efficient event I/O polling In-Reply-To: <1382205809.97.0.496335957362.issue19302@psf.upfronthosting.co.za> Message-ID: <1382314237.82.0.741655459772.issue19302@psf.upfronthosting.co.za> STINNER Victor added the comment: Python already supports various "select" APIs: see select and selectors modules. I don't know pollset: is it something like epoll on Linux? @David: Would you like to work on a patch? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 02:11:09 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 00:11:09 +0000 Subject: [issue19321] memoryview should be a context manager In-Reply-To: <1382302832.21.0.943595938282.issue19321@psf.upfronthosting.co.za> Message-ID: <1382314269.08.0.21537379812.issue19321@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 02:13:00 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 00:13:00 +0000 Subject: [issue19321] memoryview should be a context manager In-Reply-To: <1382302832.21.0.943595938282.issue19321@psf.upfronthosting.co.za> Message-ID: <1382314380.05.0.635321639176.issue19321@psf.upfronthosting.co.za> STINNER Victor added the comment: > Already proposed in issue9757. Well, it was not only proposed, but it was also implemented (by Antoine). Python 3.4.0a3+ (default:84a8b797c5c5+, Oct 20 2013, 16:02:32) [GCC 4.8.1 20130603 (Red Hat 4.8.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> x=memoryview(b'abc') >>> with x: pass ... >>> bytes(x) Traceback (most recent call last): File "", line 1, in ValueError: operation forbidden on released memoryview object ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 02:14:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 21 Oct 2013 00:14:19 +0000 Subject: [issue13515] Consistent documentation practices for security concerns and considerations In-Reply-To: <1322726017.57.0.923133254266.issue13515@psf.upfronthosting.co.za> Message-ID: <3d2yyL2BLlzQXg@mail.python.org> Roundup Robot added the comment: New changeset 8bb5f4301e01 by Ezio Melotti in branch 'default': #13515: document security-related documentation practices. http://hg.python.org/devguide/rev/8bb5f4301e01 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 02:14:50 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 21 Oct 2013 00:14:50 +0000 Subject: [issue13515] Consistent documentation practices for security concerns and considerations In-Reply-To: <1322726017.57.0.923133254266.issue13515@psf.upfronthosting.co.za> Message-ID: <1382314490.1.0.0999372678963.issue13515@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 02:19:32 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 00:19:32 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382314772.17.0.241582154154.issue19293@psf.upfronthosting.co.za> STINNER Victor added the comment: [Off-topic: Heck, another one of those upside-down tracebacks. WHY???] faulthandler is really a very low-level module. I wrote it to analyze deadlocks, memory corruptions and other sad cases. faulthandler is designed to provide as much information as possible even if Python internals are corrupted. So it only reads data structures, without processing them too much. For example, frames are stored from the most recent to the oldest. faulthandler also truncates long traceback to 100 frames (write "..." if there are more), to stop the loop if there is a cycle in the chained list of frames. The documentation also mentions other limitations: http://docs.python.org/dev/library/faulthandler.html ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 02:20:44 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 21 Oct 2013 00:20:44 +0000 Subject: [issue19314] Typo in devguide - compiler In-Reply-To: <1382270595.82.0.866623736172.issue19314@psf.upfronthosting.co.za> Message-ID: <3d2z5l1FLBz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 640fae50d1bb by Ezio Melotti in branch 'default': #19312, #19314: fix a couple of typos in the compiler page of the devguide. Patch by Martin Matusiak. http://hg.python.org/devguide/rev/640fae50d1bb ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 02:21:05 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 21 Oct 2013 00:21:05 +0000 Subject: [issue19312] Typo in devguide - compiler In-Reply-To: <1382269939.53.0.178642768375.issue19312@psf.upfronthosting.co.za> Message-ID: <3d2z5l6cqXz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 640fae50d1bb by Ezio Melotti in branch 'default': #19312, #19314: fix a couple of typos in the compiler page of the devguide. Patch by Martin Matusiak. http://hg.python.org/devguide/rev/640fae50d1bb ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 02:21:51 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 21 Oct 2013 00:21:51 +0000 Subject: [issue19314] Typo in devguide - compiler In-Reply-To: <1382270595.82.0.866623736172.issue19314@psf.upfronthosting.co.za> Message-ID: <1382314911.68.0.399226372884.issue19314@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report and the patch! ---------- assignee: -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 02:22:27 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 21 Oct 2013 00:22:27 +0000 Subject: [issue19312] Typo in devguide - compiler In-Reply-To: <1382269939.53.0.178642768375.issue19312@psf.upfronthosting.co.za> Message-ID: <1382314947.94.0.0183404816352.issue19312@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report and the patch! ---------- assignee: -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 02:28:37 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 00:28:37 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382315317.42.0.404226334632.issue19293@psf.upfronthosting.co.za> STINNER Victor added the comment: > Hm... Maybe the wakeup_fd machinery is broken on some systems? Hey! I added many tests when I added this feature to Python: see test_signal.py. By the way, it uses select.select() :-) Does test_signal pass successfully on AIX? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 02:33:24 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 00:33:24 +0000 Subject: [issue17951] TypeError during gdb backtracing In-Reply-To: <1368228204.29.0.543705311064.issue17951@psf.upfronthosting.co.za> Message-ID: <1382315604.61.0.607591682666.issue17951@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 02:33:29 2013 From: report at bugs.python.org (Tim Peters) Date: Mon, 21 Oct 2013 00:33:29 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382315609.62.0.928482438674.issue19293@psf.upfronthosting.co.za> Tim Peters added the comment: Just wondering: why is the timeout-to-failure set to a whole hour? Based on all the messages I've seen this weekend, we could save the buildbots countless years of time by reducing it to - say - 59 minutes ;-) ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 02:34:30 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 00:34:30 +0000 Subject: [issue17951] TypeError during gdb backtracing In-Reply-To: <1368228204.29.0.543705311064.issue17951@psf.upfronthosting.co.za> Message-ID: <1382315670.73.0.310401462879.issue17951@psf.upfronthosting.co.za> STINNER Victor added the comment: How do you reproduce the issue? I'm not sure that the patch is correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 02:36:25 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 21 Oct 2013 00:36:25 +0000 Subject: [issue19315] devguide: compiler - poor wording In-Reply-To: <1382271173.25.0.518279475594.issue19315@psf.upfronthosting.co.za> Message-ID: <1382315785.41.0.0436374519304.issue19315@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here is a patch. ---------- assignee: -> ezio.melotti keywords: +patch stage: -> patch review type: -> enhancement Added file: http://bugs.python.org/file32269/issue19315.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 02:38:08 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 00:38:08 +0000 Subject: [issue16685] audioop functions shouldn't accept strings In-Reply-To: <1355506655.59.0.00344503753899.issue16685@psf.upfronthosting.co.za> Message-ID: <1382315888.71.0.234207974485.issue16685@psf.upfronthosting.co.za> STINNER Victor added the comment: audioop_buffer.patch: In general, I don't like goto in C. But to cleanup something when exiting a function, I like goto to implement something similar to Python try/finally. What do you think Serhiy? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 02:44:30 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 21 Oct 2013 00:44:30 +0000 Subject: [issue19316] devguide: compiler - wording In-Reply-To: <1382272126.03.0.859419260116.issue19316@psf.upfronthosting.co.za> Message-ID: <1382316270.83.0.593228579113.issue19316@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here is a single diff that combines all these patches and a few more things from #19315. ---------- assignee: -> ezio.melotti stage: -> patch review type: -> enhancement Added file: http://bugs.python.org/file32270/issue19316.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 02:45:11 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 21 Oct 2013 00:45:11 +0000 Subject: [issue19315] devguide: compiler - poor wording In-Reply-To: <1382271173.25.0.518279475594.issue19315@psf.upfronthosting.co.za> Message-ID: <1382316311.79.0.944357004948.issue19315@psf.upfronthosting.co.za> Ezio Melotti added the comment: This can be fixed as part of #19316. ---------- resolution: -> duplicate stage: patch review -> committed/rejected status: open -> closed superseder: -> devguide: compiler - wording _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 03:21:11 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 21 Oct 2013 01:21:11 +0000 Subject: [issue19306] Warn unsuspecting readers that thread stacks are in reverse order In-Reply-To: <1382228605.25.0.0617949824826.issue19306@psf.upfronthosting.co.za> Message-ID: <3d30RV2VwQz7LkB@mail.python.org> Roundup Robot added the comment: New changeset cc8c37b5b449 by Guido van Rossum in branch 'default': Issue 19306: Add extra hints to faulthandler stack dumps that they are upside down. http://hg.python.org/cpython/rev/cc8c37b5b449 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 03:23:50 2013 From: report at bugs.python.org (David Coles) Date: Mon, 21 Oct 2013 01:23:50 +0000 Subject: [issue19308] Tools/gdb/libpython.py does not support GDB linked against Python 3 In-Reply-To: <1382261054.14.0.65764193658.issue19308@psf.upfronthosting.co.za> Message-ID: <1382318630.86.0.926202476295.issue19308@psf.upfronthosting.co.za> David Coles added the comment: I ended up with a very similar looking patch - and so merged my changes into Pitrou's patch. I also had a go at fixing up the `test_gdb` unit test, which revealed a few more string/unicode issues. Finally tracked them down to the `write_unicode` function. Sadly the `write` function in GDB's Python API only accepts unicode strings, hence we must pre-backslash escape for C-string encoding (either Python's default encoding or utf-8 in Python 3.1+) then turn it back into a unicode string again to avoid a TypeError. Yuck. The patch almost applies on Python 2.7, but needs a little bit of massaging due to slight differences in Tools/gdb/libpython.py. Need to test the new unicode changes haven't broken anything and then I'll upload a patch for Python 2.7. ---------- Added file: http://bugs.python.org/file32271/gdb_py3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 03:33:23 2013 From: report at bugs.python.org (David Coles) Date: Mon, 21 Oct 2013 01:33:23 +0000 Subject: [issue17772] test_gdb doesn't detect a gdb built with python3.3 (or higher) In-Reply-To: <1366193783.12.0.853305189614.issue17772@psf.upfronthosting.co.za> Message-ID: <1382319203.11.0.168845277659.issue17772@psf.upfronthosting.co.za> David Coles added the comment: Attached is a patch that enables the test for gdb linked against py3k. All test failures should be fixed by the patch on issue19308. ---------- keywords: +patch nosy: +dcoles Added file: http://bugs.python.org/file32272/test_gdb-py3k-compat.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 03:36:23 2013 From: report at bugs.python.org (David Coles) Date: Mon, 21 Oct 2013 01:36:23 +0000 Subject: [issue17772] test_gdb doesn't detect a gdb built with python3.3 (or higher) In-Reply-To: <1366193783.12.0.853305189614.issue17772@psf.upfronthosting.co.za> Message-ID: <1382319383.84.0.442233901094.issue17772@psf.upfronthosting.co.za> David Coles added the comment: Should probably also be applied to Python 2.7 branch since it's possible be debugging Python 2.7 with a version of py3k-linked gdb. ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 03:42:45 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 21 Oct 2013 01:42:45 +0000 Subject: [issue19319] misleading comment regarding C In-Reply-To: <1382293173.85.0.561092351963.issue19319@psf.upfronthosting.co.za> Message-ID: <3d30vz4pdHz7LjX@mail.python.org> Roundup Robot added the comment: New changeset 737b79e524aa by Ezio Melotti in branch '2.7': #19319: fix ctypes docs: sizeof is an operator in C, not a function. http://hg.python.org/cpython/rev/737b79e524aa New changeset d8e352e2f110 by Ezio Melotti in branch '3.3': #19319: fix ctypes docs: sizeof is an operator in C, not a function. http://hg.python.org/cpython/rev/d8e352e2f110 New changeset 49f8d07b6c5c by Ezio Melotti in branch 'default': #19319: merge with 3.3. http://hg.python.org/cpython/rev/49f8d07b6c5c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 03:43:14 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 21 Oct 2013 01:43:14 +0000 Subject: [issue19319] misleading comment regarding C In-Reply-To: <1382293173.85.0.561092351963.issue19319@psf.upfronthosting.co.za> Message-ID: <1382319794.77.0.309518278803.issue19319@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 type: -> enhancement versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 03:59:55 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 21 Oct 2013 01:59:55 +0000 Subject: [issue19274] make zipfile.PyZipFile more usable In-Reply-To: <1381959832.11.0.559988604291.issue19274@psf.upfronthosting.co.za> Message-ID: <3d31Hp1QSSz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 34fb83421119 by Christian Tismer in branch 'default': add a filterfunc to zip file.PyZipFile.writepy, issue 19274 http://hg.python.org/cpython/rev/34fb83421119 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 04:01:06 2013 From: report at bugs.python.org (Christian Tismer) Date: Mon, 21 Oct 2013 02:01:06 +0000 Subject: [issue19274] make zipfile.PyZipFile more usable In-Reply-To: <1381959832.11.0.559988604291.issue19274@psf.upfronthosting.co.za> Message-ID: <1382320866.99.0.283115611152.issue19274@psf.upfronthosting.co.za> Changes by Christian Tismer : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 04:18:37 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 21 Oct 2013 02:18:37 +0000 Subject: [issue19306] Warn unsuspecting readers that thread stacks are in reverse order In-Reply-To: <1382228605.25.0.0617949824826.issue19306@psf.upfronthosting.co.za> Message-ID: <1382321917.68.0.709957247689.issue19306@psf.upfronthosting.co.za> Guido van Rossum added the comment: On Victor's authority, committed. I've also (separately) committed some doc changes. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 04:35:18 2013 From: report at bugs.python.org (Berker Peksag) Date: Mon, 21 Oct 2013 02:35:18 +0000 Subject: [issue19316] devguide: compiler - wording In-Reply-To: <1382272126.03.0.859419260116.issue19316@psf.upfronthosting.co.za> Message-ID: <1382322918.71.0.370776913642.issue19316@psf.upfronthosting.co.za> Berker Peksag added the comment: > - import.c > - Home of the magic number (named MAGIC) for bytecode versioning > > Probably out of date. I cannot find MAGIC being defined in this file. It's in importlib._bootstrap: http://hg.python.org/cpython/file/5dc65f8d29a2/Lib/importlib/_bootstrap.py#l379 Related changeset: http://hg.python.org/cpython/rev/efb5e6ab10f4/ ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 04:57:34 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Oct 2013 02:57:34 +0000 Subject: [issue19318] break more than once In-Reply-To: <1382293157.67.0.695051872631.issue19318@psf.upfronthosting.co.za> Message-ID: <1382324254.57.0.342754872427.issue19318@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, the usual ways to handle the double-break problem are: * check a flag variable in the outer loop * put the outer loop and inner loop in a function so that a return-statement can be used to exit both loops * enclose the outer-loop in a try/except, then raise an exception to end the inner-loop Your multi-break idea isn't crazy. IIRC, Knuth discussed the idea (along with others such as labeled breaks) in one of his influential papers on structure programmiing. That said, the idea didn't catch on and most people seem to be able to live easily without it. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 05:03:03 2013 From: report at bugs.python.org (David Edelsohn) Date: Mon, 21 Oct 2013 03:03:03 +0000 Subject: [issue19302] Add support for AIX pollset efficient event I/O polling In-Reply-To: <1382205809.97.0.496335957362.issue19302@psf.upfronthosting.co.za> Message-ID: <1382324583.5.0.578672317286.issue19302@psf.upfronthosting.co.za> David Edelsohn added the comment: pollset is the AIX equivalent of Linux epoll (or kqueue). The API is almost identical to epoll except with different interface names and a few minor tweaks. I will try to work on it. I mainly opened this issue as a placeholder to discuss the implementation and for anyone else who wanted to help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 05:06:05 2013 From: report at bugs.python.org (David Edelsohn) Date: Mon, 21 Oct 2013 03:06:05 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382324765.21.0.728082147256.issue19293@psf.upfronthosting.co.za> David Edelsohn added the comment: > I added many tests when I added this feature to Python: see test_signal.py. By the way, it uses select.select() :-) Does test_signal pass successfully on AIX? @haypo: test_signal skips some tests on AIX. See Issue #18238 . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 05:26:24 2013 From: report at bugs.python.org (David) Date: Mon, 21 Oct 2013 03:26:24 +0000 Subject: [issue19322] Python crashes on re.search in new regex module. Message-ID: <1382325984.24.0.110925786536.issue19322@psf.upfronthosting.co.za> New submission from David: Python crashes while executing the following code using the new regex module. Have I made a mistake? import regex as re rx = re.compile(r'\bt(est){i<2}', flags=re.V1) print "Prints here" rx.findall("Some text") # Python crashes print "Fails to print" I get the same results using 64-bit and 32-bit Python on Windows 7 (64bit) when using regex-2013-10-04 and regex-2013-08-04. However, the code does not crash when using regex-2013-03-11. ---------- components: Regular Expressions messages: 200690 nosy: cronkd, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: Python crashes on re.search in new regex module. type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 05:37:14 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Oct 2013 03:37:14 +0000 Subject: [issue19271] Update OrderedDict "see also" link In-Reply-To: <1381913411.15.0.258294798121.issue19271@psf.upfronthosting.co.za> Message-ID: <1382326634.34.0.734957662536.issue19271@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Ezio, we already have a sourcelink at the top of the collections module. Mark, I want to keep the ASPN link in the 2.7 docs. The goal wasn't to point to "an original recipe". The intent was to show how to backport to old versions of Python if needed. I will take the link out of the 3.4 docs because it no longer serves a purpose. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 05:42:37 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 21 Oct 2013 03:42:37 +0000 Subject: [issue19271] Update OrderedDict "see also" link In-Reply-To: <1381913411.15.0.258294798121.issue19271@psf.upfronthosting.co.za> Message-ID: <3d33ZH4dPJz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 9e322a8f80d9 by Raymond Hettinger in branch 'default': Issue #19271: By Python3.4, the Python 2.4 backport links are no longer of much interest. http://hg.python.org/cpython/rev/9e322a8f80d9 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 05:43:05 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Oct 2013 03:43:05 +0000 Subject: [issue19271] Update OrderedDict "see also" link In-Reply-To: <1381913411.15.0.258294798121.issue19271@psf.upfronthosting.co.za> Message-ID: <1382326985.43.0.149396469093.issue19271@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> fixed status: open -> closed versions: -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 05:59:59 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Oct 2013 03:59:59 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <1382327999.09.0.97428060981.issue15663@psf.upfronthosting.co.za> Raymond Hettinger added the comment: We should advertise in the docs that we have a policy of upgrading the Tcl/Tk versions as necessary to improve stability. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 06:11:43 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Oct 2013 04:11:43 +0000 Subject: [issue19259] Provide Python implementation of operator.compare_digest() In-Reply-To: <1381750256.83.0.263124716214.issue19259@psf.upfronthosting.co.za> Message-ID: <1382328703.86.0.41450884628.issue19259@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry Christian, but I think this just clutter's the operator module. I agree with Terry that it doesn't belong here. The hashlib module might be a better choice. That's where I would start looking for it if I needed a function like this. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 06:44:26 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Oct 2013 04:44:26 +0000 Subject: [issue19298] Use __attribute__(cleanup ...) to detect refleaks In-Reply-To: <1382193451.78.0.278113981899.issue19298@psf.upfronthosting.co.za> Message-ID: <1382330666.0.0.494043086144.issue19298@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- title: Use __atribute__(cleanup ...) to detect refleaks -> Use __attribute__(cleanup ...) to detect refleaks _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 06:51:23 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 21 Oct 2013 04:51:23 +0000 Subject: [issue19322] Python crashes on re.search in new regex module. In-Reply-To: <1382325984.24.0.110925786536.issue19322@psf.upfronthosting.co.za> Message-ID: <1382331083.95.0.261886615411.issue19322@psf.upfronthosting.co.za> Ned Deily added the comment: The regex module is a third-party project and is not part of the Python standard library. I suggest you open an issue on the issue tracker for the project and include more detailed information about the problem: https://code.google.com/p/mrab-regex-hg/ https://pypi.python.org/pypi/regex ---------- nosy: +ned.deily resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 06:56:19 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Oct 2013 04:56:19 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1382331379.1.0.634406914355.issue19251@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Christian, we need multiple motivating use cases to warrant API expansion for fundamental types. I'm concerned about starting to move numpy vector-op functionality into the core of Python because it optimizes your one use crypto use case. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 06:57:45 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Oct 2013 04:57:45 +0000 Subject: [issue19282] dbm.open should be a context manager In-Reply-To: <1382082310.98.0.0309554787542.issue19282@psf.upfronthosting.co.za> Message-ID: <1382331465.05.0.75671437976.issue19282@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This seems like a reasonable request. ---------- assignee: -> ncoghlan nosy: +ncoghlan, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 07:12:14 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Oct 2013 05:12:14 +0000 Subject: [issue19270] sched.cancel() breaks events order In-Reply-To: <1381913252.24.0.629122693277.issue19270@psf.upfronthosting.co.za> Message-ID: <1382332334.81.0.942208700817.issue19270@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > 1. sched.cancel() can remove wrong event > (because it uses equality instead identity). I don't think this is a bug. The user should be able to define events that can be compared on equality. It is the user's responsibility to make sure that events are distinct (this is no different than how list.remove() works for example). > 2. sched.cancel() change order of equal (by time and priority) events. That is allowed. We make no stability guarantees. Plus it just makes sense that events with the same time and priority are non-deterministic. Note, to add stability we would have to store the order that events were added. This would slow down the code. Add note that Tornado uses heapq in its ioloop in the same way that the schedule module does. It too makes no effort to preserve input order. I recommend closing this as "not a bug" or as an "further document the existing behaviors". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 07:37:47 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 21 Oct 2013 05:37:47 +0000 Subject: [issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors In-Reply-To: <1379289654.59.0.452504541982.issue19030@psf.upfronthosting.co.za> Message-ID: <3d367b1P1lz7LjY@mail.python.org> Roundup Robot added the comment: New changeset 2f09a6980e1a by Ethan Furman in branch 'default': Issue #19030: final pieces for proper location of various class attributes located in the metaclass. http://hg.python.org/cpython/rev/2f09a6980e1a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 07:40:07 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Oct 2013 05:40:07 +0000 Subject: [issue11698] Improve repr for structseq objects to show named, but unindexed fields In-Reply-To: <1301264097.04.0.982421975108.issue11698@psf.upfronthosting.co.za> Message-ID: <1382334007.4.0.687939134554.issue11698@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 07:44:00 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Oct 2013 05:44:00 +0000 Subject: [issue19235] Add a dedicated subclass for recursion errors In-Reply-To: <1381596107.9.0.320701037292.issue19235@psf.upfronthosting.co.za> Message-ID: <1382334240.04.0.380237140601.issue19235@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 07:50:17 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Oct 2013 05:50:17 +0000 Subject: [issue19217] Calling assertEquals for moderately long list takes too long In-Reply-To: <1381410286.72.0.514206486634.issue19217@psf.upfronthosting.co.za> Message-ID: <1382334617.36.0.973061190169.issue19217@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 08:26:15 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 21 Oct 2013 06:26:15 +0000 Subject: [issue19274] make zipfile.PyZipFile more usable In-Reply-To: <1381959832.11.0.559988604291.issue19274@psf.upfronthosting.co.za> Message-ID: <1382336775.51.0.56652184541.issue19274@psf.upfronthosting.co.za> Georg Brandl added the comment: Hi Chris, your commit is a bit hard to review due to all the unrelated spacing changes. I assume this is done automatically by your editor? It's probably best to switch off that feature for CPython development :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 08:38:51 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 21 Oct 2013 06:38:51 +0000 Subject: [issue19274] make zipfile.PyZipFile more usable In-Reply-To: <1381959832.11.0.559988604291.issue19274@psf.upfronthosting.co.za> Message-ID: <1382337531.1.0.424786071174.issue19274@psf.upfronthosting.co.za> Georg Brandl added the comment: While reviewing: is it intended that the filter is only called for directories and not for individual files? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 08:42:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 21 Oct 2013 06:42:19 +0000 Subject: [issue19274] make zipfile.PyZipFile more usable In-Reply-To: <1381959832.11.0.559988604291.issue19274@psf.upfronthosting.co.za> Message-ID: <3d37Yd3bcpz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 2d39b3555951 by Georg Brandl in branch 'default': #19274: use captured_stdout() in the test suite; add NEWS entry. http://hg.python.org/cpython/rev/2d39b3555951 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 09:05:12 2013 From: report at bugs.python.org (Michael Merickel) Date: Mon, 21 Oct 2013 07:05:12 +0000 Subject: [issue19323] typo in statistics documentation Message-ID: <1382339112.75.0.593469307038.issue19323@psf.upfronthosting.co.za> New submission from Michael Merickel: http://docs.python.org/dev/library/statistics.html#mean describes the mean as "effected" by outliers, when it should say "affected". ---------- assignee: docs at python components: Documentation messages: 200704 nosy: docs at python, mmerickel priority: normal severity: normal status: open title: typo in statistics documentation versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 09:08:05 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 21 Oct 2013 07:08:05 +0000 Subject: [issue19323] typo in statistics documentation In-Reply-To: <1382339112.75.0.593469307038.issue19323@psf.upfronthosting.co.za> Message-ID: <3d387M3Htnz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 1f466354a85b by Georg Brandl in branch 'default': Closes #19323: fix typo. Thanks to Michael Merickel. http://hg.python.org/cpython/rev/1f466354a85b ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 09:26:22 2013 From: report at bugs.python.org (David Coles) Date: Mon, 21 Oct 2013 07:26:22 +0000 Subject: [issue19308] Tools/gdb/libpython.py does not support GDB linked against Python 3 In-Reply-To: <1382261054.14.0.65764193658.issue19308@psf.upfronthosting.co.za> Message-ID: <1382340382.3.0.936392492054.issue19308@psf.upfronthosting.co.za> David Coles added the comment: And here's the patch for Python 2.7. The result of testing is as follows: - python (default) against py2-linked gdb: All tests pass - python (2.7) against py2-linked gdb: `test_long` fails. - python (default) against py3-linked gdb: All tests pass - python (2.7) against py3-linked gdb: `test_long`, `test_strings` and `test_unicode` fail. `test_long` has been removed from the default branch, in addition gdb doesn't seem to distinguish printing 0 from 0L. `test_strings` likely fails since Python 3 will print printable unicode characters (like "\xff") while Python 2 will not. `test_unicode` likely fails due to the 'u' prefix on unicode strings in Python 2. This kind of behavior is pretty much expected when cross-testing gdb. ---------- Added file: http://bugs.python.org/file32273/python27-gdb_py3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 09:30:28 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 07:30:28 +0000 Subject: [issue19320] Tkinter tests ran with wantobjects is false In-Reply-To: <1382302056.06.0.500513298536.issue19320@psf.upfronthosting.co.za> Message-ID: <1382340628.81.0.0622147179134.issue19320@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which follows second way. ---------- keywords: +patch Added file: http://bugs.python.org/file32274/test_tcl_wantobjects.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 09:30:48 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 07:30:48 +0000 Subject: [issue19320] Tkinter tests ran with wantobjects is false In-Reply-To: <1382302056.06.0.500513298536.issue19320@psf.upfronthosting.co.za> Message-ID: <1382340648.98.0.999665230874.issue19320@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> patch review versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 09:49:19 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 07:49:19 +0000 Subject: [issue19270] sched.cancel() breaks events order In-Reply-To: <1381913252.24.0.629122693277.issue19270@psf.upfronthosting.co.za> Message-ID: <1382341759.59.0.255642644979.issue19270@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If the order of events with the same time and priority doesn't matter, we can optimize the queue property more than 10 times by using sort() (see cancel_4.patch in issue13451). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 09:53:12 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 07:53:12 +0000 Subject: [issue19321] memoryview should be a context manager In-Reply-To: <1382302832.21.0.943595938282.issue19321@psf.upfronthosting.co.za> Message-ID: <1382341992.36.0.862663292385.issue19321@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Well, it was not only proposed, but it was also implemented (by Antoine). Oh, sorry for the noise. ---------- resolution: -> out of date stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 09:53:33 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 07:53:33 +0000 Subject: [issue19321] memoryview should be a context manager In-Reply-To: <1382302832.21.0.943595938282.issue19321@psf.upfronthosting.co.za> Message-ID: <1382342013.78.0.786220206742.issue19321@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And thank you Antoine for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 09:57:09 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 07:57:09 +0000 Subject: [issue19270] sched.cancel() breaks events order In-Reply-To: <1381913252.24.0.629122693277.issue19270@psf.upfronthosting.co.za> Message-ID: <1382342229.85.0.320026255111.issue19270@psf.upfronthosting.co.za> STINNER Victor added the comment: > That is allowed. We make no stability guarantees. Plus it just makes sense that events with the same time and priority are non-deterministic. It would be nice to keep the insertion order. If it is not guaranteed, it must be well documented (big red warning). Does it occur frequently to schedule two events at exactly the same time? On Linux, clocks have a good precision, even time.monotonic(). On Windows, the precision of time.monotonic() is worse (around 16 ms), so two events at the same time is more likely. The issue is specific to events scheduled at an absolute time, right? Or does .enter() has a similar issue? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 10:00:25 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 08:00:25 +0000 Subject: [issue19306] Warn unsuspecting readers that thread stacks are in reverse order In-Reply-To: <1382228605.25.0.0617949824826.issue19306@psf.upfronthosting.co.za> Message-ID: <1382342425.06.0.042949948825.issue19306@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks. "(most recent call first)" was already present in some cases, but I forgot to mention it in all cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 10:09:05 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 08:09:05 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382324765.21.0.728082147256.issue19293@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: 2013/10/21 David Edelsohn : >> I added many tests when I added this feature to Python: see test_signal.py. By the way, it uses select.select() :-) Does test_signal pass successfully on AIX? > > @haypo: test_signal skips some tests on AIX. See Issue #18238 . Ah yes, the test on select+signal is skipped, but the basic feature (writing a signal number in a pipe using wakeup fd) works on AIX. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 10:14:41 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 21 Oct 2013 08:14:41 +0000 Subject: [issue19270] sched.cancel() breaks events order In-Reply-To: <1382342229.85.0.320026255111.issue19270@psf.upfronthosting.co.za> Message-ID: <2090223434.97274731.1382343253940.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > Does it occur frequently to schedule two events at exactly the same > time? On Linux, clocks have a good precision, even time.monotonic(). It depends how you calculate your timestamps, I'd say :-) It's unlikely for two calls to time.time() to give the exact same outcome. OTOH, if you're using a fixed base time and add user-provided timedeltas to it, collisions are quite possible. (a special case is using a 0 delay, in order to schedule a call for the next loop iteration) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 10:23:53 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 21 Oct 2013 08:23:53 +0000 Subject: [issue19270] sched.cancel() breaks events order In-Reply-To: <1382343585.22.0.843070880541.issue19270@psf.upfronthosting.co.za> Message-ID: <67641356.97297201.1382343806881.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > > ... for two calls to time.time() to give the exact same outcome > > sched now uses time.monotonic() since Python 3.3. This seems quite irrelevant: >>> len(set(time.monotonic() for i in range(100))) 100 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 10:25:31 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 21 Oct 2013 08:25:31 +0000 Subject: [issue11698] Improve repr for structseq objects to show named, but unindexed fields In-Reply-To: <1301264097.04.0.982421975108.issue11698@psf.upfronthosting.co.za> Message-ID: <1382343931.48.0.862760143819.issue11698@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hmm, does anyone have an opinion for or against the proposed representation in Sunny's patch? Sunny, if you haven't done so, could you sign a contributor's agreement? http://www.python.org/psf/contrib/ Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 10:19:45 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 08:19:45 +0000 Subject: [issue19270] sched.cancel() breaks events order In-Reply-To: <1381913252.24.0.629122693277.issue19270@psf.upfronthosting.co.za> Message-ID: <1382343585.22.0.843070880541.issue19270@psf.upfronthosting.co.za> STINNER Victor added the comment: > ... for two calls to time.time() to give the exact same outcome sched now uses time.monotonic() since Python 3.3. In Python 2.7, there is no default timer, but I get that users pick time.time(). (Oh, sched has no unit test in Python 2.7.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 10:22:14 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 21 Oct 2013 08:22:14 +0000 Subject: [issue19308] Tools/gdb/libpython.py does not support GDB linked against Python 3 In-Reply-To: <1382261054.14.0.65764193658.issue19308@psf.upfronthosting.co.za> Message-ID: <1382343734.22.0.519885917541.issue19308@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've added a review comment to the 3.3 version of the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 10:28:11 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 08:28:11 +0000 Subject: [issue19270] sched.cancel() breaks events order In-Reply-To: <1381913252.24.0.629122693277.issue19270@psf.upfronthosting.co.za> Message-ID: <1382344091.53.0.736762708901.issue19270@psf.upfronthosting.co.za> STINNER Victor added the comment: Victor: "On Windows, the precision of time.monotonic() is worse (around 16 ms), so two events at the same time is more likely." Antoine: "This seems quite irrelevant:" I would be interested of the same test on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 10:37:01 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 21 Oct 2013 08:37:01 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: Message-ID: Charles-Fran?ois Natali added the comment: I'm completely lost: how many issues is this thread conflating? For example, David, I think you said that my patch regarding signal handling did fix some tests. Is that still the case? If yes, could you open a specific issue for the remaining failing tests on AIX? AFAICT, the original hang is due to AIX always reporting the write-end of a pipe as read-ready: we should only keep discussing this problem here. The above FreeBSD and Ubuntu failures seem completely unrelated, they should get there own issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 10:48:30 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 08:48:30 +0000 Subject: [issue19205] Don't import re and sysconfig in site.py In-Reply-To: <1381324834.76.0.705779220837.issue19205@psf.upfronthosting.co.za> Message-ID: <1382345310.06.0.13109281467.issue19205@psf.upfronthosting.co.za> Christian Heimes added the comment: The imports in _osx_support counteract the performance boost. I neither have an OS X machine and nor do I understand the internals of _osx_support. Perhaps somebody else likes to work on the module. ---------- assignee: christian.heimes -> components: +Macintosh -Interpreter Core priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 10:50:53 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 08:50:53 +0000 Subject: [issue18528] Possible fd leak in socketmodule In-Reply-To: <1374496496.68.0.51305379842.issue18528@psf.upfronthosting.co.za> Message-ID: <1382345453.05.0.204590262218.issue18528@psf.upfronthosting.co.za> Christian Heimes added the comment: Shall I commit my patch or shall I close the coverity issue as intentionally? ---------- versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 10:53:33 2013 From: report at bugs.python.org (Esa Peuha) Date: Mon, 21 Oct 2013 08:53:33 +0000 Subject: [issue18650] intermittent test_pydoc failure on 3.4.0a1 In-Reply-To: <1375567563.7.0.0482703899635.issue18650@psf.upfronthosting.co.za> Message-ID: <1382345613.43.0.128569891965.issue18650@psf.upfronthosting.co.za> Esa Peuha added the comment: The problem seems to be /Users/pyi/Library/Python/3.4/lib/python/site-packages/setuptools-0.9.8-py3.4.egg according to the error page. What is that file? The fact that the second run of the test succeeds implies that it could be a temporary file which is no longer present when the test is run again. ---------- nosy: +Esa.Peuha _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 10:54:40 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 08:54:40 +0000 Subject: [issue17997] ssl.match_hostname(): sub string wildcard should not match IDNA prefix In-Reply-To: <1368799493.86.0.504478450601.issue17997@psf.upfronthosting.co.za> Message-ID: <1382345680.83.0.78168517991.issue17997@psf.upfronthosting.co.za> Christian Heimes added the comment: Yes, it's a security issue. But the patch would changes the behavior of the function. The current function conforms to RFC 2818. The patch implements RFC 6125, which is more restrictive. ---------- nosy: +georg.brandl, larry priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 10:56:13 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 08:56:13 +0000 Subject: [issue15893] Py_FrozenMain() resource leak and missing malloc checks In-Reply-To: <1347228598.43.0.424519630485.issue15893@psf.upfronthosting.co.za> Message-ID: <1382345773.59.0.541658590989.issue15893@psf.upfronthosting.co.za> Christian Heimes added the comment: Victor, is here anything left to do? ---------- assignee: -> haypo stage: -> commit review status: open -> languishing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 10:56:35 2013 From: report at bugs.python.org (koobs) Date: Mon, 21 Oct 2013 08:56:35 +0000 Subject: [issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors In-Reply-To: <1379289654.59.0.452504541982.issue19030@psf.upfronthosting.co.za> Message-ID: <1382345795.63.0.192883221397.issue19030@psf.upfronthosting.co.za> koobs added the comment: @Ethan, not sure if you've already seen them, but there are 4 pydoc failures since 2f09a6980e1a Attaching another complete log from build #245 on the koobs-freebsd9 buildslave here for posterity ---------- Added file: http://bugs.python.org/file32275/koobs-freebsd9-py3x-build245.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 10:58:55 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 08:58:55 +0000 Subject: [issue19324] Expose Linux-specific APIs in resource module Message-ID: <1382345935.87.0.308038663771.issue19324@psf.upfronthosting.co.za> New submission from Christian Heimes: See #16595 and http://mail.python.org/pipermail/python-ideas/2012-June/015323.html I'm going to add the extra constants before beta. RLIMIT_MSGQUEUE RLIMIT_NICE RLIMIT_RTPRIO RLIMIT_RTTIME RLIMIT_SIGPENDING ---------- assignee: christian.heimes messages: 200727 nosy: christian.heimes, giampaolo.rodola priority: normal severity: normal stage: needs patch status: open title: Expose Linux-specific APIs in resource module type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 10:59:42 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 08:59:42 +0000 Subject: [issue18550] internal_setblocking() doesn't check return value of fcntl() In-Reply-To: <1374694779.19.0.0902694218162.issue18550@psf.upfronthosting.co.za> Message-ID: <1382345982.09.0.457563229973.issue18550@psf.upfronthosting.co.za> Christian Heimes added the comment: LGTM The patch silences the coverity warnings, too. Does anybody else like to do a code review? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 11:01:51 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 09:01:51 +0000 Subject: [issue17276] HMAC: deprecate default hash In-Reply-To: <1361535402.96.0.618065106631.issue17276@psf.upfronthosting.co.za> Message-ID: <1382346111.74.0.667898557922.issue17276@psf.upfronthosting.co.za> Christian Heimes added the comment: GPS, what do you suggest instead? Do you want me to remove the deprecation warning? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 11:03:05 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 09:03:05 +0000 Subject: [issue19324] Expose Linux-specific APIs in resource module In-Reply-To: <1382345935.87.0.308038663771.issue19324@psf.upfronthosting.co.za> Message-ID: <1382346185.48.0.482141064623.issue19324@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 11:03:09 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 09:03:09 +0000 Subject: [issue18775] name attribute for HMAC In-Reply-To: <1376843757.16.0.673413061043.issue18775@psf.upfronthosting.co.za> Message-ID: <1382346189.84.0.342526364334.issue18775@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm going to commit the patch this week. Speak now or forever hold your peace... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 11:03:49 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 09:03:49 +0000 Subject: [issue19205] Don't import re and sysconfig in site.py In-Reply-To: <1381324834.76.0.705779220837.issue19205@psf.upfronthosting.co.za> Message-ID: <1382346229.34.0.866594334853.issue19205@psf.upfronthosting.co.za> STINNER Victor added the comment: > The imports in _osx_support counteract the performance boost. I neither have an OS X machine and nor do I understand the internals of _osx_support. Perhaps somebody else likes to work on the module. Please open a separated issue for OS X, this issue can be closed IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 11:05:10 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 21 Oct 2013 09:05:10 +0000 Subject: [issue19302] Add support for AIX pollset efficient event I/O polling In-Reply-To: <1382205809.97.0.496335957362.issue19302@psf.upfronthosting.co.za> Message-ID: <1382346310.91.0.114129092655.issue19302@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > David Edelsohn added the comment: > > This enhancement issue is not a demand that you or anyone else in the Python community volunteer to implement it. AIX is a very lucrative business and deployed in many businesses that the Python community would like to reach. Maybe you should broaden your viewpoint and think about why support for a "niche platform" could be beneficial for Python. Sorry, but I stand by my claim: making Python work on AIX by fixing compilation bugs, or non-portable assumptions like the one in #19293 is a good thing, and such bugs should be fixed. But adding a large chunk of AIX-specific code, which will only be used by a handful of users, and more importantly only debuggable and maintainable by a couple of contributors, is a whole different story. My reaction would be the same if someone were to suggest implementing something similar for e.g. the Hurd (that's an example, I know there are more AIX users). Also, AFAICT we don't have any *stable* AIX buildbot yet: at the very least, making the current test suite pass - and not merely by skipping tests - and having a stable AIX buildbot would be a prerequisite. Furthermore, apparently AIX isn't an officially supported platform, see http://www.python.org/getit/other/ Having someone volunteer to write a patch isn't enough to have it merged. But I'd like to have Martin's opinion, since he's the author and PEP 11, and usually has good insights on those issues. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 11:09:04 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 09:09:04 +0000 Subject: [issue19325] _osx_support imports many modules Message-ID: <1382346544.59.0.0118958375765.issue19325@psf.upfronthosting.co.za> New submission from Christian Heimes: On Mac OS X the site module imports sysconfig which imports _osx_support which in turn imports several more modules like the re module. More modules == slower startup. See #19205 for background information on the issue. ---------- assignee: ronaldoussoren components: Library (Lib), Macintosh messages: 200733 nosy: christian.heimes, ronaldoussoren priority: normal severity: normal stage: needs patch status: open title: _osx_support imports many modules type: performance versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 11:09:25 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 09:09:25 +0000 Subject: [issue19205] Don't import re and sysconfig in site.py In-Reply-To: <1381324834.76.0.705779220837.issue19205@psf.upfronthosting.co.za> Message-ID: <1382346565.9.0.424645676945.issue19205@psf.upfronthosting.co.za> Christian Heimes added the comment: Good point, #19325 ---------- stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 11:15:26 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 09:15:26 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1382346926.91.0.681060838724.issue19251@psf.upfronthosting.co.za> Christian Heimes added the comment: I see that the feature idea is more controversial than I initially expected. It's probably best to have a long bike-shedding discussion on Python-ideas... :) Right now from_bytes/to_bytes trick is fast enough for my needs anyway. Therefore I'm deferring the proposal for 3.5. By the way I'd also be happy with a set of vector ops in the operator module, e.g. vector_xor(a, b). ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 11:25:04 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 09:25:04 +0000 Subject: [issue19325] _osx_support imports many modules In-Reply-To: <1382346544.59.0.0118958375765.issue19325@psf.upfronthosting.co.za> Message-ID: <1382347504.34.0.206262226513.issue19325@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 11:25:45 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 21 Oct 2013 09:25:45 +0000 Subject: [issue19302] Add support for AIX pollset efficient event I/O polling In-Reply-To: <1382205809.97.0.496335957362.issue19302@psf.upfronthosting.co.za> Message-ID: <1382347545.15.0.506265622942.issue19302@psf.upfronthosting.co.za> Antoine Pitrou added the comment: (note that we have a devpoll implementation for Solaris) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 11:26:41 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 09:26:41 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1382347601.43.0.0531066165492.issue19251@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 11:42:25 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 09:42:25 +0000 Subject: [issue16595] Add resource.prlimit In-Reply-To: <1354446881.9.0.288115855459.issue16595@psf.upfronthosting.co.za> Message-ID: <1382348545.55.0.549506963093.issue16595@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks for your tests. I may have to rework my test scenario a bit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 11:45:18 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 09:45:18 +0000 Subject: [issue16685] audioop functions shouldn't accept strings In-Reply-To: <1355506655.59.0.00344503753899.issue16685@psf.upfronthosting.co.za> Message-ID: <1382348718.36.0.215971475341.issue16685@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Well. In updated patch I use gotos where it decreases the number of lines (total decreasing is almost 30 lines). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 11:45:42 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 09:45:42 +0000 Subject: [issue16685] audioop functions shouldn't accept strings In-Reply-To: <1355506655.59.0.00344503753899.issue16685@psf.upfronthosting.co.za> Message-ID: <1382348742.29.0.00327537273284.issue16685@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file32276/audioop_buffer_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 11:47:17 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 21 Oct 2013 09:47:17 +0000 Subject: [issue19325] _osx_support imports many modules In-Reply-To: <1382346544.59.0.0118958375765.issue19325@psf.upfronthosting.co.za> Message-ID: <1382348837.9.0.977732237164.issue19325@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- assignee: ronaldoussoren -> ned.deily nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 11:53:05 2013 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 21 Oct 2013 09:53:05 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1382346926.91.0.681060838724.issue19251@psf.upfronthosting.co.za> Message-ID: Ramchandra Apte added the comment: On 21 October 2013 14:45, Christian Heimes wrote: > > Christian Heimes added the comment: > > I see that the feature idea is more controversial than I initially > expected. It's probably best to have a long bike-shedding discussion on > Python-ideas... :) Right now from_bytes/to_bytes trick is fast enough for > my needs anyway. Therefore I'm deferring the proposal for 3.5. > > By the way I'd also be happy with a set of vector ops in the operator > module, e.g. vector_xor(a, b). > > +1, a generic vector_xor function looks like a better idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 12:00:00 2013 From: report at bugs.python.org (=?utf-8?q?Maciej_Blizi=C5=84ski?=) Date: Mon, 21 Oct 2013 10:00:00 +0000 Subject: [issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris In-Reply-To: <1382283098.83.0.173984225129.issue19317@psf.upfronthosting.co.za> Message-ID: <1382349600.11.0.472173905715.issue19317@psf.upfronthosting.co.za> Changes by Maciej Blizi?ski : ---------- versions: +Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 12:00:43 2013 From: report at bugs.python.org (intgr) Date: Mon, 21 Oct 2013 10:00:43 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: <1382138334.23.0.419355699391.issue19292@psf.upfronthosting.co.za> Message-ID: <1382349643.39.0.87259104153.issue19292@psf.upfronthosting.co.za> Changes by intgr : ---------- nosy: +intgr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 12:01:25 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 21 Oct 2013 10:01:25 +0000 Subject: [issue10977] Concrete object C API considered harmful to subclasses of builtin types In-Reply-To: <1295653779.62.0.836506069174.issue10977@psf.upfronthosting.co.za> Message-ID: <1382349685.55.0.44346001991.issue10977@psf.upfronthosting.co.za> Stefan Krah added the comment: I'm also in favor of a clean separation between the concrete and abstract APIs (see also #12965). Why can't the concrete functions be locked down with *CheckExact()? If there's any breakage in third party modules, it's easy to fix (probably much easier than the Unicode changes in 3.3). ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 12:01:18 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 10:01:18 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1382349678.19.0.228696529574.issue19251@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > By the way I'd also be happy with a set of vector ops in the operator module, e.g. vector_xor(a, b). This is one direction. Other direction is adding the bitarray or bitset container and the bitview adapter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 12:03:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 21 Oct 2013 10:03:25 +0000 Subject: [issue18527] Upgrade Modules/zlib to 1.2.8 In-Reply-To: <1374483245.68.0.946100267151.issue18527@psf.upfronthosting.co.za> Message-ID: <3d3D245Xpfz7LkD@mail.python.org> Roundup Robot added the comment: New changeset 224aa49f22f1 by Christian Heimes in branch 'default': Issue #18527: Upgrade internal copy of zlib to 1.2.8 http://hg.python.org/cpython/rev/224aa49f22f1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 12:04:27 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 10:04:27 +0000 Subject: [issue18527] Upgrade Modules/zlib to 1.2.8 In-Reply-To: <1374483245.68.0.946100267151.issue18527@psf.upfronthosting.co.za> Message-ID: <1382349867.23.0.312498227603.issue18527@psf.upfronthosting.co.za> Christian Heimes added the comment: Done. I have also removed two files that are neither part of zlib 1.2.8 nor required to build the extension on Windows. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 12:15:57 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 21 Oct 2013 10:15:57 +0000 Subject: [issue19326] asyncio: child process exit isn't detected if its stdin/stdout/stderr FDs have been inherited by a child process Message-ID: <1382350557.5.0.977227670741.issue19326@psf.upfronthosting.co.za> New submission from Charles-Fran?ois Natali: (This is a spinoff from http://bugs.python.org/issue19293#msg200598) When SIGCHLD is received, _sig_chld() is executed: def _sig_chld(self): [...] transp = self._subprocesses.get(pid) if transp is not None: transp._process_exited(returncode) Then, here's _process_exited(): def _process_exited(self, returncode): assert returncode is not None, returncode assert self._returncode is None, self._returncode self._returncode = returncode self._loop._subprocess_closed(self) self._call(self._protocol.process_exited) self._try_finish() And here's _try_finish(): def _try_finish(self): assert not self._finished if self._returncode is None: return if all(p is not None and p.disconnected for p in self._pipes.values()): self._finished = True self._loop.call_soon(self._call_connection_lost, None) Thus, _UnixSubprocessTransport protocol's connection_lost is only called if the all() expression is true: and it's true only if all the subprocess pipes have been disconnected (or if we didn't setup any pipe). Unfortunately, this might very well never happen: imagine that the subprocess forks a process: this grand-child process inherits the child process's pipes, so when the child process exits, we won't receive any notification, since this grand-child process still has open FDs pointing to the original child's stdin/stdout/stderr. The following simple test will hang until the background 'sleep' exits: """ diff -r 47618b00405b Lib/test/test_asyncio/test_events.py --- a/Lib/test/test_asyncio/test_events.py Sat Oct 19 10:45:48 2013 +0300 +++ b/Lib/test/test_asyncio/test_events.py Sun Oct 20 19:32:37 2013 +0200 @@ -1059,6 +1059,23 @@ @unittest.skipIf(sys.platform == 'win32', "Don't support subprocess for Windows yet") + def test_subprocess_inherit_fds(self): + proto = None + + @tasks.coroutine + def connect(): + nonlocal proto + transp, proto = yield from self.loop.subprocess_shell( + functools.partial(MySubprocessProtocol, self.loop), + 'sleep 60 &') + self.assertIsInstance(proto, MySubprocessProtocol) + + self.loop.run_until_complete(connect()) + self.loop.run_until_complete(proto.completed) + self.assertEqual(0, proto.returncode) + + @unittest.skipIf(sys.platform == 'win32', + "Don't support subprocess for Windows yet") def test_subprocess_close_after_finish(self): proto = None transp = None """ If waitpid() returns a process's PID, then the process is done, there's no reason to further wait for pipe's disconnection: they can be used as a hint that the process terminated, but there's definitely not required... ---------- messages: 200744 nosy: neologix priority: normal severity: normal stage: needs patch status: open title: asyncio: child process exit isn't detected if its stdin/stdout/stderr FDs have been inherited by a child process type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 12:23:03 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 21 Oct 2013 10:23:03 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382350983.61.0.623265928895.issue19293@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Would it make sense to use socketpair() instead of pipe() on AIX? We could check for the "bug" directly rather than checking specifically for AIX. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 12:40:39 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 10:40:39 +0000 Subject: [issue18742] Abstract base class for hashlib In-Reply-To: <1376519472.63.0.753349393836.issue18742@psf.upfronthosting.co.za> Message-ID: <1382352039.13.0.673291338881.issue18742@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm going to add CryptoKeyedHash ABC and register hmac as keyed hash algorithm, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 13:24:02 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 11:24:02 +0000 Subject: [issue19327] re doesn't work with big charsets Message-ID: <1382354642.85.0.292267314157.issue19327@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: >>> import re >>> re.compile('[%s]' % ''.join(map(chr, range(256, 2**16, 255)))) Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/sre_compile.py", line 211, in _optimize_charset charmap[fixup(av)] = 1 IndexError: list assignment index out of range During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/Lib/re.py", line 213, in compile return _compile(pattern, flags) File "/home/serhiy/py/cpython/Lib/re.py", line 280, in _compile p = sre_compile.compile(pattern, flags) File "/home/serhiy/py/cpython/Lib/sre_compile.py", line 489, in compile code = _code(p, flags) File "/home/serhiy/py/cpython/Lib/sre_compile.py", line 471, in _code _compile_info(code, p, flags) File "/home/serhiy/py/cpython/Lib/sre_compile.py", line 459, in _compile_info _compile_charset(charset, flags, code) File "/home/serhiy/py/cpython/Lib/sre_compile.py", line 177, in _compile_charset for op, av in _optimize_charset(charset, fixup): File "/home/serhiy/py/cpython/Lib/sre_compile.py", line 220, in _optimize_charset return _optimize_unicode(charset, fixup) File "/home/serhiy/py/cpython/Lib/sre_compile.py", line 342, in _optimize_unicode mapping = array.array('b', mapping).tobytes() OverflowError: signed char is greater than maximum ---------- assignee: serhiy.storchaka components: Library (Lib), Regular Expressions files: re_bigcharset.patch keywords: patch messages: 200747 nosy: ezio.melotti, mrabarnett, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: re doesn't work with big charsets type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32277/re_bigcharset.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 13:27:30 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 11:27:30 +0000 Subject: [issue19327] re doesn't work with big charsets In-Reply-To: <1382354642.85.0.292267314157.issue19327@psf.upfronthosting.co.za> Message-ID: <1382354850.55.0.0439865766565.issue19327@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 13:30:01 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 11:30:01 +0000 Subject: [issue19327] re doesn't work with big charsets In-Reply-To: <1382354642.85.0.292267314157.issue19327@psf.upfronthosting.co.za> Message-ID: <1382355001.22.0.968138846741.issue19327@psf.upfronthosting.co.za> STINNER Victor added the comment: @Serhiy: Could you please take a look at issue #13100? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 13:38:16 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 11:38:16 +0000 Subject: [issue19328] Improve PBKDF2 documentation Message-ID: <1382355496.68.0.742475173572.issue19328@psf.upfronthosting.co.za> New submission from Christian Heimes: The new pbkdf2_hmac() feature #18582 #19254 needs more documentation. I'm going to explain round count, salt generation, user vs. application salt, salt length etc. ---------- assignee: christian.heimes components: Documentation messages: 200749 nosy: christian.heimes priority: normal severity: normal stage: test needed status: open title: Improve PBKDF2 documentation type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 13:39:20 2013 From: report at bugs.python.org (Christian Tismer) Date: Mon, 21 Oct 2013 11:39:20 +0000 Subject: [issue19274] make zipfile.PyZipFile more usable In-Reply-To: <1381959832.11.0.559988604291.issue19274@psf.upfronthosting.co.za> Message-ID: <1382355560.8.0.0881980500876.issue19274@psf.upfronthosting.co.za> Christian Tismer added the comment: ah, I just see that. The problem was that the checkin drove me nuts. It forced me to run reindent to normalize the code. I did that with my WindIde editor, but this did not help. The point was: Actually an end-of-line was missing at the end of the files. Sorry, I did not see that at all, because the indentation changes are at the end. I usually avoid this strictly. It was just the check-in rejection... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 13:39:37 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 11:39:37 +0000 Subject: [issue19328] Improve PBKDF2 documentation In-Reply-To: <1382355496.68.0.742475173572.issue19328@psf.upfronthosting.co.za> Message-ID: <1382355577.49.0.366918197704.issue19328@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 13:40:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 11:40:58 +0000 Subject: [issue19327] re doesn't work with big charsets In-Reply-To: <1382354642.85.0.292267314157.issue19327@psf.upfronthosting.co.za> Message-ID: <1382355658.51.0.480743857302.issue19327@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have encountered this bug when writing test for for fragment of my large patch which cleanups and optimize the re module (it is too large to be committed all at once). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 13:42:21 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 21 Oct 2013 11:42:21 +0000 Subject: [issue10977] Concrete object C API considered harmful to subclasses of builtin types In-Reply-To: <1382349685.55.0.44346001991.issue10977@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Because calling them *from* method implementations in concrete subclasses is often a perfectly reasonable thing to do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 13:46:00 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 11:46:00 +0000 Subject: [issue13100] sre_compile._optimize_unicode() needs a cleanup In-Reply-To: <1317748318.81.0.992039803801.issue13100@psf.upfronthosting.co.za> Message-ID: <1382355960.63.0.323677912439.issue13100@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There are a lot of dead or suboptimal code in the re module. For example _sre.CODESIZE now can't be 2. We could cleanup the code as side effect of optimization. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 14:00:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 21 Oct 2013 12:00:51 +0000 Subject: [issue19170] telnetlib: use selectors In-Reply-To: <1380978969.74.0.714959132131.issue19170@psf.upfronthosting.co.za> Message-ID: <3d3Gdb0YRrz7Ljj@mail.python.org> Roundup Robot added the comment: New changeset f713d9b6393c by Charles-Fran?ois Natali in branch 'default': Issue #19170: telnetlib: use selectors. http://hg.python.org/cpython/rev/f713d9b6393c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 14:01:18 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 12:01:18 +0000 Subject: [issue19329] Faster compiling of big charset regexpes Message-ID: <1382356878.81.0.973141365685.issue19329@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here is a patch which speed up compiling of regular expressions with big charsets. Microbenchmark: $ ./python -m timeit "from sre_compile import compile; r = '[%s]' % ''.join(map(chr, range(256, 2**16, 255)))" "compile(r, 0)" Unpatched (but with fixed issue19327): 119 msec per loop Patched: 59.6 msec per loop Compiling regular expressions with big charset was main cause of slowing down importing the email.message module (issue11454). ---------- assignee: serhiy.storchaka components: Library (Lib), Regular Expressions files: re_mk_bitmap.patch keywords: patch messages: 200755 nosy: ezio.melotti, haypo, mrabarnett, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Faster compiling of big charset regexpes type: performance versions: Python 3.4 Added file: http://bugs.python.org/file32278/re_mk_bitmap.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 14:01:44 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 12:01:44 +0000 Subject: [issue19329] Faster compiling of big charset regexpes In-Reply-To: <1382356878.81.0.973141365685.issue19329@psf.upfronthosting.co.za> Message-ID: <1382356904.24.0.217433454916.issue19329@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +re doesn't work with big charsets _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 14:03:32 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 21 Oct 2013 12:03:32 +0000 Subject: [issue18931] new selectors module should support devpoll on Solaris In-Reply-To: <1378378715.64.0.328227872693.issue18931@psf.upfronthosting.co.za> Message-ID: <1382357012.75.0.729853369071.issue18931@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Just to let you know that I'm not forgetting this issue. I'd just like to iron-out issue #19172 (keys()-like method for selectors), since it could impact the API, to avoid repeated refactoring. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 14:04:54 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 21 Oct 2013 12:04:54 +0000 Subject: [issue11406] There is no os.listdir() equivalent returning generator instead of list In-Reply-To: <1299320278.86.0.403600489598.issue11406@psf.upfronthosting.co.za> Message-ID: <1382357094.26.0.779881339597.issue11406@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Gregory, did you make any progress on this? I think it would be a nice addition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 14:06:49 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 12:06:49 +0000 Subject: [issue11406] There is no os.listdir() equivalent returning generator instead of list In-Reply-To: <1299320278.86.0.403600489598.issue11406@psf.upfronthosting.co.za> Message-ID: <1382357209.63.0.303469848829.issue11406@psf.upfronthosting.co.za> Christian Heimes added the comment: Indeed! I'd like to see the feature in 3.4 so I can remove my own hack from our code base. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 14:16:05 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 12:16:05 +0000 Subject: [issue18603] PyOS_mystricmp unused and no longer available In-Reply-To: <1375228725.23.0.641374823001.issue18603@psf.upfronthosting.co.za> Message-ID: <1382357765.24.0.996438264161.issue18603@psf.upfronthosting.co.za> Christian Heimes added the comment: ping RMs ---------- nosy: +benjamin.peterson, georg.brandl, larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 14:17:04 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 12:17:04 +0000 Subject: [issue17791] PC/pyconfig.h defines PREFIX macro In-Reply-To: <1366314379.89.0.227357780835.issue17791@psf.upfronthosting.co.za> Message-ID: <1382357824.87.0.316152217681.issue17791@psf.upfronthosting.co.za> Christian Heimes added the comment: ping RMs and Windows devs ---------- nosy: +brian.curtin, larry, tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 14:20:56 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 12:20:56 +0000 Subject: [issue17913] stat.filemode returns "-" for sockets and unknown types In-Reply-To: <1367831480.84.0.461149512803.issue17913@psf.upfronthosting.co.za> Message-ID: <1382358056.82.0.464368370797.issue17913@psf.upfronthosting.co.za> Christian Heimes added the comment: The C code in Python 3.4's _stat.c module already handle unsupported types correctly. I'm going to apply my patch to the Python implementation in 2.7, 3.3 and 3.4 soonish. Or is somebody against a fix of 2.7 and 3.3? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 14:23:28 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 12:23:28 +0000 Subject: [issue18369] X509 cert class for ssl module In-Reply-To: <1373055037.38.0.259814019718.issue18369@psf.upfronthosting.co.za> Message-ID: <1382358208.05.0.360148458328.issue18369@psf.upfronthosting.co.za> Christian Heimes added the comment: Bump up my priority. I'd like to get the feature into 3.4 as a foundation for some of my other improvements of the SSL module. ---------- assignee: -> christian.heimes priority: normal -> high stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 14:24:30 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 12:24:30 +0000 Subject: [issue17123] Add OCSP support to ssl module In-Reply-To: <1359994472.8.0.804183286731.issue17123@psf.upfronthosting.co.za> Message-ID: <1382358270.83.0.0396033715784.issue17123@psf.upfronthosting.co.za> Christian Heimes added the comment: I won't have time for a proper implementation for 3.4. Defer to 3.5 ---------- versions: +Python 3.5 -Python 2.6, Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 14:25:45 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 12:25:45 +0000 Subject: [issue17006] Warn users about hashing secrets? In-Reply-To: <1358758082.76.0.415880124971.issue17006@psf.upfronthosting.co.za> Message-ID: <1382358345.44.0.545125824239.issue17006@psf.upfronthosting.co.za> Christian Heimes added the comment: Who likes to step in? Alex? ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 14:26:52 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 12:26:52 +0000 Subject: [issue1540] Refleak tests: test_doctest and test_gc are failing In-Reply-To: <1196606516.14.0.848950318684.issue1540@psf.upfronthosting.co.za> Message-ID: <1382358412.65.0.133551692488.issue1540@psf.upfronthosting.co.za> Christian Heimes added the comment: ping :) ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 14:28:32 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 12:28:32 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper In-Reply-To: <1349798954.84.0.328560890888.issue16175@psf.upfronthosting.co.za> Message-ID: <1382358512.7.0.712856668771.issue16175@psf.upfronthosting.co.za> Christian Heimes added the comment: Is this patch still of relevance for asyncio? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 14:30:49 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 12:30:49 +0000 Subject: [issue16500] Add an 'atfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1382358649.17.0.318778407115.issue16500@psf.upfronthosting.co.za> Christian Heimes added the comment: Richard, do you have time to get your patch ready for 3.4? ---------- assignee: christian.heimes -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 14:45:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 21 Oct 2013 12:45:52 +0000 Subject: [issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors In-Reply-To: <1379289654.59.0.452504541982.issue19030@psf.upfronthosting.co.za> Message-ID: <3d3Hd65b02z7LjN@mail.python.org> Roundup Robot added the comment: New changeset dad1debba93c by Charles-Fran?ois Natali in branch 'default': Fix test_pydoc failure introduced by 2f09a6980e1a (issue #19030). http://hg.python.org/cpython/rev/dad1debba93c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 14:47:18 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 21 Oct 2013 12:47:18 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper In-Reply-To: <1349798954.84.0.328560890888.issue16175@psf.upfronthosting.co.za> Message-ID: <1382359638.78.0.590202605129.issue16175@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > Is this patch still of relevance for asyncio? No, the _overlapped extension contains the IOCP stuff. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 14:50:45 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 21 Oct 2013 12:50:45 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1382292538.51.0.355167042617.issue19227@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Christian Heimes added the comment: > > I think it's more likely that my patch is triggering an existing bug. The locking code for the SSL module and OpenSSL doesn't release locks on fork. I have attached an experimental patch that unlocks all locks in the client. The problem is that this patch can make it even more deadlock-prone: pthread_mutex_unlock() isn't async-signal safe (it's not just theory: depending on the implementation, I've seen it deadlock on some platforms, even on Linux IIRC). Also, there's another problem with the approach of "unlocking locks in the child process": locks are usually used to protect critical sections, i.e. sections of code where an invariant must be preserved between entry and exit: by merely unlocking the locks in the child process, we can - maybe, see above - prevent deadlocks, but the data protected by those locks can very-well be left in an inconsistent state. So we might be trading a deadlock for a non-functional ssl library in the child process, which would be - from a security POV - even worse. Really, adding fork-hooks is a bad idea: unfortunately, I don't have anything better to suggest :-(. Except maybe adding an add-hoc hook to posix_fork(), like the ones used to reset the GIL, threading module etc: at least, it will not make the interpreter less safe than now, and won't be able to deadlock processes that are conform and use subprocess to create processes... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 14:50:42 2013 From: report at bugs.python.org (Jacek Bzdak) Date: Mon, 21 Oct 2013 12:50:42 +0000 Subject: [issue19217] Calling assertEquals for moderately long list takes too long In-Reply-To: <1381410286.72.0.514206486634.issue19217@psf.upfronthosting.co.za> Message-ID: <1382359842.88.0.201935297685.issue19217@psf.upfronthosting.co.za> Jacek Bzdak added the comment: The patch works for me, thanks Ezio! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 14:56:33 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 21 Oct 2013 12:56:33 +0000 Subject: [issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors In-Reply-To: <1379289654.59.0.452504541982.issue19030@psf.upfronthosting.co.za> Message-ID: <1382360193.56.0.672253955821.issue19030@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: I took the freedom to push a fix for the test_pydoc failures (all the buildbots were red). It should fix the failures, but since I'm not familiar with the code, it'd be good to have someone double-check it. Ethan, you just broke all the buildbots: you're now officialy a core developer! ;-) ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 15:00:19 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 13:00:19 +0000 Subject: [issue16175] Add I/O Completion Ports wrapper In-Reply-To: <1349798954.84.0.328560890888.issue16175@psf.upfronthosting.co.za> Message-ID: <1382360419.37.0.432935255415.issue16175@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks, I'm closing this ticket. ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 15:02:12 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 21 Oct 2013 13:02:12 +0000 Subject: [issue16500] Add an 'atfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1382360532.86.0.601550711219.issue16500@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > Richard, do you have time to get your patch ready for 3.4? Yes. But we don't seem to have concensus on how to handle exceptions. The main question is whether a failed prepare callback should prevent the fork from happenning, or just be printed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 15:17:44 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 21 Oct 2013 13:17:44 +0000 Subject: [issue1540] Refleak tests: test_doctest and test_gc are failing In-Reply-To: <1196606516.14.0.848950318684.issue1540@psf.upfronthosting.co.za> Message-ID: <1382361464.29.0.840462345978.issue1540@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Is the error still current? io.StringIO is now completely implemented in _io/textio.c, and should not have any Python-level __del__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 15:34:08 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 13:34:08 +0000 Subject: [issue1540] Refleak tests: test_doctest and test_gc are failing In-Reply-To: <1196606516.14.0.848950318684.issue1540@psf.upfronthosting.co.za> Message-ID: <1382362448.86.0.0817071095676.issue1540@psf.upfronthosting.co.za> Christian Heimes added the comment: I don't know ... Is somebody able to test it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 15:42:46 2013 From: report at bugs.python.org (Dwayne Litzenberger) Date: Mon, 21 Oct 2013 13:42:46 +0000 Subject: [issue16500] Add an 'atfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1382362966.58.0.793968466399.issue16500@psf.upfronthosting.co.za> Dwayne Litzenberger added the comment: > The main question is whether a failed prepare callback should prevent the fork from happenning Yes, I think an exception should prevent the fork from happening. It's fail-safe for the PRNG case (you can guarantee that a fork won't occur without properly re-seeding a PRNG), and it makes bugs easier to catch in unit testing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 15:44:36 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 13:44:36 +0000 Subject: [issue16500] Add an 'atfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1382363076.61.0.570071060684.issue16500@psf.upfronthosting.co.za> Christian Heimes added the comment: +1 for exception prevents fork ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 15:48:19 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 21 Oct 2013 13:48:19 +0000 Subject: [issue16500] Add an 'atfork' module In-Reply-To: <1382360532.86.0.601550711219.issue16500@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: I have a couple random remarks: - now that FDs are non-inheritable by default, fork locks around subprocess and multiprocessing shouldn't be necessary anymore? What other use cases does the fork-lock have? - the current implementation keeps hard-references to the functions passed: so if one isn't careful, you can end up easily with a lot of objects kept alive just because of those references, which can be a problem - also, since we're not sure about the API, and it's mostly intended to be used for the interpreter/stdlib, how about making it private for now, or at least "provisional' (I think that's the term)? - I'm also +1 on exceptions in prepare hook preventing fork, but we'll need to play a bit with actual fork hooks to see if that's a reasonable approach ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 15:51:36 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 13:51:36 +0000 Subject: [issue16500] Add an 'atfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1382363496.38.0.889786102977.issue16500@psf.upfronthosting.co.za> STINNER Victor added the comment: "now that FDs are non-inheritable by default, fork locks around subprocess and multiprocessing shouldn't be necessary anymore? What other use cases does the fork-lock have?" Well, on Windows, it's still not possible to inherit only one handle. If you mark temporary the handle as inheritable (os.set_handle_inheritable), it might be inherited by a diffrent child process if another Python thread spawn a process... It's probably unlikely, so it's one of the use case of such lock :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 15:59:39 2013 From: report at bugs.python.org (David Edelsohn) Date: Mon, 21 Oct 2013 13:59:39 +0000 Subject: [issue19302] Add support for AIX pollset efficient event I/O polling In-Reply-To: <1382205809.97.0.496335957362.issue19302@psf.upfronthosting.co.za> Message-ID: <1382363979.14.0.832349367158.issue19302@psf.upfronthosting.co.za> David Edelsohn added the comment: CF, Pre-built binaries of Python for AIX are available on the Bull Freeware and Perzl sites of Open Source Software for AIX. The "GetIt" page should be updated and the packages can be made available through python.org Other parts of your reasoning are somewhat circular because most of the problems on AIX are Linux-isms (or BSD-isms where BSD has not yielded to Linux behavior). So you argue against adding lots of AIX-specific code, yet fixing some of the tests more generally will require adding lots of AIX-specific code. I am trying to focus on features and functionality that will make Python more useful to more AIX users. Hopefully that would grow the Python user base and developer base on AIX and lead to more support for Python on AIX. Fixing every corner case test is more a pedantic argument than something that is useful to the general Python user. A lot of the Python buildbot testsuite failures are due to a locale issue that has not been my highest priority. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 16:00:52 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 21 Oct 2013 14:00:52 +0000 Subject: [issue19330] Use public classes for contextlib.suppress and redirect_stdout Message-ID: <1382364052.22.0.450047950138.issue19330@psf.upfronthosting.co.za> New submission from Nick Coghlan: I broke help() for instances of these context managers by trying to postpone exposing the class APIs until 3.5 (and didn't even record my full rationale, however flawed, in the associated comments). The wrapper functions should be removed, making the classes the public implementation. I also plan to make the following changes (although I may end up moving them to separate issues): - provide (and document) a public "target" attribute on redirect_stdout - make redirect_stdout reentrant (and switch to ExitStack as the reusable-but-not-reentrant example) - provide (and document) a public "exceptions" attribute on suppress - return self from suppress.__enter__ ---------- assignee: ncoghlan components: Library (Lib) messages: 200782 nosy: larry, ncoghlan priority: release blocker severity: normal stage: needs patch status: open title: Use public classes for contextlib.suppress and redirect_stdout type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 16:01:48 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 21 Oct 2013 14:01:48 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names Message-ID: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> New submission from Barry A. Warsaw: PEP 8 says: """ Class Names Almost without exception, class names use the CapWords convention. Classes for internal use have a leading underscore in addition. """ yet there are some notable exceptions in practice, such as classes designed to be context managers (used with the `with` statement). This message indicates Nick's implementation choice of a wrapper function in part to avoid naming a class with all lower cases (which look better with `with`, but break the PEP 8 convention). https://mail.python.org/pipermail/python-dev/2013-October/129791.html The PEP 8 language should be revised, but striking the right balance might be a little tricky. ---------- messages: 200783 nosy: barry priority: normal severity: normal status: open title: Revise PEP 8 recommendation for class names _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 16:02:39 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 21 Oct 2013 14:02:39 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1382364159.12.0.427249716807.issue19331@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- assignee: -> barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 16:02:54 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 14:02:54 +0000 Subject: [issue19332] Guard against changing dict during iteration Message-ID: <1382364174.9.0.836332683158.issue19332@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Currently dict iterating is guarded against changing dict's size. However when dict changed during iteration so that it's size left unchanged, this modification left unnoticed. >>> d = dict.fromkeys('abcd') >>> for i in d: ... print(i) ... d[i + 'x'] = None ... del d[i] ... d a dx dxx ax c b In general iterating over mutating dict considered logical error. It is good detect it as early as possible. The proposed patch introduces a counter which changed every time when added or removed key. If an iterator detects that this counter is changed, it raises runtime error. ---------- components: Interpreter Core files: dict_mutating_iteration.patch keywords: patch messages: 200784 nosy: pitrou, rhettinger, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Guard against changing dict during iteration type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32279/dict_mutating_iteration.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 16:05:17 2013 From: report at bugs.python.org (Marius Gedminas) Date: Mon, 21 Oct 2013 14:05:17 +0000 Subject: [issue19333] distutils.util.grok_environment_error loses the error message Message-ID: <1382364317.14.0.23941931119.issue19333@psf.upfronthosting.co.za> New submission from Marius Gedminas: Steps to reproduce: $ python -c 'from distutils.util import grok_environment_error as e; print(e(IOError("message")))' What I expect to see: error: message What I get instead: error: None This is a problem because it hides the error message in a real-life use case: trying to use the latest setuptools in an ancient virtualenv (see [1]). TL;DR version: - sysconfig (in the standard library) raises IOError(msg), - which is then caught and passed throughdistutils.util.grok_environment_error(), - which then returns an unfriendly 'error: None'. [1] https://bitbucket.org/pypa/setuptools/issue/89/easy_install-quits-with-error-none-in ---------- assignee: eric.araujo components: Distutils messages: 200785 nosy: eric.araujo, mgedmin, tarek priority: normal severity: normal status: open title: distutils.util.grok_environment_error loses the error message type: behavior versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 16:18:30 2013 From: report at bugs.python.org (Paul Moore) Date: Mon, 21 Oct 2013 14:18:30 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1382365110.02.0.716566068981.issue19331@psf.upfronthosting.co.za> Paul Moore added the comment: How about simply adding a further sentence, something like: "Where a class is being used conceptually as a callable (for example, context managers), the naming convention for callables (lower_case_with_underscores) should be followed." Maybe also add a section at the start of "Naming Conventions": """ Overriding Principle Whenever names are visible to the user, as public parts of the API, the naming convention should reflect usage rather than implementation. An internal change (for example switching from a class to a factory function) should never affect the names used in the public API. """ ---------- nosy: +pmoore _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 16:25:37 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 21 Oct 2013 14:25:37 +0000 Subject: [issue19302] Add support for AIX pollset efficient event I/O polling In-Reply-To: <1382363979.14.0.832349367158.issue19302@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Other parts of your reasoning are somewhat circular because most of the problems on AIX are Linux-isms (or BSD-isms where BSD has not yielded to Linux behavior). So you argue against adding lots of AIX-specific code, yet fixing some of the tests more generally will require adding lots of AIX-specific code. It shouldn't require a lot of AIX-specific code, as long as AIX is POSIX-compliant. If some tests are failing because on Linux-isms assumptions - either in the stdlib, or in the tests - as I said, we'll be happy to fix them: just open relevant issues. Once again, this issue is not about whether or not we want to support AIX (I'm personally happy to have as many Unices supported as possible), but rather whether or not we want to add large chunks of OS-specific code, whereas the currently generic POSIX primitives - such as select() and poll() - work on all POSIX-compliant platforms. Adding platform-specific code has a cost, and IMO, the cost isn't worth it for AIX. I can understand that your point of view differs, either because of your job or personal interest, that's why I'd like to know if there's a consensus, or semi-official policy among the CPython project. Feel free to bring this up on the python-dev mailing list! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 16:26:33 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Oct 2013 14:26:33 +0000 Subject: [issue19270] sched.cancel() breaks events order In-Reply-To: <1381913252.24.0.629122693277.issue19270@psf.upfronthosting.co.za> Message-ID: <1382365593.56.0.0550703031973.issue19270@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This module has been around for a long time and no users have reported any issues with respect to event ordering. The logic is essentially the same as is used in popular event loops like Tornado. Please don't just make-up a new invariant for this module. ---------- versions: -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 16:41:44 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 21 Oct 2013 14:41:44 +0000 Subject: [issue16500] Add an 'atfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1382366504.66.0.993376755414.issue16500@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > - now that FDs are non-inheritable by default, fork locks around > subprocess and multiprocessing shouldn't be necessary anymore? What > other use cases does the fork-lock have? CLOEXEC fds will still be inherited by forked children. > - the current implementation keeps hard-references to the functions > passed: so if one isn't careful, you can end up easily with a lot of > objects kept alive just because of those references, which can be a > problem True, but you could make the same complaint about atexit.register(). One can fairly easily create something like weakref.finalize which uses atfork but is smart about not creating hard refs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 16:45:17 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 21 Oct 2013 14:45:17 +0000 Subject: [issue19334] test_asyncio hanging for 1 hour (non-AIX version) Message-ID: <1382366717.5.0.644107908192.issue19334@psf.upfronthosting.co.za> New submission from Guido van Rossum: There are still some problems with asyncio tests hanging on FreeBSD and possibly other platforms. While these were originally conflated with a hang on AIX, the root causes are different; just the symptoms are the same (the test hangs forever and after exactly one hour the test runner kills the process). I'm opening a new issue to discuss the issues on platforms other than AIX. ---------- messages: 200790 nosy: db3l, gvanrossum, haypo, larry, ncoghlan, neologix, pitrou, python-dev, sbt, skrah priority: normal severity: normal status: open title: test_asyncio hanging for 1 hour (non-AIX version) type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 16:50:52 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 21 Oct 2013 14:50:52 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382367052.55.0.2690373795.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: OK, I've created issue 19334 to track test_asyncio hangs on other platforms. Let's please keep this issue restricted to AIX. I am aware of the following issue: - select for read on the write end of a pipe returns immediately Any other AIX issues also please open separate issues (and assign to me to get my immediate attention). I wonder if we can at least dynamically detect that this does not work in the _read_ready() handler or even in the setup? ISTM that reading from the write end should immediately fail with EBADF. (It does on my system, but I don't want to generalize. :-) ---------- title: test_asyncio hanging for 1 hour -> test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 16:51:30 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 14:51:30 +0000 Subject: [issue13451] sched.py: speedup cancel() method In-Reply-To: <1321923822.73.0.49972384361.issue13451@psf.upfronthosting.co.za> Message-ID: <1382367090.31.0.0191441924821.issue13451@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In updated patch I have reverted queue optimization (this should be separated issue) and made some minor changes. ---------- Added file: http://bugs.python.org/file32280/cancel_4a.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 16:53:55 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 21 Oct 2013 14:53:55 +0000 Subject: [issue18603] PyOS_mystricmp unused and no longer available In-Reply-To: <1375228725.23.0.641374823001.issue18603@psf.upfronthosting.co.za> Message-ID: <1382367235.6.0.625705828368.issue18603@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Uggg, can we just kill them if we've already released versions without them? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 16:55:34 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 21 Oct 2013 14:55:34 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382367334.55.0.433251808765.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: @Richard: socketpair() seems to work fine on AIX (we use it internally). Maybe we can always use that for subprocess management? But will the subprocess module support this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 16:56:27 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 14:56:27 +0000 Subject: [issue18603] PyOS_mystricmp unused and no longer available In-Reply-To: <1375228725.23.0.641374823001.issue18603@psf.upfronthosting.co.za> Message-ID: <1382367387.13.0.789985081554.issue18603@psf.upfronthosting.co.za> Christian Heimes added the comment: Fine with me, however ... Technically all our source releases still contain the code. AFAIK all shared library builds, too. Just standard builds of Python are lacking the object file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 16:57:23 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 14:57:23 +0000 Subject: [issue18603] PyOS_mystricmp unused and no longer available In-Reply-To: <1375228725.23.0.641374823001.issue18603@psf.upfronthosting.co.za> Message-ID: <1382367443.9.0.0485034873249.issue18603@psf.upfronthosting.co.za> STINNER Victor added the comment: The function doesn't hurt, please don't touch stable versions: only remove it from 3.4. I don't understand the tag "keywords: 3.3regression". Is this issue a bug, or even a compile error?? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 17:00:22 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 21 Oct 2013 15:00:22 +0000 Subject: [issue16500] Add an 'atfork' module In-Reply-To: <1382366504.66.0.993376755414.issue16500@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Richard Oudkerk added the comment: > >> - now that FDs are non-inheritable by default, fork locks around >> subprocess and multiprocessing shouldn't be necessary anymore? What >> other use cases does the fork-lock have? > > CLOEXEC fds will still be inherited by forked children. Hum, right, I was thinking only about subprocess-created children (where an exec follows immediately). >> - the current implementation keeps hard-references to the functions >> passed: so if one isn't careful, you can end up easily with a lot of >> objects kept alive just because of those references, which can be a >> problem > > True, but you could make the same complaint about atexit.register(). Yeah, but atexit is usually used for process-lifetime resources (I mean, there's 'exit' in the name). One of the main use cases for atfork hooks would be the numerous stdlib objects which have locks (or locks themselves): most of such objects have arbitrary lifetimes (e.g. logging, events, open files, etc). The risk of leak is IMO much greater. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 17:04:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 15:04:58 +0000 Subject: [issue19270] Document that sched.cancel() doesn't distinguish equal events and can break order In-Reply-To: <1381913252.24.0.629122693277.issue19270@psf.upfronthosting.co.za> Message-ID: <1382367898.97.0.000947749981537.issue19270@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Well. In any case I have no ideas how fix it. Any behavior change will break existing code. I requalify this issue as documentation enhancement. The documentation should specify that evens scheduled on same tame with same priority considered equal. That cancel() doesn't distinguish equal events and can cancel arbitrary of them. That cancel() doesn't preserve order of equal events. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) keywords: +easy nosy: +docs at python title: sched.cancel() breaks events order -> Document that sched.cancel() doesn't distinguish equal events and can break order type: behavior -> enhancement versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 17:05:32 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 15:05:32 +0000 Subject: [issue13451] sched.py: speedup cancel() method In-Reply-To: <1321923822.73.0.49972384361.issue13451@psf.upfronthosting.co.za> Message-ID: <1382367932.69.0.62663198082.issue13451@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: -Document that sched.cancel() doesn't distinguish equal events and can break order _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 17:09:12 2013 From: report at bugs.python.org (Florent Xicluna) Date: Mon, 21 Oct 2013 15:09:12 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382368152.62.0.28541856864.issue19293@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 17:09:20 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 15:09:20 +0000 Subject: [issue19270] Document that sched.cancel() doesn't distinguish equal events and can break order In-Reply-To: <1381913252.24.0.629122693277.issue19270@psf.upfronthosting.co.za> Message-ID: <1382368160.22.0.605298739308.issue19270@psf.upfronthosting.co.za> STINNER Victor added the comment: @Raymond: The logic is essentially the same as is used in popular event loops like Tornado. Sorry, I didn't understand your sentence: do you mean that sched must keep the insertion order or the order is undefined? Undefined order is fine if it's documented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 17:25:26 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 21 Oct 2013 15:25:26 +0000 Subject: [issue11406] There is no os.listdir() equivalent returning generator instead of list In-Reply-To: <1299320278.86.0.403600489598.issue11406@psf.upfronthosting.co.za> Message-ID: <1382369126.47.0.896575392218.issue11406@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I haven't had a chance to look at this since May. It'd still be a great addition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 17:30:43 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 21 Oct 2013 15:30:43 +0000 Subject: [issue17276] HMAC: deprecate default hash In-Reply-To: <1361535402.96.0.618065106631.issue17276@psf.upfronthosting.co.za> Message-ID: <1382369443.04.0.993613390275.issue17276@psf.upfronthosting.co.za> Gregory P. Smith added the comment: yes just remove the DeprecationWarning. Document it as deprecated with a release now+0.2 as the earliest it will be removed. (if you want a warning at all, use PendingDeprecationWarning as that one is filtered out by default so it won't bother users of tools written in Python but only developers actively looking for issues) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 17:32:24 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 15:32:24 +0000 Subject: [issue13451] sched.py: speedup cancel() method In-Reply-To: <1321923822.73.0.49972384361.issue13451@psf.upfronthosting.co.za> Message-ID: <1382369544.08.0.857945496137.issue13451@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file32280/cancel_4a.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 17:33:35 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 15:33:35 +0000 Subject: [issue13451] sched.py: speedup cancel() method In-Reply-To: <1321923822.73.0.49972384361.issue13451@psf.upfronthosting.co.za> Message-ID: <1382369615.59.0.0851416092853.issue13451@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Fixed a bug in previous patch. ---------- Added file: http://bugs.python.org/file32281/cancel_4b.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 17:36:08 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 21 Oct 2013 15:36:08 +0000 Subject: [issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors In-Reply-To: <1379289654.59.0.452504541982.issue19030@psf.upfronthosting.co.za> Message-ID: <1382369768.48.0.986427623282.issue19030@psf.upfronthosting.co.za> Stefan Krah added the comment: The build --without-doc-strings still fails on the FreeBSD-9.0 bot. Antoine, could we make that option official on my build slave? Currently I'm subverting the build system by exporting an environment variable. It does not seem to be a heavy maintenance burden: This is the first failure in half a year or so. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 17:38:02 2013 From: report at bugs.python.org (Eric Snow) Date: Mon, 21 Oct 2013 15:38:02 +0000 Subject: [issue10977] Concrete object C API considered harmful to subclasses of builtin types In-Reply-To: <1295653779.62.0.836506069174.issue10977@psf.upfronthosting.co.za> Message-ID: <1382369882.06.0.385738542601.issue10977@psf.upfronthosting.co.za> Eric Snow added the comment: > Because calling them *from* method implementations in concrete subclasses... We do the same thing from Python all the time (though less so with the availability of super). E.G. dict.__init__(self, ...) and dict.__set item__(self, key, value). Now, if the C-API had some equivalent to super... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 17:52:51 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 21 Oct 2013 15:52:51 +0000 Subject: [issue19326] asyncio: child process exit isn't detected if its stdin/stdout/stderr FDs have been inherited by a child process In-Reply-To: <1382350557.5.0.977227670741.issue19326@psf.upfronthosting.co.za> Message-ID: <1382370771.58.0.279743604784.issue19326@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 18:18:53 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 21 Oct 2013 16:18:53 +0000 Subject: [issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors In-Reply-To: <1379289654.59.0.452504541982.issue19030@psf.upfronthosting.co.za> Message-ID: <1382372333.92.0.879088531113.issue19030@psf.upfronthosting.co.za> Ethan Furman added the comment: Charles-Fran?ois Natali added the comment: > > Ethan, you just broke all the buildbots: you're now officialy a core > developer! ;-) I was actually hoping to put off this particular honor for a while... drat! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 18:19:05 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 21 Oct 2013 16:19:05 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382372345.35.0.38055874747.issue19293@psf.upfronthosting.co.za> Richard Oudkerk added the comment: The following uses socketpair() instead of pipe() for stdin, and works for me on Linux: diff -r 7d94e4a68b91 asyncio/unix_events.py --- a/asyncio/unix_events.py Sun Oct 20 20:25:04 2013 -0700 +++ b/asyncio/unix_events.py Mon Oct 21 17:15:19 2013 +0100 @@ -272,8 +272,6 @@ self._loop = loop self._pipe = pipe self._fileno = pipe.fileno() - if not stat.S_ISFIFO(os.fstat(self._fileno).st_mode): - raise ValueError("Pipe transport is for pipes only.") _set_nonblocking(self._fileno) self._protocol = protocol self._buffer = [] @@ -442,9 +440,16 @@ self._finished = False self._returncode = None + if stdin == subprocess.PIPE: + stdin_w, stdin_r = socket.socketpair() + else: + stdin_w = stdin_r = None self._proc = subprocess.Popen( - args, shell=shell, stdin=stdin, stdout=stdout, stderr=stderr, + args, shell=shell, stdin=stdin_r, stdout=stdout, stderr=stderr, universal_newlines=False, bufsize=bufsize, **kwargs) + if stdin_r is not None: + stdin_r.close() + self._proc.stdin = open(stdin_w.detach(), 'rb', buffering=bufsize) self._extra['subprocess'] = self._proc def close(self): ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 18:22:03 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 21 Oct 2013 16:22:03 +0000 Subject: [issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors In-Reply-To: <1379289654.59.0.452504541982.issue19030@psf.upfronthosting.co.za> Message-ID: <1382372523.7.0.31414982485.issue19030@psf.upfronthosting.co.za> Ethan Furman added the comment: Thanks, Charles-Fran?ois! The problem occurred when I tried to push the commit and was told there was trailing white-space. Naturally I then ran the de-whitespacing tool which of course removed the whitespace from those lines where you added the \x20s back on. I'll remember to do those conversions next time, and thanks for fixing it -- I'm not sure I would have found it any time soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 18:28:23 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 21 Oct 2013 16:28:23 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382372903.85.0.141463802109.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: Brilliant. It works for me too on OS X. David, can you check this on AIX? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 18:30:00 2013 From: report at bugs.python.org (Chris Angelico) Date: Mon, 21 Oct 2013 16:30:00 +0000 Subject: [issue19335] IDLE over-enthusiastically verifies 'nonlocal' usage Message-ID: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> New submission from Chris Angelico: IDLE tries to be helpful, but it errors on something that isn't yet an error. Pasting in this code works fine: >>> def a(): def b(): nonlocal q q+=1 q=1 b() return q >>> a() 2 But typing it, line by line, results in an error: >>> def a(): def b(): nonlocal q SyntaxError: no binding for nonlocal 'q' found This doesn't occur with interactive command-line Python. A small issue, more of curiosity value than anything else - I don't have a non-trivial use-case where this causes problems. ---------- components: IDLE messages: 200809 nosy: Rosuav priority: normal severity: normal status: open title: IDLE over-enthusiastically verifies 'nonlocal' usage versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 18:34:26 2013 From: report at bugs.python.org (Alex Gaynor) Date: Mon, 21 Oct 2013 16:34:26 +0000 Subject: [issue19336] No API to get events from epoll without allocating a list Message-ID: <1382373266.71.0.522503434319.issue19336@psf.upfronthosting.co.za> New submission from Alex Gaynor: select.epoll should expose an api such as `iterpoll` which returns an iterator over the ready events, rather than a list. Allocating a list is wasteful in many cases (e.g. twisted's event loop) and it'd be nice to have an API that was less wasteful. ---------- messages: 200810 nosy: alex priority: normal severity: normal status: open title: No API to get events from epoll without allocating a list _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 18:34:47 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 21 Oct 2013 16:34:47 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382373287.58.0.570356013959.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: Attached is a version of Richard's patch that I like better (sockpair.diff). - instead of dropping the ValueError, check for ISFIFO and ISSOCK - pass the read end of the socket pair to Popen() ---------- Added file: http://bugs.python.org/file32282/sockpair.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 18:48:26 2013 From: report at bugs.python.org (Larry Hastings) Date: Mon, 21 Oct 2013 16:48:26 +0000 Subject: [issue17123] Add OCSP support to ssl module In-Reply-To: <1359994472.8.0.804183286731.issue17123@psf.upfronthosting.co.za> Message-ID: <1382374106.86.0.916055729149.issue17123@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- nosy: -larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 18:49:41 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 21 Oct 2013 16:49:41 +0000 Subject: [issue19326] asyncio: child process exit isn't detected if its stdin/stdout/stderr FDs have been inherited by a child process In-Reply-To: <1382350557.5.0.977227670741.issue19326@psf.upfronthosting.co.za> Message-ID: <1382374181.16.0.240092919902.issue19326@psf.upfronthosting.co.za> Guido van Rossum added the comment: This is by design. Let me try to defend the design. As long as one of the pipes is still open the parent might be interested in it. The Protocol object does get notified of the process's exit, via process_exited(), and if at that point it wants to be done, it can close the pipes itself. (To do that, call transport.get_pipe_transport(FD).close().) Once that's done the subprocess protocol's connection_lost() method will be called. I suppose an alternative approach might be to assume that when the subprocess exist the parent should close the pipes and be done, but there's a race condition there: there may still be data in one of the pipes (stdout or stderr) that should be processed before calling connection_lost(), similar to how we delay the socket connection_lost() call until we have processed all data read from it. So I don't think that alternative is viable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 18:59:43 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 21 Oct 2013 16:59:43 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1382374783.9.0.0584502830191.issue19331@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 19:03:30 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 17:03:30 +0000 Subject: [issue18685] Restore re performance to pre-PEP393 level In-Reply-To: <1375967417.95.0.0303828296889.issue18685@psf.upfronthosting.co.za> Message-ID: <1382375010.36.0.803645418691.issue18685@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Rebased patch to tip and added non-ASCII tests for main re functions. ---------- Added file: http://bugs.python.org/file32283/sre_optimize_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 19:03:36 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 21 Oct 2013 17:03:36 +0000 Subject: [issue19330] Use public classes for contextlib.suppress and redirect_stdout In-Reply-To: <1382364052.22.0.450047950138.issue19330@psf.upfronthosting.co.za> Message-ID: <1382375016.34.0.788822375239.issue19330@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 19:04:21 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 21 Oct 2013 17:04:21 +0000 Subject: [issue12029] Catching virtual subclasses in except clauses In-Reply-To: <1304844823.89.0.48444500115.issue12029@psf.upfronthosting.co.za> Message-ID: <1382375061.75.0.807891300938.issue12029@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 19:08:04 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 21 Oct 2013 17:08:04 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382375284.1.0.427584283177.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: New, improved version of sockpair.diff. ---------- Added file: http://bugs.python.org/file32284/sockpair.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 19:08:17 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 21 Oct 2013 17:08:17 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382375297.66.0.436301680326.issue19293@psf.upfronthosting.co.za> Changes by Guido van Rossum : Removed file: http://bugs.python.org/file32282/sockpair.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 19:16:46 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 21 Oct 2013 17:16:46 +0000 Subject: [issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors In-Reply-To: <1382369768.48.0.986427623282.issue19030@psf.upfronthosting.co.za> Message-ID: <1382375773.2487.0.camel@fsol> Antoine Pitrou added the comment: > Antoine, could we make that option official on my build slave? Currently > I'm subverting the build system by exporting an environment variable. Done. Can you please watch for failures and ensure they get fixed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 19:23:18 2013 From: report at bugs.python.org (Maciej Fijalkowski) Date: Mon, 21 Oct 2013 17:23:18 +0000 Subject: [issue19336] No API to get events from epoll without allocating a list In-Reply-To: <1382373266.71.0.522503434319.issue19336@psf.upfronthosting.co.za> Message-ID: <1382376198.8.0.375171874129.issue19336@psf.upfronthosting.co.za> Changes by Maciej Fijalkowski : ---------- nosy: +fijall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 19:40:44 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 21 Oct 2013 17:40:44 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1382377244.21.0.570436210326.issue19331@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 19:50:28 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 21 Oct 2013 17:50:28 +0000 Subject: [issue19326] asyncio: child process exit isn't detected if its stdin/stdout/stderr FDs have been inherited by a child process In-Reply-To: <1382350557.5.0.977227670741.issue19326@psf.upfronthosting.co.za> Message-ID: <1382377828.46.0.163910520117.issue19326@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > This is by design. Let me try to defend the design. OK, if that's a know limitation, then that's fine. It would be nice to add maybe a note somewhere in the documentation, so that people don't get bitten by this (and also probably add a test for process_exited). ---------- resolution: -> rejected stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 19:55:46 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 21 Oct 2013 17:55:46 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1382378146.15.0.496501005024.issue19331@psf.upfronthosting.co.za> Antoine Pitrou added the comment: s/should be followed/may be followed/ As an other point of reference, for a long time the synchronization classes in the threading module were actually mediated by function wrappers, e.g.: def Lock(*args, **kwargs): return _Lock(*args, **kwargs) (this was to "discourage subclassing", IIRC) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 19:56:00 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 21 Oct 2013 17:56:00 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1382378160.89.0.502448495388.issue19331@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 20:20:39 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 18:20:39 +0000 Subject: [issue19287] __contains__() of dbm.ndbm databases fails with str In-Reply-To: <1382126242.51.0.42060822734.issue19287@psf.upfronthosting.co.za> Message-ID: <1382379639.55.0.0754211595236.issue19287@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. Could you please sign a contributor agreement ([1], [2]) Arfrever? [1] http://www.python.org/psf/contrib/ [2] http://www.python.org/psf/contrib/contrib-form/ ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 20:21:17 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 18:21:17 +0000 Subject: [issue19288] __contains__() of dbm.gnu databases fails with str In-Reply-To: <1382127793.56.0.416420933735.issue19288@psf.upfronthosting.co.za> Message-ID: <1382379677.27.0.153152392597.issue19288@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 20:24:45 2013 From: report at bugs.python.org (Ribhi Kamal) Date: Mon, 21 Oct 2013 18:24:45 +0000 Subject: [issue19337] MMAP: Bus error (core dump) under heavy read/write Message-ID: <1382379885.04.0.64581281764.issue19337@psf.upfronthosting.co.za> New submission from Ribhi Kamal: I was about to use memory mapping for something when I discovered that the code example posted on python.org causes python to core dump. %100 reproducible The steps are really simple. 1- Create a file and map it using mmap.mmap 2- In a while loop, contintously read the file 3- From another process, like bash, continuously write to the file. After about 5 iterations from the reader, python core dumps. Reader code (python): #!/usr/bin/python2.7 import mmap import time with open("hello.txt", "wb") as f: f.write("Hello Python! 1234123412341234\n") with open("hello.txt", "r+b") as f: # memory-map the file, size 0 means whole file mm = mmap.mmap(f.fileno(), 0) count=0 while count < 100: mm.seek(0) print mm.readline() time.sleep(0.1) count = count + 1 # close the map mm.close() Writer code (linux shell/bash): #!/bin/bash count=0 while true do ((count++)) echo $count > hello.txt done Now run the reader, then launch the writer in a terminal. In my case I get the following output: >110 > >462 > >Bus error (core dumped) Python 2.7.3 Linux 3.2.0-54-generic #82-Ubuntu SMP Tue Sep 10 20:09:12 UTC 2013 i686 i686 i386 GNU/Linux Ubuntu 12.04.3 LTS Intel(R) Core(TM)2 CPU 6300 @ 1.86GHz ---------- components: IO messages: 200820 nosy: rbhkamal priority: normal severity: normal status: open title: MMAP: Bus error (core dump) under heavy read/write type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 20:26:15 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 18:26:15 +0000 Subject: [issue19337] MMAP: Bus error (core dump) under heavy read/write In-Reply-To: <1382379885.04.0.64581281764.issue19337@psf.upfronthosting.co.za> Message-ID: <1382379975.67.0.175695797799.issue19337@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo, neologix, pitrou, sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 20:28:37 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 21 Oct 2013 18:28:37 +0000 Subject: [issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris In-Reply-To: <1382283098.83.0.173984225129.issue19317@psf.upfronthosting.co.za> Message-ID: <1382380117.94.0.501862594198.issue19317@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 20:30:38 2013 From: report at bugs.python.org (Ribhi Kamal) Date: Mon, 21 Oct 2013 18:30:38 +0000 Subject: [issue19337] MMAP: Bus error (core dump) under heavy read/write In-Reply-To: <1382379885.04.0.64581281764.issue19337@psf.upfronthosting.co.za> Message-ID: <1382380238.85.0.387508302164.issue19337@psf.upfronthosting.co.za> Ribhi Kamal added the comment: Code dump attached ---------- Added file: http://bugs.python.org/file32285/core.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 20:32:38 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 18:32:38 +0000 Subject: [issue19337] MMAP: Bus error (core dump) under heavy read/write In-Reply-To: <1382379885.04.0.64581281764.issue19337@psf.upfronthosting.co.za> Message-ID: <1382380358.54.0.339691061036.issue19337@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Confirm on 2.7 and 3.x. ---------- components: +Library (Lib) nosy: +serhiy.storchaka versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 20:33:57 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 21 Oct 2013 18:33:57 +0000 Subject: [issue19337] MMAP: Bus error (core dump) under heavy read/write In-Reply-To: <1382379885.04.0.64581281764.issue19337@psf.upfronthosting.co.za> Message-ID: <1382380437.54.0.514189296802.issue19337@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > 3- From another process, like bash, continuously write to the file. That's the problem: reducing (actually truncating in your case) a file currently mmaped *can only result in a core dump*: when you try to read from a location in memory which doesn't correspond anymore to a position in the file (since it got truncated), which value could the kernel return? The page you're trying to read from isn't mapped anymore, so you get a segfault. Apparently it's even documented in the main page: """ The effect of changing the size of the underlying file of a mapping on the pages that correspond to added or removed regions of the file is unspecified. """ ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 20:34:41 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 21 Oct 2013 18:34:41 +0000 Subject: [issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors In-Reply-To: <1382375773.2487.0.camel@fsol> Message-ID: <20131021183442.GA27121@sleipnir.bytereef.org> Stefan Krah added the comment: Antoine Pitrou wrote: > Done. Can you please watch for failures and ensure they get fixed? Thanks! Yes, I'll keep an eye on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 20:36:19 2013 From: report at bugs.python.org (Ribhi Kamal) Date: Mon, 21 Oct 2013 18:36:19 +0000 Subject: [issue19337] MMAP: Bus error (core dump) under heavy read/write In-Reply-To: <1382379885.04.0.64581281764.issue19337@psf.upfronthosting.co.za> Message-ID: <1382380579.68.0.0986680846767.issue19337@psf.upfronthosting.co.za> Ribhi Kamal added the comment: I figured I was doing something wrong... sorry about that ---------- components: -Library (Lib) resolution: invalid -> status: closed -> open versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 20:36:38 2013 From: report at bugs.python.org (Ribhi Kamal) Date: Mon, 21 Oct 2013 18:36:38 +0000 Subject: [issue19337] MMAP: Bus error (core dump) under heavy read/write In-Reply-To: <1382379885.04.0.64581281764.issue19337@psf.upfronthosting.co.za> Message-ID: <1382380598.82.0.811771650586.issue19337@psf.upfronthosting.co.za> Changes by Ribhi Kamal : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 20:37:14 2013 From: report at bugs.python.org (Ribhi Kamal) Date: Mon, 21 Oct 2013 18:37:14 +0000 Subject: [issue19337] MMAP: Bus error (core dump) under heavy read/write In-Reply-To: <1382379885.04.0.64581281764.issue19337@psf.upfronthosting.co.za> Message-ID: <1382380634.31.0.4659108099.issue19337@psf.upfronthosting.co.za> Changes by Ribhi Kamal : Removed file: http://bugs.python.org/file32285/core.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 20:50:12 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 21 Oct 2013 18:50:12 +0000 Subject: [issue16500] Add an 'atfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1382381412.71.0.394561229043.issue16500@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > One of the main use cases for atfork hooks would be the numerous stdlib objects which have locks (or locks themselves): most of such objects have arbitrary lifetimes (e.g. logging, events, open files, etc). > The risk of leak is IMO much greater. Well it is customary for callback-based APIs to hold strong references to their callbacks. If a library wants to avoid leaks, it should register a single callback which will then walk the current "live" resources and protect them. (i.e. the resource lifetime issue should be solved by library or application code, not by the atfork module) By the way, +0 to raising and aborting the fork when there's an exception. The only annoyance I can think about is a buggy library which would prevent the user from forking. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 20:51:10 2013 From: report at bugs.python.org (Michael Foord) Date: Mon, 21 Oct 2013 18:51:10 +0000 Subject: [issue19217] Calling assertEquals for moderately long list takes too long In-Reply-To: <1381410286.72.0.514206486634.issue19217@psf.upfronthosting.co.za> Message-ID: <1382381470.44.0.704394226803.issue19217@psf.upfronthosting.co.za> Michael Foord added the comment: pprint is also likely to have performance issues. I agree with Ezio that a diff consisting of more than 30(x2) lines is not likely to be directly useful anyway. A test for the changed behaviour would be nice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 20:53:31 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 21 Oct 2013 18:53:31 +0000 Subject: [issue19270] Document that sched.cancel() doesn't distinguish equal events and can break order In-Reply-To: <1381913252.24.0.629122693277.issue19270@psf.upfronthosting.co.za> Message-ID: <1382381611.37.0.170209595346.issue19270@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm not strong on a new invariant, however I think bug #1 would deserve fixing: > 1. sched.cancel() can remove wrong event (because it uses equality instead identity). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 21:34:25 2013 From: report at bugs.python.org (Yuriy Taraday) Date: Mon, 21 Oct 2013 19:34:25 +0000 Subject: [issue12029] Catching virtual subclasses in except clauses In-Reply-To: <1304844823.89.0.48444500115.issue12029@psf.upfronthosting.co.za> Message-ID: <1382384065.06.0.868266733151.issue12029@psf.upfronthosting.co.za> Yuriy Taraday added the comment: Can someone please point out why do we have to do that dance with recursion limit? I've came upon this problem as well. I had some (bad) API I had to work with. It always raised the same exception with the only difference in the message. So I thought I could do something like this: def message_contains(msg): class _MyExc(object): def __instancecheck__(self, exc): return msg in exc.args[0] return _MyExc But after I tried it in number of different ways I found out that it's not possible. So here's another reason to change this behavior. ---------- nosy: +yorik.sar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 21:43:03 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Oct 2013 19:43:03 +0000 Subject: [issue19270] Document that sched.cancel() doesn't distinguish equal events and can break order In-Reply-To: <1381913252.24.0.629122693277.issue19270@psf.upfronthosting.co.za> Message-ID: <1382384583.15.0.0282469575897.issue19270@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I'm not strong on a new invariant, however I think bug #1 would deserve fixing: How would you do this? 1. Use identity instead equality to search canceled event. It will break code where an user cancels an event by time and priority: scheduler.cancel(Event(time, priority, ...)). 2. Always cancel chronologically last (first) of equals events. This requires popp-ing and push-ing all events. Too slooooow. 3. Add an ordered number to the event. This will slow down all too. 4. Mixed strategy. First use identity search, then equality search, and only if found several equals events fallback to slow variant. This is too complicated. It will work as expected in most normal cases, but in rare cases... This behavior would hard to document and understand. If you have better idea, patch is welcome. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 21:46:15 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 21 Oct 2013 19:46:15 +0000 Subject: [issue19270] Document that sched.cancel() doesn't distinguish equal events and can break order In-Reply-To: <1382384583.15.0.0282469575897.issue19270@psf.upfronthosting.co.za> Message-ID: <1382384743.2487.29.camel@fsol> Antoine Pitrou added the comment: > 4. Mixed strategy. First use identity search, then equality search, > and only if found several equals events fallback to slow variant. This > is too complicated. It will work as expected in most normal cases, but > in rare cases... This behavior would hard to document and understand. You're right. So perhaps this should simply be documented as is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 21:49:05 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 21 Oct 2013 19:49:05 +0000 Subject: [issue19270] Document that sched.cancel() doesn't distinguish equal events and can break order In-Reply-To: <1381913252.24.0.629122693277.issue19270@psf.upfronthosting.co.za> Message-ID: <1382384945.38.0.954879644743.issue19270@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > This module has been around for a long time and no users have reported > any issues with respect to event ordering. The logic is essentially > the same as is used in popular event loops like Tornado. > Please don't just make-up a new invariant for this module. +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 21:58:25 2013 From: report at bugs.python.org (Brodie Rao) Date: Mon, 21 Oct 2013 19:58:25 +0000 Subject: [issue19338] multiprocessing: sys.exit() from a child with a non-int exit code exits with 0 Message-ID: <1382385505.82.0.388398051493.issue19338@psf.upfronthosting.co.za> New submission from Brodie Rao: Normally: $ python >>> import sys >>> sys.exit('foo') foo $ echo $? 1 However, with multiprocessing: >>> import sys >>> from multiprocessing import Process >>> p = Process(target=lambda: sys.exit('foo')) >>> p.start() >>> foo >>> p.join() >>> p.is_alive() False >>> p.exitcode 0 p.exitcode should be 1, not 0. sys.exit() with a non-int object should always exit with 1. This regression was introduced in da5b370f41a1 on the 2.7 branch (making it into the 2.7.4 release) and 4346cba353b4 on the 3.2 branch (making it into the 3.2.5 release). Less important things to note: - multiprocessing calls str() on the object passed to sys.exit() to print it out. The interpreter doesn't do that with the argument is a unicode object (it tries to let sys.stderr encode it and print it). - The interpreter also ignores all exceptions in this process. I'll attach patches for the 2.7 and 3.3 branches that just addresses the exit code problem. ---------- components: Library (Lib) messages: 200833 nosy: brodie priority: normal severity: normal status: open title: multiprocessing: sys.exit() from a child with a non-int exit code exits with 0 type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 22:01:15 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 20:01:15 +0000 Subject: [issue19339] telnetlib: time.monotonic() should be used instead of time.time() for timeout Message-ID: <1382385675.07.0.888544622289.issue19339@psf.upfronthosting.co.za> New submission from STINNER Victor: While reading the patch attached to #19170, I saw that telnetlib uses time.time() to compute a timeout. This is wrong: the system clock may jump forward or backward (ex: summer/winter time, NTP adjust, manual clock change by the administrator, etc.). time.monotonic() should be used instead. I will work on a patch when #19170 will be fixed (just to avoid conflicts). ---------- messages: 200834 nosy: haypo, neologix priority: normal severity: normal status: open title: telnetlib: time.monotonic() should be used instead of time.time() for timeout versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 22:01:36 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 20:01:36 +0000 Subject: [issue19170] telnetlib: use selectors In-Reply-To: <1380978969.74.0.714959132131.issue19170@psf.upfronthosting.co.za> Message-ID: <1382385696.37.0.845123500516.issue19170@psf.upfronthosting.co.za> STINNER Victor added the comment: FYI I just create #19339: "telnetlib: time.monotonic() should be used instead of time.time() for timeout". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 22:04:01 2013 From: report at bugs.python.org (Brodie Rao) Date: Mon, 21 Oct 2013 20:04:01 +0000 Subject: [issue19338] multiprocessing: sys.exit() from a child with a non-int exit code exits with 0 In-Reply-To: <1382385505.82.0.388398051493.issue19338@psf.upfronthosting.co.za> Message-ID: <1382385841.03.0.484755614279.issue19338@psf.upfronthosting.co.za> Brodie Rao added the comment: Here's the patch for 3.3. ---------- keywords: +patch Added file: http://bugs.python.org/file32286/multiprocessing-sys-exit-3.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 22:04:23 2013 From: report at bugs.python.org (Brodie Rao) Date: Mon, 21 Oct 2013 20:04:23 +0000 Subject: [issue19338] multiprocessing: sys.exit() from a child with a non-int exit code exits with 0 In-Reply-To: <1382385505.82.0.388398051493.issue19338@psf.upfronthosting.co.za> Message-ID: <1382385863.08.0.584195204154.issue19338@psf.upfronthosting.co.za> Changes by Brodie Rao : Added file: http://bugs.python.org/file32287/multiprocessing-sys-exit-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 22:06:22 2013 From: report at bugs.python.org (Brodie Rao) Date: Mon, 21 Oct 2013 20:06:22 +0000 Subject: [issue19338] multiprocessing: sys.exit() from a child with a non-int exit code exits with 0 In-Reply-To: <1382385505.82.0.388398051493.issue19338@psf.upfronthosting.co.za> Message-ID: <1382385982.24.0.676742016229.issue19338@psf.upfronthosting.co.za> Changes by Brodie Rao : ---------- nosy: +jnoller, sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 22:27:33 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 21 Oct 2013 20:27:33 +0000 Subject: [issue10977] Concrete object C API considered harmful to subclasses of builtin types In-Reply-To: <1382369882.06.0.385738542601.issue10977@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: I haven't fully thought this one through, but perhaps we could: - deprecate calling the current concrete APIs with subclasses (since doing so may break subclass invariants) - add "PyBaseDict_*" APIs (etc) that subclass implementations can call. - offer a compatibility header for earlier versions that #defines the new APIs back to the old ones This would be 3.5 PEP territory, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 22:28:28 2013 From: report at bugs.python.org (Matteo Cafasso) Date: Mon, 21 Oct 2013 20:28:28 +0000 Subject: [issue19185] Allow multiprocessing Pool initializer to return values In-Reply-To: <1381348764.75.0.661601432175.issue19185@psf.upfronthosting.co.za> Message-ID: <52658E47.8050505@gmail.com> Matteo Cafasso added the comment: On 09/10/13 22:59, Richard Oudkerk wrote: > Yes. But my point was that somebody might have used such a function as the initializer argument. The proposed change would break a program which does > > with Pool(initializer=os.nice, initargs=(incr,)) as p: > ... Indeed in cases like that the backward compatibility would break if the passed function is accepting a fixed amount of positional arguments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 22:36:30 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 21 Oct 2013 20:36:30 +0000 Subject: [issue19335] IDLE over-enthusiastically verifies 'nonlocal' usage In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1382387790.29.0.78992855571.issue19335@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This started as a python-list thread. On that thread, Peter Otten verified the behavior on Linux, so it is not specific to the Windows pythonw executable. He also verified on 3.2 (which gets security fixes only) and 3.4. I just checked 2.7. On that thread, I verified a) the three lines submitted by themselves as a file cause the same error message, as they should ("must refer to pre-existing bindings in an enclosing scope ") and b) Python in interactive mode syntax-checks lines as entered, even for compound statements. I just verified that Idle behaves the same when started with -n (no subprocess): C:\Programs\Python33>python -m idlelib.idle -n Summary: Idle acts as if it syntax-checks the cumulative input instead of just the line entered. (But I have not looked as the code.) The three lines constitute a test if they can be run from a test file. ---------- nosy: +terry.reedy stage: -> needs patch versions: +Python 2.7, Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 22:39:53 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 21 Oct 2013 20:39:53 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1382387993.7.0.875601936607.issue19331@psf.upfronthosting.co.za> Nick Coghlan added the comment: Lots of builtins, collections and itertools use lowercase names as well, as do some older stdlib types (array, mmap, socket). The only clear dividing lines I can really discern are that ABCs *must* start with a capital, as should classes paired with a separate factory function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 22:41:05 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 21 Oct 2013 20:41:05 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1382388065.44.0.766645289492.issue19331@psf.upfronthosting.co.za> Nick Coghlan added the comment: That said, I quite like Paul's suggestions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 22:41:30 2013 From: report at bugs.python.org (Eric Snow) Date: Mon, 21 Oct 2013 20:41:30 +0000 Subject: [issue10977] Concrete object C API considered harmful to subclasses of builtin types In-Reply-To: <1295653779.62.0.836506069174.issue10977@psf.upfronthosting.co.za> Message-ID: <1382388090.58.0.151692646437.issue10977@psf.upfronthosting.co.za> Eric Snow added the comment: I had roughly the same idea, Nick, though my approach to address backward compatibility was more complicated. Definitely worth at least looking into for 3.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 22:47:56 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 21 Oct 2013 20:47:56 +0000 Subject: [issue16500] Add an 'atfork' module In-Reply-To: <1382381412.71.0.394561229043.issue16500@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Well it is customary for callback-based APIs to hold strong references to their callbacks. If a library wants to avoid leaks, it should register a single callback which will then walk the current "live" resources and protect them. I guess that the custom usage makes sense. I'd just like a note in the doc, if possible ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 22:48:24 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 21 Oct 2013 20:48:24 +0000 Subject: [issue19263] enum.py : Enum.__new__(). __objclass__ In-Reply-To: <1381790821.01.0.959200663601.issue19263@psf.upfronthosting.co.za> Message-ID: <1382388504.7.0.669889563612.issue19263@psf.upfronthosting.co.za> Ethan Furman added the comment: Well, with all the changes to inspect to properly locate attributes in the class and metaclass mro, __objclass__ is necessary to get the home class correct (without it inspect thinks it lives in the EnumMeta metaclass). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 22:51:51 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 21 Oct 2013 20:51:51 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382388065.44.0.766645289492.issue19331@psf.upfronthosting.co.za> Message-ID: <20131021165147.12e51ea5@anarchist> Barry A. Warsaw added the comment: On Oct 21, 2013, at 08:41 PM, Nick Coghlan wrote: >That said, I quite like Paul's suggestions. As do I. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 23:09:57 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 21 Oct 2013 21:09:57 +0000 Subject: [issue19170] telnetlib: use selectors In-Reply-To: <1380978969.74.0.714959132131.issue19170@psf.upfronthosting.co.za> Message-ID: <1382389797.43.0.819767872029.issue19170@psf.upfronthosting.co.za> Changes by Charles-Fran?ois Natali : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 23:10:22 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 21 Oct 2013 21:10:22 +0000 Subject: [issue19339] telnetlib: time.monotonic() should be used instead of time.time() for timeout In-Reply-To: <1382385675.07.0.888544622289.issue19339@psf.upfronthosting.co.za> Message-ID: <1382389822.56.0.918639470446.issue19339@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: You can go ahead! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 23:15:37 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 21 Oct 2013 21:15:37 +0000 Subject: [issue17400] ipaddress should make it easy to identify rfc6598 addresses In-Reply-To: <1363052217.02.0.113831391012.issue17400@psf.upfronthosting.co.za> Message-ID: <3d3Vxh4QLzz7LlC@mail.python.org> Roundup Robot added the comment: New changeset 2e8dd5c240b7 by Peter Moody in branch 'default': #17400; ipaddress should make it easy to identify rfc6598 addresses http://hg.python.org/cpython/rev/2e8dd5c240b7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 23:16:44 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Oct 2013 21:16:44 +0000 Subject: [issue19339] telnetlib: time.monotonic() should be used instead of time.time() for timeout In-Reply-To: <1382385675.07.0.888544622289.issue19339@psf.upfronthosting.co.za> Message-ID: <1382390204.07.0.0480692501661.issue19339@psf.upfronthosting.co.za> STINNER Victor added the comment: Patch for telnetlib of Python 3.3. ---------- keywords: +patch Added file: http://bugs.python.org/file32288/telnetlib_monotonic.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 23:22:36 2013 From: report at bugs.python.org (Sunny K) Date: Mon, 21 Oct 2013 21:22:36 +0000 Subject: [issue19340] test_sysconfig.test_srcdir fails when sys.base_prefix="/" Message-ID: <1382390556.96.0.439992623328.issue19340@psf.upfronthosting.co.za> New submission from Sunny K: While working on issue7757, i noticed that test_srcdir fails when python is built with prefix "". This is because in Lib/sysconfig.py, _safe_realpath() is called on srcdir which normalises //lib to /lib. In the test case, it is compared directly to the output of get_makefile_filename(). ====================================================================== FAIL: test_srcdir (__main__.TestSysConfig) ---------------------------------------------------------------------- Traceback (most recent call last): File "/lib/python3.4/test/test_sysconfig.py", line 356, in test_srcdir srcdir) AssertionError: '//lib/python3.4/config-3.4dm' != '/lib/python3.4/config-3.4dm' - //lib/python3.4/config-3.4dm ? - + /lib/python3.4/config-3.4dm ~/cpython$ python3.4 Python 3.4.0a3+ (default:dad1debba93c+, Oct 22 2013, 02:32:50) [GCC 4.4.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.prefix '/' >>> sys.base_prefix '/' >>> ---------- components: Tests messages: 200849 nosy: sunfinite priority: normal severity: normal status: open title: test_sysconfig.test_srcdir fails when sys.base_prefix="/" type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 23:24:35 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 21 Oct 2013 21:24:35 +0000 Subject: [issue19334] test_asyncio hanging for 1 hour (non-AIX version) In-Reply-To: <1382366717.5.0.644107908192.issue19334@psf.upfronthosting.co.za> Message-ID: <1382390675.43.0.396515120042.issue19334@psf.upfronthosting.co.za> Guido van Rossum added the comment: I haven't seen any such hangs. I've seen one test_asyncio failure on FreeBSD 6.4 3.x, which is the following weirdness. http://buildbot.python.org/all/builders/x86%20FreeBSD%206.4%203.x/builds/4116/steps/test/logs/stdio test test_asyncio crashed -- Traceback (most recent call last): File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/regrtest.py", line 1276, in runtest_inner test_runner() File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_asyncio/__init__.py", line 31, in test_main run_unittest(suite()) File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_asyncio/__init__.py", line 21, in suite __import__(mod_name) File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_asyncio/test_base_events.py", line 10, in from asyncio import base_events File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/asyncio/__init__.py", line 13, in from .futures import * File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/asyncio/futures.py", line 12, in from . import events ImportError: cannot import name 'events' Sadly there's no more info about this -- does this mean events.py is corrupt? Or is one of the imports in events.py breaking? Then why doesn't it show the failing line? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 21 23:45:00 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 21 Oct 2013 21:45:00 +0000 Subject: [issue19294] test_asyncio fails intermittently on OS X 10.4 In-Reply-To: <1382172404.1.0.731084144387.issue19294@psf.upfronthosting.co.za> Message-ID: <1382391900.8.0.815439404444.issue19294@psf.upfronthosting.co.za> Guido van Rossum added the comment: I find it pretty suspicious that when this fails it is always connecting the stdin pipe. That code is also suspect in the AIX failure (issue 19293), although for a different reason. The only theory I have at this point is that perhaps there's a platform bug on OS X 10.4 and before where the pipe is considered invalid if the process already exits? But the subprocess shouldn't be exiting, so this theory is no good, unless there's also a bug that causes the fork or exec to fail. :-( Maybe this will go away if we replace the stdin pipe with a socket pair, as we are proposing for issue 19293, without ever understanding why. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 00:33:05 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Oct 2013 22:33:05 +0000 Subject: [issue17400] ipaddress should make it easy to identify rfc6598 addresses In-Reply-To: <1363052217.02.0.113831391012.issue17400@psf.upfronthosting.co.za> Message-ID: <1382394785.61.0.961306424975.issue17400@psf.upfronthosting.co.za> Christian Heimes added the comment: About 2e8dd5c240b7 It might be a good idea to cache the two lists in a class or module variable in order to speed things up. It might also be a good idea to move the most common networks like 192.168.0.0/16 to the top of the list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 01:17:24 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 21 Oct 2013 23:17:24 +0000 Subject: [issue17400] ipaddress should make it easy to identify rfc6598 addresses In-Reply-To: <1363052217.02.0.113831391012.issue17400@psf.upfronthosting.co.za> Message-ID: <3d3Ydq24lLz7Lkt@mail.python.org> Roundup Robot added the comment: New changeset 07a5610bae9d by Peter Moody in branch 'default': #17400; NEWS and ipaddress.rst change http://hg.python.org/cpython/rev/07a5610bae9d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 01:19:34 2013 From: report at bugs.python.org (pmoody) Date: Mon, 21 Oct 2013 23:19:34 +0000 Subject: [issue17400] ipaddress should make it easy to identify rfc6598 addresses In-Reply-To: <1363052217.02.0.113831391012.issue17400@psf.upfronthosting.co.za> Message-ID: <1382397574.28.0.401689267225.issue17400@psf.upfronthosting.co.za> pmoody added the comment: I have a change that needs to be submitted for the parser then I'll come back to the caching. The pedant in me would like like to keep the addresses ordered because that makes it clear where to add new networks as iana changes classifications, but it may just make more sense to put rfc1918 at the top. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 02:27:53 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 22 Oct 2013 00:27:53 +0000 Subject: [issue19335] IDLE over-enthusiastically verifies 'nonlocal' usage In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1382401673.19.0.338153673835.issue19335@psf.upfronthosting.co.za> Terry J. Reedy added the comment: A test will be a challenge since the three lines have to be run as if entered interactively. This may require new code to inject lines into the interactive processing stream, or a least a re-factoring of existing code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 02:28:31 2013 From: report at bugs.python.org (Christian Tismer) Date: Tue, 22 Oct 2013 00:28:31 +0000 Subject: [issue19274] make zipfile.PyZipFile more usable In-Reply-To: <1381959832.11.0.559988604291.issue19274@psf.upfronthosting.co.za> Message-ID: <1382401711.92.0.904619730219.issue19274@psf.upfronthosting.co.za> Christian Tismer added the comment: @georg: > While reviewing: is it intended that the filter is only called for directories and not for individual files? Not really. I will add this, later. Just wanted to see if this makes sense and it's worth the effort to extend it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 02:31:35 2013 From: report at bugs.python.org (Ethan Furman) Date: Tue, 22 Oct 2013 00:31:35 +0000 Subject: [issue19281] add __objclass__ to the docs In-Reply-To: <1382082111.84.0.378259232568.issue19281@psf.upfronthosting.co.za> Message-ID: <1382401895.14.0.123334995805.issue19281@psf.upfronthosting.co.za> Ethan Furman added the comment: The proposed text is something along the lines of: __objclass__: 1) Indicates this callable requires an instance of the given type (or a subclass) as its first positional argument; e.g. CPython sets this for unbound methods that are implemented in C rather than Python. 2) The class where this object was defined. So, any ideas for improvement, and, more importantly, where in the docs should this go? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 03:51:34 2013 From: report at bugs.python.org (Paul Hawkins) Date: Tue, 22 Oct 2013 01:51:34 +0000 Subject: [issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals In-Reply-To: <1279881989.28.0.725806934086.issue9338@psf.upfronthosting.co.za> Message-ID: <1382406694.52.0.701510040378.issue9338@psf.upfronthosting.co.za> Paul Hawkins added the comment: I ran into this bug the first time I needed nargs + in a tool. I found of course that if the option with the nargs is followed by another option before the positional arguments it will work as expected. But then the help would have to point this out, and it still could be used incorrectly (so then I get a mail about a bug in my tool.) ;-)> My workaround was to use action=append instead of nargs, then user would just have to give the option for each nargs desired. Since my use would be short this was OK. But the usage message does not reflect the multiple use nature of this option But what I expected to find in the doc was a way to specify the use of a separator char between the nargs option arguments. For example specify that ',' is the separator arg (currently a space is the separator.) So if option is -foo the cli could be: myprog.py -foo bar1,bar2,bar3 pos1 pos2 (Of course I could just have the tool take a comma delimited single argument and parse it in the tool's logic, but again then a custom usage message would be needed.) Has this solution been considered? ---------- nosy: +phawkins _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 04:13:11 2013 From: report at bugs.python.org (Christian Tismer) Date: Tue, 22 Oct 2013 02:13:11 +0000 Subject: [issue19274] make zipfile.PyZipFile more usable In-Reply-To: <1381959832.11.0.559988604291.issue19274@psf.upfronthosting.co.za> Message-ID: <1382407991.78.0.208249893706.issue19274@psf.upfronthosting.co.za> Christian Tismer added the comment: added that with tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 04:43:51 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 22 Oct 2013 02:43:51 +0000 Subject: [issue19337] MMAP: Bus error (core dump) under heavy read/write In-Reply-To: <1382379885.04.0.64581281764.issue19337@psf.upfronthosting.co.za> Message-ID: <1382409831.37.0.634220993978.issue19337@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 04:44:57 2013 From: report at bugs.python.org (David Edelsohn) Date: Tue, 22 Oct 2013 02:44:57 +0000 Subject: [issue19334] test_asyncio hanging for 1 hour (non-AIX version) In-Reply-To: <1382366717.5.0.644107908192.issue19334@psf.upfronthosting.co.za> Message-ID: <1382409897.56.0.320018195797.issue19334@psf.upfronthosting.co.za> Changes by David Edelsohn : ---------- nosy: +David.Edelsohn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 04:47:20 2013 From: report at bugs.python.org (David Edelsohn) Date: Tue, 22 Oct 2013 02:47:20 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382410040.5.0.589204100507.issue19293@psf.upfronthosting.co.za> David Edelsohn added the comment: The testsuite is hanging in test_asyncio again and test_subprocess_close_client_stream needs to be skipped. ---------- Added file: http://bugs.python.org/file32289/issue19293.patch2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 04:48:00 2013 From: report at bugs.python.org (David Edelsohn) Date: Tue, 22 Oct 2013 02:48:00 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382410080.22.0.274702751773.issue19293@psf.upfronthosting.co.za> David Edelsohn added the comment: Other than the skipped tests, test_asyncio now passes on AIX except for: FAIL: test_write_pipe (test.test_asyncio.test_events.PollEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/dje/src/cpython/Lib/test/test_asyncio/test_events.py", line 875, in test_write_pipe self.assertEqual(b'2345', data) AssertionError: b'2345' != b'' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 04:55:49 2013 From: report at bugs.python.org (paul j3) Date: Tue, 22 Oct 2013 02:55:49 +0000 Subject: [issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals In-Reply-To: <1279881989.28.0.725806934086.issue9338@psf.upfronthosting.co.za> Message-ID: <1382410549.23.0.836105232344.issue9338@psf.upfronthosting.co.za> paul j3 added the comment: parse_args() would see ['-foo', 'bar1,bar2,bar3', 'pos1', 'pos2']. The splitting on space is done by the shell. So having your own code split 'bar1,bar2,bar3' is simplest. But that would be messed up if the user entered 'bar1, bar2, bar3...'. You could also ask the user to use quotes - "bar1, bar2, bar3". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 04:56:20 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 22 Oct 2013 02:56:20 +0000 Subject: [issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris In-Reply-To: <1382283098.83.0.173984225129.issue19317@psf.upfronthosting.co.za> Message-ID: <1382410580.97.0.304982794156.issue19317@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Patch looks good. Any other reviewer? Maciej, do you know about any generally available library in Solaris with SONAME and RPATH?. A test would be nice. Would this patch solve the "locate the C library" using ctypes, in Solaris? :-). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 04:56:41 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 22 Oct 2013 02:56:41 +0000 Subject: [issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris In-Reply-To: <1382283098.83.0.173984225129.issue19317@psf.upfronthosting.co.za> Message-ID: <1382410601.15.0.651302492312.issue19317@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- keywords: +needs review -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 05:01:11 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 22 Oct 2013 03:01:11 +0000 Subject: [issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris In-Reply-To: <1382283098.83.0.173984225129.issue19317@psf.upfronthosting.co.za> Message-ID: <1382410871.08.0.797414955185.issue19317@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: "/usr/bin/chkpass.so" has both SONAME and RPATH. Would you mind, anyway, to elaborate a bit your use case, including some example?. Thanks!. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 05:04:18 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 22 Oct 2013 03:04:18 +0000 Subject: [issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris In-Reply-To: <1382283098.83.0.173984225129.issue19317@psf.upfronthosting.co.za> Message-ID: <1382411058.78.0.235135179175.issue19317@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: I mean "/usr/lib/chkpass.so". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 05:19:10 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 22 Oct 2013 03:19:10 +0000 Subject: [issue19335] codeop misclassifies incomple code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1382411950.95.0.346182960493.issue19335@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The bug is not in Idle. Its interpreter is a subclass of code.InteractiveInterpreter (II) and that (and its subclass InteractiveConsole) have the bug. C:\Programs\Python33>python -m code Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:06:53) [MSC v.1600 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> def a(): ... def b(): ... nonlocal c File "", line None SyntaxError: no binding for nonlocal 'c' found II.runsource compiles cumulative source with codeop.CommandCompile, which wraps codeop._maybe_compile. That returns None (source incomplete), raises (source complete but invalid), or return code (source complete and valid) to be executed. It mis-classifies the code in question. >>> import codeop as op >>> src = '''def a(): def b(): nonlocal c ''' >>> op.CommandCompiler()(src) Traceback (most recent call last): ... SyntaxError: no binding for nonlocal 'c' found PyShell.ModifiedInterpreter.runsource wraps II.runsource. return InteractiveInterpreter.runsource(self, source, filename) Someone needs to compare _maybe_compile to the equivalent C code used by the real interpreter. ---------- components: +Library (Lib) -IDLE title: IDLE over-enthusiastically verifies 'nonlocal' usage -> codeop misclassifies incomple code with 'nonlocal' _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 05:31:45 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 22 Oct 2013 03:31:45 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382412705.74.0.788374863803.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks; I've applied and pushed your fix for the hang. I think it's time to commit the sockpair.diff change; the test_write_pipe() failure looks related -- as you recall the problem doesn't really cause a hang, it causes a premature closing of a write pipe, the hangs were just due to the test structure (unfortunate, really). I'll let you know when. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 05:37:23 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 22 Oct 2013 03:37:23 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <3d3gQB4zFtz7Lkm@mail.python.org> Roundup Robot added the comment: New changeset 2a0bda8d283d by Guido van Rossum in branch 'default': Switch subprocess stdin to a socketpair, attempting to fix issue #19293 (AIX hang). http://hg.python.org/cpython/rev/2a0bda8d283d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 05:38:53 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 22 Oct 2013 03:38:53 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382413133.04.0.019927648826.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: Let's see how this fares. If it passes on the AIX buildbot, maybe see which of the tests we skipped on AIX can be re-enabled again? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 05:40:15 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 22 Oct 2013 03:40:15 +0000 Subject: [issue19294] test_asyncio fails intermittently on OS X 10.4 In-Reply-To: <1382172404.1.0.731084144387.issue19294@psf.upfronthosting.co.za> Message-ID: <1382413215.78.0.838636568375.issue19294@psf.upfronthosting.co.za> Guido van Rossum added the comment: I committed a patch that should hopefully fix issue 19293 -- maybe it will also reduce the flakiness of test_subprocess_shell() on OS X? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 05:46:03 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 22 Oct 2013 03:46:03 +0000 Subject: [issue19263] enum.py : Enum.__new__(). __objclass__ In-Reply-To: <1381790821.01.0.959200663601.issue19263@psf.upfronthosting.co.za> Message-ID: <3d3gcC10Tcz7LmN@mail.python.org> Roundup Robot added the comment: New changeset b9019b942435 by Ethan Furman in branch 'default': Close #19263: add tests to ensure __objclass__ correctly set. http://hg.python.org/cpython/rev/b9019b942435 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 05:55:12 2013 From: report at bugs.python.org (David Edelsohn) Date: Tue, 22 Oct 2013 03:55:12 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382414112.44.0.971017393131.issue19293@psf.upfronthosting.co.za> David Edelsohn added the comment: With the latest changeset applied to default, the test_subprocess tests no longer hang, but test_write_pipe_disconnect_on_close now hangs. The attached patch changes test_event.py to not skip test_subprocess_* but now skips test_write_pipe_disconnect_on_close. ---------- Added file: http://bugs.python.org/file32290/issue19293.patch3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 05:58:42 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 22 Oct 2013 03:58:42 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382414322.81.0.968632563647.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: I think I know what that is -- the test should use a socketpair now. I'll see how quickly I can give you a patch for that. The other one is now committed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 06:09:16 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 22 Oct 2013 04:09:16 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382414956.79.0.698153332162.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: David, try this fix (aixfix.diff). ---------- Added file: http://bugs.python.org/file32291/aixfix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 06:18:56 2013 From: report at bugs.python.org (David Edelsohn) Date: Tue, 22 Oct 2013 04:18:56 +0000 Subject: [issue18235] _sysconfigdata.py wrong on AIX installations In-Reply-To: <1371429201.94.0.372851990361.issue18235@psf.upfronthosting.co.za> Message-ID: <1382415536.53.0.0953638217451.issue18235@psf.upfronthosting.co.za> David Edelsohn added the comment: I think I see the source of the confusion. test_distutils fails because it runs in the build tree and without files installed. The test does not use the installed version of sysconfig, so it looks for ./Modules/ld_so_aix, which fails. The kludge from 2000 was trying to make the test work. But after installation, the kludge defines variables incorrectly to build Modules after Python is installed. Because the distutils test is testing in tree and not the installed version of Python, it is not testing what the end user will experience. I am unsure about the best way to make the test pass. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 06:23:02 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 22 Oct 2013 04:23:02 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382415782.47.0.566222317539.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: Corrected aixfix.diff (the other one was for the Tulip repo). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 06:23:01 2013 From: report at bugs.python.org (David Edelsohn) Date: Tue, 22 Oct 2013 04:23:01 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382415781.92.0.854195150781.issue19293@psf.upfronthosting.co.za> David Edelsohn added the comment: test_asyncio no longer hangs on AIX with the aixfix.diff patch. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 06:23:40 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 22 Oct 2013 04:23:40 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382415820.14.0.964753420212.issue19293@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- Removed message: http://bugs.python.org/msg200877 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 06:24:21 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 22 Oct 2013 04:24:21 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382415861.45.0.942728260809.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: Corrected aixfix.diff for CPython repo (the previous one was for the Tulip repo). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 06:25:47 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 22 Oct 2013 04:25:47 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382415947.45.0.392808712737.issue19293@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- Removed message: http://bugs.python.org/msg200878 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 06:27:01 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 22 Oct 2013 04:27:01 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382416021.21.0.568758578636.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: Third try's a charm. Corrected aix fix. ---------- Added file: http://bugs.python.org/file32292/aixfix2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 06:27:17 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 22 Oct 2013 04:27:17 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382416037.96.0.957448201051.issue19293@psf.upfronthosting.co.za> Changes by Guido van Rossum : Removed file: http://bugs.python.org/file32291/aixfix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 06:29:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 22 Oct 2013 04:29:19 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <3d3hZ66C2Pz7LkM@mail.python.org> Roundup Robot added the comment: New changeset c2e018c54689 by Guido van Rossum in branch 'default': Fix asyncio issue #19293 (hangs on AIX). http://hg.python.org/cpython/rev/c2e018c54689 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 06:30:21 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 22 Oct 2013 04:30:21 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382416221.45.0.681068920537.issue19293@psf.upfronthosting.co.za> Guido van Rossum added the comment: "And there was much rejoicing." ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 06:31:55 2013 From: report at bugs.python.org (David Edelsohn) Date: Tue, 22 Oct 2013 04:31:55 +0000 Subject: [issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive) In-Reply-To: <1382156434.98.0.895187743681.issue19293@psf.upfronthosting.co.za> Message-ID: <1382416314.99.0.685529890915.issue19293@psf.upfronthosting.co.za> David Edelsohn added the comment: You have to try harder to break it again. aixfix2.diff still works. ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 06:46:27 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 22 Oct 2013 04:46:27 +0000 Subject: [issue19294] test_asyncio fails intermittently on OS X 10.4 In-Reply-To: <1382172404.1.0.731084144387.issue19294@psf.upfronthosting.co.za> Message-ID: <1382417187.98.0.909890548394.issue19294@psf.upfronthosting.co.za> Ned Deily added the comment: Success! (I think.) On my elderly 10.4 machine, as of f33cc4a175a4: tag: tip user: Guido van Rossum date: Mon Oct 21 20:57:25 2013 -0700 files: Lib/test/test_asyncio/test_events.py description: Unsilence several asyncio AIX tests that no longer hang, and silence a new hang. test_asyncio now runs successfully repeatedly. If I go back 4 mods on the default branch (to 4f1121ae1cb5), before your last three pushes this evening, test_asyncio fails with the "Bad file descriptor" every time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 08:07:52 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 22 Oct 2013 06:07:52 +0000 Subject: [issue18603] PyOS_mystricmp unused and no longer available In-Reply-To: <1375228725.23.0.641374823001.issue18603@psf.upfronthosting.co.za> Message-ID: <1382422072.63.0.109701994432.issue18603@psf.upfronthosting.co.za> Georg Brandl added the comment: Well, if the functions are part of the stable ABI (which it seems they are, as they don't fall under some exclusion defined by PEP 384) they shouldn't be removed if we take PEP 384 seriously. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 09:13:33 2013 From: report at bugs.python.org (Esa Peuha) Date: Tue, 22 Oct 2013 07:13:33 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1382426013.0.0.818127367932.issue19335@psf.upfronthosting.co.za> Esa Peuha added the comment: > Someone needs to compare _maybe_compile to the equivalent C code used by the real interpreter. Well, _maybe_compile() just calls the built-in function compile() internally, so I'm not sure what sort of comparison you want... ---------- nosy: +Esa.Peuha title: codeop misclassifies incomple code with 'nonlocal' -> codeop misclassifies incomplete code with 'nonlocal' _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 09:27:59 2013 From: report at bugs.python.org (David Planella) Date: Tue, 22 Oct 2013 07:27:59 +0000 Subject: [issue19341] locale.getdefaultencoding() returns wrong locale and encoding for ca_ES@valencia Message-ID: <1382426879.55.0.340515652072.issue19341@psf.upfronthosting.co.za> New submission from David Planella: It seems getdefaultlocale does not return the correct encoding when the locale is set to ca_ES at valencia: >>> import locale >>> locale.setlocale(locale.LC_ALL, "") 'LC_CTYPE=ca_ES.UTF-8 at valencia;LC_NUMERIC=ca_ES.UTF-8;LC_TIME=ca_ES.UTF-8;LC_COLLATE=ca_ES.UTF-8 at valencia;LC_MONETARY=ca_ES.UTF-8;LC_MESSAGES=ca_ES.UTF-8 at valencia;LC_PAPER=ca_ES.UTF-8;LC_NAME=ca_ES.UTF-8;LC_ADDRESS=ca_ES.UTF-8;LC_TELEPHONE=ca_ES.UTF-8;LC_MEASUREMENT=ca_ES.UTF-8;LC_IDENTIFICATION=ca_ES.UTF-8' >>> locale.getdefaultlocale() ('ca_ES', 'utf_8_valencia') Instead of 'utf_8_valencia', here I'd expect 'UTF-8' to be returned. The returned locale is also wrong: it should be ca_ES at valencia. Looking quickly at the locale module's source code, it seems that the following item should be added to the locale_alias dict? 'ca_es. at valencia': 'ca_ES at valencia.UTF-8', ---------- components: Library (Lib) messages: 200886 nosy: dpm priority: normal severity: normal status: open title: locale.getdefaultencoding() returns wrong locale and encoding for ca_ES at valencia type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 09:37:50 2013 From: report at bugs.python.org (Sunny K) Date: Tue, 22 Oct 2013 07:37:50 +0000 Subject: [issue7757] sys.path is incorrect when prefix is "" In-Reply-To: <1264178776.01.0.552667161926.issue7757@psf.upfronthosting.co.za> Message-ID: <1382427470.41.0.0515002979261.issue7757@psf.upfronthosting.co.za> Sunny K added the comment: I took a shot at this. Build is successful and imports happen. Tests are ok except test_sysconfig, and that is because of sys.prefix being set to '/'. I've raised issue19340 for that. About the patch, i'm not sure how to completely test for false positives(joinpath now returns if is null). I could not think of any issues from the current calls to joinpath. ---------- keywords: +patch nosy: +sunfinite Added file: http://bugs.python.org/file32293/getpath.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 09:39:38 2013 From: report at bugs.python.org (Mark Shannon) Date: Tue, 22 Oct 2013 07:39:38 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1382427578.34.0.949566145644.issue19335@psf.upfronthosting.co.za> Changes by Mark Shannon : ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 09:52:15 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 22 Oct 2013 07:52:15 +0000 Subject: [issue18603] PyOS_mystricmp unused and no longer available In-Reply-To: <1375228725.23.0.641374823001.issue18603@psf.upfronthosting.co.za> Message-ID: <1382428334.97.0.682411790671.issue18603@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The patch looks good to me. The stable ABI was originally intended for Windows only, where the functions are guaranteed to be included in python3.dll (as the .def file references them); they are included in python3X.dll as link.exe doesn't do the same object file omission that /bin/ld does. But I agree in principle that the proposed solution is better (and it is the only approach that works with /bin/ld). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 09:52:39 2013 From: report at bugs.python.org (=?utf-8?q?Maciej_Blizi=C5=84ski?=) Date: Tue, 22 Oct 2013 07:52:39 +0000 Subject: [issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris In-Reply-To: <1382283098.83.0.173984225129.issue19317@psf.upfronthosting.co.za> Message-ID: <1382428359.83.0.283963752576.issue19317@psf.upfronthosting.co.za> Maciej Blizi?ski added the comment: The specific case that breaks for me is this: OpeCSW Python package includes: /opt/csw/bin/python2.6 (also 2.7, 3.3, etc) /opt/csw/lib/libpython2.6.so.1.0 (other files) On the operating system there is only: /usr/lib/libpython2.4.so.1.0 Let's say there's libmagic installed in /opt/csw/lib, and there's no libmagic in /usr/lib. Let's suppose you run this: ctypes.cdll.LoadLibrary('libmagic.so.1') The OpenCSW Python will successfully load libmagic.so.1. But without the patch, find_library will not find libmagic.so.1, it will fail to translate 'magic' to 'libmagic.so.1', even though the libmagic.so symlink is present in /opt/csw/lib. For the patch, the RPATH of the library itself doesn't matter, the important one is the RPATH of the Python executable itself, which influences what _ctypes.dlopen() does when looking for a library. I could write a test by providing providing a sample /usr/ccs/bin/dump output and mocking out some libraries. Would that be good? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 10:27:11 2013 From: report at bugs.python.org (koobs) Date: Tue, 22 Oct 2013 08:27:11 +0000 Subject: [issue19334] test_asyncio hanging for 1 hour (non-AIX version) In-Reply-To: <1382366717.5.0.644107908192.issue19334@psf.upfronthosting.co.za> Message-ID: <1382430431.11.0.987067869062.issue19334@psf.upfronthosting.co.za> koobs added the comment: The original report and build logs were attached to the original issue covering the import of asyncio: #19262 Also attaching here. ---------- nosy: +koobs Added file: http://bugs.python.org/file32294/koobs-freebsd9-py3x-build180.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 10:27:16 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 22 Oct 2013 08:27:16 +0000 Subject: [issue18603] PyOS_mystricmp unused and no longer available In-Reply-To: <1375228725.23.0.641374823001.issue18603@psf.upfronthosting.co.za> Message-ID: <3d3nrH0jGnz7LjX@mail.python.org> Roundup Robot added the comment: New changeset 4c4f31a1b706 by Christian Heimes in branch '3.3': Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in the http://hg.python.org/cpython/rev/4c4f31a1b706 New changeset b5cc822d5bf0 by Christian Heimes in branch 'default': Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in the http://hg.python.org/cpython/rev/b5cc822d5bf0 New changeset dc9f17f10899 by Christian Heimes in branch '2.7': Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in the http://hg.python.org/cpython/rev/dc9f17f10899 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 10:28:54 2013 From: report at bugs.python.org (Matej Cepl) Date: Tue, 22 Oct 2013 08:28:54 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1260009859.57.0.721297634888.issue7442@psf.upfronthosting.co.za> Message-ID: <1382430534.31.0.803094803304.issue7442@psf.upfronthosting.co.za> Matej Cepl added the comment: Is this the same as when tests with python-3.3.2 fails on me with RHEL-6? test_locale (test.test_format.FormatTest) ... ERROR test_non_ascii (test.test_format.FormatTest) ... test test_format failed '\u20ac=%f' % (1.0,) =? '\u20ac=1.000000' ... yes ok ====================================================================== ERROR: test_locale (test.test_format.FormatTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/matej/build/Extras/python3/Python-3.3.2/Lib/test/test_format.py", line 295, in test_locale localeconv = locale.localeconv() File "/home/matej/build/Extras/python3/Python-3.3.2/Lib/locale.py", line 111, in localeconv d = _localeconv() UnicodeDecodeError: 'locale' codec can't decode byte 0xe2 in position 0: Invalid or incomplete multibyte or wide character ---------------------------------------------------------------------- ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 10:28:57 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 22 Oct 2013 08:28:57 +0000 Subject: [issue19334] test_asyncio hanging for 1 hour (non-AIX version) In-Reply-To: <1382366717.5.0.644107908192.issue19334@psf.upfronthosting.co.za> Message-ID: <1382430537.91.0.707124265988.issue19334@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The hangs have been sporadic: http://buildbot.python.org/all/builders/x86%20RHEL%206%203.x/builds/2916/steps/test/logs/stdio http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/8795/steps/test/logs/stdio Perhaps Nick can run test_subprocess_close_after_finish in a loop and tell us if the issue still happens. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 10:29:48 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 22 Oct 2013 08:29:48 +0000 Subject: [issue19334] test_asyncio hanging for 1 hour (non-AIX version) In-Reply-To: <1382366717.5.0.644107908192.issue19334@psf.upfronthosting.co.za> Message-ID: <1382430588.98.0.643301974388.issue19334@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hmm, test_signal_handling_while_selecting is a different one. Perhaps koobs can investigate it :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 10:39:09 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 22 Oct 2013 08:39:09 +0000 Subject: [issue18603] PyOS_mystricmp unused and no longer available In-Reply-To: <1375228725.23.0.641374823001.issue18603@psf.upfronthosting.co.za> Message-ID: <1382431149.52.0.178778243208.issue18603@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- stage: patch review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 10:39:04 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 22 Oct 2013 08:39:04 +0000 Subject: [issue18603] PyOS_mystricmp unused and no longer available In-Reply-To: <1375228725.23.0.641374823001.issue18603@psf.upfronthosting.co.za> Message-ID: <1382431144.01.0.0192917522386.issue18603@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks for your input. I have applied the patch to 2.7, 3.3 and 3.4. A couple of 3rd party were bitten by the missing symbols. A Google search reveals a couple of them https://www.google.de/search?q=PyOS_mystricmp+missing ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 10:58:23 2013 From: report at bugs.python.org (Marius Gedminas) Date: Tue, 22 Oct 2013 08:58:23 +0000 Subject: [issue19342] Improve grp module docstrings Message-ID: <1382432303.67.0.186570774383.issue19342@psf.upfronthosting.co.za> New submission from Marius Gedminas: This patch gives grp.getgrnam and grp.getgrgid sligtly more useful docstrings, and brings them in line with pwd.getpwnam/pwd.getpwuid. Compare pydoc pwd.getpwnam: pwd.getpwnam = getpwnam(...) getpwnam(name) -> (pw_name,pw_passwd,pw_uid, pw_gid,pw_gecos,pw_dir,pw_shell) Return the password database entry for the given user name. See help(pwd) for more on password database entries. After looking at it I know that I can convert a name to an UID by doing pwd.getpwnam(name).pw_uid. Meanwhile pydoc grp.getgrnam: grp.getgrnam = getgrnam(...) getgrnam(name) -> tuple Return the group database entry for the given group name. If name is not valid, raise KeyError. is rather unfriendly and makes me reach for Google just so that I could find out the names of the namedtuple members. ---------- assignee: docs at python components: Documentation files: grpmodule-docstrings.patch keywords: patch messages: 200896 nosy: docs at python, mgedmin priority: normal severity: normal status: open title: Improve grp module docstrings type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32295/grpmodule-docstrings.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 11:03:54 2013 From: report at bugs.python.org (koobs) Date: Tue, 22 Oct 2013 09:03:54 +0000 Subject: [issue19334] test_asyncio hanging for 1 hour (non-AIX version) In-Reply-To: <1382366717.5.0.644107908192.issue19334@psf.upfronthosting.co.za> Message-ID: <1382432634.24.0.149969440232.issue19334@psf.upfronthosting.co.za> koobs added the comment: @antoine, would love some direction/guidance on ways to isolate. For what it's worth, the incidence of this failure dropped sharply over the subsequent 24 hours after the initial report. Could the relaxation of the timers in 042deeeb703 have had an effect? Thus far I've checked out default, and ran test_asyncio at -j16 -j32 and -j64 with no reproduction ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 11:07:40 2013 From: report at bugs.python.org (koobs) Date: Tue, 22 Oct 2013 09:07:40 +0000 Subject: [issue19334] test_asyncio hanging for 1 hour (non-AIX version) In-Reply-To: <1382366717.5.0.644107908192.issue19334@psf.upfronthosting.co.za> Message-ID: <1382432860.25.0.648864262229.issue19334@psf.upfronthosting.co.za> koobs added the comment: Correct changeset ID: e042deeeb703 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 11:09:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 22 Oct 2013 09:09:38 +0000 Subject: [issue19324] Expose Linux-specific APIs in resource module In-Reply-To: <1382345935.87.0.308038663771.issue19324@psf.upfronthosting.co.za> Message-ID: <3d3pnY4rPmz7Ljq@mail.python.org> Roundup Robot added the comment: New changeset aec95b369e60 by Christian Heimes in branch 'default': Issue #19324: Expose Linux-specific constants in resource module http://hg.python.org/cpython/rev/aec95b369e60 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 11:10:20 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 22 Oct 2013 09:10:20 +0000 Subject: [issue19324] Expose Linux-specific APIs in resource module In-Reply-To: <1382345935.87.0.308038663771.issue19324@psf.upfronthosting.co.za> Message-ID: <1382433020.52.0.48187287952.issue19324@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 11:16:31 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 22 Oct 2013 09:16:31 +0000 Subject: [issue19334] test_asyncio hanging for 1 hour (non-AIX version) In-Reply-To: <1382432634.24.0.149969440232.issue19334@psf.upfronthosting.co.za> Message-ID: <1848503934.100673835.1382433364811.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > Thus far I've checked out default, and ran test_asyncio at -j16 -j32 > and -j64 with no reproduction you can use -F to run the test forever. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 11:22:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 22 Oct 2013 09:22:30 +0000 Subject: [issue16595] Add resource.prlimit In-Reply-To: <1354446881.9.0.288115855459.issue16595@psf.upfronthosting.co.za> Message-ID: <3d3q4P4bh9z7Ljq@mail.python.org> Roundup Robot added the comment: New changeset 796c21e27a92 by Christian Heimes in branch 'default': Issue #16595: Add prlimit() to resource module http://hg.python.org/cpython/rev/796c21e27a92 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 11:27:18 2013 From: report at bugs.python.org (koobs) Date: Tue, 22 Oct 2013 09:27:18 +0000 Subject: [issue19343] Expose FreeBSD-specific APIs in resource module Message-ID: <1382434038.91.0.920002784924.issue19343@psf.upfronthosting.co.za> New submission from koobs: At Christians request: RLIMIT_SBSIZE The maximum size (in bytes) of socket buffer usage for this user. This limits the amount of network memory, and hence the amount of mbufs, that this user may hold at any time. RLIMIT_SWAP The maximum size (in bytes) of the swap space that may be reserved or used by all of this user id's processes. This limit is enforced only if bit 1 of the vm.overcommit sysctl is set. Please see tuning(7) for a complete description of this sysctl. RLIMIT_NPTS The maximum number of pseudo-terminals created by this user id. All of the above exists on both FreeBSD 9-stable (9.x) and 10-stable (10.x) ---------- messages: 200903 nosy: koobs priority: normal severity: normal status: open title: Expose FreeBSD-specific APIs in resource module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 11:27:12 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 22 Oct 2013 09:27:12 +0000 Subject: [issue16595] Add resource.prlimit In-Reply-To: <1354446881.9.0.288115855459.issue16595@psf.upfronthosting.co.za> Message-ID: <1382434032.07.0.610435075174.issue16595@psf.upfronthosting.co.za> Christian Heimes added the comment: Let's see how the buildbots respond. I may have to disable some tests for ancient Kernel versions. ---------- stage: patch review -> commit review status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 11:27:59 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 22 Oct 2013 09:27:59 +0000 Subject: [issue19343] Expose FreeBSD-specific APIs in resource module In-Reply-To: <1382434038.91.0.920002784924.issue19343@psf.upfronthosting.co.za> Message-ID: <1382434079.26.0.915023858626.issue19343@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- components: +Extension Modules keywords: +easy nosy: +christian.heimes stage: -> needs patch type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 11:31:07 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 22 Oct 2013 09:31:07 +0000 Subject: [issue8964] platform._sys_version does not parse correctly IronPython 2.x version In-Reply-To: <1382314019.94.0.752831372876.issue8964@psf.upfronthosting.co.za> Message-ID: <526645C8.5070804@egenix.com> Marc-Andre Lemburg added the comment: On 21.10.2013 02:07, Ezio Melotti wrote: > > Ezio Melotti added the comment: > > Fixed, thanks for the patch! Thanks, Ezio, for the check-in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 11:35:04 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 22 Oct 2013 09:35:04 +0000 Subject: [issue18426] Crash when extension does not use PyModule_Create() In-Reply-To: <1373524611.25.0.726657058884.issue18426@psf.upfronthosting.co.za> Message-ID: <1382434504.41.0.0377107481197.issue18426@psf.upfronthosting.co.za> Christian Heimes added the comment: Is there anything left to do for this ticket? ---------- assignee: christian.heimes -> status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 11:39:19 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 22 Oct 2013 09:39:19 +0000 Subject: [issue16595] Add resource.prlimit In-Reply-To: <1354446881.9.0.288115855459.issue16595@psf.upfronthosting.co.za> Message-ID: <1382434759.57.0.753437447178.issue16595@psf.upfronthosting.co.za> Antoine Pitrou added the comment: + self.assertRaises(PermissionError, resource.prlimit, + 1, resource.RLIMIT_AS) Please skip this when run as root. + self.assertEqual(resource.prlimit(0, resource.RLIMIT_AS), (-1, -1)) What if it's not that value by default? Please fix the test to make it more robust. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 11:51:59 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 22 Oct 2013 09:51:59 +0000 Subject: [issue19344] ReStructuredText error in whatsnew/3.4.rst In-Reply-To: <1382435263.38.0.923957095202.issue19344@psf.upfronthosting.co.za> Message-ID: <1382435519.62.0.264179373661.issue19344@psf.upfronthosting.co.za> Christian Heimes added the comment: Fixed in http://hg.python.org/cpython/rev/af628ab4272a Thanks! ---------- nosy: +christian.heimes resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 11:53:43 2013 From: report at bugs.python.org (Marius Gedminas) Date: Tue, 22 Oct 2013 09:53:43 +0000 Subject: [issue19345] Unclear phrasing in whatsnew/3.4.rst Message-ID: <1382435623.18.0.649588636826.issue19345@psf.upfronthosting.co.za> New submission from Marius Gedminas: Quoting http://docs.python.org/dev/whatsnew/3.4.html#deprecated-functions-and-types-of-the-c-api > The PyThreadState.tick_counter field has been value: its value was meaningless since Python 3.2 (?new GIL?). I've no idea what "has been value" is supposed to be. Perhaps "has been deprecated"? No patch this time since I'm not sure what was meant here. ---------- assignee: docs at python components: Documentation messages: 200909 nosy: docs at python, mgedmin priority: normal severity: normal status: open title: Unclear phrasing in whatsnew/3.4.rst versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 11:55:25 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 22 Oct 2013 09:55:25 +0000 Subject: [issue16595] Add resource.prlimit In-Reply-To: <1354446881.9.0.288115855459.issue16595@psf.upfronthosting.co.za> Message-ID: <1382435725.89.0.519697600928.issue16595@psf.upfronthosting.co.za> Christian Heimes added the comment: Roundup bot hangs. I have addressed your concerns in http://hg.python.org/cpython/rev/8c77117f41a9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 11:47:43 2013 From: report at bugs.python.org (Marius Gedminas) Date: Tue, 22 Oct 2013 09:47:43 +0000 Subject: [issue19344] ReStructuredText error in whatsnew/3.4.rst Message-ID: <1382435263.38.0.923957095202.issue19344@psf.upfronthosting.co.za> New submission from Marius Gedminas: Trivial syntax fix attached ---------- assignee: docs at python components: Documentation files: whatsnew-rst-fix.patch keywords: patch messages: 200907 nosy: docs at python, mgedmin priority: normal severity: normal status: open title: ReStructuredText error in whatsnew/3.4.rst versions: Python 3.4 Added file: http://bugs.python.org/file32296/whatsnew-rst-fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 12:06:31 2013 From: report at bugs.python.org (Ivan Johansen) Date: Tue, 22 Oct 2013 10:06:31 +0000 Subject: [issue18426] Crash when extension does not use PyModule_Create() In-Reply-To: <1373524611.25.0.726657058884.issue18426@psf.upfronthosting.co.za> Message-ID: <1382436391.01.0.962918381411.issue18426@psf.upfronthosting.co.za> Ivan Johansen added the comment: Probably not. I am setting status to closed with resolution fixed. ---------- resolution: -> fixed status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 12:29:10 2013 From: report at bugs.python.org (Stefan Krah) Date: Tue, 22 Oct 2013 10:29:10 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1382430534.31.0.803094803304.issue7442@psf.upfronthosting.co.za> Message-ID: <20131022102911.GA430@sleipnir.bytereef.org> Stefan Krah added the comment: Matej Cepl wrote: > Is this the same as when tests with python-3.3.2 fails on me with RHEL-6? If LC_CTYPE is UTF-8 and LC_NUMERIC something like ISO-8859-2 then it's the same issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 12:47:30 2013 From: report at bugs.python.org (Eduardo Robles Elvira) Date: Tue, 22 Oct 2013 10:47:30 +0000 Subject: [issue18321] Multivolume support in tarfile module In-Reply-To: <1372406777.07.0.523288075904.issue18321@psf.upfronthosting.co.za> Message-ID: <1382438850.05.0.61788202971.issue18321@psf.upfronthosting.co.za> Eduardo Robles Elvira added the comment: could you please check if my contributor form is already processed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 12:53:34 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 22 Oct 2013 10:53:34 +0000 Subject: [issue18321] Multivolume support in tarfile module In-Reply-To: <1372406777.07.0.523288075904.issue18321@psf.upfronthosting.co.za> Message-ID: <1382439214.66.0.524603091122.issue18321@psf.upfronthosting.co.za> Christian Heimes added the comment: You have an asterisk next to your user name. So yes, your form was received and processed. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 13:30:09 2013 From: report at bugs.python.org (Stefan Krah) Date: Tue, 22 Oct 2013 11:30:09 +0000 Subject: [issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors In-Reply-To: <1379289654.59.0.452504541982.issue19030@psf.upfronthosting.co.za> Message-ID: <1382441409.65.0.347132070264.issue19030@psf.upfronthosting.co.za> Stefan Krah added the comment: Here's the fix for --without-doc-strings (can't commit right now). ---------- Added file: http://bugs.python.org/file32297/issue19030-without-docstrings.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 13:31:38 2013 From: report at bugs.python.org (Matej Cepl) Date: Tue, 22 Oct 2013 11:31:38 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1260009859.57.0.721297634888.issue7442@psf.upfronthosting.co.za> Message-ID: <1382441498.65.0.263836578868.issue7442@psf.upfronthosting.co.za> Matej Cepl added the comment: Hmm, so with this patch diff -up Python-3.3.2/Lib/test/test_format.py.fixFormatTest Python-3.3.2/Lib/test/test_format.py --- Python-3.3.2/Lib/test/test_format.py.fixFormatTest 2013-10-22 10:05:12.253426746 +0200 +++ Python-3.3.2/Lib/test/test_format.py 2013-10-22 10:16:58.510530570 +0200 @@ -288,7 +288,7 @@ class FormatTest(unittest.TestCase): def test_locale(self): try: oldloc = locale.setlocale(locale.LC_ALL) - locale.setlocale(locale.LC_ALL, '') + locale.setlocale(locale.LC_ALL, 'ps_AF') except locale.Error as err: self.skipTest("Cannot set locale: {}".format(err)) try: (or any other explicit locale, I have tried also en_IE) test doesn't fail. Using Python-3.3.2 on RHEL-6 (kernel 2.6.32-358.23.2.el6.i686). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 13:34:03 2013 From: report at bugs.python.org (Matej Cepl) Date: Tue, 22 Oct 2013 11:34:03 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1260009859.57.0.721297634888.issue7442@psf.upfronthosting.co.za> Message-ID: <1382441643.17.0.803786938006.issue7442@psf.upfronthosting.co.za> Matej Cepl added the comment: To #200912: now, system locale is UTF-8 all the way: santiago:python3 (el6) $ locale LANG=en_US.utf8 LC_CTYPE="en_US.utf8" LC_NUMERIC=en_IE.utf8 LC_TIME=en_IE.utf8 LC_COLLATE="en_US.utf8" LC_MONETARY=en_IE.utf8 LC_MESSAGES="en_US.utf8" LC_PAPER=en_IE.utf8 LC_NAME="en_US.utf8" LC_ADDRESS="en_US.utf8" LC_TELEPHONE="en_US.utf8" LC_MEASUREMENT=en_IE.utf8 LC_IDENTIFICATION="en_US.utf8" LC_ALL= santiago:python3 (el6) $ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 13:34:56 2013 From: report at bugs.python.org (Ethan Furman) Date: Tue, 22 Oct 2013 11:34:56 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1382441696.15.0.187776260585.issue19331@psf.upfronthosting.co.za> Ethan Furman added the comment: Attached patch combines Paul's, Antoine's, and Nick's suggestions/observations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 13:35:10 2013 From: report at bugs.python.org (Ethan Furman) Date: Tue, 22 Oct 2013 11:35:10 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1382441710.0.0.428002014102.issue19331@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- keywords: +patch Added file: http://bugs.python.org/file32298/issue19331.stoneleaf.01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 13:35:25 2013 From: report at bugs.python.org (Ethan Furman) Date: Tue, 22 Oct 2013 11:35:25 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1382441725.33.0.194615898576.issue19331@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 13:40:53 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 Oct 2013 11:40:53 +0000 Subject: [issue19341] locale.getdefaultencoding() returns wrong locale and encoding for ca_ES@valencia In-Reply-To: <1382426879.55.0.340515652072.issue19341@psf.upfronthosting.co.za> Message-ID: <1382442053.49.0.80279665284.issue19341@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a duplicate of issue5815. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> locale.getdefaultlocale() missing corner case _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 13:43:47 2013 From: report at bugs.python.org (Esa Peuha) Date: Tue, 22 Oct 2013 11:43:47 +0000 Subject: [issue19325] _osx_support imports many modules In-Reply-To: <1382346544.59.0.0118958375765.issue19325@psf.upfronthosting.co.za> Message-ID: <1382442227.26.0.811737004784.issue19325@psf.upfronthosting.co.za> Esa Peuha added the comment: Actually Lib/_osx_support.py directly imports only five modules: os, re and sys at top level, and contextlib and tempfile in _read_output(). These last two aren't really needed at all, and there's no point even trying to avoid importing os and sys, so the only real problem is re which imports lots of other modules. It might be possible to avoid using re (the regular expressions don't look very complicated) but I noticed that some functions are only ever called from distutils, so maybe they should be moved from _osx_support to distutils._osx_support before doing anything else. I'm willing to do that if it's considered a good idea. ---------- nosy: +Esa.Peuha _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 13:45:57 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 22 Oct 2013 11:45:57 +0000 Subject: [issue19325] _osx_support imports many modules In-Reply-To: <1382346544.59.0.0118958375765.issue19325@psf.upfronthosting.co.za> Message-ID: <1382442357.23.0.036036690335.issue19325@psf.upfronthosting.co.za> Christian Heimes added the comment: For distutils function you can move the import of re inside the function body. It's not elegant but it does the trick w/o much slowdown or inconveniences. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 13:46:11 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Oct 2013 11:46:11 +0000 Subject: [issue5815] locale.getdefaultlocale() missing corner case In-Reply-To: <1240424446.58.0.284100987299.issue5815@psf.upfronthosting.co.za> Message-ID: <1382442371.22.0.872100363908.issue5815@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 13:47:28 2013 From: report at bugs.python.org (Alan Hourihane) Date: Tue, 22 Oct 2013 11:47:28 +0000 Subject: [issue19346] Build fails when there are no shared extensions to be built Message-ID: <1382442448.32.0.170952369524.issue19346@psf.upfronthosting.co.za> New submission from Alan Hourihane: When building python with static extensions and therefore there are no shared extensions to be built the extension list can be NULL, and therefore 0 length. This results in this error.... running build running build_ext INFO: Can't locate Tcl/Tk libs and/or headers Traceback (most recent call last): File "/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/setup.py", line 2017, in main() File "/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/setup.py", line 2011, in main 'Lib/smtpd.py'] File "/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Lib/distutils/core.py", line 152, in setup dist.run_commands() File "/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Lib/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Lib/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Lib/distutils/command/build.py", line 127, in run self.run_command(cmd_name) File "/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Lib/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Lib/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Lib/distutils/command/build_ext.py", line 339, in run self.build_extensions() File "/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/setup.py", line 266, in build_extensions longest = max([len(e.name) for e in self.extensions]) ValueError: max() arg is an empty sequence To fix I replaced this line in setup.py longest = max([len(e.name) for e in self.extensions]) to this... longest = 0 for e in self.extensions: longest = max(longest, len(e.name)) ---------- components: Build messages: 200922 nosy: alanh priority: normal severity: normal status: open title: Build fails when there are no shared extensions to be built type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 13:48:34 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 22 Oct 2013 11:48:34 +0000 Subject: [issue19347] PEP 453 implementation tracking issue Message-ID: <1382442514.8.0.354499850572.issue19347@psf.upfronthosting.co.za> New submission from Nick Coghlan: This is the overall tracking issue for the implementation of PEP 453. The following subtasks will be created as separate issues: - update the Installing Python Modules documentation to reference www.pip-installer.org in Python 2.7, 3.3 and 3.4 (ncoghlan) - initial implementation of ensurepip (dstufft) - Python 3.4 documentation updates for ensurepip (dstufft and/or ncoghlan) - Windows installer updates, including PATH manipulation updates (MvL?) - Mac OS X installer updates (Ned?) - venv and pyvenv updates (dstufft? TBC) ---------- assignee: ncoghlan messages: 200923 nosy: ncoghlan priority: normal severity: normal status: open title: PEP 453 implementation tracking issue type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 13:49:13 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 22 Oct 2013 11:49:13 +0000 Subject: [issue19325] _osx_support imports many modules In-Reply-To: <1382346544.59.0.0118958375765.issue19325@psf.upfronthosting.co.za> Message-ID: <1382442553.25.0.968987110694.issue19325@psf.upfronthosting.co.za> Ned Deily added the comment: Yes, there are various tricks to be done. I have another solution in mind that should eliminate the use re altogether for most cases. (BTW, _osx_support was implemented to centralize functions in anticipation of the introduction of distutils2/packaging in Python 3.3, along with distutils.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 13:50:10 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 22 Oct 2013 11:50:10 +0000 Subject: [issue19347] PEP 453 implementation tracking issue In-Reply-To: <1382442514.8.0.354499850572.issue19347@psf.upfronthosting.co.za> Message-ID: <1382442610.06.0.756110910752.issue19347@psf.upfronthosting.co.za> Nick Coghlan added the comment: One more task to track - updating to the latest upstream pip before beta 2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 13:54:06 2013 From: report at bugs.python.org (Alan Hourihane) Date: Tue, 22 Oct 2013 11:54:06 +0000 Subject: [issue19348] Building _testcapimodule as a builtin results in compile error Message-ID: <1382442846.46.0.759535198419.issue19348@psf.upfronthosting.co.za> New submission from Alan Hourihane: When building _testcapimodule.c as a builtin module, the build fails with this error because it doesn't take into account Py_BUILD_CORE from datetime.h. m68k-atari-mint-gcc -I. -IInclude -I/j/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Include -I/usr/include -fno-strict-aliasing -O2 -pipe -fwrapv -DNDEBUG -DPy_BUILD_CORE -c /j/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Modules/_testcapimodule.c -o Modules/_testcapimodule.o /j/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Modules/_testcapimodule.c: In function 'test_datetime_capi': /j/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Modules/_testcapimodule.c:1281:9: error: 'PyDateTimeAPI' undeclared (first use in this function) /j/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Modules/_testcapimodule.c:1281:9: note: each undeclared identifier is reported only once for each function it appears in /j/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Modules/_testcapimodule.c:1293:5: error: 'PyDateTime_IMPORT' undeclared (first use in this function) /j/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Modules/_testcapimodule.c: In function 'test_string_from_format': /j/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Modules/_testcapimodule.c:1444:5: warning: format '%zd' expects argument of type 'signed size_t', but argument 2 has type 'int' [-Wformat] make: *** [Modules/_testcapimodule.o] Error 1 I fixed it by adding this around the datetime.h include in _testcapimodule.c but not sure if this is correct.... /* Differentiate between building the core module and building extension * modules. */ #ifdef Py_BUILD_CORE #undef Py_BUILD_CORE #include "datetime.h" #define Py_BUILD_CORE #else #include "datetime.h" #endif ---------- components: Build messages: 200926 nosy: alanh priority: normal severity: normal status: open title: Building _testcapimodule as a builtin results in compile error type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 14:00:34 2013 From: report at bugs.python.org (Stefan Krah) Date: Tue, 22 Oct 2013 12:00:34 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1382441643.17.0.803786938006.issue7442@psf.upfronthosting.co.za> Message-ID: <20131022120036.GA12140@sleipnir.bytereef.org> Stefan Krah added the comment: Matej Cepl wrote: > To #200912: now, system locale is UTF-8 all the way: > santiago:python3 (el6) $ locale > LANG=en_US.utf8 > LC_CTYPE="en_US.utf8" > LC_NUMERIC=en_IE.utf8 > LC_TIME=en_IE.utf8 > LC_COLLATE="en_US.utf8" > LC_MONETARY=en_IE.utf8 > LC_MESSAGES="en_US.utf8" > LC_PAPER=en_IE.utf8 > LC_NAME="en_US.utf8" > LC_ADDRESS="en_US.utf8" > LC_TELEPHONE="en_US.utf8" > LC_MEASUREMENT=en_IE.utf8 > LC_IDENTIFICATION="en_US.utf8" > LC_ALL= > santiago:python3 (el6) $ The test passes here with these values (Debian). What is the output of: a) locale.localeconv() b) locale.setlocale(locale.LC_ALL, '') locale.localeconv() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 14:01:18 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 22 Oct 2013 12:01:18 +0000 Subject: [issue19347] PEP 453 implementation tracking issue In-Reply-To: <1382442514.8.0.354499850572.issue19347@psf.upfronthosting.co.za> Message-ID: <1382443278.45.0.857732230889.issue19347@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +dstufft, loewis, ned.deily, vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 14:12:53 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Oct 2013 12:12:53 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1260009859.57.0.721297634888.issue7442@psf.upfronthosting.co.za> Message-ID: <1382443973.8.0.394763378724.issue7442@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue is very close to the issue #13706 which I solved with the new function PyUnicode_DecodeLocale(): see get_locale_info() in Python/formatter_unicode.c. We might copy/paste the code, or we should maybe add a private API to get locale information: get_locale_info() => _Py_get_locale_info() and expose the LocaleInfo structure. It may be added to unicodeobject.h for example, there is already a function related to locales: _PyUnicode_InsertThousandsGrouping(). ---------- nosy: +haypo versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 14:17:22 2013 From: report at bugs.python.org (Matej Cepl) Date: Tue, 22 Oct 2013 12:17:22 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1260009859.57.0.721297634888.issue7442@psf.upfronthosting.co.za> Message-ID: <1382444242.14.0.121634060031.issue7442@psf.upfronthosting.co.za> Matej Cepl added the comment: >>> import locale >>> locale.localeconv() {'p_cs_precedes': 127, 'n_sep_by_space': 127, 'n_sign_posn': 127, 'n_cs_precedes': 127, 'grouping': [], 'positive_sign': '', 'mon_grouping': [], 'p_sep_by_space': 127, 'mon_thousands_sep': '', 'currency_symbol': '', 'mon_decimal_point': '', 'int_curr_symbol': '', 'thousands_sep': '', 'frac_digits': 127, 'int_frac_digits': 127, 'negative_sign': '', 'decimal_point': '.', 'p_sign_posn': 127} >>> locale.setlocale(locale.LC_ALL, '') 'LC_CTYPE=en_US.utf8;LC_NUMERIC=en_IE.utf8;LC_TIME=en_IE.utf8;LC_COLLATE=en_US.utf8;LC_MONETARY=en_IE.utf8;LC_MESSAGES=en_US.utf8;LC_PAPER=en_IE.utf8;LC_NAME=en_US.utf8;LC_ADDRESS=en_US.utf8;LC_TELEPHONE=en_US.utf8;LC_MEASUREMENT=en_IE.utf8;LC_IDENTIFICATION=en_US.utf8' >>> locale.localeconv() {'p_cs_precedes': 1, 'n_sep_by_space': 0, 'n_sign_posn': 1, 'n_cs_precedes': 1, 'grouping': [3, 3, 0], 'positive_sign': '', 'mon_grouping': [3, 3, 0], 'p_sep_by_space': 0, 'mon_thousands_sep': ',', 'currency_symbol': '?', 'mon_decimal_point': '.', 'int_curr_symbol': 'EUR ', 'thousands_sep': ',', 'frac_digits': 2, 'int_frac_digits': 2, 'negative_sign': '-', 'decimal_point': '.', 'p_sign_posn': 1} >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 14:20:29 2013 From: report at bugs.python.org (Albert Zeyer) Date: Tue, 22 Oct 2013 12:20:29 +0000 Subject: [issue17294] compile-flag for single-execution to return value instead of printing it In-Reply-To: <1361797886.48.0.856864897447.issue17294@psf.upfronthosting.co.za> Message-ID: <1382444429.58.0.78007772787.issue17294@psf.upfronthosting.co.za> Albert Zeyer added the comment: Thanks a lot for the long and detailed response! I didn't meant to start a header war; I thought that my request was misunderstood and thus the header changes were by mistake. But I guess it is a good suggestion to leave that decision to a core dev. I still thing that this would have been more straight-forward in the first place: for statement in user_input(): if statement: value = exec(compile(statement, '', 'single')) if value is not None: print value Because it is more explicit. But because introducing such an incompatible change is bad, I thought it's a good idea to add another compile-mode. Your `ee_compile` seems somewhat inefficient to me because you call `compile` twice and I don't like solutions like this very much (try one thing, then try another thing) as rock-solid solutions. (Of course, neither is `interactive_py_compile`, that one just shows what I want.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 14:23:03 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 22 Oct 2013 12:23:03 +0000 Subject: [issue17276] HMAC: deprecate default hash In-Reply-To: <1361535402.96.0.618065106631.issue17276@psf.upfronthosting.co.za> Message-ID: <1382444583.36.0.102058713841.issue17276@psf.upfronthosting.co.za> Christian Heimes added the comment: I've changed the deprecation warning to PendingDeprecationWarning. Please review my wording and grammar. ---------- Added file: http://bugs.python.org/file32299/17276-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 14:32:14 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 22 Oct 2013 12:32:14 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1382445134.29.0.0648935340026.issue19335@psf.upfronthosting.co.za> Nick Coghlan added the comment: The comment at the top of codeop explains the problem (and why Terry is interested in what the C code is doing, since it's clearly different): =============== Compile three times: as is, with \n, and with \n\n appended. If it compiles as is, it's complete. If it compiles with one \n appended, we expect more. If it doesn't compile either way, we compare the error we get when compiling with \n or \n\n appended. If the errors are the same, the code is broken. But if the errors are different, we expect more. Not intuitive; not even guaranteed to hold in future releases; but this matches the compiler's behavior from Python 1.4 through 2.2, at least. =============== Unfortunately, the way the main interactive loop works isn't useful to codeop: the C level loop simply blocks on stdin, waiting until the parser spits out a complete AST. By contrast, codeop is handed complete strings, and has to decide whether they're a potentially incomplete or not. "nonlocal c" is unique in that it's a name lookup that is *checked by the compiler*, so it triggers the *same* exception in all 3 cases that codeop._maybe_compile tries: >>> src = "def a():\n def b():\n nonlocal c" >>> compile(src, "", "single") Traceback (most recent call last): File "", line 1, in File "", line 3 SyntaxError: no binding for nonlocal 'c' found >>> compile(src + "\n", "", "single") Traceback (most recent call last): File "", line 1, in File "", line 3 SyntaxError: no binding for nonlocal 'c' found >>> compile(src + "\n\n", "", "single") Traceback (most recent call last): File "", line 1, in File "", line 3 SyntaxError: no binding for nonlocal 'c' found So it's a SyntaxError that *could be fixed* by later code, but that code never gets a chance to run, because codeop assumes that getting the same error in the last two cases means it will never pass. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 14:33:54 2013 From: report at bugs.python.org (Matej Cepl) Date: Tue, 22 Oct 2013 12:33:54 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1260009859.57.0.721297634888.issue7442@psf.upfronthosting.co.za> Message-ID: <1382445234.61.0.544937125667.issue7442@psf.upfronthosting.co.za> Matej Cepl added the comment: Perhaps version of glibc might be interesting as well? glibc-2.12-1.107.el6_4.5.i686 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 14:34:55 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Oct 2013 12:34:55 +0000 Subject: [issue17276] HMAC: deprecate default hash In-Reply-To: <1361535402.96.0.618065106631.issue17276@psf.upfronthosting.co.za> Message-ID: <1382445295.79.0.90464798435.issue17276@psf.upfronthosting.co.za> STINNER Victor added the comment: I would prefer to directly raise an exception in Python 3.4. Developers will not notice a warning, warning are hidden by default. How many developers run their tests using -Werror? Having to add a parameter to hmac() in applications to port them to Python 3.4 should not be so hard. And using MD5 is really a major security issue, don't you think so? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 14:37:41 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Tue, 22 Oct 2013 12:37:41 +0000 Subject: [issue19349] Not so correct exception message when running venv Message-ID: <1382445461.71.0.435225941381.issue19349@psf.upfronthosting.co.za> New submission from Vajrasky Kok: In Lib/venv/__init__.py, line 348: raise ValueError('This script is only for use with Python 3.3') But I am running Python 3.4. Attached the patch to make it better. raise ValueError('This script is only for use with Python >= 3.3') If you feel it does not feel right, any suggestions? "...Python 3.3 and above", "...at least Python 3.3"? ---------- components: Library (Lib) files: venv_python_version_3_3_above.patch keywords: patch messages: 200935 nosy: vajrasky priority: normal severity: normal status: open title: Not so correct exception message when running venv versions: Python 3.4 Added file: http://bugs.python.org/file32300/venv_python_version_3_3_above.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 14:38:43 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 22 Oct 2013 12:38:43 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1382445523.13.0.876229889389.issue19335@psf.upfronthosting.co.za> Nick Coghlan added the comment: As a potential fix (albeit an ugly hack), try changing this part of codeop._maybe_compile: if not code1 and repr(err1) == repr(err2): raise err1 To something like: if not code1 and repr(err1) == repr(err2): if isinstance(err1, SyntaxError) and "no binding for nonlocal" in str(err1) and not source.endswith("\n\n"): # Allow a nonlocal namebinding to be supplied *after* a # a function definition (the standard interpreter loop # handles this by blocking on stdin, but this module accepts # input as complete strings rather than as a stream) return None raise err1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 14:49:26 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 22 Oct 2013 12:49:26 +0000 Subject: [issue17276] HMAC: deprecate default hash In-Reply-To: <1382445295.79.0.90464798435.issue17276@psf.upfronthosting.co.za> Message-ID: <1551172276.101240548.1382446139465.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > Having to add a parameter to hmac() in applications to port them to > Python 3.4 should not be so hard. And using MD5 is really a major > security issue, don't you think so? Some uses of md5 don't have anything to do with security. I'm -1 on removing the default value here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 14:52:43 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 22 Oct 2013 12:52:43 +0000 Subject: [issue17400] ipaddress should make it easy to identify rfc6598 addresses In-Reply-To: <1363052217.02.0.113831391012.issue17400@psf.upfronthosting.co.za> Message-ID: <1382446363.37.0.387438076732.issue17400@psf.upfronthosting.co.za> Nick Coghlan added the comment: The docs patch doesn't look quite right - Peter, did you mean to copy the "is_private" docs before modifying them? As far as caching goes, perhaps we can just drop functools.lru_cache into the relevant property implementations? @property @lru_cache() def is_global(self): """Test if this address is allocated for public networks.""" (also in copying that example method header, I noticed the docstring for the IPv4 is_global currently still says "private" instead of "public") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 14:56:38 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 22 Oct 2013 12:56:38 +0000 Subject: [issue17276] HMAC: deprecate default hash In-Reply-To: <1361535402.96.0.618065106631.issue17276@psf.upfronthosting.co.za> Message-ID: <1382446598.94.0.306905879354.issue17276@psf.upfronthosting.co.za> Christian Heimes added the comment: HMAC-MD5 is still fine for legacy support. I wouldn't use it in new program, though ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 14:59:44 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 22 Oct 2013 12:59:44 +0000 Subject: [issue18742] Abstract base class for hashlib In-Reply-To: <1376519472.63.0.753349393836.issue18742@psf.upfronthosting.co.za> Message-ID: <3d3vtf5R0Pz7Ljg@mail.python.org> Roundup Robot added the comment: New changeset 72d7b2185771 by Christian Heimes in branch 'default': Issue #18742: Rework the internal hashlib construtor to pave the road for ABCs. http://hg.python.org/cpython/rev/72d7b2185771 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 15:05:54 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 22 Oct 2013 13:05:54 +0000 Subject: [issue18742] Abstract base class for hashlib In-Reply-To: <1376519472.63.0.753349393836.issue18742@psf.upfronthosting.co.za> Message-ID: <3d3w1n1jRdz7LjV@mail.python.org> Roundup Robot added the comment: New changeset 27da6e790c41 by Christian Heimes in branch 'default': Issue #18742: Expose the internal hash type object for ABCs. http://hg.python.org/cpython/rev/27da6e790c41 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 15:16:43 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 22 Oct 2013 13:16:43 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1382447803.28.0.282527369325.issue19331@psf.upfronthosting.co.za> Nick Coghlan added the comment: Hmm, review link doesn't appear to be available, so just commenting here. For the "overriding principle" part, you can't switch from a class to a factory function (as that's a backwards incompatible change due to breaking subclassing and isinstance and issubclass checks). The relevant example is going the other way (from a function to relying on a class __new__ or __init__ method instead). For the addition to the class names section, you can't really jam Paul's wording and mine together like that, as it makes the "this rule" reference ambiguous as to whether it's referring to the previous sentence (intended) or the part before the semi-colon (not intended). "ABC classes" also doesn't work, since that ends with a repeated "class". Perhaps: ================= Class names should normally use the CapWords convention, with classes intended solely for internal use starting with a leading underscore. This guideline should always be followed for abstract base classes, any other classes where inheritance is encouraged, and classes that are paired with a separate factory function. In cases where inheritance is not encouraged and it is judged to improve readability at the point of use, the naming convention for callables (lower_case_with_underscores) may be used instead. This is an indication that the type is intended primarily for use "as is", rather than through inheritance (although subclassing is still permitted). Note that there is a separate convention for builtin names: most builtin names are single words (or two words run together), with the CapWords convention used only for exception names and builtin constants. ================= ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 15:21:10 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 22 Oct 2013 13:21:10 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382373000.68.0.189461007664.issue19335@psf.upfronthosting.co.za> Message-ID: <1382448070.81.0.830800465997.issue19335@psf.upfronthosting.co.za> R. David Murray added the comment: A complete fix is going to require setting a flag that we have a pending non-local, and check that flag when the code input is complete to raise the SyntaxError at that point if the non-local hasn't been set. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 15:22:16 2013 From: report at bugs.python.org (Stefan Krah) Date: Tue, 22 Oct 2013 13:22:16 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1382444242.14.0.121634060031.issue7442@psf.upfronthosting.co.za> Message-ID: <20131022132217.GA1801@sleipnir.bytereef.org> Stefan Krah added the comment: Matej Cepl wrote: > >>> import locale > >>> locale.localeconv() > {'p_cs_precedes': 127, 'n_sep_by_space': 127, 'n_sign_posn': 127, 'n_cs_precedes': 127, 'grouping': [], 'positive_sign': '', 'mon_grouping': [], 'p_sep_by_space': 127, 'mon_thousands_sep': '', 'currency_symbol': '', 'mon_decimal_point': '', 'int_curr_symbol': '', 'thousands_sep': '', 'frac_digits': 127, 'int_frac_digits': 127, 'negative_sign': '', 'decimal_point': '.', 'p_sign_posn': 127} > >>> locale.setlocale(locale.LC_ALL, '') > 'LC_CTYPE=en_US.utf8;LC_NUMERIC=en_IE.utf8;LC_TIME=en_IE.utf8;LC_COLLATE=en_US.utf8;LC_MONETARY=en_IE.utf8;LC_MESSAGES=en_US.utf8;LC_PAPER=en_IE.utf8;LC_NAME=en_US.utf8;LC_ADDRESS=en_US.utf8;LC_TELEPHONE=en_US.utf8;LC_MEASUREMENT=en_IE.utf8;LC_IDENTIFICATION=en_US.utf8' > >>> locale.localeconv() > {'p_cs_precedes': 1, 'n_sep_by_space': 0, 'n_sign_posn': 1, 'n_cs_precedes': 1, 'grouping': [3, 3, 0], 'positive_sign': '', 'mon_grouping': [3, 3, 0], 'p_sep_by_space': 0, 'mon_thousands_sep': ',', 'currency_symbol': '?', 'mon_decimal_point': '.', 'int_curr_symbol': 'EUR ', 'thousands_sep': ',', 'frac_digits': 2, 'int_frac_digits': 2, 'negative_sign': '-', 'decimal_point': '.', 'p_sign_posn': 1} These look normal. I'm puzzled, because that's what is going on in the test as well. Do you get the failure when running the test in isolation: ./python -m test test_format If this passes, there might be some interaction with other tests. If it doesn't pass, I would step through the test in gdb (break PyLocale_localeconv) and see which member of struct lconv is the troublemaker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 15:25:17 2013 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 22 Oct 2013 13:25:17 +0000 Subject: [issue19347] PEP 453 implementation tracking issue In-Reply-To: <1382442514.8.0.354499850572.issue19347@psf.upfronthosting.co.za> Message-ID: <1382448317.37.0.321163150812.issue19347@psf.upfronthosting.co.za> Vinay Sajip added the comment: venv shouldn't need any changes. The pyvenvex.py [1] script I posted to distutils-sig installs setuptools and pip into venvs, and it can be used to update pyvenv (where AFAICT changes are only required to change where the pip to be installed comes from). [1] https://gist.github.com/vsajip/4673395 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 15:33:10 2013 From: report at bugs.python.org (Paul Moore) Date: Tue, 22 Oct 2013 13:33:10 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1382448790.86.0.366644312393.issue19331@psf.upfronthosting.co.za> Paul Moore added the comment: +1 on switching the wording in the overriding principle section to say "factory function to class". Although the fact that I made that mistake reflects my point that if I'm thinking of class->wrapper as an "internal change" then I'm not anticipating or supporting subclassing. (That's my excuse and I'm sticking to it :-)) Nick's revised wording for the class names section took me a couple of reads to follow - it feels a little too complex as a result of trying to cover everything. But I couldn't come up with anything substantially better, so call me +0 on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 15:34:47 2013 From: report at bugs.python.org (Colin Williams) Date: Tue, 22 Oct 2013 13:34:47 +0000 Subject: [issue19350] macurl2path coverage Message-ID: <1382448887.47.0.0212469471287.issue19350@psf.upfronthosting.co.za> New submission from Colin Williams: Ported the tests built into the library requiring manual verification over to the testing framework. Those tests only provided 77% coverage, so I improved that up to 99%. Can't get the last line because it's only reachable on older model macs. ---------- components: Tests files: url2pathname.patch keywords: patch messages: 200947 nosy: Colin.Williams priority: normal severity: normal status: open title: macurl2path coverage Added file: http://bugs.python.org/file32301/url2pathname.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 15:37:18 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 22 Oct 2013 13:37:18 +0000 Subject: [issue19335] codeop misclassifies incomplete code with 'nonlocal' In-Reply-To: <1382448070.81.0.830800465997.issue19335@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: codeop compiles the whole pending statement every time, so that part shouldn't be needed (from the compiler's point of view, this input looks complete - there's nothing dangling, any more than there is for a normal syntax error like "name name"). As far as I can tell, the only reason it works in the internal parser case is because the parser doesn't consider the input complete until it sees the expected dedents, which the tokenizer doesn't generate until it sees the trailing newline. That may actually be another alternative: instead of doing the "try appending newlines and see if it works or generates different errors", we may be able to switch to the tokenizer if the initial compilation fails and check for hanging INDENT tokens (i.e. INDENTS without a corresponding DEDENT). That would get us much closer to what the real eval loop is doing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 15:39:28 2013 From: report at bugs.python.org (Ethan Furman) Date: Tue, 22 Oct 2013 13:39:28 +0000 Subject: [issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors In-Reply-To: <1379289654.59.0.452504541982.issue19030@psf.upfronthosting.co.za> Message-ID: <1382449168.03.0.784554335394.issue19030@psf.upfronthosting.co.za> Ethan Furman added the comment: Stefan, do the other tests in PydocWithMetaClasses continue to work on your FreeBSD 9.0 box without docstrings? Because they all fail on my Linux Ubuntu 13.04 box. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 15:41:51 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 22 Oct 2013 13:41:51 +0000 Subject: [issue19347] PEP 453 implementation tracking issue In-Reply-To: <1382442514.8.0.354499850572.issue19347@psf.upfronthosting.co.za> Message-ID: <1382449311.41.0.705897907061.issue19347@psf.upfronthosting.co.za> Nick Coghlan added the comment: Check PEP 453 again: http://www.python.org/dev/peps/pep-0453/#changes-to-virtual-environments Rather than only changing pyvenv, the API in the PEP is to add "with_pip" parameters to the venv module API, so that anyone building pyvenv style tools on top of venv can easily request installation of pip by passing "with_pip=True". The change to pyvenv is then to just add the --without-pip flag (since the default is inverted for the two interfaces - library API is opt-in for backwards compatibility, tool CLI is opt-out) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 15:43:17 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 22 Oct 2013 13:43:17 +0000 Subject: [issue19350] macurl2path coverage In-Reply-To: <1382448887.47.0.0212469471287.issue19350@psf.upfronthosting.co.za> Message-ID: <1382449397.77.0.899479177222.issue19350@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 15:47:49 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 22 Oct 2013 13:47:49 +0000 Subject: [issue19334] test_asyncio hanging for 1 hour (non-AIX version) In-Reply-To: <1382366717.5.0.644107908192.issue19334@psf.upfronthosting.co.za> Message-ID: <1382449669.74.0.13115767392.issue19334@psf.upfronthosting.co.za> Nick Coghlan added the comment: I started "strace ./python -m test -vF test_asyncio" running under screen on the RHEL6 buildbot (so it will keep running when I log out in a moment). If I don't report back the results in the next day or two, ping the issue to remind me to log back in and see if it eventually got stuck. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 15:52:51 2013 From: report at bugs.python.org (Stefan Krah) Date: Tue, 22 Oct 2013 13:52:51 +0000 Subject: [issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors In-Reply-To: <1382449168.03.0.784554335394.issue19030@psf.upfronthosting.co.za> Message-ID: <20131022135253.GA24351@sleipnir.bytereef.org> Stefan Krah added the comment: Ethan Furman wrote: > Stefan, do the other tests in PydocWithMetaClasses continue to work on your FreeBSD 9.0 box without docstrings? Because they all fail on my Linux Ubuntu 13.04 box. I tested on Debian, and the remaining tests seem to work (I did not bother to figure out why though). Let's just skip all tests if they fail for you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 15:54:50 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 22 Oct 2013 13:54:50 +0000 Subject: [issue18742] Abstract base class for hashlib In-Reply-To: <1376519472.63.0.753349393836.issue18742@psf.upfronthosting.co.za> Message-ID: <1382450090.97.0.0880577268988.issue18742@psf.upfronthosting.co.za> Christian Heimes added the comment: I have checked in some of the basic and non-controversal parts of the PEP (optimization, expose type object). The ABCs are still missing. In order to cope with keyed and non-keyed CHF I have added a common base class for both and separate ABCs for keyed and non-keyed CHF. They are really different beasts but they provide a common API except for they constructor. class AbstractCryptoHashFunction(metaclass=_abc.ABCMeta): """Common ABC for keyed and non-keyed cryptographic hash functions""" class CryptoHashFunction(AbstractCryptoHashFunction): """Abstract base class for cryptographic hash functions (PEP 247)""" class KeyedCryptoHashFunction(AbstractCryptoHashFunction): """Abstract base class for keyed cryptographic hashs function (PEP 247)""" ---------- Added file: http://bugs.python.org/file32302/hashlib_abc4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 15:54:51 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Oct 2013 13:54:51 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1260009859.57.0.721297634888.issue7442@psf.upfronthosting.co.za> Message-ID: <1382450091.19.0.627056400058.issue7442@psf.upfronthosting.co.za> STINNER Victor added the comment: Title: _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE Oh, I just realized that the issue is a LC_NUMERIC using an encoding A with a LC_CTYPE using an encoding B. It looks like the glibc does not support this setup, at least for the fi_FI locale which has a non-ASCII thousand separator (non-breaking space: U+00A0). Try attached inconsistent_locale_encodings.py script (it uses locale names for Fedora 19, you may have to adapt it to your OS). Output on Fedora 19: fi_FI numeric (ISO-8859-1) with fr_FR.utf8 ctype (UTF-8) UnicodeDecodeError: 'locale' codec can't decode byte 0xa0 in position 0: Virheellinen tai ep?t?ydellinen monitavumerkki tai leve? merkki fi_FI at euro numeric (ISO-8859-15) with fr_FR.utf8 ctype (UTF-8) UnicodeDecodeError: 'locale' codec can't decode byte 0xa0 in position 0: Virheellinen tai ep?t?ydellinen monitavumerkki tai leve? merkki fi_FI.iso88591 numeric (ISO-8859-1) with fr_FR.utf8 ctype (UTF-8) UnicodeDecodeError: 'locale' codec can't decode byte 0xa0 in position 0: Virheellinen tai ep?t?ydellinen monitavumerkki tai leve? merkki fi_FI.iso885915 at euro numeric (ISO-8859-15) with fr_FR.utf8 ctype (UTF-8) UnicodeDecodeError: 'locale' codec can't decode byte 0xa0 in position 0: Virheellinen tai ep?t?ydellinen monitavumerkki tai leve? merkki fi_FI.utf8 numeric (UTF-8) with fr_FR.utf8 ctype (UTF-8) {'grouping': [3, 3, 0], 'p_cs_precedes': 0, 'mon_thousands_sep': '\xa0', 'decimal_point': ',', 'n_sep_by_space': 1, 'n_sign_posn': 1, 'mon_decimal_point': ',', 'frac_digits': 2, 'positive_sign': '', 'mon_grouping': [3, 3, 0], 'n_cs_precedes': 0, 'thousands_sep': '\xa0', 'p_sep_by_space': 1, 'p_sign_posn': 1, 'int_frac_digits': 2, 'currency_symbol': '?', 'negative_sign': '-', 'int_curr_symbol': 'EUR '} ---------- Added file: http://bugs.python.org/file32303/inconsistent_locale_encodings.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 15:58:53 2013 From: report at bugs.python.org (Jason Bray) Date: Tue, 22 Oct 2013 13:58:53 +0000 Subject: [issue19351] python msi installers - silent mode Message-ID: <1382450332.98.0.946317884841.issue19351@psf.upfronthosting.co.za> New submission from Jason Bray: Hello, I am working in an IT group, attempting to automate our management of python. This issue applies to both Python 3.4 and Python 2.7.5 and Python 2.7.4 On a Windows machine (both 7 and 8.1 have been tested) when python msi's are installed from the command line using a quiet or passive mode, they do not appear in the "Programs and Features" panel. This leads me to believe that there are missing registry entries when installed in this mode. When the same msi is used, but in interactive mode, everything appears to install correctly. While I am able to install and uninstall normally using the command line, this creates issues for manual uninstallation of python, as well as for managing it with automation tools like puppet. ---------- components: Installation messages: 200955 nosy: Jason.Bray priority: normal severity: normal status: open title: python msi installers - silent mode versions: Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 16:00:12 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 22 Oct 2013 14:00:12 +0000 Subject: [issue19351] python msi installers - silent mode In-Reply-To: <1382450332.98.0.946317884841.issue19351@psf.upfronthosting.co.za> Message-ID: <1382450412.44.0.371339365432.issue19351@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- assignee: -> loewis components: +Windows nosy: +loewis type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 16:14:14 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 22 Oct 2013 14:14:14 +0000 Subject: [issue19347] PEP 453 implementation tracking issue In-Reply-To: <1382449311.41.0.705897907061.issue19347@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Just clarifying how I plan to track this: as we start specific tasks, we'll create new issues and make this one depend on them. That seems better to me than creating a whole raft of issues up front that are then depending on each other. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 16:19:06 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Oct 2013 14:19:06 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1260009859.57.0.721297634888.issue7442@psf.upfronthosting.co.za> Message-ID: <1382451546.55.0.791294110743.issue7442@psf.upfronthosting.co.za> STINNER Victor added the comment: msg95988> Hi, the following works in 2.7 but not in 3.x: ... Sure it works because Python 2 pass the raw byte string, it does not try to decode it. But did you try to display the result in a terminal for example? Example with Python 2 in an UTF-8 terminal: $ python Python 2.7.5 (default, Oct 8 2013, 12:19:40) [GCC 4.8.1 20130603 (Red Hat 4.8.1-1)] on linux2 >>> import locale >>> # set the locale encoding to UTF-8 ... locale.setlocale(locale.LC_CTYPE, 'fr_FR.utf8') 'fr_FR.utf8' >>> # set the thousand separator to U+00A0 ... locale.setlocale(locale.LC_NUMERIC, 'fi_FI') 'fi_FI' >>> locale.getlocale(locale.LC_CTYPE) ('fr_FR', 'UTF-8') >>> locale.getlocale(locale.LC_NUMERIC) ('fi_FI', 'ISO8859-15') >>> locale.format('%d', 123456, True) '123\xa0456' >>> print(locale.format('%d', 123456, True)) 123?456 Mojibake! ? means that b'\xA0' cannot be decoded from the locale encoding (UTF-8). There is probably the same issue with a LC_MONETARY using a different encoding than LC_CTYPE. > I suspect that this is related: #5905 It is unrelated: time.strftime() uses the LC_CTYPE, but the Python was using the wrong encoding. Python used the locale encoding read at startup, whereas the *current* locale encoding must be used. This issue is specific to LC_NUMERIC with a LC_CTYPE using different encoding. > If I set LC_CTYPE and LC_NUMERIC together, things work. Sure, because in this case, LC_NUMERIC produces data in the same encoding than LC_CTYPE. > call setlocale(LC_CTYPE, setlocale(LC_NUMERIC, NULL)) before > mbstowcs. This is not really an option. Setting a locale is process-wide and should be avoided. FYI locale.getpreferredencoding() changes temporarly the LC_CTYPE by default, it only uses the current LC_CTYPE if you pass False. open() changed temporarly LC_CTYPE because of that in Python 3.0-3.2 (see issue #11022). The following PostgreSQL issue looks to be the same than this Python issue: http://www.postgresql.org/message-id/20100422015552.4B7E07541D0 at cvs.postgresql.org The fix changes temporarly the LC_CTYPE encoding: #ifdef WIN32 setlocale(LC_CTYPE, locale_monetary); #endif (I don't know why the code is specific to Windows.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 16:25:38 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 22 Oct 2013 14:25:38 +0000 Subject: [issue18603] PyOS_mystricmp unused and no longer available In-Reply-To: <1375228725.23.0.641374823001.issue18603@psf.upfronthosting.co.za> Message-ID: <1382451938.33.0.407687328699.issue18603@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Someone would have to be trying fairly hard to use those functions on Windows because this is in the header: #ifdef MS_WINDOWS #define PyOS_strnicmp strnicmp #define PyOS_stricmp stricmp #else #define PyOS_strnicmp PyOS_mystrnicmp #define PyOS_stricmp PyOS_mystricmp #endif ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 16:26:06 2013 From: report at bugs.python.org (Ethan Furman) Date: Tue, 22 Oct 2013 14:26:06 +0000 Subject: [issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors In-Reply-To: <1379289654.59.0.452504541982.issue19030@psf.upfronthosting.co.za> Message-ID: <1382451966.24.0.385202052739.issue19030@psf.upfronthosting.co.za> Ethan Furman added the comment: Actually, you @skipif clued me in as to what was happening with the other pydoc tests and their skipif clauses. Added appropriate skipifs to the new tests and mimicked the docstring in/exclusion. All tests now passing with and without docstrings, with and without -OO (simply skipped with -OO). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 16:28:48 2013 From: report at bugs.python.org (Stefan Krah) Date: Tue, 22 Oct 2013 14:28:48 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1382451546.55.0.791294110743.issue7442@psf.upfronthosting.co.za> Message-ID: <20131022142850.GA24657@sleipnir.bytereef.org> Stefan Krah added the comment: STINNER Victor wrote: > The following PostgreSQL issue looks to be the same than this Python issue: > http://www.postgresql.org/message-id/20100422015552.4B7E07541D0 at cvs.postgresql.org > > The fix changes temporarly the LC_CTYPE encoding: So does my patch. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 16:29:19 2013 From: report at bugs.python.org (Matej Cepl) Date: Tue, 22 Oct 2013 14:29:19 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1260009859.57.0.721297634888.issue7442@psf.upfronthosting.co.za> Message-ID: <1382452159.78.0.194224673173.issue7442@psf.upfronthosting.co.za> Matej Cepl added the comment: What I did: 1) run the build (it is a building of Fedora Rawhide python3 package on RHEL), and see it failed in this test. 2) see below santiago:python3 (el6) $ cd Python-3.3.2/build/optimized/ santiago:optimized (el6) $ ./python -m test test_format [1/1] test_format 1 test OK. santiago:optimized (el6) $ Oh well ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 16:29:28 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Oct 2013 14:29:28 +0000 Subject: [issue19334] test_asyncio hanging for 1 hour (non-AIX version) In-Reply-To: <1382449669.74.0.13115767392.issue19334@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > I started "strace ./python -m test -vF test_asyncio" running under screen on the RHEL6 buildbot (so it will keep running when I log out in a moment). Trace also child processes: add -f. And add maybe also timestamps: -tt. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 16:30:49 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 22 Oct 2013 14:30:49 +0000 Subject: [issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors In-Reply-To: <1379289654.59.0.452504541982.issue19030@psf.upfronthosting.co.za> Message-ID: <3d3xvl3Zfyz7LjX@mail.python.org> Roundup Robot added the comment: New changeset 64d94b21e731 by Ethan Furman in branch 'default': Issue #19030: fix new pydoc tests for --without-doc-strings http://hg.python.org/cpython/rev/64d94b21e731 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 16:32:55 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 22 Oct 2013 14:32:55 +0000 Subject: [issue19352] unittest loader barfs on symlinks Message-ID: <1382452375.52.0.637202424401.issue19352@psf.upfronthosting.co.za> New submission from Antoine Pitrou: unittest.loader has the following snippet: if realpath.lower() != fullpath_noext.lower(): module_dir = os.path.dirname(realpath) mod_name = os.path.splitext(os.path.basename(full_path))[0] expected_dir = os.path.dirname(full_path) msg = ("%r module incorrectly imported from %r. Expected %r. " "Is this module globally installed?") Unfortunately, this will break with virtualenv on Ubuntu, which creates a "local" directory full of symlinks. You end with this kind of error message: ====================================================================== ERROR: __main__ (unittest.loader.LoadTestsFailure) ---------------------------------------------------------------------- ImportError: 'test_asyncagi' module incorrectly imported from '/home/antoine/obelus/.tox/py27/local/lib/python2.7/site-packages/obelus/test'. Expected '/home/antoine/obelus/.tox/py27/lib/python2.7/site-packages/obelus/test'. Is this module globally installed? Instead of (rather stupidly) calling lower(), realpath() and normcase() should be called instead, to make sure the canonical paths are compared. ---------- components: Library (Lib) messages: 200964 nosy: barry, michael.foord, pitrou priority: normal severity: normal stage: needs patch status: open title: unittest loader barfs on symlinks type: behavior versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 16:49:12 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 22 Oct 2013 14:49:12 +0000 Subject: [issue19352] unittest loader barfs on symlinks In-Reply-To: <1382452375.52.0.637202424401.issue19352@psf.upfronthosting.co.za> Message-ID: <1382453352.6.0.590230568201.issue19352@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Attaching patch. ---------- keywords: +patch Added file: http://bugs.python.org/file32304/unittest_loader_symlinks.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 16:50:14 2013 From: report at bugs.python.org (Michael Foord) Date: Tue, 22 Oct 2013 14:50:14 +0000 Subject: [issue19352] unittest loader barfs on symlinks In-Reply-To: <1382452375.52.0.637202424401.issue19352@psf.upfronthosting.co.za> Message-ID: <1382453414.53.0.434856898493.issue19352@psf.upfronthosting.co.za> Michael Foord added the comment: Good catch and fix Antoine. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 17:21:49 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 22 Oct 2013 15:21:49 +0000 Subject: [issue17400] ipaddress should make it easy to identify rfc6598 addresses In-Reply-To: <1363052217.02.0.113831391012.issue17400@psf.upfronthosting.co.za> Message-ID: <1382455309.2.0.0904025486796.issue17400@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Sorry for chiming in a bit late, but what's the rationale for including 100.64.0.0/10 in the "is_private" set, rather than *only* excluding it from the "is_global" set? The rationale for RFC 6598 is precisely that 100.64.0.0/10 is *not* private in the common sense, so it would deserve a different treatment in the ipaddress module as well. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 17:28:43 2013 From: report at bugs.python.org (Stefan Krah) Date: Tue, 22 Oct 2013 15:28:43 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <20131022142850.GA24657@sleipnir.bytereef.org> Message-ID: <20131022152844.GA25269@sleipnir.bytereef.org> Stefan Krah added the comment: Victor, thanks for the comments. I also think we should set LC_CTYPE closer to the actual call to mbstowcs(), otherwise there are many API calls in between. So it should happen somewhere in PyUnicode_DecodeLocaleAndSize(). Perhaps we can create _PyUnicode_DecodeLocaleAndSize() which would take an LC_CTYPE parameter? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 17:32:13 2013 From: report at bugs.python.org (Stefan Krah) Date: Tue, 22 Oct 2013 15:32:13 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1382452159.78.0.194224673173.issue7442@psf.upfronthosting.co.za> Message-ID: <20131022153214.GA25352@sleipnir.bytereef.org> Stefan Krah added the comment: Matej Cepl wrote: > santiago:optimized (el6) $ ./python -m test test_format > [1/1] test_format > 1 test OK. It looks like some other test in the test suite did not restore a changed locale. If you're motivated enough, you could try if it still happens in 3.4 and open a new issue (it's unrelated to this one). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 17:41:05 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 22 Oct 2013 15:41:05 +0000 Subject: [issue19345] Unclear phrasing in whatsnew/3.4.rst In-Reply-To: <1382435623.18.0.649588636826.issue19345@psf.upfronthosting.co.za> Message-ID: <1382456465.24.0.00348308947084.issue19345@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 17:48:48 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Oct 2013 15:48:48 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1260009859.57.0.721297634888.issue7442@psf.upfronthosting.co.za> Message-ID: <1382456928.44.0.542803747209.issue7442@psf.upfronthosting.co.za> STINNER Victor added the comment: "So it should happen somewhere in PyUnicode_DecodeLocaleAndSize(). Perhaps we can create _PyUnicode_DecodeLocaleAndSize() which would take an LC_CTYPE parameter?" For this issue, it means that Python localeconv() will have to change the LC_CTYPE locale many time, for each monetary and each number value. I prefer your patch :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 17:49:23 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Oct 2013 15:49:23 +0000 Subject: [issue19345] Unclear phrasing in whatsnew/3.4.rst In-Reply-To: <1382435623.18.0.649588636826.issue19345@psf.upfronthosting.co.za> Message-ID: <1382456963.91.0.918856923493.issue19345@psf.upfronthosting.co.za> STINNER Victor added the comment: > The PyThreadState.tick_counter field has been value: its value was meaningless since Python 3.2 (?new GIL?). oops, "has been removed" :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 18:57:33 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 22 Oct 2013 16:57:33 +0000 Subject: [issue19294] test_asyncio fails intermittently on OS X 10.4 In-Reply-To: <1382172404.1.0.731084144387.issue19294@psf.upfronthosting.co.za> Message-ID: <1382461053.11.0.545390631395.issue19294@psf.upfronthosting.co.za> Guido van Rossum added the comment: If the buildbot is still green, can you close this? I don't think it's worth trying to formulate and test a more precise theory about the root cause, given that it's most likely a platform bug anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 19:14:26 2013 From: report at bugs.python.org (Matej Cepl) Date: Tue, 22 Oct 2013 17:14:26 +0000 Subject: [issue19353] on RHEL6 simple build fails with test_linux_constants (test.test_resource.ResourceTest) Message-ID: <1382462066.11.0.516691894777.issue19353@psf.upfronthosting.co.za> New submission from Matej Cepl: With pure clone of https://github.com/python/cpython.git (no patches applied whatsoever, and the last commit is https://github.com/python/cpython/commit/650406fe7373f31b595b381d4f2f02065607386a) and pure ./configure && make -j2 && make -j2 test I get one failed test: ====================================================================== ERROR: test_linux_constants (test.test_resource.ResourceTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/matej/Repos/cpython/Lib/test/test_resource.py", line 139, in test_linux_constants self.assertIsInstance(resource.RLIMIT_RTTIME, int) AttributeError: 'module' object has no attribute 'RLIMIT_RTTIME' ---------------------------------------------------------------------- Ran 9 tests in 0.468s FAILED (errors=1, skipped=1) test test_resource failed make: *** [test] Error 1 ---------- messages: 200973 nosy: mcepl priority: normal severity: normal status: open title: on RHEL6 simple build fails with test_linux_constants (test.test_resource.ResourceTest) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 19:22:11 2013 From: report at bugs.python.org (Matej Cepl) Date: Tue, 22 Oct 2013 17:22:11 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <20131022153214.GA25352@sleipnir.bytereef.org> Message-ID: <5266B43E.6090507@redhat.com> Matej Cepl added the comment: On 22/10/13 17:32, Stefan Krah wrote: > It looks like some other test in the test suite did not restore a changed > locale. If you're motivated enough, you could try if it still happens in > 3.4 and open a new issue (it's unrelated to this one). Very plain checkout of git and ./configure && make && make test leads to another failed test, but not this one (issue #19353). So either we do something wrong in all those Fedora patches, or this has been fixed since 3.3.2. Curiouser and curiouser. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 19:31:20 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 Oct 2013 17:31:20 +0000 Subject: [issue19279] UTF-7 to UTF-8 decoding crash In-Reply-To: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> Message-ID: <1382463080.46.0.62294914824.issue19279@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: serhiy.storchaka -> versions: -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 19:47:52 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 22 Oct 2013 17:47:52 +0000 Subject: [issue19294] test_asyncio fails intermittently on OS X 10.4 In-Reply-To: <1382172404.1.0.731084144387.issue19294@psf.upfronthosting.co.za> Message-ID: <1382464072.42.0.0850005649851.issue19294@psf.upfronthosting.co.za> Ned Deily added the comment: I agree. And there appear to have been no test_asyncio failures on the buildbot since the checkins -> closing. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 19:55:08 2013 From: report at bugs.python.org (Stefan Krah) Date: Tue, 22 Oct 2013 17:55:08 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1382456928.44.0.542803747209.issue7442@psf.upfronthosting.co.za> Message-ID: <20131022175509.GA26536@sleipnir.bytereef.org> Stefan Krah added the comment: STINNER Victor wrote: > "So it should happen somewhere in PyUnicode_DecodeLocaleAndSize(). Perhaps we can create _PyUnicode_DecodeLocaleAndSize() which would take an LC_CTYPE parameter?" > > For this issue, it means that Python localeconv() will have to change the LC_CTYPE locale many time, for each monetary and each number value. I prefer your patch :-) Windows and OS X have mbstowcs_l(), which takes a locale arg. Linux doesn't (as far as I can see). I agree this solution is ugly, but it probably won't have an impact on benchmarks (naively assuming that setlocale() is fast). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 20:04:30 2013 From: report at bugs.python.org (Stefan Krah) Date: Tue, 22 Oct 2013 18:04:30 +0000 Subject: [issue19353] on RHEL6 simple build fails with test_linux_constants (test.test_resource.ResourceTest) In-Reply-To: <1382462066.11.0.516691894777.issue19353@psf.upfronthosting.co.za> Message-ID: <1382465070.3.0.523404703354.issue19353@psf.upfronthosting.co.za> Stefan Krah added the comment: Christian, could you have a look? I think this was added in #19324. ---------- nosy: +christian.heimes, skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 20:17:47 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 22 Oct 2013 18:17:47 +0000 Subject: [issue19349] Not so correct exception message when running venv In-Reply-To: <1382445461.71.0.435225941381.issue19349@psf.upfronthosting.co.za> Message-ID: <1382465867.23.0.439633568242.issue19349@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 20:36:30 2013 From: report at bugs.python.org (Stefan Krah) Date: Tue, 22 Oct 2013 18:36:30 +0000 Subject: [issue19354] test_format fails on RHEL-6 Message-ID: <1382466990.37.0.806335115025.issue19354@psf.upfronthosting.co.za> New submission from Stefan Krah: Lifting this from #7442: "Very plain checkout of git and ./configure && make && make test leads to another failed test, but not this one (issue #19353). So either we do something wrong in all those Fedora patches, or this has been fixed since 3.3.2." If there was a bug, it's quite likely that it has been fixed in 3.4. In that case it would probably also have been fixed in the development 3.3 branch, so you could check that, too (in mercurial: hg up 3.3). ---------- components: Tests messages: 200978 nosy: mcepl, skrah priority: normal severity: normal status: open title: test_format fails on RHEL-6 type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 20:43:50 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 22 Oct 2013 18:43:50 +0000 Subject: [issue19353] on RHEL6 simple build fails with test_linux_constants (test.test_resource.ResourceTest) In-Reply-To: <1382462066.11.0.516691894777.issue19353@psf.upfronthosting.co.za> Message-ID: <1382467430.63.0.177078080002.issue19353@psf.upfronthosting.co.za> Christian Heimes added the comment: What's the output of "uname -r" on your machine? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 21:05:10 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 22 Oct 2013 19:05:10 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <3d440j5vL8z7LkS@mail.python.org> Roundup Robot added the comment: New changeset 95b88273683c by Tim Golden in branch '3.3': Issue #15207: Fix mimetypes to read from correct area in Windows registry (Original patch by Dave Chambers) http://hg.python.org/cpython/rev/95b88273683c New changeset 12bf7fc1ba76 by Tim Golden in branch 'default': Issue #15207: Fix mimetypes to read from correct area in Windows registry (Original patch by Dave Chambers) http://hg.python.org/cpython/rev/12bf7fc1ba76 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 21:10:15 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 22 Oct 2013 19:10:15 +0000 Subject: [issue19353] on RHEL6 simple build fails with test_linux_constants (test.test_resource.ResourceTest) In-Reply-To: <1382462066.11.0.516691894777.issue19353@psf.upfronthosting.co.za> Message-ID: <1382469015.4.0.524934179215.issue19353@psf.upfronthosting.co.za> Christian Heimes added the comment: Patch with fix. I'm checking the kernel version manually. requires_linux_version() works only per test. I don't want to write a test case for each attribute ... ---------- components: +Tests keywords: +patch stage: -> patch review type: -> behavior versions: +Python 3.4 Added file: http://bugs.python.org/file32305/issue19353.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 21:13:27 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 22 Oct 2013 19:13:27 +0000 Subject: [issue17294] compile-flag for single-execution to return value instead of printing it In-Reply-To: <1361797886.48.0.856864897447.issue17294@psf.upfronthosting.co.za> Message-ID: <1382469207.07.0.876088751939.issue17294@psf.upfronthosting.co.za> Georg Brandl added the comment: Terry, thanks for your explanation; I was trying to find some time to write something similar... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 21:34:06 2013 From: report at bugs.python.org (Stefan Krah) Date: Tue, 22 Oct 2013 19:34:06 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1260009859.57.0.721297634888.issue7442@psf.upfronthosting.co.za> Message-ID: <1382470446.56.0.546804440944.issue7442@psf.upfronthosting.co.za> Stefan Krah added the comment: Here's a quick-and-dirty version of mbstowcs_l(). The difference in the benchmark to the plain mbstowcs() is 0.82s vs 0.55s. In the context of a Python function this is unlikely to be measurable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 21:35:57 2013 From: report at bugs.python.org (Stefan Krah) Date: Tue, 22 Oct 2013 19:35:57 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1260009859.57.0.721297634888.issue7442@psf.upfronthosting.co.za> Message-ID: <1382470557.54.0.972708252248.issue7442@psf.upfronthosting.co.za> Changes by Stefan Krah : Added file: http://bugs.python.org/file32306/mbstowcs_l.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 21:38:39 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 22 Oct 2013 19:38:39 +0000 Subject: [issue17400] ipaddress should make it easy to identify rfc6598 addresses In-Reply-To: <1363052217.02.0.113831391012.issue17400@psf.upfronthosting.co.za> Message-ID: <3d44kt3fDHzSlc@mail.python.org> Roundup Robot added the comment: New changeset 365fd677856f by Peter Moody in branch 'default': #17400: fix documentation, add cache to is_global and correctly handle 100.64.0.0/10 http://hg.python.org/cpython/rev/365fd677856f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 21:40:47 2013 From: report at bugs.python.org (pmoody) Date: Tue, 22 Oct 2013 19:40:47 +0000 Subject: [issue17400] ipaddress should make it easy to identify rfc6598 addresses In-Reply-To: <1363052217.02.0.113831391012.issue17400@psf.upfronthosting.co.za> Message-ID: <1382470847.89.0.220614205764.issue17400@psf.upfronthosting.co.za> pmoody added the comment: antoine, quite right. I've updated is_global. Nick, I've added lru_cache() to is_private and updated the docs (hope it's right this time). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 21:45:54 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 22 Oct 2013 19:45:54 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <3d44vJ6rnszSlc@mail.python.org> Roundup Robot added the comment: New changeset e8cead08c556 by Tim Golden in branch '2.7': Issue #15207: Fix mimetypes to read from correct area in Windows registry (Original patch by Dave Chambers) http://hg.python.org/cpython/rev/e8cead08c556 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 21:53:54 2013 From: report at bugs.python.org (Tim Golden) Date: Tue, 22 Oct 2013 19:53:54 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <1382471634.44.0.392186375451.issue15207@psf.upfronthosting.co.za> Tim Golden added the comment: *cough* Somehow that didn't actually get pushed. Rebased against 2.7, 3.3 & 3.4 and pushed. ---------- assignee: -> tim.golden resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 22:03:06 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 22 Oct 2013 20:03:06 +0000 Subject: [issue18742] Abstract base class for hashlib In-Reply-To: <1376832556.53.0.90130150517.issue18742@psf.upfronthosting.co.za> Message-ID: Gregory P. Smith added the comment: > > Have you had a chance to read http://www.python.org/dev/peps/pep-0452/ , too? Overall pep 452 looks good but one thing popped out at me: >>> import hashlib >>> from Crypto.Hash import MD5 >>> m = MD5.new() >>> isinstance(m, hashlib.CryptoHash) True This suggests that there is an ABC hashlib.CryptoHash that non hashlib implementations sound use but that is not spelled out anywhere as required or recommended for third party hash implementations or why using it is a good thing. I believe that is what you want to do with the ABC being defined in this issue so I'd mention that explicitly in the pep. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 22 22:34:48 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 22 Oct 2013 20:34:48 +0000 Subject: [issue17400] ipaddress should make it easy to identify rfc6598 addresses In-Reply-To: <1382470847.89.0.220614205764.issue17400@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Thanks Peter, just a couple more tweaks: - tests need to ensure the carrier private range is neither global *nor* private (it looks to me like they will still show up as private at this point) - looks like the docs for is_private still need to be restored (and mention the subtlety about deliberately excluding "carrier private"). - this is probably worthy of a What's New entry mentioning the new attribute My apologies for not finding time to review the original patch more closely, as that could have saved you a bit of the subsequent running around... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 00:54:43 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Tue, 22 Oct 2013 22:54:43 +0000 Subject: [issue19347] PEP 453 implementation tracking issue In-Reply-To: <1382442514.8.0.354499850572.issue19347@psf.upfronthosting.co.za> Message-ID: <1382482483.23.0.265604261737.issue19347@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 01:09:05 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 22 Oct 2013 23:09:05 +0000 Subject: [issue17400] ipaddress should make it easy to identify rfc6598 addresses In-Reply-To: <1382470847.89.0.220614205764.issue17400@psf.upfronthosting.co.za> Message-ID: <1382483313.2485.0.camel@fsol> Antoine Pitrou added the comment: > antoine, quite right. I've updated is_global. > Nick, I've added lru_cache() to is_private and updated the docs (hope it's right this time). Mmmh... I actually meant the reverse. IIUC, 100.64.0.0/10 isn't global (i.e. globally routable) and isn't private either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 03:13:27 2013 From: report at bugs.python.org (Jeffrey Armstrong) Date: Wed, 23 Oct 2013 01:13:27 +0000 Subject: [issue19355] Initial modernization of OpenWatcom support Message-ID: <1382490807.69.0.90112979514.issue19355@psf.upfronthosting.co.za> New submission from Jeffrey Armstrong: In an attempt to overhaul the existing Open-Watcom-specific portions of CPython, I encountered a number of issues related mostly to preprocessor directives surrounding support for the Open Watcom toolchain on Windows. Specifically, there were a number of places where #defined(MS_WINDOWS) should be checked prior to checking #defined(__WATCOMC__). Additionally, there are some minor differences in the Open Watcom headers from the usual Microsoft headers that lead to problems. Open Watcom, for example, internally defines PATH_MAX, whereas MSVC does not. Open Watcom provides a few additional POSIX-y functions on the Windows platform that, again, MSVC does not. The included patch fixes these minor problems. The changes should not effect compilation with any other compilers. I realize Open Watcom probably isn't directly supported at the moment. I currently have project files, however, that are building CPython with the Open Watcom toolchain with these patches (and a few additional patches - separate issues, though). ---------- components: Build, Windows files: openwatcom.3.3.2.patch keywords: patch messages: 200991 nosy: Jeffrey.Armstrong priority: normal severity: normal status: open title: Initial modernization of OpenWatcom support versions: Python 3.3 Added file: http://bugs.python.org/file32307/openwatcom.3.3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 04:05:01 2013 From: report at bugs.python.org (Jeffrey Armstrong) Date: Wed, 23 Oct 2013 02:05:01 +0000 Subject: [issue19356] Change argument _self in _io/textio.c Message-ID: <1382493901.92.0.326370616383.issue19356@psf.upfronthosting.co.za> New submission from Jeffrey Armstrong: At Modules/_io/textio.c:285, one argument to _PyIncrementalNewlineDecoder_decode is named "_self." The name "_self," however is a keyword on older Microsoft C compilers and certain other compilers attempting to maintain compatibility with Microsoft. Renaming the argument to "myself" would fix the problem with certain compilers (Microsoft C, Open Watcom, possibly more). Please note that this is not an issue with MSVC. ---------- components: Build, IO files: _self.3.3.2.patch keywords: patch messages: 200992 nosy: Jeffrey.Armstrong priority: normal severity: normal status: open title: Change argument _self in _io/textio.c versions: Python 3.3 Added file: http://bugs.python.org/file32308/_self.3.3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 04:30:09 2013 From: report at bugs.python.org (Jeffrey Armstrong) Date: Wed, 23 Oct 2013 02:30:09 +0000 Subject: [issue19356] Change argument _self in _io/textio.c In-Reply-To: <1382493901.92.0.326370616383.issue19356@psf.upfronthosting.co.za> Message-ID: <1382495409.48.0.098952223682.issue19356@psf.upfronthosting.co.za> Changes by Jeffrey Armstrong : ---------- type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 04:30:29 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 23 Oct 2013 02:30:29 +0000 Subject: [issue19353] on RHEL6 simple build fails with test_linux_constants (test.test_resource.ResourceTest) In-Reply-To: <1382462066.11.0.516691894777.issue19353@psf.upfronthosting.co.za> Message-ID: <1382495429.22.0.833384265993.issue19353@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Do we really need to test these constants in unit test? Other constants such as RLIMIT_STACK, RLIMIT_DATA, etc are not being tested. Other consideration includes people built custom kernel without these constants, or maybe they have outdated glibc. Additionally, it is very uncommon to use os.uname in unittest. Other than this test, it is only Lib/test/test_locale.py that uses os.uname. ---------- nosy: +vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 04:30:28 2013 From: report at bugs.python.org (Jeffrey Armstrong) Date: Wed, 23 Oct 2013 02:30:28 +0000 Subject: [issue19355] Initial modernization of OpenWatcom support In-Reply-To: <1382490807.69.0.90112979514.issue19355@psf.upfronthosting.co.za> Message-ID: <1382495428.1.0.788823254162.issue19355@psf.upfronthosting.co.za> Changes by Jeffrey Armstrong : ---------- type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 04:45:16 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 23 Oct 2013 02:45:16 +0000 Subject: [issue19353] on RHEL6 simple build fails with test_linux_constants (test.test_resource.ResourceTest) In-Reply-To: <1382462066.11.0.516691894777.issue19353@psf.upfronthosting.co.za> Message-ID: <1382496316.16.0.435307341508.issue19353@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Or if we really want to test these constants, we can use something like this: if hasattr(resource, 'RLIMIT_NICE'): self.assertIsInstance(resource.RLIMIT_NICE, int) Or if we want to be so strict: if hasattr(resource, 'RLIMIT_NICE'): self.assertTrue(-20 <= resource.RLIMIT_NICE <= 19) Reference: http://man7.org/conf/lca2006/Linux_2.6_changes/rlimit_5.html RLIMIT_NICE (2.6.12) Process nice value has range -20 (high) to +19 (low); influences kernel scheduler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 06:20:22 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 23 Oct 2013 04:20:22 +0000 Subject: [issue19332] Guard against changing dict during iteration In-Reply-To: <1382364174.9.0.836332683158.issue19332@psf.upfronthosting.co.za> Message-ID: <1382502022.17.0.0954140587348.issue19332@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The decision to not monitor adding or removing keys was intentional. It is just not worth the cost in either time or space. ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 06:49:49 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 23 Oct 2013 04:49:49 +0000 Subject: [issue18742] Abstract base class for hashlib In-Reply-To: <1376519472.63.0.753349393836.issue18742@psf.upfronthosting.co.za> Message-ID: <1382503789.61.0.727246596922.issue18742@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Consider inheriting from abc.ABC rather than specifying metaclass=abc.ABCMeta ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 07:27:17 2013 From: report at bugs.python.org (Eric Snow) Date: Wed, 23 Oct 2013 05:27:17 +0000 Subject: [issue19357] Module does not get pulled from sys.modules during importlib testing Message-ID: <1382506037.35.0.510357174656.issue19357@psf.upfronthosting.co.za> New submission from Eric Snow: In Lib/test/test_importlib/import_/test_caching.py, UseCache.test_using_cache "uncaches" "module_to_use", which it really ought to be yanking "some_module". ---------- assignee: eric.snow components: Tests messages: 200997 nosy: brett.cannon, eric.snow priority: normal severity: normal stage: needs patch status: open title: Module does not get pulled from sys.modules during importlib testing type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 07:31:46 2013 From: report at bugs.python.org (Eric Snow) Date: Wed, 23 Oct 2013 05:31:46 +0000 Subject: [issue19357] Module does not get pulled from sys.modules during importlib testing In-Reply-To: <1382506037.35.0.510357174656.issue19357@psf.upfronthosting.co.za> Message-ID: <1382506306.84.0.568274627309.issue19357@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 07:50:19 2013 From: report at bugs.python.org (Matej Cepl) Date: Wed, 23 Oct 2013 05:50:19 +0000 Subject: [issue19353] on RHEL6 simple build fails with test_linux_constants (test.test_resource.ResourceTest) In-Reply-To: <1382467430.63.0.177078080002.issue19353@psf.upfronthosting.co.za> Message-ID: <52676396.1040902@redhat.com> Matej Cepl added the comment: On 22/10/13 20:43, Christian Heimes wrote: > Christian Heimes added the comment: > > What's the output of "uname -r" on your machine? 2.6.32-358.23.2.el6.i686 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 07:52:46 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 23 Oct 2013 05:52:46 +0000 Subject: [issue19357] Module does not get pulled from sys.modules during importlib testing In-Reply-To: <1382506037.35.0.510357174656.issue19357@psf.upfronthosting.co.za> Message-ID: <3d4LMX2Gs2z7LjM@mail.python.org> Roundup Robot added the comment: New changeset 2a62cd8553b5 by Eric Snow in branch '3.3': [Issue #19357] Ensure module "loaded" during tests gets forgotten. http://hg.python.org/cpython/rev/2a62cd8553b5 New changeset 733be92448b0 by Eric Snow in branch 'default': [Issue #19357] Ensure module "loaded" during tests gets forgotten. http://hg.python.org/cpython/rev/733be92448b0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 07:54:12 2013 From: report at bugs.python.org (Eric Snow) Date: Wed, 23 Oct 2013 05:54:12 +0000 Subject: [issue19357] Module does not get pulled from sys.modules during importlib testing In-Reply-To: <1382506037.35.0.510357174656.issue19357@psf.upfronthosting.co.za> Message-ID: <1382507652.97.0.217235723284.issue19357@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 08:12:31 2013 From: report at bugs.python.org (Larry Hastings) Date: Wed, 23 Oct 2013 06:12:31 +0000 Subject: [issue19358] Integrate "Argument Clinic" into CPython build Message-ID: <1382508751.78.0.556655688797.issue19358@psf.upfronthosting.co.za> New submission from Larry Hastings: Somebody needs to figure out how to best integrate Argument Clinic into the build. Antoine, I think you said it sounded like... "fun"? Maybe? Anyway, I'm hoping you're willing to take a stab at it. If not please assign the issue back to nobody, and sorry the intrusion. ---------- assignee: pitrou components: Build messages: 201000 nosy: larry, pitrou priority: normal severity: normal status: open title: Integrate "Argument Clinic" into CPython build versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 08:17:56 2013 From: report at bugs.python.org (Eric Snow) Date: Wed, 23 Oct 2013 06:17:56 +0000 Subject: [issue19357] Module does not get pulled from sys.modules during importlib testing In-Reply-To: <1382506037.35.0.510357174656.issue19357@psf.upfronthosting.co.za> Message-ID: <1382509076.23.0.051887120842.issue19357@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 08:39:36 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 06:39:36 +0000 Subject: [issue19358] Integrate "Argument Clinic" into CPython build In-Reply-To: <1382508751.78.0.556655688797.issue19358@psf.upfronthosting.co.za> Message-ID: <1382510376.49.0.401575398791.issue19358@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: pitrou -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 08:40:29 2013 From: report at bugs.python.org (Larry Hastings) Date: Wed, 23 Oct 2013 06:40:29 +0000 Subject: [issue19358] Integrate "Argument Clinic" into CPython build In-Reply-To: <1382508751.78.0.556655688797.issue19358@psf.upfronthosting.co.za> Message-ID: <1382510429.09.0.323323426936.issue19358@psf.upfronthosting.co.za> Larry Hastings added the comment: Drat! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 08:45:05 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 06:45:05 +0000 Subject: [issue19356] Change argument _self in _io/textio.c In-Reply-To: <1382493901.92.0.326370616383.issue19356@psf.upfronthosting.co.za> Message-ID: <1382510705.04.0.758774632772.issue19356@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +brian.curtin, tim.golden versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 09:00:08 2013 From: report at bugs.python.org (Austin Bingham) Date: Wed, 23 Oct 2013 07:00:08 +0000 Subject: [issue19359] reversed() does not work with weakref.proxy of sequences Message-ID: <1382511608.51.0.706468574715.issue19359@psf.upfronthosting.co.za> New submission from Austin Bingham: When passed a weakref.proxy to a legitimate sequence, reversed() throws a TypeError complaining that its argument isn't a sequence. Perhaps this is the expected behavior, but it's surprising to at least me and the few others I've spoken with about it. ---------- components: Library (Lib) files: reversed_proxy_failure.py messages: 201002 nosy: abingham priority: normal severity: normal status: open title: reversed() does not work with weakref.proxy of sequences type: behavior versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file32309/reversed_proxy_failure.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 09:30:50 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 23 Oct 2013 07:30:50 +0000 Subject: [issue19356] Change argument _self in _io/textio.c In-Reply-To: <1382510705.1.0.521569220296.issue19356@psf.upfronthosting.co.za> Message-ID: <52677B26.107@timgolden.me.uk> Tim Golden added the comment: I don't feel strongly about this. However, ISTM that we work reasonably hard to work with the vagaries of *nix toolchains so I don't see why an unintrusive change like this shouldn't go in to support some corner cases on the Windows front. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 10:29:10 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 08:29:10 +0000 Subject: [issue19359] reversed() does not work with weakref.proxy of sequences In-Reply-To: <1382511608.51.0.706468574715.issue19359@psf.upfronthosting.co.za> Message-ID: <1382516950.3.0.708757075751.issue19359@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 10:31:32 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 08:31:32 +0000 Subject: [issue19358] Integrate "Argument Clinic" into CPython build In-Reply-To: <1382508751.78.0.556655688797.issue19358@psf.upfronthosting.co.za> Message-ID: <1382517092.75.0.555618231605.issue19358@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, I don't really know how to do it. You'd have to have a step that somehow scans for .c files in the source tree, looks for clinic headers and compute whether they're outdated? (but this must only be done if the .c files are younger than the .o files, i.e. the step should probably be integrated to the C compilation step) ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 10:49:53 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 08:49:53 +0000 Subject: [issue19356] Change argument _self in _io/textio.c In-Reply-To: <1382493901.92.0.326370616383.issue19356@psf.upfronthosting.co.za> Message-ID: <1382518193.84.0.948976020727.issue19356@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I see other instances of _self in elementtree and ctypes. Don't you want to replace those too? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 10:56:13 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 08:56:13 +0000 Subject: [issue19336] No API to get events from epoll without allocating a list In-Reply-To: <1382373266.71.0.522503434319.issue19336@psf.upfronthosting.co.za> Message-ID: <1382518573.04.0.622564285233.issue19336@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 10:56:55 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 23 Oct 2013 08:56:55 +0000 Subject: [issue17791] PC/pyconfig.h defines PREFIX macro In-Reply-To: <1366314379.89.0.227357780835.issue17791@psf.upfronthosting.co.za> Message-ID: <1382518615.14.0.524806737288.issue17791@psf.upfronthosting.co.za> Tim Golden added the comment: Ok by me: build and tests all ok. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 10:58:46 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 23 Oct 2013 08:58:46 +0000 Subject: [issue17791] PC/pyconfig.h defines PREFIX macro In-Reply-To: <1366314379.89.0.227357780835.issue17791@psf.upfronthosting.co.za> Message-ID: <1382518726.53.0.910273463071.issue17791@psf.upfronthosting.co.za> Christian Heimes added the comment: Fantastic! Does anybody know anything about Cygwin builds? I expect that Cygwin uses autoconf to generate its own pyconfig.h. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 11:00:54 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 09:00:54 +0000 Subject: [issue19336] No API to get events from epoll without allocating a list In-Reply-To: <1382373266.71.0.522503434319.issue19336@psf.upfronthosting.co.za> Message-ID: <1382518854.71.0.0438697833483.issue19336@psf.upfronthosting.co.za> Antoine Pitrou added the comment: A list of a couple events should be very cheap to allocate. How many events do you get? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 11:02:30 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 23 Oct 2013 09:02:30 +0000 Subject: [issue19336] No API to get events from epoll without allocating a list In-Reply-To: <1382373266.71.0.522503434319.issue19336@psf.upfronthosting.co.za> Message-ID: <1382518950.04.0.46872020304.issue19336@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 11:08:33 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 23 Oct 2013 09:08:33 +0000 Subject: [issue19336] No API to get events from epoll without allocating a list In-Reply-To: <1382373266.71.0.522503434319.issue19336@psf.upfronthosting.co.za> Message-ID: <1382519313.05.0.274522952622.issue19336@psf.upfronthosting.co.za> Christian Heimes added the comment: How is iterpoll() suppose to work? Do epoll_wait() with maxevents=1 in a loop, yield (fd, event) tuples and stop/block on no events? ---------- components: +Extension Modules type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 11:10:25 2013 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 23 Oct 2013 09:10:25 +0000 Subject: [issue19237] Proposal : LCM function to complement GCD In-Reply-To: <1381613985.13.0.579421159234.issue19237@psf.upfronthosting.co.za> Message-ID: <1382519425.17.0.127151210099.issue19237@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'm going to reject this for the reasons already given above. It's easy to write your own (lightweight, inefficient) lcm and multi-argument gcd if you need them. For more serious work, you probably want to avoid Python's gcd anyway---it's horribly inefficient, and there are 3rd party solutions for specialised number-theoretic work (e.g., SymPy, SAGE, gmpy2). ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 11:35:31 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 09:35:31 +0000 Subject: [issue19360] test_site fails when installed into $HOME/.local Message-ID: <1382520931.01.0.426696322436.issue19360@psf.upfronthosting.co.za> New submission from Antoine Pitrou: If I configure Python with "$HOME/.local" as a prefix, test_site fails: ====================================================================== FAIL: test_s_option (test.test_site.HelperFunctionsTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/cpython/opt/Lib/test/test_site.py", line 182, in test_s_option self.assertEqual(rc, 0) AssertionError: 1 != 0 This is because the user site then falls in the same place as the "main" site-packages: >>> site.getsitepackages() ['/home/antoine/.local/lib/python3.4/site-packages', '/home/antoine/.local/lib/site-python'] >>> site.getusersitepackages() '/home/antoine/.local/lib/python3.4/site-packages' (what is "site-python" btw??) ---------- components: Tests messages: 201011 nosy: christian.heimes, pitrou priority: low severity: normal stage: needs patch status: open title: test_site fails when installed into $HOME/.local type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 11:37:13 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 09:37:13 +0000 Subject: [issue19360] test_site fails when installed into $HOME/.local In-Reply-To: <1382520931.01.0.426696322436.issue19360@psf.upfronthosting.co.za> Message-ID: <1382521033.06.0.232743429741.issue19360@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Proposed patch. ---------- keywords: +patch Added file: http://bugs.python.org/file32310/test_site_19360.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 13:05:10 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 23 Oct 2013 11:05:10 +0000 Subject: [issue17762] platform.linux_distribution() should honor /etc/os-release In-Reply-To: <1366124468.64.0.40642643299.issue17762@psf.upfronthosting.co.za> Message-ID: <1382526310.1.0.599865991937.issue17762@psf.upfronthosting.co.za> Christian Heimes added the comment: *bump up* I'd like to see the feature in 3.4. It shouldn't be too hard to implement it. A patch would also solve #1322 and #9514 on most modern systems. For the record RHEL 5, RHEL 6.4, SLES 11 and Ubuntu 10.04 don't have /etc/os-release. Ubuntu 12.04 has the file. ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 13:06:48 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 23 Oct 2013 11:06:48 +0000 Subject: [issue17761] platform._parse_release_file doesn't close the /etc/lsb-release file, doesn't know about 'Ubuntu' In-Reply-To: <1366123744.99.0.817269180469.issue17761@psf.upfronthosting.co.za> Message-ID: <1382526408.78.0.333451736476.issue17761@psf.upfronthosting.co.za> Christian Heimes added the comment: #17762 suggests /etc/os-release instead of /etc/lsb-release. ---------- nosy: +christian.heimes type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 13:22:14 2013 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Wed, 23 Oct 2013 11:22:14 +0000 Subject: [issue19361] Specialize exceptions thrown by JSON parser Message-ID: <1382527334.08.0.362620105205.issue19361@psf.upfronthosting.co.za> New submission from Utkarsh Upadhyay: The JSON parser currently throws exceptions which contain information about where the error happened but this information is encoded in a string and not available to the programmer. This leads to issues like this: http://stackoverflow.com/questions/19519409/how-to-get-error-location-from-json-loads-in-python Would it be a problem if the errors thrown were specialized exceptions, e.g. JSONParsingError, which has ValueError as a base class with these details (line number, char number, etc.) exposed as public members? The changes required seem to be limited to changing http://hg.python.org/cpython/file/4c4f31a1b706/Lib/json/decoder.py and the related documentation. ---------- components: Extension Modules messages: 201015 nosy: musically_ut priority: normal severity: normal status: open title: Specialize exceptions thrown by JSON parser type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 13:25:09 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 23 Oct 2013 11:25:09 +0000 Subject: [issue19361] Specialize exceptions thrown by JSON parser In-Reply-To: <1382527334.08.0.362620105205.issue19361@psf.upfronthosting.co.za> Message-ID: <1382527509.73.0.387505530487.issue19361@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- components: +Library (Lib) nosy: +ezio.melotti, pitrou, rhettinger versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 13:30:26 2013 From: report at bugs.python.org (Jeffrey Armstrong) Date: Wed, 23 Oct 2013 11:30:26 +0000 Subject: [issue19356] Change argument _self in _io/textio.c In-Reply-To: <1382493901.92.0.326370616383.issue19356@psf.upfronthosting.co.za> Message-ID: <1382527826.34.0.999296169831.issue19356@psf.upfronthosting.co.za> Jeffrey Armstrong added the comment: That was sloppy of me to not check other modules. I hadn't encountered them in my build yet. Here's a patch for Modules/_ctypes/_ctypes.c and Modules/_ctypes/callbacks.c. The arguments were changed similarly to "myself." ---------- Added file: http://bugs.python.org/file32311/_ctypes._self.3.3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 13:31:14 2013 From: report at bugs.python.org (Jeffrey Armstrong) Date: Wed, 23 Oct 2013 11:31:14 +0000 Subject: [issue19356] Change argument _self in _io/textio.c In-Reply-To: <1382493901.92.0.326370616383.issue19356@psf.upfronthosting.co.za> Message-ID: <1382527874.19.0.146476573067.issue19356@psf.upfronthosting.co.za> Jeffrey Armstrong added the comment: And finally here's the necessary changes to Modules/_elementree.c as well. ---------- Added file: http://bugs.python.org/file32312/_elementree._self.3.3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 13:42:33 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 23 Oct 2013 11:42:33 +0000 Subject: [issue18314] Have os.unlink remove junction points In-Reply-To: <1372335321.1.0.479247042071.issue18314@psf.upfronthosting.co.za> Message-ID: <1382528553.46.0.470437718959.issue18314@psf.upfronthosting.co.za> Tim Golden added the comment: Just picking this up. Considering testing... My current proposal is to add junction point support to _winapi, initially for the sole purpose of testing this change, but with a view to possibly supporting it formally via the os module. Any better ideas? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 13:53:53 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Oct 2013 11:53:53 +0000 Subject: [issue18314] Have os.unlink remove junction points In-Reply-To: <1372335321.1.0.479247042071.issue18314@psf.upfronthosting.co.za> Message-ID: <1382529233.68.0.763830002358.issue18314@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 14:22:08 2013 From: report at bugs.python.org (Gareth Rees) Date: Wed, 23 Oct 2013 12:22:08 +0000 Subject: [issue19362] Documentation for len() fails to mention that it works on sets Message-ID: <1382530928.74.0.685857253341.issue19362@psf.upfronthosting.co.za> New submission from Gareth Rees: The help text for the len() built-in function says: Return the number of items of a sequence or mapping. This omits to mention that len() works on sets too. I suggest this be changed to: Return the number of items of a sequence, mapping, or set. Similarly, the documentation for len() says: The argument may be a sequence (string, tuple or list) or a mapping (dictionary). I suggest this be changed to The argument may be a sequence (string, tuple or list), a mapping (dictionary), or a set. (Of course, strictly speaking, len() accepts any object with a __len__ method, but sequences, mappings and sets are the ones that are built-in to the Python core, and so these are the ones it is important to mention in the help and the documentation.) ---------- assignee: docs at python components: Documentation files: len-set.patch keywords: patch messages: 201019 nosy: Gareth.Rees, docs at python priority: normal severity: normal status: open title: Documentation for len() fails to mention that it works on sets type: enhancement Added file: http://bugs.python.org/file32313/len-set.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 14:22:22 2013 From: report at bugs.python.org (Sunny K) Date: Wed, 23 Oct 2013 12:22:22 +0000 Subject: [issue19340] test_sysconfig.test_srcdir fails when sys.base_prefix="/" In-Reply-To: <1382390556.96.0.439992623328.issue19340@psf.upfronthosting.co.za> Message-ID: <1382530942.54.0.480994171238.issue19340@psf.upfronthosting.co.za> Changes by Sunny K : ---------- keywords: +patch Added file: http://bugs.python.org/file32314/test_sysconfig.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 14:31:37 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 23 Oct 2013 12:31:37 +0000 Subject: [issue19362] Documentation for len() fails to mention that it works on sets In-Reply-To: <1382530928.74.0.685857253341.issue19362@psf.upfronthosting.co.za> Message-ID: <1382531497.42.0.325706200715.issue19362@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 14:32:00 2013 From: report at bugs.python.org (Sunny K) Date: Wed, 23 Oct 2013 12:32:00 +0000 Subject: [issue19340] test_sysconfig.test_srcdir fails when sys.base_prefix="/" In-Reply-To: <1382390556.96.0.439992623328.issue19340@psf.upfronthosting.co.za> Message-ID: <1382531520.54.0.852555017638.issue19340@psf.upfronthosting.co.za> Changes by Sunny K : ---------- nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 15:16:29 2013 From: report at bugs.python.org (Gareth Rees) Date: Wed, 23 Oct 2013 13:16:29 +0000 Subject: [issue19363] Python 2.7's future_builtins.map is not compatible with Python 3's map Message-ID: <1382534189.14.0.63787411181.issue19363@psf.upfronthosting.co.za> New submission from Gareth Rees: In Python 2.7, future_builtins.map accepts None as its first (function) argument: Python 2.7.5 (default, Aug 1 2013, 01:01:17) >>> from future_builtins import map >>> list(map(None, range(3), 'ABC')) [(0, 'A'), (1, 'B'), (2, 'C')] But in Python 3.x, map does not accept None as its first argument: Python 3.3.2 (default, May 21 2013, 11:50:47) >>> list(map(None, range(3), 'ABC')) Traceback (most recent call last): File "", line 1, in TypeError: 'NoneType' object is not callable The documentation says, "if you want to write code compatible with Python 3 builtins, import them from this module," so this incompatibility may give Python 2.7 programmers the false impression that a program which uses map(None, ...) is portable to Python 3. I suggest that future_builtins.map in Python 2.7 should behave the same as map in Python 3: that is, it should raise a TypeError if None was passed as the first argument. ---------- components: Library (Lib) messages: 201020 nosy: Gareth.Rees priority: normal severity: normal status: open title: Python 2.7's future_builtins.map is not compatible with Python 3's map type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 15:24:19 2013 From: report at bugs.python.org (Jon Clements) Date: Wed, 23 Oct 2013 13:24:19 +0000 Subject: [issue19363] Python 2.7's future_builtins.map is not compatible with Python 3's map In-Reply-To: <1382534189.14.0.63787411181.issue19363@psf.upfronthosting.co.za> Message-ID: <1382534659.93.0.678990025779.issue19363@psf.upfronthosting.co.za> Changes by Jon Clements : ---------- nosy: +joncle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 15:25:17 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 13:25:17 +0000 Subject: [issue19340] test_sysconfig.test_srcdir fails when sys.base_prefix="/" In-Reply-To: <1382390556.96.0.439992623328.issue19340@psf.upfronthosting.co.za> Message-ID: <1382534717.31.0.980279910927.issue19340@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Patch looks fine to me. ---------- nosy: +pitrou priority: normal -> low stage: -> patch review versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 15:38:02 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 13:38:02 +0000 Subject: [issue19362] Documentation for len() fails to mention that it works on sets In-Reply-To: <1382530928.74.0.685857253341.issue19362@psf.upfronthosting.co.za> Message-ID: <1382535482.47.0.0893816633892.issue19362@psf.upfronthosting.co.za> Antoine Pitrou added the comment: "Return the number of items of a container" sounds simple and accurate to me. ---------- nosy: +pitrou, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 15:47:51 2013 From: report at bugs.python.org (Andrei Dorian Duma) Date: Wed, 23 Oct 2013 13:47:51 +0000 Subject: [issue17762] platform.linux_distribution() should honor /etc/os-release In-Reply-To: <1366124468.64.0.40642643299.issue17762@psf.upfronthosting.co.za> Message-ID: <1382536071.47.0.314447499365.issue17762@psf.upfronthosting.co.za> Andrei Dorian Duma added the comment: I'm working on a patch. Hopefully, it will be ready in a day or two. ---------- nosy: +AndreiDuma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 15:49:43 2013 From: report at bugs.python.org (Kassym Dorsel) Date: Wed, 23 Oct 2013 13:49:43 +0000 Subject: [issue19364] Implementing __getattr__ breaks copy and deepcopy Message-ID: <1382536183.12.0.651276140754.issue19364@psf.upfronthosting.co.za> New submission from Kassym Dorsel: When __getattr__ is implemented without also implementing __copy__ and __deepcopy__ trying to (deep)copy the class fails. >>> import copy >>> class foo(): ... def __getattr__(self, attr): ... return None ... >>> f = foo() >>> copy(f) Traceback (most recent call last): File "", line 1, in TypeError: 'module' object is not callable The copy module checks if a class has implemented __copy__ using hasattr: if hasattr(x, '__copy__'): ... An easy fix would be to use: if getattr(x, '__copy__', None): ... In Python 3 this change has already been made. ---------- components: Library (Lib) messages: 201024 nosy: Kassym.Dorsel, alexandre.vassalotti priority: normal severity: normal status: open title: Implementing __getattr__ breaks copy and deepcopy type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 15:56:31 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 Oct 2013 13:56:31 +0000 Subject: [issue19361] Specialize exceptions thrown by JSON parser In-Reply-To: <1382527334.08.0.362620105205.issue19361@psf.upfronthosting.co.za> Message-ID: <1382536591.54.0.824152548476.issue19361@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Simplejson already have JSONDecodeError. class JSONDecodeError(ValueError): """Subclass of ValueError with the following additional properties: msg: The unformatted error message doc: The JSON document being parsed pos: The start index of doc where parsing failed end: The end index of doc where parsing failed (may be None) lineno: The line corresponding to pos colno: The column corresponding to pos endlineno: The line corresponding to end (may be None) endcolno: The column corresponding to end (may be None) """ Adding it to the stdlib is only matter of time. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 15:59:50 2013 From: report at bugs.python.org (Gareth Rees) Date: Wed, 23 Oct 2013 13:59:50 +0000 Subject: [issue19362] Documentation for len() fails to mention that it works on sets In-Reply-To: <1382530928.74.0.685857253341.issue19362@psf.upfronthosting.co.za> Message-ID: <1382536790.76.0.000627324571274.issue19362@psf.upfronthosting.co.za> Gareth Rees added the comment: I considered suggesting "container", but the problem is that "container" is used elsewhere to mean "object supporting the 'in' operator" (in particular, collections.abc.Container has a __contains__ method but no __len__ method). The abstract base class for "object with a length" is collections.abc.Sized, but I don't think using the term "sized" would be clear to users. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 16:05:54 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 23 Oct 2013 14:05:54 +0000 Subject: [issue19362] Documentation for len() fails to mention that it works on sets In-Reply-To: <1382530928.74.0.685857253341.issue19362@psf.upfronthosting.co.za> Message-ID: <1382537154.14.0.377182050817.issue19362@psf.upfronthosting.co.za> R. David Murray added the comment: Perhaps it would be better to say that "the argument may be any object with a __len__, such as the commonly used Python sequence and container types str, bytes, tuple, list, dict, and set". After all, there are other built in types it works on as well: bytearray, frozenset, memoryview. For the other, "the number of items in a sequence or container type" would mostly cover it, but at the cost of being a bit obscure. Perhaps that's OK for the help text, though, since it is supposed to be a reminder, not the full documentation. Another even more obscure alternative would be "the number of items in a Sized object", which would also be more accurate (since an object with a __len__ doesn't *have* to conform fully to the sequence or container ABCs...nor does a container *have* to implement __len__). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 16:06:43 2013 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Wed, 23 Oct 2013 14:06:43 +0000 Subject: [issue19361] Specialize exceptions thrown by JSON parser In-Reply-To: <1382527334.08.0.362620105205.issue19361@psf.upfronthosting.co.za> Message-ID: <1382537203.35.0.173989479396.issue19361@psf.upfronthosting.co.za> Utkarsh Upadhyay added the comment: Excellent! Is there an issue for merging Simplejson into stdlib? If so, can this issue be linked to that issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 16:09:37 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 14:09:37 +0000 Subject: [issue19362] Documentation for len() fails to mention that it works on sets In-Reply-To: <1382537154.14.0.377182050817.issue19362@psf.upfronthosting.co.za> Message-ID: <489756252.104824019.1382537349780.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > Perhaps it would be better to say that "the argument may be any > object with a __len__, such as the commonly used Python sequence and > container types str, bytes, tuple, list, dict, and set". After all, > there are other built in types it works on as well: bytearray, > frozenset, memoryview. __len__ is an implementation detail for experts. Beginners don't need to know about __len__ in order to understand querying the length of a container. Similarly, they don't need to know about ABCs to understand, intuitively, what a container is ;-) ---------- title: Documentation for len() fails to mention that it works on sets -> Documentation for len() fails to mention that it works on sets _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 16:21:35 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 14:21:35 +0000 Subject: [issue1540] Refleak tests: test_doctest and test_gc are failing In-Reply-To: <1196606516.14.0.848950318684.issue1540@psf.upfronthosting.co.za> Message-ID: <1382538095.16.0.463364890938.issue1540@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The GC behaves gracefully in 3.4: the gc_bug script shows no uncollectable object. I don't think this is worth fixing in 3.3. ---------- nosy: +pitrou resolution: -> out of date status: open -> pending versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 16:22:11 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 14:22:11 +0000 Subject: [issue19345] Unclear phrasing in whatsnew/3.4.rst In-Reply-To: <1382435623.18.0.649588636826.issue19345@psf.upfronthosting.co.za> Message-ID: <1382538131.66.0.324373841538.issue19345@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: docs at python -> haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 16:25:52 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 23 Oct 2013 14:25:52 +0000 Subject: [issue1540] Refleak tests: test_doctest and test_gc are failing In-Reply-To: <1196606516.14.0.848950318684.issue1540@psf.upfronthosting.co.za> Message-ID: <1382538352.98.0.885612914088.issue1540@psf.upfronthosting.co.za> Christian Heimes added the comment: I agree with not fixing 3.3. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 16:36:02 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 Oct 2013 14:36:02 +0000 Subject: [issue19365] Quadratic complexity in the parsing of re replacement string Message-ID: <1382538962.45.0.421817949827.issue19365@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: sre_parse.parse_template uses string concatenation to accumulate characters. def literal(literal, p=p, pappend=a): if p and p[-1][0] is LITERAL: p[-1] = LITERAL, p[-1][1] + literal else: pappend((LITERAL, literal)) This operation have quadratic calculation complexity for long replacement strings. $ ./python -m timeit -n1 -r1 -s "from sre_parse import parse_template; repl = 'x'*100000" "parse_template(repl, '')" 1 loops, best of 1: 3.38 sec per loop $ ./python -m timeit -n1 -r1 -s "from sre_parse import parse_template; repl = 'x'*200000" "parse_template(repl, '')" 1 loops, best of 1: 18.2 sec per loop The proposed patch change amortized complexity to be linear. It also speeds up parsing shorter strings. $ ./python -m timeit -n1 -r1 -s "from sre_parse import parse_template; repl = 'x'*100000" "parse_template(repl, '')" 1 loops, best of 1: 915 msec per loop $ ./python -m timeit -n1 -r1 -s "from sre_parse import parse_template; repl = 'x'*200000" "parse_template(repl, '')" 1 loops, best of 1: 1.79 sec per loop ---------- components: Library (Lib), Regular Expressions files: re_parse_template.patch keywords: patch messages: 201032 nosy: ezio.melotti, mrabarnett, pitrou, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Quadratic complexity in the parsing of re replacement string type: performance versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32315/re_parse_template.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 16:37:15 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 23 Oct 2013 14:37:15 +0000 Subject: [issue19362] Documentation for len() fails to mention that it works on sets In-Reply-To: <1382530928.74.0.685857253341.issue19362@psf.upfronthosting.co.za> Message-ID: <1382539035.47.0.393791481945.issue19362@psf.upfronthosting.co.za> R. David Murray added the comment: I thought we were talking about the reference guide, not the tutorial? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 16:40:02 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 14:40:02 +0000 Subject: [issue1540] Refleak tests: test_doctest and test_gc are failing In-Reply-To: <1196606516.14.0.848950318684.issue1540@psf.upfronthosting.co.za> Message-ID: <1382539202.1.0.0865547294174.issue1540@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 16:40:46 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 14:40:46 +0000 Subject: [issue19362] Documentation for len() fails to mention that it works on sets In-Reply-To: <1382530928.74.0.685857253341.issue19362@psf.upfronthosting.co.za> Message-ID: <1382539246.27.0.277543747789.issue19362@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, the patch is for the builtins documentation as well as len.__doc__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 16:47:38 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 23 Oct 2013 14:47:38 +0000 Subject: [issue19365] Quadratic complexity in the parsing of re replacement string In-Reply-To: <1382538962.45.0.421817949827.issue19365@psf.upfronthosting.co.za> Message-ID: <1382539658.84.0.101765785939.issue19365@psf.upfronthosting.co.za> Christian Heimes added the comment: LTGM except for Python 2.7. I think we should slowly stop applying optimizations and other non-critical fixes to 2.7. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 16:58:02 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 14:58:02 +0000 Subject: [issue19365] Quadratic complexity in the parsing of re replacement string In-Reply-To: <1382538962.45.0.421817949827.issue19365@psf.upfronthosting.co.za> Message-ID: <1382540282.02.0.166453774237.issue19365@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Normally optimizations should only land in the default branch, unless it's catastrophic regression. ---------- nosy: +tim.peters versions: -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 18:29:22 2013 From: report at bugs.python.org (George King) Date: Wed, 23 Oct 2013 16:29:22 +0000 Subject: [issue19366] Segfault in REPL due to escaped tab. Message-ID: <1382545762.91.0.129230016295.issue19366@psf.upfronthosting.co.za> New submission from George King: I can crash python2.7.5 python3.3.2 from the REPL consistently: $ python3 Python 3.3.2 (v3.3.2:d047928ae3f6, May 13 2013, 13:52:24) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> s = '\\t' >>> s Segmentation fault: 11 $ the same goes for: Python 2.7.5 (v2.7.5:ab05e7dd2788, May 13 2013, 13:18:45) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin both of these python builds are the mac binaries from python.org. ---------- components: Interpreter Core messages: 201037 nosy: George.King priority: normal severity: normal status: open title: Segfault in REPL due to escaped tab. type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 18:34:02 2013 From: report at bugs.python.org (George King) Date: Wed, 23 Oct 2013 16:34:02 +0000 Subject: [issue19366] Segfault in REPL due to escaped tab. In-Reply-To: <1382545762.91.0.129230016295.issue19366@psf.upfronthosting.co.za> Message-ID: <1382546042.85.0.614004133899.issue19366@psf.upfronthosting.co.za> George King added the comment: actually, the second line of any interactive session is segfaulting; my installation must be corrupted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 18:37:34 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 16:37:34 +0000 Subject: [issue19366] Segfault in REPL due to escaped tab. In-Reply-To: <1382545762.91.0.129230016295.issue19366@psf.upfronthosting.co.za> Message-ID: <1382546254.76.0.749671959897.issue19366@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +hynek, ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 18:39:22 2013 From: report at bugs.python.org (George King) Date: Wed, 23 Oct 2013 16:39:22 +0000 Subject: [issue19366] Segfault in REPL due to escaped tab. In-Reply-To: <1382545762.91.0.129230016295.issue19366@psf.upfronthosting.co.za> Message-ID: <1382546362.72.0.968397156032.issue19366@psf.upfronthosting.co.za> George King added the comment: this is probably due to system upgrade from OS X 10.8 to 10.9 (mavericks) yesterday. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 18:42:07 2013 From: report at bugs.python.org (Phil Connell) Date: Wed, 23 Oct 2013 16:42:07 +0000 Subject: [issue14157] time.strptime without a year fails on Feb 29 In-Reply-To: <1330516668.55.0.549591415618.issue14157@psf.upfronthosting.co.za> Message-ID: <1382546527.22.0.602496406645.issue14157@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 18:46:07 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 23 Oct 2013 16:46:07 +0000 Subject: [issue19336] No API to get events from epoll without allocating a list In-Reply-To: <1382519313.05.0.274522952622.issue19336@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: I'm also skeptical: I doubt the list allocation weights much compared to the syscall. And like Christian, I'm curious to know which implementation you'd chose. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 18:47:17 2013 From: report at bugs.python.org (Tim Peters) Date: Wed, 23 Oct 2013 16:47:17 +0000 Subject: [issue19366] Segfault in REPL due to escaped tab. In-Reply-To: <1382545762.91.0.129230016295.issue19366@psf.upfronthosting.co.za> Message-ID: <1382546837.42.0.0141232442951.issue19366@psf.upfronthosting.co.za> Tim Peters added the comment: See the 4th comment on this post: http://stackoverflow.com/questions/18158381/python-crashing-when-running-two-commands Let us know whether it fixes your problem! ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 18:48:51 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Oct 2013 16:48:51 +0000 Subject: [issue19366] Segfault in REPL due to escaped tab. In-Reply-To: <1382545762.91.0.129230016295.issue19366@psf.upfronthosting.co.za> Message-ID: <1382546931.83.0.938163257912.issue19366@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- assignee: -> ronaldoussoren components: +Macintosh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 18:51:20 2013 From: report at bugs.python.org (Tim Peters) Date: Wed, 23 Oct 2013 16:51:20 +0000 Subject: [issue19366] Segfault in REPL due to escaped tab. In-Reply-To: <1382545762.91.0.129230016295.issue19366@psf.upfronthosting.co.za> Message-ID: <1382547080.21.0.193265949148.issue19366@psf.upfronthosting.co.za> Tim Peters added the comment: Oops! Now it' the 5th comment ;-) The one starting "running the following command, I got it working ...". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 18:55:14 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 23 Oct 2013 16:55:14 +0000 Subject: [issue19345] Unclear phrasing in whatsnew/3.4.rst In-Reply-To: <1382435623.18.0.649588636826.issue19345@psf.upfronthosting.co.za> Message-ID: <3d4d3w737Gz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 5e606f093d8f by Victor Stinner in branch 'default': Close #19345: fix typo http://hg.python.org/cpython/rev/5e606f093d8f ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 19:08:16 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 23 Oct 2013 17:08:16 +0000 Subject: [issue19340] test_sysconfig.test_srcdir fails when sys.base_prefix="/" In-Reply-To: <1382390556.96.0.439992623328.issue19340@psf.upfronthosting.co.za> Message-ID: <3d4dMM2gzCz7LjR@mail.python.org> Roundup Robot added the comment: New changeset ef6eb5ce4f8e by Antoine Pitrou in branch '3.3': Issue #19340: Fix test_sysconfig when Python is built with an empty prefix. http://hg.python.org/cpython/rev/ef6eb5ce4f8e New changeset f797a14cbcfd by Antoine Pitrou in branch 'default': Issue #19340: Fix test_sysconfig when Python is built with an empty prefix. http://hg.python.org/cpython/rev/f797a14cbcfd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 19:09:19 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 17:09:19 +0000 Subject: [issue19340] test_sysconfig.test_srcdir fails when sys.base_prefix="/" In-Reply-To: <1382390556.96.0.439992623328.issue19340@psf.upfronthosting.co.za> Message-ID: <1382548159.17.0.896865574722.issue19340@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Patched committed, thank you! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 19:13:04 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 23 Oct 2013 17:13:04 +0000 Subject: [issue19352] unittest loader barfs on symlinks In-Reply-To: <1382452375.52.0.637202424401.issue19352@psf.upfronthosting.co.za> Message-ID: <3d4dSV5myRz7LjR@mail.python.org> Roundup Robot added the comment: New changeset d7ec961cea1c by Antoine Pitrou in branch '2.7': Issue #19352: Fix unittest discovery when a module can be reached through several paths (e.g. under Debian/Ubuntu with virtualenv). http://hg.python.org/cpython/rev/d7ec961cea1c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 19:16:41 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 23 Oct 2013 17:16:41 +0000 Subject: [issue19352] unittest loader barfs on symlinks In-Reply-To: <1382452375.52.0.637202424401.issue19352@psf.upfronthosting.co.za> Message-ID: <3d4dY42ZqJz7LjR@mail.python.org> Roundup Robot added the comment: New changeset a830cc1c0565 by Antoine Pitrou in branch '3.3': Issue #19352: Fix unittest discovery when a module can be reached through several paths (e.g. under Debian/Ubuntu with virtualenv). http://hg.python.org/cpython/rev/a830cc1c0565 New changeset ebbe87204114 by Antoine Pitrou in branch 'default': Issue #19352: Fix unittest discovery when a module can be reached through several paths (e.g. under Debian/Ubuntu with virtualenv). http://hg.python.org/cpython/rev/ebbe87204114 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 19:17:15 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 17:17:15 +0000 Subject: [issue19352] unittest loader barfs on symlinks In-Reply-To: <1382452375.52.0.637202424401.issue19352@psf.upfronthosting.co.za> Message-ID: <1382548635.27.0.103301724683.issue19352@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Fixed! ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 19:22:03 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 23 Oct 2013 17:22:03 +0000 Subject: [issue19356] Change argument _self in _io/textio.c In-Reply-To: <1382493901.92.0.326370616383.issue19356@psf.upfronthosting.co.za> Message-ID: <3d4dgG1nSDz7LmV@mail.python.org> Roundup Robot added the comment: New changeset 763af3d957f3 by Antoine Pitrou in branch '3.3': Issue #19356: Avoid using a C variabled named "_self", it's a reserved word in some C compilers. http://hg.python.org/cpython/rev/763af3d957f3 New changeset f6430aec5bf2 by Antoine Pitrou in branch 'default': Issue #19356: Avoid using a C variabled named "_self", it's a reserved word in some C compilers. http://hg.python.org/cpython/rev/f6430aec5bf2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 19:22:33 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 17:22:33 +0000 Subject: [issue19356] Change argument _self in _io/textio.c In-Reply-To: <1382493901.92.0.326370616383.issue19356@psf.upfronthosting.co.za> Message-ID: <1382548953.14.0.868461262991.issue19356@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks for the patches, they're committed now. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 19:35:43 2013 From: report at bugs.python.org (MrE Merry) Date: Wed, 23 Oct 2013 17:35:43 +0000 Subject: [issue19367] IDLE wont open Message-ID: <1382549743.62.0.543177432072.issue19367@psf.upfronthosting.co.za> New submission from MrE Merry: Python IDLE won't open - just get firewall error message, yet no firewalls are present. Tried both on school laptop (I'm a teacher) and pupil work station (logged on as myself). Students are able to open IDLE without issues. ---------- components: IDLE files: Error.gif messages: 201051 nosy: MrE.Merry priority: normal severity: normal status: open title: IDLE wont open type: performance versions: Python 3.3 Added file: http://bugs.python.org/file32316/Error.gif _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 20:05:33 2013 From: report at bugs.python.org (Ned Deily) Date: Wed, 23 Oct 2013 18:05:33 +0000 Subject: [issue19366] Segfault in REPL due to escaped tab. In-Reply-To: <1382545762.91.0.129230016295.issue19366@psf.upfronthosting.co.za> Message-ID: <1382551533.15.0.518337087852.issue19366@psf.upfronthosting.co.za> Ned Deily added the comment: This is a duplicate of Issue18458. The problem is due to an incompatible update to the GNU readline compatibility layer of the editline shared library (libedit) in OS X 10.9. The fix for this will be in the upcoming Python 2.7.6 and 3.3.3 maintenance releases, expected soon. In the meantime, the workaround proposed in the Stackoverflow comment will eliminate the crash. (Issue18458 will be updated shortly to include a script to do this.) ---------- assignee: ronaldoussoren -> ned.deily resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> interactive interpreter crashes and test_readline fails with newer versions of libedit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 20:51:00 2013 From: report at bugs.python.org (Garrett Cooper) Date: Wed, 23 Oct 2013 18:51:00 +0000 Subject: [issue5300] distutils ignores file permissions In-Reply-To: <1234907694.25.0.317480697226.issue5300@psf.upfronthosting.co.za> Message-ID: <1382554260.85.0.19432776204.issue5300@psf.upfronthosting.co.za> Garrett Cooper added the comment: The whole permissions setting operation seems a bit convoluted. I was hoping there was something formalized with install_data.py where I could specify a default or fine-grained user/group/mode for files, but it doesn't appear to be possible. I'll investigate applying a custom rule after install is run, but I would prefer for this to be formalized in the future. ---------- nosy: +yaneurabeya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 20:55:15 2013 From: report at bugs.python.org (=?utf-8?q?Kim_Gr=C3=A4sman?=) Date: Wed, 23 Oct 2013 18:55:15 +0000 Subject: [issue18314] Have os.unlink remove junction points In-Reply-To: <1372335321.1.0.479247042071.issue18314@psf.upfronthosting.co.za> Message-ID: <1382554515.44.0.684231189558.issue18314@psf.upfronthosting.co.za> Kim Gr?sman added the comment: I didn't know about _winapi; looks like a good place! It looks like it exposes the Windows API pretty faithfully, but the junction point stuff feels like it would be better represented as a simple _winapi.CreateJunctionPoint(source, target) rather than attempting to expose DeviceIoControl and associated structures. I'll try to cook up a patch and we can argue about details based on that :-) Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 20:56:48 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 23 Oct 2013 18:56:48 +0000 Subject: [issue18314] Have os.unlink remove junction points In-Reply-To: <1382554515.44.0.684231189558.issue18314@psf.upfronthosting.co.za> Message-ID: <52681BE9.9010802@timgolden.me.uk> Tim Golden added the comment: Sounds like a decent plan to me. Good luck with the buffer sizing! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 21:09:57 2013 From: report at bugs.python.org (George King) Date: Wed, 23 Oct 2013 19:09:57 +0000 Subject: [issue19366] Segfault in REPL due to escaped tab. In-Reply-To: <1382545762.91.0.129230016295.issue19366@psf.upfronthosting.co.za> Message-ID: <1382555397.68.0.896874766729.issue19366@psf.upfronthosting.co.za> George King added the comment: thank you. i worked around this by building python3 from source, with gnu readline libs i had previously compiled (those did not require a rebuild on osx 10.9). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 21:28:36 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 23 Oct 2013 19:28:36 +0000 Subject: [issue19365] Quadratic complexity in the parsing of re replacement string In-Reply-To: <1382538962.45.0.421817949827.issue19365@psf.upfronthosting.co.za> Message-ID: <3d4hSv0C6Gz7LjP@mail.python.org> Roundup Robot added the comment: New changeset b322047fec55 by Serhiy Storchaka in branch 'default': Issue #19365: Optimized the parsing of long replacement string in re.sub*() http://hg.python.org/cpython/rev/b322047fec55 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 21:29:47 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 Oct 2013 19:29:47 +0000 Subject: [issue19365] Quadratic complexity in the parsing of re replacement string In-Reply-To: <1382538962.45.0.421817949827.issue19365@psf.upfronthosting.co.za> Message-ID: <1382556587.89.0.785538800576.issue19365@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Antoine for your review. ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 21:36:52 2013 From: report at bugs.python.org (Matt Dodge) Date: Wed, 23 Oct 2013 19:36:52 +0000 Subject: [issue19368] Seg Fault after upgrading to OS X Mavericks Message-ID: <1382557011.89.0.0764735802945.issue19368@psf.upfronthosting.co.za> New submission from Matt Dodge: Upgraded to OS X Mavericks (not sure if this is what caused it or not). Running Python 2.7.5 (v2.7.5:ab05e7dd2788, May 13 2013, 13:18:45) Python will seg fault when trying to evaluate the expression bool('False') To reproduce, from terminal, launch Python, enter "bool('False')" without quotes and press enter. ---------- assignee: ronaldoussoren components: Macintosh files: debug.out messages: 201059 nosy: Matt.Dodge, ronaldoussoren priority: normal severity: normal status: open title: Seg Fault after upgrading to OS X Mavericks type: crash versions: Python 2.7 Added file: http://bugs.python.org/file32317/debug.out _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 21:38:27 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 19:38:27 +0000 Subject: [issue19369] PyObject_LengthHint is slow Message-ID: <1382557107.61.0.118222715036.issue19369@psf.upfronthosting.co.za> New submission from Antoine Pitrou: PyObject_LengthHint is in the critical patch for many operations (such as list constructor, or list.extend), but it's quite unoptimized. ---------- components: Interpreter Core messages: 201060 nosy: benjamin.peterson, pitrou, rhettinger priority: normal severity: normal status: open title: PyObject_LengthHint is slow type: performance versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 21:40:47 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 19:40:47 +0000 Subject: [issue19369] PyObject_LengthHint is slow In-Reply-To: <1382557107.61.0.118222715036.issue19369@psf.upfronthosting.co.za> Message-ID: <1382557247.52.0.946966114078.issue19369@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch. Micro-benchmark: $ ./python -m timeit -s "l=[]; it=(x for x in ())" "l.extend(it)" -> before: 0.449 usec per loop -> after: 0.179 usec per loop ---------- keywords: +patch Added file: http://bugs.python.org/file32318/lengthhint.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 21:46:02 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 Oct 2013 19:46:02 +0000 Subject: [issue19332] Guard against changing dict during iteration In-Reply-To: <1382364174.9.0.836332683158.issue19332@psf.upfronthosting.co.za> Message-ID: <1382557562.03.0.635238636735.issue19332@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In the first patch the counter was placed in the _dictkeysobject structure. In the second place it is placed in the PyDictObject so it now has no memory cost. Access time to new counter for non-modifying operations is same as in current code. The only additional cost is time cost for modifying operations. But modifying operations is usually much rare than non-modifying operations, and the incrementing one field takes only small part of the time needed for all operation. I don't think this will affect total performance of real programs. ---------- Added file: http://bugs.python.org/file32319/dict_mutating_iteration_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 21:48:27 2013 From: report at bugs.python.org (Ned Deily) Date: Wed, 23 Oct 2013 19:48:27 +0000 Subject: [issue19368] Seg Fault after upgrading to OS X Mavericks In-Reply-To: <1382557011.89.0.0764735802945.issue19368@psf.upfronthosting.co.za> Message-ID: <1382557707.55.0.713625106681.issue19368@psf.upfronthosting.co.za> Ned Deily added the comment: This is a duplicate of Issue18458. The problem is due to an incompatible update to the GNU readline compatibility layer of the editline shared library (libedit) in OS X 10.9. The fix for this will be in the upcoming Python 2.7.6 and 3.3.3 maintenance releases, expected soon. In the meantime, you can avoid the crash by disabling the readline extension module (Issue18458 will be updated shortly to include a script to do this): cd /Library/Frameworks/Python.framework/Versions/2.7 cd ./lib/python2.7/lib-dynload sudo mv readline.so readline.so.disabled ---------- nosy: +ned.deily resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> interactive interpreter crashes and test_readline fails with newer versions of libedit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 21:58:35 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 19:58:35 +0000 Subject: [issue19332] Guard against changing dict during iteration In-Reply-To: <1382364174.9.0.836332683158.issue19332@psf.upfronthosting.co.za> Message-ID: <1382558315.29.0.034054036032.issue19332@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 22:04:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 23 Oct 2013 20:04:01 +0000 Subject: [issue19360] test_site fails when installed into $HOME/.local In-Reply-To: <1382520931.01.0.426696322436.issue19360@psf.upfronthosting.co.za> Message-ID: <3d4jG82fLBz7Ljf@mail.python.org> Roundup Robot added the comment: New changeset 7f465e154b6d by Antoine Pitrou in branch '3.3': Issue #19360: fix test_site when Python is installed into $HOME/.local http://hg.python.org/cpython/rev/7f465e154b6d New changeset 61463ff7dc68 by Antoine Pitrou in branch 'default': Issue #19360: fix test_site when Python is installed into $HOME/.local http://hg.python.org/cpython/rev/61463ff7dc68 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 22:04:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 20:04:28 +0000 Subject: [issue19360] test_site fails when installed into $HOME/.local In-Reply-To: <1382520931.01.0.426696322436.issue19360@psf.upfronthosting.co.za> Message-ID: <1382558668.58.0.950435042611.issue19360@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 22:10:35 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 20:10:35 +0000 Subject: [issue19332] Guard against changing dict during iteration In-Reply-To: <1382364174.9.0.836332683158.issue19332@psf.upfronthosting.co.za> Message-ID: <1382559035.47.0.0757072342624.issue19332@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If there's no performance regression, then this sounds like a reasonable idea. The remaining question would be whether it can break existing code. Perhaps you should ask python-dev? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 22:23:45 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 Oct 2013 20:23:45 +0000 Subject: [issue19369] PyObject_LengthHint is slow In-Reply-To: <1382557107.61.0.118222715036.issue19369@psf.upfronthosting.co.za> Message-ID: <1382559825.42.0.933456650374.issue19369@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What if use _PyObject_HasLen? if (_PyObject_HasLen(o)) { res = PyObject_Length(o); ... } hint = _PyObject_LookupSpecial(o, &PyId___length_hint__); ... ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 22:31:48 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 Oct 2013 20:31:48 +0000 Subject: [issue18684] Pointers point out of array bound in _sre.c In-Reply-To: <1375962984.07.0.918202360038.issue18684@psf.upfronthosting.co.za> Message-ID: <1382560308.45.0.53917628399.issue18684@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Because currently there is no way to test behavior change of this patch (besides rollback a patch committed in issue17998) I think that it worth to apply only in 3.4. When the bug will be reproduced we could backport it to maintenance releases. ---------- versions: -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 22:32:00 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 Oct 2013 20:32:00 +0000 Subject: [issue18685] Restore re performance to pre-PEP393 level In-Reply-To: <1375967417.95.0.0303828296889.issue18685@psf.upfronthosting.co.za> Message-ID: <1382560320.56.0.25103220792.issue18685@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: -Pointers point out of array bound in _sre.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 23:01:50 2013 From: report at bugs.python.org (Robert Xiao) Date: Wed, 23 Oct 2013 21:01:50 +0000 Subject: [issue18458] interactive interpreter crashes and test_readline fails with newer versions of libedit In-Reply-To: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> Message-ID: <1382562110.26.0.527167736463.issue18458@psf.upfronthosting.co.za> Robert Xiao added the comment: I've attached a fixed readline.so built from today's 2.7 branch, for the convenience of anyone who upgraded to 10.9 and now has crashing Python. Drop the file in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload, replacing the original readline.so. This file is compatible with both 32-bit and 64-bit python.org builds of Python 2.7.5. ---------- nosy: +nneonneo Added file: http://bugs.python.org/file32320/readline.so _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 23:05:45 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 23 Oct 2013 21:05:45 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1382562345.64.0.454033760496.issue19331@psf.upfronthosting.co.za> Changes by Ethan Furman : Added file: http://bugs.python.org/file32321/issue19331.stoneleaf.02.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 23:26:05 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Wed, 23 Oct 2013 21:26:05 +0000 Subject: [issue19359] reversed() does not work with weakref.proxy of sequences In-Reply-To: <1382511608.51.0.706468574715.issue19359@psf.upfronthosting.co.za> Message-ID: <1382563565.18.0.627103143602.issue19359@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Attached an attemptive patch. ---------- keywords: +patch nosy: +Claudiu.Popa Added file: http://bugs.python.org/file32322/reversed_proxy.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 23:42:54 2013 From: report at bugs.python.org (Ned Deily) Date: Wed, 23 Oct 2013 21:42:54 +0000 Subject: [issue18458] interactive interpreter crashes and test_readline fails with newer versions of libedit In-Reply-To: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> Message-ID: <1382564574.19.0.373667283204.issue18458@psf.upfronthosting.co.za> Ned Deily added the comment: Robert, I appreciate your effort but I do not think it is good practice to recommend downloading and installing binary bits from the bug tracker from an uploaded file. Also, at a cursory examination, the readline.so supplied is not exactly a drop-in replacement for the one supplied by the python.org installer as it is linked with wrong ncurses library. We should have a new set of maintenance releases soon. My preference would be for you to delete that file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 23:43:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 Oct 2013 21:43:58 +0000 Subject: [issue19369] PyObject_LengthHint is slow In-Reply-To: <1382557107.61.0.118222715036.issue19369@psf.upfronthosting.co.za> Message-ID: <1382564638.74.0.412530225168.issue19369@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which uses _PyObject_HasLen. It has same performance but is much simpler. ---------- Added file: http://bugs.python.org/file32323/lengthhint_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 23:45:49 2013 From: report at bugs.python.org (Henry Corrigan-Gibbs) Date: Wed, 23 Oct 2013 21:45:49 +0000 Subject: [issue19370] Entering integers in python interpreter causes segfault Message-ID: <1382564749.14.0.874044280359.issue19370@psf.upfronthosting.co.za> New submission from Henry Corrigan-Gibbs: Since upgrading to Mac OS X 10.9 (13A603), the interactive python interpreter crashes after I enter two lines of code, no matter how simple they are. The trace below shows that the shell segfaults after entering the integer "1" followed by the integer "1" (on separate lines). The computer is a Macbook Pro, but I was able to reproduce the bug on a Macbook Air as well. ######### ### Trace of session ### $ python Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> 1 1 >>> 1 Segmentation fault: 11 ######### ### Apple crash report data ### Process: Python [1664] Path: /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python Identifier: Python Version: 2.7.2 (2.7.2) Code Type: X86-64 (Native) Parent Process: bash [1661] Responsible: Terminal [1658] User ID: 501 Date/Time: 2013-10-23 14:38:46.854 -0700 OS Version: Mac OS X 10.9 (13A603) Report Version: 11 Anonymous UUID: 7AFE5583-559F-1AF6-8F53-1AB95063B98E Sleep/Wake UUID: 0112A8E8-BB6F-4797-A38D-DA6F40F06329 Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000 VM Regions Near 0: --> __TEXT 0000000100000000-0000000100001000 [ 4K] r-x/rwx SM=COW /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 readline.so 0x00000001002edf97 call_readline + 647 1 org.python.python 0x0000000100008ad2 PyOS_Readline + 274 2 org.python.python 0x000000010000a328 tok_nextc + 104 3 org.python.python 0x000000010000aad3 PyTokenizer_Get + 147 4 org.python.python 0x00000001000056ca parsetok + 218 5 org.python.python 0x00000001000e63b2 PyParser_ASTFromFile + 146 6 org.python.python 0x00000001000e7613 PyRun_InteractiveOneFlags + 243 7 org.python.python 0x00000001000e78fe PyRun_InteractiveLoopFlags + 78 8 org.python.python 0x00000001000e80e1 PyRun_AnyFileExFlags + 161 9 org.python.python 0x00000001000fe77c Py_Main + 2940 10 org.python.python 0x0000000100000f14 0x100000000 + 3860 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000000000000 rbx: 0x000000010035c140 rcx: 0x00000000000fc080 rdx: 0x0000000000087db0 rdi: 0x0000000000000000 rsi: 0x00000001002ee254 rbp: 0x00007fff5fbff660 rsp: 0x00007fff5fbff590 r8: 0x000000010035e700 r9: 0x000000010035e750 r10: 0x000000003500e0a1 r11: 0x0000000000000001 r12: 0x0000000000000001 r13: 0x0000000000000001 r14: 0x00007fff5fbff620 r15: 0x00007fff5fbff5a0 rip: 0x00000001002edf97 rfl: 0x0000000000010202 cr2: 0x0000000000000000 Logical CPU: 1 Error Code: 0x00000004 Trap Number: 14 Binary Images: 0x100000000 - 0x100000fff +org.python.python (2.7.2 - 2.7.2) <639E72E4-F205-C034-8E34-E59DE9C46369> /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python 0x100003000 - 0x10016cfef +org.python.python (2.7.2, [c] 2004-2011 Python Software Foundation. - 2.7.2) <49D18B1A-C92D-E32E-A7C1-086D0B14BD76> /Library/Frameworks/Python.framework/Versions/2.7/Python 0x1002ec000 - 0x1002eefff +readline.so (???) <25AB2CA6-C3CC-9F24-F619-C85D51AD8A38> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/readline.so 0x1004b0000 - 0x1004ceffb libedit.2.dylib (39) <1B0596DB-F336-32E7-BB9F-51BF70DB5305> /usr/lib/libedit.2.dylib 0x7fff6cc9f000 - 0x7fff6ccd2817 dyld (239.3) /usr/lib/dyld 0x7fff885e1000 - 0x7fff8860aff7 libc++abi.dylib (48) <8C16158F-CBF8-3BD7-BEF4-022704B2A326> /usr/lib/libc++abi.dylib 0x7fff8860b000 - 0x7fff88659fff libcorecrypto.dylib (161.1) /usr/lib/system/libcorecrypto.dylib 0x7fff88d06000 - 0x7fff88d17ff7 libz.1.dylib (53) <42E0C8C6-CA38-3CA4-8619-D24ED5DD492E> /usr/lib/libz.1.dylib 0x7fff88d6e000 - 0x7fff88d77ff3 libsystem_notify.dylib (121) <52571EC3-6894-37E4-946E-064B021ED44E> /usr/lib/system/libsystem_notify.dylib 0x7fff896da000 - 0x7fff896dbff7 libDiagnosticMessagesClient.dylib (100) <4CDB0F7B-C0AF-3424-BC39-495696F0DB1E> /usr/lib/libDiagnosticMessagesClient.dylib 0x7fff89a9b000 - 0x7fff89a9eff7 libdyld.dylib (239.3) <62F4D752-4089-31A8-8B73-B95A68893B3C> /usr/lib/system/libdyld.dylib 0x7fff8a059000 - 0x7fff8a05dfff libsystem_stats.dylib (93.1.26) /usr/lib/system/libsystem_stats.dylib 0x7fff8a181000 - 0x7fff8a1a5fff libxpc.dylib (300.1.17) <4554927A-9467-365C-91F1-5A116989DD7F> /usr/lib/system/libxpc.dylib 0x7fff8a291000 - 0x7fff8a2c1fff libncurses.5.4.dylib (42) /usr/lib/libncurses.5.4.dylib 0x7fff8ae52000 - 0x7fff8ae54ff3 libsystem_configuration.dylib (596.12) /usr/lib/system/libsystem_configuration.dylib 0x7fff8aeca000 - 0x7fff8aed0ff7 libsystem_platform.dylib (24.1.4) <331BA4A5-55CE-3B95-99EB-44E0C89D7FB8> /usr/lib/system/libsystem_platform.dylib 0x7fff8b0a4000 - 0x7fff8b0a4ff7 libkeymgr.dylib (28) <3AA8D85D-CF00-3BD3-A5A0-E28E1A32A6D8> /usr/lib/system/libkeymgr.dylib 0x7fff8b7ee000 - 0x7fff8b7ffff7 libsystem_asl.dylib (217.1.4) <655FB343-52CF-3E2F-B14D-BEBF5AAEF94D> /usr/lib/system/libsystem_asl.dylib 0x7fff8b800000 - 0x7fff8b81cff7 libsystem_kernel.dylib (2422.1.72) /usr/lib/system/libsystem_kernel.dylib 0x7fff8b81d000 - 0x7fff8b84cfd2 libsystem_m.dylib (3047.16) /usr/lib/system/libsystem_m.dylib 0x7fff8b852000 - 0x7fff8b853ffb libremovefile.dylib (33) <3543F917-928E-3DB2-A2F4-7AB73B4970EF> /usr/lib/system/libremovefile.dylib 0x7fff8bad5000 - 0x7fff8baf0ff7 libsystem_malloc.dylib (23.1.10) /usr/lib/system/libsystem_malloc.dylib 0x7fff8bc58000 - 0x7fff8bc59ff7 libsystem_sandbox.dylib (278.10) /usr/lib/system/libsystem_sandbox.dylib 0x7fff8bc8c000 - 0x7fff8bc96fff libcommonCrypto.dylib (60049) <8C4F0CA0-389C-3EDC-B155-E62DD2187E1D> /usr/lib/system/libcommonCrypto.dylib 0x7fff8c2ae000 - 0x7fff8c2afff7 libSystem.B.dylib (1197.1.1) /usr/lib/libSystem.B.dylib 0x7fff8cf18000 - 0x7fff8cf3fffb libsystem_info.dylib (449.1.3) <7D41A156-D285-3849-A2C3-C04ADE797D98> /usr/lib/system/libsystem_info.dylib 0x7fff8d07f000 - 0x7fff8d264ff7 com.apple.CoreFoundation (6.9 - 855.11) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x7fff8df72000 - 0x7fff8df79fff libcompiler_rt.dylib (35) <4CD916B2-1B17-362A-B403-EF24A1DAC141> /usr/lib/system/libcompiler_rt.dylib 0x7fff8e4fe000 - 0x7fff8e4ffff7 libsystem_blocks.dylib (63) /usr/lib/system/libsystem_blocks.dylib 0x7fff8e530000 - 0x7fff8e535fff libmacho.dylib (845) <1D2910DF-C036-3A82-A3FD-44FF73B5FF9B> /usr/lib/system/libmacho.dylib 0x7fff8ea55000 - 0x7fff8ea5dfff libsystem_dnssd.dylib (522.1.11) <270DCF6C-502D-389A-AA9F-DE4624A36FF7> /usr/lib/system/libsystem_dnssd.dylib 0x7fff8eaca000 - 0x7fff8ead1ff7 liblaunch.dylib (842.1.4) /usr/lib/system/liblaunch.dylib 0x7fff8ecc0000 - 0x7fff8ecc7ff3 libcopyfile.dylib (103) <5A881779-D0D6-3029-B371-E3021C2DDA5E> /usr/lib/system/libcopyfile.dylib 0x7fff8f632000 - 0x7fff8f684fff libc++.1.dylib (120) <4F68DFC5-2077-39A8-A449-CAC5FDEE7BDE> /usr/lib/libc++.1.dylib 0x7fff8f719000 - 0x7fff8f7a2ff7 libsystem_c.dylib (997.1.1) <61833FAA-7281-3FF9-937F-686B6F20427C> /usr/lib/system/libsystem_c.dylib 0x7fff90489000 - 0x7fff90636f27 libobjc.A.dylib (551.1) /usr/lib/libobjc.A.dylib 0x7fff9063d000 - 0x7fff90642ff7 libunwind.dylib (35.3) <78DCC358-2FC1-302E-B395-0155B47CB547> /usr/lib/system/libunwind.dylib 0x7fff90e17000 - 0x7fff90fcfff3 libicucore.A.dylib (511.25) <3ED7B656-416E-3071-AEC8-E85C90232F78> /usr/lib/libicucore.A.dylib 0x7fff92bbc000 - 0x7fff92bc0ff7 libcache.dylib (62) /usr/lib/system/libcache.dylib 0x7fff92e8e000 - 0x7fff92e90ff7 libquarantine.dylib (71) <7A1A2BCB-C03D-3A25-BFA4-3E569B2D2C38> /usr/lib/system/libquarantine.dylib 0x7fff93b1f000 - 0x7fff93b20fff libunc.dylib (28) <62682455-1862-36FE-8A04-7A6B91256438> /usr/lib/system/libunc.dylib 0x7fff9406b000 - 0x7fff94072ff7 libsystem_pthread.dylib (53.1.4) /usr/lib/system/libsystem_pthread.dylib 0x7fff94257000 - 0x7fff9427eff7 libsystem_network.dylib (241.3) <8B1E1F1D-A5CC-3BAE-8B1E-ABC84337A364> /usr/lib/system/libsystem_network.dylib 0x7fff944b7000 - 0x7fff944f9ff7 libauto.dylib (185.5) /usr/lib/libauto.dylib 0x7fff94cd8000 - 0x7fff94cf2fff libdispatch.dylib (339.1.9) <46878A5B-4248-3057-962C-6D4A235EEF31> /usr/lib/system/libdispatch.dylib External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 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: 8241 thread_create: 0 thread_set_state: 0 VM Region Summary: ReadOnly portion of Libraries: Total=76.3M resident=13.9M(18%) swapped_out_or_unallocated=62.4M(82%) Writable regions: Total=27.7M written=1864K(7%) resident=2436K(9%) swapped_out=0K(0%) unallocated=25.3M(91%) REGION TYPE VIRTUAL =========== ======= Kernel Alloc Once 4K MALLOC 19.4M MALLOC (admin) 16K STACK GUARD 56.0M Stack 8192K VM_ALLOCATE 8K __DATA 1412K __LINKEDIT 65.9M __TEXT 10.4M __UNICODE 544K shared memory 4K =========== ======= TOTAL 161.7M Model: MacBookPro5,5, BootROM MBP55.00AC.B03, 2 processors, Intel Core 2 Duo, 2.53 GHz, 4 GB, SMC 1.47f2 Graphics: NVIDIA GeForce 9400M, NVIDIA GeForce 9400M, PCI, 256 MB Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1067 MHz, 0x802C, 0x31364A53463235363634485A2D3147314631 Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1067 MHz, 0x802C, 0x31364A53463235363634485A2D3147314631 AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8D), Broadcom BCM43xx 1.0 (5.106.98.100.22) Bluetooth: Version 4.2.0f6 12982, 3 services, 15 devices, 1 incoming serial ports Network Service: AirPort, AirPort, en1 Serial ATA Device: FUJITSU MJA2500BH FFS G1, 500.11 GB Serial ATA Device: HL-DT-ST DVDRW GS23N USB Device: Built-in iSight USB Device: Internal Memory Card Reader USB Device: Apple Internal Keyboard / Trackpad USB Device: IR Receiver USB Device: BRCM2046 Hub USB Device: Bluetooth USB Host Controller Thunderbolt Bus: ---------- assignee: ronaldoussoren components: Interpreter Core, Macintosh messages: 201072 nosy: henrycg at stanford.edu, ronaldoussoren priority: normal severity: normal status: open title: Entering integers in python interpreter causes segfault type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 23:49:30 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 21:49:30 +0000 Subject: [issue19369] PyObject_LengthHint is slow In-Reply-To: <1382564638.74.0.412530225168.issue19369@psf.upfronthosting.co.za> Message-ID: <1382564937.2521.0.camel@fsol> Antoine Pitrou added the comment: > Here is a patch which uses _PyObject_HasLen. It has same performance > but is much simpler. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 23:51:04 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Oct 2013 21:51:04 +0000 Subject: [issue19370] Entering integers in python interpreter causes segfault In-Reply-To: <1382564749.14.0.874044280359.issue19370@psf.upfronthosting.co.za> Message-ID: <1382565064.01.0.159501919998.issue19370@psf.upfronthosting.co.za> STINNER Victor added the comment: It looks like a duplicate of #19366. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 23 23:51:18 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Oct 2013 21:51:18 +0000 Subject: [issue19366] Segfault in REPL due to escaped tab. In-Reply-To: <1382545762.91.0.129230016295.issue19366@psf.upfronthosting.co.za> Message-ID: <1382565078.2.0.501350006716.issue19366@psf.upfronthosting.co.za> STINNER Victor added the comment: #19370 is probably a duplicate of this one. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 00:06:18 2013 From: report at bugs.python.org (Ned Deily) Date: Wed, 23 Oct 2013 22:06:18 +0000 Subject: [issue19370] Entering integers in python interpreter causes segfault In-Reply-To: <1382564749.14.0.874044280359.issue19370@psf.upfronthosting.co.za> Message-ID: <1382565977.99.0.408651425024.issue19370@psf.upfronthosting.co.za> Ned Deily added the comment: This is a duplicate of Issue18458. Until 2.7.6 is available for download, a workaround is to disable readline processing by moving _readline.so as suggested in the other issue. ---------- nosy: +ned.deily resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> interactive interpreter crashes and test_readline fails with newer versions of libedit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 00:20:01 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Oct 2013 22:20:01 +0000 Subject: [issue19371] timing test too tight Message-ID: <1382566801.77.0.760747140726.issue19371@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Looks like test_asyncio still has rather tight timing expectations: http://buildbot.python.org/all/builders/x86%20Windows%20Server%202008%20%5BSB%5D%203.x/builds/1495/steps/test/logs/stdio ====================================================================== FAIL: test__run_once (test.test_asyncio.test_base_events.BaseEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\test\test_asyncio\test_base_events.py", line 182, in test__run_once self.assertTrue(9.99 < t < 10.1, t) AssertionError: False is not true : 9.98499999998603 ---------- components: Library (Lib), Tests messages: 201077 nosy: pitrou priority: normal severity: normal status: open title: timing test too tight type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 00:48:50 2013 From: report at bugs.python.org (haakon) Date: Wed, 23 Oct 2013 22:48:50 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1382568530.35.0.0141933638662.issue16113@psf.upfronthosting.co.za> haakon added the comment: Please make sure that the currently committed code is not released as part of Python 3.4. SHA-3 is not standardised yet, and NIST has said that they intend to make some changes to the Keccak SHA-3 submission before standardisation as a FIPS. The links englabenny posted have a good overview of the SHA-3 timeline and the proposed changes. It would be very confusing if hashlib in Python 3.4 came with a "sha3" that was incompatible with the final standard. ---------- nosy: +haakon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 00:51:33 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Oct 2013 22:51:33 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1382568693.36.0.00534780550589.issue16113@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +larry priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 00:54:01 2013 From: report at bugs.python.org (Larry Hastings) Date: Wed, 23 Oct 2013 22:54:01 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1382568841.79.0.862551937179.issue16113@psf.upfronthosting.co.za> Larry Hastings added the comment: Victor: a "new feature" is not a "release blocker". ---------- priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 00:54:42 2013 From: report at bugs.python.org (Larry Hastings) Date: Wed, 23 Oct 2013 22:54:42 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1382568882.07.0.311749905631.issue16113@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- nosy: -larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 00:59:28 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 23 Oct 2013 22:59:28 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1382569168.46.0.209104057202.issue16113@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm tracking the SHA-3 progress closely. I'm prepared to pull the plug if there is any doubt about the final version of SHA-3 before beta 2 is released on Jan 5th. Larry: I have marked this new feature as release blocker because I may have to remove it and reschedule its addition for 3.5. I'd like to remove it after you have branched off the 3.4 branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 01:01:35 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 23 Oct 2013 23:01:35 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1382569295.24.0.324471273216.issue16113@psf.upfronthosting.co.za> Christian Heimes added the comment: Larry: I have marked this new feature as release blocker because I may have to remove it and reschedule its addition for 3.5. I'd like to remove it after you have branched off the 3.4 branch. ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 01:15:29 2013 From: report at bugs.python.org (Larry Hastings) Date: Wed, 23 Oct 2013 23:15:29 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1382570129.09.0.368653993472.issue16113@psf.upfronthosting.co.za> Larry Hastings added the comment: "release blocker" means "the release cannot go out until this issue is solved". Adding SHA-3, while nice, is simply not something I am going to hold up 3.4 for, full stop. Please stop marking this issue as a "release blocker". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 01:16:09 2013 From: report at bugs.python.org (Larry Hastings) Date: Wed, 23 Oct 2013 23:16:09 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1382570169.97.0.435843459755.issue16113@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- nosy: -larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 01:19:40 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 23 Oct 2013 23:19:40 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1382570380.65.0.564728600178.issue16113@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: Here "release blocker" would mean that if SHA-3 specification is not finished, then "the release cannot go out until SHA-3 is deleted". ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 01:23:17 2013 From: report at bugs.python.org (Larry Hastings) Date: Wed, 23 Oct 2013 23:23:17 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1382570597.03.0.287119807414.issue16113@psf.upfronthosting.co.za> Larry Hastings added the comment: You guys are making me cranky. Please stop adding me to this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 01:40:34 2013 From: report at bugs.python.org (Tim Peters) Date: Wed, 23 Oct 2013 23:40:34 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1382571634.42.0.339190161392.issue16113@psf.upfronthosting.co.za> Tim Peters added the comment: @Larry, you seem to be misreading this. They're not saying 3.4 can't be released until this feature is added. It's _already_ been added. They're saying 3.4 possibly can't be released until this feature is _removed_ - but whether it needs to be removed is outside of our control, and is not yet known. > "release blocker" means "the release cannot go out until this > issue is solved" Yes - and this issue has not been solved yet. It should indeed be solved before 3.4 is released, so "release blocker" is spot on. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 01:48:52 2013 From: report at bugs.python.org (Larry Hastings) Date: Wed, 23 Oct 2013 23:48:52 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1382572132.59.0.598818142347.issue16113@psf.upfronthosting.co.za> Larry Hastings added the comment: *sigh* fine. But the title of the issue is no longer accurate. And, Christian, I generate the 3.4 maintenance branch during the release process, not before. So if you have to remove sha3 you're going to have to remove it from trunk. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 01:52:58 2013 From: report at bugs.python.org (Tim Peters) Date: Wed, 23 Oct 2013 23:52:58 +0000 Subject: [issue16113] SHA-3 (Keccak) support may need to be removed before 3.4 In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1382572378.01.0.490168761701.issue16113@psf.upfronthosting.co.za> Changes by Tim Peters : ---------- priority: normal -> release blocker title: Add SHA-3 (Keccak) support -> SHA-3 (Keccak) support may need to be removed before 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 04:47:33 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 Oct 2013 02:47:33 +0000 Subject: [issue18458] interactive interpreter crashes and test_readline fails with newer versions of libedit In-Reply-To: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> Message-ID: <1382582853.15.0.850194536539.issue18458@psf.upfronthosting.co.za> Changes by Ned Deily : Added file: http://bugs.python.org/file32324/patch_readline_issue_18458.sh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 04:52:32 2013 From: report at bugs.python.org (Ethan Furman) Date: Thu, 24 Oct 2013 02:52:32 +0000 Subject: [issue19281] add __objclass__ to the docs In-Reply-To: <1382082111.84.0.378259232568.issue19281@psf.upfronthosting.co.za> Message-ID: <1382583152.97.0.185238359928.issue19281@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 05:08:00 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 Oct 2013 03:08:00 +0000 Subject: [issue18458] interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update In-Reply-To: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> Message-ID: <1382584080.18.0.635969958528.issue18458@psf.upfronthosting.co.za> Ned Deily added the comment: Until the updated readline module is available in python.org 2.7.6 and 3.3.3 maintenance releases, here is a script that will check python.org versions of Python 2.7.x, 3.2.x, 3.3.x, and 3.4.x for interactive crashes and will patch around the problem as needed. On most systems you will need to run it under an account with administrator privileges. To use it, open a terminal session in Terminal.app (or other shell), then enter: curl -O http://bugs.python.org/file32324/patch_readline_issue_18458.sh openssl sha1 patch_readline_issue_18458.sh # the digest should be 7cb0ff57820a027dd4ca242eb2418930f8f46b4c sh ./patch_readline_issue_18458.sh The output on a 10.9 system with python.org 2.7.5, 3.3.2, and 3.4.0a4 installed should look something like this: -- running on OS X 10.9 -- 2.7 crashed -- 2.7 moving readline extension to /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/readline.so.disabled -- need to patch. Enter password if prompted Password: -- 2.7 is now patched -- 3.2 not found - skipped -- 3.3 crashed -- 3.3 moving readline extension to /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/readline.so.disabled -- 3.3 is now patched -- 3.4 does not need to be patched - skipped -- done ---------- title: interactive interpreter crashes and test_readline fails with newer versions of libedit -> interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 05:34:09 2013 From: report at bugs.python.org (Daniel) Date: Thu, 24 Oct 2013 03:34:09 +0000 Subject: [issue19372] getaddrinfo() bug Message-ID: <1382585649.75.0.66347191102.issue19372@psf.upfronthosting.co.za> New submission from Daniel: I have two systems, one is CentOS 5.9 with kernel 2.6.18-348, the other is CentOS 6.4 with kernel 2.6.32-358. Python ver is 2.7.5. both configure ok if no other option give, But if I want configure with --enable-shared, CentOS 6.4 get a You must get working getaddrinfo() function. or you can specify "--disable-ipv6". while the other system 5.9 is ok. I try to use --disable-ipv6, then it configure ok, but make got a lot of error , such as must define PY_FORMAT_LONG_LONG int pyconfig.h . ---------- components: Build messages: 201088 nosy: Daniel priority: normal severity: normal status: open title: getaddrinfo() bug type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 06:04:59 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 24 Oct 2013 04:04:59 +0000 Subject: [issue19364] Implementing __getattr__ breaks copy and deepcopy In-Reply-To: <1382536183.12.0.651276140754.issue19364@psf.upfronthosting.co.za> Message-ID: <1382587499.49.0.989397060103.issue19364@psf.upfronthosting.co.za> Eric Snow added the comment: Your example worked correctly, since the copy module is indeed not copiable. :) Did you mean "from copy import copy"? ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 06:58:25 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 24 Oct 2013 04:58:25 +0000 Subject: [issue19350] macurl2path coverage In-Reply-To: <1382448887.47.0.0212469471287.issue19350@psf.upfronthosting.co.za> Message-ID: <1382590705.06.0.94921514187.issue19350@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Patch committed in these versions. Thank you! 2.7 -5fda64d39540 3.3 - 06b9a9e75a6c 3.4 - 060d9b2e4d5e ---------- assignee: -> orsenthil resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 06:58:38 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 24 Oct 2013 04:58:38 +0000 Subject: [issue19350] macurl2path coverage In-Reply-To: <1382448887.47.0.0212469471287.issue19350@psf.upfronthosting.co.za> Message-ID: <1382590718.18.0.807213822148.issue19350@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 07:06:21 2013 From: report at bugs.python.org (Larry Hastings) Date: Thu, 24 Oct 2013 05:06:21 +0000 Subject: [issue19358] Integrate "Argument Clinic" into CPython build In-Reply-To: <1382508751.78.0.556655688797.issue19358@psf.upfronthosting.co.za> Message-ID: <1382591181.98.0.650048407651.issue19358@psf.upfronthosting.co.za> Larry Hastings added the comment: I thought it'd be more like, write a special C program that probes to see if you have a built python in the current directory, and if not looks on the path for a python3 (>=3.3), and if it finds a python it can use it runs Clinic on its arguments. Then make sure it gets built before any of the C files. Then change the .c -> .o target so it runs that program before running $(CC). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 08:22:52 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 Oct 2013 06:22:52 +0000 Subject: [issue16113] SHA-3 (Keccak) support may need to be removed before 3.4 In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1382595772.65.0.564011821532.issue16113@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I'm prepared to pull the plug if there is any doubt about the final version of SHA-3 before beta 2 is released on Jan 5th. Shouldn't it be removed before beta1? The usual rule of feature freeze applies here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 08:32:31 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 Oct 2013 06:32:31 +0000 Subject: [issue19373] Tkinter apps including IDLE may not display properly on OS X 10.9 Mavericks Message-ID: <1382596351.85.0.389017245767.issue19373@psf.upfronthosting.co.za> New submission from Ned Deily: On OS X 10.9 Mavericks, there is a problem with Aqua Cocoa Tk 8.5 (8.5.15 or earlier) when run in 64-bit mode, the default for most applications. The symptoms are that Tk widgets may not be properly drawn or updated on the screen unless some HID activity takes place, like mousing over the widget or by entering text via the keyboard. Since the problem can also be reproduced using the Tk wish shell, it is not a Python problem but it can have an impact on Tkinter-based applications, like IDLE. The problem is being tracked by the Tk project here: https://core.tcl.tk/tk/tktview?name=53f7a1b553 The problem affects current and recent third-party Tk 8.5.x releases, such as the ActiveTcl 8.5.15 recommended for use with current python.org 3.3.2 and 2.7.5 installers. It also affects the Built-in 8.5.x Tcl/Tk included with pre-release python.org 3.4.x installers. It appears that the problem does not affect the Apple Tk 8.5.9 shipped with OS X 10.9, which is used by the system Pythons included in OS X 10.9. However, as in recent previous OS X releases, the Apple 8.5.9 Tk has serious problems so its use is not recommended: see http://www.python.org/download/mac/tcltk/ for more information. This issue will be updated as solutions become available. In the meantime, there are some workarounds: 1. Run Tkinter applications in 32-bit mode. If you are using Python 2.7.x, 3.2.x, 3.3.x, or 3.4.x from one of the python.org "Mac OS X 64-bit/32-bit x86-64/i386 Installers", the easiest way to do this is to append "-32" to the python command name: /usr/local/bin/python3.4 -> /usr/local/bin/python3.4-32 /usr/local/bin/python3.3 -> /usr/local/bin/python3.3-32 /usr/local/bin/python2.7 -> /usr/local/bin/python2.7-32 If you are using a Python from a python.org "Mac OS X 32-bit i386/PPC Installer", you will not see this problem; but keep in mind that those Pythons are linked with Tcl/Tk 8.4 for compatibility with older OS X releases. 2. If you launch IDLE from a 64-bit-capable installation by double-clicking on its icon in the 10.9 Finder, you may see this problem. (Due to a quirk, IDLE 2.7 launched this way may not be affected.) You can force IDLE 3.x to run in 32-bit mode by launching it from a Terminal window instead of double-clicking. For Python 3.x, try /usr/local/bin/python3.3-32 -m idlelib /usr/local/bin/python3.4-32 -m idlelib For Python 2.7.x, if you need to launch from the command line rather than double-clicking, try: /usr/local/bin/python2.7-32 /usr/local/bin/idle2.7 ---------- assignee: ned.deily components: IDLE, Macintosh, Tkinter messages: 201093 nosy: ned.deily priority: normal severity: normal status: open title: Tkinter apps including IDLE may not display properly on OS X 10.9 Mavericks type: behavior versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 09:01:40 2013 From: report at bugs.python.org (Bugra Cakir) Date: Thu, 24 Oct 2013 07:01:40 +0000 Subject: [issue19374] Segmentation fault: 11 with String.split Message-ID: <1382598100.42.0.343975997852.issue19374@psf.upfronthosting.co.za> New submission from Bugra Cakir: Can be reproduced on Mac OS X. Stock Python 2.7.5 setup has been installed on a Mac OS X. Python 2.7.5 (v2.7.5:ab05e7dd2788, May 13 2013, 13:18:45) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> s = "$RMC;12;234;523" >>> s.split("$") Segmentation fault: 11 ---------- components: Interpreter Core files: segfault11.rtf messages: 201094 nosy: xentnex priority: normal severity: normal status: open title: Segmentation fault: 11 with String.split versions: Python 2.7 Added file: http://bugs.python.org/file32325/segfault11.rtf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 09:53:56 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 Oct 2013 07:53:56 +0000 Subject: [issue19374] Segmentation fault: 11 with String.split In-Reply-To: <1382598100.42.0.343975997852.issue19374@psf.upfronthosting.co.za> Message-ID: <1382601236.6.0.805847564509.issue19374@psf.upfronthosting.co.za> Ned Deily added the comment: Presumably you are running on OS X 10.9 Mavericks. If so, this is a duplicate of Issue18458. Please see the available workaround documented there until Python 2.7.6 is released. ---------- nosy: +ned.deily resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 09:58:07 2013 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 24 Oct 2013 07:58:07 +0000 Subject: [issue16113] SHA-3 (Keccak) support may need to be removed before 3.4 In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1382601487.06.0.893769936186.issue16113@psf.upfronthosting.co.za> Mark Lawrence added the comment: This strikes me as a rather unusual case. How about discuss it on python-dev, come to an agreement and document the process for this type of issue somewhere for future reference? Or is that simply OTT? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 10:07:22 2013 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Thu, 24 Oct 2013 08:07:22 +0000 Subject: [issue16113] SHA-3 (Keccak) support may need to be removed before 3.4 In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1382602042.88.0.809929421504.issue16113@psf.upfronthosting.co.za> Changes by Michele Orr? : ---------- nosy: -maker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 10:15:29 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 Oct 2013 08:15:29 +0000 Subject: [issue19358] Integrate "Argument Clinic" into CPython build In-Reply-To: <1382508751.78.0.556655688797.issue19358@psf.upfronthosting.co.za> Message-ID: <1382602529.99.0.636978451179.issue19358@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, why is clinic 3.3 only? It would be slightly easier if it accepted any "python3" executable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 10:35:40 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 08:35:40 +0000 Subject: [issue18306] os.stat gives exception for Windows junctions in v3.3 In-Reply-To: <1372236300.43.0.559187613539.issue18306@psf.upfronthosting.co.za> Message-ID: <1382603740.91.0.582008839282.issue18306@psf.upfronthosting.co.za> Tim Golden added the comment: Just revisited this to see if I could close off. One thing occurred to me which should have come up before: this situation will be aggravated by WOW64 file redirection. If I run 64-bit Python on 64-bit Windows I can successfully stat links in %windir%\system32 under 3.4 and 3.3. If I run 32-bit Python on 64-bit Windows, I get the error you describe because Windows will silently redirect the 32-bit Python process towards %windir%\SysWow64 where the junction (or, possibly, its target) does not exist. Given that I'm able to stat %windir%\system32 junctions on both versions, I'm going to close this as works-for-me. I think there's a case for a bigger-picture look at the resolution of reparse points across the stdlib but that would have to be its own issue. ---------- assignee: -> tim.golden resolution: -> works for me stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 10:37:20 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 Oct 2013 08:37:20 +0000 Subject: [issue19358] Integrate "Argument Clinic" into CPython build In-Reply-To: <1382508751.78.0.556655688797.issue19358@psf.upfronthosting.co.za> Message-ID: <1382603840.88.0.40365530141.issue19358@psf.upfronthosting.co.za> STINNER Victor added the comment: > Well, I don't really know how to do it. You'd have to have a step that somehow scans for .c files in the source tree, looks for clinic headers and compute whether they're outdated? Does it really need to be automated? We may only regenerate clinic things after a fresh configure (uncompress tarball, rnu configure, make). Or explicitly using a special command, ex: "make clinic" (which would only regenerate clinic things). (I didn't check how clinic works, so I'm maybe saying something stupid.) ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 10:41:24 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 Oct 2013 08:41:24 +0000 Subject: [issue19358] Integrate "Argument Clinic" into CPython build In-Reply-To: <1382603840.88.0.40365530141.issue19358@psf.upfronthosting.co.za> Message-ID: <1712459066.107179439.1382604057464.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > > Well, I don't really know how to do it. You'd have to have a step > > that somehow scans for .c files in the source tree, looks for > > clinic headers and compute whether they're outdated? > > Does it really need to be automated? We may only regenerate clinic > things after a fresh configure (uncompress tarball, rnu configure, > make). Or explicitly using a special command, ex: "make clinic" > (which would only regenerate clinic things). "make clinic" may be a good compromise indeed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 10:56:56 2013 From: report at bugs.python.org (pokulo) Date: Thu, 24 Oct 2013 08:56:56 +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: <1382605016.41.0.754156353487.issue11566@psf.upfronthosting.co.za> pokulo added the comment: uning python 3.3 mingw4.8 both -std=gnu++0x and -std=c++11 cause still the same error. ---------- nosy: +pokulo versions: +Python 3.3 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 11:05:49 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 09:05:49 +0000 Subject: [issue19273] Update PCbuild/readme.txt In-Reply-To: <1381956724.6.0.425752006149.issue19273@psf.upfronthosting.co.za> Message-ID: <1382605549.44.0.490319616809.issue19273@psf.upfronthosting.co.za> Tim Golden added the comment: I've looked this over and, basically, +1. We could argue the toss back and forth over changes, but I think the changes do the right amount of cruft-clearing and avoid the danger of being a mere reflection of one person's aesthetic choices over another's. If no-one objects, I propose to commit this in a day or two. ---------- assignee: docs at python -> tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 11:11:11 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 Oct 2013 09:11:11 +0000 Subject: [issue19375] Deprecate site-python in site.py Message-ID: <1382605871.26.0.0916867662711.issue19375@psf.upfronthosting.co.za> New submission from Antoine Pitrou: I suggest deprecating the "site-python" feature from site.py, as proposed by Guido on python-dev: https://mail.python.org/pipermail/python-dev/2013-October/129820.html - if a "site-python" directory is detected and added from site.py, a DeprecationWarning should be emitted - the site.py docs should mention the deprecation ---------- components: Library (Lib) messages: 201103 nosy: christian.heimes, loewis, pitrou priority: normal severity: normal status: open title: Deprecate site-python in site.py type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 11:14:26 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 Oct 2013 09:14:26 +0000 Subject: [issue19375] Deprecate site-python in site.py In-Reply-To: <1382605871.26.0.0916867662711.issue19375@psf.upfronthosting.co.za> Message-ID: <1382606066.09.0.540784395363.issue19375@psf.upfronthosting.co.za> STINNER Victor added the comment: Guido wrote "I suggest that we remove that feature. (People who want it can always patch up their own $PYTHONPATH.)". It's different than deprecating the feature :-) I didn't know the feature before you proposed to remove it. Is the site-python thing used in the wild? I never see any OS relying on it. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 11:19:21 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 Oct 2013 09:19:21 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1382606361.4.0.935026630203.issue19331@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > In cases where inheritance is not encouraged and it is judged to improve > readability at the point of use, the naming convention for callables > (lower_case_with_underscores) may be used instead. This is an indication > that the type is intended primarily for use "as is", rather than through > inheritance (although subclassing is still permitted). I don't think this wording is appropriate. As soon as the "thing" is documented as a *type* (i.e. something you call to get instances that have a specific interface - methods, etc.), then IMO it should follow the naming scheme for classes. Only when the "thing" is not documented as a type but as a convenience callable (for example a context manager) is it reasonable to follow the naming scheme for functions. In other words, this has nothing to do with subclassing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 11:31:44 2013 From: report at bugs.python.org (Arjit Srivastava) Date: Thu, 24 Oct 2013 09:31:44 +0000 Subject: [issue19367] IDLE wont open In-Reply-To: <1382549743.62.0.543177432072.issue19367@psf.upfronthosting.co.za> Message-ID: <1382607104.79.0.920646824091.issue19367@psf.upfronthosting.co.za> Arjit Srivastava added the comment: Hi MrE.Merry, There may be a file clashing with the normal python files. I guess, you could take a look into your Python directory, and see if you have .py file which has a name of another python module/keyword, causing it to conflict with the normal module in python. Remove that/those files, or move that/those files to some other directory, and see if IDLE starts working for you again. I would suggest you look in your main python directory and see if there are any .py files that you could move to different places. Or, simply, you can cut all files with .py extension, paste them in a place different from the os path. Run the IDLE again. ---------- nosy: +oldschoolburke _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 11:46:42 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 09:46:42 +0000 Subject: [issue15792] Fix compiler options for x64 builds on Windows In-Reply-To: <1346077051.29.0.85020459134.issue15792@psf.upfronthosting.co.za> Message-ID: <1382608002.8.0.0379822253669.issue15792@psf.upfronthosting.co.za> Tim Golden added the comment: Retargetted patch against current tip. If no-one objects I'll commit this in the next day or two. ---------- assignee: -> tim.golden Added file: http://bugs.python.org/file32326/pcbuild.diff.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 11:54:49 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 09:54:49 +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: <1382608489.19.0.403099677152.issue11566@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- nosy: -tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 11:56:32 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 09:56:32 +0000 Subject: [issue6839] zipfile can't extract file In-Reply-To: <1252094279.03.0.456295268952.issue6839@psf.upfronthosting.co.za> Message-ID: <1382608592.21.0.867555495236.issue6839@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- nosy: -tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 11:57:27 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 09:57:27 +0000 Subject: [issue14112] tutorial intro talks of "shallow copy" concept without explanation In-Reply-To: <1330113005.05.0.0872009811322.issue14112@psf.upfronthosting.co.za> Message-ID: <1382608647.3.0.118999459316.issue14112@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- nosy: -tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 11:59:30 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 09:59:30 +0000 Subject: [issue6335] Add support for mingw In-Reply-To: <1245849042.65.0.399048729588.issue6335@psf.upfronthosting.co.za> Message-ID: <1382608770.03.0.446937907405.issue6335@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- nosy: -tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 11:59:59 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 09:59:59 +0000 Subject: [issue16472] Distutils+mingw links agains msvcr90, while python27.dll is linked agains msvcrt In-Reply-To: <1352900041.91.0.554679168644.issue16472@psf.upfronthosting.co.za> Message-ID: <1382608799.74.0.616766916495.issue16472@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- nosy: -tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 12:00:15 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 10:00:15 +0000 Subject: [issue6672] Add Mingw recognition to pyport.h to allow building extensions In-Reply-To: <1249820690.51.0.767085753138.issue6672@psf.upfronthosting.co.za> Message-ID: <1382608815.74.0.816224096248.issue6672@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- nosy: -tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 12:00:33 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 10:00:33 +0000 Subject: [issue2889] curses for windows (alternative patch) In-Reply-To: <1210919907.42.0.842256015219.issue2889@psf.upfronthosting.co.za> Message-ID: <1382608833.35.0.482100834489.issue2889@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- nosy: -tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 12:01:58 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 10:01:58 +0000 Subject: [issue949667] setblocking() method on file objects Message-ID: <1382608918.08.0.385750368751.issue949667@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- nosy: -tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 12:02:17 2013 From: report at bugs.python.org (Matthew Earl) Date: Thu, 24 Oct 2013 10:02:17 +0000 Subject: [issue19376] datetime.datetime.strptime without a year fails on Feb 29 Message-ID: <1382608937.44.0.992947795428.issue19376@psf.upfronthosting.co.za> New submission from Matthew Earl: datetime.datetime.strptime() without a year fails on Feb 29 with: >>> datetime.datetime.strptime("Feb 29", "%b %d") Traceback (most recent call last): File "", line 1, in File "/auto/ensoft-sjc/thirdparty/lib/python3.3/_strptime.py", line 511, in _strptime_datetime return cls(*args) ValueError: day is out of range for month This is because without a year specified the year is assumed to be 1900, which is not a leap year. The underlying _strptime._strptime() function has some munging such that it doesn't itself fail (see #14157): >>> _strptime._strptime("Feb 29", "%b %d") ((1900, 2, 29, 0, 0, 0, 0, 60, -1, None, None), 0) ...however datetime.datetime.__init__() is called with this tuple as *args, causing the validation failure. ---------- components: Library (Lib) messages: 201108 nosy: Arfrever, Martin.Morrison, Matthew.Earl, belopolsky, haypo, hynek, pconnell, pitrou, swalker priority: normal severity: normal status: open title: datetime.datetime.strptime without a year fails on Feb 29 type: behavior versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 12:04:02 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 10:04:02 +0000 Subject: [issue10179] os.stat fails on mapped network drive In-Reply-To: <1287845524.9.0.573963701431.issue10179@psf.upfronthosting.co.za> Message-ID: <1382609042.17.0.99739661412.issue10179@psf.upfronthosting.co.za> Tim Golden added the comment: Just housekeeping some Windows calls: Antoine, your last comment suggests that this is no longer an issue. I don't have a VirtualBox install to test, so can you confirm whether this can be closed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 12:12:03 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 24 Oct 2013 10:12:03 +0000 Subject: [issue19375] Deprecate site-python in site.py In-Reply-To: <1382605871.26.0.0916867662711.issue19375@psf.upfronthosting.co.za> Message-ID: <1382609523.34.0.68853229552.issue19375@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 12:23:09 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 Oct 2013 10:23:09 +0000 Subject: [issue10179] os.stat fails on mapped network drive In-Reply-To: <1287845524.9.0.573963701431.issue10179@psf.upfronthosting.co.za> Message-ID: <1382610189.8.0.543245389001.issue10179@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't know, I have stopped using VirtualBox here. Suggest closing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 12:24:13 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 10:24:13 +0000 Subject: [issue10179] os.stat fails on mapped network drive In-Reply-To: <1287845524.9.0.573963701431.issue10179@psf.upfronthosting.co.za> Message-ID: <1382610253.29.0.903285011688.issue10179@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- resolution: -> out of date stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 12:24:37 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 10:24:37 +0000 Subject: [issue10179] os.stat fails on mapped network drive In-Reply-To: <1287845524.9.0.573963701431.issue10179@psf.upfronthosting.co.za> Message-ID: <1382610277.94.0.888004775322.issue10179@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 12:33:01 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 24 Oct 2013 10:33:01 +0000 Subject: [issue4331] Add functools.partialmethod In-Reply-To: <1226817180.09.0.841012218041.issue4331@psf.upfronthosting.co.za> Message-ID: <1382610781.43.0.10906696951.issue4331@psf.upfronthosting.co.za> Nick Coghlan added the comment: To clarify the current state of this: - I'm still in favour of adding this feature for Python 3.4 - a suitable patch is still needed, as the currently attached patches modify the existing functools.partial object, rather than adding a separate "partialmethod" API - a Python implementation would be fine The following prototype should work as a starting point to be elaborated into a full patch with docs and tests: class partialmethod(functools.partial): def __get__(self, obj, cls): if obj is None: return self return functools.partial(self.func, *((obj,) + self.args), **self.keywords) def __call__(*args, **kwds): self, *args = args call_kwds = {} call_kwds.update(self.keywords) call_kwds.update(kwds) return self.func(self, *(self.args + args), **call_kwds) class C: def example(self, *args, **kwds): print(self, args, kwds) fails = functools.partial(example, 1, 2, 3, x=1) works = partialmethod(example, 1, 2, 3, x=1) >>> C().fails() 1 (2, 3) {'x': 1} >>> C().works() <__main__.C object at 0x7f91cefeea90> (1, 2, 3) {'x': 1} >>> C().fails(4, 5, 6) 1 (2, 3, 4, 5, 6) {'x': 1} >>> C().works(4, 5, 6) <__main__.C object at 0x7f91cefeea10> (1, 2, 3, 4, 5, 6) {'x': 1} ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 13:01:48 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 24 Oct 2013 11:01:48 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1382612508.45.0.389910401261.issue19331@psf.upfronthosting.co.za> Nick Coghlan added the comment: collections.defaultdict, collections.deque, array.array and many of the builtins suggest the rule isn't that simple (although other examples like Decimal, Fraction, OrderedDict, Counter and ChainMap suggest my guideline is also wrong). The main thing I want is to be able to provide and document attributes on contextlib.suppress and contextlib.redirect_stdio without violating PEP 8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 13:08:36 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 24 Oct 2013 11:08:36 +0000 Subject: [issue19281] add __objclass__ to the docs In-Reply-To: <1382082111.84.0.378259232568.issue19281@psf.upfronthosting.co.za> Message-ID: <1382612916.94.0.479593882255.issue19281@psf.upfronthosting.co.za> Nick Coghlan added the comment: Changing the order a bit, perhaps something like this in the data model section: __objclass__: Interpreted by the inspect module as specifying the class where this object was defined (setting this appropriately can assist in runtime introspection of dynamic class attributes). For callables, may indicate that an instance of the given type (or a subclass) is expected or required as the first positional argument (for example, CPython sets this for unbound methods that are implemented in C rather than being normal Python functions). Perhaps with a cross-reference from the classification function in inspect? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 13:21:49 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 Oct 2013 11:21:49 +0000 Subject: [issue19376] datetime.datetime.strptime without a year fails on Feb 29 In-Reply-To: <1382608937.44.0.992947795428.issue19376@psf.upfronthosting.co.za> Message-ID: <1382613709.68.0.35310137388.issue19376@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't think that the issue can be called a bug. If we pick another year (ex: 1904), you cannot compare two datetimes anymore: "This solution has some very undesirable properties - namely that Mar 1st is now less than Feb 29th!" http://bugs.python.org/issue14157#msg160637 If you want to handle "Feb 29", add an explicit year. This issue is maybe a documentation issue: datetime.datetime.strptime() should warn users that calling datetime.datetime.strptime() without year may fail for Feb 29. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 13:27:51 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 Oct 2013 11:27:51 +0000 Subject: [issue949667] setblocking() method on file objects Message-ID: <1382614071.47.0.00922295105543.issue949667@psf.upfronthosting.co.za> STINNER Victor added the comment: There is a real need of non-blocking operation, but I now think that adding a set_blocking() method is not the right solution. First, as said by Charles-Francois: O_NONBLOCK flag has no effect on regular files. Second, there is no portable way to declare a file as "non blocking": as said by Tim, it is complelty different on Windows (I/O Completion ports). The asyncio module has been merged into Python 3.4: you can now use it to access a file asynchroniously. I don't think that the asyncio is complete for your use case, but if something should done: it is in this module, only in this module, not the API of the io.FileIO class. asyncio can be used to watch pipes of a subprocess asynchroniously. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 13:57:10 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 11:57:10 +0000 Subject: [issue17202] Add .bat line to .hgeol In-Reply-To: <1360824086.93.0.558513852083.issue17202@psf.upfronthosting.co.za> Message-ID: <1382615830.2.0.774651999012.issue17202@psf.upfronthosting.co.za> Tim Golden added the comment: I'm running Win7 and have the same problem, with a fresh checkout and the eol extension disabled. The attached (updated) patch does solve the issue. I can't see any reason not to apply it, even if it's not needed in many cases. ---------- Added file: http://bugs.python.org/file32327/batch_eol_fix.diff.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 14:08:06 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 Oct 2013 12:08:06 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382612508.45.0.389910401261.issue19331@psf.upfronthosting.co.za> Message-ID: <861725525.107800758.1382616459773.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > collections.defaultdict, collections.deque, array.array and many of > the builtins suggest the rule isn't that simple (although other > examples like Decimal, Fraction, OrderedDict, Counter and ChainMap > suggest my guideline is also wrong). AFAIK, they are simply old enough to predate the rule or its wide-spread acceptance. There *is* an exception for builtins (bytearray and memoryview are recent enough), but most recent types use CamelCase. The bottom line, though, is that it's unrelated to subclassing, therefore that particular piece of explanation shouldn't land in PEP 8 :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 14:09:32 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 Oct 2013 12:09:32 +0000 Subject: [issue949667] setblocking() method on file objects In-Reply-To: <1382614071.47.0.00922295105543.issue949667@psf.upfronthosting.co.za> Message-ID: <1013589881.107805193.1382616544395.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > There is a real need of non-blocking operation, but I now think that > adding a set_blocking() method is not the right solution. First, as > said by Charles-Francois: O_NONBLOCK flag has no effect on regular > files. Second, there is no portable way to declare a file as "non > blocking": as said by Tim, it is complelty different on Windows (I/O > Completion ports). That it's not portable is actually a good reason to add a helper function or method. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 14:33:42 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 24 Oct 2013 12:33:42 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1382618022.05.0.14943750784.issue19331@psf.upfronthosting.co.za> Nick Coghlan added the comment: Documenting it as a callable is a pretty strong hint that it shouldn't be subclassed, but I agree my wording above is wrong. Next attempt (leaving out the mention of leading underscores, since that is covered elsewhere): ================= Class Names ----------- Class names should normally use the CapWords convention. The naming convention for functions may be used instead in cases where the interface is documented and used primarily as a callable. Note that there is a separate convention for builtin names: most builtin names are single words (or two words run together), with the CapWords convention used only for exception names and builtin constants. ================= I initially had the following appended to the second paragraph: "... , and instances expose no public mutable attributes or instance methods (but may provide read-only data attributes, alternative constructors and appropriate special methods)". The longer phrasing was designed to explicitly cover itertools.chain.from_iterable, contextlib.redirect_stdio.target and contextlib.suppress.exceptions, but I don't think that level of detail is necessary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 14:41:31 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 12:41:31 +0000 Subject: [issue18221] abspath strips trailing spaces on win32 In-Reply-To: <1371299882.82.0.523042534705.issue18221@psf.upfronthosting.co.za> Message-ID: <1382618491.19.0.477558279665.issue18221@psf.upfronthosting.co.za> Tim Golden added the comment: I'm going to close this as won't fix: the underlying implementation is simply calling GetFullPathName and removal of trailing spaces doesn't seem too surprising a result. It is possible to manipulate such files using Windows' special \\?\C:\... syntax. While I admit this could catch you out if you were trying to nail an illegal-but-existent filename, we try not to put warnings in the docs for every cornercase lest they become cluttered. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 14:41:44 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 12:41:44 +0000 Subject: [issue18221] abspath strips trailing spaces on win32 In-Reply-To: <1371299882.82.0.523042534705.issue18221@psf.upfronthosting.co.za> Message-ID: <1382618504.3.0.442828718481.issue18221@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- resolution: -> wont fix stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 14:45:13 2013 From: report at bugs.python.org (Paul Moore) Date: Thu, 24 Oct 2013 12:45:13 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1382618713.72.0.570322001083.issue19331@psf.upfronthosting.co.za> Paul Moore added the comment: I'm in favour of keeping it simple - "use your common sense" should be a general guideline here (even though I know people's tastes differ, and that can be a source of endless debate :-)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 14:45:21 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 12:45:21 +0000 Subject: [issue16632] Enable DEP and ASLR In-Reply-To: <1354875781.46.0.686705865065.issue16632@psf.upfronthosting.co.za> Message-ID: <1382618721.89.0.728042500614.issue16632@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- nosy: -tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 14:56:43 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 Oct 2013 12:56:43 +0000 Subject: [issue16632] Enable DEP and ASLR In-Reply-To: <1354875781.46.0.686705865065.issue16632@psf.upfronthosting.co.za> Message-ID: <1382619403.14.0.363370999144.issue16632@psf.upfronthosting.co.za> STINNER Victor added the comment: @Crys: ping? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 14:58:00 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 24 Oct 2013 12:58:00 +0000 Subject: [issue16632] Enable DEP and ASLR In-Reply-To: <1354875781.46.0.686705865065.issue16632@psf.upfronthosting.co.za> Message-ID: <1382619480.44.0.714771149439.issue16632@psf.upfronthosting.co.za> Christian Heimes added the comment: I'll look in this next time my Windows VM is running. ---------- assignee: -> christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 15:14:58 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Thu, 24 Oct 2013 13:14:58 +0000 Subject: [issue17916] Provide dis.Bytecode based equivalent of dis.distb In-Reply-To: <1367844864.14.0.49825143621.issue17916@psf.upfronthosting.co.za> Message-ID: <1382620498.23.0.965291450176.issue17916@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Nick, could you review this, please? It would be nice if we can flesh it out and add it to 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 15:25:22 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 13:25:22 +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: <1382621122.1.0.059340988751.issue14255@psf.upfronthosting.co.za> Tim Golden added the comment: normpath doesn't really buy anything here as abspath already has the same effect (plus more). Patch attach removes normcase|path leaving only abspath. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 15:25:54 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 13:25:54 +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: <1382621154.96.0.575899613969.issue14255@psf.upfronthosting.co.za> Tim Golden added the comment: If no-one objects, I'll commit in a day or two. ---------- Added file: http://bugs.python.org/file32328/issue14255.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 15:28:39 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 24 Oct 2013 13:28:39 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1382621319.56.0.277357766094.issue19331@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I always prefer to keep PEP 8 guidelines as succinct as possible. I've looked over Ethan's patch and the other changes suggested in comments and come up with what I think is a simple patch to improve the guidelines. I don't think we need to go into a lot of detail here, since the primary goal of the change is to relax the constraints to allow the changes in contextlib to not violate PEP 8. ---------- Added file: http://bugs.python.org/file32329/issue19331-barry.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 15:30:51 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 24 Oct 2013 13:30:51 +0000 Subject: [issue19376] datetime.datetime.strptime without a year fails on Feb 29 In-Reply-To: <1382608937.44.0.992947795428.issue19376@psf.upfronthosting.co.za> Message-ID: <1382621451.96.0.398785991456.issue19376@psf.upfronthosting.co.za> Brett Cannon added the comment: I agree with Victor: we should document that proper Feb 29/leap year support requires a specified year, else constantly accepting Feb 29 as valid would lead to more errors than fix. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 15:43:32 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 24 Oct 2013 13:43:32 +0000 Subject: [issue18458] interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update In-Reply-To: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> Message-ID: <1382622212.4.0.191162418003.issue18458@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Does this affect 2.6? Is there a patch we need to get into 2.6.9 final? ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 15:44:11 2013 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 24 Oct 2013 13:44:11 +0000 Subject: [issue19377] Backport SVG mime type to Python 2 Message-ID: <1382622251.64.0.363936372729.issue19377@psf.upfronthosting.co.za> New submission from anatoly techtonik: A request to backport issue10730 commit to Python 2.x Why? Google Client API uses mimetype module to detect file types when uploading to Google Drive, and because SVG is missing, it can not be edited after uploading. ---------- components: Library (Lib) messages: 201130 nosy: techtonik priority: normal severity: normal status: open title: Backport SVG mime type to Python 2 versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 15:44:36 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 24 Oct 2013 13:44:36 +0000 Subject: [issue19378] Rename "line_offset" parameter in dis.get_instructions to "first_line" Message-ID: <1382622276.63.0.652986128148.issue19378@psf.upfronthosting.co.za> New submission from Nick Coghlan: The "line_offset" parameter in dis.get_instructions is the line number of the first line in the source file: http://docs.python.org/dev/library/dis#dis.get_instructions Calling this an offset is a little confusing, since "offset" in the dis docs almost always refers to an instruction offset. Issue 17916 is likely to make this worse, since that will probably involve new "last_offset" and "current_offset" parameters to other APIs. Renaming the parameter to "first_line" (since it sets the line number reported for the first line in the code object when iterating) should help make this less confusing. ---------- messages: 201131 nosy: ncoghlan priority: normal severity: normal status: open title: Rename "line_offset" parameter in dis.get_instructions to "first_line" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 15:46:01 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 24 Oct 2013 13:46:01 +0000 Subject: [issue19377] Backport SVG mime type to Python 2 In-Reply-To: <1382622251.64.0.363936372729.issue19377@psf.upfronthosting.co.za> Message-ID: <1382622361.93.0.0501644342053.issue19377@psf.upfronthosting.co.za> Christian Heimes added the comment: That's against our policy. We don't add new features to stable releases. Users of the Google Client API can easily work around the issue and register their own mimetypes. ---------- nosy: +christian.heimes resolution: -> wont fix stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 15:48:06 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 24 Oct 2013 13:48:06 +0000 Subject: [issue17916] Provide dis.Bytecode based equivalent of dis.distb In-Reply-To: <1367844864.14.0.49825143621.issue17916@psf.upfronthosting.co.za> Message-ID: <1382622486.36.0.838401814915.issue17916@psf.upfronthosting.co.za> Nick Coghlan added the comment: It's not quite that simple - the instruction responsible for the exception also needs to be recorded, and Bytecode doesn't currently allow for that (look at the way the "lasti" arg to disassemble is used in disttb, and then how that gets passed to the "mark_as_current" flag in Instruction._disassemble by _disassemble_bytes). So, on reflection, I think a TracebackBytecode class may be a better idea, exposing "bytecode" and "last_offset" attributes. Rather than iteration just producing instructions, it would produce (instruction, is_current) 2-tuples, and display_code would call through to "self.bytecode.display_code(self.last_offset)" (there would be no show_info() or info() methods on TracebackBytecode). Bytecode.display_code would gain a new "current_offset" parameter, which it would pass through to _disassemble_bytes as the "lasti" parameter. Reviewing this also made me realise "line_offset" in dis.get_instructions is misnamed - see issue 19378. ---------- dependencies: +Rename "line_offset" parameter in dis.get_instructions to "first_line" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 15:52:14 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 Oct 2013 13:52:14 +0000 Subject: [issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year In-Reply-To: <1382608937.44.0.992947795428.issue19376@psf.upfronthosting.co.za> Message-ID: <1382622734.62.0.44030891755.issue19376@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python title: datetime.datetime.strptime without a year fails on Feb 29 -> document that strptime() does not support the Feb 29 if the format does not contain the year _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 15:53:17 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 Oct 2013 13:53:17 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382621319.56.0.277357766094.issue19331@psf.upfronthosting.co.za> Message-ID: <1455209219.108072470.1382622770073.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > I always prefer to keep PEP 8 guidelines as succinct as possible. > I've looked over Ethan's patch and the other changes suggested in > comments and come up with what I think is a simple patch to improve > the guidelines. Have you read what I wrote? Inheritance should be left out of it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 15:54:08 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 Oct 2013 13:54:08 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1382622848.75.0.272116718453.issue19331@psf.upfronthosting.co.za> Antoine Pitrou added the comment: -1 on Barry's wording and +1 on Nick's wording in msg201119. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 15:55:00 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 24 Oct 2013 13:55:00 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1382622900.73.0.63050561483.issue19331@psf.upfronthosting.co.za> Nick Coghlan added the comment: Barry, Antoine convinced me that my wording from earlier was both inaccurate and overly complicated. I'm happy with the simplified version just above Paul's last comment, though, so combining that with the earlier part of your patch looks promising to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 16:05:01 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 Oct 2013 14:05:01 +0000 Subject: [issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year In-Reply-To: <1382608937.44.0.992947795428.issue19376@psf.upfronthosting.co.za> Message-ID: <1382623501.35.0.669787243652.issue19376@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Note: the actual explanation is that Feb 29th doesn't exist in *1900* which is the default year in strptime(). The same error happens if you ask for "Feb 30" or "Apr 31", it has nothing to do with leap years specifically. In other words, the documentation looks sufficient to me as-is, and adding special wording for this would only make it longer than it should be. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 16:08:31 2013 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 24 Oct 2013 14:08:31 +0000 Subject: [issue19377] Backport SVG mime type to Python 2 In-Reply-To: <1382622251.64.0.363936372729.issue19377@psf.upfronthosting.co.za> Message-ID: <1382623711.54.0.0648407348993.issue19377@psf.upfronthosting.co.za> anatoly techtonik added the comment: I am not sure that policy defines anything related to datasets bundled with Python. Even when try to adopt policy reading to this case, it doesn't look like a feature, but a bug fix. SVG is a registered MIME type http://www.w3.org/TR/SVG/mimereg.html, SVG is the most popular (the only one?) open source format for vector graphics, which should be present in Python database, but it isn't. I don't know what do you mean by "work around". Users don't know that the source of the bug is missing information from mimetypes package. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 16:09:23 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 Oct 2013 14:09:23 +0000 Subject: [issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year In-Reply-To: <1382608937.44.0.992947795428.issue19376@psf.upfronthosting.co.za> Message-ID: <1382623763.65.0.156726206795.issue19376@psf.upfronthosting.co.za> STINNER Victor added the comment: > In other words, the documentation looks sufficient to me as-is, and adding special wording for this would only make it longer than it should be. Adding a note would not hurt. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 16:13:43 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 14:13:43 +0000 Subject: [issue13234] os.listdir breaks with literal paths In-Reply-To: <1319129686.22.0.325584161741.issue13234@psf.upfronthosting.co.za> Message-ID: <1382624023.07.0.288861363321.issue13234@psf.upfronthosting.co.za> Tim Golden added the comment: Santoso Wijaya: sorry for the delay. If you'd like to retarget your patch against the tip, I'm happy to apply. At this stage, 3.3 and 3.4 seem the appropriate branches. ---------- assignee: -> tim.golden versions: -Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 16:15:07 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 14:15:07 +0000 Subject: [issue14208] No way to recover original argv with python -m In-Reply-To: <1331016803.5.0.715499259579.issue14208@psf.upfronthosting.co.za> Message-ID: <1382624107.13.0.580547236811.issue14208@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- nosy: -tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 16:16:55 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 14:16:55 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1382624215.92.0.726879738821.issue16353@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- nosy: -tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 16:36:20 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 14:36:20 +0000 Subject: [issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix In-Reply-To: <1371050681.12.0.381093438517.issue18199@psf.upfronthosting.co.za> Message-ID: <1382625380.5.0.232226945187.issue18199@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- nosy: -tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 16:36:41 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 24 Oct 2013 14:36:41 +0000 Subject: [issue19377] Backport SVG mime type to Python 2 In-Reply-To: <1382622251.64.0.363936372729.issue19377@psf.upfronthosting.co.za> Message-ID: <1382625401.53.0.912845845769.issue19377@psf.upfronthosting.co.za> Christian Heimes added the comment: It should be obvious that new mimetype == new feature. It doesn't matter if the type is popular or not. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 16:40:03 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 14:40:03 +0000 Subject: [issue14027] Add pysetup script for Windows In-Reply-To: <1329373939.69.0.162264279004.issue14027@psf.upfronthosting.co.za> Message-ID: <1382625603.03.0.670375563717.issue14027@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- nosy: -tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 16:42:13 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 14:42:13 +0000 Subject: [issue4905] Use INVALID_FILE_ATTRIBUTES instead of magic numbers In-Reply-To: <1231580515.2.0.210154432041.issue4905@psf.upfronthosting.co.za> Message-ID: <1382625733.83.0.445408479374.issue4905@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- assignee: -> tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 16:42:24 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 14:42:24 +0000 Subject: [issue4905] Use INVALID_FILE_ATTRIBUTES instead of magic numbers In-Reply-To: <1231580515.2.0.210154432041.issue4905@psf.upfronthosting.co.za> Message-ID: <1382625744.33.0.696414083599.issue4905@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 16:51:32 2013 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 24 Oct 2013 14:51:32 +0000 Subject: [issue19294] test_asyncio fails intermittently on OS X 10.4 In-Reply-To: <1382172404.1.0.731084144387.issue19294@psf.upfronthosting.co.za> Message-ID: <1382626292.59.0.275852670427.issue19294@psf.upfronthosting.co.za> Guido van Rossum added the comment: I revived my ancient PowerBook G4 just to get to the bottom of this. The long and short of the issue seems to be that when subprocess.Popen() closes the *read* end of the stdin pipe, fstat() on the *write* end starts failing with EBADF. The exact line where the transition happens is this (aroun subprocess.py#1375): if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: os.close(p2cread) This is clearly a platform bug. I also verified that the child process is still running. Now I can't reproduce this *without* a fork+exec in the middle, so it may be that there's something magical that's done by the _posixsubprocess.fork_exec() call affecting the pipe, but before the above os.close() call the fstat() call definitely reports success, so the "closing" must be happening as a side effect of closing the other end. I'm sure there's someone at Apple with the kernel source code who can explain this, but I think we've done our due diligence. That switching to a socketpair fixed the issue suggests that the kernel bug is related to pipes specifically. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 16:57:29 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 24 Oct 2013 14:57:29 +0000 Subject: [issue19273] Update PCbuild/readme.txt In-Reply-To: <1381956724.6.0.425752006149.issue19273@psf.upfronthosting.co.za> Message-ID: <1382626649.3.0.075043957036.issue19273@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks, Tim! There are a couple minor things I'd like to get into a new patch before it's committed (there are a couple tabs that should be spaces, and I'd like to add a very short note to the Sub-Projects header about sub-projects being contained in .vcxproj and .vcxproj.filters files). I'll try to have a new patch up tonight or tomorrow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 16:59:41 2013 From: report at bugs.python.org (Andrei Dorian Duma) Date: Thu, 24 Oct 2013 14:59:41 +0000 Subject: [issue17762] platform.linux_distribution() should honor /etc/os-release In-Reply-To: <1366124468.64.0.40642643299.issue17762@psf.upfronthosting.co.za> Message-ID: <1382626781.84.0.880181996942.issue17762@psf.upfronthosting.co.za> Andrei Dorian Duma added the comment: I added a patch (my first patch!). platform.linux_distribution() now first looks in /etc/os-release. If this file is not found, checking continues as before. ---------- keywords: +patch Added file: http://bugs.python.org/file32330/add_os_release_support.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 17:00:08 2013 From: report at bugs.python.org (Stefan Krah) Date: Thu, 24 Oct 2013 15:00:08 +0000 Subject: [issue16632] Enable DEP and ASLR In-Reply-To: <1354875781.46.0.686705865065.issue16632@psf.upfronthosting.co.za> Message-ID: <1382626808.06.0.0293555814569.issue16632@psf.upfronthosting.co.za> Stefan Krah added the comment: > I see a crash in test_capi and a couple of crashes > in test_faulthandler but these don't seem to be related. Perhaps the same as #9116. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 17:04:08 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 Oct 2013 15:04:08 +0000 Subject: [issue14027] Add pysetup script for Windows In-Reply-To: <1329373939.69.0.162264279004.issue14027@psf.upfronthosting.co.za> Message-ID: <1382627048.46.0.442633899864.issue14027@psf.upfronthosting.co.za> Antoine Pitrou added the comment: distutils2 is dead, closing. ---------- nosy: +pitrou resolution: -> postponed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 17:05:40 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 Oct 2013 15:05:40 +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: <1382627140.97.0.560617168815.issue14255@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Could you perhaps add a test? ---------- components: -IO, Windows stage: needs patch -> patch review versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 18:00:11 2013 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 24 Oct 2013 16:00:11 +0000 Subject: [issue15477] test_cmath failures on OS X 10.8 In-Reply-To: <1343469837.83.0.840988569572.issue15477@psf.upfronthosting.co.za> Message-ID: <1382630411.63.0.0720782004466.issue15477@psf.upfronthosting.co.za> Mark Dickinson added the comment: Update: I just received this from Apple, for bug #12128251. """ We believe this issue has been addressed in OS X Mavericks GM build 13A603. Please verify with this release, and update this report with your results. """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 18:03:20 2013 From: report at bugs.python.org (Andrei Dorian Duma) Date: Thu, 24 Oct 2013 16:03:20 +0000 Subject: [issue18959] Create a "Superseded modules" section in standard library ToC In-Reply-To: <1378559362.61.0.726437189184.issue18959@psf.upfronthosting.co.za> Message-ID: <1382630600.51.0.547716731283.issue18959@psf.upfronthosting.co.za> Andrei Dorian Duma added the comment: The patch adds a 'Deprecated Modules' heading in the library's ToC and moves 'imp' & 'optparse' to the new entry. ---------- keywords: +patch nosy: +andrei.duma Added file: http://bugs.python.org/file32331/doc_add_a_deprecated_modules_heading.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 18:12:11 2013 From: report at bugs.python.org (Andrei Dorian Duma) Date: Thu, 24 Oct 2013 16:12:11 +0000 Subject: [issue18959] Create a "Superseded modules" section in standard library ToC In-Reply-To: <1378559362.61.0.726437189184.issue18959@psf.upfronthosting.co.za> Message-ID: <1382631131.96.0.784406029906.issue18959@psf.upfronthosting.co.za> Andrei Dorian Duma added the comment: I changed 'Deprecated Modules' into 'Superseded Modules', as indicated by the issue title. ---------- Added file: http://bugs.python.org/file32332/doc_add_a_deprecated_modules_heading2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 18:13:21 2013 From: report at bugs.python.org (Matthew Earl) Date: Thu, 24 Oct 2013 16:13:21 +0000 Subject: [issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year In-Reply-To: <1382608937.44.0.992947795428.issue19376@psf.upfronthosting.co.za> Message-ID: <1382631201.48.0.0410832374995.issue19376@psf.upfronthosting.co.za> Matthew Earl added the comment: Out of interest, what's the reason for accepting the time.strptime() version as a bug, but not datetime.datetime.strptime()? Is it that time.strptime() is meant to be a simple parsing from string to tuple (with minimal checks), whereas datetime.datetime.strptime() should represent an actual point in time, therefore extra validation is expected to occur? If so I'm happy to either close or add a small note to the docs (I don't mind which.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 18:20:28 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 24 Oct 2013 16:20:28 +0000 Subject: [issue17762] platform.linux_distribution() should honor /etc/os-release In-Reply-To: <1366124468.64.0.40642643299.issue17762@psf.upfronthosting.co.za> Message-ID: <1382631628.14.0.611244366439.issue17762@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Hi Andrei Duma, I have looked at your patch but have not tested it yet. But it seems to me that your patch is a little bit weak against the case where the file /etc/os-release is found, but not fully functional (either garbage, or only releases NAME information but not VERSION). But again, I am not so sure we should really bit pedantic about this or not. Need to do some investigation. ---------- nosy: +vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 18:27:28 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 24 Oct 2013 16:27:28 +0000 Subject: [issue19359] reversed() does not work with weakref.proxy of sequences In-Reply-To: <1382511608.51.0.706468574715.issue19359@psf.upfronthosting.co.za> Message-ID: <1382632048.27.0.440828277382.issue19359@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 18:29:45 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 24 Oct 2013 16:29:45 +0000 Subject: [issue19362] Documentation for len() fails to mention that it works on sets In-Reply-To: <1382530928.74.0.685857253341.issue19362@psf.upfronthosting.co.za> Message-ID: <1382632185.92.0.554689732128.issue19362@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > "Return the number of items of a container" sounds > simple and accurate to me. I agree this would be best. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 18:30:30 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 24 Oct 2013 16:30:30 +0000 Subject: [issue19363] Python 2.7's future_builtins.map is not compatible with Python 3's map In-Reply-To: <1382534189.14.0.63787411181.issue19363@psf.upfronthosting.co.za> Message-ID: <1382632230.71.0.143760975111.issue19363@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 18:31:05 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 24 Oct 2013 16:31:05 +0000 Subject: [issue17762] platform.linux_distribution() should honor /etc/os-release In-Reply-To: <1382626781.84.0.880181996942.issue17762@psf.upfronthosting.co.za> Message-ID: <52694B49.7020007@egenix.com> Marc-Andre Lemburg added the comment: On 24.10.2013 16:59, Andrei Dorian Duma wrote: > > I added a patch (my first patch!). > > platform.linux_distribution() now first looks in /etc/os-release. If this file is not found, checking continues as before. Looks good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 18:33:17 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 24 Oct 2013 16:33:17 +0000 Subject: [issue19369] PyObject_LengthHint is slow In-Reply-To: <1382557107.61.0.118222715036.issue19369@psf.upfronthosting.co.za> Message-ID: <1382632397.92.0.149519649695.issue19369@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Here is a patch which uses _PyObject_HasLen. It has same performance > but is much simpler. +1 This will be a nice improvement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 18:34:30 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 24 Oct 2013 16:34:30 +0000 Subject: [issue19332] Guard against changing dict during iteration In-Reply-To: <1382364174.9.0.836332683158.issue19332@psf.upfronthosting.co.za> Message-ID: <1382632470.19.0.650335384315.issue19332@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I disagree with adding such unimportant code to the critical path. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 18:47:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 24 Oct 2013 16:47:52 +0000 Subject: [issue17400] ipaddress should make it easy to identify rfc6598 addresses In-Reply-To: <1363052217.02.0.113831391012.issue17400@psf.upfronthosting.co.za> Message-ID: <3d5Dry1MVRz7LjP@mail.python.org> Roundup Robot added the comment: New changeset b9623fa5a0dd by Peter Moody in branch 'default': #17400: correct handling of 100.64.0.0/10, fixing the docs and updating NEWS http://hg.python.org/cpython/rev/b9623fa5a0dd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 19:08:23 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 24 Oct 2013 17:08:23 +0000 Subject: [issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year In-Reply-To: <1382608937.44.0.992947795428.issue19376@psf.upfronthosting.co.za> Message-ID: <1382634503.77.0.716938480537.issue19376@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > what's the reason for accepting the time.strptime() > version as a bug, but not datetime.datetime.strptime()? In case of time.strptime(), we have an option of returning (1900, 2, 29, ..) which while not being a valid date, is a valid (time)tuple: >>> time.mktime((1900, 2, 29, 0, 0, 0, 0, 0, 0)) -2203873200.0 The time module treats 1900-02-29 as 1900-03-01: >>> time.mktime((1900, 3, 1, 0, 0, 0, 0, 0, 0)) -2203873200.0 Datetime is stricter than that: >>> datetime(1900, 2, 29) Traceback (most recent call last): File "", line 1, in ValueError: day is out of range for month There is no valid datetime value that can reasonably be returned from datetime.strptime('Feb 29', '%b %d'). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 19:28:00 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 24 Oct 2013 17:28:00 +0000 Subject: [issue19377] Backport SVG mime type to Python 2 In-Reply-To: <1382622251.64.0.363936372729.issue19377@psf.upfronthosting.co.za> Message-ID: <1382635680.78.0.279981859799.issue19377@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Christian: I think adding MIME types falls under platform support and we do still add platform support to Python 2.7. That said, the mimetypes module *does* use platform files for determining MIME types, so adding missing MIME types there will likely result in a more usable overall system :-) In other words: the problem is not really in Python's module, which only provides a bare minimum of MIME types, but in the system setup of your system, Anatoly. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 19:36:55 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 24 Oct 2013 17:36:55 +0000 Subject: [issue19377] Backport SVG mime type to Python 2 In-Reply-To: <1382622251.64.0.363936372729.issue19377@psf.upfronthosting.co.za> Message-ID: <1382636215.96.0.53632440927.issue19377@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 20:02:46 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Thu, 24 Oct 2013 18:02:46 +0000 Subject: [issue17916] Provide dis.Bytecode based equivalent of dis.distb In-Reply-To: <1367844864.14.0.49825143621.issue17916@psf.upfronthosting.co.za> Message-ID: <1382637766.01.0.439503967274.issue17916@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Here's the updated version according to your comments. Because there is no need for show_info() and info(), the current class is not a subclass of Bytecode (as I implied from your first message). After issue19378 is fixed, we could change the line_offset with something else in TracebackBytecode.__iter__. ---------- Added file: http://bugs.python.org/file32333/dis_tb.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 20:40:07 2013 From: report at bugs.python.org (Santoso Wijaya) Date: Thu, 24 Oct 2013 18:40:07 +0000 Subject: [issue13234] os.listdir breaks with literal paths In-Reply-To: <1319129686.22.0.325584161741.issue13234@psf.upfronthosting.co.za> Message-ID: <1382640007.86.0.196711850253.issue13234@psf.upfronthosting.co.za> Santoso Wijaya added the comment: Here you go. ---------- Added file: http://bugs.python.org/file32334/issue13234_tip_refresh.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 20:47:36 2013 From: report at bugs.python.org (Jyrki Pulliainen) Date: Thu, 24 Oct 2013 18:47:36 +0000 Subject: [issue16037] httplib: header parsing is unlimited In-Reply-To: <1348568722.91.0.654032066819.issue16037@psf.upfronthosting.co.za> Message-ID: <1382640456.72.0.588870891799.issue16037@psf.upfronthosting.co.za> Jyrki Pulliainen added the comment: Patch for py32 applies cleanly on 3.4 too, this should be good to go ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 20:59:00 2013 From: report at bugs.python.org (Santoso Wijaya) Date: Thu, 24 Oct 2013 18:59:00 +0000 Subject: [issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix In-Reply-To: <1371050681.12.0.381093438517.issue18199@psf.upfronthosting.co.za> Message-ID: <1382641140.1.0.213262505285.issue18199@psf.upfronthosting.co.za> Changes by Santoso Wijaya : ---------- nosy: +santa4nt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 21:05:08 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 24 Oct 2013 19:05:08 +0000 Subject: [issue19327] re doesn't work with big charsets In-Reply-To: <1382354642.85.0.292267314157.issue19327@psf.upfronthosting.co.za> Message-ID: <3d5Hvl1frPz7Ljv@mail.python.org> Roundup Robot added the comment: New changeset d2bb0da45c93 by Serhiy Storchaka in branch '2.7': Issue #19327: Fixed the working of regular expressions with too big charset. http://hg.python.org/cpython/rev/d2bb0da45c93 New changeset 4431fa917f22 by Serhiy Storchaka in branch '3.3': Issue #19327: Fixed the working of regular expressions with too big charset. http://hg.python.org/cpython/rev/4431fa917f22 New changeset 10081a0ca4bd by Serhiy Storchaka in branch 'default': Issue #19327: Fixed the working of regular expressions with too big charset. http://hg.python.org/cpython/rev/10081a0ca4bd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 21:07:27 2013 From: report at bugs.python.org (Jyrki Pulliainen) Date: Thu, 24 Oct 2013 19:07:27 +0000 Subject: [issue16041] poplib: unlimited readline() from connection In-Reply-To: <1348569563.2.0.69634867698.issue16041@psf.upfronthosting.co.za> Message-ID: <1382641647.78.0.446065460148.issue16041@psf.upfronthosting.co.za> Jyrki Pulliainen added the comment: Here's a max line lenght fix for 3.2 (applies on 3.4 too). I wonder if _getlongresp should have some max length detection too for max length of a multiline response ---------- Added file: http://bugs.python.org/file32335/issue16041_py32.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 21:14:27 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 24 Oct 2013 19:14:27 +0000 Subject: [issue19273] Update PCbuild/readme.txt In-Reply-To: <1381956724.6.0.425752006149.issue19273@psf.upfronthosting.co.za> Message-ID: <1382642067.95.0.958018005047.issue19273@psf.upfronthosting.co.za> Zachary Ware added the comment: Here's the new patch, a few tabs converted, a few trailing spaces removed, and one sentence added to the Sub-projects section description. ---------- Added file: http://bugs.python.org/file32336/pcbuild_readme.v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 21:24:59 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 Oct 2013 19:24:59 +0000 Subject: [issue19329] Faster compiling of charset regexpes In-Reply-To: <1382356878.81.0.973141365685.issue19329@psf.upfronthosting.co.za> Message-ID: <1382642699.0.0.831034299627.issue19329@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a more complex patch which optimizes charset compiling. It affects small charsets too. Big charsets now supports same optimizations as small charsets. Optimized bitmap now can be used even if the charset contains category items or non-bmp characters. $ ./python -m timeit "from sre_compile import compile; r = '[0-9]+'" "compile(r, 0)" Unpatched: 1000 loops, best of 3: 457 usec per loop Patched: 1000 loops, best of 3: 368 usec per loop $ ./python -m timeit "from sre_compile import compile; r = '[ \t\n\r\v\f]+'" "compile(r, 0)" Unpatched: 1000 loops, best of 3: 490 usec per loop Patched: 1000 loops, best of 3: 413 usec per loop $ ./python -m timeit "from sre_compile import compile; r = '[0-9A-Za-z_]+'" "compile(r, 0)" Unpatched: 1000 loops, best of 3: 760 usec per loop Patched: 1000 loops, best of 3: 527 usec per loop $ ./python -m timeit "from sre_compile import compile; r = r'[^\ud800-\udfff]*'" "compile(r, 0)" Unpatched: 100 loops, best of 3: 2.07 msec per loop Patched: 1000 loops, best of 3: 1.44 msec per loop $ ./python -m timeit "from sre_compile import compile; r = '[\u0410-\u042f\u0430-\u043f\u0404\u0406\u0407\u0454\u0456\u0457\u0490\u0491]+'" "compile(r, 0)" Unpatched: 100 loops, best of 3: 8.24 msec per loop Patched: 100 loops, best of 3: 2.13 msec per loop $ ./python -m timeit "from sre_compile import compile; r = '[%s]' % ''.join(map(chr, range(256, 2**16, 255)))" "compile(r, 0)" Unpatched: 10 loops, best of 3: 119 msec per loop Patched: 10 loops, best of 3: 24.1 msec per loop ---------- title: Faster compiling of big charset regexpes -> Faster compiling of charset regexpes Added file: http://bugs.python.org/file32337/re_optimize_charset.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 21:25:42 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 Oct 2013 19:25:42 +0000 Subject: [issue19327] re doesn't work with big charsets In-Reply-To: <1382354642.85.0.292267314157.issue19327@psf.upfronthosting.co.za> Message-ID: <1382642742.74.0.839181469767.issue19327@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 21:38:06 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 19:38:06 +0000 Subject: [issue19273] Update PCbuild/readme.txt In-Reply-To: <1382642067.95.0.958018005047.issue19273@psf.upfronthosting.co.za> Message-ID: <52697715.9040604@timgolden.me.uk> Tim Golden added the comment: Thanks, Zachary. Do you see this going against just tip, or should it be backported to 3.3 / 2.7? (I'm not sure how well the latter would be received, truth be told). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 21:47:53 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 19:47:53 +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: <1382644073.05.0.0368039558468.issue14255@psf.upfronthosting.co.za> Changes by Tim Golden : Removed file: http://bugs.python.org/file32328/issue14255.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 21:49:35 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 19:49:35 +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: <1382644175.57.0.753956853713.issue14255@psf.upfronthosting.co.za> Tim Golden added the comment: Added, including a slightly surprising change needed to test_zipimport_support (which arguably should have been there from the start for robustness). ---------- assignee: -> tim.golden Added file: http://bugs.python.org/file32338/issue14255.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 21:54:11 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 Oct 2013 19:54:11 +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: <1382644451.61.0.893739319195.issue14255@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The test fails under Linux here: ====================================================================== FAIL: test_case_sensitive (test.test_tempfile.TestGetTempDir) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/cpython/default/Lib/test/test_tempfile.py", line 490, in test_case_sensitive self.assertEqual(tempfile.gettempdir(), case_sensitive_tempdir) AssertionError: '/tmp' != 'C:\\Temp' - /tmp + C:\Temp ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 21:55:05 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 24 Oct 2013 19:55:05 +0000 Subject: [issue19273] Update PCbuild/readme.txt In-Reply-To: <1381956724.6.0.425752006149.issue19273@psf.upfronthosting.co.za> Message-ID: <1382644505.23.0.951615248636.issue19273@psf.upfronthosting.co.za> Zachary Ware added the comment: This patch will only apply to tip. There would need to be some changes to backport to 3.3 and I haven't actually looked at 2.7, but I expect it would require extensive changes that probably wouldn't be worth it. There are a few factual errors in 3.3 (such as supported platforms including Win2k) that should probably be corrected (and likely some in 2.7 as well), but that could be a separate issue. I think it would be best not to backport this patch, and I'll open a separate issue to correct any errors in 2.7/3.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 21:58:07 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 19:58:07 +0000 Subject: [issue19273] Update PCbuild/readme.txt In-Reply-To: <1382644505.23.0.951615248636.issue19273@psf.upfronthosting.co.za> Message-ID: <52697BC8.6060309@timgolden.me.uk> Tim Golden added the comment: Fine. I'll commit it later. (Probably tomorrow at this point) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 21:58:14 2013 From: report at bugs.python.org (Jyrki Pulliainen) Date: Thu, 24 Oct 2013 19:58:14 +0000 Subject: [issue16040] nntplib: unlimited readline() from connection In-Reply-To: <1348569525.38.0.219080768405.issue16040@psf.upfronthosting.co.za> Message-ID: <1382644694.25.0.407791973508.issue16040@psf.upfronthosting.co.za> Jyrki Pulliainen added the comment: ...and here's a patch for 3.2 ---------- Added file: http://bugs.python.org/file32339/issue16040_py32.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 21:59:18 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 24 Oct 2013 19:59:18 +0000 Subject: [issue19236] Add Tornado HTTP benchmark In-Reply-To: <1381605331.62.0.22076893629.issue19236@psf.upfronthosting.co.za> Message-ID: <3d5K6F3zw4z7LnY@mail.python.org> Roundup Robot added the comment: New changeset 9a1136898539 by Antoine Pitrou in branch 'default': Close #19236: add a Tornado-based HTTP benchmark http://hg.python.org/benchmarks/rev/9a1136898539 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 22:09:10 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 Oct 2013 20:09:10 +0000 Subject: [issue19379] Don't import linecache at warnings toplevel Message-ID: <1382645350.53.0.967299758483.issue19379@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Importing warnings pulls linecache at the top-level, while it's only necessary when printing warnings. The reason why it wasn't done lazily is obsolete, since Python now has per-module import locks. Attached patch makes the linecache imports lazy. This is desirable for issue #19375. ---------- components: Library (Lib) files: warnings_lazy.patch keywords: patch messages: 201174 nosy: brett.cannon, christian.heimes, pitrou priority: normal severity: normal stage: patch review status: open title: Don't import linecache at warnings toplevel type: resource usage versions: Python 3.4 Added file: http://bugs.python.org/file32340/warnings_lazy.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 22:09:41 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 24 Oct 2013 20:09:41 +0000 Subject: [issue15556] os.stat fails for file pending delete on Windows In-Reply-To: <1344096463.0.0.611888237472.issue15556@psf.upfronthosting.co.za> Message-ID: <1382645381.08.0.158070555434.issue15556@psf.upfronthosting.co.za> Tim Golden added the comment: Had a to-and-fro on IRC with RDM who highlighted that an inconsistency between os.listdir and os.path.exists (the case here) is, at least, undesirable. As it stands, our os.exists on os.stat mechanism will fail because any attempt to get any kind of handle via CreateFile will fail once the file is unlinked. However, FindFirstFile succeeds (hence os.listdir). I'll put forward a patch to see whether it's worth pursuing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 22:14:07 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 Oct 2013 20:14:07 +0000 Subject: [issue18458] interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update In-Reply-To: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> Message-ID: <1382645647.82.0.0029911364554.issue18458@psf.upfronthosting.co.za> Ned Deily added the comment: Barry: yes, 2.6 is affected. See discussion on python-dev. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 22:14:19 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 Oct 2013 20:14:19 +0000 Subject: [issue19380] Optimize parsing of regular expressions Message-ID: <1382645659.73.0.868235602026.issue19380@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Proposed patch optimizes parsing of regular expressions. Total time of re unittests decreased by 10%. ---------- assignee: serhiy.storchaka components: Library (Lib), Regular Expressions files: re_parse.patch keywords: patch messages: 201177 nosy: ezio.melotti, mrabarnett, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Optimize parsing of regular expressions type: performance versions: Python 3.4 Added file: http://bugs.python.org/file32341/re_parse.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 22:14:59 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 Oct 2013 20:14:59 +0000 Subject: [issue19369] PyObject_LengthHint is slow In-Reply-To: <1382557107.61.0.118222715036.issue19369@psf.upfronthosting.co.za> Message-ID: <1382645699.0.0.90331260148.issue19369@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 22:15:14 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 24 Oct 2013 20:15:14 +0000 Subject: [issue19379] Don't import linecache at warnings toplevel In-Reply-To: <1382645350.53.0.967299758483.issue19379@psf.upfronthosting.co.za> Message-ID: <1382645714.49.0.483051618688.issue19379@psf.upfronthosting.co.za> Christian Heimes added the comment: LGTM Good catch! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 22:15:26 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 24 Oct 2013 20:15:26 +0000 Subject: [issue19379] Don't import linecache at warnings toplevel In-Reply-To: <1382645350.53.0.967299758483.issue19379@psf.upfronthosting.co.za> Message-ID: <1382645726.69.0.119959911352.issue19379@psf.upfronthosting.co.za> Brett Cannon added the comment: LGTM ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 22:19:33 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 Oct 2013 20:19:33 +0000 Subject: [issue19375] Deprecate site-python in site.py In-Reply-To: <1382605871.26.0.0916867662711.issue19375@psf.upfronthosting.co.za> Message-ID: <1382645973.16.0.645537371769.issue19375@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch. ---------- keywords: +patch Added file: http://bugs.python.org/file32342/deprecate_site_python.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 22:20:18 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 24 Oct 2013 20:20:18 +0000 Subject: [issue19369] PyObject_LengthHint is slow In-Reply-To: <1382557107.61.0.118222715036.issue19369@psf.upfronthosting.co.za> Message-ID: <3d5KZT4h8gz7LnH@mail.python.org> Roundup Robot added the comment: New changeset bffb49efc383 by Serhiy Storchaka in branch 'default': Issue #19369: Optimized the usage of __length_hint__(). http://hg.python.org/cpython/rev/bffb49efc383 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 22:21:55 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 Oct 2013 20:21:55 +0000 Subject: [issue19369] PyObject_LengthHint is slow In-Reply-To: <1382557107.61.0.118222715036.issue19369@psf.upfronthosting.co.za> Message-ID: <1382646115.28.0.767693572753.issue19369@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 22:24:49 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 24 Oct 2013 20:24:49 +0000 Subject: [issue19379] Don't import linecache at warnings toplevel In-Reply-To: <1382645350.53.0.967299758483.issue19379@psf.upfronthosting.co.za> Message-ID: <3d5Kgh4cNVz7LpQ@mail.python.org> Roundup Robot added the comment: New changeset 8939c0196990 by Antoine Pitrou in branch 'default': Close #19379: Lazily import linecache in the warnings module, to make startup with warnings faster until a warning gets printed. http://hg.python.org/cpython/rev/8939c0196990 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 22:27:27 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 Oct 2013 20:27:27 +0000 Subject: [issue19380] Optimize parsing of regular expressions In-Reply-To: <1382645659.73.0.868235602026.issue19380@psf.upfronthosting.co.za> Message-ID: <1382646447.38.0.75600221787.issue19380@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't think "+=" speeds up anything for ints, you might as well minimize code churn by avoiding such changes. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 22:43:23 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 24 Oct 2013 20:43:23 +0000 Subject: [issue18458] interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update In-Reply-To: <1382645647.82.0.0029911364554.issue18458@psf.upfronthosting.co.za> Message-ID: <20131024164321.4e2ed76f@anarchist> Barry A. Warsaw added the comment: On Oct 24, 2013, at 08:14 PM, Ned Deily wrote: >Barry: yes, 2.6 is affected. See discussion on python-dev. Thanks Ned for the background over on python-dev. Unless I hear objections otherwise, I am not going to apply this to 2.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 22:54:18 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 Oct 2013 20:54:18 +0000 Subject: [issue15477] test_cmath failures on OS X 10.8 In-Reply-To: <1343469837.83.0.840988569572.issue15477@psf.upfronthosting.co.za> Message-ID: <1382648058.16.0.41610876077.issue15477@psf.upfronthosting.co.za> Ned Deily added the comment: I built Python at 3fba718e46e5 on both 10.8 and 10.9 which was just before your changes for this issue went in, Mark. On 10.8: test_cmath fails and: >>> math.log1p(-0.0) 0.0 And, indeed, on 10.9, it passes and: >>> math.log1p(-0.0) -0.0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 23:02:36 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 24 Oct 2013 21:02:36 +0000 Subject: [issue19287] __contains__() of dbm.ndbm databases fails with str In-Reply-To: <1382126242.51.0.42060822734.issue19287@psf.upfronthosting.co.za> Message-ID: <3d5LVt4yMZz7Lpb@mail.python.org> Roundup Robot added the comment: New changeset 61ab0c6907f9 by Serhiy Storchaka in branch '3.3': Issue #19287: Fixed the "in" operator of dbm.ndbm databases for string http://hg.python.org/cpython/rev/61ab0c6907f9 New changeset cb82b4efa67b by Serhiy Storchaka in branch 'default': Issue #19287: Fixed the "in" operator of dbm.ndbm databases for string http://hg.python.org/cpython/rev/cb82b4efa67b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 23:08:46 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 24 Oct 2013 21:08:46 +0000 Subject: [issue19288] __contains__() of dbm.gnu databases fails with str In-Reply-To: <1382127793.56.0.416420933735.issue19288@psf.upfronthosting.co.za> Message-ID: <3d5LfP523Qz7LjP@mail.python.org> Roundup Robot added the comment: New changeset 09ed1b3b54f3 by Serhiy Storchaka in branch '3.3': Issue #19288: Fixed the "in" operator of dbm.gnu databases for string http://hg.python.org/cpython/rev/09ed1b3b54f3 New changeset 379372612f6d by Serhiy Storchaka in branch 'default': Issue #19288: Fixed the "in" operator of dbm.gnu databases for string http://hg.python.org/cpython/rev/379372612f6d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 23:10:31 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 Oct 2013 21:10:31 +0000 Subject: [issue19287] __contains__() of dbm.ndbm databases fails with str In-Reply-To: <1382126242.51.0.42060822734.issue19287@psf.upfronthosting.co.za> Message-ID: <1382649031.23.0.291438102315.issue19287@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your contribution Arfrever. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 23:12:01 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 Oct 2013 21:12:01 +0000 Subject: [issue19288] __contains__() of dbm.gnu databases fails with str In-Reply-To: <1382127793.56.0.416420933735.issue19288@psf.upfronthosting.co.za> Message-ID: <1382649121.33.0.673051630048.issue19288@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 23:15:31 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 Oct 2013 21:15:31 +0000 Subject: [issue18685] Restore re performance to pre-PEP393 level In-Reply-To: <1375967417.95.0.0303828296889.issue18685@psf.upfronthosting.co.za> Message-ID: <1382649331.95.0.264690692512.issue18685@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Please review this patch. I will extract template part into separated file in separated commit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 23:17:22 2013 From: report at bugs.python.org (Manish Raghavan) Date: Thu, 24 Oct 2013 21:17:22 +0000 Subject: [issue19381] Seg Fault with complex numbers Message-ID: <1382649442.62.0.379719453472.issue19381@psf.upfronthosting.co.za> New submission from Manish Raghavan: Python 3.3.2 (v3.3.2:d047928ae3f6, May 13 2013, 13:52:24) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> 1+1j (1+1j) >>> 1+1j Segmentation fault: 11 ---------- assignee: ronaldoussoren components: Macintosh messages: 201190 nosy: Manish.Raghavan, ronaldoussoren priority: normal severity: normal status: open title: Seg Fault with complex numbers type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 23:18:57 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 24 Oct 2013 21:18:57 +0000 Subject: [issue19381] Seg Fault with complex numbers In-Reply-To: <1382649442.62.0.379719453472.issue19381@psf.upfronthosting.co.za> Message-ID: <1382649537.92.0.916926411615.issue19381@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> duplicate status: open -> closed superseder: -> interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 23:19:41 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 24 Oct 2013 21:19:41 +0000 Subject: [issue19381] Seg Fault with complex numbers In-Reply-To: <1382649442.62.0.379719453472.issue19381@psf.upfronthosting.co.za> Message-ID: <1382649581.44.0.82744544266.issue19381@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 23:30:12 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 Oct 2013 21:30:12 +0000 Subject: [issue19380] Optimize parsing of regular expressions In-Reply-To: <1382645659.73.0.868235602026.issue19380@psf.upfronthosting.co.za> Message-ID: <1382650212.49.0.592303710307.issue19380@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Done. ---------- Added file: http://bugs.python.org/file32343/re_parse_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 24 23:40:51 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 Oct 2013 21:40:51 +0000 Subject: [issue19380] Optimize parsing of regular expressions In-Reply-To: <1382645659.73.0.868235602026.issue19380@psf.upfronthosting.co.za> Message-ID: <1382650851.8.0.143373665905.issue19380@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Do you have any benchmark figures (apart from the time of re unittests)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 00:40:37 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 24 Oct 2013 22:40:37 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1382654437.97.0.827943196644.issue19183@psf.upfronthosting.co.za> Christian Heimes added the comment: I have created a clone for PEP 456 and applied your suggestions. I'm still looking for a nice API to handle the hash definition. Do you have some suggestions? ---------- hgrepos: +212 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 00:58:45 2013 From: report at bugs.python.org (Colin Williams) Date: Thu, 24 Oct 2013 22:58:45 +0000 Subject: [issue19382] tabnanny unit tests Message-ID: <1382655525.74.0.119259261788.issue19382@psf.upfronthosting.co.za> New submission from Colin Williams: I didn't test the stdout and stderr stuff, but I got the module up to 74% coverage. ---------- files: tabnanny.patch keywords: patch messages: 201194 nosy: Colin.Williams priority: normal severity: normal status: open title: tabnanny unit tests Added file: http://bugs.python.org/file32344/tabnanny.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 01:19:09 2013 From: report at bugs.python.org (Berker Peksag) Date: Thu, 24 Oct 2013 23:19:09 +0000 Subject: [issue19382] tabnanny unit tests In-Reply-To: <1382655525.74.0.119259261788.issue19382@psf.upfronthosting.co.za> Message-ID: <1382656749.54.0.146359233053.issue19382@psf.upfronthosting.co.za> Berker Peksag added the comment: See also issue 19102. ---------- components: +Tests nosy: +berker.peksag stage: -> patch review versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 01:28:42 2013 From: report at bugs.python.org (Colin Williams) Date: Thu, 24 Oct 2013 23:28:42 +0000 Subject: [issue19382] tabnanny unit tests In-Reply-To: <1382655525.74.0.119259261788.issue19382@psf.upfronthosting.co.za> Message-ID: <1382657322.73.0.0680566833728.issue19382@psf.upfronthosting.co.za> Colin Williams added the comment: Alright, I'll wait until that one gets committed, and then add in my changes. I think between the two of us we'll get close to 100% ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 01:33:34 2013 From: report at bugs.python.org (Colin Williams) Date: Thu, 24 Oct 2013 23:33:34 +0000 Subject: [issue19383] nturl2path test coverage Message-ID: <1382657614.74.0.213729784079.issue19383@psf.upfronthosting.co.za> New submission from Colin Williams: Full coverage on this module ---------- files: nturl2path.patch keywords: patch messages: 201197 nosy: Colin.Williams priority: normal severity: normal status: open title: nturl2path test coverage Added file: http://bugs.python.org/file32345/nturl2path.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 01:49:00 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 24 Oct 2013 23:49:00 +0000 Subject: [issue19383] nturl2path test coverage In-Reply-To: <1382657614.74.0.213729784079.issue19383@psf.upfronthosting.co.za> Message-ID: <1382658540.44.0.220856427446.issue19383@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 02:05:40 2013 From: report at bugs.python.org (Andrew Barnert) Date: Fri, 25 Oct 2013 00:05:40 +0000 Subject: [issue19019] Investigate using Apple clang for building OS X installers In-Reply-To: <1379190673.82.0.353716409802.issue19019@psf.upfronthosting.co.za> Message-ID: <1382659540.53.0.465723841197.issue19019@psf.upfronthosting.co.za> Andrew Barnert added the comment: Now that Xcode 5 is out, and does not have anything named "gcc-4.2" (it _does_ still have something called "gcc", which is now a wrapper around clang instead of a wrapper around llvm-gcc-4.2), this seems a lot more critical, because (as far as I can tell) nobody with Xcode 5 can build C extensions for python.org Python installations. And that also implies that any changes need to be backported to 2.7 and 3.3, unless the plan is that only Python 3.4+ should work with Xcode 5. ---------- nosy: +abarnert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 03:37:40 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 25 Oct 2013 01:37:40 +0000 Subject: [issue19019] Investigate using Apple clang for building OS X installers In-Reply-To: <1379190673.82.0.353716409802.issue19019@psf.upfronthosting.co.za> Message-ID: <1382665060.42.0.984082554297.issue19019@psf.upfronthosting.co.za> Ned Deily added the comment: "nobody with Xcode 5 can build C extensions for python.org Python installations" Andrew, can you elaborate on what problems you or others are seeing? Xcode 5 should not be an issue for users of the current python.org Pythons. When building extension modules, if the compiler Python was built with is not available Distutils in the current 2.7.x, 3.3.x, and 3.4.x release will substitute clang. This assumes they have the Command Line Tools installed, either through Xcode or the standalone CLT package and assumes that the user is not overriding defaults by setting environment variables like CC and LDSHARED which Distutils will honor without attempting to modify them. This should all be independent of what compiler Python was built with. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 04:03:48 2013 From: report at bugs.python.org (Berker Peksag) Date: Fri, 25 Oct 2013 02:03:48 +0000 Subject: [issue19383] nturl2path test coverage In-Reply-To: <1382657614.74.0.213729784079.issue19383@psf.upfronthosting.co.za> Message-ID: <1382666628.49.0.73277836349.issue19383@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- components: +Tests versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 04:15:30 2013 From: report at bugs.python.org (Kassym Dorsel) Date: Fri, 25 Oct 2013 02:15:30 +0000 Subject: [issue19364] Implementing __getattr__ breaks copy and deepcopy In-Reply-To: <1382536183.12.0.651276140754.issue19364@psf.upfronthosting.co.za> Message-ID: <1382667330.67.0.213749091632.issue19364@psf.upfronthosting.co.za> Kassym Dorsel added the comment: Yes. You're correct. Sorry for the confusion. Below is an updated snippet of code. >>> from copy import copy >>> class foo(): ... def __getattr__(self, attr): ... return None ... >>> f = foo() >>> copy(f) Traceback (most recent call last): File "", line 1, in File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 76, in copy return copier(x) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 125, in _copy_inst return x.__copy__() TypeError: 'NoneType' object is not callable ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 04:39:12 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 25 Oct 2013 02:39:12 +0000 Subject: [issue19364] Implementing __getattr__ breaks copy and deepcopy In-Reply-To: <1382536183.12.0.651276140754.issue19364@psf.upfronthosting.co.za> Message-ID: <1382668752.13.0.693696590045.issue19364@psf.upfronthosting.co.za> Eric Snow added the comment: I knew this sounded familiar. Take a look at issue16251. ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> pickle special methods are looked up on the instance rather than the type _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 04:42:30 2013 From: report at bugs.python.org (Larry Hastings) Date: Fri, 25 Oct 2013 02:42:30 +0000 Subject: [issue19358] Integrate "Argument Clinic" into CPython build In-Reply-To: <1382508751.78.0.556655688797.issue19358@psf.upfronthosting.co.za> Message-ID: <1382668950.51.0.0578749609641.issue19358@psf.upfronthosting.co.za> Larry Hastings added the comment: > Well, why is clinic 3.3 only? It would be slightly easier > if it accepted any "python3" executable. Patches welcome! I have bigger fish to fry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 06:52:07 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 25 Oct 2013 04:52:07 +0000 Subject: [issue16595] Add resource.prlimit In-Reply-To: <1354446881.9.0.288115855459.issue16595@psf.upfronthosting.co.za> Message-ID: <1382676727.86.0.626668134034.issue16595@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: The test is failing with ENOSYS on one of the buildbots: """ ====================================================================== ERROR: test_prlimit (test.test_resource.ResourceTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/test_resource.py", line 148, in test_prlimit 1, resource.RLIMIT_AS) File "/var/lib/buildslave/3.x.murray-gentoo/build/Lib/unittest/case.py", line 689, in assertRaises return context.handle('assertRaises', callableObj, args, kwargs) File "/var/lib/buildslave/3.x.murray-gentoo/build/Lib/unittest/case.py", line 158, in handle callable_obj(*args, **kwargs) OSError: [Errno 38] Function not implemented """ I wonder if we could add a @support.ignore_enosys decorator... ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 07:33:48 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Fri, 25 Oct 2013 05:33:48 +0000 Subject: [issue19384] test_py_compile fails with OSError on FreeBSD for root user Message-ID: <1382679228.36.0.603807320652.issue19384@psf.upfronthosting.co.za> New submission from Claudiu.Popa: The actual error: ====================================================================== FAIL: test_exceptions_propagate (test.test_py_compile.PyCompileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tank/libs/cpython/Lib/test/test_py_compile.py", line 88, in test_exceptions_propagate py_compile.compile(self.source_path, self.pyc_path) AssertionError: OSError not raised ---------------------------------------------------------------------- Ran 7 tests in 0.007s FAILED (failures=1) test test_py_compile failed 1 test failed: test_py_compile os.chmod(self.directory, stat.S_IREAD) doesn't do what it is expected on FreeBSD for root user, the attached patch skips this test if the current user is root. ---------- components: Tests files: test_py_compile.patch keywords: patch messages: 201204 nosy: Claudiu.Popa priority: normal severity: normal status: open title: test_py_compile fails with OSError on FreeBSD for root user versions: Python 3.4 Added file: http://bugs.python.org/file32346/test_py_compile.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 07:57:11 2013 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 25 Oct 2013 05:57:11 +0000 Subject: [issue10977] Concrete object C API considered harmful to subclasses of builtin types In-Reply-To: <1295653779.62.0.836506069174.issue10977@psf.upfronthosting.co.za> Message-ID: <1382680631.72.0.241308159941.issue10977@psf.upfronthosting.co.za> Stefan Behnel added the comment: -1 on any changes that make the specific C-API functions less specific. They are perfectly adequate for gaining speed in well defined situations. +0 on any changes that special case concrete types in abstract calls if they prove to be worth the hassle. +1 for making sure CPython does not accidentally exclude subclasses internally for anything that's provided by users. +1 on CPython being the wrong place to work around this for external code. If extensions use the wrong function, *they* must be fixed. At most, there might be a documentation issue hidden here. Also, we should be careful with adding yet another substantial set of C-API functions. It's not clear to me that they are really needed in practice. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 08:31:29 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 25 Oct 2013 06:31:29 +0000 Subject: [issue16595] Add resource.prlimit In-Reply-To: <1354446881.9.0.288115855459.issue16595@psf.upfronthosting.co.za> Message-ID: <3d5b7h4f1fz7LjP@mail.python.org> Roundup Robot added the comment: New changeset 87d41a5a9077 by Christian Heimes in branch 'default': Issue #16595: prlimit() needs Linux kernel 2.6.36+ http://hg.python.org/cpython/rev/87d41a5a9077 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 08:33:23 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 25 Oct 2013 06:33:23 +0000 Subject: [issue16595] Add resource.prlimit In-Reply-To: <1354446881.9.0.288115855459.issue16595@psf.upfronthosting.co.za> Message-ID: <1382682803.51.0.185640652496.issue16595@psf.upfronthosting.co.za> Christian Heimes added the comment: The buildbot is Linux-2.6.35-vs2.3.0.36.32-gentoo-i686-Intel-R-_Core-TM-2_CPU_6600_ at _2.40GHz-with-gentoo-2.1 but prlimit() requires 2.6.36+. I didn't expect to see a combination of glibc with prlimit() and Kernel without prlimit(). According to man prlimit it's not suppose to fail with ENOSYS, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 08:35:00 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 25 Oct 2013 06:35:00 +0000 Subject: [issue16595] Add resource.prlimit In-Reply-To: <1382676727.86.0.626668134034.issue16595@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Or we should extend with supress(OSerror, errno=errno.ENOSYS): ... :-) (Just kidding, ignored tests must be marked as skipped.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 08:38:41 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Fri, 25 Oct 2013 06:38:41 +0000 Subject: [issue19385] dbm.dumb should be consistent when the database is closed Message-ID: <1382683121.03.0.174486602388.issue19385@psf.upfronthosting.co.za> New submission from Claudiu.Popa: This problem occurred in issue19282. Basicly, dbm.dumb is not consistent with dbm.gnu and dbm.ndbm when the database is closed, as seen in the following: >>> import dbm.dumb as d >>> db = d.open('test.dat', 'c') >>> db.close() >>> db.keys() Traceback (most recent call last): File "", line 1, in File "/tank/libs/cpython/Lib/dbm/dumb.py", line 212, in keys return list(self._index.keys()) AttributeError: 'NoneType' object has no attribute 'keys' >>> vs >>> import dbm.gnu as g >>> db = g.open('test.dat', 'c') >>> db.close() >>> db.keys() Traceback (most recent call last): File "", line 1, in _gdbm.error: GDBM object has already been closed >>> Attaching a patch. ---------- components: Library (Lib) messages: 201209 nosy: Claudiu.Popa priority: normal severity: normal status: open title: dbm.dumb should be consistent when the database is closed type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 08:40:09 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Fri, 25 Oct 2013 06:40:09 +0000 Subject: [issue19385] dbm.dumb should be consistent when the database is closed In-Reply-To: <1382683121.03.0.174486602388.issue19385@psf.upfronthosting.co.za> Message-ID: <1382683209.5.0.969443608357.issue19385@psf.upfronthosting.co.za> Changes by Claudiu.Popa : ---------- keywords: +patch Added file: http://bugs.python.org/file32347/dbm_dumb.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 08:40:38 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 25 Oct 2013 06:40:38 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1382683238.08.0.640819689343.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: Here's a patch just for the changes to the import page in the language reference. It's not perfect, but should represent the target pretty closely. ---------- nosy: +ncoghlan Added file: http://bugs.python.org/file32348/import-system-reference.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 08:45:07 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 25 Oct 2013 06:45:07 +0000 Subject: [issue19384] test_py_compile fails with OSError on FreeBSD for root user In-Reply-To: <1382679228.36.0.603807320652.issue19384@psf.upfronthosting.co.za> Message-ID: <1382683507.04.0.450768066186.issue19384@psf.upfronthosting.co.za> Christian Heimes added the comment: The patch looks good to me. I'm curious, is a root user on FreeBSD allowed to create files inside a read-only directory? ---------- nosy: +christian.heimes stage: -> patch review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 08:47:12 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 25 Oct 2013 06:47:12 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1382683632.51.0.922631577157.issue18864@psf.upfronthosting.co.za> Changes by Eric Snow : Removed file: http://bugs.python.org/file32348/import-system-reference.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 08:47:59 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 25 Oct 2013 06:47:59 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1382683679.39.0.739010652956.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: Let's try that again with the proper diff. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 08:50:04 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Fri, 25 Oct 2013 06:50:04 +0000 Subject: [issue19384] test_py_compile fails with OSError on FreeBSD for root user In-Reply-To: <1382679228.36.0.603807320652.issue19384@psf.upfronthosting.co.za> Message-ID: <1382683804.75.0.0839931188337.issue19384@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Yes, you can create files in a read-only directory if you are root, that's why os.chmod(directory, stat.S_IREAD is redundant there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 08:51:26 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 25 Oct 2013 06:51:26 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1382683886.41.0.550187837695.issue18864@psf.upfronthosting.co.za> Changes by Eric Snow : Added file: http://bugs.python.org/file32349/import-system-reference.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 08:52:41 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 25 Oct 2013 06:52:41 +0000 Subject: [issue12340] Access violation when using the C version of the io module In-Reply-To: <1308152515.03.0.630952257185.issue12340@psf.upfronthosting.co.za> Message-ID: <1382683961.63.0.442088168153.issue12340@psf.upfronthosting.co.za> Christian Heimes added the comment: The issue hasn't seen an update for over two years. Were you able to solve the issue? ---------- nosy: +christian.heimes status: open -> languishing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 09:15:12 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 25 Oct 2013 07:15:12 +0000 Subject: [issue19358] Integrate "Argument Clinic" into CPython build In-Reply-To: <1382508751.78.0.556655688797.issue19358@psf.upfronthosting.co.za> Message-ID: <1382685312.78.0.92642328507.issue19358@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Patches welcome! I have bigger fish to fry. That doesn't solve the "why" question. You wrote the code and it probably takes you two minutes to make a fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 09:22:23 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 25 Oct 2013 07:22:23 +0000 Subject: [issue19384] test_py_compile fails with OSError on FreeBSD for root user In-Reply-To: <1382679228.36.0.603807320652.issue19384@psf.upfronthosting.co.za> Message-ID: <3d5cG15GH7z7Ll9@mail.python.org> Roundup Robot added the comment: New changeset e7b97822110f by Christian Heimes in branch 'default': Issue 19384: Fix test_py_compile for root user, patch by Claudiu Popa. http://hg.python.org/cpython/rev/e7b97822110f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 09:23:33 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 25 Oct 2013 07:23:33 +0000 Subject: [issue19384] test_py_compile fails with OSError on FreeBSD for root user In-Reply-To: <1382679228.36.0.603807320652.issue19384@psf.upfronthosting.co.za> Message-ID: <1382685813.82.0.419794850196.issue19384@psf.upfronthosting.co.za> Christian Heimes added the comment: The test also fails for root user on Linux: $ sudo ./python Lib/test/test_py_compile.py .....F. ====================================================================== FAIL: test_exceptions_propagate (__main__.PyCompileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_py_compile.py", line 92, in test_exceptions_propagate py_compile.compile(self.source_path, self.pyc_path) AssertionError: OSError not raised ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 09:27:47 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 25 Oct 2013 07:27:47 +0000 Subject: [issue18404] Memory leak in gdbmmodule In-Reply-To: <1373288233.43.0.746729936071.issue18404@psf.upfronthosting.co.za> Message-ID: <1382686067.19.0.0789327839009.issue18404@psf.upfronthosting.co.za> Christian Heimes added the comment: The problem is already fixed in 3.3 and 3.4. Thank you nevertheless! :) ---------- nosy: +christian.heimes resolution: -> out of date stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 09:31:12 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 25 Oct 2013 07:31:12 +0000 Subject: [issue2552] test_ctypes failed Python 2.6a2 Solaris 10 SUN C In-Reply-To: <1207339311.94.0.138275170862.issue2552@psf.upfronthosting.co.za> Message-ID: <1382686272.6.0.0961903210687.issue2552@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- status: open -> languishing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 09:53:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 25 Oct 2013 07:53:43 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <3d5cyb0fbGzPb6@mail.python.org> Roundup Robot added the comment: New changeset 19b512bfc8d2 by Ned Deily in branch '2.7': Issue #15663: Tcl/Tk 8.5.15 is now included with the OS X 10.6+ http://hg.python.org/cpython/rev/19b512bfc8d2 New changeset 5ff4f0100a40 by Ned Deily in branch '3.3': Issue #15663: Tcl/Tk 8.5.15 is now included with the OS X 10.6+ http://hg.python.org/cpython/rev/5ff4f0100a40 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 09:54:05 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 25 Oct 2013 07:54:05 +0000 Subject: [issue19019] Investigate using Apple clang for building OS X installers In-Reply-To: <1379190673.82.0.353716409802.issue19019@psf.upfronthosting.co.za> Message-ID: <3d5cyb5vnxzPb6@mail.python.org> Roundup Robot added the comment: New changeset 323f1dcceb73 by Ned Deily in branch '2.7': Issue #19019: Change the OS X installer build script to use CFLAGS instead http://hg.python.org/cpython/rev/323f1dcceb73 New changeset 689b5c2d6959 by Ned Deily in branch '3.3': Issue #19019: Change the OS X installer build script to use CFLAGS instead http://hg.python.org/cpython/rev/689b5c2d6959 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 09:54:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 25 Oct 2013 07:54:06 +0000 Subject: [issue1584] Mac OS X: building with X11 Tkinter In-Reply-To: <1197345898.75.0.132866639605.issue1584@psf.upfronthosting.co.za> Message-ID: <3d5cyc43c4zSs7@mail.python.org> Roundup Robot added the comment: New changeset e7474d4d85ca by Ned Deily in branch '2.7': Issue #1584: Provide options to override default search paths for Tcl and Tk http://hg.python.org/cpython/rev/e7474d4d85ca New changeset d7662958b27a by Ned Deily in branch '3.3': Issue #1584: Provide options to override default search paths for Tcl and Tk http://hg.python.org/cpython/rev/d7662958b27a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 09:57:50 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 25 Oct 2013 07:57:50 +0000 Subject: [issue1516] make _ctypes work with non-gcc compilers In-Reply-To: <1196297579.57.0.775741892495.issue1516@psf.upfronthosting.co.za> Message-ID: <1382687870.01.0.787408399129.issue1516@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- status: open -> languishing versions: +Python 3.3, Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 09:58:10 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 25 Oct 2013 07:58:10 +0000 Subject: [issue10284] NNTP should accept bytestrings for username and password In-Reply-To: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> Message-ID: <1382687890.93.0.94387264332.issue10284@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- versions: +Python 3.3, Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 09:58:47 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 25 Oct 2013 07:58:47 +0000 Subject: [issue1274324] 'setup.py install' fails on linux from read-only storage Message-ID: <1382687927.59.0.863287355974.issue1274324@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- status: open -> languishing versions: +Python 3.3, Python 3.4 -3rd party, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 09:59:53 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 25 Oct 2013 07:59:53 +0000 Subject: [issue1584] Mac OS X: building with X11 Tkinter In-Reply-To: <1197345898.75.0.132866639605.issue1584@psf.upfronthosting.co.za> Message-ID: <1382687993.1.0.624620775723.issue1584@psf.upfronthosting.co.za> Ned Deily added the comment: Committed to default for release in 3.4.0. With the consent of the release managers, this change has been backported to 2.7 (for release in 2.7.6) and 3.3 (for 3.3.3) in support of Issue15663. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 10:01:37 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 25 Oct 2013 08:01:37 +0000 Subject: [issue19273] Update PCbuild/readme.txt In-Reply-To: <1381956724.6.0.425752006149.issue19273@psf.upfronthosting.co.za> Message-ID: <3d5d7J1JFzz7LjP@mail.python.org> Roundup Robot added the comment: New changeset 212b4b61fa05 by Tim Golden in branch 'default': Closes issue #19273: clean up the pcbuild readme.txt (Patch by Zachary Ware) http://hg.python.org/cpython/rev/212b4b61fa05 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 10:01:51 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 25 Oct 2013 08:01:51 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1382688111.42.0.773445694696.issue18864@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thanks, that looks pretty good - so much less work for loaders to do. After this, we may even be able to finally fix the circular import bug and the one where submodule imports succeed but the overall package import fails. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 10:06:31 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 25 Oct 2013 08:06:31 +0000 Subject: [issue19386] selectors test_interrupted_retry is flaky Message-ID: <1382688391.49.0.741915274953.issue19386@psf.upfronthosting.co.za> New submission from Christian Heimes: The test seems to be unstable on some build bots: http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%203.x/builds/5271/steps/test/logs/stdio ====================================================================== FAIL: test_interrupted_retry (test.test_selectors.EpollSelectorTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/test_selectors.py", line 299, in test_interrupted_retry self.assertLess(time() - t, 2.5) AssertionError: 105.86884237639606 not less than 2.5 ---------------------------------------------------------------------- Ran 58 tests in 127.113s ---------- assignee: neologix components: Tests messages: 201225 nosy: christian.heimes, neologix priority: normal severity: normal stage: needs patch status: open title: selectors test_interrupted_retry is flaky type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 11:30:56 2013 From: report at bugs.python.org (Tim Golden) Date: Fri, 25 Oct 2013 09:30:56 +0000 Subject: [issue19273] Update PCbuild/readme.txt In-Reply-To: <1381956724.6.0.425752006149.issue19273@psf.upfronthosting.co.za> Message-ID: <1382693456.57.0.826327360503.issue19273@psf.upfronthosting.co.za> Tim Golden added the comment: Done. Thanks for the patch. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 12:20:20 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 Oct 2013 10:20:20 +0000 Subject: [issue19380] Optimize parsing of regular expressions In-Reply-To: <1382645659.73.0.868235602026.issue19380@psf.upfronthosting.co.za> Message-ID: <1382696420.85.0.239522646289.issue19380@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: ### regex_compile ### Min: 2.897919 -> 2.577488: 1.12x faster Avg: 3.066306 -> 2.681966: 1.14x faster Significant (t=26.77) Stddev: 0.08789 -> 0.05085: 1.7283x smaller ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 12:23:36 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 25 Oct 2013 10:23:36 +0000 Subject: [issue4905] Use INVALID_FILE_ATTRIBUTES instead of magic numbers In-Reply-To: <1231580515.2.0.210154432041.issue4905@psf.upfronthosting.co.za> Message-ID: <3d5hHX093Wz7LjP@mail.python.org> Roundup Robot added the comment: New changeset 66398e1307f4 by Tim Golden in branch 'default': Issue4905: use INVALID_FILE_ATTRIBUTES where appropriate. (Patch by Ulrich Eckhardt) http://hg.python.org/cpython/rev/66398e1307f4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 12:34:56 2013 From: report at bugs.python.org (Tim Golden) Date: Fri, 25 Oct 2013 10:34:56 +0000 Subject: [issue4905] Use INVALID_FILE_ATTRIBUTES instead of magic numbers In-Reply-To: <1231580515.2.0.210154432041.issue4905@psf.upfronthosting.co.za> Message-ID: <1382697296.77.0.287381682158.issue4905@psf.upfronthosting.co.za> Tim Golden added the comment: Fixed on tip. Thanks for the issue and the original patch. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 13:03:10 2013 From: report at bugs.python.org (Tim Golden) Date: Fri, 25 Oct 2013 11:03:10 +0000 Subject: [issue5717] os.defpath includes unix /bin on windows In-Reply-To: <1239116630.78.0.64068842306.issue5717@psf.upfronthosting.co.za> Message-ID: <1382698990.7.0.583780193805.issue5717@psf.upfronthosting.co.za> Tim Golden added the comment: This is, in principle, a backwards-incompatible change as any code will stop working which relies on exec* running useful tools in c:\bin. (I have a c:\tools which is basically the same thing). Frankly, I'm -0 on changing it; it does no real harm that I can see. If we do decide to ditch it, I'd only do it for the current release and not backport. ---------- versions: -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 13:42:37 2013 From: report at bugs.python.org (Breinjhel Mata) Date: Fri, 25 Oct 2013 11:42:37 +0000 Subject: [issue2698] Extension module build fails for MinGW: missing vcvarsall.bat In-Reply-To: <1209230424.66.0.154562223128.issue2698@psf.upfronthosting.co.za> Message-ID: <1382701357.83.0.196426865432.issue2698@psf.upfronthosting.co.za> Breinjhel Mata added the comment: Hi this bug still exist in Python 3.3.2. seems like a bug in cygwincompiler.py but Im using MinGW. Why is it using cygwincompiler? ---------- nosy: +breinjhel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 14:38:59 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 25 Oct 2013 12:38:59 +0000 Subject: [issue19387] Explain and test the sre overlap table Message-ID: <1382704739.58.0.812617552923.issue19387@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Since I had to understand this while reviewing code, here is a patch making things clearer. (I tried to get the docstring right :-)) ---------- components: Library (Lib), Tests files: overlap.patch keywords: patch messages: 201232 nosy: pitrou, serhiy.storchaka, tim.peters priority: low severity: normal stage: patch review status: open title: Explain and test the sre overlap table type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32350/overlap.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 14:43:40 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 25 Oct 2013 12:43:40 +0000 Subject: [issue18685] Restore re performance to pre-PEP393 level In-Reply-To: <1375967417.95.0.0303828296889.issue18685@psf.upfronthosting.co.za> Message-ID: <1382705020.13.0.506964387965.issue18685@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Posted review on Rietveld. See also issue #19387. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 14:53:33 2013 From: report at bugs.python.org (Dustin Oprea) Date: Fri, 25 Oct 2013 12:53:33 +0000 Subject: [issue19388] Inflated download counts Message-ID: <1382705613.84.0.405953640561.issue19388@psf.upfronthosting.co.za> New submission from Dustin Oprea: Noah recommended that I approach the distutils mailing list to report a potential PyPI problem. I can't seem to find a webpage for the distutils list, so I'm posting an official bug. I have a few packages on PyPI, and I often find my counts immediately taking hold, and, for the more useful projects, skyrocketing. However, I recently started a service that requires membership. In the last month, PyPI reports 3000 downloads of the client, yet Google Analytics only reports a handful of visits to the website. I have even less membership signups (as expected, so soon after launch). Why are the download counts so inflated? Obviously, they're very misleading and limited if they don't ignore spurious visitors (like robots). What has to be done to get this to be accurate? I've included two screenshots of PyPI and GA. ---------- assignee: eric.araujo components: Distutils messages: 201234 nosy: dsoprea, eric.araujo, tarek priority: normal severity: normal status: open title: Inflated download counts type: enhancement Added file: http://bugs.python.org/file32351/inflated_counts.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 14:56:11 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 25 Oct 2013 12:56:11 +0000 Subject: [issue19388] Inflated download counts In-Reply-To: <1382705613.84.0.405953640561.issue19388@psf.upfronthosting.co.za> Message-ID: <1382705771.56.0.802443182966.issue19388@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Dustin: see https://mail.python.org/mailman/listinfo/distutils-sig ---------- nosy: +pitrou resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 15:13:36 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 25 Oct 2013 13:13:36 +0000 Subject: [issue16595] Add resource.prlimit In-Reply-To: <1382682803.51.0.185640652496.issue16595@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > I didn't expect to see a combination of glibc with prlimit() and Kernel without prlimit(). According to man prlimit it's not suppose to fail with ENOSYS, too. Yeah, we've seen this several times on some buildbots. Note that actually, any syscall can fail with ENOSYS: the configure check just checks that the libc exposes the wrapper library, but when the libc wrapper makes the actual syscall, the kernel can return -ENOSYS if it doesn't implement the syscall. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 15:39:51 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 25 Oct 2013 13:39:51 +0000 Subject: [issue19386] selectors test_interrupted_retry is flaky In-Reply-To: <1382688391.49.0.741915274953.issue19386@psf.upfronthosting.co.za> Message-ID: <1382708391.7.0.748097668969.issue19386@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: This failure doesn't make sense: whether SIGALRM is delivered or not, epoll() should time out after 2 seconds, not 105s. What's more, here's another test_subprocess failure: """ ====================================================================== ERROR: test_wait_timeout (test.test_subprocess.ProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/test_subprocess.py", line 993, in test_wait_timeout self.assertEqual(p.wait(timeout=3), 0) File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/subprocess.py", line 1514, in wait raise TimeoutExpired(self.args, timeout) subprocess.TimeoutExpired: Command '['/var/lib/buildslave/3.x.murray-gentoo-wide/build/python', '-c', 'import time; time.sleep(0.3)']' timed out after 3 seconds """ Even more strange, a test_asyncio failure: """ ====================================================================== FAIL: test_interrupted_retry (test.test_selectors.EpollSelectorTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/test_selectors.py", line 299, in test_interrupted_retry self.assertLess(time() - t, 2.5) AssertionError: 105.86884237639606 not less than 2.5 """ asyncio uses selectors as backend, so let's admit the test fails, but what's really surprising is that the timeout is *exactly* the same, up to the last digit. Something fishy is going on: David, did something change recently on that buildbot? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 16:05:25 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 25 Oct 2013 14:05:25 +0000 Subject: [issue19386] selectors test_interrupted_retry is flaky In-Reply-To: <1382688391.49.0.741915274953.issue19386@psf.upfronthosting.co.za> Message-ID: <1382709925.39.0.953723278789.issue19386@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Flaky VM clock perhaps? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 16:33:26 2013 From: report at bugs.python.org (OscarL) Date: Fri, 25 Oct 2013 14:33:26 +0000 Subject: [issue12340] Access violation when using the C version of the io module In-Reply-To: <1308152515.03.0.630952257185.issue12340@psf.upfronthosting.co.za> Message-ID: <1382711606.58.0.151189686921.issue12340@psf.upfronthosting.co.za> OscarL added the comment: I can't reproduce the access violation on Windows, using Python 2.7.3. Using the test_bufio.py script by santa4nt, I can see that the fail still happens. As Santoso Wijaya (santa4nt) said in a previous comment: The `write(data)` method is getting a `memoryview` object, thus the test code should be using `data.tobytes()` instead of using `bytes(data)`. If we introduce that logic on the test_bufio.py script it passes. The thing is that if we, instead of doing `import io` (the C version of the module) we do `import _pyio as io` (the pure Python version) the FAIL does not appears at all in the original script! That difference ("`write` might receive a `memoryview` object if using the C version of this module") is not documented anywhere. It should, if that's the expected behavior [*], and the code using the io module is responsible for using .tobytes() instead of bytes(). [*] Why "_pyio.py" behaves differently? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 16:44:48 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 25 Oct 2013 14:44:48 +0000 Subject: [issue19386] selectors test_interrupted_retry is flaky In-Reply-To: <1382709925.39.0.953723278789.issue19386@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Flaky VM clock perhaps? Yeah, thought about that, but here we see *exactly* the same value for two time intervals (using time.monotonic()), computed over different test suite runs. I'd expected something more erratic... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 16:49:15 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 25 Oct 2013 14:49:15 +0000 Subject: [issue19386] selectors test_interrupted_retry is flaky In-Reply-To: <1382688391.49.0.741915274953.issue19386@psf.upfronthosting.co.za> Message-ID: <1382712555.58.0.977338971705.issue19386@psf.upfronthosting.co.za> R. David Murray added the comment: The only change on the buildbot for some months now was increasing the size of the in-memory /tmp filesystem, which I did yesterday. That also involved a reboot, though, and it is conceivable that there were software changes made since the last reboot and before this one. I don't *think* there were, but I can't promise it. No kernel changes, though, for sure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 17:22:05 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 25 Oct 2013 15:22:05 +0000 Subject: [issue19386] selectors test_interrupted_retry is flaky In-Reply-To: <1382712555.58.0.977338971705.issue19386@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: Could you try to run the test in a loop under strace ("strace -ttTf") ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 17:31:33 2013 From: report at bugs.python.org (Larry Hastings) Date: Fri, 25 Oct 2013 15:31:33 +0000 Subject: [issue19358] Integrate "Argument Clinic" into CPython build In-Reply-To: <1382508751.78.0.556655688797.issue19358@psf.upfronthosting.co.za> Message-ID: <1382715093.89.0.868379415478.issue19358@psf.upfronthosting.co.za> Larry Hastings added the comment: For a long time it was actually 3.4+ only. I was depending on a particular AST node that wasn't exposed to Python until 3.4 trunk. But that went away, and I tried it with 3.3 and it worked fine, so I labeled it 3.3+. For all I know it works fine under 3.1, never tried it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 17:37:34 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 25 Oct 2013 15:37:34 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1382715454.13.0.995143345858.issue18864@psf.upfronthosting.co.za> Brett Cannon added the comment: I've added a review ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 17:49:46 2013 From: report at bugs.python.org (Mathieu Virbel) Date: Fri, 25 Oct 2013 15:49:46 +0000 Subject: [issue19389] find_file might return a different directory than the tested file Message-ID: <1382716186.29.0.0404891043563.issue19389@psf.upfronthosting.co.za> New submission from Mathieu Virbel: With Maverick OSX (latest version), there is no /usr/include/zlib.h anymore. If you try to compile Python with -sysroot, it trigger a error message: error: /usr/include/zlib.h: No such file or directory The issue is in setup.py, where find_file is checking the existence of a filename, but if the filename has been found in a sysroot, it will return the path _without_ the sysroot. In this case (zlib), find_file correctly find the zlib.h in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/zlib.h, but return "/usr/include", and then the setup.py open '/usr/include/zlib.h', which fail. ---------- components: Build files: fix-setup-find-file-path.patch keywords: patch messages: 201245 nosy: Mathieu.Virbel priority: normal severity: normal status: open title: find_file might return a different directory than the tested file type: behavior 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/file32352/fix-setup-find-file-path.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 17:51:52 2013 From: report at bugs.python.org (Stefan Krah) Date: Fri, 25 Oct 2013 15:51:52 +0000 Subject: [issue19390] clinic.py: unhandled syntax error Message-ID: <1382716311.99.0.339644055005.issue19390@psf.upfronthosting.co.za> New submission from Stefan Krah: The attached syntax error should probably be handled by clinic.py. ---------- components: Demos and Tools files: syntax-err-1.patch keywords: patch messages: 201246 nosy: skrah priority: normal severity: normal status: open title: clinic.py: unhandled syntax error versions: Python 3.4 Added file: http://bugs.python.org/file32353/syntax-err-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 17:52:53 2013 From: report at bugs.python.org (Stefan Krah) Date: Fri, 25 Oct 2013 15:52:53 +0000 Subject: [issue19390] clinic.py: unhandled syntax error In-Reply-To: <1382716311.99.0.339644055005.issue19390@psf.upfronthosting.co.za> Message-ID: <1382716373.11.0.822465257122.issue19390@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 17:56:06 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 25 Oct 2013 15:56:06 +0000 Subject: [issue10977] Concrete object C API considered harmful to subclasses of builtin types In-Reply-To: <1382680631.72.0.241308159941.issue10977@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: The problem we're trying to solve is CPython *silently* breaking subclass invariants, which is what the concrete APIs currently do. At the moment, trying to swap out dicts with ordered dicts in various places will corrupt the ordered dict instead of calling the appropriate subclass methods or throwing a type error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 18:18:05 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 25 Oct 2013 16:18:05 +0000 Subject: [issue10977] Concrete object C API considered harmful to subclasses of builtin types In-Reply-To: Message-ID: <1382717852.2523.0.camel@fsol> Antoine Pitrou added the comment: > The problem we're trying to solve is CPython *silently* breaking subclass > invariants, which is what the concrete APIs currently do. To be clear: the problem is with CPython calling the concrete APIs when it shouldn't, rather than with the concrete APIs not behaving properly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 18:23:05 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 25 Oct 2013 16:23:05 +0000 Subject: [issue10977] Concrete object C API considered harmful to subclasses of builtin types In-Reply-To: <1382717852.2523.0.camel@fsol> Message-ID: Nick Coghlan added the comment: On 26 Oct 2013 02:18, "Antoine Pitrou" wrote: > > > Antoine Pitrou added the comment: > > > The problem we're trying to solve is CPython *silently* breaking subclass > > invariants, which is what the concrete APIs currently do. > > To be clear: the problem is with CPython calling the concrete APIs when > it shouldn't, rather than with the concrete APIs not behaving properly. The boilerplate required to use them correctly renders them broken in my view, particularly when they silently corrupt internal subclass state when misused instead of throwing an exception. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 18:25:21 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 25 Oct 2013 16:25:21 +0000 Subject: [issue10977] Concrete object C API considered harmful to subclasses of builtin types In-Reply-To: Message-ID: <1382718289.2523.2.camel@fsol> Antoine Pitrou added the comment: > > To be clear: the problem is with CPython calling the concrete APIs when > > it shouldn't, rather than with the concrete APIs not behaving properly. > > The boilerplate required to use them correctly renders them broken in my > view, particularly when they silently corrupt internal subclass state when > misused instead of throwing an exception. IMO the boilerplate should actually be included inside the abstract APIs, so as to automatically enable optimized shortcuts when possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 18:25:26 2013 From: report at bugs.python.org (Larry Hastings) Date: Fri, 25 Oct 2013 16:25:26 +0000 Subject: [issue19390] clinic.py: unhandled syntax error In-Reply-To: <1382716311.99.0.339644055005.issue19390@psf.upfronthosting.co.za> Message-ID: <1382718326.65.0.165783635453.issue19390@psf.upfronthosting.co.za> Larry Hastings added the comment: You're proposing that Clinic allow => ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 18:34:29 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 25 Oct 2013 16:34:29 +0000 Subject: [issue16803] Make test_import & test_importlib run tests under both _frozen_importlib and importlib._bootstrap In-Reply-To: <1356718069.62.0.143946538677.issue16803@psf.upfronthosting.co.za> Message-ID: <3d5rW33lnZzSGS@mail.python.org> Roundup Robot added the comment: New changeset becc0a488189 by Brett Cannon in branch 'default': Issue #16803: Stop having test.test_importlib.abc ABCs inherit from http://hg.python.org/cpython/rev/becc0a488189 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 18:34:30 2013 From: report at bugs.python.org (Zachary Ware) Date: Fri, 25 Oct 2013 16:34:30 +0000 Subject: [issue19391] Fix PCbuild/readme.txt in 2.7 and 3.3 Message-ID: <1382718870.17.0.951198917656.issue19391@psf.upfronthosting.co.za> New submission from Zachary Ware: As discussed in issue19273, here are a pair of patches that correct factual errors in PCbuild/readme.txt in both 2.7 and 3.3. The 3.3 patch makes the following changes: - Remove Win2k mentions, it is not supported (Tcl nmake command also adjusted) - MSVCRT9 -> MSVCRT10 - SQLite 3.7.4 -> 3.7.12, remove "(see below)" with nothing to see - .vcproj -> .vcxproj, all occurrences - _bz2.vcxproj isn't as magical as it was made out to be, and it can clean itself - nasmw -> nasm - Remove untrue part of Building for Itanium section - Update msdn link - .vsprops -> .props - Trim trailing space Due to the large number of lines in the diff due to trailing space, I'll also be attaching a patch created by `hg diff -w` for ease of review. ---------- assignee: docs at python components: Documentation, Windows files: pcbuild_readme-3.3.diff keywords: patch messages: 201253 nosy: brian.curtin, christian.heimes, docs at python, ezio.melotti, loewis, python-dev, tim.golden, zach.ware priority: normal severity: normal status: open title: Fix PCbuild/readme.txt in 2.7 and 3.3 type: enhancement versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file32354/pcbuild_readme-3.3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 18:34:51 2013 From: report at bugs.python.org (Zachary Ware) Date: Fri, 25 Oct 2013 16:34:51 +0000 Subject: [issue19391] Fix PCbuild/readme.txt in 2.7 and 3.3 In-Reply-To: <1382718870.17.0.951198917656.issue19391@psf.upfronthosting.co.za> Message-ID: <1382718891.81.0.645227333516.issue19391@psf.upfronthosting.co.za> Changes by Zachary Ware : Added file: http://bugs.python.org/file32355/pcbuild_readme-3.3.diff-w _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 18:36:27 2013 From: report at bugs.python.org (Zachary Ware) Date: Fri, 25 Oct 2013 16:36:27 +0000 Subject: [issue19391] Fix PCbuild/readme.txt in 2.7 and 3.3 In-Reply-To: <1382718870.17.0.951198917656.issue19391@psf.upfronthosting.co.za> Message-ID: <1382718987.76.0.867178203057.issue19391@psf.upfronthosting.co.za> Zachary Ware added the comment: The 2.7 patch makes the following changes: - python30.dll -> python27.dll - remove "(see below)" from _bsddb and _sqlite3 which have nothing to see below - bz2.vcproj isn't as magical as it made out to be, and it can clean itself - nasmw -> nasm - Remove untrue part of Building for Itanium section - Update msdn link - Trim trailing space There is also a diff -w patch for 2.7, due to the large number of lines with trailing space. ---------- Added file: http://bugs.python.org/file32356/pcbuild_readme-2.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 18:36:42 2013 From: report at bugs.python.org (Zachary Ware) Date: Fri, 25 Oct 2013 16:36:42 +0000 Subject: [issue19391] Fix PCbuild/readme.txt in 2.7 and 3.3 In-Reply-To: <1382718870.17.0.951198917656.issue19391@psf.upfronthosting.co.za> Message-ID: <1382719002.93.0.754901728079.issue19391@psf.upfronthosting.co.za> Changes by Zachary Ware : Added file: http://bugs.python.org/file32357/pcbuild_readme-2.7.diff-w _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 18:39:10 2013 From: report at bugs.python.org (Jyrki Pulliainen) Date: Fri, 25 Oct 2013 16:39:10 +0000 Subject: [issue16037] httplib: header parsing is unlimited In-Reply-To: <1348568722.91.0.654032066819.issue16037@psf.upfronthosting.co.za> Message-ID: <1382719150.41.0.257764753202.issue16037@psf.upfronthosting.co.za> Jyrki Pulliainen added the comment: Third version of the 3.2 patch, this time with documentation of the exception TooManyHeaders ---------- Added file: http://bugs.python.org/file32358/issue16037_py32_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 18:44:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 25 Oct 2013 16:44:43 +0000 Subject: [issue16803] Make test_import & test_importlib run tests under both _frozen_importlib and importlib._bootstrap In-Reply-To: <1356718069.62.0.143946538677.issue16803@psf.upfronthosting.co.za> Message-ID: <3d5rlG2wbPzQvG@mail.python.org> Roundup Robot added the comment: New changeset e2c3f638c3d0 by Brett Cannon in branch 'default': Issue #16803: Have test.test_importlib.builtin test both frozen and http://hg.python.org/cpython/rev/e2c3f638c3d0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 18:44:42 2013 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 25 Oct 2013 16:44:42 +0000 Subject: [issue10977] Concrete object C API considered harmful to subclasses of builtin types In-Reply-To: Message-ID: <526A9FB6.5060503@behnel.de> Stefan Behnel added the comment: Nick Coghlan added the comment: > Antoine Pitrou added the comment: >> To be clear: the problem is with CPython calling the concrete APIs when >> it shouldn't, rather than with the concrete APIs not behaving properly. > > The boilerplate required to use them correctly renders them broken in my > view I think we disagree here. There is no boilerplate at all involved, as long as its guaranteed that they are being called on the correct type of object. User code may provide that guarantee either implicitly or explicitly, and only the explicit way involves additional code (such as a type check). The implicit way (that simply knows the exact type) would suffer from any code additions to the fast paths in the specific C-API functions. > particularly when they silently corrupt internal subclass state when > misused instead of throwing an exception. It has bothered me more than once that even the fast paths in those functions usually contain type checks, which often means that the type check is being executed twice: once as a special casing check before calling the function and once as a safety check after entering it. As long as the functions are being used correctly, the second check is just useless code that unnecessarily takes time. IMHO, it would be nice to have those internal type checks enabled *only* for debug builds, although even then, there may be legitimate usages that call these functions on subtypes (such as when called from within a well defined subtype implementation, as you mentioned). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 18:59:23 2013 From: report at bugs.python.org (Stefan Krah) Date: Fri, 25 Oct 2013 16:59:23 +0000 Subject: [issue19390] clinic.py: unhandled syntax error In-Reply-To: <1382718326.65.0.165783635453.issue19390@psf.upfronthosting.co.za> Message-ID: <20131025165924.GA21572@sleipnir.bytereef.org> Stefan Krah added the comment: Larry Hastings wrote: > You're proposing that Clinic allow => ? No, but it should print an error message and exit. Currently it silently generates garbage which does not compile. [I've noticed that you handle many other syntax errors. Nice work.] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 19:00:54 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 25 Oct 2013 17:00:54 +0000 Subject: [issue19392] document importlib.reload() requires __loader__ to be defined Message-ID: <1382720454.45.0.30306791962.issue19392@psf.upfronthosting.co.za> New submission from Brett Cannon: Make sure importlib.reload() (and by extension imp.reload()) mention that __loader__ must be defined as well as __name__. ---------- assignee: docs at python components: Documentation messages: 201259 nosy: brett.cannon, docs at python priority: normal severity: normal status: open title: document importlib.reload() requires __loader__ to be defined versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 19:02:44 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 25 Oct 2013 17:02:44 +0000 Subject: [issue10977] Concrete object C API considered harmful to subclasses of builtin types In-Reply-To: <526A9FB6.5060503@behnel.de> Message-ID: Nick Coghlan added the comment: Keep in mind that part of the problem here is finding stdlib code that needs to be fixed to handle subclasses correctly. The existing APIs have permitted use with subclasses for years but are, in fact, the wrong tool for that in many cases. The problem to be solved isn't "this code should handle ducktyping" but, "this code should either reject subclasses or else handle them without corrupting them". Using the same API for both external invocation and for subclasses calling up to the parent is a problem. For code in critical paths, doing the same type check twice is also a problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 19:08:49 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 25 Oct 2013 17:08:49 +0000 Subject: [issue19339] telnetlib: time.monotonic() should be used instead of time.time() for timeout In-Reply-To: <1382385675.07.0.888544622289.issue19339@psf.upfronthosting.co.za> Message-ID: <1382720929.61.0.659081891367.issue19339@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Victor, did you see Serhiy's comment? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 19:22:35 2013 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 25 Oct 2013 17:22:35 +0000 Subject: [issue15477] test_cmath failures on OS X 10.8 In-Reply-To: <1343469837.83.0.840988569572.issue15477@psf.upfronthosting.co.za> Message-ID: <1382721755.92.0.666358939971.issue15477@psf.upfronthosting.co.za> Mark Dickinson added the comment: Perfect. Thanks, Ned! I'll update the Apple issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 19:24:37 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 25 Oct 2013 17:24:37 +0000 Subject: [issue19392] document importlib.reload() requires __loader__ to be defined In-Reply-To: <1382720454.45.0.30306791962.issue19392@psf.upfronthosting.co.za> Message-ID: <1382721877.8.0.294663234968.issue19392@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 19:42:30 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 25 Oct 2013 17:42:30 +0000 Subject: [issue19389] find_file might return a different directory than the tested file In-Reply-To: <1382716186.29.0.0404891043563.issue19389@psf.upfronthosting.co.za> Message-ID: <1382722950.33.0.863406841301.issue19389@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the report. The issue of setup.py not looking in an OS X SDK for zlib.h was recently fixed in currently active branches: f3a2dab1623b (default), 2d8d5fea6194 (3.3), c207ac413457 (2.7). By the way, there has been a lot of confusion about the installation of header files in OS X 10.9 Mavericks, brought on by Apple itself. In recent previous releases, most header files were only installed in the normal locations (/usr/include, /System/Library/Frameworks) as part of the Command Line Tools component (either through Xcode or the downloadable standalone package). Early on in the life cycle of Mavericks development, there apparently was an attempt to no longer install the header files by the CLT packages, forcing everyone to reference them via an SDK. For whatever reason, that attempt was dropped before Mavericks was released. With the 10.9 CLT properly installed, you should see /usr/include correctly populated, including zlib.h. In 10.9, the new way to force CLT to be installed is: xcode-select --install ---------- nosy: +ned.deily resolution: -> out of date stage: -> committed/rejected status: open -> closed versions: -Python 3.1, Python 3.2, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 19:49:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 25 Oct 2013 17:49:32 +0000 Subject: [issue19392] document importlib.reload() requires __loader__ to be defined In-Reply-To: <1382720454.45.0.30306791962.issue19392@psf.upfronthosting.co.za> Message-ID: <3d5tB34K75z7LkB@mail.python.org> Roundup Robot added the comment: New changeset f575f6298eb1 by Brett Cannon in branch '3.3': Issue #19392: Document that imp.reload() now relies on __loader__ http://hg.python.org/cpython/rev/f575f6298eb1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 19:49:56 2013 From: report at bugs.python.org (Steven Winfield) Date: Fri, 25 Oct 2013 17:49:56 +0000 Subject: [issue19393] symtable.symtable can return the wrong "top" SymbolTable Message-ID: <1382723396.02.0.356788344876.issue19393@psf.upfronthosting.co.za> New submission from Steven Winfield: The attached script creates calls symtable.symtable many times on a code snippet that contains a single class with a method called "top", and some other important (to trigger the behaviour) properties: * a class variable * at least three other methods The symtable module is reloaded each time, which seems to exacerbate the problem, but it not necessary. The return value of symtable.symtable is sometimes a SymbolTable object, as expected, and sometimes a symtable.Function object. Here is some example output from the script: c:\Python27>python.exe C:\Temp\symtable_weirdness.py Counter({'SymbolTable': 59, 'Function': 41}) c:\Python33>python.exe C:\Temp\symtable_weirdness.py Counter({'SymbolTable': 89, 'Function': 11}) The values are consistent between runs, but can be changed by altering PYTHONHASHSEED between runs. ---------- components: Library (Lib) files: symtable_weirdness.py messages: 201265 nosy: Steven.Winfield priority: normal severity: normal status: open title: symtable.symtable can return the wrong "top" SymbolTable type: behavior versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file32359/symtable_weirdness.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 19:51:28 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 25 Oct 2013 17:51:28 +0000 Subject: [issue11161] futures.ProcessPoolExecutor hangs In-Reply-To: <1297274599.08.0.127340661733.issue11161@psf.upfronthosting.co.za> Message-ID: <3d5tDH51zTz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 44b69e95d276 by bquinlan in branch 'default': Issue #11161: Update the documentation for ProcessPoolExecutor to note that it will not work in the interactive shell. http://hg.python.org/cpython/rev/44b69e95d276 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 19:53:53 2013 From: report at bugs.python.org (Brian Quinlan) Date: Fri, 25 Oct 2013 17:53:53 +0000 Subject: [issue11161] futures.ProcessPoolExecutor hangs In-Reply-To: <1297274599.08.0.127340661733.issue11161@psf.upfronthosting.co.za> Message-ID: <1382723633.12.0.770107008967.issue11161@psf.upfronthosting.co.za> Changes by Brian Quinlan : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 19:53:56 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 25 Oct 2013 17:53:56 +0000 Subject: [issue19392] document importlib.reload() requires __loader__ to be defined In-Reply-To: <1382720454.45.0.30306791962.issue19392@psf.upfronthosting.co.za> Message-ID: <1382723636.13.0.81120078808.issue19392@psf.upfronthosting.co.za> Brett Cannon added the comment: importlib.reload() already states that the loader is reused, so this only required imp.reload() to be updated. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 19:55:04 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 25 Oct 2013 17:55:04 +0000 Subject: [issue19172] selectors: add keys() method In-Reply-To: <1381071669.2488.7.camel@fsol> Message-ID: Charles-Fran?ois Natali added the comment: > Antoine Pitrou added the comment: > > FWIW, I think the "ideal" solution would be for keys() (*) to return a > read-only Mapping implementation, allowing for file object lookup (using > __getitem__) as well as iteration on SelectorKeys (using __iter__) and > fast emptiness checking (using __len__). Thanks, I think that's a great idea. I'm attaching a patch updating yours with the following: - asyncio/test_asyncio update - selectors' documentation update IMO, it really offers both a compact, easy to use and performant API. (Note: the mapping doesn't really have to be recreated upon each get_map() call and could be kept as a private member, but IMO that's not a performance issue). ---------- Added file: http://bugs.python.org/file32360/selectors_map-1.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r eb1edc9e3722 Doc/library/selectors.rst --- a/Doc/library/selectors.rst Fri Oct 25 17:56:00 2013 +0200 +++ b/Doc/library/selectors.rst Fri Oct 25 19:47:35 2013 +0200 @@ -157,12 +157,13 @@ This must be called to make sure that any underlying resource is freed. The selector shall not be used once it has been closed. - .. method:: get_key(fileobj) + .. method:: get_map() - Return the key associated to a registered file object. + Return a mapping of file objects to selector keys. - This returns the :class:`SelectorKey` instance associated to this file - object, or raises :exc:`KeyError` if the file object is not registered. + This returns a :class:`~collections.abc.Mapping` instance mapping + registered file objects to their associated :class:`SelectorKey` + instance. .. class:: DefaultSelector() diff -r eb1edc9e3722 Lib/asyncio/selector_events.py --- a/Lib/asyncio/selector_events.py Fri Oct 25 17:56:00 2013 +0200 +++ b/Lib/asyncio/selector_events.py Fri Oct 25 19:47:35 2013 +0200 @@ -122,7 +122,7 @@ """Add a reader callback.""" handle = events.make_handle(callback, args) try: - key = self._selector.get_key(fd) + key = self._selector.get_map()[fd] except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) @@ -136,7 +136,7 @@ def remove_reader(self, fd): """Remove a reader callback.""" try: - key = self._selector.get_key(fd) + key = self._selector.get_map()[fd] except KeyError: return False else: @@ -157,7 +157,7 @@ """Add a writer callback..""" handle = events.make_handle(callback, args) try: - key = self._selector.get_key(fd) + key = self._selector.get_map()[fd] except KeyError: self._selector.register(fd, selectors.EVENT_WRITE, (None, handle)) @@ -171,7 +171,7 @@ def remove_writer(self, fd): """Remove a writer callback.""" try: - key = self._selector.get_key(fd) + key = self._selector.get_map()[fd] except KeyError: return False else: diff -r eb1edc9e3722 Lib/selectors.py --- a/Lib/selectors.py Fri Oct 25 17:56:00 2013 +0200 +++ b/Lib/selectors.py Fri Oct 25 19:47:35 2013 +0200 @@ -6,7 +6,7 @@ from abc import ABCMeta, abstractmethod -from collections import namedtuple +from collections import namedtuple, Mapping import functools import select import sys @@ -44,6 +44,25 @@ selected event mask and attached data.""" +class _SelectorMapping(Mapping): + """Mapping of file objects to selector keys.""" + + def __init__(self, selector): + self._fd_to_key = selector._fd_to_key + + def __len__(self): + return len(self._fd_to_key) + + def __getitem__(self, fileobj): + try: + return self._fd_to_key[_fileobj_to_fd(fileobj)] + except KeyError: + raise KeyError("{!r} is not registered".format(fileobj)) from None + + def __iter__(self): + return iter(self._fd_to_key) + + class BaseSelector(metaclass=ABCMeta): """Base selector class. @@ -151,16 +170,9 @@ """ self._fd_to_key.clear() - def get_key(self, fileobj): - """Return the key associated to a registered file object. - - Returns: - SelectorKey for this file object - """ - try: - return self._fd_to_key[_fileobj_to_fd(fileobj)] - except KeyError: - raise KeyError("{!r} is not registered".format(fileobj)) from None + def get_map(self): + """Return a mapping of file objects to selector keys.""" + return _SelectorMapping(self) def __enter__(self): return self diff -r eb1edc9e3722 Lib/test/test_asyncio/test_selector_events.py --- a/Lib/test/test_asyncio/test_selector_events.py Fri Oct 25 17:56:00 2013 +0200 +++ b/Lib/test/test_asyncio/test_selector_events.py Fri Oct 25 19:47:35 2013 +0200 @@ -396,7 +396,7 @@ self.assertIs(err, f.exception()) def test_add_reader(self): - self.loop._selector.get_key.side_effect = KeyError + self.loop._selector.get_map.return_value = {} cb = lambda: True self.loop.add_reader(1, cb) @@ -410,8 +410,8 @@ def test_add_reader_existing(self): reader = unittest.mock.Mock() writer = unittest.mock.Mock() - self.loop._selector.get_key.return_value = selectors.SelectorKey( - 1, 1, selectors.EVENT_WRITE, (reader, writer)) + self.loop._selector.get_map.return_value = {1: selectors.SelectorKey( + 1, 1, selectors.EVENT_WRITE, (reader, writer))} cb = lambda: True self.loop.add_reader(1, cb) @@ -426,8 +426,8 @@ def test_add_reader_existing_writer(self): writer = unittest.mock.Mock() - self.loop._selector.get_key.return_value = selectors.SelectorKey( - 1, 1, selectors.EVENT_WRITE, (None, writer)) + self.loop._selector.get_map.return_value = {1: selectors.SelectorKey( + 1, 1, selectors.EVENT_WRITE, (None, writer))} cb = lambda: True self.loop.add_reader(1, cb) @@ -440,8 +440,8 @@ self.assertEqual(writer, w) def test_remove_reader(self): - self.loop._selector.get_key.return_value = selectors.SelectorKey( - 1, 1, selectors.EVENT_READ, (None, None)) + self.loop._selector.get_map.return_value = {1: selectors.SelectorKey( + 1, 1, selectors.EVENT_READ, (None, None))} self.assertFalse(self.loop.remove_reader(1)) self.assertTrue(self.loop._selector.unregister.called) @@ -449,9 +449,9 @@ def test_remove_reader_read_write(self): reader = unittest.mock.Mock() writer = unittest.mock.Mock() - self.loop._selector.get_key.return_value = selectors.SelectorKey( + self.loop._selector.get_map.return_value = {1: selectors.SelectorKey( 1, 1, selectors.EVENT_READ | selectors.EVENT_WRITE, - (reader, writer)) + (reader, writer))} self.assertTrue( self.loop.remove_reader(1)) @@ -461,12 +461,12 @@ self.loop._selector.modify.call_args[0]) def test_remove_reader_unknown(self): - self.loop._selector.get_key.side_effect = KeyError + self.loop._selector.get_map.return_value = {} self.assertFalse( self.loop.remove_reader(1)) def test_add_writer(self): - self.loop._selector.get_key.side_effect = KeyError + self.loop._selector.get_map.return_value = {} cb = lambda: True self.loop.add_writer(1, cb) @@ -480,8 +480,8 @@ def test_add_writer_existing(self): reader = unittest.mock.Mock() writer = unittest.mock.Mock() - self.loop._selector.get_key.return_value = selectors.SelectorKey( - 1, 1, selectors.EVENT_READ, (reader, writer)) + self.loop._selector.get_map.return_value = {1: selectors.SelectorKey( + 1, 1, selectors.EVENT_READ, (reader, writer))} cb = lambda: True self.loop.add_writer(1, cb) @@ -495,8 +495,8 @@ self.assertEqual(cb, w._callback) def test_remove_writer(self): - self.loop._selector.get_key.return_value = selectors.SelectorKey( - 1, 1, selectors.EVENT_WRITE, (None, None)) + self.loop._selector.get_map.return_value = {1: selectors.SelectorKey( + 1, 1, selectors.EVENT_WRITE, (None, None))} self.assertFalse(self.loop.remove_writer(1)) self.assertTrue(self.loop._selector.unregister.called) @@ -504,9 +504,9 @@ def test_remove_writer_read_write(self): reader = unittest.mock.Mock() writer = unittest.mock.Mock() - self.loop._selector.get_key.return_value = selectors.SelectorKey( + self.loop._selector.get_map.return_value = {1: selectors.SelectorKey( 1, 1, selectors.EVENT_READ | selectors.EVENT_WRITE, - (reader, writer)) + (reader, writer))} self.assertTrue( self.loop.remove_writer(1)) @@ -516,7 +516,7 @@ self.loop._selector.modify.call_args[0]) def test_remove_writer_unknown(self): - self.loop._selector.get_key.side_effect = KeyError + self.loop._selector.get_map.return_value = {} self.assertFalse( self.loop.remove_writer(1)) diff -r eb1edc9e3722 Lib/test/test_asyncio/test_selectors.py --- a/Lib/test/test_asyncio/test_selectors.py Fri Oct 25 17:56:00 2013 +0200 +++ b/Lib/test/test_asyncio/test_selectors.py Fri Oct 25 19:47:35 2013 +0200 @@ -85,7 +85,7 @@ self.assertNotEqual(key.events, key2.events) self.assertEqual( selectors.SelectorKey(fobj, 10, selectors.EVENT_WRITE, None), - s.get_key(fobj)) + s.get_map()[fobj]) def test_modify_data(self): fobj = unittest.mock.Mock() @@ -101,7 +101,7 @@ self.assertNotEqual(key.data, key2.data) self.assertEqual( selectors.SelectorKey(fobj, 10, selectors.EVENT_READ, d2), - s.get_key(fobj)) + s.get_map()[fobj]) def test_modify_same(self): fobj = unittest.mock.Mock() diff -r eb1edc9e3722 Lib/test/test_selectors.py --- a/Lib/test/test_selectors.py Fri Oct 25 17:56:00 2013 +0200 +++ b/Lib/test/test_selectors.py Fri Oct 25 19:47:35 2013 +0200 @@ -106,7 +106,7 @@ # modify events key2 = s.modify(rd, selectors.EVENT_WRITE) self.assertNotEqual(key.events, key2.events) - self.assertEqual(key2, s.get_key(rd)) + self.assertEqual(key2, s.get_map()[rd]) s.unregister(rd) @@ -118,7 +118,7 @@ key2 = s.modify(rd, selectors.EVENT_READ, d2) self.assertEqual(key.events, key2.events) self.assertNotEqual(key.data, key2.data) - self.assertEqual(key2, s.get_key(rd)) + self.assertEqual(key2, s.get_map()[rd]) self.assertEqual(key2.data, d2) # modify unknown file obj @@ -136,10 +136,12 @@ s.register(wr, selectors.EVENT_WRITE) s.close() - self.assertRaises(KeyError, s.get_key, rd) - self.assertRaises(KeyError, s.get_key, wr) + with self.assertRaises(KeyError): + s.get_map()[rd] + with self.assertRaises(KeyError): + s.get_map()[wr] - def test_get_key(self): + def test_get_map(self): s = self.SELECTOR() self.addCleanup(s.close) @@ -147,11 +149,24 @@ self.addCleanup(rd.close) self.addCleanup(wr.close) + keys = s.get_map() + self.assertFalse(keys) + self.assertEqual(len(keys), 0) + self.assertEqual(list(keys), []) key = s.register(rd, selectors.EVENT_READ, "data") - self.assertEqual(key, s.get_key(rd)) + self.assertIn(rd, keys) + self.assertEqual(key, keys[rd]) + self.assertEqual(len(keys), 1) + self.assertEqual(list(keys), [rd.fileno()]) + self.assertEqual(list(keys.values()), [key]) # unknown file obj - self.assertRaises(KeyError, s.get_key, 999999) + with self.assertRaises(KeyError): + keys[999999] + + # Read-only mapping + with self.assertRaises(TypeError): + del keys[rd] def test_select(self): s = self.SELECTOR() @@ -185,8 +200,8 @@ sel.register(rd, selectors.EVENT_READ) sel.register(wr, selectors.EVENT_WRITE) - self.assertRaises(KeyError, s.get_key, rd) - self.assertRaises(KeyError, s.get_key, wr) + self.assertNotIn(rd, s.get_map()) + self.assertNotIn(wr, s.get_map()) def test_fileno(self): s = self.SELECTOR() From report at bugs.python.org Fri Oct 25 20:00:28 2013 From: report at bugs.python.org (robotron) Date: Fri, 25 Oct 2013 18:00:28 +0000 Subject: [issue19394] distutils.core.Extension: empty strings in library_dirs and include_dirs should not be allowed Message-ID: <1382724028.67.0.461727040571.issue19394@psf.upfronthosting.co.za> New submission from robotron: When empty string element is passed in include_dirs or library_dirs (e.g. include_dirs = [""]) param of distutils.core.Extension constructor, it is propagated to compiler/linker params and in the case of gcc it eats subsequent command line option. setup.py excerpt: --- extensions = [ Extension("test_extension", ["test_extension.cpp"], include_dirs = [""], libraries = ["rt"], library_dirs = [""], ) ] --- $ python setup.py build ... gcc ... -I -I/usr/include/python2.7 -c test_extension.cpp ... Standard include dir "/usr/include/python2.7" is ommited now. The same is valid for library_dirs. Example scripts attached. ---------- assignee: eric.araujo components: Distutils files: bug_test_case.zip messages: 201269 nosy: eric.araujo, robotron, tarek priority: normal severity: normal status: open title: distutils.core.Extension: empty strings in library_dirs and include_dirs should not be allowed type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file32361/bug_test_case.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 20:00:47 2013 From: report at bugs.python.org (Brian Quinlan) Date: Fri, 25 Oct 2013 18:00:47 +0000 Subject: [issue13785] Make concurrent.futures.Future state public In-Reply-To: <1326560835.55.0.282912980665.issue13785@psf.upfronthosting.co.za> Message-ID: <1382724047.03.0.0869355783013.issue13785@psf.upfronthosting.co.za> Brian Quinlan added the comment: Any progress on this or can I close the bug? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 20:03:54 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 25 Oct 2013 18:03:54 +0000 Subject: [issue17432] PyUnicode_ functions not accessible in Limited API on Windows In-Reply-To: <1363385884.71.0.776131230148.issue17432@psf.upfronthosting.co.za> Message-ID: <1382724234.76.0.231701766865.issue17432@psf.upfronthosting.co.za> Christian Heimes added the comment: Martin, do you want to change the def-file for Python 3.4? ---------- nosy: +christian.heimes priority: normal -> high versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 20:05:47 2013 From: report at bugs.python.org (Brian Quinlan) Date: Fri, 25 Oct 2013 18:05:47 +0000 Subject: [issue18699] What is Future.running() for in PEP 3148 / concurrent.futures.Future? In-Reply-To: <1376092118.24.0.585945689562.issue18699@psf.upfronthosting.co.za> Message-ID: <1382724347.71.0.146818741074.issue18699@psf.upfronthosting.co.za> Brian Quinlan added the comment: The only thing that I've used .running() for is for UI reasons. But it is easier to just iterative over your futures and call a method than to install a callback and handle the state yourself. ---------- nosy: +bquinlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 20:06:25 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 25 Oct 2013 18:06:25 +0000 Subject: [issue16287] Sporadic test_utime() failures on Solaris In-Reply-To: <1350652599.36.0.707342371082.issue16287@psf.upfronthosting.co.za> Message-ID: <1382724385.86.0.0357419774338.issue16287@psf.upfronthosting.co.za> Christian Heimes added the comment: Trent, do you still see the failures on Solaris? ---------- nosy: +christian.heimes priority: normal -> low status: open -> languishing type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 20:10:40 2013 From: report at bugs.python.org (Brian Quinlan) Date: Fri, 25 Oct 2013 18:10:40 +0000 Subject: [issue17874] ProcessPoolExecutor in interactive shell doesn't work in Windows In-Reply-To: <1367291797.68.0.0512798150346.issue17874@psf.upfronthosting.co.za> Message-ID: <1382724640.7.0.817522523251.issue17874@psf.upfronthosting.co.za> Brian Quinlan added the comment: Take a look at http://bugs.python.org/issue11161 and its fix. Do you think that just saying that ProcessPoolExecutor will not work from the interactive shell is sufficient? ---------- nosy: +bquinlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 20:12:51 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 25 Oct 2013 18:12:51 +0000 Subject: [issue18834] Add Clang to distutils to build C/C++ extensions In-Reply-To: <1377459226.15.0.775642351727.issue18834@psf.upfronthosting.co.za> Message-ID: <1382724771.84.0.496341391531.issue18834@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- stage: -> patch review versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 20:31:01 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 Oct 2013 18:31:01 +0000 Subject: [issue13789] _tkinter does not build on Windows 7 In-Reply-To: <1326603556.49.0.117233546142.issue13789@psf.upfronthosting.co.za> Message-ID: <1382725861.34.0.103989039067.issue13789@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I got sufficient answers on core-mentorship list to build and run. #19273 revised and updated readme.txt. ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed superseder: -> Update PCbuild/readme.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 21:08:24 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 Oct 2013 19:08:24 +0000 Subject: [issue19387] Explain and test the sre overlap table In-Reply-To: <1382704739.58.0.812617552923.issue19387@psf.upfronthosting.co.za> Message-ID: <1382728104.68.0.700456687334.issue19387@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. I guess that new code can be even a little faster. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 21:09:59 2013 From: report at bugs.python.org (Tim Golden) Date: Fri, 25 Oct 2013 19:09:59 +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: <1382728199.05.0.334791087077.issue14255@psf.upfronthosting.co.za> Changes by Tim Golden : Removed file: http://bugs.python.org/file32338/issue14255.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 21:10:37 2013 From: report at bugs.python.org (Tim Golden) Date: Fri, 25 Oct 2013 19:10:37 +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: <1382728237.62.0.132500337342.issue14255@psf.upfronthosting.co.za> Tim Golden added the comment: New patch, tested on Windows & Linux ---------- Added file: http://bugs.python.org/file32362/issue14255.3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 21:20:43 2013 From: report at bugs.python.org (cantor) Date: Fri, 25 Oct 2013 19:20:43 +0000 Subject: [issue19395] lzma hangs for a very long time when run in parallel using python's muptiprocessing module? Message-ID: <1382728843.86.0.270938771254.issue19395@psf.upfronthosting.co.za> New submission from cantor: import lzma from functools import partial import multiprocessing def run_lzma(data,c): return c.compress(data) def split_len(seq, length): return [str.encode(seq[i:i+length]) for i in range(0, len(seq), length)] def lzma_mp(sequence,threads=3): lzc = lzma.LZMACompressor() blocksize = int(round(len(sequence)/threads)) strings = split_len(sequence, blocksize) lzc_partial = partial(run_lzma,c=lzc) pool=multiprocessing.Pool() lzc_pool = list(pool.map(lzc_partial,strings)) pool.close() pool.join() out_flush = lzc.flush() return b"".join(lzc_pool + [out_flush]) sequence = 'AAAAAJKDDDDDDDDDDDDDDDDDDDDDDDDDDDDGJFKSHFKLHALWEHAIHWEOIAH IOAHIOWEHIOHEIOFEAFEASFEAFWEWWWWWWWWWWWWWWWWWWWWWWWWWWWWWEWFQWEWQWQGEWQFEWFDWEWEGEFGWEG' lzma_mp(sequence,threads=3) ---------- components: ctypes messages: 201278 nosy: cantor priority: normal severity: normal status: open title: lzma hangs for a very long time when run in parallel using python's muptiprocessing module? type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 21:27:55 2013 From: report at bugs.python.org (cantor) Date: Fri, 25 Oct 2013 19:27:55 +0000 Subject: [issue19395] lzma hangs for a very long time when run in parallel using python's muptiprocessing module? In-Reply-To: <1382728843.86.0.270938771254.issue19395@psf.upfronthosting.co.za> Message-ID: <1382729275.05.0.342179644595.issue19395@psf.upfronthosting.co.za> Changes by cantor : ---------- nosy: +nadeem.vawda _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 21:27:55 2013 From: report at bugs.python.org (alon horev) Date: Fri, 25 Oct 2013 19:27:55 +0000 Subject: [issue4331] Add functools.partialmethod In-Reply-To: <1226817180.09.0.841012218041.issue4331@psf.upfronthosting.co.za> Message-ID: <1382729275.27.0.204835137059.issue4331@psf.upfronthosting.co.za> alon horev added the comment: I just want to make sure I understand the semantics concerning class methods, the following example demonstrates a usage similar to regular methods as much as possible: class A(object): def add(self, x, y): print(self) return x + y add10 = partialmethod(add, 10) add10class = classmethod(partialmethod(add, 10)) assert A().add10(5) == 15 # prints <__main__.A object at 0x1097e1390> assert A.add10class(5) == 15 # prints Another option would be to return a class-bound partial from the __get__ method. It's not as consistent as the first example but perhaps nicer: class A(object): def add(self, x, y): print(self) return x + y add10 = partialmethod(add, 10) assert A().add10(5) == 15 # prints <__main__.A object at 0x1097e1390> assert A.add10(5) == 15 # prints Is the first option what you had in mind? ---------- nosy: +alonho _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 21:28:17 2013 From: report at bugs.python.org (cantor) Date: Fri, 25 Oct 2013 19:28:17 +0000 Subject: [issue19395] lzma hangs for a very long time when run in parallel using python's muptiprocessing module? In-Reply-To: <1382728843.86.0.270938771254.issue19395@psf.upfronthosting.co.za> Message-ID: <1382729297.76.0.388863242231.issue19395@psf.upfronthosting.co.za> cantor added the comment: lzma ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 21:32:55 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 25 Oct 2013 19:32:55 +0000 Subject: [issue17432] PyUnicode_ functions not accessible in Limited API on Windows In-Reply-To: <1363385884.71.0.776131230148.issue17432@psf.upfronthosting.co.za> Message-ID: <1382729575.93.0.157925704241.issue17432@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> needs patch versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 21:36:01 2013 From: report at bugs.python.org (cantor) Date: Fri, 25 Oct 2013 19:36:01 +0000 Subject: [issue19395] lzma hangs for a very long time when run in parallel using python's muptiprocessing module? In-Reply-To: <1382728843.86.0.270938771254.issue19395@psf.upfronthosting.co.za> Message-ID: <1382729761.7.0.617269083439.issue19395@psf.upfronthosting.co.za> Changes by cantor : ---------- components: -ctypes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 21:39:10 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 25 Oct 2013 19:39:10 +0000 Subject: [issue16803] Make test_import & test_importlib run tests under both _frozen_importlib and importlib._bootstrap In-Reply-To: <1356718069.62.0.143946538677.issue16803@psf.upfronthosting.co.za> Message-ID: <3d5wcY5LGGz7Lks@mail.python.org> Roundup Robot added the comment: New changeset f3d50720dee0 by Brett Cannon in branch 'default': Issue #16803: Move test.test_importlib.extension to use both frozen and source importlib code http://hg.python.org/cpython/rev/f3d50720dee0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 21:40:21 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 25 Oct 2013 19:40:21 +0000 Subject: [issue19375] Deprecate site-python in site.py In-Reply-To: <1382605871.26.0.0916867662711.issue19375@psf.upfronthosting.co.za> Message-ID: <3d5wdW5gGNz7Ljt@mail.python.org> Roundup Robot added the comment: New changeset 90c56229efb7 by Antoine Pitrou in branch 'default': Issue #19375: The site module adding a "site-python" directory to sys.path, if it exists, is now deprecated. http://hg.python.org/cpython/rev/90c56229efb7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 21:40:22 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 25 Oct 2013 19:40:22 +0000 Subject: [issue19387] Explain and test the sre overlap table In-Reply-To: <1382704739.58.0.812617552923.issue19387@psf.upfronthosting.co.za> Message-ID: <3d5wdX4CBzz7Lk1@mail.python.org> Roundup Robot added the comment: New changeset a2ed12e014ef by Antoine Pitrou in branch 'default': Issue #19387: explain and test the sre overlap table http://hg.python.org/cpython/rev/a2ed12e014ef ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 21:40:36 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 25 Oct 2013 19:40:36 +0000 Subject: [issue19375] Deprecate site-python in site.py In-Reply-To: <1382605871.26.0.0916867662711.issue19375@psf.upfronthosting.co.za> Message-ID: <1382730036.25.0.508627362084.issue19375@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 21:40:49 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 25 Oct 2013 19:40:49 +0000 Subject: [issue19387] Explain and test the sre overlap table In-Reply-To: <1382704739.58.0.812617552923.issue19387@psf.upfronthosting.co.za> Message-ID: <1382730049.69.0.645619811529.issue19387@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 Fri Oct 25 21:42:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 25 Oct 2013 19:42:28 +0000 Subject: [issue19396] test_contextlib fails with -S Message-ID: <1382730148.19.0.17792113903.issue19396@psf.upfronthosting.co.za> New submission from Antoine Pitrou: $ ./python -S -m test test_contextlib [1/1] test_contextlib test test_contextlib failed -- Traceback (most recent call last): File "/home/antoine/cpython/default/Lib/test/test_contextlib.py", line 640, in test_redirect_to_string_io help(pow) NameError: name 'help' is not defined ---------- assignee: ncoghlan components: Tests messages: 201284 nosy: ncoghlan, pitrou priority: low severity: normal status: open title: test_contextlib fails with -S versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 21:43:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 25 Oct 2013 19:43:23 +0000 Subject: [issue19397] test_pydoc fails with -S Message-ID: <1382730203.09.0.761692334901.issue19397@psf.upfronthosting.co.za> New submission from Antoine Pitrou: $ ./python -S -m test test_pydoc [1/1] test_pydoc test test_pydoc failed -- Traceback (most recent call last): File "/home/antoine/cpython/default/Lib/test/test_pydoc.py", line 473, in test_namedtuple_public_underscore help(NT) NameError: name 'help' is not defined ---------- components: Tests messages: 201285 nosy: pitrou priority: low severity: normal status: open title: test_pydoc fails with -S type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 21:43:53 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 25 Oct 2013 19:43:53 +0000 Subject: [issue19398] test_trace fails with -S Message-ID: <1382730233.11.0.30990585871.issue19398@psf.upfronthosting.co.za> New submission from Antoine Pitrou: $ ./python -S -m test test_trace [1/1] test_trace test test_trace failed -- Traceback (most recent call last): File "/home/antoine/cpython/default/Lib/test/test_trace.py", line 313, in test_coverage self.assertTrue("pprint.cover" in files) AssertionError: False is not true ---------- components: Tests messages: 201286 nosy: pitrou priority: low severity: normal status: open title: test_trace fails with -S type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 22:22:07 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 25 Oct 2013 20:22:07 +0000 Subject: [issue19395] unpickled LZMACompressor is crashy In-Reply-To: <1382728843.86.0.270938771254.issue19395@psf.upfronthosting.co.za> Message-ID: <1382732527.36.0.645367500057.issue19395@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The problem is that using an unpickled LZMACompressor crashes: $ ./python -c "import lzma, pickle; c = pickle.loads(pickle.dumps(lzma.LZMACompressor())); c.compress(b'')" Erreur de segmentation Here is the gdb backtrace: #0 0x00007ffff7bcafc0 in sem_trywait () from /lib/x86_64-linux-gnu/libpthread.so.0 #1 0x0000000000436c15 in PyThread_acquire_lock_timed (lock=0x0, microseconds=0, intr_flag=0) at Python/thread_pthread.h:350 #2 0x0000000000436db8 in PyThread_acquire_lock (lock=0x0, waitflag=0) at Python/thread_pthread.h:556 #3 0x00007ffff64a6538 in Compressor_compress (self=0x7ffff7e129a0, args=0x7ffff7f17468) at /home/antoine/cpython/default/Modules/_lzmamodule.c:533 ---------- nosy: +pitrou stage: -> needs patch title: lzma hangs for a very long time when run in parallel using python's muptiprocessing module? -> unpickled LZMACompressor is crashy type: behavior -> crash versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 22:26:54 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 25 Oct 2013 20:26:54 +0000 Subject: [issue13234] os.listdir breaks with literal paths In-Reply-To: <1319129686.22.0.325584161741.issue13234@psf.upfronthosting.co.za> Message-ID: <3d5xgD5h34z7Lk1@mail.python.org> Roundup Robot added the comment: New changeset 12aaa2943791 by Tim Golden in branch 'default': Issue13234 Allow listdir to handle extended paths on Windows (Patch by Santoso Wijaya) http://hg.python.org/cpython/rev/12aaa2943791 New changeset 5c187d6162c5 by Tim Golden in branch 'default': Issue13234 Credit Santoso for the patch and add NEWS item http://hg.python.org/cpython/rev/5c187d6162c5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 22:28:26 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 Oct 2013 20:28:26 +0000 Subject: [issue18685] Restore re performance to pre-PEP393 level In-Reply-To: <1375967417.95.0.0303828296889.issue18685@psf.upfronthosting.co.za> Message-ID: <1382732906.98.0.300681961534.issue18685@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch addresses Antoine's comments. ---------- Added file: http://bugs.python.org/file32363/sre_optimize_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 22:46:23 2013 From: report at bugs.python.org (Tim Golden) Date: Fri, 25 Oct 2013 20:46:23 +0000 Subject: [issue13234] os.listdir breaks with literal paths In-Reply-To: <1319129686.22.0.325584161741.issue13234@psf.upfronthosting.co.za> Message-ID: <1382733983.79.0.980642624475.issue13234@psf.upfronthosting.co.za> Tim Golden added the comment: Applied. Thanks for the patch. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 22:49:19 2013 From: report at bugs.python.org (Nadeem Vawda) Date: Fri, 25 Oct 2013 20:49:19 +0000 Subject: [issue19395] unpickled LZMACompressor is crashy In-Reply-To: <1382728843.86.0.270938771254.issue19395@psf.upfronthosting.co.za> Message-ID: <1382734159.54.0.809176511731.issue19395@psf.upfronthosting.co.za> Nadeem Vawda added the comment: As far as I can tell, liblzma provides no way to serialize a compressor's state, so the best we can do is raise a TypeError when attempting to pickle the LZMACompressor (and likewise for LZMADecompressor). Also, it's worth pointing out that the provided code wouldn't work even if you could serialize LZMACompressor objects - each call to compress() updates the compressor's internal state with information needed by the final call to flush(), but each compress() call would be made on a *copy* of the compressor rather than the original object. So flush() would end up producing bogus data (and mostly likely all compress() calls after the first would too). If you are trying to do this because LZMA compression is too slow, I'd suggest you try using zlib or bz2 instead - both of these algorithms can compress faster than LZMA (at the expense of your compression ratio). zlib is faster on both compression and decompression, while bz2 is slower than lzma at decompression. Alternatively, you can do parallel compression by calling lzma.compress() on each block (instead of creating an LZMACompressor), and then joining the results. But note that (a) this will give you a worse compression ratio than serial compression (because it can't exploit redundancy shared between blocks), and (b) using multiprocessing has a performance overhead of its own, because you will need to copy the input when sending it to the worker subprocess, and then copy the result when sending it back to the main process. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 23:02:01 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 Oct 2013 21:02:01 +0000 Subject: [issue19329] Faster compiling of charset regexpes In-Reply-To: <1382356878.81.0.973141365685.issue19329@psf.upfronthosting.co.za> Message-ID: <1382734921.62.0.894195433978.issue19329@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch addresses Antoine's comments. One my bug fixed. ---------- Added file: http://bugs.python.org/file32364/re_optimize_charset_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 23:04:59 2013 From: report at bugs.python.org (cantor) Date: Fri, 25 Oct 2013 21:04:59 +0000 Subject: [issue19395] unpickled LZMACompressor is crashy In-Reply-To: <1382728843.86.0.270938771254.issue19395@psf.upfronthosting.co.za> Message-ID: <1382735099.12.0.33397571711.issue19395@psf.upfronthosting.co.za> cantor added the comment: just to mention that map() (i.e. the non parallel version) works: import lzma from functools import partial import multiprocessing def run_lzma(data,c): return c.compress(data) def split_len(seq, length): return [str.encode(seq[i:i+length]) for i in range(0, len(seq), length)] sequence='AAAAAJKDDDDDDDDDDDDDDDDDDDDDDDDDDDDGJFKSHFKLHALWEHAIHWEOIAH IOAHIOWEHIOHEIOFEAFEASFEAFWEWWWWWWWWWWWWWWWWWWWWWWWWWWWWWEWFQWEWQWQGEWQFEWFDWEWEGEFGWEG' threads=3 blocksize = int(round(len(sequence)/threads)) strings = split_len(sequence, blocksize) #map works lzc = lzma.LZMACompressor() out = list(map(lzc.compress,strings)) out_flush = lzc.flush() result = b"".join(out + [out_flush]) lzma.compress(str.encode(sequence)) lzma.compress(str.encode(sequence)) == result True # map with the use of partial function works as well lzc = lzma.LZMACompressor() lzc_partial = partial(run_lzma,c=lzc) out = list(map(lzc_partial,strings)) out_flush = lzc.flush() result = b"".join(out + [out_flush]) lzma.compress(str.encode(sequence)) == result ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 23:12:34 2013 From: report at bugs.python.org (Nadeem Vawda) Date: Fri, 25 Oct 2013 21:12:34 +0000 Subject: [issue19395] unpickled LZMACompressor is crashy In-Reply-To: <1382728843.86.0.270938771254.issue19395@psf.upfronthosting.co.za> Message-ID: <1382735554.71.0.231131972898.issue19395@psf.upfronthosting.co.za> Nadeem Vawda added the comment: Yes, that's because the builtin map function doesn't handle each input in a separate process, so it uses the same LZMACompressor object everywhere. Whereas multiprocessing.Pool.map creates a new copy of the compressor object for each input, which is where the problem comes in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 23:23:18 2013 From: report at bugs.python.org (cantor) Date: Fri, 25 Oct 2013 21:23:18 +0000 Subject: [issue19395] unpickled LZMACompressor is crashy In-Reply-To: <1382728843.86.0.270938771254.issue19395@psf.upfronthosting.co.za> Message-ID: <1382736198.66.0.19571054853.issue19395@psf.upfronthosting.co.za> cantor added the comment: in python 2.7.3 this kind of works however it is less efficient than the pure lzma.compress() from threading import Thread from backports import lzma from functools import partial import multiprocessing class CompressClass(Thread): def __init__ (self,data,c): Thread.__init__(self) self.exception=False self.data=data self.datacompressed="" self.c=c def getException(self): return self.exception def getOutput(self): return self.datacompressed def run(self): self.datacompressed=(self.c).compress(self.data) def split_len(seq, length): return [seq[i:i+length] for i in range(0, len(seq), length)] def launch_multiple_lzma(data,c): print 'cores' present=CompressClass(data,c) present.start() present.join() return present.getOutput() def threaded_lzma_map(sequence,threads): lzc = lzma.LZMACompressor() blocksize = int(round(len(sequence)/threads)) lzc_partial = partial(launch_multiple_lzma,c=lzc) lzlist = map(lzc_partial,split_len(sequence, blocksize)) #pool=multiprocessing.Pool() #lzclist = pool.map(lzc_partial,split_len(sequence, blocksize)) #pool.close() #pool.join() out_flush = lzc.flush() res = "".join(lzlist + [out_flush]) return res sequence = 'AAAAAJKDDDDDDDDDDDDDDDDDDDDDDDDDDDDGJFKSHFKLHALWEHAIHWEOIAH IOAHIOWEHIOHEIOFEAFEASFEAFWEWWWWWWWWWWWWWWWWWWWWWWWWWWWWWEWFQWEWQWQGEWQFEWFDWEWEGEFGWEG' lzma.compress(sequence) == threaded_lzma_map(sequence,threads=16) Any way this could be imporved? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 23:23:25 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 25 Oct 2013 21:23:25 +0000 Subject: [issue19399] sporadic test_subprocess failure Message-ID: <1382736205.96.0.919532282342.issue19399@psf.upfronthosting.co.za> New submission from Antoine Pitrou: It looks like this may be the symptom of a buglet in Thread.join: ====================================================================== ERROR: test_communicate_timeout (test.test_subprocess.ProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\test\test_subprocess.py", line 672, in test_communicate_timeout timeout=0.3) File "E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\unittest\case.py", line 689, in assertRaises return context.handle('assertRaises', callableObj, args, kwargs) File "E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\unittest\case.py", line 158, in handle callable_obj(*args, **kwargs) File "E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\subprocess.py", line 947, in communicate stdout, stderr = self._communicate(input, endtime, timeout) File "E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\subprocess.py", line 1193, in _communicate self.stdout_thread.join(self._remaining_time(endtime)) File "E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\threading.py", line 1062, in join self._wait_for_tstate_lock(timeout=timeout) File "E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\threading.py", line 1074, in _wait_for_tstate_lock elif lock.acquire(block, timeout): ValueError: timeout value must be strictly positive ---------- components: Library (Lib) messages: 201296 nosy: pitrou, tim.peters priority: normal severity: normal status: open title: sporadic test_subprocess failure versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 23:36:24 2013 From: report at bugs.python.org (Tim Peters) Date: Fri, 25 Oct 2013 21:36:24 +0000 Subject: [issue19399] sporadic test_subprocess failure In-Reply-To: <1382736205.96.0.919532282342.issue19399@psf.upfronthosting.co.za> Message-ID: <1382736984.31.0.401499741953.issue19399@psf.upfronthosting.co.za> Tim Peters added the comment: Well, when a timeout is specified, .join() passes exactly the timeout passed to _it_ to ._wait_for_tstate_lock(), which in turn passes exactly the same timeout to .acquire(). So the negative value must be coming from _communicate() (the self.stdout_thread.join(self._remaining_time(endtime)) line). _remaining_time() in turn: def _remaining_time(self, endtime): """Convenience for _communicate when computing timeouts.""" if endtime is None: return None else: return endtime - _time() So that just subtracts and doesn't do anything to ensure the result is positive, nor does the calling site check the return value. Most other _remaining_time() calls in subprocess.py *do* check the return value, so I think this is clearly a subprocess.py bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 25 23:41:08 2013 From: report at bugs.python.org (Tim Peters) Date: Fri, 25 Oct 2013 21:41:08 +0000 Subject: [issue19399] sporadic test_subprocess failure In-Reply-To: <1382736205.96.0.919532282342.issue19399@psf.upfronthosting.co.za> Message-ID: <1382737268.21.0.0755749494524.issue19399@psf.upfronthosting.co.za> Tim Peters added the comment: BTW, if subprocess did check the return value, it would see that the timeout already expired, and the test would pass. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 00:34:37 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 25 Oct 2013 22:34:37 +0000 Subject: [issue5309] distutils doesn't parallelize extension module compilation In-Reply-To: <1235007592.93.0.0598331575131.issue5309@psf.upfronthosting.co.za> Message-ID: <1382740477.86.0.0129695046446.issue5309@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever title: setup.py doesn't parallelize extension module compilation -> distutils doesn't parallelize extension module compilation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 00:36:48 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 25 Oct 2013 22:36:48 +0000 Subject: [issue1887] distutils doesn't support out-of-source builds In-Reply-To: <1200961919.23.0.699852435444.issue1887@psf.upfronthosting.co.za> Message-ID: <1382740608.86.0.373045916459.issue1887@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 00:45:49 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 25 Oct 2013 22:45:49 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1382741149.68.0.984197723344.issue19183@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: http://bugs.python.org/file32365/38b3ad4287ef.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 00:55:59 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 25 Oct 2013 22:55:59 +0000 Subject: [issue19400] Extension module builds can fail with Xcode 5 on OS X 10.8+ Message-ID: <1382741759.73.0.518874272846.issue19400@psf.upfronthosting.co.za> New submission from Ned Deily: On OS X 10.8 or 10.9 when using Xcode 5 and attempting to build an extension module using a universal Python that includes a PPC architecture (such as from one of the python.org 32-bit-only installers), the extension module build can fail with numerous compiler errors. Recent python.org 32-bit-only installers attempt to remove unavailable PPC architectures when building extension modules. Unfortunately, due to changes between Xcode 4 and Xcode 5, the test in Distutils does not work with Xcode 5 compilers. The problem affects the current OS X 32-bit-only python.org installers for Python 3.3.2 and 2.7.5. It is not a problem for OS X 64-bit/32-bit installers for 10.6+. A workaround for the problem is to override the Distutils defaults by setting the ARCHFLAGS environment variable to the desired architectures, for example: ARCHFLAGS="-arch i386" /usr/local/bin/python2.7 -m pip install ... ---------- assignee: ned.deily components: Distutils, Extension Modules, Macintosh messages: 201299 nosy: ned.deily, tarek priority: normal severity: normal status: open title: Extension module builds can fail with Xcode 5 on OS X 10.8+ versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 01:05:40 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 25 Oct 2013 23:05:40 +0000 Subject: [issue19400] Extension module builds can fail with Xcode 5 on OS X 10.8+ In-Reply-To: <1382741759.73.0.518874272846.issue19400@psf.upfronthosting.co.za> Message-ID: <3d61Bq36wrz7Ljh@mail.python.org> Roundup Robot added the comment: New changeset 6cfb0f2815ce by Ned Deily in branch '2.7': Issue #19400: Prevent extension module build failures with Xcode 5 on OS X http://hg.python.org/cpython/rev/6cfb0f2815ce New changeset e62a64507913 by Ned Deily in branch '3.3': Issue #19400: Prevent extension module build failures with Xcode 5 on OS X http://hg.python.org/cpython/rev/e62a64507913 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 01:09:25 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 25 Oct 2013 23:09:25 +0000 Subject: [issue19400] Extension module builds can fail with Xcode 5 on OS X 10.8+ In-Reply-To: <1382741759.73.0.518874272846.issue19400@psf.upfronthosting.co.za> Message-ID: <1382742565.24.0.265804755168.issue19400@psf.upfronthosting.co.za> Ned Deily added the comment: The problem is fixed in 6cfb0f2815ce for release in 2.7.6 and e62a64507913 for 3.3.3. It was previously fixed in 3.4.0a4 by 73532f33fbb3. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 01:12:20 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 25 Oct 2013 23:12:20 +0000 Subject: [issue18685] Restore re performance to pre-PEP393 level In-Reply-To: <1375967417.95.0.0303828296889.issue18685@psf.upfronthosting.co.za> Message-ID: <1382742740.62.0.605399808445.issue18685@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Looks good to me. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 01:57:28 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 Oct 2013 23:57:28 +0000 Subject: [issue19316] devguide: compiler - wording In-Reply-To: <1382272126.03.0.859419260116.issue19316@psf.upfronthosting.co.za> Message-ID: <1382745448.93.0.634341706351.issue19316@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Proposes changes could have been put in one (or just a few) messages with numbered suggestions. This would make it easier to refer to them. Each could have had a link to the file involved in order to make it easy to look at context. My opinions: msg200572 disagree msg200573 agree msg200576 agree that one of the two is better msg200578 disagree, I think, though I might change after seeing context msg200579 agree that sentence is bad; 'is' has no subject. msg200580 compiler is present in 2.7, gone in 3.3, 3.4 msg200583 the original is awkward; the replacement is wrong in that it says 'you must do xyz' and then 'if you do not want to do xyz'. Perhaps something like "When testing changes that affect bytecode output, remove old .pyc files. On unix, use "find . -name '*.py[co]' -exec rm -f {} ';'". When committing such a change, update the magic number." For running the test suite, that just needs to be run in /lib of the version being tested. Or now, just delete __pycache__ directories. The Windows equivalent should be given. Or give a python equivalent using shutil. msg200584 both are 'correct' on Merriam-Webster and wiktionary sites. Firefox only likes the first. I would go with whichever is used most in our docs. No comment on last two. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 02:00:11 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 26 Oct 2013 00:00:11 +0000 Subject: [issue19320] Tkinter tests ran with wantobjects is false In-Reply-To: <1382302056.06.0.500513298536.issue19320@psf.upfronthosting.co.za> Message-ID: <1382745611.14.0.596781712507.issue19320@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 02:14:45 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 26 Oct 2013 00:14:45 +0000 Subject: [issue19362] Documentation for len() fails to mention that it works on sets In-Reply-To: <1382530928.74.0.685857253341.issue19362@psf.upfronthosting.co.za> Message-ID: <1382746485.14.0.968842146028.issue19362@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I would prefer 'collections with a known size' but 'collections' should be good enough for the doc string. The manual can follow with examples. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 02:25:46 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 26 Oct 2013 00:25:46 +0000 Subject: [issue19367] IDLE wont open In-Reply-To: <1382549743.62.0.543177432072.issue19367@psf.upfronthosting.co.za> Message-ID: <1382747146.87.0.699270922566.issue19367@psf.upfronthosting.co.za> Terry J. Reedy added the comment: (Usage questions are generally better directed at python-list, but I will try to answer here first.) It is actually a 'connection not made' error, with a Firewall being only one possible cause for the non-connection. Questions: What OS? Windows? Mac? or ??? What exact Python version was installed? 3.3.2? or something else? How was it installed? For source or binary installer? Installed for one user? or all? Are you saying that on one machine a student can use it (logged in as student) but you cannot (logged in as teacher)? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 02:30:14 2013 From: report at bugs.python.org (Brian Zhou) Date: Sat, 26 Oct 2013 00:30:14 +0000 Subject: [issue19401] Segmentation fault with float arithmatics on OS X Mavericks Message-ID: <1382747414.16.0.56673583782.issue19401@psf.upfronthosting.co.za> New submission from Brian Zhou: $ uname -a Darwin foobar 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64 $ python Python 2.7.5 (v2.7.5:ab05e7dd2788, May 13 2013, 13:18:45) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> 11 * 1.1 12.100000000000001 >>> 11 * 1.2 Segmentation fault: 11 This is python.org build installed with the Mac installer. ---------- messages: 201306 nosy: Brian.Zhou priority: normal severity: normal status: open title: Segmentation fault with float arithmatics on OS X Mavericks type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 02:33:57 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 26 Oct 2013 00:33:57 +0000 Subject: [issue19401] Segmentation fault with float arithmatics on OS X Mavericks In-Reply-To: <1382747414.16.0.56673583782.issue19401@psf.upfronthosting.co.za> Message-ID: <1382747637.23.0.482262706667.issue19401@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 03:32:41 2013 From: report at bugs.python.org (Tim Peters) Date: Sat, 26 Oct 2013 01:32:41 +0000 Subject: [issue19399] sporadic test_subprocess failure In-Reply-To: <1382736205.96.0.919532282342.issue19399@psf.upfronthosting.co.za> Message-ID: <1382751161.69.0.92508735124.issue19399@psf.upfronthosting.co.za> Tim Peters added the comment: I think I'll change Thread.join() to just return if a timeout <= 0 is passed. The docs don't say anything about what Thread.join() does with a negative timeout, but at least in 2.7.5 it happened to just return. No point being gratuitously more demanding ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 03:40:55 2013 From: report at bugs.python.org (Tim Peters) Date: Sat, 26 Oct 2013 01:40:55 +0000 Subject: [issue19399] sporadic test_subprocess failure In-Reply-To: <1382736205.96.0.919532282342.issue19399@psf.upfronthosting.co.za> Message-ID: <1382751655.58.0.052664559657.issue19399@psf.upfronthosting.co.za> Changes by Tim Peters : ---------- assignee: -> tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 03:47:26 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 26 Oct 2013 01:47:26 +0000 Subject: [issue19399] sporadic test_subprocess failure In-Reply-To: <1382736205.96.0.919532282342.issue19399@psf.upfronthosting.co.za> Message-ID: <3d64n44VJNz7Ljn@mail.python.org> Roundup Robot added the comment: New changeset af67cfcd4089 by Tim Peters in branch 'default': Issue #19399: fix sporadic test_subprocess failure. http://hg.python.org/cpython/rev/af67cfcd4089 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 03:48:04 2013 From: report at bugs.python.org (Tim Peters) Date: Sat, 26 Oct 2013 01:48:04 +0000 Subject: [issue19399] sporadic test_subprocess failure In-Reply-To: <1382736205.96.0.919532282342.issue19399@psf.upfronthosting.co.za> Message-ID: <1382752084.9.0.840992504403.issue19399@psf.upfronthosting.co.za> Changes by Tim Peters : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 03:50:04 2013 From: report at bugs.python.org (Perry Lorier) Date: Sat, 26 Oct 2013 01:50:04 +0000 Subject: [issue19402] AbstractBasicAuthHandler Message-ID: <1382752204.16.0.0164222061045.issue19402@psf.upfronthosting.co.za> New submission from Perry Lorier: Similar to Issue8797, if the first 5 requests result in exception (eg 404), then AbstractBasicAuthHandler.retried is not reset, meaning authentication will fail on all subsequent attempts. The logic in AbstractBasicAuthHandler.http_error_401 calling self.reset_retry_count() needs to be fixed, possibly moving it up before the call to http_error_auth_reqed() ---------- messages: 201309 nosy: Perry.Lorier priority: normal severity: normal status: open title: AbstractBasicAuthHandler type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 03:57:43 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 01:57:43 +0000 Subject: [issue4331] Add functools.partialmethod In-Reply-To: <1382729275.27.0.204835137059.issue4331@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: On 26 Oct 2013 05:28, "alon horev" wrote: > Is the first option what you had in mind? That's actually an interesting question. I was going to say yes, but then I realised it would be better to just "do the right thing" when the underlying object was a classmethod descriptor, rather than composing them the other way around. That view means we should be delegating __get__ to the underlying descriptor and responding appropriately to the result. And for __call__ we then can't play games at all, since what my sketch does would be wrong when wrapping staticmethod. We also need to make sure the descriptor does the right thing when @abstractmethod is involved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 05:05:46 2013 From: report at bugs.python.org (cantor) Date: Sat, 26 Oct 2013 03:05:46 +0000 Subject: [issue19395] unpickled LZMACompressor is crashy In-Reply-To: <1382728843.86.0.270938771254.issue19395@psf.upfronthosting.co.za> Message-ID: <1382756746.66.0.293483696607.issue19395@psf.upfronthosting.co.za> cantor added the comment: python 3.3 version - tried this code and got a sliglty faster processing time then when running lzma.compress() on its own. Could this be improved upon? import lzma from functools import partial from threading import Thread def split_len(seq, length): return [str.encode(seq[i:i+length]) for i in range(0, len(seq), length)] class CompressClass(Thread): def __init__ (self,data,c): Thread.__init__(self) self.exception=False self.data=data self.datacompressed="" self.c=c def getException(self): return self.exception def getOutput(self): return self.datacompressed def run(self): self.datacompressed=(self.c).compress(self.data) def launch_multiple_lzma(data,c): present=CompressClass(data,c) present.start() present.join() return present.getOutput() def threaded_lzma_map(sequence,threads): lzc = lzma.LZMACompressor() blocksize = int(round(len(sequence)/threads)) lzc_partial = partial(launch_multiple_lzma,c=lzc) lzlist = list(map(lzc_partial,split_len(sequence, blocksize))) out_flush = lzc.flush() return b"".join(lzlist + [out_flush]) threaded_lzma_map(sequence,threads=16) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 05:08:44 2013 From: report at bugs.python.org (Tim Peters) Date: Sat, 26 Oct 2013 03:08:44 +0000 Subject: [issue19395] unpickled LZMACompressor is crashy In-Reply-To: <1382728843.86.0.270938771254.issue19395@psf.upfronthosting.co.za> Message-ID: <1382756924.88.0.91672887754.issue19395@psf.upfronthosting.co.za> Tim Peters added the comment: @cantor, this is a Python issue tracker, not a help desk. If you want advice about Python programming, please use the Python mailing list or any number of "help desk" web sites (e.g., stackoverflow). ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 06:52:42 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 26 Oct 2013 04:52:42 +0000 Subject: [issue19398] test_trace fails with -S In-Reply-To: <1382730233.11.0.30990585871.issue19398@psf.upfronthosting.co.za> Message-ID: <1382763162.76.0.250856073016.issue19398@psf.upfronthosting.co.za> Vajrasky Kok added the comment: This is the "emergency" patch to solve this issue. The main issue is, [sky at localhost cpython]$ ./python -Sc "import sys; print(sys.path)" ['', '/usr/local/lib/python34.zip', '/home/sky/Code/python/programming_language/cpython/Lib/', '/home/sky/Code/python/programming_language/cpython/Lib/plat-linux', '/home/sky/Code/python/programming_language/cpython/build/lib.linux-x86_64-3.4-pydebug'] [sky at localhost cpython]$ ./python -c "import sys; print(sys.path)" ['', '/usr/local/lib/python34.zip', '/home/sky/Code/python/programming_language/cpython/Lib', '/home/sky/Code/python/programming_language/cpython/Lib/plat-linux', '/home/sky/Code/python/programming_language/cpython/build/lib.linux-x86_64-3.4-pydebug', '/home/sky/.local/lib/python3.4/site-packages'] Let me "zoom" it for you. [sky at localhost cpython]$ ./python -Sc "import sys; print(sys.path[2])" /home/sky/Code/python/programming_language/cpython/Lib/ [sky at localhost cpython]$ ./python -c "import sys; print(sys.path[2])" /home/sky/Code/python/programming_language/cpython/Lib The "extra" slash is the culprit. I need to investigate whether this is deliberate or not. ---------- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file32366/emergency_patch_for_test_trace.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 08:05:34 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 26 Oct 2013 06:05:34 +0000 Subject: [issue19398] test_trace fails with -S In-Reply-To: <1382730233.11.0.30990585871.issue19398@psf.upfronthosting.co.za> Message-ID: <1382767534.85.0.429436750055.issue19398@psf.upfronthosting.co.za> Vajrasky Kok added the comment: I finally found the main culprit which puts extra '/' in my sys.path. The patch removed the extra '/' and also fixed this test automatically. ---------- Added file: http://bugs.python.org/file32367/remove_extra_slash_from_sys_path.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 08:32:43 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 06:32:43 +0000 Subject: [issue19396] test_contextlib fails with -S In-Reply-To: <1382730148.19.0.17792113903.issue19396@psf.upfronthosting.co.za> Message-ID: <1382769163.45.0.417046910488.issue19396@psf.upfronthosting.co.za> Nick Coghlan added the comment: It's not strictly a duplicate, but I'll be refactoring the relevant tests a bit in order to resolve issue 19330 anyway (I'm working on that now), so I can remove the dependency on help() in the process. ---------- resolution: -> duplicate status: open -> closed superseder: -> Use public classes for contextlib.suppress and redirect_stdout _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 08:36:49 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 06:36:49 +0000 Subject: [issue19396] test_contextlib fails with -S In-Reply-To: <1382730148.19.0.17792113903.issue19396@psf.upfronthosting.co.za> Message-ID: <1382769409.09.0.631888471605.issue19396@psf.upfronthosting.co.za> Nick Coghlan added the comment: On second thoughts, since I haven't started on the refactoring yet... ---------- resolution: duplicate -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 08:37:59 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 26 Oct 2013 06:37:59 +0000 Subject: [issue19396] test_contextlib fails with -S In-Reply-To: <1382730148.19.0.17792113903.issue19396@psf.upfronthosting.co.za> Message-ID: <3d6CDl02CWz7Lkt@mail.python.org> Roundup Robot added the comment: New changeset 2b904290b3b9 by Nick Coghlan in branch 'default': Close #19396: make test_contextlib tolerate -S http://hg.python.org/cpython/rev/2b904290b3b9 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 08:43:50 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 06:43:50 +0000 Subject: [issue19403] Make contextlib.redirect_stdout reentrant Message-ID: <1382769830.57.0.0645984337848.issue19403@psf.upfronthosting.co.za> New submission from Nick Coghlan: I realised making contextlib.redirect_stdout reentrant was actually fairly easy (thread safety is inherently impossible due to the process global side effect). Since making it reentrant makes it more user-friendly, I'll tweak the implementation to work that way. Need to resolve issue 19330 first, though. As part of this change, the reusable-but-not-reentrant example in the docs needs to be updated to use contextlib.ExitStack rather than this (that's inherently not reentrant, since all the context managers in the stack would be triggered when the innermost context ends). ---------- assignee: ncoghlan messages: 201318 nosy: ncoghlan priority: normal severity: normal status: open title: Make contextlib.redirect_stdout reentrant type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 08:44:17 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 06:44:17 +0000 Subject: [issue19403] Make contextlib.redirect_stdout reentrant In-Reply-To: <1382769830.57.0.0645984337848.issue19403@psf.upfronthosting.co.za> Message-ID: <1382769857.41.0.249362233532.issue19403@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- dependencies: +Use public classes for contextlib.suppress and redirect_stdout _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 08:46:34 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 06:46:34 +0000 Subject: [issue19330] Use public classes for contextlib.suppress and redirect_stdout In-Reply-To: <1382364052.22.0.450047950138.issue19330@psf.upfronthosting.co.za> Message-ID: <1382769994.84.0.985134085042.issue19330@psf.upfronthosting.co.za> Nick Coghlan added the comment: I decided to defer adding any public attributes to these APIs - that greatly simplifies this patch, is more consistent with the draft wording in the PEP 8 update (issue 19331), and if the demand for improved introspection support is there, we can always add them for 3.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 09:21:20 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 26 Oct 2013 07:21:20 +0000 Subject: [issue19339] telnetlib: time.monotonic() should be used instead of time.time() for timeout In-Reply-To: <1382385675.07.0.888544622289.issue19339@psf.upfronthosting.co.za> Message-ID: <3d6DBL60KYz7Ljc@mail.python.org> Roundup Robot added the comment: New changeset ea3deb022890 by Victor Stinner in branch '3.3': Close #19339: telnetlib module is now using time.monotonic() when available to http://hg.python.org/cpython/rev/ea3deb022890 New changeset d0f90d3f6203 by Victor Stinner in branch 'default': (Merge 3.3) Close #19339: telnetlib module is now using time.monotonic() when http://hg.python.org/cpython/rev/d0f90d3f6203 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 09:21:58 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 26 Oct 2013 07:21:58 +0000 Subject: [issue19339] telnetlib: time.monotonic() should be used instead of time.time() for timeout In-Reply-To: <1382385675.07.0.888544622289.issue19339@psf.upfronthosting.co.za> Message-ID: <1382772118.33.0.552700361043.issue19339@psf.upfronthosting.co.za> STINNER Victor added the comment: > Victor, did you see Serhiy's comment? Yes, I modified my patch to use _time name instead. The issue should now be fixed. ---------- stage: committed/rejected -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 09:22:18 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 07:22:18 +0000 Subject: [issue19404] Simplify per-instance control of help() output Message-ID: <1382772138.17.0.267743568288.issue19404@psf.upfronthosting.co.za> New submission from Nick Coghlan: While working on issue 19330, I also took a look at whether or not I could fix the @contextmanager decorator to also provide useful help information on the resulting objects. This turned out to be difficult, since calling decorated functions produces instances of contextlib._GeneratorContextManager, and help() insists on showing the docs for that rather than a __doc__ attribute set on the context manager instance itself. This behaviour appears to be ultimately due to "pydoc.render_doc()", which has a hardcoded list of conditions it checks to decide whether to document the instance directly or to provide the class documentation instead: http://hg.python.org/cpython/file/2b904290b3b9/Lib/pydoc.py#l1544 This first idea that comes to mind is to simply add the additional condition that if "obj.__doc__ != type(obj).__doc__", then help() shouldn't replace the object with it's type. The simple trick that I originally explored was simply setting the __doc__ attribute on the _GeneratorContextManager instance based on the docstring of the decorated function, and I believe that approach might work for property instances, too (rather than needing to hardcode the isinstance check into render_doc()). It may even handle some of the other currently hardcoded conditions in that list. ---------- components: Library (Lib) messages: 201322 nosy: ethan.furman, ncoghlan priority: normal severity: normal status: open title: Simplify per-instance control of help() output type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 09:24:38 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 07:24:38 +0000 Subject: [issue19330] Use public classes for contextlib.suppress and redirect_stdout In-Reply-To: <1382364052.22.0.450047950138.issue19330@psf.upfronthosting.co.za> Message-ID: <1382772278.74.0.712048126388.issue19330@psf.upfronthosting.co.za> Nick Coghlan added the comment: I checked the other classes in contextlib to ensure they also provided decent docstrings on instances. They were mostly OK, but @contextmanager itself doesn't provide useful docs when inspecting the result context manager instances directly. However, fixing that isn't trivial: see issue 19404 for details. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 09:46:23 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 26 Oct 2013 07:46:23 +0000 Subject: [issue18685] Restore re performance to pre-PEP393 level In-Reply-To: <1375967417.95.0.0303828296889.issue18685@psf.upfronthosting.co.za> Message-ID: <3d6Dlg0QPlz7Ljk@mail.python.org> Roundup Robot added the comment: New changeset 66e2dfbb1d70 by Serhiy Storchaka in branch 'default': Issue #18685: Restore re performance to pre-PEP 393 levels. http://hg.python.org/cpython/rev/66e2dfbb1d70 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 10:08:29 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 26 Oct 2013 08:08:29 +0000 Subject: [issue19330] Use public classes for contextlib.suppress and redirect_stdout In-Reply-To: <1382364052.22.0.450047950138.issue19330@psf.upfronthosting.co.za> Message-ID: <3d6FF825vyz7Ljk@mail.python.org> Roundup Robot added the comment: New changeset 09153a9a3bb9 by Nick Coghlan in branch 'default': Close #19330 by using public classes in contextlib http://hg.python.org/cpython/rev/09153a9a3bb9 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 10:08:29 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 26 Oct 2013 08:08:29 +0000 Subject: [issue19404] Simplify per-instance control of help() output In-Reply-To: <1382772138.17.0.267743568288.issue19404@psf.upfronthosting.co.za> Message-ID: <3d6FF90DWfz7Ljk@mail.python.org> Roundup Robot added the comment: New changeset 09153a9a3bb9 by Nick Coghlan in branch 'default': Close #19330 by using public classes in contextlib http://hg.python.org/cpython/rev/09153a9a3bb9 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 10:15:17 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 26 Oct 2013 08:15:17 +0000 Subject: [issue18685] Restore re performance to pre-PEP393 level In-Reply-To: <1375967417.95.0.0303828296889.issue18685@psf.upfronthosting.co.za> Message-ID: <1382775317.74.0.00595361112805.issue18685@psf.upfronthosting.co.za> STINNER Victor added the comment: Sorry, I was busy with my tracemalloc PEP, I didn't havee time to review your patch. I'm happy that you restored Python 3.2 performances! Thanks Serhiy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 10:19:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 26 Oct 2013 08:19:30 +0000 Subject: [issue18685] Restore re performance to pre-PEP393 level In-Reply-To: <1375967417.95.0.0303828296889.issue18685@psf.upfronthosting.co.za> Message-ID: <3d6FTs3Nfjz7Ljc@mail.python.org> Roundup Robot added the comment: New changeset 00e61cb3b11c by Serhiy Storchaka in branch 'default': Issue #18685: Extract template part of _sre.c into separated sre_lib.h file. http://hg.python.org/cpython/rev/00e61cb3b11c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 10:28:09 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 08:28:09 +0000 Subject: [issue12029] Catching virtual subclasses in except clauses In-Reply-To: <1304844823.89.0.48444500115.issue12029@psf.upfronthosting.co.za> Message-ID: <1382776089.88.0.450499762507.issue12029@psf.upfronthosting.co.za> Nick Coghlan added the comment: Because context managers are closer to try/finally blocks than they are to exception handling, the class-based implementation for the contextlib.suppress API uses issubclass rather than emulating the CPython exception handling semantics: http://hg.python.org/cpython/file/09153a9a3bb9/Lib/contextlib.py#l202 The exception checking in the unittest module is similarly based on issubclass: http://hg.python.org/cpython/file/09153a9a3bb9/Lib/unittest/case.py#l129 I'm planning to add the catch() and ExitLabel() context managers to contextlib2 this evening, and those too will be based on issubclass(). Perhaps as a near term thing, we should put an "implementation detail" notice somewhere in the language reference, pointing that it's the code using issubclass that is considered correct here, and CPython's exception handling that is considered out of line? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 10:40:20 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 Oct 2013 08:40:20 +0000 Subject: [issue19405] Fix outdated comments in the _sre module Message-ID: <1382776819.97.0.0101067680791.issue19405@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The _sre module contains comments which refers to 16-bit SRE_CODE. Now SRE_CODE is 32-bit. Antoine partially reviewed this change in issue19329. ---------- assignee: docs at python components: Documentation, Regular Expressions files: sre_comments.patch keywords: patch messages: 201330 nosy: docs at python, ezio.melotti, mrabarnett, pitrou, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Fix outdated comments in the _sre module type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32368/sre_comments.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 11:07:30 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 Oct 2013 09:07:30 +0000 Subject: [issue19330] Use public classes for contextlib.suppress and redirect_stdout In-Reply-To: <1382364052.22.0.450047950138.issue19330@psf.upfronthosting.co.za> Message-ID: <1382778450.19.0.00304158285062.issue19330@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I suppose tests will fail when Python is compiled with --without-doc-strings options. Perhaps the test.support.requires_docstrings decorator should be used. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 12:19:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 26 Oct 2013 10:19:01 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <3d6J7N0HdFz7Ljb@mail.python.org> Roundup Robot added the comment: New changeset db5a50959dc9 by Ned Deily in branch '2.7': Issue #15663: OS X installer builtin Tcl/Tk support http://hg.python.org/cpython/rev/db5a50959dc9 New changeset 150242784de0 by Ned Deily in branch '3.3': Issue #15663: OS X installer builtin Tcl/Tk support http://hg.python.org/cpython/rev/150242784de0 New changeset b599584ff1e3 by Ned Deily in branch 'default': Issue #15663: OS X installer builtin Tcl/Tk support http://hg.python.org/cpython/rev/b599584ff1e3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 12:27:35 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 26 Oct 2013 10:27:35 +0000 Subject: [issue19353] on RHEL6 simple build fails with test_linux_constants (test.test_resource.ResourceTest) In-Reply-To: <1382462066.11.0.516691894777.issue19353@psf.upfronthosting.co.za> Message-ID: <1382783255.52.0.377881770039.issue19353@psf.upfronthosting.co.za> Vajrasky Kok added the comment: This issue has been accidentally fixed by http://hg.python.org/cpython/rev/513da56d28de commit. Time to close it? Any last words? ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 12:28:42 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 26 Oct 2013 10:28:42 +0000 Subject: [issue18685] Restore re performance to pre-PEP393 level In-Reply-To: <1375967417.95.0.0303828296889.issue18685@psf.upfronthosting.co.za> Message-ID: <1382783322.56.0.440724151569.issue18685@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Didn't you forget to add sre_lib.h? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 12:32:17 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 26 Oct 2013 10:32:17 +0000 Subject: [issue18685] Restore re performance to pre-PEP393 level In-Reply-To: <1375967417.95.0.0303828296889.issue18685@psf.upfronthosting.co.za> Message-ID: <1382783537.42.0.64382996706.issue18685@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ah, sorry, no. I was fooled by the commit e-mail. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 13:00:57 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 Oct 2013 11:00:57 +0000 Subject: [issue18685] Restore re performance to pre-PEP393 level In-Reply-To: <1375967417.95.0.0303828296889.issue18685@psf.upfronthosting.co.za> Message-ID: <1382785257.17.0.454897753453.issue18685@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, the commit e-mail looks queer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 13:07:13 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 26 Oct 2013 11:07:13 +0000 Subject: [issue19397] test_pydoc fails with -S In-Reply-To: <1382730203.09.0.761692334901.issue19397@psf.upfronthosting.co.za> Message-ID: <1382785633.89.0.480673364436.issue19397@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Attached the patch to fix the test. The main issue is that with S flag, we do not have "help" in builtins. And I think that is deliberate. [sky at localhost cpython]$ ./python -S Python 3.4.0a4+ (default:64fb6a58ebf4+, Oct 26 2013, 19:04:01) [GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] on linux >>> [sky at localhost cpython]$ ./python Python 3.4.0a4+ (default:64fb6a58ebf4+, Oct 26 2013, 19:04:01) [GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> ---------- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file32369/fix_test_pydoc_with_S_flag.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 14:19:40 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 12:19:40 +0000 Subject: [issue19330] Use public classes for contextlib.suppress and redirect_stdout In-Reply-To: <1382364052.22.0.450047950138.issue19330@psf.upfronthosting.co.za> Message-ID: <1382789980.32.0.442739378327.issue19330@psf.upfronthosting.co.za> Nick Coghlan added the comment: It also fails under -OO, so I changed that decorator to deal with that case as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 14:21:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 26 Oct 2013 12:21:32 +0000 Subject: [issue19330] Use public classes for contextlib.suppress and redirect_stdout In-Reply-To: <1382364052.22.0.450047950138.issue19330@psf.upfronthosting.co.za> Message-ID: <3d6Lrk3y4Dz7LlD@mail.python.org> Roundup Robot added the comment: New changeset a9bbc2d0c1dc by Nick Coghlan in branch 'default': Issue #19330: Handle the no-docstrings case in tests http://hg.python.org/cpython/rev/a9bbc2d0c1dc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 14:32:39 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 Oct 2013 12:32:39 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1382790759.75.0.592947124915.issue16203@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated to current tip. I have added some changes from the review and have added some tests. Matthew, why change for SRE_OP_REPEAT_ONE is needed? Tests are passed without it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 14:33:02 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 Oct 2013 12:33:02 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1382790782.33.0.311457399508.issue16203@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file32370/issue16203_mrab_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 14:33:09 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 Oct 2013 12:33:09 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1382790789.74.0.431288232981.issue16203@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 14:35:51 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 Oct 2013 12:35:51 +0000 Subject: [issue19397] test_pydoc fails with -S In-Reply-To: <1382730203.09.0.761692334901.issue19397@psf.upfronthosting.co.za> Message-ID: <1382790951.74.0.476403820844.issue19397@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Just use pydoc.help. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 14:42:33 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 12:42:33 +0000 Subject: [issue19406] PEP 453: add the ensurepip module Message-ID: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> New submission from Nick Coghlan: Adding the initial ensurepip implementation and module docs (the "Installing Python Modules" updates will be handled in a separate issue) ---------- assignee: dstufft components: Library (Lib) messages: 201342 nosy: dstufft, larry, ncoghlan priority: release blocker severity: normal status: open title: PEP 453: add the ensurepip module versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 14:44:35 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 12:44:35 +0000 Subject: [issue19407] PEP 453: update the "Installing Python Modules" documentation Message-ID: <1382791475.83.0.387983167617.issue19407@psf.upfronthosting.co.za> New submission from Nick Coghlan: Updating the "Installing Python Modules" docs in 2.7, 3.3 and default to recommend pip as the default cross-platform installer. ---------- assignee: ncoghlan components: Documentation messages: 201343 nosy: benjamin.peterson, georg.brandl, larry, ncoghlan priority: release blocker severity: normal status: open title: PEP 453: update the "Installing Python Modules" documentation type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 14:45:27 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 12:45:27 +0000 Subject: [issue19407] PEP 453: update the "Installing Python Modules" documentation In-Reply-To: <1382791475.83.0.387983167617.issue19407@psf.upfronthosting.co.za> Message-ID: <1382791527.29.0.26575825705.issue19407@psf.upfronthosting.co.za> Nick Coghlan added the comment: Once issue 19406 is implemented, this will need an additional update to indicate pip should be available by default in 3.4. ---------- dependencies: +PEP 453: add the ensurepip module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 14:46:17 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 12:46:17 +0000 Subject: [issue19347] PEP 453 implementation tracking issue In-Reply-To: <1382442514.8.0.354499850572.issue19347@psf.upfronthosting.co.za> Message-ID: <1382791577.95.0.108135250465.issue19347@psf.upfronthosting.co.za> Nick Coghlan added the comment: First two working issues created: Issue 19406 for the addition of ensurepip and its docs Issue 19407 for the Installing Python Modules updates ---------- dependencies: +PEP 453: add the ensurepip module, PEP 453: update the "Installing Python Modules" documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 14:48:16 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 12:48:16 +0000 Subject: [issue19407] PEP 453: update the "Installing Python Modules" documentation In-Reply-To: <1382791475.83.0.387983167617.issue19407@psf.upfronthosting.co.za> Message-ID: <1382791696.26.0.0671332310554.issue19407@psf.upfronthosting.co.za> Nick Coghlan added the comment: Issue 19437 tracks overall PEP 453 implementation progress ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 14:48:22 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 12:48:22 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1382791702.67.0.0585682990735.issue19406@psf.upfronthosting.co.za> Nick Coghlan added the comment: Issue 19437 tracks overall PEP 453 implementation progress ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 14:48:47 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 12:48:47 +0000 Subject: [issue19407] PEP 453: update the "Installing Python Modules" documentation In-Reply-To: <1382791475.83.0.387983167617.issue19407@psf.upfronthosting.co.za> Message-ID: <1382791727.89.0.806461794375.issue19407@psf.upfronthosting.co.za> Nick Coghlan added the comment: Issue 19347 tracks overall PEP 453 implementation progress ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 14:48:51 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 12:48:51 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1382791731.3.0.0600410682963.issue19406@psf.upfronthosting.co.za> Nick Coghlan added the comment: Issue 19347 tracks overall PEP 453 implementation progress ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 14:49:16 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 12:49:16 +0000 Subject: [issue19407] PEP 453: update the "Installing Python Modules" documentation In-Reply-To: <1382791475.83.0.387983167617.issue19407@psf.upfronthosting.co.za> Message-ID: <1382791756.19.0.390391313189.issue19407@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- Removed message: http://bugs.python.org/msg201346 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 14:49:13 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 12:49:13 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1382791753.94.0.12228334198.issue19406@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- Removed message: http://bugs.python.org/msg201347 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 14:52:02 2013 From: report at bugs.python.org (Donald Stufft) Date: Sat, 26 Oct 2013 12:52:02 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1382791922.52.0.181695534989.issue19406@psf.upfronthosting.co.za> Donald Stufft added the comment: Attached is an initial rough draft of the ensurepip module. There are some issues still, but they largely need resolved in pip. 1. Setuptools' use of dependency_links causes pip to still reach out to the internet. 2. Need to remove the --pre flag from the pip invocation once pip 1.5 is finalized 3. Need to fix the --root option when it's used on Wheels (https://github.com/pypa/pip/issues/925) If you prefer to view it on github my branch for working on it is available at https://github.com/dstufft/cpython/compare/ensurepip ---------- keywords: +patch Added file: http://bugs.python.org/file32371/draft.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 14:53:41 2013 From: report at bugs.python.org (Isis Binder) Date: Sat, 26 Oct 2013 12:53:41 +0000 Subject: [issue19408] Regex with set of characters and groups raises error Message-ID: <1382792021.59.0.192003336174.issue19408@psf.upfronthosting.co.za> New submission from Isis Binder: I was working on some SPOJ exercises when the regex module hit me with an error related to '*' being used inside the character set operator. I looked in the module docs but it says: Special characters lose their special meaning inside sets. For example, [(+*)] will match any of the literal characters '(', '+', '*', or ')'. Traceback attached. Offending code (inside IDLE): import re a = '73479*5152' re.match(r'(\d+)([+-*])(\d+)', a).groups() NOTE: if I write r'(\d+)([*])(\d+)', r'(\d+)([*+-])(\d+)' or r'(\d+)([+*-])(\d+)' it works. Shouldn't it simply work as described in the docs or should the docs be updated with an entry about proper character ordering in the character class? ---------- components: Regular Expressions files: traceback.txt messages: 201351 nosy: Isis.Binder, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: Regex with set of characters and groups raises error type: crash versions: Python 3.3 Added file: http://bugs.python.org/file32372/traceback.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 15:10:41 2013 From: report at bugs.python.org (Donald Stufft) Date: Sat, 26 Oct 2013 13:10:41 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1382793041.77.0.653942786043.issue19406@psf.upfronthosting.co.za> Donald Stufft added the comment: Added a second draft that handles the case when the stdlib isn't directly browseable (e.g. it's zipped up or something). ---------- Added file: http://bugs.python.org/file32373/draft2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 15:23:44 2013 From: report at bugs.python.org (Brett Cannon) Date: Sat, 26 Oct 2013 13:23:44 +0000 Subject: [issue19353] on RHEL6 simple build fails with test_linux_constants (test.test_resource.ResourceTest) In-Reply-To: <1382462066.11.0.516691894777.issue19353@psf.upfronthosting.co.za> Message-ID: <1382793824.41.0.750995725062.issue19353@psf.upfronthosting.co.za> Brett Cannon added the comment: Since the test now passes I'm going to close this as fixed. ---------- assignee: -> brett.cannon resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 15:30:47 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 Oct 2013 13:30:47 +0000 Subject: [issue19408] Regex with set of characters and groups raises error In-Reply-To: <1382792021.59.0.192003336174.issue19408@psf.upfronthosting.co.za> Message-ID: <1382794247.16.0.109904204828.issue19408@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: >From re documentation: """Ranges of characters can be indicated by giving two characters and separating them by a '-', for example [a-z] will match any lowercase ASCII letter, [0-5][0-9] will match all the two-digits numbers from 00 to 59, and [0-9A-Fa-f] will match any hexadecimal digit. If - is escaped (e.g. [a\-z]) or if it?s placed as the first or last character (e.g. [a-]), it will match a literal '-'.""" A Python exception is not a crash. A crash is a Segmentation Fault (*nix) or 'Your program stopped unexpectedly' (Windows). ---------- nosy: +serhiy.storchaka resolution: -> invalid type: crash -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 15:57:29 2013 From: report at bugs.python.org (Donald Stufft) Date: Sat, 26 Oct 2013 13:57:29 +0000 Subject: [issue19409] pkgutil isn't importable from a file or the REPL Message-ID: <1382795849.54.0.132790969201.issue19409@psf.upfronthosting.co.za> New submission from Donald Stufft: Currently pkgutil cannot be imported unless you first import importlib.machinery. This means ./python.exe -m pkgutil works, but doing ``import pkgutil`` in the REPL does not. ---------- messages: 201355 nosy: dstufft, larry priority: release blocker severity: normal status: open title: pkgutil isn't importable from a file or the REPL type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 16:06:48 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 14:06:48 +0000 Subject: [issue19409] pkgutil isn't importable from a file or the REPL In-Reply-To: <1382795849.54.0.132790969201.issue19409@psf.upfronthosting.co.za> Message-ID: <1382796408.28.0.416274563488.issue19409@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'm seeing the same symptom locally. If you use -m to execute things, the problem isn't noticeable because runpy imports importlib.machinery. It looks like test.regrtest imports it as well: $ ./python -m test test_pkgutil [1/1] test_pkgutil 1 test OK. $ ./python Lib/test/regrtest.py test_pkgutil [1/1] test_pkgutil 1 test OK. $ ./python Lib/test/test_pkgutil.py Traceback (most recent call last): File "Lib/test/test_pkgutil.py", line 5, in import pkgutil File "/home/ncoghlan/devel/py3k/Lib/pkgutil.py", line 161, in importlib.machinery.FileFinder, _iter_file_finder_modules) AttributeError: 'module' object has no attribute 'machinery' ---------- nosy: +brett.cannon, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 16:13:10 2013 From: report at bugs.python.org (Donald Stufft) Date: Sat, 26 Oct 2013 14:13:10 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1382796790.35.0.833253054504.issue19406@psf.upfronthosting.co.za> Donald Stufft added the comment: Added a third draft, this one adds the script to check if pip needs updated. I've removed the first two drafts to make it simpler. ---------- Added file: http://bugs.python.org/file32374/draft3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 16:13:35 2013 From: report at bugs.python.org (Donald Stufft) Date: Sat, 26 Oct 2013 14:13:35 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1382796815.95.0.350983946692.issue19406@psf.upfronthosting.co.za> Changes by Donald Stufft : Removed file: http://bugs.python.org/file32373/draft2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 16:13:45 2013 From: report at bugs.python.org (Donald Stufft) Date: Sat, 26 Oct 2013 14:13:45 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1382796825.18.0.646536582264.issue19406@psf.upfronthosting.co.za> Changes by Donald Stufft : Removed file: http://bugs.python.org/file32371/draft.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 16:18:22 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 14:18:22 +0000 Subject: [issue19403] Make contextlib.redirect_stdout reentrant In-Reply-To: <1382769830.57.0.0645984337848.issue19403@psf.upfronthosting.co.za> Message-ID: <1382797102.46.0.449830334593.issue19403@psf.upfronthosting.co.za> Nick Coghlan added the comment: I think this change also makes for nicer examples of reentrant (using the updated redirect_stdout) and reusable-but-not-reentrant (using ExitStack) behaviour in the docs. ---------- keywords: +patch Added file: http://bugs.python.org/file32375/issue19403_reentrant_redirect_stdout.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 16:21:45 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 14:21:45 +0000 Subject: [issue19409] pkgutil isn't importable from a file or the REPL In-Reply-To: <1382795849.54.0.132790969201.issue19409@psf.upfronthosting.co.za> Message-ID: <1382797305.27.0.263028639692.issue19409@psf.upfronthosting.co.za> Nick Coghlan added the comment: Also "make clobber" and a rebuild didn't fix it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 16:25:13 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 14:25:13 +0000 Subject: [issue19409] pkgutil isn't importable from a file or the REPL In-Reply-To: <1382795849.54.0.132790969201.issue19409@psf.upfronthosting.co.za> Message-ID: <1382797513.56.0.89866914695.issue19409@psf.upfronthosting.co.za> Nick Coghlan added the comment: Turns out the relevant import is just plain missing from pkgutil, and we didn't notice because so many other things import it :P ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 16:26:12 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 14:26:12 +0000 Subject: [issue19409] pkgutil isn't importable from a file or the REPL In-Reply-To: <1382795849.54.0.132790969201.issue19409@psf.upfronthosting.co.za> Message-ID: <1382797572.75.0.331574618163.issue19409@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 16:28:14 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 26 Oct 2013 14:28:14 +0000 Subject: [issue19409] pkgutil isn't importable from a file or the REPL In-Reply-To: <1382795849.54.0.132790969201.issue19409@psf.upfronthosting.co.za> Message-ID: <3d6PgL1gXCz7Ljc@mail.python.org> Roundup Robot added the comment: New changeset 0c0cbba64b7b by Nick Coghlan in branch 'default': Close #19409: add missing import in pkgutil http://hg.python.org/cpython/rev/0c0cbba64b7b ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 16:33:42 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 14:33:42 +0000 Subject: [issue19409] pkgutil isn't importable from a file or the REPL In-Reply-To: <1382795849.54.0.132790969201.issue19409@psf.upfronthosting.co.za> Message-ID: <1382798022.09.0.68264878102.issue19409@psf.upfronthosting.co.za> Nick Coghlan added the comment: Ah, I figured out which commit broke it, too: the one that deprecated the imp module (see http://hg.python.org/cpython/rev/1b8f08c4efd5) Previously, the importlib.machinery dependency was satisfied indirectly through imp. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 16:35:20 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 14:35:20 +0000 Subject: [issue19409] pkgutil isn't importable from a file or the REPL In-Reply-To: <1382795849.54.0.132790969201.issue19409@psf.upfronthosting.co.za> Message-ID: <1382798120.69.0.303691254806.issue19409@psf.upfronthosting.co.za> Nick Coghlan added the comment: I checked the other modules that previously imported imp, and they're all fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 16:49:25 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 14:49:25 +0000 Subject: [issue19031] Make help() enum aware In-Reply-To: <1379289794.97.0.994378932185.issue19031@psf.upfronthosting.co.za> Message-ID: <1382798965.58.0.0138866366562.issue19031@psf.upfronthosting.co.za> Nick Coghlan added the comment: I proposed a possible solution for this in issue 19404 ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 16:49:59 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 14:49:59 +0000 Subject: [issue19404] Simplify per-instance control of help() output In-Reply-To: <1382772138.17.0.267743568288.issue19404@psf.upfronthosting.co.za> Message-ID: <1382798999.15.0.199759042282.issue19404@psf.upfronthosting.co.za> Nick Coghlan added the comment: Issue 19031 is a report indicating that this is a problem for Enum instances as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 16:59:36 2013 From: report at bugs.python.org (alon horev) Date: Sat, 26 Oct 2013 14:59:36 +0000 Subject: [issue4331] Add functools.partialmethod In-Reply-To: <1226817180.09.0.841012218041.issue4331@psf.upfronthosting.co.za> Message-ID: <1382799576.01.0.647568450466.issue4331@psf.upfronthosting.co.za> alon horev added the comment: Here's another attempt at a consistent api with regular methods. I'm contemplating whether partialmethod should support __call__. Given the fact partial is used to bind positional arguments, it will do the 'wrong' thing when calling the partialmethod directly and will shift all positional arguments (example at the last line of the snippet). I also think staticmethod in this context is useless but agree consistency is a thing (you could just use partial instead). If consistency hadn't held us back, the first proposal of partialmethod, working both for instances and classes, would have been most elegant. from functools import partial class partialmethod(object): def __init__(self, func, *args, **keywords): self.func = func self.args = args self.keywords = keywords def __call__(self, *args, **keywords): call_keywords = {} call_keywords.update(self.keywords) call_keywords.update(keywords) return self.func(*(self.args + args), **call_keywords) def __get__(self, obj, cls): return partial(self.func.__get__(obj, cls), *self.args, **self.keywords) class A(object): def add(self, x, y): print(self) return x + y add10 = partialmethod(add, 10) add10class = partialmethod(classmethod(add), 10) add10static = partialmethod(staticmethod(add), 'self', 10) assert A().add10(5) == 15 # prints <__main__.A object at 0x1097e1390> assert A.add10class(5) == 15 # prints assert A.add10static(5) == 15 # prints self assert A.add10(2, 3) == 5 # prints 10 because the first positional argument is self.. Once we approve of the API I'll provide a full fledged patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 17:38:30 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 15:38:30 +0000 Subject: [issue19410] Restore empty string special casing in importlib.machinery.FileFinder Message-ID: <1382801910.68.0.88492101144.issue19410@psf.upfronthosting.co.za> New submission from Nick Coghlan: As noted on python-dev, while changing PathFinder to expand the empty string to the current working directory is a good idea, removing the '' special case handling in FileFinder may break subclasses and other custom metapath hooks that expect the current behaviour. Just creating this to make sure it is resolved before 3.4 is released (it is simply a matter of reverting a patch, since we want to keep *most* of the change that implemented absolute paths in __file__ attributes, just not all of it) ---------- assignee: brett.cannon messages: 201367 nosy: brett.cannon, larry, ncoghlan priority: release blocker severity: normal stage: needs patch status: open title: Restore empty string special casing in importlib.machinery.FileFinder type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 17:42:17 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 26 Oct 2013 15:42:17 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1382802137.56.0.820061843946.issue19227@psf.upfronthosting.co.za> Christian Heimes added the comment: I still don't get it. All arguments are about "don't execute async unsafe code after fork()". But the child process does *not* execute *any* code after fork. It's just the parent process that executes its handler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 17:51:52 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 15:51:52 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1382802712.58.0.456707647468.issue18864@psf.upfronthosting.co.za> Nick Coghlan added the comment: Something else we may be able to fix (albeit probably not in 3.4): several of the issues noted in PEP 395 (since __main__.__spec__.name will give the real module name, even when __name__ is set to "__main__" or otherwise modified) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 17:54:11 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 26 Oct 2013 15:54:11 +0000 Subject: [issue19397] test_pydoc fails with -S In-Reply-To: <1382730203.09.0.761692334901.issue19397@psf.upfronthosting.co.za> Message-ID: <1382802851.78.0.722132495208.issue19397@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Attached the patch based on Serhiy's suggestion. ---------- Added file: http://bugs.python.org/file32376/fix_test_pydoc_with_S_flag_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 18:45:58 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 26 Oct 2013 16:45:58 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1382805958.28.0.187480574847.issue19227@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Your patch adds a child process atfork handler, which definitely isn't executed in the parent.... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 18:50:24 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 26 Oct 2013 16:50:24 +0000 Subject: [issue18685] Restore re performance to pre-PEP393 level In-Reply-To: <1375967417.95.0.0303828296889.issue18685@psf.upfronthosting.co.za> Message-ID: <1382806224.94.0.489247328576.issue18685@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I suppose this issue can be fixed then. Thanks for doing this! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 18:50:52 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 26 Oct 2013 16:50:52 +0000 Subject: [issue19393] symtable.symtable can return the wrong "top" SymbolTable In-Reply-To: <1382723396.02.0.356788344876.issue19393@psf.upfronthosting.co.za> Message-ID: <1382806252.77.0.479978586555.issue19393@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 18:57:12 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 26 Oct 2013 16:57:12 +0000 Subject: [issue19393] symtable.symtable can return the wrong "top" SymbolTable In-Reply-To: <1382723396.02.0.356788344876.issue19393@psf.upfronthosting.co.za> Message-ID: <1382806632.6.0.506006741697.issue19393@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 19:00:01 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 26 Oct 2013 17:00:01 +0000 Subject: [issue19395] unpickled LZMACompressor is crashy In-Reply-To: <1382728843.86.0.270938771254.issue19395@psf.upfronthosting.co.za> Message-ID: <1382806801.21.0.0753449759601.issue19395@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If it's not possible (or easily doable) to recreate the compressor's internal state, I agree it would be helpful for pickling to raise a TypeError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 19:06:40 2013 From: report at bugs.python.org (Matthew Barnett) Date: Sat, 26 Oct 2013 17:06:40 +0000 Subject: [issue19408] Regex with set of characters and groups raises error In-Reply-To: <1382792021.59.0.192003336174.issue19408@psf.upfronthosting.co.za> Message-ID: <1382807200.0.0.261098219117.issue19408@psf.upfronthosting.co.za> Matthew Barnett added the comment: The traceback says "bad character range" because ord('+') == 43 and ord('*') == 42. It's not surprising that it complains if the range isn't valid. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 19:08:54 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 Oct 2013 17:08:54 +0000 Subject: [issue18685] Restore re performance to pre-PEP393 level In-Reply-To: <1375967417.95.0.0303828296889.issue18685@psf.upfronthosting.co.za> Message-ID: <1382807334.64.0.927188520697.issue18685@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your review Antoine and Victor. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 19:09:42 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 Oct 2013 17:09:42 +0000 Subject: [issue19408] Regex with set of characters and groups raises error In-Reply-To: <1382792021.59.0.192003336174.issue19408@psf.upfronthosting.co.za> Message-ID: <1382807382.18.0.446448788737.issue19408@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 19:18:30 2013 From: report at bugs.python.org (Devin Jeanpierre) Date: Sat, 26 Oct 2013 17:18:30 +0000 Subject: [issue19411] binascii.hexlify docs say it returns a string (it returns bytes) Message-ID: <1382807910.82.0.748740374727.issue19411@psf.upfronthosting.co.za> New submission from Devin Jeanpierre: http://docs.python.org/3.4/library/binascii.html#binascii.hexlify ---------- assignee: docs at python components: Documentation messages: 201376 nosy: Devin Jeanpierre, docs at python priority: normal severity: normal status: open title: binascii.hexlify docs say it returns a string (it returns bytes) versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 19:18:38 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 17:18:38 +0000 Subject: [issue4331] Add functools.partialmethod In-Reply-To: <1226817180.09.0.841012218041.issue4331@psf.upfronthosting.co.za> Message-ID: <1382807918.91.0.309189890838.issue4331@psf.upfronthosting.co.za> Nick Coghlan added the comment: I like your suggestion of not providing __call__(), as I don't see a way to make it work with arbitrary underlying descriptors, and neither classmethod nor staticmethod is callable. In terms of usage, I think this approach will be OK, as in practice I expect @classmethod, etc, will be applied to the initial method definition as appropriate, so they won't need to be inline except in test cases like these. Additional test cases needed: A().add10class(5) A().add10static(5) A.add10(A(), 5) All three should produce 15 as the result, and print the same thing as the following: A.add10class(5) A.add10static(5) A().add10(5) A test method that uses a partial instance as the callable would also be helpful in assuring the edge cases are covered. I believe it may be necessary to have a __get__ method something like: def _make_unbound_method(self, cls): def _unbound_method(*args, **kwds): call_keywords = self.keywords.copy() call_keywords.update(keywords) return self.func(*(self.args + args), **call_keywords) _unbound_method.__objclass__ = cls return _unbound_method def __get__(self, obj, cls): get = getattr(self.func, "__get__") if get is None: if obj is None: return self._make_unbound_method(cls) callable = self.func else: callable = get(obj, cls) if callable is self.func: return self._make_unbound_method(cls) return partial(callable, *self.args, **self.keywords) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 19:22:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 26 Oct 2013 17:22:43 +0000 Subject: [issue19393] symtable.symtable can return the wrong "top" SymbolTable In-Reply-To: <1382723396.02.0.356788344876.issue19393@psf.upfronthosting.co.za> Message-ID: <3d6TXF52LTz7Llq@mail.python.org> Roundup Robot added the comment: New changeset bc259b221cb8 by Benjamin Peterson in branch '3.3': just return toplevel symbol table rather than all blocks (closes #19393) http://hg.python.org/cpython/rev/bc259b221cb8 New changeset f1b7b5979e96 by Benjamin Peterson in branch '2.7': just return toplevel symbol table rather than all blocks (closes #19393) http://hg.python.org/cpython/rev/f1b7b5979e96 New changeset f5c729dbe9fb by Benjamin Peterson in branch 'default': merge 3.3 (#19393) http://hg.python.org/cpython/rev/f5c729dbe9fb ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 19:41:07 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 17:41:07 +0000 Subject: [issue19412] Add a test.support decorator for tests that require C level docstrings Message-ID: <1382809267.31.0.380635405032.issue19412@psf.upfronthosting.co.za> New submission from Nick Coghlan: It is *not* OK to have a "test.support.HAVE_DOCSTRINGS" flag that is true under -OO, nor a requires_docstrings decorator that still attempts to run the test under those conditions. Issue 19330 updated them so their meaning matched their names and the surrounding comments, but they were apparently being used instead to refer to a specific kind of CPython build. A more logical name for such a feature would be HAVE_C_DOCSTRINGS and requires_c_docstrings. ---------- components: Tests messages: 201379 nosy: ncoghlan, serhiy.storchaka, skrah priority: normal severity: normal status: open title: Add a test.support decorator for tests that require C level docstrings versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 19:51:34 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 17:51:34 +0000 Subject: [issue19412] Add a test.support decorator for tests that require C level docstrings In-Reply-To: <1382809267.31.0.380635405032.issue19412@psf.upfronthosting.co.za> Message-ID: <1382809894.35.0.442101801072.issue19412@psf.upfronthosting.co.za> Nick Coghlan added the comment: Alternatively, if the affected tests should also be skipped under -OO, then I think changing the current definition of HAVE_DOCSTRINGS would also work: MISSING_C_DOCSTRINGS = (check_impl_detail() and sys.platform != 'win32' and not sysconfig.get_config_var('WITH_DOC_STRINGS')) HAVE_DOCSTRINGS = _check_docstrings.__doc__ is not None and not MISSING_C_DOCSTRINGS ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 19:53:50 2013 From: report at bugs.python.org (Tim Peters) Date: Sat, 26 Oct 2013 17:53:50 +0000 Subject: [issue19412] Add a test.support decorator for tests that require C level docstrings In-Reply-To: <1382809267.31.0.380635405032.issue19412@psf.upfronthosting.co.za> Message-ID: <1382810030.27.0.225109977692.issue19412@psf.upfronthosting.co.za> Tim Peters added the comment: Think this is related to why the FreeBSD default buildbot is always failing now? http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%203.x/builds/5619/steps/test/logs/stdio Like: File "/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/test_generators.py", line ?, in test.test_generators.__test__.email Failed example: print(i.__next__.__doc__ if HAVE_DOCSTRINGS else 'x.__next__() <==> next(x)') Expected: x.__next__() <==> next(x) Got: I have no idea what HAVE_DOCSTRINGS is all about, alas :-( ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 19:55:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 26 Oct 2013 17:55:32 +0000 Subject: [issue18734] Berkeley DB versions 4.4-4.9 are not discovered by setup.py In-Reply-To: <1376450123.08.0.865805118992.issue18734@psf.upfronthosting.co.za> Message-ID: <3d6VGX21K1z7Ll8@mail.python.org> Roundup Robot added the comment: New changeset fae0a09f0f60 by Benjamin Peterson in branch '2.7': check for berkelydb versions besides 4.3 (#18734) http://hg.python.org/cpython/rev/fae0a09f0f60 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 19:59:07 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 26 Oct 2013 17:59:07 +0000 Subject: [issue18734] Berkeley DB versions 4.4-4.9 are not discovered by setup.py In-Reply-To: <1376450123.08.0.865805118992.issue18734@psf.upfronthosting.co.za> Message-ID: <1382810347.82.0.00245895265857.issue18734@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Okay. I made the check less dumb. Maybe it works... ---------- priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 19:59:49 2013 From: report at bugs.python.org (Stefan Krah) Date: Sat, 26 Oct 2013 17:59:49 +0000 Subject: [issue19412] Add a test.support decorator for tests that require C level docstrings In-Reply-To: <1382809267.31.0.380635405032.issue19412@psf.upfronthosting.co.za> Message-ID: <1382810389.76.0.0907760870337.issue19412@psf.upfronthosting.co.za> Stefan Krah added the comment: Yeah, HAVE_DOCSTRINGS was added when we were not sure whether to skip C and Python docstrings separately. I agree that the right thing is to have both requires_c_docstrings and requires_py_docstrings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 20:05:33 2013 From: report at bugs.python.org (Stefan Krah) Date: Sat, 26 Oct 2013 18:05:33 +0000 Subject: [issue19412] Add a test.support decorator for tests that require C level docstrings In-Reply-To: <1382809267.31.0.380635405032.issue19412@psf.upfronthosting.co.za> Message-ID: <1382810733.6.0.691077814579.issue19412@psf.upfronthosting.co.za> Stefan Krah added the comment: For reference see #17041 and msg180774. Separating the decorators makes things clearer (after all we're dealing with extremely obscure features here), merging them could mean less work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 20:08:34 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 26 Oct 2013 18:08:34 +0000 Subject: [issue19412] Add a test.support decorator for tests that require C level docstrings In-Reply-To: <1382810389.76.0.0907760870337.issue19412@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: +1 for separate flags with appropriate names and skip messages. It should only be the usage in test_contextlib which needs to be migrated to the Python flags, although the C usage may be more widespread. (The other Python cases are currently checking the optimisation level instead) However, it's 4 am here, so I'm going to go get some sleep :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 20:11:09 2013 From: report at bugs.python.org (Ethan Furman) Date: Sat, 26 Oct 2013 18:11:09 +0000 Subject: [issue19404] Simplify per-instance control of help() output In-Reply-To: <1382772138.17.0.267743568288.issue19404@psf.upfronthosting.co.za> Message-ID: <1382811069.5.0.656270347235.issue19404@psf.upfronthosting.co.za> Ethan Furman added the comment: Would it make sense to have the presence of a non-None __doc__ be a deciding factor? How often does an instance have a docstring where one would want the class info instead? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 20:11:41 2013 From: report at bugs.python.org (Nadeem Vawda) Date: Sat, 26 Oct 2013 18:11:41 +0000 Subject: [issue19395] unpickled LZMACompressor is crashy In-Reply-To: <1382728843.86.0.270938771254.issue19395@psf.upfronthosting.co.za> Message-ID: <1382811101.7.0.637835743845.issue19395@psf.upfronthosting.co.za> Nadeem Vawda added the comment: It looks like there's also a separate problem in the multiprocessing module. The following code hangs after hitting a TypeError trying to pickle one of the TextIOWrapper objects: import multiprocessing def read(f): return f.read() files = [open(path) for path in 3 * ['/dev/null']] pool = multiprocessing.Pool() results = pool.map(read, files) print(results) ---------- nosy: +jnoller, sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 20:19:33 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 26 Oct 2013 18:19:33 +0000 Subject: [issue19412] Add a test.support decorator for tests that require C level docstrings In-Reply-To: <1382809267.31.0.380635405032.issue19412@psf.upfronthosting.co.za> Message-ID: <1382811573.28.0.583982760182.issue19412@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 21:05:53 2013 From: report at bugs.python.org (Stefan Krah) Date: Sat, 26 Oct 2013 19:05:53 +0000 Subject: [issue10241] gc fixes for module m_copy attribute In-Reply-To: <1288410530.83.0.095379048444.issue10241@psf.upfronthosting.co.za> Message-ID: <1382814353.49.0.450275594317.issue10241@psf.upfronthosting.co.za> Stefan Krah added the comment: I'm getting a couple of Valgrind leaks, starting with 1edff836c954: valgrind --suppressions=Misc/valgrind-python.supp --leak-check=full ./python -c "pass" All of them seem to be in _PySys_Init(). ---------- nosy: +skrah Added file: http://bugs.python.org/file32377/valgrind.out _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 21:12:18 2013 From: report at bugs.python.org (Berker Peksag) Date: Sat, 26 Oct 2013 19:12:18 +0000 Subject: [issue11161] futures.ProcessPoolExecutor hangs In-Reply-To: <1297274599.08.0.127340661733.issue11161@psf.upfronthosting.co.za> Message-ID: <1382814738.43.0.164875597634.issue11161@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: -> committed/rejected versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 21:44:27 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 26 Oct 2013 19:44:27 +0000 Subject: [issue10241] gc fixes for module m_copy attribute In-Reply-To: <1288410530.83.0.095379048444.issue10241@psf.upfronthosting.co.za> Message-ID: <1382816667.75.0.894156826583.issue10241@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Can you identify which objects those leaks point to? The sys module is cleared at shutdown. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 22:08:06 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 26 Oct 2013 20:08:06 +0000 Subject: [issue5309] distutils doesn't parallelize extension module compilation In-Reply-To: <1235007592.93.0.0598331575131.issue5309@psf.upfronthosting.co.za> Message-ID: <1382818086.19.0.872027195777.issue5309@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a working patch. ---------- keywords: +patch Added file: http://bugs.python.org/file32378/build_ext_parallel.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 22:25:05 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 26 Oct 2013 20:25:05 +0000 Subject: [issue19405] Fix outdated comments in the _sre module In-Reply-To: <1382776819.97.0.0101067680791.issue19405@psf.upfronthosting.co.za> Message-ID: <1382819105.36.0.423081926999.issue19405@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Looks good to me, except that it probably shouldn't apply to 2.7 (does it?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 22:32:26 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 Oct 2013 20:32:26 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <1382819546.87.0.0753808493829.issue19085@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch fixes issues for Tk 8.4 and skipped ttk.Scrollbar test on MacOSX. I have increased the priority because many Tkinter issues will benefit from these tests. ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 22:33:04 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 Oct 2013 20:33:04 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <1382819584.47.0.417771155612.issue19085@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file32379/tkinter_options_tests_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 22:41:39 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 Oct 2013 20:41:39 +0000 Subject: [issue19405] Fix outdated comments in the _sre module In-Reply-To: <1382776819.97.0.0101067680791.issue19405@psf.upfronthosting.co.za> Message-ID: <1382820099.12.0.833393558408.issue19405@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In 2.7 SRE_CODE is 32-bit too (since issue1160). Only last chunk in Lib/sre_compile.py patch shouldn't apply to 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 23:09:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 26 Oct 2013 21:09:23 +0000 Subject: [issue5309] distutils doesn't parallelize extension module compilation In-Reply-To: <1235007592.93.0.0598331575131.issue5309@psf.upfronthosting.co.za> Message-ID: <1382821763.5.0.85403959572.issue5309@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is an updated patch which only enables parallel building in setup.py. ---------- Added file: http://bugs.python.org/file32380/build_ext_parallel2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 23:18:25 2013 From: report at bugs.python.org (Juan Javier) Date: Sat, 26 Oct 2013 21:18:25 +0000 Subject: [issue13785] Make concurrent.futures.Future state public In-Reply-To: <1326560835.55.0.282912980665.issue13785@psf.upfronthosting.co.za> Message-ID: <1382822305.26.0.213081627496.issue13785@psf.upfronthosting.co.za> Juan Javier added the comment: Hi Brian, No, no progress on this. I think this is not an interesting feature after all. You can close this. Juan Javier ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 23:19:33 2013 From: report at bugs.python.org (Juan Javier) Date: Sat, 26 Oct 2013 21:19:33 +0000 Subject: [issue15634] Add serialized decorator to the threading module In-Reply-To: <1344845068.87.0.536585589553.issue15634@psf.upfronthosting.co.za> Message-ID: <1382822373.04.0.220822046755.issue15634@psf.upfronthosting.co.za> Juan Javier added the comment: It looks like this is not very interesting after all. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 23:19:57 2013 From: report at bugs.python.org (Juan Javier) Date: Sat, 26 Oct 2013 21:19:57 +0000 Subject: [issue13785] Make concurrent.futures.Future state public In-Reply-To: <1326560835.55.0.282912980665.issue13785@psf.upfronthosting.co.za> Message-ID: <1382822397.07.0.0494574142002.issue13785@psf.upfronthosting.co.za> Changes by Juan Javier : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 23:43:43 2013 From: report at bugs.python.org (Eric Snow) Date: Sat, 26 Oct 2013 21:43:43 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1382823823.58.0.045929622732.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: Here's an update of the language reference patch based on Brett's comments. ---------- Added file: http://bugs.python.org/file32381/import-system-reference.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 26 23:43:54 2013 From: report at bugs.python.org (Eric Snow) Date: Sat, 26 Oct 2013 21:43:54 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1382823834.69.0.246714734848.issue18864@psf.upfronthosting.co.za> Changes by Eric Snow : Removed file: http://bugs.python.org/file32349/import-system-reference.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 00:50:54 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 26 Oct 2013 22:50:54 +0000 Subject: [issue5309] distutils doesn't parallelize extension module compilation In-Reply-To: <1235007592.93.0.0598331575131.issue5309@psf.upfronthosting.co.za> Message-ID: <1382827854.2.0.590633839039.issue5309@psf.upfronthosting.co.za> Christian Heimes added the comment: Antoine's patch doesn't work for a fresh copy of Python - add import error report to build_ext parallel (distutils doesn't use logging and doesn't have a working log.exception() function) - make time a builtin module - add hack for concurrent.futures.process - add --parallel=i / -ji (jobs) argument to build_ext ---------- Added file: http://bugs.python.org/file32382/build_ext_parallel3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 01:05:55 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 26 Oct 2013 23:05:55 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1382828755.47.0.0914395072862.issue19227@psf.upfronthosting.co.za> Christian Heimes added the comment: I wasn't talking about unlock_ssl_locks.patch but yet another patch. Anyway neither Python 2.7.6 nor 3.3.3 should be released with the current pthread_atfork() handler. We still don't understand the cause of the hanging buildbot but evidence points towards the pthread_atfork() code. I'd like to give the new patch a try. If it doesn't solve the issue ASAP then I'm going to disable the feature and replace it with a warning in the SSL module and os.fork() function. The issue isn't severe enough to break Python. ---------- Added file: http://bugs.python.org/file32383/atfork_prepare.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 01:12:36 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Sat, 26 Oct 2013 23:12:36 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1382829156.14.0.825216295185.issue19227@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Won't using a prepare handler mean that the parent and child processes will use the same seed until one or other of them forks again? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 01:16:03 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 26 Oct 2013 23:16:03 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1382829363.98.0.326540134993.issue19227@psf.upfronthosting.co.za> Christian Heimes added the comment: OpenSSL kinda takes care of that. The PRNG mixes the PID into the seed so parent and child won't see the same output. The patch fixes a slightly more tricky issue: - parent initializes PRNG but never touches the PRNG again - parent forks lots of child processes - PIDs get reused -- two child processes with same PID get same pseudorandom data ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 02:32:26 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 27 Oct 2013 01:32:26 +0000 Subject: [issue19404] Simplify per-instance control of help() output In-Reply-To: <1382811069.5.0.656270347235.issue19404@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: As far as I am aware, never. But "instance.__doc__" falls back to the class, hence the != check rather than "is not None". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 02:47:01 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 27 Oct 2013 01:47:01 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1382838421.07.0.211577287672.issue19183@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file32365/38b3ad4287ef.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 02:47:28 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 27 Oct 2013 01:47:28 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1382838448.37.0.116863160886.issue19183@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: http://bugs.python.org/file32384/31ce9488be1c.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 02:52:54 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 27 Oct 2013 01:52:54 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1382838774.1.0.452443584322.issue19183@psf.upfronthosting.co.za> Christian Heimes added the comment: Nick, can you do another review? All tests should pass on common boxes. The latest code hides the struct with the hash function. I have added a configure block that detects platforms that don't support unaligned memory access. It works correctly on the SPARC Solaris 10 box. I'm still looking for a 64bit big endian box and a 32bit big endian box that support unaligned memory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 03:46:46 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 27 Oct 2013 02:46:46 +0000 Subject: [issue19412] Add a test.support decorator for tests that require C level docstrings In-Reply-To: <1382809267.31.0.380635405032.issue19412@psf.upfronthosting.co.za> Message-ID: <1382842006.46.0.892401379767.issue19412@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'll do an initial quick fix that also turns off HAVE_DOCSTRINGS when C level docstrings are missing, before working on a large patch to split it into two separate flags. ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 04:16:31 2013 From: report at bugs.python.org (Eric Snow) Date: Sun, 27 Oct 2013 03:16:31 +0000 Subject: [issue19413] Reload semantics changed unexpectedly in Python 3.3 Message-ID: <1382843791.56.0.901507046365.issue19413@psf.upfronthosting.co.za> New submission from Eric Snow: PJE brought up concerns on python-dev regarding PEP 451 and module reloading. [1] However, the issue isn't with the PEP changing reload semantics (mostly). Those actually changed with the switch to importlib (and a pure Python reload function) in the 3.3 release. Nick sounded positive on fixing it, while Brett did not sound convinced it is worth it. I'm +1 as long as it isn't too complicated to fix. While we hash that out, here's a patch that hopefully demonstrates it isn't too complicated. :) [1] https://mail.python.org/pipermail/python-dev/2013-October/129863.html ---------- components: Library (Lib) files: reload-semantics.diff keywords: patch messages: 201407 nosy: brett.cannon, eric.snow, ncoghlan, pje priority: normal severity: normal stage: patch review status: open title: Reload semantics changed unexpectedly in Python 3.3 type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32385/reload-semantics.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 04:27:54 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 27 Oct 2013 03:27:54 +0000 Subject: [issue19414] OrderedDict.values() behavior for modified instance Message-ID: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> New submission from Nikolaus Rath: The documentation says the following about modifying a dict while iterating through its view: | Iterating views while adding or deleting entries in the dictionary may | raise a RuntimeError or fail to iterate over all entries. (http://docs.python.org/3/library/stdtypes.html#dict-views) The OrderedDict documentation doesn't have anything to say on the subject. In practice, its implementation actually mostly correponds to naive expectations: >>> from collections import OrderedDict >>> d = OrderedDict() >>> for i in range(5): ... d[i] = i ... >>> i = iter(d.values()) >>> next(i) 0 >>> del d[0] >>> next(i) 1 >>> del d[2] >>> next(i) 3 >>> d.move_to_end(1) >>> next(i) 4 >>> next(i) 1 >>> etc. However, there is one case that results in a rather confusing error: >>> a = OrderedDict() >>> a[0] = 0 >>> a[1] = 1 >>> a[2] = 2 >>> i = iter(a.values()) >>> next(i) 0 >>> del a[0] >>> del a[1] >>> next(i) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.3/collections/abc.py", line 495, in __iter__ yield self._mapping[key] KeyError: 1 What happens here is that a[0] is returned from the linked list, but it still contains links to a[1]. When a[1] is deleted, the links of its predecessor and successor are updated, but a[0] still points to a[1]. The OrderedList then hands a non-existing key to the values() implementation in collections.abc. The result is not only mightily confusing, but it is also not covered by the documentation (KeyError isn't a RuntimeError). I would very much like to see this fixed, but I'm not sure if there's a good way to do that. I see the following options: (a) When deleting an element from an OrderedList, update the pointers in the corresponding linked list element to the end of the list. Then removing the currently "active" element during the iteration would automatically end the iteration. For that, we'd just have to add two lines to __delitem__: def __delitem__(self, key, dict_delitem=dict.__delitem__): dict_delitem(self, key) link = self.__map.pop(key) link_prev = link.prev link_next = link.next link_prev.next = link_next link_next.prev = link_prev link.prev = root # new link.next = root # new The new behavior is explicitly covered by the documentation (changing the dict may result in incomplete iteration), but it's a change to what happened before. (b) When iterating through an OrderedDict, check that the next element is actually still in the hash, i.e. change def __iter__(self): root = self.__root curr = root.next while curr is not root: yield curr.key curr = curr.next to def __iter__(self): root = self.__root curr = root.next while curr is not root and curr.key in self: yield curr.key curr = curr.next that would terminate the iteration only in the special case, but incur an extra dict lookup at every iteration. Alternatively, one could try very hard to not stop the iteration: while curr is not root: yield curr.key while curr is not root: curr = curr.next if curr.key in self: break (c) Catch the KeyError in values(), and re-raise the proper exception in class ValuesView: def __iter__(self): for key in self._mapping: try: yield self._mapping[key] except KeyError: raise RuntimeError("underlying Mapping instance modified during iteration") I consider this a bit ugly, because it may mask other problems in a custom Mapping implementation (that may raise a KeyError because of a bug in the Mapping implementation itself). (d) Extend the OrderedDict documentation to explicity document this case. This has the drawback that it would probably be nicer to just have the behavior be consistent and correspond to intuitive expectations. Would any of those fixes be acceptable? Or is there an even better option? ---------- components: Library (Lib) messages: 201408 nosy: Nikratio priority: normal severity: normal status: open title: OrderedDict.values() behavior for modified instance type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 04:31:52 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 27 Oct 2013 03:31:52 +0000 Subject: [issue19414] OrderedDict.values() behavior for modified instance In-Reply-To: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> Message-ID: <1382844712.76.0.460641025462.issue19414@psf.upfronthosting.co.za> Nikolaus Rath added the comment: After thinking about this a bit more, I think this is actually a true bug in OrderedDict(), and only option (a) or be (b) really fix it. Rationale: I would expect that for any OrderedDict d, and any function modify_dict(d), the following assertion holds: for key in d: assert key in d modify_dict(d) ..but this actually breaks for def modify_dict(d): del d[0] del d[1] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 04:33:41 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 27 Oct 2013 03:33:41 +0000 Subject: [issue18861] Problems with recursive automatic exception chaining In-Reply-To: <1377657727.9.0.627993776621.issue18861@psf.upfronthosting.co.za> Message-ID: <1382844821.36.0.729876163207.issue18861@psf.upfronthosting.co.za> Nikolaus Rath added the comment: *ping* No one any comments on this at all? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 04:48:14 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 27 Oct 2013 03:48:14 +0000 Subject: [issue19413] Reload semantics changed unexpectedly in Python 3.3 In-Reply-To: <1382843791.56.0.901507046365.issue19413@psf.upfronthosting.co.za> Message-ID: <1382845694.14.0.117821220845.issue19413@psf.upfronthosting.co.za> Nick Coghlan added the comment: It's actually even simpler than that - we can just go back to ignoring the __loader__ attribute entirely and always searching for a new one, since we want to pick up changes to the import hooks, even for modules with a __loader__ already set (which is almost all of them in 3.3+) I'm not sure it's worth fixing in 3.3 though, as opposed to just formally specifying the semantics in PEP 451 (as noted on python-dev). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 05:19:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 27 Oct 2013 04:19:57 +0000 Subject: [issue19412] Add a test.support decorator for tests that require C level docstrings In-Reply-To: <1382809267.31.0.380635405032.issue19412@psf.upfronthosting.co.za> Message-ID: <3d6m6b42S0z7Lkt@mail.python.org> Roundup Robot added the comment: New changeset 1927b7c01c78 by Nick Coghlan in branch 'default': Mitigate #19412: restore test skips for --without-doc-strings http://hg.python.org/cpython/rev/1927b7c01c78 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 06:23:50 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 27 Oct 2013 05:23:50 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <3d6nXj345Kz7Ln2@mail.python.org> Roundup Robot added the comment: New changeset 0bf4cf62f14c by Ned Deily in branch '3.3': Issue #15663: Force IDLE.app to run the GUI process in 32-bit mode. http://hg.python.org/cpython/rev/0bf4cf62f14c New changeset b6a1a78818fe by Ned Deily in branch 'default': Issue Issue #15663: merge from 3.3 http://hg.python.org/cpython/rev/b6a1a78818fe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 06:31:39 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 27 Oct 2013 05:31:39 +0000 Subject: [issue19415] test_gdb fails when using --without-doc-strings on Fedora 19 Message-ID: <1382851899.25.0.924998884504.issue19415@psf.upfronthosting.co.za> New submission from Nick Coghlan: (after a "make clobber" to ensure there weren't any stale artifacts lying around) $ ./configure --without-doc-strings && make && ./python -m test -v test_gdb ====================================================================== FAIL: test_lists (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of lists ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ncoghlan/devel/py3k/Lib/test/test_gdb.py", line 257, in test_lists self.assertGdbRepr(list(range(5))) File "/home/ncoghlan/devel/py3k/Lib/test/test_gdb.py", line 226, in assertGdbRepr cmds_after_breakpoint) File "/home/ncoghlan/devel/py3k/Lib/test/test_gdb.py", line 194, in get_gdb_repr import_site=import_site) File "/home/ncoghlan/devel/py3k/Lib/test/test_gdb.py", line 177, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception 'utf8' codec can't decode byte 0x80 in position 0: invalid start byte: + [] - ["Python Exception 'utf8' codec can't " - 'decode byte 0x80 in position 0: invalid start byte: ', - "Python Exception 'utf8' codec can't " - 'decode byte 0x80 in position 0: invalid start byte: '] ====================================================================== FAIL: test_selfreferential_list (test.test_gdb.PrettyPrintTests) Ensure that a reference loop involving a list doesn't lead proxyval ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ncoghlan/devel/py3k/Lib/test/test_gdb.py", line 473, in test_selfreferential_list self.get_gdb_repr("a = [3, 4, 5] ; a.append(a) ; id(a)") File "/home/ncoghlan/devel/py3k/Lib/test/test_gdb.py", line 194, in get_gdb_repr import_site=import_site) File "/home/ncoghlan/devel/py3k/Lib/test/test_gdb.py", line 177, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception 'utf8' codec can't decode byte 0xe0 in position 0: invalid continuation byte: + [] - ["Python Exception 'utf8' codec can't " - 'decode byte 0xe0 in position 0: invalid continuation byte: ', - "Python Exception 'utf8' codec can't " - 'decode byte 0xe0 in position 0: invalid continuation byte: '] ====================================================================== FAIL: test_subclassing_list (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of an instance of a list subclass ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ncoghlan/devel/py3k/Lib/test/test_gdb.py", line 376, in test_subclassing_list id(foo)''') File "/home/ncoghlan/devel/py3k/Lib/test/test_gdb.py", line 194, in get_gdb_repr import_site=import_site) File "/home/ncoghlan/devel/py3k/Lib/test/test_gdb.py", line 177, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception 'utf8' codec can't decode byte 0xa0 in position 0: invalid start byte: + [] - ["Python Exception 'utf8' codec can't " - 'decode byte 0xa0 in position 0: invalid start byte: ', - "Python Exception 'utf8' codec can't " - 'decode byte 0xa0 in position 0: invalid start byte: '] ====================================================================== FAIL: test_truncation (test.test_gdb.PrettyPrintTests) Verify that very long output is truncated ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ncoghlan/devel/py3k/Lib/test/test_gdb.py", line 530, in test_truncation gdb_repr, gdb_output = self.get_gdb_repr('id(list(range(1000)))') File "/home/ncoghlan/devel/py3k/Lib/test/test_gdb.py", line 194, in get_gdb_repr import_site=import_site) File "/home/ncoghlan/devel/py3k/Lib/test/test_gdb.py", line 177, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception 'utf8' codec can't decode byte 0x80 in position 0: invalid start byte: + [] - ["Python Exception 'utf8' codec can't " - 'decode byte 0x80 in position 0: invalid start byte: ', - "Python Exception 'utf8' codec can't " - 'decode byte 0x80 in position 0: invalid start byte: '] ====================================================================== FAIL: test_tuples (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of tuples ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ncoghlan/devel/py3k/Lib/test/test_gdb.py", line 307, in test_tuples self.assertGdbRepr(tuple()) File "/home/ncoghlan/devel/py3k/Lib/test/test_gdb.py", line 226, in assertGdbRepr cmds_after_breakpoint) File "/home/ncoghlan/devel/py3k/Lib/test/test_gdb.py", line 194, in get_gdb_repr import_site=import_site) File "/home/ncoghlan/devel/py3k/Lib/test/test_gdb.py", line 177, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception 'utf8' codec can't decode byte 0xb0 in position 0: invalid start byte: + [] - ["Python Exception 'utf8' codec can't " - 'decode byte 0xb0 in position 0: invalid start byte: ', - "Python Exception 'utf8' codec can't " - 'decode byte 0xb0 in position 0: invalid start byte: '] ---------------------------------------------------------------------- Ran 45 tests in 12.146s FAILED (failures=5, skipped=15) test test_gdb failed 1 test failed: test_gdb ---------- components: Build messages: 201414 nosy: ncoghlan priority: normal severity: normal status: open title: test_gdb fails when using --without-doc-strings on Fedora 19 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 06:39:41 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 27 Oct 2013 05:39:41 +0000 Subject: [issue19412] Add a test.support decorator for tests that require C level docstrings In-Reply-To: <1382809267.31.0.380635405032.issue19412@psf.upfronthosting.co.za> Message-ID: <1382852381.02.0.442698385305.issue19412@psf.upfronthosting.co.za> Nick Coghlan added the comment: On my Fedora system, test_gdb still fails when --without-doc-strings is configured, even after updating the decorator to cover both C and Python docstrings as an interim fix. That may be a real bug, though (see issue 19415 for details) Regarding splitting the flags, I'm not sure I agree with RDM's reasoning in issue 17041. As soon as *any* docstrings are missing (whether it's C docstrings or Python docstrings), various parts of the introspection machinery are going to start behaving strangely. By splitting the flags in the test suite, we're increasing the coupling between the tests and the implementation. For example, if something docstring dependent that was previously implemented in Python is moved to a C accelerator module, is it right for the test to have to know about that and switch to moving a different decorator? In my view, "this is a C docstring" and "this is a Python docstring" is an implementation detail that the tests shouldn't have to care about. With the latest update, "test.supports.requires_docstrings" means "I require trustworthy docstrings, and if there's anything wrong with the docstring machinery, don't even try this test" without getting into the specifics of worrying about *why* the docstrings might be unreliable. ---------- assignee: ncoghlan -> nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 06:59:44 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 27 Oct 2013 05:59:44 +0000 Subject: [issue18747] Re-seed OpenSSL's PRNG after fork In-Reply-To: <1376570101.71.0.249202475923.issue18747@psf.upfronthosting.co.za> Message-ID: <1382853584.93.0.660167931467.issue18747@psf.upfronthosting.co.za> Georg Brandl added the comment: #19227 must be solved before anything is backported to the security branches. ---------- dependencies: +test_multiprocessing_xxx hangs under Gentoo buildbots _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 07:01:12 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 27 Oct 2013 06:01:12 +0000 Subject: [issue18861] Problems with recursive automatic exception chaining In-Reply-To: <1377657727.9.0.627993776621.issue18861@psf.upfronthosting.co.za> Message-ID: <1382853672.18.0.266510551232.issue18861@psf.upfronthosting.co.za> Benjamin Peterson added the comment: raise ... from None explictly silences the printing of exception context, so I don't see the problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 07:09:34 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 27 Oct 2013 06:09:34 +0000 Subject: [issue19405] Fix outdated comments in the _sre module In-Reply-To: <1382776819.97.0.0101067680791.issue19405@psf.upfronthosting.co.za> Message-ID: <3d6pYV13Gqz7Lnm@mail.python.org> Roundup Robot added the comment: New changeset b7f71babc622 by Serhiy Storchaka in branch '2.7': Issue #19405: Fixed outdated comments in the _sre module. http://hg.python.org/cpython/rev/b7f71babc622 New changeset 220e3e40d176 by Serhiy Storchaka in branch '3.3': Issue #19405: Fixed outdated comments in the _sre module. http://hg.python.org/cpython/rev/220e3e40d176 New changeset d6f427f94d85 by Serhiy Storchaka in branch 'default': Issue #19405: Fixed outdated comments in the _sre module. http://hg.python.org/cpython/rev/d6f427f94d85 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 07:22:02 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 27 Oct 2013 06:22:02 +0000 Subject: [issue19329] Faster compiling of charset regexpes In-Reply-To: <1382356878.81.0.973141365685.issue19329@psf.upfronthosting.co.za> Message-ID: <3d6pqT13h2z7Ljx@mail.python.org> Roundup Robot added the comment: New changeset d5498d9d9bb0 by Serhiy Storchaka in branch 'default': Issue #19329: Optimized compiling charsets in regular expressions. http://hg.python.org/cpython/rev/d5498d9d9bb0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 07:24:34 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 06:24:34 +0000 Subject: [issue19329] Faster compiling of charset regexpes In-Reply-To: <1382356878.81.0.973141365685.issue19329@psf.upfronthosting.co.za> Message-ID: <1382855074.59.0.860850602218.issue19329@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Antoine for your review. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 07:25:08 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 06:25:08 +0000 Subject: [issue19405] Fix outdated comments in the _sre module In-Reply-To: <1382776819.97.0.0101067680791.issue19405@psf.upfronthosting.co.za> Message-ID: <1382855108.33.0.428649775814.issue19405@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: docs at python -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 07:26:28 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 06:26:28 +0000 Subject: [issue19412] Add a test.support decorator for tests that require C level docstrings In-Reply-To: <1382809267.31.0.380635405032.issue19412@psf.upfronthosting.co.za> Message-ID: <1382855188.93.0.867048010472.issue19412@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I suppose that some tests (e.g. test_genexps.py) still fail with -O2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 07:38:42 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 27 Oct 2013 06:38:42 +0000 Subject: [issue17997] ssl.match_hostname(): sub string wildcard should not match IDNA prefix In-Reply-To: <1368799493.86.0.504478450601.issue17997@psf.upfronthosting.co.za> Message-ID: <3d6qC55T1Kz7LmV@mail.python.org> Roundup Robot added the comment: New changeset 10d0edadbcdd by Georg Brandl in branch '3.3': Issue #17997: Change behavior of ``ssl.match_hostname()`` to follow RFC 6125, http://hg.python.org/cpython/rev/10d0edadbcdd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 07:38:45 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 27 Oct 2013 06:38:45 +0000 Subject: [issue16041] poplib: unlimited readline() from connection In-Reply-To: <1348569563.2.0.69634867698.issue16041@psf.upfronthosting.co.za> Message-ID: <3d6qC85cxpz7LnZ@mail.python.org> Roundup Robot added the comment: New changeset 68029048c9c6 by Georg Brandl in branch '3.3': Issue #16041: CVE-2013-1752: poplib: Limit maximum line lengths to 2048 to http://hg.python.org/cpython/rev/68029048c9c6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 07:39:04 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 27 Oct 2013 06:39:04 +0000 Subject: [issue16037] httplib: header parsing is unlimited In-Reply-To: <1348568722.91.0.654032066819.issue16037@psf.upfronthosting.co.za> Message-ID: <3d6qC63ltyz7LmV@mail.python.org> Roundup Robot added the comment: New changeset e445d02e5306 by Georg Brandl in branch '3.3': Issue #16037: HTTPMessage.readheaders() raises an HTTPException when more than http://hg.python.org/cpython/rev/e445d02e5306 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 07:39:05 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 27 Oct 2013 06:39:05 +0000 Subject: [issue16039] imaplib: unlimited readline() from connection In-Reply-To: <1348569370.53.0.568109495954.issue16039@psf.upfronthosting.co.za> Message-ID: <3d6qC80JX1z7LnX@mail.python.org> Roundup Robot added the comment: New changeset 4b0364fc5711 by Georg Brandl in branch '3.3': Issue #16039: CVE-2013-1752: Change use of readline in imaplib module to limit http://hg.python.org/cpython/rev/4b0364fc5711 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 07:39:04 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 27 Oct 2013 06:39:04 +0000 Subject: [issue16040] nntplib: unlimited readline() from connection In-Reply-To: <1348569525.38.0.219080768405.issue16040@psf.upfronthosting.co.za> Message-ID: <3d6qC72114z7Ln4@mail.python.org> Roundup Robot added the comment: New changeset fc88bd80d925 by Georg Brandl in branch '3.3': Issue #16040: CVE-2013-1752: nntplib: Limit maximum line lengths to 2048 to http://hg.python.org/cpython/rev/fc88bd80d925 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 07:41:09 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 27 Oct 2013 06:41:09 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1382856069.6.0.935125613512.issue19227@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 07:42:35 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 27 Oct 2013 06:42:35 +0000 Subject: [issue18747] Re-seed OpenSSL's PRNG after fork In-Reply-To: <1376570101.71.0.249202475923.issue18747@psf.upfronthosting.co.za> Message-ID: <1382856155.4.0.874930835729.issue18747@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 07:45:50 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 27 Oct 2013 06:45:50 +0000 Subject: [issue16040] nntplib: unlimited readline() from connection In-Reply-To: <1348569525.38.0.219080768405.issue16040@psf.upfronthosting.co.za> Message-ID: <1382856350.94.0.643760744105.issue16040@psf.upfronthosting.co.za> Georg Brandl added the comment: Also merged to default. ---------- versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 07:45:40 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 27 Oct 2013 06:45:40 +0000 Subject: [issue16039] imaplib: unlimited readline() from connection In-Reply-To: <1348569370.53.0.568109495954.issue16039@psf.upfronthosting.co.za> Message-ID: <1382856340.09.0.269503837463.issue16039@psf.upfronthosting.co.za> Georg Brandl added the comment: Also merged to default. ---------- versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 07:45:59 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 27 Oct 2013 06:45:59 +0000 Subject: [issue16037] httplib: header parsing is unlimited In-Reply-To: <1348568722.91.0.654032066819.issue16037@psf.upfronthosting.co.za> Message-ID: <1382856359.97.0.0127360514265.issue16037@psf.upfronthosting.co.za> Georg Brandl added the comment: Also merged to default. ---------- versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 07:46:08 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 27 Oct 2013 06:46:08 +0000 Subject: [issue16041] poplib: unlimited readline() from connection In-Reply-To: <1348569563.2.0.69634867698.issue16041@psf.upfronthosting.co.za> Message-ID: <1382856368.94.0.985711063861.issue16041@psf.upfronthosting.co.za> Georg Brandl added the comment: Also merged to default. ---------- versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 07:46:18 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 27 Oct 2013 06:46:18 +0000 Subject: [issue17997] ssl.match_hostname(): sub string wildcard should not match IDNA prefix In-Reply-To: <1368799493.86.0.504478450601.issue17997@psf.upfronthosting.co.za> Message-ID: <1382856378.11.0.282619491657.issue17997@psf.upfronthosting.co.za> Georg Brandl added the comment: Also merged to default. ---------- versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 07:55:51 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 27 Oct 2013 06:55:51 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1382856951.18.0.612193777892.issue19227@psf.upfronthosting.co.za> Georg Brandl added the comment: OK, I'm going to apply atfork_prepare.patch for 3.3.3rc1. If there is any indication of a continuing problem, we'll revert the whole re-seeding code for the final. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 07:57:08 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 27 Oct 2013 06:57:08 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <3d6qby35WXz7Ln2@mail.python.org> Roundup Robot added the comment: New changeset 021ca321b26e by Georg Brandl in branch '3.3': Issue #19227: Try to fix deadlocks caused by re-seeding then OpenSSL http://hg.python.org/cpython/rev/021ca321b26e New changeset d3a13a7be9e9 by Georg Brandl in branch 'default': #19227: merge with 3.3 http://hg.python.org/cpython/rev/d3a13a7be9e9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 08:20:15 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 27 Oct 2013 07:20:15 +0000 Subject: [issue18964] test_tcl fails when _tkinter linked with Tcl 8.4 In-Reply-To: <1378590331.21.0.150230107781.issue18964@psf.upfronthosting.co.za> Message-ID: <1382858415.87.0.0577326033671.issue18964@psf.upfronthosting.co.za> Georg Brandl added the comment: For some reason, this still fails on the OpenIndiana builder: http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%203.3/builds/1104/steps/test/logs/stdio ---------- nosy: +georg.brandl status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 08:35:31 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 27 Oct 2013 07:35:31 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1382859331.79.0.651137346515.issue19406@psf.upfronthosting.co.za> Nick Coghlan added the comment: Draft docs patch attached. This splits out a new "Software Packaging and Distribution" section in the main docs index, with distutils, ensurepip and venv as the specific entries. There's a couple of questions I need answered regarding the behaviour of pip in order to document --user properly: * how does pip install react when --user is passed while a virtual environment is active? * how does pip install react when both --root and --user are passed? ---------- Added file: http://bugs.python.org/file32386/pep453_ensurepip_docs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 10:50:15 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 27 Oct 2013 09:50:15 +0000 Subject: [issue19390] clinic.py: unhandled syntax error In-Reply-To: <1382716311.99.0.339644055005.issue19390@psf.upfronthosting.co.za> Message-ID: <3d6vRj1TsMz7Ln4@mail.python.org> Roundup Robot added the comment: New changeset b496ed363c2d by Larry Hastings in branch 'default': Issue #19390: Argument Clinic no longer accepts malformed Python and C ids. http://hg.python.org/cpython/rev/b496ed363c2d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 09:33:59 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 27 Oct 2013 08:33:59 +0000 Subject: [issue19414] OrderedDict.values() behavior for modified instance In-Reply-To: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> Message-ID: <1382862839.59.0.793456872196.issue19414@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 10:54:20 2013 From: report at bugs.python.org (Larry Hastings) Date: Sun, 27 Oct 2013 09:54:20 +0000 Subject: [issue19390] clinic.py: unhandled syntax error In-Reply-To: <1382716311.99.0.339644055005.issue19390@psf.upfronthosting.co.za> Message-ID: <1382867660.82.0.90358033315.issue19390@psf.upfronthosting.co.za> Larry Hastings added the comment: Fixed. And, yeah, Clinic actually uses ast.parse where it can. (FWIW, most of the parser was re-written by Dmitry Jemerov during the PyCon US 2013 sprints, though I wound up re-re-writing most of what he did.) ---------- assignee: -> larry resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 09:57:12 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 27 Oct 2013 08:57:12 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <3d6qby35WXz7Ln2@mail.python.org> Message-ID: Charles-Fran?ois Natali added the comment: Note that no matter where the atfork-hook is executed (prepare, parent, child), it will still be deadlock-prone in case of double-fork, since the hook will effectively be called after the first fork (and before the second one). And double-fork is common, e.g. when creating daemon processes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 09:58:45 2013 From: report at bugs.python.org (John Jefferies) Date: Sun, 27 Oct 2013 08:58:45 +0000 Subject: [issue18306] os.stat gives exception for Windows junctions in v3.3 In-Reply-To: <1382603740.91.0.582008839282.issue18306@psf.upfronthosting.co.za> Message-ID: <526CD679.5060808@ntlworld.com> John Jefferies added the comment: Hello Tim, The fact that it works on 64-bit Python obviously reduces the priority. I will make a point of choosing the 64-bit version in the future. FWIW. I'm dubious about the problem being solely attributable to WOWs handling of junctions because my Python 3.2 (that doesn't have the problem) is also 32-bit. There must be something else, even if that something isn't going to be fixed. Thankyou for spending time on this. John On 24/10/2013 09:35, Tim Golden wrote: > Tim Golden added the comment: > > Just revisited this to see if I could close off. One thing occurred to me which should have come up before: this situation will be aggravated by WOW64 file redirection. > > If I run 64-bit Python on 64-bit Windows I can successfully stat links in %windir%\system32 under 3.4 and 3.3. If I run 32-bit Python on 64-bit Windows, I get the error you describe because Windows will silently redirect the 32-bit Python process towards %windir%\SysWow64 where the junction (or, possibly, its target) does not exist. > > Given that I'm able to stat %windir%\system32 junctions on both versions, I'm going to close this as works-for-me. I think there's a case for a bigger-picture look at the resolution of reparse points across the stdlib but that would have to be its own issue. > > ---------- > assignee: -> tim.golden > resolution: -> works for me > stage: test needed -> committed/rejected > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 11:26:51 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 27 Oct 2013 10:26:51 +0000 Subject: [issue18964] test_tcl fails when _tkinter linked with Tcl 8.4 In-Reply-To: <1378590331.21.0.150230107781.issue18964@psf.upfronthosting.co.za> Message-ID: <1382869611.64.0.33914246286.issue18964@psf.upfronthosting.co.za> Ned Deily added the comment: With 3.3.3rc1 and Tcl/Tk 8.4, I'm now seeing on OS X 10.5 with ActiveTcl 8.4.20: ====================================================================== ERROR: test_merge (test.test_tcl.TclTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/test/test_tcl.py", line 280, in test_merge ((call('dict', 'create', 12, '\u20ac', b'\xe2\x82\xac', (3.4,)),), _tkinter.TclError: invalid command name "dict" ---------------------------------------------------------------------- ---------------------------------------------------------------------- Ran 25 tests in 8.921s FAILED (errors=1, skipped=2) test test_tcl failed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 11:34:39 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 27 Oct 2013 10:34:39 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1382870079.51.0.720024966702.issue19183@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I'm still looking for a 64bit big endian box Have you tried the PPC64 PowerLinux box? It's in the stable buildbots for a reason :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 11:39:16 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 27 Oct 2013 10:39:16 +0000 Subject: [issue18964] test_tcl fails when _tkinter linked with Tcl 8.4 In-Reply-To: <1378590331.21.0.150230107781.issue18964@psf.upfronthosting.co.za> Message-ID: <3d6wXg644Hz7LmR@mail.python.org> Roundup Robot added the comment: New changeset 5a8aa1102f82 by Serhiy Storchaka in branch '3.3': Fixed merge test for Tcl/Tk <8.5 (issue #18964). http://hg.python.org/cpython/rev/5a8aa1102f82 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 11:39:40 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 27 Oct 2013 10:39:40 +0000 Subject: [issue18964] test_tcl fails when _tkinter linked with Tcl 8.4 In-Reply-To: <1378590331.21.0.150230107781.issue18964@psf.upfronthosting.co.za> Message-ID: <1382870380.16.0.444520450713.issue18964@psf.upfronthosting.co.za> Georg Brandl added the comment: Ahh, the newly committed test for merge needs the same guard as the other 'dict' calls! I'll fix that in the release clone for 3.3.3 final. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 11:40:33 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 10:40:33 +0000 Subject: [issue18964] test_tcl fails when _tkinter linked with Tcl 8.4 In-Reply-To: <1378590331.21.0.150230107781.issue18964@psf.upfronthosting.co.za> Message-ID: <1382870433.0.0.25799022488.issue18964@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I hope this will help. Thank you Georg and Ned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 11:46:32 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 10:46:32 +0000 Subject: [issue16809] Tk 8.6.0 introduces TypeError. (Tk 8.5.13 works) In-Reply-To: <1356763107.47.0.647000150457.issue16809@psf.upfronthosting.co.za> Message-ID: <1382870792.87.0.0578418801297.issue16809@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since there are no other reports about 8.6 I close this issue. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 12:29:46 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 11:29:46 +0000 Subject: [issue10734] test_ttk test_heading_callback fails with newer Tk 8.5 In-Reply-To: <1292706922.45.0.208964037247.issue10734@psf.upfronthosting.co.za> Message-ID: <1382873386.41.0.93692678552.issue10734@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think this patch fixes this issue. ---------- keywords: +patch nosy: +serhiy.storchaka stage: -> patch review versions: +Python 3.4 -Python 3.2 Added file: http://bugs.python.org/file32387/test_heading_callback.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 12:36:45 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 11:36:45 +0000 Subject: [issue17933] format str bug in urllib request.py In-Reply-To: <1367974224.67.0.224732033427.issue17933@psf.upfronthosting.co.za> Message-ID: <1382873805.51.0.360563379671.issue17933@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Giampaolo's suggestion LGTM. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 12:38:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 11:38:14 +0000 Subject: [issue17933] format str bug in urllib request.py In-Reply-To: <1367974224.67.0.224732033427.issue17933@psf.upfronthosting.co.za> Message-ID: <1382873894.54.0.935828919951.issue17933@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 12:46:43 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 27 Oct 2013 11:46:43 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1382874403.73.0.661045564357.issue19183@psf.upfronthosting.co.za> Christian Heimes added the comment: I can no longer find the configuration for custom path. It's still documented but there is no field for "repo path". http://buildbot.python.org/all/buildslaves/edelsohn-powerlinux-ppc64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 12:50:05 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 27 Oct 2013 11:50:05 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1382874403.73.0.661045564357.issue19183@psf.upfronthosting.co.za> Message-ID: <1382874573.2282.0.camel@fsol> Antoine Pitrou added the comment: > I can no longer find the configuration for custom path. It's still documented but there is no field for "repo path". http://buildbot.python.org/all/builders/PPC64%20PowerLinux%20custom (usually, just replace "3.x" with "custom" in the URL) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 12:59:35 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 11:59:35 +0000 Subject: [issue8372] socket: Buffer overrun while reading unterminated AF_UNIX addresses In-Reply-To: <1271010785.16.0.286802399648.issue8372@psf.upfronthosting.co.za> Message-ID: <1382875175.08.0.812305593436.issue8372@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 13:14:34 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 12:14:34 +0000 Subject: [issue3367] Uninitialized value read in parsetok.c In-Reply-To: <1216153264.95.0.467111480464.issue3367@psf.upfronthosting.co.za> Message-ID: <1382876074.38.0.633989247856.issue3367@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I see a crash with valgring even without hitting Ctrl-D. $ valgrind --db-attach=yes --suppressions=Misc/valgrind-python.supp ./python ==26172== Memcheck, a memory error detector ==26172== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. ==26172== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info ==26172== Command: ./python ==26172== ==26172== Conditional jump or move depends on uninitialised value(s) ==26172== at 0x414E578: __wcslen_sse2 (wcslen-sse2.S:95) ==26172== by 0x807788D: calculate_path (getpath.c:647) ==26172== by 0x807803B: Py_GetProgramFullPath (getpath.c:875) ==26172== by 0x8070C5E: _PySys_Init (sysmodule.c:1628) ==26172== by 0x8060680: _Py_InitializeEx_Private (pythonrun.c:400) ==26172== by 0x8060939: Py_InitializeEx (pythonrun.c:467) ==26172== by 0x806094D: Py_Initialize (pythonrun.c:473) ==26172== by 0x807956A: Py_Main (main.c:683) ==26172== by 0x805CFE3: main (python.c:69) ==26172== ==26172== ==26172== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 13:17:03 2013 From: report at bugs.python.org (alon horev) Date: Sun, 27 Oct 2013 12:17:03 +0000 Subject: [issue4331] Add functools.partialmethod In-Reply-To: <1226817180.09.0.841012218041.issue4331@psf.upfronthosting.co.za> Message-ID: <1382876223.6.0.449322219197.issue4331@psf.upfronthosting.co.za> alon horev added the comment: I think the following test demonstrates the API we're looking for. 1. Am I missing any functionality? 2. How does partialmethod relate to @absolutemethod? from functools import partial class partialmethod(object): def __init__(self, func, *args, **keywords): # func could be a descriptor like classmethod which isn't callable, # so we can't inherit from partial (it verifies func is callable) if isinstance(func, partialmethod): # flattening is mandatory in order to place cls/self before all other arguments # it's also more efficient since only one function will be called self.func = func.func self.args = func.args + args self.keywords = {} self.keywords.update(func.keywords) self.keywords.update(keywords) else: self.func = func self.args = args self.keywords = keywords def _make_unbound_method(self): def _method(*args, **keywords): keywords.update(self.keywords) cls_or_self, *rest = args call_args = (cls_or_self,) + self.args + tuple(rest) return self.func(*call_args, **keywords) return _method def __get__(self, obj, cls): get = getattr(self.func, "__get__", None) if get is None: if obj is None: return self._make_unbound_method() return partial(self._make_unbound_method(), obj) # returns a bound method else: callable = get(obj, cls) if callable is self.func: return self._make_unbound_method() return partial(callable, *self.args, **self.keywords) class A(object): def add(self, x, y): return self, x + y add10 = partialmethod(add, 10) add10class = partialmethod(classmethod(add), 10) add10static = partialmethod(staticmethod(add), 'self', 10) return15 = partialmethod(add10, 5) # nested partialmethod add2partial = partial(add, x=2) return12 = partialmethod(add2partial, y=10) # partialmethod over partial def test(): cls = A instance = cls() assert instance.add10class(5) == (cls, 15) assert cls.add10class(5) == (cls, 15) assert instance.add10static(5) == ('self', 15) assert cls.add10static(5) == ('self', 15) assert instance.add10(5) == (instance, 15) assert cls.add10(instance, 5) == (instance, 15) assert instance.return15() == (instance, 15) assert cls.return15(instance) == (instance, 15) assert instance.return12() == (instance, 12) assert cls.return12(instance) == (instance, 12) test() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 13:25:12 2013 From: report at bugs.python.org (Stefan Krah) Date: Sun, 27 Oct 2013 12:25:12 +0000 Subject: [issue10241] gc fixes for module m_copy attribute In-Reply-To: <1382816667.75.0.894156826583.issue10241@psf.upfronthosting.co.za> Message-ID: <20131027122513.GA19542@sleipnir.bytereef.org> Stefan Krah added the comment: One example of a leaked object is "hexversion", from sysmodule.c:1615. I tried adding it to sys_deletes[] in import.c, but it did not help. See valgrind.out for other leaks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 13:32:22 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 27 Oct 2013 12:32:22 +0000 Subject: [issue4331] Add functools.partialmethod In-Reply-To: <1382876223.6.0.449322219197.issue4331@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: On 27 Oct 2013 22:17, "alon horev" wrote: > > > alon horev added the comment: > > I think the following test demonstrates the API we're looking for. > 1. Am I missing any functionality? The keyword arg handling is backwards for unbound methods (the call time kwds should override the preset ones). Otherwise, looks good to me. > 2. How does partialmethod relate to @absolutemethod? Do you mean @abstractmethod? We need a __isabstractmethod__ property implementation that delegates the question to the underlying descriptor. See http://docs.python.org/dev/library/abc#abc.abstractmethod for details. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 13:49:10 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 12:49:10 +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: <1382878150.54.0.542686897185.issue6083@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Accepting an arbitrary sequence when "(...)" is used in the format string was introduced in changeset 0ef1071cb7fe. ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 14:10:10 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 13:10:10 +0000 Subject: [issue11508] Virtual Interfaces cause uuid._find_mac to raise a ValueError under Linux In-Reply-To: <1300134691.76.0.567990674923.issue11508@psf.upfronthosting.co.za> Message-ID: <1382879410.23.0.240244557325.issue11508@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka stage: -> patch review type: crash -> behavior versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 14:13:38 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 13:13:38 +0000 Subject: [issue11508] Virtual Interfaces cause uuid._find_mac to raise a ValueError under Linux In-Reply-To: <1300134691.76.0.567990674923.issue11508@psf.upfronthosting.co.za> Message-ID: <1382879618.36.0.831012619233.issue11508@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Kent, can you please submit a contributor form? http://python.org/psf/contrib/contrib-form/ http://python.org/psf/contrib/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 14:18:25 2013 From: report at bugs.python.org (Roy Smith) Date: Sun, 27 Oct 2013 13:18:25 +0000 Subject: [issue19416] NNTP page has incorrect links Message-ID: <1382879905.74.0.020204746466.issue19416@psf.upfronthosting.co.za> New submission from Roy Smith: http://docs.python.org/2/library/nntplib.html contains intra-page references such as: NNTP.next() Send a NEXT command. Return as for stat(). The problem is that the link for "stat" points to the stat module (i.e. http://docs.python.org/2/library/stat.html#module-stat). It should be pointing to the NNTP.stat() entry on this page. The problem exists for : NNTP.next() NNTP.last() NNTP.head(id) NNTP.body(id[, file]) NNTP.article(id) and maybe some others I missed. ---------- assignee: docs at python components: Documentation messages: 201456 nosy: docs at python, roysmith priority: normal severity: normal status: open title: NNTP page has incorrect links versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 14:22:37 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 13:22:37 +0000 Subject: [issue13153] IDLE crashes when pasting non-BMP unicode char on Py3 In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1382880157.86.0.374766376477.issue13153@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Martin, could you please review this patch? This bug affects not only IDLE, but any Tkinter application which uses callbacks with arguments. Encoding/decoding error during converting arguments from Tcl to Python causes immediate finishing Tcl main loop (and normally closing an application). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 14:23:11 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 13:23:11 +0000 Subject: [issue13153] IDLE crashes when pasting non-BMP unicode char on Py3 In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1382880191.72.0.797966927808.issue13153@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 14:33:17 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 27 Oct 2013 13:33:17 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1382880797.64.0.205162955721.issue19183@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: http://bugs.python.org/file32388/257597d20fa8.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 14:43:41 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 13:43:41 +0000 Subject: [issue16904] http.client.HTTPConnection.send double send data In-Reply-To: <1357727307.69.0.69749124261.issue16904@psf.upfronthosting.co.za> Message-ID: <1382881421.1.0.568387152204.issue16904@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Seems this bug was fixed in issue16658. ---------- nosy: +serhiy.storchaka resolution: remind -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Missing "return" in HTTPConnection.send() type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 14:46:03 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 27 Oct 2013 13:46:03 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1382881563.13.0.158939169832.issue19183@psf.upfronthosting.co.za> Christian Heimes added the comment: Nick, please review the latest patch. I have addressed Antoine's review in 257597d20fa8.diff. I'll update the PEP as soon as you are happy with the patch. ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 14:47:47 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 27 Oct 2013 13:47:47 +0000 Subject: [issue18861] Problems with recursive automatic exception chaining In-Reply-To: <1377657727.9.0.627993776621.issue18861@psf.upfronthosting.co.za> Message-ID: <1382881667.34.0.91100447399.issue18861@psf.upfronthosting.co.za> Nick Coghlan added the comment: Nothing is lost either way, it just isn't displayed by default. While I can see the appeal of treating an "outer" context differently from an "inner" one, I don't see any way for the exception context suppression machinery to tell the difference. The traceback *display* machinery might be able to figure it out by looking at the traceback details, but such a search could be quite expensive. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 15:28:10 2013 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 27 Oct 2013 14:28:10 +0000 Subject: [issue19362] Documentation for len() fails to mention that it works on sets In-Reply-To: <1382530928.74.0.685857253341.issue19362@psf.upfronthosting.co.za> Message-ID: <1382884090.92.0.138824043665.issue19362@psf.upfronthosting.co.za> Ramchandra Apte added the comment: I also prefer collection. ---------- nosy: +Ramchandra Apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 15:51:46 2013 From: report at bugs.python.org (Donald Stufft) Date: Sun, 27 Oct 2013 14:51:46 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1382885506.16.0.183269419116.issue19406@psf.upfronthosting.co.za> Donald Stufft added the comment: You cannot use --user in a virtual environment (well a venv, no idea about a pyvenv - but it should get a similar error message IMO if it doesn't). If you use --root and --user together it will install to the --root location, using the user layout, so instead of installing to /home/dstufft/.local/lib/python3.4/site-packages/ it will install to /value/of/root/home/dstufft/.local/lib/python3.4/site-packages/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 16:26:24 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 15:26:24 +0000 Subject: [issue18684] Pointers point out of array bound in _sre.c In-Reply-To: <1375962984.07.0.918202360038.issue18684@psf.upfronthosting.co.za> Message-ID: <1382887584.76.0.619597406923.issue18684@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated to tip (the code was changed since issue17998). It no more uses division. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 16:32:43 2013 From: report at bugs.python.org (Stefan Krah) Date: Sun, 27 Oct 2013 15:32:43 +0000 Subject: [issue10241] gc fixes for module m_copy attribute In-Reply-To: <1288410530.83.0.095379048444.issue10241@psf.upfronthosting.co.za> Message-ID: <1382887963.53.0.622895483694.issue10241@psf.upfronthosting.co.za> Stefan Krah added the comment: IMO we have two references to many newly created values in _PySys_Init(): SET_SYS_FROM_STRING("hexversion", PyLong_FromLong(PY_VERSION_HEX)); One from PyLong_FromLong() and the other from PyDict_SetItemString() in the macro. So it may well be that the fix for this issue just exposes the fact that the last reference is no longer reachable if m_copy is cleared. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 16:37:55 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 15:37:55 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1382888275.16.0.818410451439.issue19183@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I suggest move to Include/pyhash.h and Python/pyhash.c only _Py_HashBytes() and string hash algorithm related constants, and don't touch PyObject_Hash(), _Py_HashDouble(), etc. So if anybody want change string hashing algorithm, it need only replace these two minimal files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 16:46:47 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 27 Oct 2013 15:46:47 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1382888807.27.0.548931725783.issue19183@psf.upfronthosting.co.za> Christian Heimes added the comment: PyObject_Hash() and PyObject_HashNotImplemented() should not have been moved to pyhash.h. But the other internal helper methods should be kept together. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 16:53:49 2013 From: report at bugs.python.org (Stefan Krah) Date: Sun, 27 Oct 2013 15:53:49 +0000 Subject: [issue18520] Fixes bugs found by pyfailmalloc during Python initialization In-Reply-To: <1374405764.28.0.138932329528.issue18520@psf.upfronthosting.co.za> Message-ID: <1382889229.78.0.361099576429.issue18520@psf.upfronthosting.co.za> Stefan Krah added the comment: Victor, could you look at the end of #10241? Starting from 31796b188bec, many values in _PySys_Init() have 2 references. Why is that required? ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 16:55:36 2013 From: report at bugs.python.org (Stefan Krah) Date: Sun, 27 Oct 2013 15:55:36 +0000 Subject: [issue10241] gc fixes for module m_copy attribute In-Reply-To: <1288410530.83.0.095379048444.issue10241@psf.upfronthosting.co.za> Message-ID: <1382889336.11.0.320626970403.issue10241@psf.upfronthosting.co.za> Stefan Krah added the comment: See also 31796b188bec. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 16:57:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 27 Oct 2013 15:57:28 +0000 Subject: [issue10241] gc fixes for module m_copy attribute In-Reply-To: <1288410530.83.0.095379048444.issue10241@psf.upfronthosting.co.za> Message-ID: <1382889448.11.0.334907335203.issue10241@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Does pulling the Py_DECREF before the "if" fix the leaks? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 17:00:38 2013 From: report at bugs.python.org (Stefan Krah) Date: Sun, 27 Oct 2013 16:00:38 +0000 Subject: [issue10241] gc fixes for module m_copy attribute In-Reply-To: <1382889448.11.0.334907335203.issue10241@psf.upfronthosting.co.za> Message-ID: <20131027160039.GA16073@sleipnir.bytereef.org> Stefan Krah added the comment: Antoine Pitrou wrote: > Does pulling the Py_DECREF before the "if" fix the leaks? Yes, but I get an additional failure in test_capi. Apparently not all values require the DECREF. Got to look on a case by case basis. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 17:16:14 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 27 Oct 2013 16:16:14 +0000 Subject: [issue18520] Fixes bugs found by pyfailmalloc during Python initialization In-Reply-To: <1374405764.28.0.138932329528.issue18520@psf.upfronthosting.co.za> Message-ID: <3d74151kVFz7Ljp@mail.python.org> Roundup Robot added the comment: New changeset 5eb00460e6e8 by Victor Stinner in branch 'default': Issue #18520: fix reference leak in _PySys_Init() http://hg.python.org/cpython/rev/5eb00460e6e8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 17:17:03 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 27 Oct 2013 16:17:03 +0000 Subject: [issue18520] Fixes bugs found by pyfailmalloc during Python initialization In-Reply-To: <1374405764.28.0.138932329528.issue18520@psf.upfronthosting.co.za> Message-ID: <1382890623.92.0.36251986059.issue18520@psf.upfronthosting.co.za> STINNER Victor added the comment: > Victor, could you look at the end of #10241? Starting from 31796b188bec, > many values in _PySys_Init() have 2 references. Why is that required? It was a mistake, it should now be fixed. Nice catch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 17:24:27 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 27 Oct 2013 16:24:27 +0000 Subject: [issue15634] Add serialized decorator to the threading module In-Reply-To: <1344845068.87.0.536585589553.issue15634@psf.upfronthosting.co.za> Message-ID: <1382891067.95.0.531154847471.issue15634@psf.upfronthosting.co.za> R. David Murray added the comment: Are you saying that because you've lost interest, or because you think we have? Sometimes things get lost here for a while, but picked up again later... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 17:28:48 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 27 Oct 2013 16:28:48 +0000 Subject: [issue19412] Add a test.support decorator for tests that require C level docstrings In-Reply-To: <1382809267.31.0.380635405032.issue19412@psf.upfronthosting.co.za> Message-ID: <1382891328.58.0.692905686785.issue19412@psf.upfronthosting.co.za> R. David Murray added the comment: Nick: I agree with your reasoning. I don't know why I said what I did on the other issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 17:35:20 2013 From: report at bugs.python.org (Stefan Krah) Date: Sun, 27 Oct 2013 16:35:20 +0000 Subject: [issue18520] Fixes bugs found by pyfailmalloc during Python initialization In-Reply-To: <1382890623.92.0.36251986059.issue18520@psf.upfronthosting.co.za> Message-ID: <20131027163521.GA4969@sleipnir.bytereef.org> Stefan Krah added the comment: Ah, thanks. I was wondering if there was some obscure reason that escaped me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 17:36:30 2013 From: report at bugs.python.org (Stefan Krah) Date: Sun, 27 Oct 2013 16:36:30 +0000 Subject: [issue10241] gc fixes for module m_copy attribute In-Reply-To: <20131027160039.GA16073@sleipnir.bytereef.org> Message-ID: <20131027163631.GA5002@sleipnir.bytereef.org> Stefan Krah added the comment: Valgrind is happy after the recent 5eb00460e6e8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 17:38:54 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 27 Oct 2013 16:38:54 +0000 Subject: [issue19411] binascii.hexlify docs say it returns a string (it returns bytes) In-Reply-To: <1382807910.82.0.748740374727.issue19411@psf.upfronthosting.co.za> Message-ID: <1382891934.88.0.72649942833.issue19411@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 17:40:58 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 27 Oct 2013 16:40:58 +0000 Subject: [issue19415] test_gdb fails when using --without-doc-strings on Fedora 19 In-Reply-To: <1382851899.25.0.924998884504.issue19415@psf.upfronthosting.co.za> Message-ID: <1382892058.06.0.853026507319.issue19415@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 17:46:36 2013 From: report at bugs.python.org (Stefan Krah) Date: Sun, 27 Oct 2013 16:46:36 +0000 Subject: [issue3367] Uninitialized value read in parsetok.c In-Reply-To: <1216153264.95.0.467111480464.issue3367@psf.upfronthosting.co.za> Message-ID: <1382892396.14.0.119353066275.issue3367@psf.upfronthosting.co.za> Stefan Krah added the comment: Serhiy, probably a false positive: https://bugs.kde.org/show_bug.cgi?id=298281 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 17:46:55 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 16:46:55 +0000 Subject: [issue17668] re.split loses characters matching ungrouped parts of a pattern In-Reply-To: <1365445138.49.0.018016443065.issue17668@psf.upfronthosting.co.za> Message-ID: <1382892415.61.0.271538902062.issue17668@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 18:18:47 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 17:18:47 +0000 Subject: [issue13592] repr(regex) doesn't include actual regex In-Reply-To: <1323772944.14.0.269599775604.issue13592@psf.upfronthosting.co.za> Message-ID: <1382894327.15.0.666195892305.issue13592@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 18:27:10 2013 From: report at bugs.python.org (Tim Golden) Date: Sun, 27 Oct 2013 17:27:10 +0000 Subject: [issue18306] os.stat gives exception for Windows junctions in v3.3 In-Reply-To: <526CD679.5060808@ntlworld.com> Message-ID: <526D4CEA.2000209@timgolden.me.uk> Tim Golden added the comment: If you can put together a self-contained test case which fails on 3.3/3.4 I'm quite happy to re-open this. Given the nature of the issue, you'll have to be quite precise as to Windows version, whether 32/64, whether running as Administrator, and exact Python version. Feel free to call mklink or junction to create the link so that it's very clear what's linking to what and where. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 18:27:19 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 17:27:19 +0000 Subject: [issue11204] re module: strange behaviour of space inside {m, n} In-Reply-To: <1297552798.48.0.889043344562.issue11204@psf.upfronthosting.co.za> Message-ID: <1382894839.98.0.992895973805.issue11204@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 18:49:31 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 17:49:31 +0000 Subject: [issue17441] Do not cache re.compile In-Reply-To: <1363468136.42.0.6196791543.issue17441@psf.upfronthosting.co.za> Message-ID: <1382896171.24.0.892031411923.issue17441@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: So what is a decision? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 18:51:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 27 Oct 2013 17:51:01 +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: <3d766r38QTz7LmR@mail.python.org> Roundup Robot added the comment: New changeset d5a9a1ba47ee by Tim Golden in branch 'default': Issue14255 Don't flatten case of tempdir http://hg.python.org/cpython/rev/d5a9a1ba47ee ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 18:51:48 2013 From: report at bugs.python.org (Colin Williams) Date: Sun, 27 Oct 2013 17:51:48 +0000 Subject: [issue19417] bdb test coverage Message-ID: <1382896308.72.0.45441786626.issue19417@psf.upfronthosting.co.za> New submission from Colin Williams: This one is pretty involved. The tests might reach into the guts of the modules a bit too much, I'd be open to less invasive suggestions. ---------- files: bdb.patch keywords: patch messages: 201481 nosy: Colin.Williams priority: normal severity: normal status: open title: bdb test coverage Added file: http://bugs.python.org/file32389/bdb.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 19:01:00 2013 From: report at bugs.python.org (Tim Golden) Date: Sun, 27 Oct 2013 18:01:00 +0000 Subject: [issue19273] Update PCbuild/readme.txt In-Reply-To: <1381956724.6.0.425752006149.issue19273@psf.upfronthosting.co.za> Message-ID: <1382896860.29.0.396561716634.issue19273@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- stage: patch review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 19:22:46 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 27 Oct 2013 18:22:46 +0000 Subject: [issue18861] Problems with recursive automatic exception chaining In-Reply-To: <1377657727.9.0.627993776621.issue18861@psf.upfronthosting.co.za> Message-ID: <1382898166.77.0.906090640723.issue18861@psf.upfronthosting.co.za> Nikolaus Rath added the comment: Benjamin: I think that in most cases the intention of a ".. from None" is to disable printing of a stack trace for a specific exception when it occurs in the try .. except block. (In the example, that would be suppressing the stacktrace for the "Second" exception, because it is explicity converted to "Third"). I do not think that this ought to effect the printing of exceptions that occured previously and higher-up in the call chain. In other words, I think it is natural to expect that def foo(): try: do_stuff except Something: raise SomethingElse from None disables printing the stack trace for `Something` exceptions when they occur in the try..except block -- but not to hide the exception context for exceptions that occured before foo() was even called. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 20:27:53 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 19:27:53 +0000 Subject: [issue6181] Tkinter.Listbox several minor issues In-Reply-To: <1243977899.25.0.845872446641.issue6181@psf.upfronthosting.co.za> Message-ID: <1382902073.54.0.524113406903.issue6181@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 20:34:06 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 19:34:06 +0000 Subject: [issue6167] Tkinter.Scrollbar: the activate method needs to return a value, and set should take only two args In-Reply-To: <1243887092.8.0.492821608561.issue6167@psf.upfronthosting.co.za> Message-ID: <1382902446.18.0.232743979384.issue6167@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I withdraw my comment about arbitrary number of arguments. Tk itself raises an exception if the number of arguments is wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 20:44:38 2013 From: report at bugs.python.org (Tim Golden) Date: Sun, 27 Oct 2013 19:44:38 +0000 Subject: [issue19418] audioop.c giving signed/unsigned warnings on Windows Message-ID: <1382903078.0.0.055907083151.issue19418@psf.upfronthosting.co.za> New submission from Tim Golden: Modules/audioop.c is giving compile warnings on Windows against lines 18 & 437. ..\Modules\audioop.c(18): warning C4146: unary minus operator applied to unsigned type, result still unsigned ..\Modules\audioop.c(437): warning C4146: unary minus operator applied to unsigned type, result still unsigned ---------- components: Build messages: 201485 nosy: serhiy.storchaka, tim.golden priority: normal severity: normal status: open title: audioop.c giving signed/unsigned warnings on Windows type: compile error versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 20:46:05 2013 From: report at bugs.python.org (Tim Golden) Date: Sun, 27 Oct 2013 19:46:05 +0000 Subject: [issue19418] audioop.c giving signed/unsigned warnings on Windows In-Reply-To: <1382903078.0.0.055907083151.issue19418@psf.upfronthosting.co.za> Message-ID: <1382903165.81.0.136257612033.issue19418@psf.upfronthosting.co.za> Tim Golden added the comment: The attached patch appears to fix the problem. ---------- keywords: +patch Added file: http://bugs.python.org/file32390/audioop.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 20:56:37 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 19:56:37 +0000 Subject: [issue6167] Tkinter.Scrollbar: the activate method needs to return a value, and set should take only two args In-Reply-To: <1243887092.8.0.492821608561.issue6167@psf.upfronthosting.co.za> Message-ID: <1382903797.45.0.985016839104.issue6167@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The patch updated to tip and added deprecation warning for the "index" keyword argument. ---------- Added file: http://bugs.python.org/file32391/Scrollbar_fixes_2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 21:04:48 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 27 Oct 2013 20:04:48 +0000 Subject: [issue15792] Fix compiler options for x64 builds on Windows In-Reply-To: <1346077051.29.0.85020459134.issue15792@psf.upfronthosting.co.za> Message-ID: <3d795C3TVlz7Llg@mail.python.org> Roundup Robot added the comment: New changeset 7c46b1b239fe by Tim Golden in branch 'default': Issue 15792 Correct build options on Win64. Patch by Jeremy Kloth. http://hg.python.org/cpython/rev/7c46b1b239fe ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 21:08:39 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 20:08:39 +0000 Subject: [issue4965] Can doc index of html version be separately scrollable? In-Reply-To: <1232148633.29.0.602528403512.issue4965@psf.upfronthosting.co.za> Message-ID: <1382904519.27.0.383514640902.issue4965@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't notice any improvement. :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 21:16:38 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 20:16:38 +0000 Subject: [issue19418] audioop.c giving signed/unsigned warnings on Windows In-Reply-To: <1382903078.0.0.055907083151.issue19418@psf.upfronthosting.co.za> Message-ID: <1382904998.32.0.264617071706.issue19418@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: But it adds warnings on 32-bit platform with GCC. /home/serhiy/py/cpython/Modules/audioop.c:18:61: warning: integer overflow in expression [-Woverflow] /home/serhiy/py/cpython/Modules/audioop.c: In function ?audioop_minmax?: /home/serhiy/py/cpython/Modules/audioop.c:437:33: warning: integer overflow in expression [-Woverflow] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 21:19:10 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 20:19:10 +0000 Subject: [issue19418] audioop.c giving signed/unsigned warnings on Windows In-Reply-To: <1382903078.0.0.055907083151.issue19418@psf.upfronthosting.co.za> Message-ID: <1382905150.83.0.63597506884.issue19418@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What if use (int)-0x80000000 instead of -(int)0x80000000? Does it silence warnings on Windows? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 21:20:49 2013 From: report at bugs.python.org (Tim Golden) Date: Sun, 27 Oct 2013 20:20:49 +0000 Subject: [issue19418] audioop.c giving signed/unsigned warnings on Windows In-Reply-To: <1382905150.83.0.63597506884.issue19418@psf.upfronthosting.co.za> Message-ID: <526D759D.3060908@timgolden.me.uk> Tim Golden added the comment: I don't think it will, given MS description of the compiler warning: http://msdn.microsoft.com/en-us/library/4kh09110%28v=vs.100%29.aspx but I'll certainly give it a go. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 21:27:40 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 27 Oct 2013 20:27:40 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1382905660.47.0.0178905967332.issue16427@psf.upfronthosting.co.za> Christian Heimes added the comment: Antoine, I have addressed your concern "Well, the quality of the hash function is clearly reduced" in patch http://hg.python.org/features/pep-456/rev/765930d944a5 >>> s = set() >>> for i in range(256): ... s.add(hash("abcdfeg" + chr(i)) & 0xff) ... >>> len(s) 256 >>> s = set() >>> for i in range(256): ... s.add(hash("abcdfeghabcdefg" + chr(i)) & 0xff) ... >>> len(s) 256 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 21:28:49 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 27 Oct 2013 20:28:49 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1382905729.45.0.337818878929.issue16427@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- assignee: -> christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 21:30:34 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 20:30:34 +0000 Subject: [issue6160] Tkinter.Spinbox: fix for bbox and removed some uninteresting returns In-Reply-To: <1243826530.3.0.945381049334.issue6160@psf.upfronthosting.co.za> Message-ID: <1382905834.88.0.871014184784.issue6160@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I withdraw my previous comment because the bbox command newer returns empty result. The patch LGTM. ---------- versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From tim.peters at gmail.com Sun Oct 27 21:41:54 2013 From: tim.peters at gmail.com (Tim Peters) Date: Sun, 27 Oct 2013 15:41:54 -0500 Subject: [issue19418] audioop.c giving signed/unsigned warnings on Windows In-Reply-To: <526D759D.3060908@timgolden.me.uk> References: <1382905150.83.0.63597506884.issue19418@psf.upfronthosting.co.za> <526D759D.3060908@timgolden.me.uk> Message-ID: Use -0x7FFFFFFF-1 Nobody should complain about that, because it's standard C ;-) On Sun, Oct 27, 2013 at 3:20 PM, Tim Golden wrote: > > Tim Golden added the comment: > > I don't think it will, given MS description of the compiler warning: > > http://msdn.microsoft.com/en-us/library/4kh09110%28v=vs.100%29.aspx > > but I'll certainly give it a go. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > Python-bugs-list mailing list > Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/tim.peters%40gmail.com > From report at bugs.python.org Sun Oct 27 21:42:25 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 27 Oct 2013 20:42:25 +0000 Subject: [issue19418] audioop.c giving signed/unsigned warnings on Windows In-Reply-To: <526D759D.3060908@timgolden.me.uk> Message-ID: Tim Peters added the comment: Use -0x7FFFFFFF-1 Nobody should complain about that, because it's standard C ;-) On Sun, Oct 27, 2013 at 3:20 PM, Tim Golden wrote: > > Tim Golden added the comment: > > I don't think it will, given MS description of the compiler warning: > > http://msdn.microsoft.com/en-us/library/4kh09110%28v=vs.100%29.aspx > > but I'll certainly give it a go. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > Python-bugs-list mailing list > Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/tim.peters%40gmail.com > ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 21:46:32 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 20:46:32 +0000 Subject: [issue19418] audioop.c giving signed/unsigned warnings on Windows In-Reply-To: <1382903078.0.0.055907083151.issue19418@psf.upfronthosting.co.za> Message-ID: <1382906792.36.0.260900518198.issue19418@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. Do you want commit a patch? ---------- stage: -> commit review versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 21:49:25 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 20:49:25 +0000 Subject: [issue6159] Tkinter.PanedWindow: docstring fixes, change in paneconfigure and removed some returns In-Reply-To: <1243812482.01.0.481805459937.issue6159@psf.upfronthosting.co.za> Message-ID: <1382906965.94.0.266614149765.issue6159@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM, but perhaps renaming tagOrId worth deprecation warning. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 21:50:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 20:50:14 +0000 Subject: [issue6159] Tkinter.PanedWindow: docstring fixes, change in paneconfigure and removed some returns In-Reply-To: <1243812482.01.0.481805459937.issue6159@psf.upfronthosting.co.za> Message-ID: <1382907014.4.0.074402610703.issue6159@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 21:51:49 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Oct 2013 20:51:49 +0000 Subject: [issue6157] Tkinter.Text: changes for bbox, debug, and edit methods. In-Reply-To: <1243800373.79.0.587066766962.issue6157@psf.upfronthosting.co.za> Message-ID: <1382907109.28.0.598970887822.issue6157@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Guilherme, do you want commit your patches or let me do this for your? ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 21:57:26 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 27 Oct 2013 20:57:26 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1382907446.42.0.217909315329.issue19183@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: http://bugs.python.org/file32392/19427e9cc500.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 21:58:17 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 27 Oct 2013 20:58:17 +0000 Subject: [issue19418] audioop.c giving signed/unsigned warnings on Windows In-Reply-To: <1382903078.0.0.055907083151.issue19418@psf.upfronthosting.co.za> Message-ID: <1382907497.52.0.58592792213.issue19418@psf.upfronthosting.co.za> Tim Peters added the comment: @Serhiy, nope, pressed for time today :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 22:04:56 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 27 Oct 2013 21:04:56 +0000 Subject: [issue19419] Use abc.ABC in the collections ABC Message-ID: <1382907896.33.0.659909240184.issue19419@psf.upfronthosting.co.za> New submission from Raymond Hettinger: Minor clean-up to the collections ABCs. Use the Django style that inherits the metaclass rather than specifying the metaclass directly. The rationale is that it makes the ABCs cleaner looking and less intimidating. ---------- files: abc_meta.diff keywords: patch messages: 201500 nosy: rhettinger priority: low severity: normal status: open title: Use abc.ABC in the collections ABC type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32393/abc_meta.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 22:05:23 2013 From: report at bugs.python.org (Tim Golden) Date: Sun, 27 Oct 2013 21:05:23 +0000 Subject: [issue19418] audioop.c giving signed/unsigned warnings on Windows In-Reply-To: Message-ID: <526D800F.8050509@timgolden.me.uk> Tim Golden added the comment: Good idea. I'll test against Win32/64 & Linux 32 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 22:09:06 2013 From: report at bugs.python.org (Armin Rigo) Date: Sun, 27 Oct 2013 21:09:06 +0000 Subject: [issue19414] OrderedDict.values() behavior for modified instance In-Reply-To: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> Message-ID: <1382908146.24.0.51241407591.issue19414@psf.upfronthosting.co.za> Armin Rigo added the comment: Another option for the "try harder to raise RuntimeError" category (which I tend to like, because otherwise people are bound to write programs that rely on undocumented details): In __delitem__() set link.next = None. In the various iterators check explicitly if curr.next is None, and raise RuntimeError if it is. ---------- nosy: +arigo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 22:11:47 2013 From: report at bugs.python.org (Juan Javier) Date: Sun, 27 Oct 2013 21:11:47 +0000 Subject: [issue15634] Add serialized decorator to the threading module In-Reply-To: <1344845068.87.0.536585589553.issue15634@psf.upfronthosting.co.za> Message-ID: <1382908307.85.0.644189076705.issue15634@psf.upfronthosting.co.za> Juan Javier added the comment: David, I think this doesn't deserve to be part of the library since it is trivial to write and it is just a particular use case. Adding it as an example in the threading module's documentation might be a good idea, what do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 22:13:26 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 27 Oct 2013 21:13:26 +0000 Subject: [issue15634] Add serialized decorator to the threading module In-Reply-To: <1344845068.87.0.536585589553.issue15634@psf.upfronthosting.co.za> Message-ID: <1382908406.8.0.0222115822114.issue15634@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I have never done any Java, but @serialized doesn't look like an useful idiom to me, so I don't think it would be worth giving as an example in the docs. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 22:39:08 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 27 Oct 2013 21:39:08 +0000 Subject: [issue19414] OrderedDict.values() behavior for modified instance In-Reply-To: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> Message-ID: <1382909948.65.0.676422693873.issue19414@psf.upfronthosting.co.za> Nikolaus Rath added the comment: Being able to modify an OrderedDict while iterating through it is pretty useful though. What about documenting that modifying an OrderedDict is allowed, but may cause iteration to skip or repeat items (but do not allow it to raise RuntimeError)? As far as I can tell, the current implementation will already guarantee that (as soon as this issue is fixed). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 27 22:58:46 2013 From: report at bugs.python.org (Armin Rigo) Date: Sun, 27 Oct 2013 21:58:46 +0000 Subject: [issue19414] OrderedDict.values() behavior for modified instance In-Reply-To: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> Message-ID: <1382911126.57.0.596309993289.issue19414@psf.upfronthosting.co.za> Armin Rigo added the comment: Modifying an ordered dict while iterating over it can be officially classified as an ok think to do, but then the precise behavior must described in the documentation in some details, with of course matching implementation(s) and tests. I mean by that that the behavior should not be "it might miss some elements", but rather something precise like: consider the ordered dict as simply a list of its elements, and consider __delitem__ as replacing an element with NULL. Then forward or backward iteration works like forward or backward iteration over this list, with the additional rule that NULL elements are skipped over. It would imho be a good possible solution, but it obviously requires more effort. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 00:02:44 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 27 Oct 2013 23:02:44 +0000 Subject: [issue18458] interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update In-Reply-To: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> Message-ID: <1382914964.61.0.850710559921.issue18458@psf.upfronthosting.co.za> Ned Deily added the comment: An update: release candidates for Python 3.3.3 and 2.7.6 are now available, including binary installers for OS X, that include this fix and fully support OS X 10.9. http://www.python.org/download/releases/3.3.3/ http://www.python.org/download/releases/2.7.6/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 00:26:38 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 27 Oct 2013 23:26:38 +0000 Subject: [issue19279] UTF-7 to UTF-8 decoding crash In-Reply-To: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> Message-ID: <1382916398.5.0.796497107763.issue19279@psf.upfronthosting.co.za> STINNER Victor added the comment: @Serhiy: What is the status of the issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 03:07:15 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 28 Oct 2013 02:07:15 +0000 Subject: [issue19412] Add docs for test.support.requires_docstrings decorator In-Reply-To: <1382809267.31.0.380635405032.issue19412@psf.upfronthosting.co.za> Message-ID: <1382926035.58.0.284599717235.issue19412@psf.upfronthosting.co.za> Nick Coghlan added the comment: OK, since David agrees the updated behaviour of the requires_docstring decorator makes sense (i.e. skipping __doc__ related tests whenever the docstrings are unreliable, regardless of the reason), I'm morphing this to be a test.support docs issue. At least requires_docstring should be documented, but it may be worth documenting HAVE_DOCSTRINGS and MISSING_C_DOCSTRINGS as well. ---------- assignee: -> docs at python components: +Documentation -Tests nosy: +docs at python title: Add a test.support decorator for tests that require C level docstrings -> Add docs for test.support.requires_docstrings decorator _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 03:51:53 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 28 Oct 2013 02:51:53 +0000 Subject: [issue19373] Tkinter apps including IDLE may not display properly on OS X 10.9 Mavericks In-Reply-To: <1382596351.85.0.389017245767.issue19373@psf.upfronthosting.co.za> Message-ID: <3d7L6W5d6Yz7LjZ@mail.python.org> Roundup Robot added the comment: New changeset 1712a22aa1a9 by Ned Deily in branch '2.7': Issue #19373: Apply upstream change to Tk 8.5.15 fixing OS X 10.9 http://hg.python.org/cpython/rev/1712a22aa1a9 New changeset 8609f6df9974 by Ned Deily in branch '3.3': Issue #19373: Apply upstream change to Tk 8.5.15 fixing OS X 10.9 http://hg.python.org/cpython/rev/8609f6df9974 New changeset 33b31971ae9d by Ned Deily in branch 'default': Issue #19373: merge from 3.3 http://hg.python.org/cpython/rev/33b31971ae9d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 06:05:21 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Mon, 28 Oct 2013 05:05:21 +0000 Subject: [issue19414] OrderedDict.values() behavior for modified instance In-Reply-To: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> Message-ID: <1382936721.34.0.815969903354.issue19414@psf.upfronthosting.co.za> Nikolaus Rath added the comment: I'd be happy to provide a more extensive patch along the lines Armin suggested if that is considered a good idea (not sure who has to make that decision). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 06:31:37 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 28 Oct 2013 05:31:37 +0000 Subject: [issue19414] OrderedDict.values() behavior for modified instance In-Reply-To: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> Message-ID: <1382938297.27.0.775643705602.issue19414@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 06:38:54 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 28 Oct 2013 05:38:54 +0000 Subject: [issue19072] classmethod doesn't honour descriptor protocol of wrapped callable In-Reply-To: <1379856164.11.0.6368818134.issue19072@psf.upfronthosting.co.za> Message-ID: <1382938734.36.0.634052753453.issue19072@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Antoine, do you have any thoughts on this proposal? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 06:50:40 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 28 Oct 2013 05:50:40 +0000 Subject: [issue19414] OrderedDict.values() behavior for modified instance In-Reply-To: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> Message-ID: <1382939440.92.0.028785230492.issue19414@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'm inclined to document that "iterating views while adding or deleting entries an ordered dictionary is an undefined behavior". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 07:11:41 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 28 Oct 2013 06:11:41 +0000 Subject: [issue19403] Make contextlib.redirect_stdout reentrant In-Reply-To: <1382769830.57.0.0645984337848.issue19403@psf.upfronthosting.co.za> Message-ID: <1382940701.13.0.809582595515.issue19403@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 07:15:54 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 28 Oct 2013 06:15:54 +0000 Subject: [issue19332] Guard against changing dict during iteration In-Reply-To: <1382364174.9.0.836332683158.issue19332@psf.upfronthosting.co.za> Message-ID: <1382940954.54.0.803865062617.issue19332@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 07:27:12 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Oct 2013 06:27:12 +0000 Subject: [issue19279] UTF-7 to UTF-8 decoding crash In-Reply-To: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> Message-ID: <1382941632.04.0.980587775177.issue19279@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The bug is fixed on maintenance releases. Maintainer of 3.2 can backport the fix to 3.2 if it worth. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 09:19:44 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 28 Oct 2013 08:19:44 +0000 Subject: [issue19373] Tkinter apps including IDLE may not display properly on OS X 10.9 Mavericks In-Reply-To: <1382596351.85.0.389017245767.issue19373@psf.upfronthosting.co.za> Message-ID: <1382948384.45.0.867874923957.issue19373@psf.upfronthosting.co.za> Ned Deily added the comment: Update: release candidate ("rc1") packages for Python 3.3.3 and 2.7.6 have been created. They are available here: http://www.python.org/download/releases/3.3.3/ http://www.python.org/download/releases/2.7.6/ For 3.3.3 and 2.7.6, the python.org OS X 64-bit/32-bit x86-64/i386 installers now also include built-in versions of Tcl/Tk 8.5, eliminating the need to install third-party versions of Tcl/Tk. Shortly after the rc1 packages were released, an upstream Tk fix for this problem was published by the Tk project. Updated "rc1_rev1" installers which include that Tk fix should be available shortly on the 3.3.3 and 2.7.6 web pages. The Tk fix will also be included in the final 3.3.3 and 2.7.6 releases and in the next pre-release of 3.4.0 (expected to be 3.4.0b1). If you are using a third-party version of Tcl/Tk 8.5 on OS X 10.9, check with the vendor for fix availability. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 10:06:17 2013 From: report at bugs.python.org (Armin Rigo) Date: Mon, 28 Oct 2013 09:06:17 +0000 Subject: [issue19414] OrderedDict.values() behavior for modified instance In-Reply-To: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> Message-ID: <1382951177.88.0.64557142547.issue19414@psf.upfronthosting.co.za> Armin Rigo added the comment: Hi Raymond! Yes, I had the same reaction at first, but then it seemed to be possible to implement a reasonably good behavior with almost no performance hit. Plainly undefined behaviors are a mess for other implementations because in half of the big projects people don't realize they depend on it at some place --- particularly if the behavior is "mostly sane", as it seems to be right now for OrderedDict. For example, I believe the following code to always work: for key in ordered_dict: if some_condition: del ordered_dict[key] whereas it always raise RuntimeError with regular dicts, which are both ok choices. But silently not working would be much worse. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 10:09:20 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 28 Oct 2013 09:09:20 +0000 Subject: [issue17762] platform.linux_distribution() should honor /etc/os-release In-Reply-To: <1366124468.64.0.40642643299.issue17762@psf.upfronthosting.co.za> Message-ID: <1382951360.34.0.794475144231.issue17762@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Apparently my fear is unfounded. The dist, version, id have been initialized with empty value. So if the os-release file does not have complete information, it should be okay with the patch from Andrei Duma. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 10:18:43 2013 From: report at bugs.python.org (Martin Panter) Date: Mon, 28 Oct 2013 09:18:43 +0000 Subject: [issue14007] xml.etree.ElementTree - XMLParser and TreeBuilder's doctype() method missing In-Reply-To: <1329193190.72.0.667201124226.issue14007@psf.upfronthosting.co.za> Message-ID: <1382951923.78.0.761880307586.issue14007@psf.upfronthosting.co.za> Martin Panter added the comment: There is an issue in Python 2.7 (and 3.2 if that matters) with the DeprecationWarning for the doctype() method being triggered internally. It is a bit different from this issue but I think a solution has already been committed for 3.3, and the commit message references this issue. Let me know if I should raise a separate report. The warning is triggered for the Python version of the ElementTree module: $ python2.7 -Wall Python 2.7.5 (default, Sep 6 2013, 09:55:21) [GCC 4.8.1 20130725 (prerelease)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from xml.etree import ElementTree >>> ElementTree.XML(b'') /usr/lib/python2.7/xml/etree/ElementTree.py:1627: DeprecationWarning: This method of XMLParser is deprecated. Define doctype() method on the TreeBuilder target. DeprecationWarning, /usr/lib/python2.7/xml/etree/ElementTree.py:1627: DeprecationWarning: This method of XMLParser is deprecated. Define doctype() method on the TreeBuilder target. DeprecationWarning, >>> Possible solution is the patch hunk below, taken from this commit: http://hg.python.org/cpython/diff/47016103185f/Lib/xml/etree/ElementTree.py#l1.99 @@ -1636,7 +1627,7 @@ class XMLParser: pubid = pubid[1:-1] if hasattr(self.target, "doctype"): self.target.doctype(name, pubid, system[1:-1]) - elif self.doctype is not self._XMLParser__doctype: + elif self.doctype != self._XMLParser__doctype: # warn about deprecated call self._XMLParser__doctype(name, pubid, system[1:-1]) self.doctype(name, pubid, system[1:-1]) ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 11:32:31 2013 From: report at bugs.python.org (Tim Golden) Date: Mon, 28 Oct 2013 10:32:31 +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: <1382956351.22.0.750057896798.issue14255@psf.upfronthosting.co.za> Tim Golden added the comment: Fixed. Thanks for the report. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 11:33:32 2013 From: report at bugs.python.org (Tim Golden) Date: Mon, 28 Oct 2013 10:33:32 +0000 Subject: [issue15792] Fix compiler options for x64 builds on Windows In-Reply-To: <1346077051.29.0.85020459134.issue15792@psf.upfronthosting.co.za> Message-ID: <1382956412.76.0.0699438076843.issue15792@psf.upfronthosting.co.za> Tim Golden added the comment: Applied. Thanks for the patch. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 11:34:18 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 28 Oct 2013 10:34:18 +0000 Subject: [issue17441] Do not cache re.compile In-Reply-To: <1363468136.42.0.6196791543.issue17441@psf.upfronthosting.co.za> Message-ID: <1382956458.58.0.971763227799.issue17441@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > So what is a decision? Is there a clear performance benefit in removing the caching? If the problem is cache pollution perhaps re.compile can get a separate cache :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 11:50:08 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 28 Oct 2013 10:50:08 +0000 Subject: [issue19072] classmethod doesn't honour descriptor protocol of wrapped callable In-Reply-To: <1379856164.11.0.6368818134.issue19072@psf.upfronthosting.co.za> Message-ID: <1382957408.15.0.445927414397.issue19072@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well... I've not written enough descriptor-implementing code to have a clear opinion on this, but this looks quite obscure. I have personally never needed anything like the wrapt library (I've also never used the PyPI "decorator" module, FWIW). ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:01:35 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 28 Oct 2013 11:01:35 +0000 Subject: [issue17441] Do not cache re.compile In-Reply-To: <1363468136.42.0.6196791543.issue17441@psf.upfronthosting.co.za> Message-ID: <1382958095.15.0.25682342181.issue17441@psf.upfronthosting.co.za> Christian Heimes added the comment: I don't like the idea that you want to remove a feature without a deprecation period. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:06:10 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 28 Oct 2013 11:06:10 +0000 Subject: [issue19411] binascii.hexlify docs say it returns a string (it returns bytes) In-Reply-To: <1382807910.82.0.748740374727.issue19411@psf.upfronthosting.co.za> Message-ID: <1382958370.23.0.696902678447.issue19411@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> needs patch versions: -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:06:44 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 28 Oct 2013 11:06:44 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1382958404.55.0.202521763971.issue16427@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Shouldn't this issue be obsoleted? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:50:13 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Oct 2013 11:50:13 +0000 Subject: [issue17441] Do not cache re.compile In-Reply-To: <1363468136.42.0.6196791543.issue17441@psf.upfronthosting.co.za> Message-ID: <1382961013.7.0.168343623052.issue17441@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm surprised, but perhaps performance benefit actually exists (check this on other computers). ### regex_effbot ### Min: 0.333525 -> 0.325349: 1.03x faster Avg: 0.342451 -> 0.331665: 1.03x faster Significant (t=12.13) Stddev: 0.00606 -> 0.00651: 1.0738x larger However the main benefit is that non-cached constructor (re.compile is a constructor of regular expression object) is expected to be non-cached, while other module level functions can be cached. See for example struct.Struct. We can cache non-cached constructor explicitly (as in fnmatch), but when a constructor already cached, adding new cache can only add overhead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:53:18 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 28 Oct 2013 11:53:18 +0000 Subject: [issue19420] Leak in _hashopenssl.c Message-ID: <1382961198.75.0.11599120872.issue19420@psf.upfronthosting.co.za> New submission from Stefan Krah: There's a leak in _hashopenssl.c. Patch attached. ---------- files: _hashopenssl.patch keywords: patch messages: 201527 nosy: skrah priority: normal severity: normal status: open title: Leak in _hashopenssl.c Added file: http://bugs.python.org/file32394/_hashopenssl.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:55:02 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 28 Oct 2013 11:55:02 +0000 Subject: [issue19420] Leak in _hashopenssl.c In-Reply-To: <1382961198.75.0.11599120872.issue19420@psf.upfronthosting.co.za> Message-ID: <1382961302.6.0.723261668306.issue19420@psf.upfronthosting.co.za> Christian Heimes added the comment: Which Python versions are affected? ---------- assignee: -> christian.heimes components: +Extension Modules nosy: +christian.heimes stage: -> patch review type: -> resource usage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:58:03 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Oct 2013 11:58:03 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1382961483.92.0.558670331165.issue16427@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since issue19183 supersedes it, yes. ---------- resolution: -> duplicate stage: patch review -> committed/rejected status: open -> closed superseder: -> PEP 456 Secure and interchangeable hash algorithm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:58:21 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 28 Oct 2013 11:58:21 +0000 Subject: [issue19420] Leak in _hashopenssl.c In-Reply-To: <1382961198.75.0.11599120872.issue19420@psf.upfronthosting.co.za> Message-ID: <1382961501.33.0.851355613261.issue19420@psf.upfronthosting.co.za> Christian Heimes added the comment: 2.7 isn't affected. It's not a security issue which means I'm not going to apply it to 3.2. ---------- versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:33:35 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 28 Oct 2013 12:33:35 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1382881563.13.0.158939169832.issue19183@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: On 27 Oct 2013 23:46, "Christian Heimes" wrote: > > > Christian Heimes added the comment: > > Nick, please review the latest patch. I have addressed Antoine's review in 257597d20fa8.diff. I'll update the PEP as soon as you are happy with the patch. Comments from the others sound promising, I should be able to take a look myself tomorrow night. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:49:55 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2013 12:49:55 +0000 Subject: [issue19421] FileIO destructor imports indirectly the io module at exit Message-ID: <1382964595.86.0.735733174732.issue19421@psf.upfronthosting.co.za> New submission from STINNER Victor: Since Python 3.3, when an unclosed file is destroyed, a warning is emitted. Good. The problem is when the warning is emitted after the io has been unloaded: in this case, the warning will try to reload the io module to display the Python line where the warning occurred. _Py_DisplaySourceLine() starts with: io = PyImport_ImportModuleNoBlock("io"); For example, I got the issue while the warning was emitted during PyImport_Cleanup(), see the full gdb backtrace below (the assertion failure was caused by a local modification, it's unrelated to this issue). show_warning() and/or _Py_DisplaySourceLine() should not try to display the Python line while Python is exiting. There is for example the flag _Py_Finalizing. If we really want to display the Python line/traceback, the io module should be kept alive until all warnings are emitted. But I don't think that it is possible. Or Python should try to unload other modules before the io module? (gdb) where #0 0x00000037f4835ba5 in raise () from /lib64/libc.so.6 #1 0x00000037f4837358 in abort () from /lib64/libc.so.6 #2 0x00000037f482e972 in __assert_fail_base () from /lib64/libc.so.6 #3 0x00000037f482ea22 in __assert_fail () from /lib64/libc.so.6 #4 0x00000000004bddbd in PyObject_Repr (v='builtins') at Objects/object.c:457 #5 0x0000000000506161 in unicode_fromformat_arg (writer=0x7fffffffb780, f=0x68b073 "R halted; None in sys.modules", vargs=0x7fffffffb7c0) at Objects/unicodeobject.c:2669 #6 0x00000000005065ca in PyUnicode_FromFormatV (format=0x68b068 "import of %R halted; None in sys.modules", vargs=0x7fffffffb810) at Objects/unicodeobject.c:2734 #7 0x000000000050679f in PyUnicode_FromFormat (format=0x68b068 "import of %R halted; None in sys.modules") at Objects/unicodeobject.c:2785 #8 0x00000000005c8a9a in PyImport_ImportModuleLevelObject (name='builtins', given_globals=0x0, locals=0x0, given_fromlist=0x0, level=0) at Python/import.c:1410 #9 0x00000000005c98eb in PyImport_ImportModuleLevel (name=0x68aa45 "builtins", globals=0x0, locals=0x0, fromlist=0x0, level=0) at Python/import.c:1560 #10 0x00000000005c9ba7 in PyImport_Import (module_name='io') at Python/import.c:1639 #11 0x00000000005c7e00 in PyImport_ImportModule (name=0x65084a "io") at Python/import.c:1141 #12 0x00000000005c7e8e in PyImport_ImportModuleNoBlock (name=0x65084a "io") at Python/import.c:1158 #13 0x0000000000432f85 in _Py_DisplaySourceLine (f=<_io.TextIOWrapper at remote 0x7ffff1b97898>, filename='sys', lineno=1, indent=2) at Python/traceback.c:243 #14 0x00000000005542fa in show_warning (filename='sys', lineno=1, text="unclosed file <_io.TextIOWrapper name='x.py' mode='r' encoding='UTF-8'>", category= , sourceline=0x0) at Python/_warnings.c:287 #15 0x000000000055487a in warn_explicit (category=, message= ResourceWarning("unclosed file <_io.TextIOWrapper name='x.py' mode='r' encoding='UTF-8'>",), filename='sys', lineno=1, module='sys', registry={}, sourceline=0x0) at Python/_warnings.c:409 #16 0x0000000000555b88 in do_warn (message="unclosed file <_io.TextIOWrapper name='x.py' mode='r' encoding='UTF-8'>", category=, stack_level=1) at Python/_warnings.c:614 #17 0x00000000005561dd in warn_unicode (category=, message= "unclosed file <_io.TextIOWrapper name='x.py' mode='r' encoding='UTF-8'>", stack_level=1) at Python/_warnings.c:732 #18 0x0000000000556336 in PyErr_WarnFormat (category=, stack_level=1, format=0x6a3e8b "unclosed file %R") at Python/_warnings.c:755 #19 0x000000000061cff5 in fileio_dealloc_warn (self=0x7ffff1a04368, source=<_io.TextIOWrapper at remote 0x7ffff1b97dc0>) at ./Modules/_io/fileio.c:79 #20 0x00000000004b961d in PyCFunction_Call (func=, arg= (<_io.TextIOWrapper at remote 0x7ffff1b97dc0>,), kw=0x0) at Objects/methodobject.c:120 #21 0x000000000045b5d3 in PyObject_Call (func=, arg= (<_io.TextIOWrapper at remote 0x7ffff1b97dc0>,), kw=0x0) at Objects/abstract.c:2085 #22 0x000000000045b76d in call_function_tail (callable=, args= (<_io.TextIOWrapper at remote 0x7ffff1b97dc0>,)) at Objects/abstract.c:2122 #23 0x000000000045ba90 in callmethod (func=, format=0x6a4af1 "O", va= 0x7fffffffd288, is_size_t=1) at Objects/abstract.c:2189 #24 0x000000000045bf63 in _PyObject_CallMethodId_SizeT (o=<_io.FileIO at remote 0x7ffff1a04368>, name=0x936e80 , format=0x6a4af1 "O") at Objects/abstract.c:2278 #25 0x0000000000621e4e in buffered_dealloc_warn (self=0x7ffff1ae4838, source=<_io.TextIOWrapper at remote 0x7ffff1b97dc0>) at ./Modules/_io/bufferedio.c:456 #26 0x00000000004b961d in PyCFunction_Call (func=, arg= (<_io.TextIOWrapper at remote 0x7ffff1b97dc0>,), kw=0x0) at Objects/methodobject.c:120 #27 0x000000000045b5d3 in PyObject_Call (func=, arg= (<_io.TextIOWrapper at remote 0x7ffff1b97dc0>,), kw=0x0) at Objects/abstract.c:2085 #28 0x000000000045b76d in call_function_tail (callable=, args= (<_io.TextIOWrapper at remote 0x7ffff1b97dc0>,)) at Objects/abstract.c:2122 #29 0x000000000045ba90 in callmethod (func=, format=0x6a57e5 "O", va= 0x7fffffffd4f8, is_size_t=1) at Objects/abstract.c:2189 #30 0x000000000045bf63 in _PyObject_CallMethodId_SizeT (o=<_io.BufferedReader at remote 0x7ffff1ae4838>, name=0x938fe0 , format= 0x6a57e5 "O") at Objects/abstract.c:2278 #31 0x000000000063446c in textiowrapper_close (self=0x7ffff1b97dc0, args=0x0) at ./Modules/_io/textio.c:2581 #32 0x00000000004b956d in PyCFunction_Call (func=, arg=(), kw=0x0) at Objects/methodobject.c:106 #33 0x000000000045b5d3 in PyObject_Call (func=, arg=(), kw=0x0) at Objects/abstract.c:2085 #34 0x000000000045c254 in PyObject_CallMethodObjArgs (callable=, name='close') at Objects/abstract.c:2326 #35 0x000000000061abdf in iobase_finalize (self=<_io.TextIOWrapper at remote 0x7ffff1b97dc0>) at ./Modules/_io/iobase.c:228 #36 0x00000000004bd715 in PyObject_CallFinalizer (self=<_io.TextIOWrapper at remote 0x7ffff1b97dc0>) at Objects/object.c:272 #37 0x00000000004bd789 in PyObject_CallFinalizerFromDealloc (self=<_io.TextIOWrapper at remote 0x7ffff1b97dc0>) at Objects/object.c:289 #38 0x000000000061aca8 in _PyIOBase_finalize (self=<_io.TextIOWrapper at remote 0x7ffff1b97dc0>) at ./Modules/_io/iobase.c:252 #39 0x000000000062d116 in textiowrapper_dealloc (self=0x7ffff1b97dc0) at ./Modules/_io/textio.c:1138 ---Type to continue, or q to quit--- #40 0x00000000004c12b3 in _Py_Dealloc (op=<_io.TextIOWrapper at remote 0x7ffff1b97dc0>) at Objects/object.c:1876 #41 0x00000000004a86d4 in free_keys_object (keys=0xa13980) at Objects/dictobject.c:364 #42 0x00000000004ab8b4 in dict_dealloc (mp=0x7ffff1b582f8) at Objects/dictobject.c:1386 #43 0x00000000004c12b3 in _Py_Dealloc (op= {'f': <_io.TextIOWrapper at remote 0x7ffff1b97dc0>, '__loader__': , '__doc__': None, '__cached__': None, '__package__': None, '__name__': '__main__', '__builtins__': }) at Objects/object.c:1876 #44 0x00000000004bc067 in module_dealloc (m=0x7ffff1aff7d8) at Objects/moduleobject.c:391 #45 0x00000000004c12b3 in _Py_Dealloc (op=) at Objects/object.c:1876 #46 0x00000000004a9ea2 in insertdict (mp=0x7ffff1be77c8, key='__main__', hash=-7010304633138094468, value=None) at Objects/dictobject.c:818 #47 0x00000000004aafaf in PyDict_SetItem (op= {'_weakrefset': None, 'marshal': None, 'sysconfig': None, '_sitebuiltins': None, 'io': None, 'encodings.utf_8': None, 'sys': None, 'encodings.latin_1': None, '_sysconfigdata': None, 'encodings.aliases': None, 'os': None, 'codecs': None, 'errno': None, '_collections_abc': None, '_weakref': None, 'site': None, 'zipimport': None, 'posixpath': None, '_io': None, 'abc': None, '_locale': None, 'encodings': None, 'builtins': None, 'os.path': None, '_warnings': None, '_stat': None, '_bootlocale': None, 'signal': None, '_frozen_importlib': None, 'stat': None, '_imp': None, 'posix': None, '__main__': None, 'genericpath': , '_codecs': , '_thread': }, key='__main__', value=None) at Objects/dictobject.c:1202 #48 0x00000000005c5b33 in PyImport_Cleanup () at Python/import.c:369 #49 0x000000000041dd8e in Py_Finalize () at Python/pythonrun.c:592 #50 0x0000000000439854 in Py_Main (argc=2, argv=0x95d020) at Modules/main.c:800 #51 0x0000000000419f25 in main (argc=2, argv=0x7fffffffdf28) at ./Modules/python.c:69 ---------- messages: 201532 nosy: haypo, pitrou priority: normal severity: normal status: open title: FileIO destructor imports indirectly the io module at exit versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:53:47 2013 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 28 Oct 2013 12:53:47 +0000 Subject: [issue14007] xml.etree.ElementTree - XMLParser and TreeBuilder's doctype() method missing In-Reply-To: <1329193190.72.0.667201124226.issue14007@psf.upfronthosting.co.za> Message-ID: <1382964827.08.0.0812153507455.issue14007@psf.upfronthosting.co.za> Eli Bendersky added the comment: Martin, do you see a way to work around the problem? I'm not sure it's serious enough to warrant committing to the 2.7.x branch at this point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:56:45 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2013 12:56:45 +0000 Subject: [issue19421] FileIO destructor imports indirectly the io module at exit In-Reply-To: <1382964595.86.0.735733174732.issue19421@psf.upfronthosting.co.za> Message-ID: <1382965005.47.0.406441532744.issue19421@psf.upfronthosting.co.za> STINNER Victor added the comment: By the way, the filename of the warning is not really useful. Example script test.py: --------------------- f = open(__file__) --------------------- At exit, Python displays: --------------------- sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='test.py' mode='r' encoding='UTF-8'> --------------------- "sys" is not a real file, _Py_DisplaySourceLine() would not be able to display the Python line (the correct filename is test.py). Python traceback when the warning is emitted, according to gdb: --------------------- (gdb) py-bt Traceback (most recent call first): --------------------- We are in PyImport_Cleanup(), called by Py_Finalize(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:56:51 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 28 Oct 2013 12:56:51 +0000 Subject: [issue19422] Neither DTLS nor error for SSLSocket.sendto() of UDP socket Message-ID: <1382965011.03.0.394041339056.issue19422@psf.upfronthosting.co.za> New submission from Christian Heimes: Python's SSL module doesn't support DTLS (datagram TLS for UDP). The SSL code doesn't complain when an UDP socket is wrapped in a SSL socket. It happily sends the bytes unprotected and not encrypted over the wire: >>> import ssl, socket >>> sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) >>> ssock = ssl.wrap_socket(sock) >>> ssock.sendto(b"data", ("localhost", 12345)) 4 TCP sockets at least complain that the connection hasn't been established yet. >>> sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) >>> ssock = ssl.wrap_socket(sock) >>> ssock.sendto(b"data", ("localhost", 12345)) Traceback (most recent call last): File "", line 1, in File "/home/heimes/dev/python/cpython/Lib/ssl.py", line 517, in sendto return socket.sendto(self, data, flags_or_addr) BrokenPipeError: [Errno 32] Broken pipe ---------- components: Extension Modules messages: 201535 nosy: christian.heimes priority: normal severity: normal status: open title: Neither DTLS nor error for SSLSocket.sendto() of UDP socket type: behavior versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:58:33 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 28 Oct 2013 12:58:33 +0000 Subject: [issue19422] Neither DTLS nor error for SSLSocket.sendto() of UDP socket In-Reply-To: <1382965011.03.0.394041339056.issue19422@psf.upfronthosting.co.za> Message-ID: <1382965113.39.0.0140386522572.issue19422@psf.upfronthosting.co.za> Christian Heimes added the comment: I think either sendto() or wrap_socket() should raise some kind of error for UDP instead of silently sending unencrypted data. ---------- nosy: +giampaolo.rodola, janssen, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:59:02 2013 From: report at bugs.python.org (Donald Stufft) Date: Mon, 28 Oct 2013 12:59:02 +0000 Subject: [issue19407] PEP 453: update the "Installing Python Modules" documentation In-Reply-To: <1382791475.83.0.387983167617.issue19407@psf.upfronthosting.co.za> Message-ID: <1382965142.55.0.977493132651.issue19407@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- nosy: +dstufft _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:59:07 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2013 12:59:07 +0000 Subject: [issue19421] FileIO destructor imports indirectly the io module at exit In-Reply-To: <1382964595.86.0.735733174732.issue19421@psf.upfronthosting.co.za> Message-ID: <1382965147.36.0.0561843588523.issue19421@psf.upfronthosting.co.za> STINNER Victor added the comment: "show_warning() and/or _Py_DisplaySourceLine() should not try to display the Python line while Python is exiting. There is for example the flag _Py_Finalizing." Or PyImport_Import() should fail with an ImportError("block importing 'io' when python is exiting") (or a better message) when Python is exiting (if _Py_Finalizing is 1). ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 14:00:00 2013 From: report at bugs.python.org (Martin Panter) Date: Mon, 28 Oct 2013 13:00:00 +0000 Subject: [issue14007] xml.etree.ElementTree - XMLParser and TreeBuilder's doctype() method missing In-Reply-To: <1329193190.72.0.667201124226.issue14007@psf.upfronthosting.co.za> Message-ID: <1382965200.2.0.346789077267.issue14007@psf.upfronthosting.co.za> Martin Panter added the comment: The best way to work around it for me is just to ignore the warning. It doesn?t really worry me that much, I only noticed it while porting a program to Python 3 anyway. So if you don?t want to touch the 2.7 branch I can live with that :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 14:06:10 2013 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 28 Oct 2013 13:06:10 +0000 Subject: [issue14007] xml.etree.ElementTree - XMLParser and TreeBuilder's doctype() method missing In-Reply-To: <1382965200.2.0.346789077267.issue14007@psf.upfronthosting.co.za> Message-ID: Eli Bendersky added the comment: On Mon, Oct 28, 2013 at 6:00 AM, Martin Panter wrote: > > Martin Panter added the comment: > > The best way to work around it for me is just to ignore the warning. It > doesn?t really worry me that much, I only noticed it while porting a > program to Python 3 anyway. So if you don?t want to touch the 2.7 branch I > can live with that :) > I'd rather not. 2.7.x is in maintenance mode - we'll fix serious bugs and may change trivial things. But in this case, since the effects are hardly serious we should consider the danger of mucking with code in a very stable maintenance branch. While this issue may seem simple at the surface, it's not. That's because ET in 3.3+ is quite different from ET in 3.2- (including 2.7-). In 3.3 ET underwent major changes, and its testing infrastructure was greatly improved too. Back-porting across the 3.3 boundary is risky because it's hard to foresee the effects (i.e. interactions between the C accelerator and the Python module). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 14:23:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 28 Oct 2013 13:23:23 +0000 Subject: [issue19422] Neither DTLS nor error for SSLSocket.sendto() of UDP socket In-Reply-To: <1382965011.03.0.394041339056.issue19422@psf.upfronthosting.co.za> Message-ID: <1382966603.07.0.484172577631.issue19422@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Agreed, this should definitely be fixed. ---------- components: +Library (Lib) -Extension Modules stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 14:49:35 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 28 Oct 2013 13:49:35 +0000 Subject: [issue19410] Restore empty string special casing in importlib.machinery.FileFinder In-Reply-To: <1382801910.68.0.88492101144.issue19410@psf.upfronthosting.co.za> Message-ID: <1382968175.57.0.40658428206.issue19410@psf.upfronthosting.co.za> Brett Cannon added the comment: Do you actually mean PathFinder or FileFinder (I'm fairly certain you mean the latter). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 14:53:05 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 28 Oct 2013 13:53:05 +0000 Subject: [issue19410] Restore empty string special casing in importlib.machinery.FileFinder In-Reply-To: <1382968175.57.0.40658428206.issue19410@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: The PathFinder change is fine, this is about restoring the previous FileFinder behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 15:23:17 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 28 Oct 2013 14:23:17 +0000 Subject: [issue17762] platform.linux_distribution() should honor /etc/os-release In-Reply-To: <1366124468.64.0.40642643299.issue17762@psf.upfronthosting.co.za> Message-ID: <1382970197.72.0.51674766145.issue17762@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Hi, Andrei. Could you provide the test? You could take a look at issue 17429 to see how it is done. http://bugs.python.org/issue17429 We would be grateful if you could test the case where os-release file is non-ascii encoded file (although technically it should be tested in issue 17429). Sometimes the Linux distro version has non-ascii characters, such as Schr?dinger's Cat. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 15:46:08 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 28 Oct 2013 14:46:08 +0000 Subject: [issue19421] FileIO destructor imports indirectly the io module at exit In-Reply-To: <1382964595.86.0.735733174732.issue19421@psf.upfronthosting.co.za> Message-ID: <1382971568.63.0.983287538759.issue19421@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Can you explain what the actual cause of the crash is? Surely failing to import the "io" module shouldn't produce a fatal error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 15:47:06 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Mon, 28 Oct 2013 14:47:06 +0000 Subject: [issue19282] dbm.open should be a context manager In-Reply-To: <1382082310.98.0.0309554787542.issue19282@psf.upfronthosting.co.za> Message-ID: <1382971626.3.0.53531185592.issue19282@psf.upfronthosting.co.za> Claudiu.Popa added the comment: There is issue19385 for the inconsistency of dbm.dumb, with a patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 15:47:21 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 28 Oct 2013 14:47:21 +0000 Subject: [issue19410] Restore empty string special casing in importlib.machinery.FileFinder In-Reply-To: <1382801910.68.0.88492101144.issue19410@psf.upfronthosting.co.za> Message-ID: <1382971641.25.0.368200200202.issue19410@psf.upfronthosting.co.za> Brett Cannon added the comment: Changeset #76184b5339f2 contains the commit Nick is referring to. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 15:49:04 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2013 14:49:04 +0000 Subject: [issue19421] FileIO destructor imports indirectly the io module at exit In-Reply-To: <1382964595.86.0.735733174732.issue19421@psf.upfronthosting.co.za> Message-ID: <1382971744.67.0.413827884684.issue19421@psf.upfronthosting.co.za> STINNER Victor added the comment: > Can you explain what the actual cause of the crash is? I modified locally my Python source code (I worked on a patch for PyFrame_LocalsToFast(), issue #18408), the crash was a bug in my code, it's unrelated to the issue. I opened an issue because I'm surprised that Python tries to import a module which was just unloaded, during its finalization procedure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 16:18:09 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Oct 2013 15:18:09 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1382973489.13.0.297850481106.issue19183@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Christian, why PY_HASH_EXTERNAL is here? Do you plan use it any official build? I think that in custom build of Python whole files pyhash.c and pyhash.h can be replaced. When you will get rid from PY_HASH_EXTERNAL, then you could get rid from PyHash_FuncDef, PyHash_Func, etc. Why _Py_HashDouble() and _Py_HashPointer() are moved to pyhash.c? They are hash algorithm agnostic, and it is unlikely they will be redefined in custom build. You not need the HAVE_ALIGNED_REQUIRED macros if use PY_UHASH_CPY (or something like for exact 64 bit) in siphash24. On platforms where aligned access is required you will use per-bytes copy, otherwise you will use fast 64-bit copy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 16:42:29 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 28 Oct 2013 15:42:29 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1382973489.13.0.297850481106.issue19183@psf.upfronthosting.co.za> Message-ID: <526E85E3.2000105@cheimes.de> Christian Heimes added the comment: Am 28.10.2013 16:18, schrieb Serhiy Storchaka: > Christian, why PY_HASH_EXTERNAL is here? Do you plan use it any official build? I think that in custom build of Python whole files pyhash.c and pyhash.h can be replaced. Because you can't simple replace the files. It also contains _Py_HashBytes() and _PyHash_Fini(). With PY_HASH_EXTERNAL embedders can simply define PY_HASH_ALGORITHM PY_HASH_EXTERNAL and provide the extern struct inside a separate object file. > When you will get rid from PY_HASH_EXTERNAL, then you could get rid from PyHash_FuncDef, PyHash_Func, etc. I don't understand why you want me to get rid of the struct. What's your argument against the struct? I like the PyHash_FuncDef because it groups all information (func ptr, name, hash metadata) in a single structure. > Why _Py_HashDouble() and _Py_HashPointer() are moved to pyhash.c? They are hash algorithm agnostic, and it is unlikely they will be redefined in custom build. I have moved the functions to pyhash.c in order to keep all related internal function in one file. They do not belong in Objects/object.c. > You not need the HAVE_ALIGNED_REQUIRED macros if use PY_UHASH_CPY (or something like for exact 64 bit) in siphash24. On platforms where aligned access is required you will use per-bytes copy, otherwise you will use fast 64-bit copy. I'm not going to make siphash24 compatible with platforms that require aligned memory for integers. It's an unnecessary complication and slow-down for all common platforms. The feature will simply not be available on archaic architectures. Seriously, nobody gives a ... about SPARC and MIPS. :) It's nice that Python still works on these CPU architectures. But I neither want to deviate from the SipHash24 implementation nor make the code slower on all relevant platforms such as X86 and X86_64. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 16:55:34 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 28 Oct 2013 15:55:34 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1382975734.12.0.537249435464.issue19183@psf.upfronthosting.co.za> Christian Heimes added the comment: Serhiy, I would like to land my patch before beta 1 hits the fan. We can always improve the code during beta. Right now I don't want to mess around with SipHash24 code. That includes non-64bit platforms as well as architectures that enforce aligned memory for integers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 16:59:55 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 28 Oct 2013 15:59:55 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1382975995.07.0.163478711906.issue19183@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > Seriously, nobody gives a ... about SPARC and MIPS. :) It's nice that > Python still works on these CPU architectures. But I neither want to > deviate from the SipHash24 implementation nor make the code slower on > all relevant platforms such as X86 and X86_64. Well, unaligned memory access is usually slower on all architectures :-) Also, I think some ARM architectures don't support unaligned access, so it's not really a thing of the past... ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 17:11:36 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 28 Oct 2013 16:11:36 +0000 Subject: [issue19421] FileIO destructor imports indirectly the io module at exit In-Reply-To: <1382964595.86.0.735733174732.issue19421@psf.upfronthosting.co.za> Message-ID: <1382976696.77.0.226768604145.issue19421@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, then I don't think it's really a bug. We might want to define import rules at shutdown but "fixing" this particular case doesn't sound important. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 17:20:11 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 28 Oct 2013 16:20:11 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1382975995.07.0.163478711906.issue19183@psf.upfronthosting.co.za> Message-ID: <526E8EB7.70101@cheimes.de> Christian Heimes added the comment: Am 28.10.2013 16:59, schrieb Charles-Fran?ois Natali: > Well, unaligned memory access is usually slower on all architectures :-) > Also, I think some ARM architectures don't support unaligned access, so > it's not really a thing of the past... On modern computers it's either not slower or just a tiny bit slower. http://lemire.me/blog/archives/2012/05/31/data-alignment-for-speed-myth-or-reality/ Python's str and bytes datatype are always aligned properly. The majority of bytearray and memoryview instances are aligned, too. Unaligned memory access is rare case for most applications. About 50% of strings have less than 8 bytes (!), 90% have less than 16 bytes. For the Python's test suite the numbers are even smaller: ~45% <=5 bytes, ~90% <=12 bytes. You might see a 10% slowdown for very long and unaligned byte arrays on some older CPUs. I think we can safely ignore the special case. Any special case for unaligned memory will introduce additional overhead that *will* slow down the common path. Oh, and ARM has unaligned memory access: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0360f/CDFEJCBH.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 18:00:31 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 28 Oct 2013 17:00:31 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1382979631.92.0.263827581847.issue19183@psf.upfronthosting.co.za> Christian Heimes added the comment: I have added an optimization for hashing of small strings. It uses an inline version of DJBX33A for small strings [1, 7) on 64bit and [1, 5) on 32bit. Nick, please use "create patch" before you do your review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 18:15:37 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Oct 2013 17:15:37 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1382980537.57.0.955408809135.issue19183@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Because you can't simple replace the files. Why not? This looks as simplest option when you build hard customized CPython. > It also contains _Py_HashBytes() and _PyHash_Fini(). _PyHash_Fini() should be moved out too._Py_HashBytes() is only function which should be customized. > I don't understand why you want me to get rid of the struct. What's your > argument against the struct? I like the PyHash_FuncDef because it groups > all information (func ptr, name, hash metadata) in a single structure. Because it is redundant and only complicates the code, both use and declaration. > > Why _Py_HashDouble() and _Py_HashPointer() are moved to pyhash.c? They are > > hash algorithm agnostic, and it is unlikely they will be redefined in > > custom build. > I have moved the functions to pyhash.c in order to keep all related > internal function in one file. They do not belong in Objects/object.c. There are other hash related functions (hashing integers, tuples). Only _Py_HashBytes() should be customized and only it worth moving to separated file. > > You not need the HAVE_ALIGNED_REQUIRED macros if use PY_UHASH_CPY (or > > something like for exact 64 bit) in siphash24. On platforms where aligned > > access is required you will use per-bytes copy, otherwise you will use > > fast 64-bit copy. > I'm not going to make siphash24 compatible with platforms that require > aligned memory for integers. It's an unnecessary complication and > slow-down for all common platforms. The feature will simply not be > available on archaic architectures. The benefit is that the code will be simpler if get rid from HAVE_ALIGNED_REQUIRED and related code in ./configure. Only on such archaic architectures hash code will be slower. > Serhiy, I would like to land my patch before beta 1 hits the fan. We can > always improve the code during beta. Right now I don't want to mess around > with SipHash24 code. That includes non-64bit platforms as well as > architectures that enforce aligned memory for integers. Let first land simplified patch and then you could add features such as PY_HASH_EXTERNAL and PyHash_FuncDef. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 18:16:58 2013 From: report at bugs.python.org (Evgeny Luttsev) Date: Mon, 28 Oct 2013 17:16:58 +0000 Subject: [issue19423] permutations len issue Message-ID: <1382980618.03.0.867834998977.issue19423@psf.upfronthosting.co.za> New submission from Evgeny Luttsev: Code: n = 2 perms = permutations(range(n), n) if list(perms) == [(0, 1), (1, 0)]: print("==") print("len(list(perms)):", len(list(perms))) Result: == len(list(perms)): 0 # SHOULD BE 2 ---------- components: Library (Lib) messages: 201556 nosy: DSblizzard priority: normal severity: normal status: open title: permutations len issue type: behavior versions: Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 18:22:39 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 28 Oct 2013 17:22:39 +0000 Subject: [issue19423] permutations len issue In-Reply-To: <1382980618.03.0.867834998977.issue19423@psf.upfronthosting.co.za> Message-ID: <1382980959.88.0.734107028584.issue19423@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: permutations() returns a generator. If you consume it with list(), the second time will return the empty list. Use list(permutations(...)) if you plan to use the result multiple times. ---------- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 18:43:22 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2013 17:43:22 +0000 Subject: [issue19424] _warnings: patch to avoid conversions from/to UTF-8 Message-ID: <1382982202.33.0.652166752386.issue19424@psf.upfronthosting.co.za> New submission from STINNER Victor: Attached patch removes usage of _PyUnicode_AsString() to not convert strings from/to UTF-8. ---------- components: Unicode files: warnings.patch keywords: patch messages: 201558 nosy: ezio.melotti, haypo priority: normal severity: normal status: open title: _warnings: patch to avoid conversions from/to UTF-8 versions: Python 3.4 Added file: http://bugs.python.org/file32395/warnings.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 18:48:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 28 Oct 2013 17:48:06 +0000 Subject: [issue19421] FileIO destructor imports indirectly the io module at exit In-Reply-To: <1382964595.86.0.735733174732.issue19421@psf.upfronthosting.co.za> Message-ID: <3d7k0d05pYz7Lp6@mail.python.org> Roundup Robot added the comment: New changeset 1bbedfb20932 by Victor Stinner in branch 'default': Issue #19421: fix a check in warnings.warn() to be able to use it during Python http://hg.python.org/cpython/rev/1bbedfb20932 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 18:50:20 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2013 17:50:20 +0000 Subject: [issue19421] FileIO destructor imports indirectly the io module at exit In-Reply-To: <1382964595.86.0.735733174732.issue19421@psf.upfronthosting.co.za> Message-ID: <1382982620.09.0.0886734049478.issue19421@psf.upfronthosting.co.za> STINNER Victor added the comment: Here is a patch to not import again the io module in _Py_DisplaySourceLine() if the module was unloaded. A simpler patch is to just return (don't check sys.modules) if _Py_Finalizing is set. Note: I also created issue #19424 to avoid conversion from/to UTF-8. ---------- keywords: +patch Added file: http://bugs.python.org/file32396/traceback_finalize.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 18:52:52 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 28 Oct 2013 17:52:52 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <526E8EB7.70101@cheimes.de> Message-ID: Charles-Fran?ois Natali added the comment: >> Well, unaligned memory access is usually slower on all architectures :-) >> Also, I think some ARM architectures don't support unaligned access, so >> it's not really a thing of the past... > > On modern computers it's either not slower or just a tiny bit slower. > http://lemire.me/blog/archives/2012/05/31/data-alignment-for-speed-myth-or-reality/ I have other benchmarks that show slowdowns of more than 40%: http://www.alexonlinux.com/aligned-vs-unaligned-memory-access Also, x86 has optimized unaligned memory accesses, but the world isn't x86-only (once again, there's ARM, and AFAICT the performance hit can be quite high). Now, I perfectly understand that you don't want to mess with the implementation, but just don't say that "unaligned access doesn't matter, and is just a tiny bit slower". IMO the compile-time check is enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 18:53:48 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2013 17:53:48 +0000 Subject: [issue19421] FileIO destructor imports indirectly the io module at exit In-Reply-To: <1382964595.86.0.735733174732.issue19421@psf.upfronthosting.co.za> Message-ID: <1382982828.69.0.63624260753.issue19421@psf.upfronthosting.co.za> STINNER Victor added the comment: > New changeset 1bbedfb20932 by Victor Stinner in branch 'default': > Issue #19421: fix a check in warnings.warn() to be able to use it during Python > http://hg.python.org/cpython/rev/1bbedfb20932 Without this fix, the following script crashs with an assertion error (Objects/typeobject.c:740: type_call: Assertion `!PyErr_Occurred()' failed.): ------------- import warnings warn = warnings.warn class A: def __del__(self): warn("bla") a=A() ------------- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 18:58:32 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 28 Oct 2013 17:58:32 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1382980537.57.0.955408809135.issue19183@psf.upfronthosting.co.za> Message-ID: <526EA5C7.8040203@cheimes.de> Christian Heimes added the comment: Am 28.10.2013 18:15, schrieb Serhiy Storchaka: > _PyHash_Fini() should be moved out too._Py_HashBytes() is only function which should be customized. You still haven' convinced me to scatter hash-related functions over multiple C files. And it won't work with a static definition of the hash function and PyHash_FuncDef. They MUST be in one object file. > Because it is redundant and only complicates the code, both use and declaration. No, I disagree with you. It makes the code less complicated because it encapsulates all related data in one place. Please provide a patch that shows the contrary. > There are other hash related functions (hashing integers, tuples). Only _Py_HashBytes() should be customized and only it worth moving to separated file. Python doesn't have a hash function for integers anymore. It has a specialized function for PyLongObject. pyhash.c contains common helper functions. > The benefit is that the code will be simpler if get rid from HAVE_ALIGNED_REQUIRED and related code in ./configure. Only on such archaic architectures hash code will be slower. And it will clutter other code... Please provide a patch and benchmarks for your proposal. I'll incorporate your patch if it have zero impact on speed and doesn't make the code harder to understand. > Let first land simplified patch and then you could add features such as PY_HASH_EXTERNAL and PyHash_FuncDef. No, I'm not going to remove code in order to re-add it later. If you don't like my PEP then please provide patches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 19:08:21 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 28 Oct 2013 18:08:21 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1382983701.95.0.0256937531954.issue19183@psf.upfronthosting.co.za> Christian Heimes added the comment: The code in your example uses volatile. That prevents lots of compiler optimizations. In my experience compilers and CPU do a better optimization job than humans until the human factor interferes with the compiler. Even 40% might not be slower than calling memcpy() for every block or processing the input byte by byte instead of uint64 by uint64... I can't comment on ARM and Barry's ARM box is dead at the moment. Distributors or users can select different and more ARM-friendly code, too. After all the hash code is easily interchangeable. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 19:10:48 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 28 Oct 2013 18:10:48 +0000 Subject: [issue19421] FileIO destructor imports indirectly the io module at exit In-Reply-To: <1382964595.86.0.735733174732.issue19421@psf.upfronthosting.co.za> Message-ID: <1382983848.99.0.837686422621.issue19421@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Again, I don't think this is a good patch. If you want to disable module imports during shutdown, it should be done inside the import machinery, not duplicated at every call site. (but I don't necessarily agree that it's a good idea, either) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 19:13:58 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 28 Oct 2013 18:13:58 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1382984038.1.0.481912848416.issue19183@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think Christian is right here. Hashing unaligned memory areas will happen quite rarely. It should work, but it doesn't have to be as fast as the common case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 19:21:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 28 Oct 2013 18:21:38 +0000 Subject: [issue19421] FileIO destructor imports indirectly the io module at exit In-Reply-To: <1382964595.86.0.735733174732.issue19421@psf.upfronthosting.co.za> Message-ID: <3d7klj3kGNzNjN@mail.python.org> Roundup Robot added the comment: New changeset 2d802765d31f by Victor Stinner in branch 'default': Issue #19421: add an unit test for warnings.warn() during finalization http://hg.python.org/cpython/rev/2d802765d31f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 19:43:54 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2013 18:43:54 +0000 Subject: [issue19421] FileIO destructor imports indirectly the io module at exit In-Reply-To: <1382964595.86.0.735733174732.issue19421@psf.upfronthosting.co.za> Message-ID: <1382985834.64.0.25564317271.issue19421@psf.upfronthosting.co.za> STINNER Victor added the comment: "Again, I don't think this is a good patch. If you want to disable module imports during shutdown, it should be done inside the import machinery, not duplicated at every call site." Ah sorry, I misunderstood your previous comment. I agree that traceback_finalize.patch is very specific. Here is a new patch "import_finalization.patch", which block importing new modules (and import again unloaded modules) during finalization. The full test suite pass with the patch, so at least no unit test tries to import a module during finalization. > (but I don't necessarily agree that it's a good idea, either) I'm opening a thread on python-dev to discuss this tricky question. ---------- Added file: http://bugs.python.org/file32397/import_finalization.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 19:46:38 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2013 18:46:38 +0000 Subject: [issue19421] FileIO destructor imports indirectly the io module at exit In-Reply-To: <1382964595.86.0.735733174732.issue19421@psf.upfronthosting.co.za> Message-ID: <1382985998.14.0.622882477701.issue19421@psf.upfronthosting.co.za> STINNER Victor added the comment: + PyErr_SetString(PyExc_ImportError, "__import__ blocked Python finalization"); Oops, I forgot "during" word before Python finalization. "import" is maybe less surprising than "__import__". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 20:06:52 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 28 Oct 2013 19:06:52 +0000 Subject: [issue16286] Use hash if available to optimize a==b and a!=b for bytes and str In-Reply-To: <1350650166.87.0.27478619259.issue16286@psf.upfronthosting.co.za> Message-ID: <1382987212.87.0.483102180044.issue16286@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > 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? Currently, none, I think. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 20:17:49 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2013 19:17:49 +0000 Subject: [issue16286] Use hash if available to optimize a==b and a!=b for bytes and str In-Reply-To: <1350650166.87.0.27478619259.issue16286@psf.upfronthosting.co.za> Message-ID: <1382987869.49.0.389318057668.issue16286@psf.upfronthosting.co.za> STINNER Victor added the comment: >> 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? > > Currently, none, I think. Strings are used (and compared) outside dict and set. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 20:24:53 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 28 Oct 2013 19:24:53 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1382988293.01.0.901341590283.issue19183@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Added file: http://bugs.python.org/file32398/b8d39bf9ca4a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 20:25:40 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 28 Oct 2013 19:25:40 +0000 Subject: [issue19072] classmethod doesn't honour descriptor protocol of wrapped callable In-Reply-To: <1379856164.11.0.6368818134.issue19072@psf.upfronthosting.co.za> Message-ID: <1382988340.14.0.769343191256.issue19072@psf.upfronthosting.co.za> Guido van Rossum added the comment: @grahamd: I occasionally have felt the pain of wrapping @classmethod (or @staticmethod). Never enough though to think of how to fix it. I really don't have the stomach to review your wrapt library, but your code looks okay except for style and missing tests. I'd also recommend adding a few words to the docs. (And yes, all of this is your responsibility -- nobody has time to do all that stuff for you.) Style-wise: - the continuation line in your patch is not properly formatted; - either the else block should also use { } or the else clause should be omitted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 21:18:37 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2013 20:18:37 +0000 Subject: [issue16286] Use hash if available to optimize a==b and a!=b for bytes and str In-Reply-To: <1350650166.87.0.27478619259.issue16286@psf.upfronthosting.co.za> Message-ID: <1382991517.7.0.585939755161.issue16286@psf.upfronthosting.co.za> STINNER Victor added the comment: Let's try to identify some use cases in the Python test suite using gdb: (gdb) b unicode_compare_eq (gdb) condition 1 ((PyASCIIObject*)str1)->hash != -1 && ((PyASCIIObject*)str2)->hash != -1 && ((PyASCIIObject*)str1)->hash != ((PyASCIIObject*)str2)->hash (gdb) run I didn't dig to understand why hash of these strings are computed. Tell me if you need more examples. Random examples: (1) compare "constant" strings (strings from co_consts of code objects) importlib._bootstrap: _setup(): os_details = ('posix', ['/']), ('nt', ['\\', '/']) for builtin_os, path_separators in os_details: ... ... if builtin_os == 'nt': <== HERE ... (2) importlib._bootstrap: _LoaderBasics.is_package() def is_package(self, fullname): filename = _path_split(self.get_filename(fullname))[1] filename_base = filename.rsplit('.', 1)[0] tail_name = fullname.rpartition('.')[2] return filename_base == '__init__' and ... <== HERE It's surprising that filename_base has its hash computed. I suppose that all these functions (_path_split, .rsplit, .rpartition) return the string unmodified. (3) importlib._bootstrap: PathFinder._path_importer_cache(): @classmethod def _path_importer_cache(cls, path): ... if path == '': <== HERE path is an entry of sys.path. (4) str in __all__ (list of str): os.py: if "putenv" not in __all__: __all__.append("putenv") __all__ is a list of strings. (5) site.py: if __name__ == '__main__': <== HERE __name__ is 'site'. (6) Python/ceval.py: PyEval_EvalCodeEx() called with arbitrary keyword for (i = 0; i < kwcount; i++) { PyObject **co_varnames; PyObject *keyword = kws[2*i]; PyObject *value = kws[2*i + 1]; int j; ... /* Speed hack: do raw pointer compares. As names are normally interned this should almost always hit. */ co_varnames = ((PyTupleObject *)(co->co_varnames))->ob_item; for (j = 0; j < total_args; j++) { PyObject *nm = co_varnames[j]; if (nm == keyword) goto kw_found; } /* Slow fallback, just in case */ for (j = 0; j < total_args; j++) { PyObject *nm = co_varnames[j]; int cmp = PyObject_RichCompareBool( <== HERE keyword, nm, Py_EQ); if (cmp > 0) goto kw_found; else if (cmp < 0) goto fail; } It looks like the "just in case" path is taken. (gdb) where #0 unicode_compare_eq (str1='isTest', str2='func') at Objects/unicodeobject.c:10532 #1 0x000000000052dd41 in PyUnicode_RichCompare (left='isTest', right='func', op=2) at Objects/unicodeobject.c:10609 #2 0x00000000004be4db in do_richcompare (v='isTest', w='func', op=2) at Objects/object.c:647 #3 0x00000000004be790 in PyObject_RichCompare (v='isTest', w='func', op=2) at Objects/object.c:696 #4 0x00000000004be832 in PyObject_RichCompareBool (v='isTest', w='func', op=2) at Objects/object.c:718 #5 0x00000000005a0f68 in PyEval_EvalCodeEx (...) at Python/ceval.c:3450 ... Traceback (most recent call first): File "/home/haypo/prog/python/default/Lib/test/test_xml_etree.py", line 1669, in test_get_keyword_args e1 = ET.Element('foo' , x=1, y=2, z=3) ElementTree.Element() accepts arbitary keywords. (7) letter==letter singletons: xml.etree.ElementPath: iterfind() def iterfind(elem, path, namespaces=None): ... if path[-1:] == "/": <== HERE Traceback (most recent call first): File "/home/haypo/prog/python/default/Lib/xml/etree/ElementPath.py", line 254, in iterfind if path[-1:] == "/": path is ".//grandchild", path[-1] is 'd' which is a singleton, Python already computed the hash of 'd'. Similar example in the same file: def xpath_tokenizer(pattern, namespaces=None): for token in xpath_tokenizer_re.findall(pattern): tag = token[1] if tag and tag[0] != "{" and ":" in tag: <== HERE ... tag[0] != "{" <= tag is 'grandchild', tag[0] is a singleton. Another example: Traceback (most recent call first): File "/home/haypo/prog/python/default/Lib/sre_parse.py", line 194, in __next if char == "\\": (8) str not in (list of str), test_descr.py: test_dir(): File "/home/haypo/prog/python/default/Lib/test/test_descr.py", line 2255, in names = [x for x in dir(minstance) if x not in default_attributes] minstance = M("m") minstance.b = 2 minstance.a = 1 default_attributes = ['__name__', '__doc__', '__package__', '__loader__'] names = [x for x in dir(minstance) if x not in default_attributes] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 21:24:21 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 28 Oct 2013 20:24:21 +0000 Subject: [issue17936] O(n**2) behaviour when adding/removing classes In-Reply-To: <1368028726.5.0.833825784859.issue17936@psf.upfronthosting.co.za> Message-ID: <1382991861.97.0.0904505783441.issue17936@psf.upfronthosting.co.za> Antoine Pitrou added the comment: For the record, an updated patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 21:24:33 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 28 Oct 2013 20:24:33 +0000 Subject: [issue17936] O(n**2) behaviour when adding/removing classes In-Reply-To: <1368028726.5.0.833825784859.issue17936@psf.upfronthosting.co.za> Message-ID: <1382991873.31.0.0437138327362.issue17936@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Added file: http://bugs.python.org/file32399/subclasses_dict2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 21:31:16 2013 From: report at bugs.python.org (Tim Golden) Date: Mon, 28 Oct 2013 20:31:16 +0000 Subject: [issue19418] audioop.c giving signed/unsigned warnings on Windows In-Reply-To: <1382903078.0.0.055907083151.issue19418@psf.upfronthosting.co.za> Message-ID: <1382992276.73.0.179795460094.issue19418@psf.upfronthosting.co.za> Tim Golden added the comment: The attached patch (using Tim Peters' -1 trick) builds & tests ok on Win32/64 & Linux 32. ---------- Added file: http://bugs.python.org/file32400/issue19418.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 21:31:26 2013 From: report at bugs.python.org (Tim Golden) Date: Mon, 28 Oct 2013 20:31:26 +0000 Subject: [issue19418] audioop.c giving signed/unsigned warnings on Windows In-Reply-To: <1382903078.0.0.055907083151.issue19418@psf.upfronthosting.co.za> Message-ID: <1382992286.93.0.76773198272.issue19418@psf.upfronthosting.co.za> Changes by Tim Golden : Removed file: http://bugs.python.org/file32390/audioop.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 21:37:00 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2013 20:37:00 +0000 Subject: [issue19418] audioop.c giving signed/unsigned warnings on Windows In-Reply-To: <1382903078.0.0.055907083151.issue19418@psf.upfronthosting.co.za> Message-ID: <1382992620.83.0.595146350063.issue19418@psf.upfronthosting.co.za> STINNER Victor added the comment: You should add a comment to explain why the trick is required (because of compilers not supporting -0x80000000 literal without a warning). ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 21:46:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 28 Oct 2013 20:46:06 +0000 Subject: [issue19395] unpickled LZMACompressor is crashy In-Reply-To: <1382728843.86.0.270938771254.issue19395@psf.upfronthosting.co.za> Message-ID: <3d7nyP1btFzRld@mail.python.org> Roundup Robot added the comment: New changeset be363c1e94fe by Nadeem Vawda in branch '3.3': #19395: Raise exception when pickling a (BZ2|LZMA)(Compressor|Decompressor). http://hg.python.org/cpython/rev/be363c1e94fe New changeset b9df25608ad0 by Nadeem Vawda in branch 'default': #19395: Raise exception when pickling a (BZ2|LZMA)(Compressor|Decompressor). http://hg.python.org/cpython/rev/b9df25608ad0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 21:47:20 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2013 20:47:20 +0000 Subject: [issue16286] Use hash if available to optimize a==b and a!=b for bytes and str In-Reply-To: <1350650166.87.0.27478619259.issue16286@psf.upfronthosting.co.za> Message-ID: <1382993240.76.0.301001187611.issue16286@psf.upfronthosting.co.za> STINNER Victor added the comment: """ (4) str in __all__ (list of str): os.py: if "putenv" not in __all__: __all__.append("putenv") """ For this example: "putenv" is probably interned by "def putenv(...)". "putenv" string and the name of the function are the same constant. When a function is defined, it is stored in the locals dictionary, so the key ("putenv") is interned by PyDict_SetItem(). So dict is not used explicitly, but implicitly by the namespace. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 21:49:56 2013 From: report at bugs.python.org (Tim Golden) Date: Mon, 28 Oct 2013 20:49:56 +0000 Subject: [issue19418] audioop.c giving signed/unsigned warnings on Windows In-Reply-To: <1382903078.0.0.055907083151.issue19418@psf.upfronthosting.co.za> Message-ID: <1382993396.49.0.932298167711.issue19418@psf.upfronthosting.co.za> Tim Golden added the comment: Good point. Updated patch. ---------- Added file: http://bugs.python.org/file32401/issue19418.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 21:50:22 2013 From: report at bugs.python.org (Tim Golden) Date: Mon, 28 Oct 2013 20:50:22 +0000 Subject: [issue19418] audioop.c giving signed/unsigned warnings on Windows In-Reply-To: <1382903078.0.0.055907083151.issue19418@psf.upfronthosting.co.za> Message-ID: <1382993422.07.0.519807012041.issue19418@psf.upfronthosting.co.za> Changes by Tim Golden : Removed file: http://bugs.python.org/file32400/issue19418.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 21:53:20 2013 From: report at bugs.python.org (Nadeem Vawda) Date: Mon, 28 Oct 2013 20:53:20 +0000 Subject: [issue19425] multiprocessing.Pool.map hangs if pickling argument raises an exception Message-ID: <1382993600.07.0.457043884455.issue19425@psf.upfronthosting.co.za> New submission from Nadeem Vawda: [Split off from issue 19395] The following code hangs after hitting a TypeError trying to pickle one of the TextIOWrapper objects: import multiprocessing def read(f): return f.read() files = [open(path) for path in 3 * ['/dev/null']] pool = multiprocessing.Pool() results = pool.map(read, files) print(results) This issue is present in 3.2, 3.3 and 3.4, but not in 2.7. ---------- components: Library (Lib) messages: 201580 nosy: cantor, jnoller, nadeem.vawda, pitrou, python-dev, sbt, tim.peters priority: normal severity: normal stage: needs patch status: open title: multiprocessing.Pool.map hangs if pickling argument raises an exception type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 21:53:56 2013 From: report at bugs.python.org (Nadeem Vawda) Date: Mon, 28 Oct 2013 20:53:56 +0000 Subject: [issue19395] unpickled LZMACompressor is crashy In-Reply-To: <1382728843.86.0.270938771254.issue19395@psf.upfronthosting.co.za> Message-ID: <1382993636.76.0.853763471671.issue19395@psf.upfronthosting.co.za> Nadeem Vawda added the comment: The part of this issue specific to LZMACompressor should now be fixed; I've filed issue 19425 for the issue with Pool.map hanging. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 22:11:30 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Oct 2013 21:11:30 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1382994690.45.0.430991097194.issue19183@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is simplified version of the patch. 19427e9cc500.diff: 22 files changed, 746 insertions(+), 211 deletions(-), 28 modifications(!) 19427e9cc500-simplified.diff: 21 files changed, 486 insertions(+), 67 deletions(-), 27 modifications(!) ---------- Added file: http://bugs.python.org/file32402/19427e9cc500-simplified.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 22:18:28 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2013 21:18:28 +0000 Subject: [issue19229] operator.py: move the Python implementation in the else block of try/except ImportError In-Reply-To: <1381535351.94.0.0685942795619.issue19229@psf.upfronthosting.co.za> Message-ID: <1382995108.54.0.0424692776812.issue19229@psf.upfronthosting.co.za> STINNER Victor added the comment: > Another option is to add a _pyoperator module. Attached builtin_operator.patch patch implements this option: operator.c becomes the main operator module, _pyoperator is the pure Python implementation (don't use "from _operator import *" anymore). With the patch: $ ./python -m timeit "import sys; modname='_pyoperator'" "__import__(modname); del sys.modules[modname]" 1000 loops, best of 3: 276 usec per loop $ ./python -m timeit "import sys; modname='operator'" "__import__(modname); del sys.modules[modname]" 10000 loops, best of 3: 22.7 usec per loop The patch is huge because files are renamed: see builtin_operator_diff.patch for the diff. ---------- keywords: +patch Added file: http://bugs.python.org/file32403/builtin_operator.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 22:18:39 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2013 21:18:39 +0000 Subject: [issue19229] operator.py: move the Python implementation in the else block of try/except ImportError In-Reply-To: <1381535351.94.0.0685942795619.issue19229@psf.upfronthosting.co.za> Message-ID: <1382995119.62.0.822532775597.issue19229@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file32404/builtin_operator_diff.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 22:21:12 2013 From: report at bugs.python.org (Nadeem Vawda) Date: Mon, 28 Oct 2013 21:21:12 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1382995272.35.0.771002210365.issue19227@psf.upfronthosting.co.za> Changes by Nadeem Vawda : ---------- nosy: +nadeem.vawda _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 22:21:53 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Oct 2013 21:21:53 +0000 Subject: [issue19418] audioop.c giving signed/unsigned warnings on Windows In-Reply-To: <1382903078.0.0.055907083151.issue19418@psf.upfronthosting.co.za> Message-ID: <1382995313.43.0.231694485171.issue19418@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 22:22:18 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2013 21:22:18 +0000 Subject: [issue19229] operator.py: move the Python implementation in the else block of try/except ImportError In-Reply-To: <1381535351.94.0.0685942795619.issue19229@psf.upfronthosting.co.za> Message-ID: <1382995338.8.0.0685335674924.issue19229@psf.upfronthosting.co.za> STINNER Victor added the comment: Without the patch: $ ./python -m timeit "import sys; modname='operator'" "__import__(modname); del sys.modules[modname]" 1000 loops, best of 3: 289 usec per loop $ ./python -m timeit "import sys; modname='_operator'" "__import__(modname); del sys.modules[modname]" 10000 loops, best of 3: 21.4 usec per loop "import operator" is 12.7x faster (289 usec => 22.7 usec) with builtin_operator.patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 23:29:31 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 28 Oct 2013 22:29:31 +0000 Subject: [issue19426] Opening a file in IDLE causes a crash or hang Message-ID: <1382999371.02.0.697524502707.issue19426@psf.upfronthosting.co.za> New submission from Ned Deily: Using current IDLE in 2.7 tip (as in 2.7.6rc1), selecting a file to open in the IDLE menu or on the command line cause IDLE to either (depending on the platform and invocation) crash or hang due to an uncaught exception in idlelib/IOBinding.py: /usr/local/bin/idle2.7 a.py Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1470, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/IOBinding.py", line 222, in open flist.open(filename) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/FileList.py", line 36, in open return self.EditorWindow(self, filename, key) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/PyShell.py", line 131, in __init__ EditorWindow.__init__(self, *args) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 323, in __init__ io.loadfile(filename) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/IOBinding.py", line 258, in loadfile chars = self.decode(chars) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/IOBinding.py", line 296, in decode enc = coding_spec(chars) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/IOBinding.py", line 129, in coding_spec for line in lst: NameError: global name 'lst' is not defined The culprit is 3d46ef0c62c5 for Issue18873 which did a faulty backport of a change from the 3.x branches. ---------- assignee: serhiy.storchaka components: IDLE messages: 201586 nosy: benjamin.peterson, ned.deily, serhiy.storchaka priority: release blocker severity: normal stage: needs patch status: open title: Opening a file in IDLE causes a crash or hang versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 23:54:52 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 28 Oct 2013 22:54:52 +0000 Subject: [issue19385] dbm.dumb should be consistent when the database is closed In-Reply-To: <1382683121.03.0.174486602388.issue19385@psf.upfronthosting.co.za> Message-ID: <1383000892.37.0.0594760973308.issue19385@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 00:05:46 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 28 Oct 2013 23:05:46 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1383001546.73.0.344174417948.issue19183@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 00:09:55 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 28 Oct 2013 23:09:55 +0000 Subject: [issue19421] FileIO destructor imports indirectly the io module at exit In-Reply-To: <1382964595.86.0.735733174732.issue19421@psf.upfronthosting.co.za> Message-ID: <1383001795.85.0.155981302038.issue19421@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 00:10:23 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 28 Oct 2013 23:10:23 +0000 Subject: [issue19424] _warnings: patch to avoid conversions from/to UTF-8 In-Reply-To: <1382982202.33.0.652166752386.issue19424@psf.upfronthosting.co.za> Message-ID: <1383001823.16.0.485043168858.issue19424@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 00:11:33 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 28 Oct 2013 23:11:33 +0000 Subject: [issue19410] Restore empty string special casing in importlib.machinery.FileFinder In-Reply-To: <1382801910.68.0.88492101144.issue19410@psf.upfronthosting.co.za> Message-ID: <1383001893.37.0.405160469168.issue19410@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 00:12:22 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 28 Oct 2013 23:12:22 +0000 Subject: [issue17762] platform.linux_distribution() should honor /etc/os-release In-Reply-To: <1366124468.64.0.40642643299.issue17762@psf.upfronthosting.co.za> Message-ID: <1383001942.07.0.525438854257.issue17762@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 00:14:22 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 28 Oct 2013 23:14:22 +0000 Subject: [issue17441] Do not cache re.compile In-Reply-To: <1363468136.42.0.6196791543.issue17441@psf.upfronthosting.co.za> Message-ID: <1383002062.22.0.177718302969.issue17441@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 00:16:08 2013 From: report at bugs.python.org (Richard Neill) Date: Mon, 28 Oct 2013 23:16:08 +0000 Subject: [issue19427] enhancement: dictionary maths Message-ID: <1383002168.86.0.538679547353.issue19427@psf.upfronthosting.co.za> New submission from Richard Neill: It would be really nice if python supported mathematical operations on dictionaries. This is widely requested (eg lots of stackoverflow queries), but there's currently no simple way to do it. I propose that this should work in the "obvious" way, i.e. for every key in common between the dicts, apply the operator to the set of values. If the dicts have some keys that are not in common, then create the missing keys, with a value of zero (which does sensible things for +,-,* and will throw an error if missing element is a divisor). It should also allow a dict to be added/multiplied etc with a scalar. If the dict contains anything other than key:value pairs (i.e. the values are non-scalar types), then this should throw an error. For example: >>> d1 = { 'a':1, 'b':2, 'c':3} >>> d2 = { 'a':4, 'b':5, 'c':6} >>> d3 = d1 + d2 >>> d3 {'a': 5, 'b': 7, 'c': 9} >>> d4 = d1 + 17 >>> d4 {'a': 18, 'b': 19, 'c': 20} >>> d5 = { 'a':4, 'b':5, 'x':6} >>> d6 = d1 + d5 >>> d6 {'a': 5, 'b': 7, 'c': 3, 'x': 6} Perhaps this might need an "import dictionarymath" to enable the behaviour. Thanks for your consideration of my idea. ---------- components: Interpreter Core messages: 201587 nosy: Richard.Neill priority: normal severity: normal status: open title: enhancement: dictionary maths type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 00:19:32 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 28 Oct 2013 23:19:32 +0000 Subject: [issue10734] test_ttk test_heading_callback fails with newer Tk 8.5 In-Reply-To: <1292706922.45.0.208964037247.issue10734@psf.upfronthosting.co.za> Message-ID: <1383002372.09.0.154432774645.issue10734@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 00:19:41 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 28 Oct 2013 23:19:41 +0000 Subject: [issue18964] test_tcl fails when _tkinter linked with Tcl 8.4 In-Reply-To: <1378590331.21.0.150230107781.issue18964@psf.upfronthosting.co.za> Message-ID: <1383002381.94.0.779799683014.issue18964@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 00:21:43 2013 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 28 Oct 2013 23:21:43 +0000 Subject: [issue19427] enhancement: dictionary maths In-Reply-To: <1383002168.86.0.538679547353.issue19427@psf.upfronthosting.co.za> Message-ID: <1383002503.93.0.734390353644.issue19427@psf.upfronthosting.co.za> Eric V. Smith added the comment: I suggest you get consensus on this idea on the python-ideas mailing list first. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 00:22:31 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 28 Oct 2013 23:22:31 +0000 Subject: [issue19413] Reload semantics changed unexpectedly in Python 3.3 In-Reply-To: <1382843791.56.0.901507046365.issue19413@psf.upfronthosting.co.za> Message-ID: <1383002551.32.0.601958954166.issue19413@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 00:24:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 28 Oct 2013 23:24:43 +0000 Subject: [issue19425] multiprocessing.Pool.map hangs if pickling argument raises an exception In-Reply-To: <1382993600.07.0.457043884455.issue19425@psf.upfronthosting.co.za> Message-ID: <3d7sT16jLwzN41@mail.python.org> Roundup Robot added the comment: New changeset 6aa42fc0c2f6 by Richard Oudkerk in branch '2.7': Issue #19425 -- a pickling error should not cause pool to hang. http://hg.python.org/cpython/rev/6aa42fc0c2f6 New changeset a2230a8420a5 by Richard Oudkerk in branch '3.3': Issue #19425 -- a pickling error should not cause pool to hang. http://hg.python.org/cpython/rev/a2230a8420a5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 00:52:12 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 28 Oct 2013 23:52:12 +0000 Subject: [issue19425] multiprocessing.Pool.map hangs if pickling argument raises an exception In-Reply-To: <1382993600.07.0.457043884455.issue19425@psf.upfronthosting.co.za> Message-ID: <1383004332.13.0.794621307201.issue19425@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 29 01:02:20 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 00:02:20 +0000 Subject: [issue18509] CJK decoders should return MBERR_EXCEPTION on PyUnicodeWriter error In-Reply-To: <1374271247.45.0.0168623931287.issue18509@psf.upfronthosting.co.za> Message-ID: <3d7tJr1zsbz7LjM@mail.python.org> Roundup Robot added the comment: New changeset f63d34cd3714 by Victor Stinner in branch 'default': Issue #18509: handle PyUnicode_Writer() error http://hg.python.org/cpython/rev/f63d34cd3714 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 01:02:43 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2013 00:02:43 +0000 Subject: [issue18509] CJK decoders should return MBERR_EXCEPTION on PyUnicodeWriter error In-Reply-To: <1374271247.45.0.0168623931287.issue18509@psf.upfronthosting.co.za> Message-ID: <1383004963.64.0.864860344646.issue18509@psf.upfronthosting.co.za> STINNER Victor added the comment: I should now be fixed. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 01:10:27 2013 From: report at bugs.python.org (alon horev) Date: Tue, 29 Oct 2013 00:10:27 +0000 Subject: [issue4331] Add functools.partialmethod In-Reply-To: <1226817180.09.0.841012218041.issue4331@psf.upfronthosting.co.za> Message-ID: <1383005427.7.0.971127509692.issue4331@psf.upfronthosting.co.za> alon horev added the comment: Adding a patch with tests and documentation. Please feel free to comment on anything: my English, coding/testing style. I'm pretty sure the documentation can be better but it turns out I speak better Python than English. Two decisions I've made and unsure of: 1. I didn't use @wraps or copied attributes from the wrapped function (__doc__, __dict__) to the partialmethod object. This is intentionally so partial and partialmethod would have similar semantics. 2. I've implemented a __repr__ although in all cases __get__ returns a partial object or bound method. I consider it nice for debugging when looking at an object's __dict__. ---------- Added file: http://bugs.python.org/file32405/4331.v1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 01:19:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 00:19:57 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3d7tj86FwgzM9M@mail.python.org> Roundup Robot added the comment: New changeset 4ef4578db38a by Victor Stinner in branch 'default': Issue #18408: Add a new PyFrame_FastToLocalsWithError() function to handle http://hg.python.org/cpython/rev/4ef4578db38a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 01:20:51 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2013 00:20:51 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1383006051.27.0.644517881069.issue18408@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, most critical bugs have been fixed. If I find new bugs, I will open new issues. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 01:41:28 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2013 00:41:28 +0000 Subject: [issue19428] marshal: error cases are not documented Message-ID: <1383007288.06.0.856513082934.issue19428@psf.upfronthosting.co.za> New submission from STINNER Victor: Since changeset 4059e871e74e (issue #19219), it becomes more clear in the source code that reading data from marshal can fail. It was already true in Python 3.3, but less explicit. Failures are not documented in Doc/c-api/marshal.rst. Failures are not tested in zipimport.c, maybe also in other files. ---------- messages: 201595 nosy: haypo, pitrou priority: normal severity: normal status: open title: marshal: error cases are not documented versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 01:46:41 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 00:46:41 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3d7vJ05pG3zS11@mail.python.org> Roundup Robot added the comment: New changeset e1d51c42e5a1 by Victor Stinner in branch 'default': Issue #18408: Fix PyUnicode_AsUTF8AndSize(), raise MemoryError exception on http://hg.python.org/cpython/rev/e1d51c42e5a1 New changeset 7f4a976829f1 by Victor Stinner in branch 'default': Issue #18408: Fix zipimport, handle PyUnicode_Substring() and get_subname() failures http://hg.python.org/cpython/rev/7f4a976829f1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 01:47:03 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 00:47:03 +0000 Subject: [issue19428] marshal: error cases are not documented In-Reply-To: <1383007288.06.0.856513082934.issue19428@psf.upfronthosting.co.za> Message-ID: <3d7vJ143plzS11@mail.python.org> Roundup Robot added the comment: New changeset 11958c69a4b2 by Victor Stinner in branch 'default': Issue #19428: zipimport now handles errors when reading truncated or invalid http://hg.python.org/cpython/rev/11958c69a4b2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 02:43:26 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2013 01:43:26 +0000 Subject: [issue19429] OSError constructor does not handle errors correctly Message-ID: <1383011006.26.0.841503225462.issue19429@psf.upfronthosting.co.za> New submission from STINNER Victor: Using failmalloc project to inject MemoryError, I found a reference counter issue in OSError constructor. args parameter passed to OSError_new() becomes invalid when OSError constructor fails. I don't yet where is the bug exactly. Traces when the bug occurs in test_urllib: (gdb) where ... #2 0x0000000000423f80 in Py_FatalError (msg=0x7ffffffd68e0 "Python/ceval.c:4456 object at 0x7fffed6c4ef8 has negative ref count -1") at Python/pythonrun.c:2531 #3 0x00000000004bd47f in _Py_NegativeRefcount (fname=0x686618 "Python/ceval.c", lineno=4456, op=(((0x0,),),)) at Objects/object.c:197 #4 0x00000000005a544d in do_call (func=, pp_stack=0x7ffffffd6ba8, na=1, nk=0) at Python/ceval.c:4456 #5 0x00000000005a4624 in call_function (pp_stack=0x7ffffffd6ba8, oparg=1) at Python/ceval.c:4252 #6 0x000000000059c96e in PyEval_EvalFrameEx (f= ... (gdb) frame 4 #4 0x00000000005a544d in do_call (func=, pp_stack=0x7ffffffd6ba8, na=1, nk=0) at Python/ceval.c:4456 4456 Py_XDECREF(callargs); (gdb) print callargs $12 = (((0x0,),),) (gdb) print _PyObject_Dump(func) object : type : type refcount: 16 address : 0xcb0728 $10 = void ---------- messages: 201598 nosy: haypo priority: normal severity: normal status: open title: OSError constructor does not handle errors correctly versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 02:44:03 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 01:44:03 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3d7wZB5LjpzSF5@mail.python.org> Roundup Robot added the comment: New changeset 4749c3ac0654 by Victor Stinner in branch 'default': Issue #18408: Fix iobase_readline(), handle PyByteArray_Resize() failure http://hg.python.org/cpython/rev/4749c3ac0654 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 03:06:42 2013 From: report at bugs.python.org (Eric Snow) Date: Tue, 29 Oct 2013 02:06:42 +0000 Subject: [issue19413] Reload semantics changed unexpectedly in Python 3.3 In-Reply-To: <1382843791.56.0.901507046365.issue19413@psf.upfronthosting.co.za> Message-ID: <1383012402.7.0.485826537896.issue19413@psf.upfronthosting.co.za> Eric Snow added the comment: Here's an updated patch. ---------- Added file: http://bugs.python.org/file32406/reload-semantics.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 03:06:53 2013 From: report at bugs.python.org (Eric Snow) Date: Tue, 29 Oct 2013 02:06:53 +0000 Subject: [issue19413] Reload semantics changed unexpectedly in Python 3.3 In-Reply-To: <1382843791.56.0.901507046365.issue19413@psf.upfronthosting.co.za> Message-ID: <1383012413.3.0.503794440203.issue19413@psf.upfronthosting.co.za> Changes by Eric Snow : Removed file: http://bugs.python.org/file32385/reload-semantics.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 03:51:42 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 02:51:42 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3d7y3q580SzQkQ@mail.python.org> Roundup Robot added the comment: New changeset 549cd815bf8d by Victor Stinner in branch 'default': Issue #18408: Fix error handling in PyBytes_FromObject() http://hg.python.org/cpython/rev/549cd815bf8d New changeset 9d9371d4ff7b by Victor Stinner in branch 'default': Issue #18408: Fix bytearrayiter.partition()/rpartition(), handle http://hg.python.org/cpython/rev/9d9371d4ff7b New changeset 20cd15a28ad3 by Victor Stinner in branch 'default': Issue #18408: Fix _ctypes_alloc_format_string(), raise MemoryError on memory http://hg.python.org/cpython/rev/20cd15a28ad3 New changeset 1386fb31c0ed by Victor Stinner in branch 'default': Issue #18408: Fix PyCStructUnionType_update_stgdict(), handle http://hg.python.org/cpython/rev/1386fb31c0ed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 05:43:26 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 29 Oct 2013 04:43:26 +0000 Subject: [issue18964] test_tcl fails when _tkinter linked with Tcl 8.4 In-Reply-To: <1378590331.21.0.150230107781.issue18964@psf.upfronthosting.co.za> Message-ID: <1383021806.64.0.769548141541.issue18964@psf.upfronthosting.co.za> Georg Brandl added the comment: Should be done. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 06:09:20 2013 From: report at bugs.python.org (Andrei Dorian Duma) Date: Tue, 29 Oct 2013 05:09:20 +0000 Subject: [issue17762] platform.linux_distribution() should honor /etc/os-release In-Reply-To: <1366124468.64.0.40642643299.issue17762@psf.upfronthosting.co.za> Message-ID: <1383023360.86.0.915078315921.issue17762@psf.upfronthosting.co.za> Andrei Dorian Duma added the comment: Yes, I will provide a patch including tests soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 06:35:00 2013 From: report at bugs.python.org (Eric Snow) Date: Tue, 29 Oct 2013 05:35:00 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1383024900.95.0.134154138716.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: Here's an updated patch that implements the meat of the current PEP. Docs are still lacking and I could probably add a few more tests. Other key things left to do: * deprecations and removals * refactor importlib finders and loaders to use the new Finder/Loader APIs * refactor pythonrun.c to make use of __spec__ * adjust other APIs to use __spec__ (pickle, etc.) ---------- Added file: http://bugs.python.org/file32407/modulespec-primary-changes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 06:39:24 2013 From: report at bugs.python.org (Eric Snow) Date: Tue, 29 Oct 2013 05:39:24 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1383025164.01.0.360296198441.issue18864@psf.upfronthosting.co.za> Changes by Eric Snow : Removed file: http://bugs.python.org/file32407/modulespec-primary-changes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 06:40:31 2013 From: report at bugs.python.org (Eric Snow) Date: Tue, 29 Oct 2013 05:40:31 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1383025231.23.0.782887908683.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: This time against tip. :) I should also point out that this patch is on top of the path in issue19413. ---------- Added file: http://bugs.python.org/file32408/modulespec-primary-changes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 07:46:15 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 29 Oct 2013 06:46:15 +0000 Subject: [issue19427] enhancement: dictionary maths In-Reply-To: <1383002168.86.0.538679547353.issue19427@psf.upfronthosting.co.za> Message-ID: <1383029175.24.0.851410260861.issue19427@psf.upfronthosting.co.za> R. David Murray added the comment: In the meantime the issue should be closed. It can be reopened if consensus is reached. ---------- nosy: +r.david.murray resolution: -> postponed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 07:57:41 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 29 Oct 2013 06:57:41 +0000 Subject: [issue19427] enhancement: dictionary maths In-Reply-To: <1383002168.86.0.538679547353.issue19427@psf.upfronthosting.co.za> Message-ID: <1383029861.18.0.664817645727.issue19427@psf.upfronthosting.co.za> Georg Brandl added the comment: This specialized use case has no chance of being added to the very general dict object. But have a look at the collections.Counter class which does exactly what you propose for positive values and the +/- operations. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 08:00:28 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 29 Oct 2013 07:00:28 +0000 Subject: [issue19428] marshal: error cases are not documented In-Reply-To: <1383007288.06.0.856513082934.issue19428@psf.upfronthosting.co.za> Message-ID: <1383030028.39.0.493914691726.issue19428@psf.upfronthosting.co.za> Georg Brandl added the comment: Is this backportable? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 08:16:10 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 07:16:10 +0000 Subject: [issue19416] NNTP page has incorrect links In-Reply-To: <1382879905.74.0.020204746466.issue19416@psf.upfronthosting.co.za> Message-ID: <3d83xP2Py5z7LjR@mail.python.org> Roundup Robot added the comment: New changeset 6b2352f1d365 by Georg Brandl in branch '2.7': Closes #19416: fix references in the nntplib docs. http://hg.python.org/cpython/rev/6b2352f1d365 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 08:18:48 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 07:18:48 +0000 Subject: [issue19416] NNTP page has incorrect links In-Reply-To: <1382879905.74.0.020204746466.issue19416@psf.upfronthosting.co.za> Message-ID: <3d840R56Xdz7LjS@mail.python.org> Roundup Robot added the comment: New changeset 03fa1b0af343 by Georg Brandl in branch '3.3': Closes #19416: fix references in the nntplib docs. http://hg.python.org/cpython/rev/03fa1b0af343 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 09:15:44 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 08:15:44 +0000 Subject: [issue19426] Opening a file in IDLE causes a crash or hang In-Reply-To: <1382999371.02.0.697524502707.issue19426@psf.upfronthosting.co.za> Message-ID: <3d85Fl19L4z7LjM@mail.python.org> Roundup Robot added the comment: New changeset 7fde94ad5df4 by Serhiy Storchaka in branch '2.7': Issue #19426: Fixed the opening of Python source file with specified encoding. http://hg.python.org/cpython/rev/7fde94ad5df4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 09:17:13 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Oct 2013 08:17:13 +0000 Subject: [issue19426] Opening a file in IDLE causes a crash or hang In-Reply-To: <1382999371.02.0.697524502707.issue19426@psf.upfronthosting.co.za> Message-ID: <1383034633.0.0.12227400939.issue19426@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Ned. Definitely IDLE needs more unit tests. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 10:24:57 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 29 Oct 2013 09:24:57 +0000 Subject: [issue17936] O(n**2) behaviour when adding/removing classes In-Reply-To: <1368028726.5.0.833825784859.issue17936@psf.upfronthosting.co.za> Message-ID: <1383038697.05.0.182797561336.issue17936@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Just updating for recent changes, right? LGTM. Shouldn't this just get committed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 10:43:13 2013 From: report at bugs.python.org (telmich) Date: Tue, 29 Oct 2013 09:43:13 +0000 Subject: [issue19430] argparse replaces \$ to is passed Message-ID: <1383039793.25.0.714624843985.issue19430@psf.upfronthosting.co.za> New submission from telmich: When using argparse and the string \$ occurs on the commandline, it is converted to $. This as definitely wrong and renders argparse useless, if the input needs to be trusted (i.e. defitinely the same as given into it)' Example code: import sys import argparse parser = argparse.ArgumentParser() parser.add_argument('test', nargs='*') result = parser.parse_args(sys.argv[1:]) print("args = %s" % " ".join(sys.argv)) print("result = %s" % result) Reproduce problem: [10:41] bento:~% python3 argparse-test.py ps1 "PS1='[\t] \[\033[1m\]\h\[\033[0m\]:\w\$ '" ] \[\]\h\[\]:\w\$ '"args = argparse-test.py ps1 PS1='[\t] \[\033[1m\]\h\[\033[0m\]:\w$ ' result = Namespace(test=['ps1', "PS1='[\\t] \\[\\033[1m\\]\\h\\[\\033[0m\\]:\\w$ '"]) [10:40] bento:cdist% python --version Python 3.3.2 ---------- components: Library (Lib) messages: 201614 nosy: telmich priority: normal severity: normal status: open title: argparse replaces \$ to is passed type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 10:43:29 2013 From: report at bugs.python.org (telmich) Date: Tue, 29 Oct 2013 09:43:29 +0000 Subject: [issue19430] argparse replaces \$ with $ (if in commandline) In-Reply-To: <1383039793.25.0.714624843985.issue19430@psf.upfronthosting.co.za> Message-ID: <1383039809.33.0.364978327758.issue19430@psf.upfronthosting.co.za> Changes by telmich : ---------- title: argparse replaces \$ to is passed -> argparse replaces \$ with $ (if in commandline) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 10:45:11 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 29 Oct 2013 09:45:11 +0000 Subject: [issue17936] O(n**2) behaviour when adding/removing classes In-Reply-To: <1368028726.5.0.833825784859.issue17936@psf.upfronthosting.co.za> Message-ID: <1383039911.12.0.925150027449.issue17936@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I see I haven't addressed your previous comment about PyErr_Clear(), I should probably address it before anything gets committed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 10:45:56 2013 From: report at bugs.python.org (telmich) Date: Tue, 29 Oct 2013 09:45:56 +0000 Subject: [issue19430] argparse replaces \$ with $ (if in commandline) In-Reply-To: <1383039793.25.0.714624843985.issue19430@psf.upfronthosting.co.za> Message-ID: <1383039956.76.0.904392606213.issue19430@psf.upfronthosting.co.za> telmich added the comment: Background information: cdist is written in python 3 and makes heavy use of argparse. One common task is to run a cdist type with some arguments, which in the end configure a remote system. We triggered the bug by running __line ps1 --file /etc/bash.bashrc --line "PS1='[\t] \[\033[1m\]\h\[\033[0m\]:\w\$ '" which should have ensured that the line is found in /etc/bash.bashrc. But in reality we found PS1='[\t] \[\033[1m\]\h\[\033[0m\]:\w$ ' instead of PS1='[\t] \[\033[1m\]\h\[\033[0m\]:\w\$ ' This is a rather nasty bug, as you would not suspect argparse doing that and dig through all your code looking for errors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 10:49:56 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 29 Oct 2013 09:49:56 +0000 Subject: [issue19430] argparse replaces \$ with $ (if in commandline) In-Reply-To: <1383039793.25.0.714624843985.issue19430@psf.upfronthosting.co.za> Message-ID: <1383040196.5.0.876763498321.issue19430@psf.upfronthosting.co.za> Ezio Melotti added the comment: I don't think this is related to argparse: $ echo 'import sys; print(sys.argv)' > issue19430.py $ python issue19430.py ps1 --file /etc/bash.bashrc --line "PS1='[\t] \[\033[1m\]\h\[\033[0m\]:\w\$ '" ['issue19430.py', 'ps1', '--file', '/etc/bash.bashrc', '--line', "PS1='[\\t] \\[\\033[1m\\]\\h\\[\\033[0m\\]:\\w$ '"] $ python issue19430.py "\$" ['issue19430.py', '$'] $ python issue19430.py '\$' ['issue19430.py', '\\$'] ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 10:55:35 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2013 09:55:35 +0000 Subject: [issue19431] Document PyFrame_FastToLocals() and PyFrame_FastToLocalsWithError() Message-ID: <1383040535.91.0.284405039579.issue19431@psf.upfronthosting.co.za> New submission from STINNER Victor: (Copy of an email) Georg Brandl via python.org Am 29.10.2013 01:19, schrieb victor.stinner: > http://hg.python.org/cpython/rev/4ef4578db38a > changeset: 86715:4ef4578db38a > user: Victor Stinner > date: Tue Oct 29 01:19:37 2013 +0100 > summary: > Issue #18408: Add a new PyFrame_FastToLocalsWithError() function to handle > exceptions when merging fast locals into f_locals of a frame. > PyEval_GetLocals() now raises an exception and return NULL on failure. You'll have to either make this private or document it. ---------- assignee: docs at python components: Documentation messages: 201618 nosy: docs at python, georg.brandl, haypo, pitrou priority: normal severity: normal status: open title: Document PyFrame_FastToLocals() and PyFrame_FastToLocalsWithError() versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 11:02:10 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 29 Oct 2013 10:02:10 +0000 Subject: [issue19413] Reload semantics changed unexpectedly in Python 3.3 In-Reply-To: <1382843791.56.0.901507046365.issue19413@psf.upfronthosting.co.za> Message-ID: <1383040930.02.0.68875000133.issue19413@psf.upfronthosting.co.za> Nick Coghlan added the comment: Patch mostly looks good to me, but there should be a second test ensuring that the loader attribute gets *replaced*, even if it is already set to something else. A similar test structure to the existing one should work, but replacing the "del types.__loader__" with: expected_loader_type = type(types.__loader__) types.__loader__ = "this will be replaced by the reload" and then later: assertIs(type(types.__loader__), expected_loader_type) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 11:34:20 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 10:34:20 +0000 Subject: [issue18609] test_ctypes failure on AIX in PyEval_CallObjectWithKeywords In-Reply-To: <1375305877.13.0.891928742401.issue18609@psf.upfronthosting.co.za> Message-ID: <3d88L362MRzS7j@mail.python.org> Roundup Robot added the comment: New changeset 31f9c1481cfa by Victor Stinner in branch 'default': Issue #18609: Add a fast-path for "iso8859-1" encoding http://hg.python.org/cpython/rev/31f9c1481cfa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 11:51:47 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 29 Oct 2013 10:51:47 +0000 Subject: [issue19430] argparse replaces \$ with $ (if in commandline) In-Reply-To: <1383039793.25.0.714624843985.issue19430@psf.upfronthosting.co.za> Message-ID: <1383043907.73.0.963198454657.issue19430@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Indeed, this sounds very much like the shell doing the unescaping, rather than argparse. (I wonder why argparse would special-case $, anyway) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 11:55:15 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 29 Oct 2013 10:55:15 +0000 Subject: [issue4331] Add functools.partialmethod In-Reply-To: <1226817180.09.0.841012218041.issue4331@psf.upfronthosting.co.za> Message-ID: <1383044115.31.0.781170153142.issue4331@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 12:15:36 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 11:15:36 +0000 Subject: [issue19420] Leak in _hashopenssl.c In-Reply-To: <1382961198.75.0.11599120872.issue19420@psf.upfronthosting.co.za> Message-ID: <3d89FG4cJrz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 6fdbb81b4020 by Christian Heimes in branch 'default': Issue #19420: Fix reference leak in module initalization code of _hashopenssl.c http://hg.python.org/cpython/rev/6fdbb81b4020 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 12:16:57 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 29 Oct 2013 11:16:57 +0000 Subject: [issue19420] Leak in _hashopenssl.c In-Reply-To: <1382961198.75.0.11599120872.issue19420@psf.upfronthosting.co.za> Message-ID: <1383045417.9.0.980121851454.issue19420@psf.upfronthosting.co.za> Christian Heimes added the comment: Fixed in 3.4 Georg, 3.3 is currently in RC phase and this fix is not critical. Do you want me to commit it anyway or shall I wait until 3.3.3 has been released by you? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 13:00:44 2013 From: report at bugs.python.org (Stefan Krah) Date: Tue, 29 Oct 2013 12:00:44 +0000 Subject: [issue19432] test_multiprocessing_fork failures Message-ID: <1383048044.1.0.269867620739.issue19432@psf.upfronthosting.co.za> New submission from Stefan Krah: I'm getting the following test_multiprocessing_fork failures on Debian Wheezy. Perhaps this is related to #19227: test_default_timeout (test.test_multiprocessing_fork.WithThreadsTestBarrier) ... Exception in thread Thread-344: Traceback (most recent call last): File "/home/stefan/hg/master3/Lib/threading.py", line 921, in _bootstrap_inner self.run() File "/home/stefan/hg/master3/Lib/threading.py", line 869, in run self._target(*self._args, **self._kwargs) File "/home/stefan/hg/master3/Lib/test/_test_multiprocessing.py", line 1152, in task self.f(*self.args) File "/home/stefan/hg/master3/Lib/test/_test_multiprocessing.py", line 1382, in _test_default_timeout_f barrier.wait() File "/home/stefan/hg/master3/Lib/threading.py", line 616, in wait self._wait(timeout) File "/home/stefan/hg/master3/Lib/threading.py", line 653, in _wait self._break() File "/home/stefan/hg/master3/Lib/threading.py", line 702, in _break self._cond.notify_all() File "/home/stefan/hg/master3/Lib/threading.py", line 359, in notify_all self.notify(len(self._waiters)) File "/home/stefan/hg/master3/Lib/threading.py", line 342, in notify waiters_to_notify = _deque(_islice(all_waiters, n)) RuntimeError: deque mutated during iteration FAIL ====================================================================== FAIL: test_default_timeout (test.test_multiprocessing_fork.WithThreadsTestBarrier) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/stefan/hg/master3/Lib/test/_test_multiprocessing.py", line 1393, in test_default_timeout self.assertEqual(len(results), barrier.parties) AssertionError: 4 != 5 ---------------------------------------------------------------------- ---------- messages: 201624 nosy: skrah priority: normal severity: normal status: open title: test_multiprocessing_fork failures _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 13:04:10 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 29 Oct 2013 12:04:10 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1383048250.39.0.426200501933.issue19183@psf.upfronthosting.co.za> Nick Coghlan added the comment: Christian's general approach looks fine to me - consolidating the "kind" hashes (i.e. byte sequences, numbers and pointers) into one place independent of any particular type implementation makes sense to me, and the clear abstraction of "What is a hash function?" from Python's point of view is a good thing for embedding purposes. If you get the PEP updated accordingly, we should be able to get that formally accepted in fairly short order. (I had some other suggestions in the review, but they aren't relevant to accepting the PEP). Regarding the concerns about a potential performance impact for unaligned memory access, I think that can be better assessed *after* the simpler patch is merged and it's easier for people to get hold of the new hash implementation. However, the PEP should mention the concern, and note it as something we will be keeping a close eye on during the beta period. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 13:09:48 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2013 12:09:48 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1383048588.34.0.838031351867.issue19183@psf.upfronthosting.co.za> STINNER Victor added the comment: + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. You should copy the license into Doc/license.rst. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 13:14:47 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 29 Oct 2013 12:14:47 +0000 Subject: [issue19430] argparse replaces \$ with $ (if in commandline) In-Reply-To: <1383039793.25.0.714624843985.issue19430@psf.upfronthosting.co.za> Message-ID: <1383048887.45.0.993956616185.issue19430@psf.upfronthosting.co.za> R. David Murray added the comment: Indeed, you can see in the original posting that the \ is already gone from the dollar in sys.argv, so argparse has nothing to do with it. And it is indeed the shell doing the unescaping: rdmurray at session:~>cat test.sh #!/bin/bash echo "$@" rdmurray at session:~>bash test.sh "abc [\t] \$" abc [\t] $ rdmurray at session:~>bash test.sh 'abc [\t] \$' abc [\t] \$ rdmurray at session:~>bash test.sh 'abc [\t] \$' abc [\t] \$ rdmurray at session:~>bash test.sh "'abc [\t] \$'" 'abc [\t] $' rdmurray at session:~>bash test.sh "'abc [\t] \\$'" 'abc [\t] \$' rdmurray at session:~>bash test.sh '"abc [\t] \\\$foo"' "abc [\t] \\\$foo" rdmurray at session:~>bash test.sh '"abc [\t] \$foo"' "abc [\t] \$foo" The shell treats $ specially because $ has a special meaning inside double quotes (variable substitution), so it presumably unescapes it as part of the double quote string processing. You have to escape both the backslash and the $ if you want a literal '\$' to wind up in argv, when the outer level of quoting is double quotes. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 13:17:04 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 29 Oct 2013 12:17:04 +0000 Subject: [issue19430] argparse replaces \$ with $ (if in commandline) In-Reply-To: <1383039793.25.0.714624843985.issue19430@psf.upfronthosting.co.za> Message-ID: <1383049024.32.0.770047348979.issue19430@psf.upfronthosting.co.za> R. David Murray added the comment: Indeed, you can see in the original posting that the \ is already gone from the dollar in sys.argv, so argparse has nothing to do with it. And it is indeed the shell doing the unescaping: rdmurray at session:~>cat test.sh #!/bin/bash echo "$@" rdmurray at session:~>bash test.sh "abc [\t] \$" abc [\t] $ rdmurray at session:~>bash test.sh 'abc [\t] \$' abc [\t] \$ rdmurray at session:~>bash test.sh 'abc [\t] \$' abc [\t] \$ rdmurray at session:~>bash test.sh "'abc [\t] \$'" 'abc [\t] $' rdmurray at session:~>bash test.sh "'abc [\t] \\$'" 'abc [\t] \$' rdmurray at session:~>bash test.sh "'abc [\t] \\$foo'" 'abc [\t] \' rdmurray at session:~>bash test.sh '"abc [\t] \\\$foo"' "abc [\t] \\\$foo" rdmurray at session:~>bash test.sh '"abc [\t] \$foo"' "abc [\t] \$foo" The shell treats $ specially because $ has a special meaning inside double quotes (variable substitution), so it presumably unescapes it as part of the double quote string processing. You have to escape both the backslash and the $ if you want a literal '\$' to wind up in argv, when the outer level of quoting is double quotes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 13:17:20 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 29 Oct 2013 12:17:20 +0000 Subject: [issue19430] argparse replaces \$ with $ (if in commandline) In-Reply-To: <1383039793.25.0.714624843985.issue19430@psf.upfronthosting.co.za> Message-ID: <1383049040.97.0.0178150809188.issue19430@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- Removed message: http://bugs.python.org/msg201627 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 13:18:13 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2013 12:18:13 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1383049093.45.0.186452932766.issue19183@psf.upfronthosting.co.za> STINNER Victor added the comment: To support Windows 32 bit, the following code in PC/pyconfig.h can be modified to use __int64 or _W64: see ssize_t definition below in the same file. #ifndef PY_UINT64_T #if SIZEOF_LONG_LONG == 8 #define HAVE_UINT64_T 1 #define PY_UINT64_T unsigned PY_LONG_LONG #endif #endif ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 13:27:19 2013 From: report at bugs.python.org (Stefan Krah) Date: Tue, 29 Oct 2013 12:27:19 +0000 Subject: [issue19432] test_multiprocessing_fork failures In-Reply-To: <1383048044.1.0.269867620739.issue19432@psf.upfronthosting.co.za> Message-ID: <1383049639.53.0.348573249233.issue19432@psf.upfronthosting.co.za> Stefan Krah added the comment: The issue is probably different from #19227, since it already occurs with 4e79c3ae8a12. ---------- components: +Extension Modules nosy: +sbt stage: -> needs patch type: -> behavior versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 13:44:17 2013 From: report at bugs.python.org (telmich) Date: Tue, 29 Oct 2013 12:44:17 +0000 Subject: [issue19430] argparse replaces \$ with $ (if in commandline) In-Reply-To: <1383039793.25.0.714624843985.issue19430@psf.upfronthosting.co.za> Message-ID: <1383050657.05.0.430520287533.issue19430@psf.upfronthosting.co.za> telmich added the comment: sorry for the noise, it was too early in the morning! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 14:03:36 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 29 Oct 2013 13:03:36 +0000 Subject: [issue19432] test_multiprocessing_fork failures In-Reply-To: <1383048044.1.0.269867620739.issue19432@psf.upfronthosting.co.za> Message-ID: <1383051816.87.0.720044262629.issue19432@psf.upfronthosting.co.za> Richard Oudkerk added the comment: This is a test of threading.Barrier rather than anything implemented directly by multiprocessing. Tests which involve timeouts tend to be a bit flaky. Increasing the length of timeouts usually helps, but makes the tests take even longer. How often have you seen this failure? Did it happen on a buildbot? Was there a lot of other activity on the system at the time? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 14:11:29 2013 From: report at bugs.python.org (alon horev) Date: Tue, 29 Oct 2013 13:11:29 +0000 Subject: [issue4331] Add functools.partialmethod In-Reply-To: <1226817180.09.0.841012218041.issue4331@psf.upfronthosting.co.za> Message-ID: <1383052289.59.0.754174638981.issue4331@psf.upfronthosting.co.za> alon horev added the comment: I've changed the test according to the code review. Thanks ---------- Added file: http://bugs.python.org/file32409/4331.v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 14:33:19 2013 From: report at bugs.python.org (Stefan Krah) Date: Tue, 29 Oct 2013 13:33:19 +0000 Subject: [issue19432] test_multiprocessing_fork failures In-Reply-To: <1383048044.1.0.269867620739.issue19432@psf.upfronthosting.co.za> Message-ID: <1383053599.01.0.864688084538.issue19432@psf.upfronthosting.co.za> Stefan Krah added the comment: I've seen the failure very often, without any particular load. Now I noticed that during test_tools there were several ksoftirqd processes consuming 20% CPU on 4 cores. That seemed unusual to me, so I followed the advice of a certain MIT koan and rebooted. test_multiprocessing_fork no longer fails. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 14:50:22 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 29 Oct 2013 13:50:22 +0000 Subject: [issue19433] Define PY_UINT64_T on Windows 32bit Message-ID: <1383054622.8.0.294038814234.issue19433@psf.upfronthosting.co.za> New submission from Christian Heimes: For PEP 456 it would be useful to have PY_UINT64_T on 32bit Windows. Does anybody see a problem with Victor's idea? I like it. Victor wrote in http://bugs.python.org/issue19183#msg201629: To support Windows 32 bit, the following code in PC/pyconfig.h can be modified to use __int64 or _W64: see ssize_t definition below in the same file. #ifndef PY_UINT64_T #if SIZEOF_LONG_LONG == 8 #define HAVE_UINT64_T 1 #define PY_UINT64_T unsigned PY_LONG_LONG #endif #endif ---------- components: Interpreter Core, Windows messages: 201635 nosy: brian.curtin, christian.heimes, haypo, loewis, ncoghlan, tim.golden priority: normal severity: normal stage: needs patch status: open title: Define PY_UINT64_T on Windows 32bit type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 15:10:08 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 29 Oct 2013 14:10:08 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1383055808.65.0.544378232642.issue19183@psf.upfronthosting.co.za> Christian Heimes added the comment: Victor: I have added the licence to Doc/licence.rst and created a new ticket for PY_UINT64_T on Windows #19433. Nick: The memory layout of the hash secret is now documented. I have renamed the members to reflect their purpose, too. http://hg.python.org/features/pep-456/file/f0a7e606c2d0/Include/pyhash.h#l32 I'll update my PEP shortly and address the memory layout of _Py_HashSecret_t, the small string hashing optimization and performance/memory alignment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 15:21:56 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 29 Oct 2013 14:21:56 +0000 Subject: [issue19433] Define PY_UINT64_T on Windows 32bit In-Reply-To: <1383054622.8.0.294038814234.issue19433@psf.upfronthosting.co.za> Message-ID: <1383056516.0.0.30631924261.issue19433@psf.upfronthosting.co.za> Martin v. L?wis added the comment: LGTM ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 15:22:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 29 Oct 2013 14:22:23 +0000 Subject: [issue19229] operator.py: move the Python implementation in the else block of try/except ImportError In-Reply-To: <1381535351.94.0.0685942795619.issue19229@psf.upfronthosting.co.za> Message-ID: <1383056543.51.0.688073632452.issue19229@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Why not: try: from _operator import * except ImportError: from _pyoperator import * ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 15:31:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2013 14:31:52 +0000 Subject: [issue19229] operator.py: move the Python implementation in the else block of try/except ImportError In-Reply-To: <1381535351.94.0.0685942795619.issue19229@psf.upfronthosting.co.za> Message-ID: <1383057112.09.0.256022983418.issue19229@psf.upfronthosting.co.za> STINNER Victor added the comment: > Why not: > > try: > from _operator import * > except ImportError: > from _pyoperator import * Let's try (I replaced operator.py with these 4 lines). $ ./python -m timeit "import sys; modname='operator'" "__import__(modname); del sys.modules[modname]; del sys.modules['_operator']" 10000 loops, best of 3: 165 usec per loop $ ./python -m timeit "import sys; modname='operator'" "__import__(modname); del sys.modules[modname]" 10000 loops, best of 3: 136 usec per loop "import operator" is only 2x faster (289 usec => 136 usec). It's less interesting. And what would be the purpose of a file of 4 line which containing "import *"? Do you think that PyPy, IronPython and Jython will reuse such trampoline/wrapper? ---------- type: -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 15:37:21 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 29 Oct 2013 14:37:21 +0000 Subject: [issue19229] operator.py: move the Python implementation in the else block of try/except ImportError In-Reply-To: <1383057112.09.0.256022983418.issue19229@psf.upfronthosting.co.za> Message-ID: <1319437630.126814036.1383057414029.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > "import operator" is only 2x faster (289 usec => 136 usec). It's less > interesting. The real question for me is: why are you interested in speeding up the import of the operator module? 200 ?s won't make a visible difference. > And what would be the purpose of a file of 4 line which > containing "import *"? To make it obvious that there are two implementations, one of which is a fallback. ---------- title: operator.py: move the Python implementation in the else block of try/except ImportError -> operator.py: move the Python implementation in the else block of try/except ImportError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 15:45:50 2013 From: report at bugs.python.org (Stefan Krah) Date: Tue, 29 Oct 2013 14:45:50 +0000 Subject: [issue19229] operator.py: move the Python implementation in the else block of try/except ImportError In-Reply-To: <1383057112.09.0.256022983418.issue19229@psf.upfronthosting.co.za> Message-ID: <20131029144550.GA4549@sleipnir.bytereef.org> Stefan Krah added the comment: I understand the desire to speed things up, but either the four-line facade module or else a single module is probably required by PEP-399. ---------- title: operator.py: move the Python implementation in the else block of try/except ImportError -> operator.py: move the Python implementation in the else block of try/except ImportError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 16:40:38 2013 From: report at bugs.python.org (Tim Golden) Date: Tue, 29 Oct 2013 15:40:38 +0000 Subject: [issue19433] Define PY_UINT64_T on Windows 32bit In-Reply-To: <1383054622.8.0.294038814234.issue19433@psf.upfronthosting.co.za> Message-ID: <526FD6F3.9040308@timgolden.me.uk> Tim Golden added the comment: Fine by me ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 16:51:30 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Tue, 29 Oct 2013 15:51:30 +0000 Subject: [issue19434] Wrong documentation of MIMENonMultipart class Message-ID: <1383061890.83.0.167475194564.issue19434@psf.upfronthosting.co.za> New submission from Vajrasky Kok: >>> from email.mime.nonmultipart import MIMENonMultipart >>> MIMENonMultipart.__doc__ 'Base class for MIME multipart/* type messages.' >>> Attached the patch to fix the doc of MIMENonMultipart class. ---------- assignee: docs at python components: Documentation files: fix_doc_for_mime_non_multipart.patch keywords: patch messages: 201643 nosy: docs at python, r.david.murray, vajrasky priority: normal severity: normal status: open title: Wrong documentation of MIMENonMultipart class versions: Python 3.4 Added file: http://bugs.python.org/file32410/fix_doc_for_mime_non_multipart.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 16:58:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2013 15:58:52 +0000 Subject: [issue19433] Define PY_UINT64_T on Windows 32bit In-Reply-To: <1383054622.8.0.294038814234.issue19433@psf.upfronthosting.co.za> Message-ID: <1383062332.56.0.596339399659.issue19433@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue has no patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 17:34:01 2013 From: report at bugs.python.org (Alexander Kruppa) Date: Tue, 29 Oct 2013 16:34:01 +0000 Subject: [issue19435] Directory traversal attack for CGIHTTPRequestHandler Message-ID: <1383064441.57.0.197155402259.issue19435@psf.upfronthosting.co.za> New submission from Alexander Kruppa: An error in separating the path and filename of the CGI script to run in http.server.CGIHTTPRequestHandler allows running arbitrary executables in the directory under which the server was started. The problem is that in CGIHTTPRequestHandler we have: def run_cgi(self): """Execute a CGI script.""" path = self.path dir, rest = self.cgi_info i = path.find('/', len(dir) + 1) where path is the uncollapsed path in the URL, but cgi_info contains the first path segment and the rest from the *collapsed* path as filled in by is_cgi(), so indexing into path via len(dir) is incorrect. An example exploit is giving the request path: ///////////badscript.sh/../cgi-bin/cgi.sh Note that Firefox and wget at least simplify the path in the request; to make sure this exact path is used, do for example: (echo "GET ///////////badscript.sh/../cgi-bin/cgi.sh HTTP/1.1"; echo) | telnet localhost 4443 This causes the CGIHTTPRequestHandler to execute the badscript.sh file in the directory in which the server was started, so script execution is not restricted to the cgi-bin/ or htbin/ subdirectories. ---------- components: Library (Lib) messages: 201645 nosy: Alexander.Kruppa priority: normal severity: normal status: open title: Directory traversal attack for CGIHTTPRequestHandler type: security versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 17:35:41 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2013 16:35:41 +0000 Subject: [issue19435] Directory traversal attack for CGIHTTPRequestHandler In-Reply-To: <1383064441.57.0.197155402259.issue19435@psf.upfronthosting.co.za> Message-ID: <1383064541.39.0.201439602473.issue19435@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +christian.heimes, haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 17:46:58 2013 From: report at bugs.python.org (lagoon7) Date: Tue, 29 Oct 2013 16:46:58 +0000 Subject: [issue19436] Python 2.7 on MAC OSX Mavericks crashes on the help('modules') command Message-ID: <1383065218.44.0.057777022242.issue19436@psf.upfronthosting.co.za> New submission from lagoon7: /usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed import gobject._gobject /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed from gtk import _gtk ** (python:23199): CRITICAL **: pyg_register_boxed: assertion `boxed_type != 0' failed /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: cannot register existing type `GdkDevice' from gtk import _gtk /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_get_qdata: assertion `node != NULL' failed from gtk import _gtk Segmentation fault (core dumped) ---------- assignee: ronaldoussoren components: Macintosh messages: 201646 nosy: lagoon7, ronaldoussoren priority: normal severity: normal status: open title: Python 2.7 on MAC OSX Mavericks crashes on the help('modules') command type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 17:48:40 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 29 Oct 2013 16:48:40 +0000 Subject: [issue19435] Directory traversal attack for CGIHTTPRequestHandler In-Reply-To: <1383064441.57.0.197155402259.issue19435@psf.upfronthosting.co.za> Message-ID: <1383065320.2.0.995297367448.issue19435@psf.upfronthosting.co.za> Christian Heimes added the comment: I can confirm the issue: $ mkdir www $ cd www $ cat << EOF > badscript.sh #!/bin/sh echo hacked EOF $ chmod +x badscript.sh $ ../python -m http.server --cgi $ echo "GET ///////////badscript.sh/../cgi-bin/cgi.sh HTTP/1.1" | nc localhost 8000 HTTP/1.0 200 Script output follows Server: SimpleHTTP/0.6 Python/3.4.0a4+ Date: Tue, 29 Oct 2013 16:47:22 GMT hacked ---------- assignee: -> christian.heimes nosy: +benjamin.peterson, georg.brandl, larry priority: normal -> release blocker stage: -> test needed versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 17:51:02 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 29 Oct 2013 16:51:02 +0000 Subject: [issue19435] Directory traversal attack for CGIHTTPRequestHandler In-Reply-To: <1383064441.57.0.197155402259.issue19435@psf.upfronthosting.co.za> Message-ID: <1383065462.25.0.781655789137.issue19435@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 17:54:48 2013 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Glondu?=) Date: Tue, 29 Oct 2013 16:54:48 +0000 Subject: [issue19435] Directory traversal attack for CGIHTTPRequestHandler In-Reply-To: <1383064441.57.0.197155402259.issue19435@psf.upfronthosting.co.za> Message-ID: <1383065688.28.0.638308599943.issue19435@psf.upfronthosting.co.za> Changes by St?phane Glondu : ---------- nosy: +glondu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 18:32:44 2013 From: report at bugs.python.org (lagoon7) Date: Tue, 29 Oct 2013 17:32:44 +0000 Subject: [issue19436] Python 2.7 on Linux Ubuntu 12.04 LTS crashes on the help('modules') command In-Reply-To: <1383065218.44.0.057777022242.issue19436@psf.upfronthosting.co.za> Message-ID: <1383067964.4.0.958402613862.issue19436@psf.upfronthosting.co.za> lagoon7 added the comment: Sorry I meant Linux instead of Mac OSX. ---------- title: Python 2.7 on MAC OSX Mavericks crashes on the help('modules') command -> Python 2.7 on Linux Ubuntu 12.04 LTS crashes on the help('modules') command _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 18:48:42 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 29 Oct 2013 17:48:42 +0000 Subject: [issue19436] Python 2.7 on Linux Ubuntu 12.04 LTS crashes on the help('modules') command In-Reply-To: <1383065218.44.0.057777022242.issue19436@psf.upfronthosting.co.za> Message-ID: <1383068922.98.0.483264285783.issue19436@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- assignee: ronaldoussoren -> resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> pydoc - stall when requesting a list of available modules in the online help utility _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 19:24:07 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2013 18:24:07 +0000 Subject: [issue19437] More failures found by pyfailmalloc Message-ID: <1383071047.38.0.937526854844.issue19437@psf.upfronthosting.co.za> New submission from STINNER Victor: Using pyfailamlloc, I found various bugs: see issue #18048. Because this issue has been closed, I'm opening a new issue for new bugs. https://bitbucket.org/haypo/pyfailmalloc ---------- messages: 201649 nosy: haypo priority: normal severity: normal status: open title: More failures found by pyfailmalloc type: crash versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 19:31:45 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 29 Oct 2013 18:31:45 +0000 Subject: [issue19433] Define PY_UINT64_T on Windows 32bit In-Reply-To: <1383054622.8.0.294038814234.issue19433@psf.upfronthosting.co.za> Message-ID: <1383071505.85.0.531640816394.issue19433@psf.upfronthosting.co.za> Christian Heimes added the comment: It seems no patch is needed to get PY_UINT64_T on 32bit Windows: >>> import sys >>> sys.version '3.4.0a4+ (pep-456:f0a7e606c2d0, Oct 29 2013, 19:24:12) [MSC v.1600 32 bit (Intel)]' >>> sys.maxsize 2147483647 >>> sys.hash_info sys.hash_info(width=32, modulus=2147483647, inf=314159, nan=0, imag=1000003, algorithm='siphash24', hash_bits=64, seed_bits=128) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 19:45:21 2013 From: report at bugs.python.org (Tim Peters) Date: Tue, 29 Oct 2013 18:45:21 +0000 Subject: [issue19433] Define PY_UINT64_T on Windows 32bit In-Reply-To: <1383054622.8.0.294038814234.issue19433@psf.upfronthosting.co.za> Message-ID: <1383072321.37.0.00507988495844.issue19433@psf.upfronthosting.co.za> Tim Peters added the comment: Yes, it should be taken care of already, because of this in PC/pyconfig.h: #ifdef MS_WIN32 ... #define SIZEOF_LONG_LONG 8 That defines the symbol triggering the PY_UINT64_T define shown in the original message in this issue. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 19:45:48 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 18:45:48 +0000 Subject: [issue19433] Define PY_UINT64_T on Windows 32bit In-Reply-To: <1383054622.8.0.294038814234.issue19433@psf.upfronthosting.co.za> Message-ID: <3d8MF7366Hz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset daa1ab27b5c2 by Victor Stinner in branch 'default': Issue #19433: test_capi: add tests on the size of some C types http://hg.python.org/cpython/rev/daa1ab27b5c2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 19:46:10 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 18:46:10 +0000 Subject: [issue19437] More failures found by pyfailmalloc In-Reply-To: <1383071047.38.0.937526854844.issue19437@psf.upfronthosting.co.za> Message-ID: <3d8MF81svLz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset 1e5bbaed79ca by Victor Stinner in branch 'default': Issue #19437: Fix Array_subscript() of ctypes, handle Array_item() failure http://hg.python.org/cpython/rev/1e5bbaed79ca New changeset fc825259ee86 by Victor Stinner in branch 'default': Issue #19437: Fix convert_op_cmp() of decimal.Decimal rich comparator, handle http://hg.python.org/cpython/rev/fc825259ee86 New changeset 6d57be1f19cf by Victor Stinner in branch 'default': Issue #19437: Fix PyObject_CallFunction(), handle Py_VaBuildValue() and http://hg.python.org/cpython/rev/6d57be1f19cf New changeset 22ce0b7b1eaf by Victor Stinner in branch 'default': Issue #19437: Fix _PyUnicode_New() (constructor of legacy string), set all http://hg.python.org/cpython/rev/22ce0b7b1eaf ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 19:49:17 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2013 18:49:17 +0000 Subject: [issue19433] Define PY_UINT64_T on Windows 32bit In-Reply-To: <1383054622.8.0.294038814234.issue19433@psf.upfronthosting.co.za> Message-ID: <1383072557.34.0.863984242747.issue19433@psf.upfronthosting.co.za> STINNER Victor added the comment: See also issue #17884: "Try to reuse stdint.h types like int32_t". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 19:49:24 2013 From: report at bugs.python.org (janzert) Date: Tue, 29 Oct 2013 18:49:24 +0000 Subject: [issue19435] Directory traversal attack for CGIHTTPRequestHandler In-Reply-To: <1383064441.57.0.197155402259.issue19435@psf.upfronthosting.co.za> Message-ID: <1383072564.49.0.932245412449.issue19435@psf.upfronthosting.co.za> Changes by janzert : ---------- nosy: +janzert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 19:53:23 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Oct 2013 18:53:23 +0000 Subject: [issue19424] _warnings: patch to avoid conversions from/to UTF-8 In-Reply-To: <1382982202.33.0.652166752386.issue19424@psf.upfronthosting.co.za> Message-ID: <1383072803.91.0.658275414761.issue19424@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't see a benefit from this patch. _PyUnicode_AsString() is very fast in most cases (because source lines are mostly ASCII only). On other hand, the patch replaces one-time _PyUnicode_AsString() by multiple less effective (even for ASCII strings) operations. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 20:00:02 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 19:00:02 +0000 Subject: [issue19433] Define PY_UINT64_T on Windows 32bit In-Reply-To: <1383054622.8.0.294038814234.issue19433@psf.upfronthosting.co.za> Message-ID: <3d8MY82szLz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset 5bf96a96f31d by Victor Stinner in branch 'default': Issue #19433: test_capi: check signness of some C types http://hg.python.org/cpython/rev/5bf96a96f31d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 20:19:01 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2013 19:19:01 +0000 Subject: [issue19424] _warnings: patch to avoid conversions from/to UTF-8 In-Reply-To: <1382982202.33.0.652166752386.issue19424@psf.upfronthosting.co.za> Message-ID: <1383074341.74.0.754154238423.issue19424@psf.upfronthosting.co.za> STINNER Victor added the comment: > I don't see a benefit from this patch. Oh, sorry, I forgot to explain the motivation. Performances of the warnings module are not critical module. The motivation here is to avoid to encoding string to UTF-8 for correctness. For example, _PyUnicode_AsString(filename) fails if the filename contains a surrogate character. >>> warnings.warn_explicit("text", RuntimeError, "filename", 5) filename:5: RuntimeError: text >>> warnings.warn_explicit("text", RuntimeError, "filename\udc80", 5) Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'utf-8' codec can't encode character '\udc80' in position 8: surrogates not allowed Another example where a string to encoded to UTF-8 and decoded from UTF-8 a few instructions later: PyObject *to_str = PyObject_Str(item); err_str = _PyUnicode_AsString(to_str); ... PyErr_Format(PyExc_RuntimeError, "...%s", err_str); Using "%R" avoids any encoding conversion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 20:31:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 19:31:31 +0000 Subject: [issue19426] Opening a file in IDLE causes a crash or hang In-Reply-To: <1382999371.02.0.697524502707.issue19426@psf.upfronthosting.co.za> Message-ID: <3d8NFt64xBzPrk@mail.python.org> Roundup Robot added the comment: New changeset e0475c44832f by Benjamin Peterson in branch '2.7': backport #19426 http://hg.python.org/cpython/rev/e0475c44832f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 20:35:41 2013 From: report at bugs.python.org (Kent Frazier) Date: Tue, 29 Oct 2013 19:35:41 +0000 Subject: [issue11508] Virtual Interfaces cause uuid._find_mac to raise a ValueError under Linux In-Reply-To: <1300134691.76.0.567990674923.issue11508@psf.upfronthosting.co.za> Message-ID: <1383075341.69.0.0317789087267.issue11508@psf.upfronthosting.co.za> Kent Frazier added the comment: Serhiy, I signed the form. Let me know if you need anything else. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 20:36:56 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 19:36:56 +0000 Subject: [issue19437] More failures found by pyfailmalloc In-Reply-To: <1383071047.38.0.937526854844.issue19437@psf.upfronthosting.co.za> Message-ID: <3d8NMk21fBz7Ljj@mail.python.org> Roundup Robot added the comment: New changeset 5acbdcfc21c9 by Victor Stinner in branch 'default': Issue #19437: Fix dec_format() of the _decimal module, handle dec_strdup() http://hg.python.org/cpython/rev/5acbdcfc21c9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 21:13:33 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 29 Oct 2013 20:13:33 +0000 Subject: [issue17936] O(n**2) behaviour when adding/removing classes In-Reply-To: <1368028726.5.0.833825784859.issue17936@psf.upfronthosting.co.za> Message-ID: <1383077613.94.0.596465728233.issue17936@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Updated patch replacing PyErr_Clear() with PyErr_WriteUnraisable(), and PyDict_Check() with PyDict_CheckExact(). ---------- Added file: http://bugs.python.org/file32411/subclasses_dict3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 21:18:47 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 20:18:47 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <3d8PJ13SdlzPrk@mail.python.org> Roundup Robot added the comment: New changeset 5942eea8cf41 by Christian Heimes in branch '3.3': Issue #19227 / Issue #18747: Remove pthread_atfork() handler to remove OpenSSL re-seeding http://hg.python.org/cpython/rev/5942eea8cf41 New changeset 705f2addd0f0 by Christian Heimes in branch 'default': Issue #19227 / Issue #18747: Remove pthread_atfork() handler to remove OpenSSL re-seeding http://hg.python.org/cpython/rev/705f2addd0f0 New changeset 4d761ce0ac74 by Christian Heimes in branch '2.7': Issue #19227 / Issue #18747: Remove pthread_atfork() handler to remove OpenSSL re-seeding http://hg.python.org/cpython/rev/4d761ce0ac74 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 21:18:48 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 20:18:48 +0000 Subject: [issue18747] Re-seed OpenSSL's PRNG after fork In-Reply-To: <1376570101.71.0.249202475923.issue18747@psf.upfronthosting.co.za> Message-ID: <3d8PJ221Ctz7Ljj@mail.python.org> Roundup Robot added the comment: New changeset 5942eea8cf41 by Christian Heimes in branch '3.3': Issue #19227 / Issue #18747: Remove pthread_atfork() handler to remove OpenSSL re-seeding http://hg.python.org/cpython/rev/5942eea8cf41 New changeset cd4007fb9c7e by Christian Heimes in branch '3.3': Issue #18747: document issue with OpenSSL's CPRNG state and fork http://hg.python.org/cpython/rev/cd4007fb9c7e New changeset 705f2addd0f0 by Christian Heimes in branch 'default': Issue #19227 / Issue #18747: Remove pthread_atfork() handler to remove OpenSSL re-seeding http://hg.python.org/cpython/rev/705f2addd0f0 New changeset 4d761ce0ac74 by Christian Heimes in branch '2.7': Issue #19227 / Issue #18747: Remove pthread_atfork() handler to remove OpenSSL re-seeding http://hg.python.org/cpython/rev/4d761ce0ac74 New changeset 22e166d5c4c7 by Christian Heimes in branch '2.7': Issue #18747: document issue with OpenSSL's CPRNG state and fork http://hg.python.org/cpython/rev/22e166d5c4c7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 21:24:34 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 20:24:34 +0000 Subject: [issue18747] Re-seed OpenSSL's PRNG after fork In-Reply-To: <1376570101.71.0.249202475923.issue18747@psf.upfronthosting.co.za> Message-ID: <3d8PR55ykYz7Lk9@mail.python.org> Roundup Robot added the comment: New changeset ad779da9e351 by Christian Heimes in branch '2.7': Issue #19227 / Issue #18747: Remove pthread_atfork() handler to remove OpenSSL re-seeding http://hg.python.org/cpython/rev/ad779da9e351 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 21:24:54 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 20:24:54 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <3d8PR50cVFz7Ljc@mail.python.org> Roundup Robot added the comment: New changeset ad779da9e351 by Christian Heimes in branch '2.7': Issue #19227 / Issue #18747: Remove pthread_atfork() handler to remove OpenSSL re-seeding http://hg.python.org/cpython/rev/ad779da9e351 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 21:31:31 2013 From: report at bugs.python.org (mpb) Date: Tue, 29 Oct 2013 20:31:31 +0000 Subject: [issue19438] Where is NoneType in Python 3? Message-ID: <1383078691.36.0.6145513581.issue19438@psf.upfronthosting.co.za> New submission from mpb: types.NoneType seems to have disappeared in Python 3. This is probably intentional, but I cannot figure out how to test if a variable is of type NoneType in Python 3. Specifically, I want to write: assert type (v) in ( bytes, types.NoneType ) Yes, I could write: assert v is None or type (v) is bytes But the first assert statement is easier to read (IMO). Here are links to various Python 3 documentation about None: [1] http://docs.python.org/3/library/stdtypes.html#index-2 [2] http://docs.python.org/3/library/constants.html#None Link [2] says: "None The sole value of the type NoneType." However, NoneType is not listed in the Python 3 documentation index. (As compared with the Python 2 index, where NoneType is listed.) [3] http://docs.python.org/3/library/types.html If NoneType is gone in Python 3, mention of NoneType should probably be removed from link [2]. If NoneType is present in Python 3, the docs (presumably at least one of the above links, and hopefully also the index) should tell me how to use it. Here is another link: [4] http://docs.python.org/3/library/stdtypes.html#bltin-type-objects "The standard module types defines names for all standard built-in types." (Except ???) None is a built-in constant. It has a type. If None's type is not considered to be a "standard built-in type", then IMO this is surprising(!!) and should be documented somewhere (for example, at link [4], and possibly elsewhere as well.) Thanks! ---------- assignee: docs at python components: Documentation messages: 201666 nosy: docs at python, mpb priority: normal severity: normal status: open title: Where is NoneType in Python 3? versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 21:33:51 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 29 Oct 2013 20:33:51 +0000 Subject: [issue19438] Where is NoneType in Python 3? In-Reply-To: <1383078691.36.0.6145513581.issue19438@psf.upfronthosting.co.za> Message-ID: <1383078831.71.0.593986373142.issue19438@psf.upfronthosting.co.za> Christian Heimes added the comment: How about: type(v) in (bytes, type(None)) or: isinstance(v, (bytes, type(None)) or: v is None or type(v) is bytes or: v is None or isinstance(v, bytes) ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 21:33:55 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 20:33:55 +0000 Subject: [issue17936] O(n**2) behaviour when adding/removing classes In-Reply-To: <1368028726.5.0.833825784859.issue17936@psf.upfronthosting.co.za> Message-ID: <3d8Pdt5rzcz7Lkh@mail.python.org> Roundup Robot added the comment: New changeset a7f1ce6fe293 by Antoine Pitrou in branch 'default': Issue #17936: Fix O(n**2) behaviour when adding or removing many subclasses of a given type. http://hg.python.org/cpython/rev/a7f1ce6fe293 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 21:34:35 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 29 Oct 2013 20:34:35 +0000 Subject: [issue17936] O(n**2) behaviour when adding/removing classes In-Reply-To: <1368028726.5.0.833825784859.issue17936@psf.upfronthosting.co.za> Message-ID: <1383078875.78.0.946220631299.issue17936@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Actually, PyErr_Clear() was necessary in some cases. Now committed. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 21:34:40 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 29 Oct 2013 20:34:40 +0000 Subject: [issue17936] O(n**2) behaviour when adding/removing classes In-Reply-To: <1368028726.5.0.833825784859.issue17936@psf.upfronthosting.co.za> Message-ID: <1383078880.03.0.212029985175.issue17936@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 21:38:00 2013 From: report at bugs.python.org (Tom Tromey) Date: Tue, 29 Oct 2013 20:38:00 +0000 Subject: [issue10112] Use -Wl, --dynamic-list=x.list, not -Xlinker -export-dynamic In-Reply-To: <1287137785.61.0.962664170792.issue10112@psf.upfronthosting.co.za> Message-ID: <1383079080.54.0.314592620945.issue10112@psf.upfronthosting.co.za> Changes by Tom Tromey : ---------- nosy: +tromey _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 21:49:24 2013 From: report at bugs.python.org (mpb) Date: Tue, 29 Oct 2013 20:49:24 +0000 Subject: [issue19438] Where is NoneType in Python 3? In-Reply-To: <1383078691.36.0.6145513581.issue19438@psf.upfronthosting.co.za> Message-ID: <1383079764.13.0.795241439573.issue19438@psf.upfronthosting.co.za> mpb added the comment: Of your 4 suggestions, I mentioned #3 and #4 in my post. They are less readable, IMO. 1 and 2 are nicer, but both have an "extra" set of nested parenthesis. While I appreciate the suggestions, I submitted this as a documentation bug, because I think I should be able to find these suggestions somewhere in the Python 3 documentation, at one (or more) of the links I included in my bug report. Also, the Python 3 documentation does mention NoneType, and if NoneType is not part of Python 3, I claim this is an error in the documentation. And then, there is my personal favorite work-around: NoneType = type (None) # only needed once assert type (v) in ( bytes, NoneType ) Or (perhaps more confusingly, LOL!): none = type (None) assert type (v) in ( bytes, none ) isinstance is more confusing because it takes two arguments. Whenever I use it I have to think, "isinstance" vs "instanceof", which is Python, which is Java? (And I haven't used Java seriously in years!) And then I have to think about the order of the arguments (v, cls) vs (cls, v). type is just simpler than isinstance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 21:58:13 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 29 Oct 2013 20:58:13 +0000 Subject: [issue19439] Build _testembed on Windows Message-ID: <1383080293.2.0.31204430631.issue19439@psf.upfronthosting.co.za> New submission from Zachary Ware: Here's a patch that builds _testembed on Windows and adjusts test_capi to not skip EmbeddingTests on Windows. The .vcxproj is based on _freeze_importlib, with "when to build" settings lifted from _testimportmultiple. The patch also adjusts test_capi.EmbeddingTests.test_forced_io_encoding such that it doesn't blow up completely on Windows (and should still pass anywhere it does currently, though I haven't been able to test anywhere but on Windows yet). The test still fails, though; here's the relevant output I get: """ ====================================================================== FAIL: test_forced_io_encoding (test.test_capi.EmbeddingTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "P:\Projects\OSS\Python\_cpython\lib\test\test_capi.py", line 298, in test_forced_io_encoding self.assertEqual(out.strip(), expected_output) AssertionError: '--- [106 chars]t: cp1252:strict\r\nstderr: cp1252:backslashre[575 chars]lace' != '--- [106 chars]t: cp437:strict\r\nstderr: cp437:backslashrepl[571 chars]lace' --- Use defaults --- Expected encoding: default Expected errors: default stdin: cp437:strict - stdout: cp1252:strict ? ^^^^ + stdout: cp437:strict ? ^^^ - stderr: cp1252:backslashreplace ? ^^^^ + stderr: cp437:backslashreplace ? ^^^ --- Set errors only --- Expected encoding: default Expected errors: surrogateescape stdin: cp437:surrogateescape - stdout: cp1252:surrogateescape ? ^^^^ + stdout: cp437:surrogateescape ? ^^^ - stderr: cp1252:backslashreplace ? ^^^^ + stderr: cp437:backslashreplace ? ^^^ --- Set encoding only --- Expected encoding: latin-1 Expected errors: default stdin: latin-1:strict stdout: latin-1:strict stderr: latin-1:backslashreplace --- Set encoding and errors --- Expected encoding: latin-1 Expected errors: surrogateescape stdin: latin-1:surrogateescape stdout: latin-1:surrogateescape stderr: latin-1:backslashreplace ---------------------------------------------------------------------- """ I'm not sure whether this is a bug in the way _testembed is built or otherwise. EmbeddingTests.test_subinterps passes, though. Due to my ongoing inability to get a 64-bit build to work, this has only been tested on 32-bit Windows 7. ---------- components: Tests, Windows files: windows_testembed.diff keywords: patch messages: 201671 nosy: brian.curtin, loewis, ncoghlan, pitrou, tim.golden, zach.ware priority: normal severity: normal status: open title: Build _testembed on Windows type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32412/windows_testembed.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 22:10:13 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 29 Oct 2013 21:10:13 +0000 Subject: [issue19435] Directory traversal attack for CGIHTTPRequestHandler In-Reply-To: <1383064441.57.0.197155402259.issue19435@psf.upfronthosting.co.za> Message-ID: <1383081013.96.0.646827931279.issue19435@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Patch ---------- keywords: +patch Added file: http://bugs.python.org/file32413/cgi.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 22:10:11 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 21:10:11 +0000 Subject: [issue15792] Fix compiler options for x64 builds on Windows In-Reply-To: <1346077051.29.0.85020459134.issue15792@psf.upfronthosting.co.za> Message-ID: <3d8QRk3ySYzN41@mail.python.org> Roundup Robot added the comment: New changeset c49b8bdcb5cb by Tim Golden in branch '3.3': Issue 15792 Correct build options on Win64. Patch by Jeremy Kloth. http://hg.python.org/cpython/rev/c49b8bdcb5cb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 22:18:11 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 29 Oct 2013 21:18:11 +0000 Subject: [issue19439] Build _testembed on Windows In-Reply-To: <1383080293.2.0.31204430631.issue19439@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Nice! I wonder if there might a difference between the default console encoding and the default pipe encoding (that test assumes the default standard stream encodings will be the same in the current process as they are in the child). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 22:20:05 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Oct 2013 21:20:05 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1383081605.76.0.828443567102.issue19183@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: About memcpy(). Here is sample file. Compile it to assembler: gcc -O2 -S -masm=intel fnv.c With memcpy() main loop is compiled to: .L8: movzx ecx, BYTE PTR [ebx+edx] imul eax, eax, 1000003 add edx, 1 xor eax, ecx cmp edx, edi jne .L8 With per-byte copy it is compiled to: .L3: mov dl, BYTE PTR [ecx] imul eax, eax, 1000003 sub ebp, 1 movzx ebx, BYTE PTR [ecx+1] movzx edi, BYTE PTR [ecx+2] movzx esi, BYTE PTR [ecx+3] add ecx, 4 mov dh, bl sal edi, 16 movzx edx, dx sal esi, 24 or edx, edi or edx, esi xor eax, edx cmp ebp, -1 jne .L3 ---------- Added file: http://bugs.python.org/file32414/fnv.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 22:21:45 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Oct 2013 21:21:45 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1383081705.21.0.977441231982.issue19183@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- Removed message: http://bugs.python.org/msg201675 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 22:21:52 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 29 Oct 2013 21:21:52 +0000 Subject: [issue19440] Clean up test_capi Message-ID: <1383081712.17.0.162713378456.issue19440@psf.upfronthosting.co.za> New submission from Zachary Ware: Here's a patch to clean up test_capi a little bit; it removes a __future__ import, converts from test_main to unittest.main, and makes use of subtests to run each _testcapi function. I'll post a separate patch for 3.3; there's just enough difference between branches to make a single patch impossible and merging slightly hairy. ---------- components: Tests files: test_capi_cleanup.diff keywords: patch messages: 201676 nosy: ezio.melotti, zach.ware priority: normal severity: normal status: open title: Clean up test_capi type: enhancement versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32415/test_capi_cleanup.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 22:22:12 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Oct 2013 21:22:12 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1383081732.92.0.968618829095.issue19183@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: About memcpy(). Here is sample file. Compile it to assembler: gcc -O2 -S -masm=intel fnv.c With memcpy() main loop is compiled to: .L3: mov esi, DWORD PTR [ebx] imul eax, eax, 1000003 add ebx, 4 xor eax, esi sub ecx, 1 mov DWORD PTR [esp+24], esi jne .L3 With per-byte copy it is compiled to: .L3: mov dl, BYTE PTR [ecx] imul eax, eax, 1000003 sub ebp, 1 movzx ebx, BYTE PTR [ecx+1] movzx edi, BYTE PTR [ecx+2] movzx esi, BYTE PTR [ecx+3] add ecx, 4 mov dh, bl sal edi, 16 movzx edx, dx sal esi, 24 or edx, edi or edx, esi xor eax, edx cmp ebp, -1 jne .L3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 22:22:12 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 29 Oct 2013 21:22:12 +0000 Subject: [issue19440] Clean up test_capi In-Reply-To: <1383081712.17.0.162713378456.issue19440@psf.upfronthosting.co.za> Message-ID: <1383081732.97.0.0931587535491.issue19440@psf.upfronthosting.co.za> Changes by Zachary Ware : Added file: http://bugs.python.org/file32416/test_capi_cleanup-3.3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 22:35:56 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 29 Oct 2013 21:35:56 +0000 Subject: [issue19386] selectors test_interrupted_retry is flaky In-Reply-To: Message-ID: Charles-Fran?ois Natali added the comment: Here's another failure: """ ====================================================================== FAIL: test_interpreter_shutdown (test.test_concurrent_futures.ProcessPoolShutdownTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/test_concurrent_futures.py", line 77, in tearDown self.assertLess(dt, 60, "synchronization issue: test lasted too long") AssertionError: 108.88635897636414 not less than 60 : synchronization issue: test lasted too long """ Many timeout-related tests are failing randomly on this buildbot, so I assume that's really a buildbot issue (is it a VM?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 22:45:19 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 29 Oct 2013 21:45:19 +0000 Subject: [issue19386] selectors test_interrupted_retry is flaky In-Reply-To: <1382688391.49.0.741915274953.issue19386@psf.upfronthosting.co.za> Message-ID: <1383083119.88.0.247734509309.issue19386@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, it is a linux vserver VM. I would think we would want tests to not fail in VMs, though, in this day and age. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 22:47:00 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Oct 2013 21:47:00 +0000 Subject: [issue19424] _warnings: patch to avoid conversions from/to UTF-8 In-Reply-To: <1382982202.33.0.652166752386.issue19424@psf.upfronthosting.co.za> Message-ID: <1383083220.65.0.911602481946.issue19424@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Well, it looks reasonable. But an action should be ASCII only string. So perhaps we should first check PyUnicode_IS_ASCII() and then use PyUnicode_1BYTE_DATA() and strcpy(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 22:47:42 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 29 Oct 2013 21:47:42 +0000 Subject: [issue19386] selectors test_interrupted_retry is flaky In-Reply-To: <1382688391.49.0.741915274953.issue19386@psf.upfronthosting.co.za> Message-ID: <1383083262.16.0.140186674672.issue19386@psf.upfronthosting.co.za> R. David Murray added the comment: Also, unless people haven't been reporting other errors, these buildbots have been stable up until recently, with the exception of the multiprocessing hangs that plague all the buildbots as far as I know. (My impression could be mistaken, though.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 22:55:12 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 29 Oct 2013 21:55:12 +0000 Subject: [issue19386] selectors test_interrupted_retry is flaky In-Reply-To: <1383083262.16.0.140186674672.issue19386@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Also, unless people haven't been reporting other errors, these buildbots have been stable up until recently Well, the fact that several tests - which were working just fine - started failing randomly recently (like test_concurrent_futures, test_subprocess) is a strong hint that the culprit is the buildbot (I mean, the test_selectors failure just calls epoll_wait(): there is a known overflow for epoll_wait() timeout, but for large timeout values, not 2s). This wouldn't be the first time I see clock issues on a virtual machine... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 23:01:24 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 22:01:24 +0000 Subject: [issue19373] Tkinter apps including IDLE may not display properly on OS X 10.9 Mavericks In-Reply-To: <1382596351.85.0.389017245767.issue19373@psf.upfronthosting.co.za> Message-ID: <3d8RZq3nG8z7LjP@mail.python.org> Roundup Robot added the comment: New changeset f5e0fd7db675 by Ned Deily in branch 'default': Issue #19373: Add Misc/NEWS entry. http://hg.python.org/cpython/rev/f5e0fd7db675 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 23:07:06 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 29 Oct 2013 22:07:06 +0000 Subject: [issue19438] Where is NoneType in Python 3? In-Reply-To: <1383078691.36.0.6145513581.issue19438@psf.upfronthosting.co.za> Message-ID: <1383084426.72.0.906406588747.issue19438@psf.upfronthosting.co.za> R. David Murray added the comment: See http://www.python.org/dev/peps/pep-0294/ for some background on this. The unexpected thing is actually that the types module still exists at all in Python3 :) That said, its documentation could, indeed, use some improvement to address this kind of question. Searching the python-dev email list for 'NoneType removal types module" turns up some interesting posts, back in the 2.3 days...basically, type(None) is the One True Way to get NoneType :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 23:13:17 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 29 Oct 2013 22:13:17 +0000 Subject: [issue19386] selectors test_interrupted_retry is flaky In-Reply-To: <1382688391.49.0.741915274953.issue19386@psf.upfronthosting.co.za> Message-ID: <1383084797.07.0.623404751066.issue19386@psf.upfronthosting.co.za> R. David Murray added the comment: What could cause a VM clock problem on a machine that hasn't been modified, but the VMs have been rebooted recently (ie: it isn't stale state inside the VM itself). Anything you can suggest I look at? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 23:19:21 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 22:19:21 +0000 Subject: [issue19373] Tkinter apps including IDLE may not display properly on OS X 10.9 Mavericks In-Reply-To: <1382596351.85.0.389017245767.issue19373@psf.upfronthosting.co.za> Message-ID: <3d8Rz72Cymz7LjM@mail.python.org> Roundup Robot added the comment: New changeset bcbe4099206f by Ned Deily in branch '2.7': Issue #19373: Apply upstream change to Tk 8.5.15 fixing OS X 10.9 http://hg.python.org/cpython/rev/bcbe4099206f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 23:20:47 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 29 Oct 2013 22:20:47 +0000 Subject: [issue19386] selectors test_interrupted_retry is flaky In-Reply-To: <1382688391.49.0.741915274953.issue19386@psf.upfronthosting.co.za> Message-ID: <1383085247.2.0.722432376502.issue19386@psf.upfronthosting.co.za> R. David Murray added the comment: I'm going to reboot the host just to see if that makes any difference. It's been up for 105 days. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 23:32:22 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 22:32:22 +0000 Subject: [issue19424] _warnings: patch to avoid conversions from/to UTF-8 In-Reply-To: <1382982202.33.0.652166752386.issue19424@psf.upfronthosting.co.za> Message-ID: <3d8SG83H64z7LjM@mail.python.org> Roundup Robot added the comment: New changeset 34e166d60f37 by Victor Stinner in branch 'default': Issue #19424: Optimize PyUnicode_CompareWithASCIIString() http://hg.python.org/cpython/rev/34e166d60f37 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 23:32:58 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2013 22:32:58 +0000 Subject: [issue19424] _warnings: patch to avoid conversions from/to UTF-8 In-Reply-To: <1382982202.33.0.652166752386.issue19424@psf.upfronthosting.co.za> Message-ID: <1383085978.61.0.959579036685.issue19424@psf.upfronthosting.co.za> STINNER Victor added the comment: "Well, it looks reasonable. But an action should be ASCII only string. So perhaps we should first check PyUnicode_IS_ASCII() and then use PyUnicode_1BYTE_DATA() and strcpy()." Such optimizations in warnings seem overkill, performances are not critical in this module. I optimized PyUnicode_CompareWithASCIIString() instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 23:41:00 2013 From: report at bugs.python.org (Eric Snow) Date: Tue, 29 Oct 2013 22:41:00 +0000 Subject: [issue19413] Reload semantics changed unexpectedly in Python 3.3 In-Reply-To: <1382843791.56.0.901507046365.issue19413@psf.upfronthosting.co.za> Message-ID: <1383086460.21.0.449227959209.issue19413@psf.upfronthosting.co.za> Eric Snow added the comment: Brett: any opinions on fixing this? 3.3? Nick: I'll add another test when I get a chance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 23:41:39 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 29 Oct 2013 22:41:39 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1383086499.2.0.229986672806.issue19183@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: http://bugs.python.org/file32417/4756e9ed0328.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 23:44:44 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 22:44:44 +0000 Subject: [issue19424] _warnings: patch to avoid conversions from/to UTF-8 In-Reply-To: <1382982202.33.0.652166752386.issue19424@psf.upfronthosting.co.za> Message-ID: <3d8SXQ3j9Zz7LjM@mail.python.org> Roundup Robot added the comment: New changeset c7326aa0b69c by Victor Stinner in branch 'default': Issue #19424: Fix the warnings module to accept filename containing surrogate http://hg.python.org/cpython/rev/c7326aa0b69c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 23:46:47 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2013 22:46:47 +0000 Subject: [issue19424] _warnings: patch to avoid conversions from/to UTF-8 In-Reply-To: <1382982202.33.0.652166752386.issue19424@psf.upfronthosting.co.za> Message-ID: <1383086807.02.0.521697382201.issue19424@psf.upfronthosting.co.za> STINNER Victor added the comment: @Serhiy: Thanks for your review. I modified warnings.warn_explicit() to reject types different than str for the filename. I also removed the useless optimization for PyUnicode_Substring() when i=0. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 23:55:33 2013 From: report at bugs.python.org (Alan Cristhian) Date: Tue, 29 Oct 2013 22:55:33 +0000 Subject: [issue19441] itertools.tee improve documentation Message-ID: <1383087333.66.0.191656186181.issue19441@psf.upfronthosting.co.za> New submission from Alan Cristhian: I had some problems using itertools.tee function. Fortunately I found the following advice on the PEP-323: "Currently, the copied iterators remaintied to the original iterator. If the original advances, then so do all of the copies. Good practice is to overwrite the original So THAT anamolies do result: a, b = t (a)." I believe that such advice should be in the documentation as well: "Currently, the copied iterators remaintied to the original iterator. If the original advances, then so do all of the copies and vice versa. Good practice is to overwrite the original So THAT anamolies do result: a, b = t (a ). " Note that I added "and vice versa". ---------- assignee: docs at python components: Documentation messages: 201693 nosy: Alan.Cristhian, docs at python priority: normal severity: normal status: open title: itertools.tee improve documentation type: enhancement versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 23:58:35 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 22:58:35 +0000 Subject: [issue19424] _warnings: patch to avoid conversions from/to UTF-8 In-Reply-To: <1382982202.33.0.652166752386.issue19424@psf.upfronthosting.co.za> Message-ID: <3d8SrQ0Xnwz7LjP@mail.python.org> Roundup Robot added the comment: New changeset 05e8dde3229c by Victor Stinner in branch 'default': Issue #19424: Fix test_warnings for locale encoding unable to encode http://hg.python.org/cpython/rev/05e8dde3229c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 00:31:53 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2013 23:31:53 +0000 Subject: [issue19442] Python crashs when a warning is emitted during shutdown Message-ID: <1383089513.19.0.894432052121.issue19442@psf.upfronthosting.co.za> New submission from STINNER Victor: Because of a bug, warnings were not emitted during Python shutdown. I fixed the bug in issue #19424, and now Python crashs when a warning is emitted during shutdown. See also issue #19421: "FileIO destructor imports indirectly the io module at exit". The warnings module uses globals()['__name__'] to get the name of the current module. The bug was the during Python shutdown, the module is None and _PyUnicode_AsString(None) was raising an exception (in setup_context() of _warnings.c) and so the warning was not emitted. For example, FileIO destructor emits a warning when a unclosed file is destroyed. The destructor removes the exception raised the warning module. ---------- messages: 201695 nosy: haypo priority: normal severity: normal status: open title: Python crashs when a warning is emitted during shutdown type: crash versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 00:33:10 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 29 Oct 2013 23:33:10 +0000 Subject: [issue19442] Python crashes when a warning is emitted during shutdown In-Reply-To: <1383089513.19.0.894432052121.issue19442@psf.upfronthosting.co.za> Message-ID: <1383089590.43.0.836129222887.issue19442@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever title: Python crashs when a warning is emitted during shutdown -> Python crashes when a warning is emitted during shutdown _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 00:35:47 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Oct 2013 23:35:47 +0000 Subject: [issue19442] Python crashes when a warning is emitted during shutdown In-Reply-To: <1383089513.19.0.894432052121.issue19442@psf.upfronthosting.co.za> Message-ID: <3d8TgK3dKszNX9@mail.python.org> Roundup Robot added the comment: New changeset 1787277915e9 by Victor Stinner in branch 'default': Issue #19442: Fix warnings emitted during Python shutdown http://hg.python.org/cpython/rev/1787277915e9 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 00:37:08 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2013 23:37:08 +0000 Subject: [issue19424] _warnings: patch to avoid conversions from/to UTF-8 In-Reply-To: <1382982202.33.0.652166752386.issue19424@psf.upfronthosting.co.za> Message-ID: <1383089828.65.0.556408139516.issue19424@psf.upfronthosting.co.za> STINNER Victor added the comment: Oops, while fixing this issue, I found a new issue related to warnings: I opened issue #19442 "Python crashes when a warning is emitted during shutdown". This issue can now be fixed. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 00:38:04 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 29 Oct 2013 23:38:04 +0000 Subject: [issue19424] _warnings: patch to avoid conversions from/to UTF-8 In-Reply-To: <1382982202.33.0.652166752386.issue19424@psf.upfronthosting.co.za> Message-ID: <1383089884.82.0.823314749997.issue19424@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 00:38:56 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2013 23:38:56 +0000 Subject: [issue19421] FileIO destructor imports indirectly the io module at exit In-Reply-To: <1382964595.86.0.735733174732.issue19421@psf.upfronthosting.co.za> Message-ID: <1383089936.19.0.118044093826.issue19421@psf.upfronthosting.co.za> STINNER Victor added the comment: Trying to reimport the io module is not the only issue of emitting warnings during Python shutdown. I just found a new issue after fixing an unrelated bug in the warnings module (issue #19424): issue #19442 "Python crashes when a warning is emitted during shutdown". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 00:39:54 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2013 23:39:54 +0000 Subject: [issue19442] Python crashes when a warning is emitted during shutdown In-Reply-To: <1383089513.19.0.894432052121.issue19442@psf.upfronthosting.co.za> Message-ID: <1383089994.55.0.0423237811472.issue19442@psf.upfronthosting.co.za> STINNER Victor added the comment: The changeset 1787277915e9 is closer to a workaround than a real fix: + if (module != Py_None) { + res = warn_explicit(category, message, filename, lineno, module, registry, + NULL); + } + else { + /* FIXME: emitting warnings at exit does crash Python */ + res = Py_None; + Py_INCREF(res); + } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 00:53:51 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2013 23:53:51 +0000 Subject: [issue19442] Python crashes when a warning is emitted during shutdown In-Reply-To: <1383089513.19.0.894432052121.issue19442@psf.upfronthosting.co.za> Message-ID: <1383090831.94.0.14764585177.issue19442@psf.upfronthosting.co.za> STINNER Victor added the comment: warn_shutdown.py: example of script emitting warning at shutdown. Depending on the timing, the warning is shown or not (replace "if 0:" with "if 1:" to always display the warning). This example is a simplified example of the original crasher: test_threading.test_4_daemon_threads(). ---------- Added file: http://bugs.python.org/file32418/warn_shutdown.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 01:07:53 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 30 Oct 2013 00:07:53 +0000 Subject: [issue19172] selectors: add keys() method In-Reply-To: <1380984038.36.0.521182029078.issue19172@psf.upfronthosting.co.za> Message-ID: <1383091673.28.0.0996685044897.issue19172@psf.upfronthosting.co.za> Guido van Rossum added the comment: I added some comments to the code review. Please take a look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 02:17:21 2013 From: report at bugs.python.org (mpb) Date: Wed, 30 Oct 2013 01:17:21 +0000 Subject: [issue19438] Where is NoneType in Python 3? In-Reply-To: <1383078691.36.0.6145513581.issue19438@psf.upfronthosting.co.za> Message-ID: <1383095841.7.0.839309548437.issue19438@psf.upfronthosting.co.za> mpb added the comment: Regarding http://www.python.org/dev/peps/pep-0294/ ... Complete removal of the types module makes more sense to me than letting types continue, but removing NoneType from it! If type(None) is the one_true_way, then the docs should say that, possibly in multiple locations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 03:19:29 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 30 Oct 2013 02:19:29 +0000 Subject: [issue19424] _warnings: patch to avoid conversions from/to UTF-8 In-Reply-To: <1382982202.33.0.652166752386.issue19424@psf.upfronthosting.co.za> Message-ID: <1383099569.47.0.278159792129.issue19424@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Victor, I found out that this commit http://hg.python.org/cpython/rev/34e166d60f37 gives me compiler warning. Objects/unicodeobject.c: In function ?PyUnicode_CompareWithASCIIString?: Objects/unicodeobject.c:10583:22: warning: pointer targets in initialization differ in signedness [-Wpointer-sign] gcc -pthread -c -Wno-unused-result -Werror=declaration-after-statement -g -O0 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE \ Attached the patch to remove the compiler warning. ---------- nosy: +vajrasky Added file: http://bugs.python.org/file32419/remove_compiler_warning_pyunicode_compare_with_ascii_string.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 03:56:37 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 30 Oct 2013 02:56:37 +0000 Subject: [issue19413] Reload semantics changed unexpectedly in Python 3.3 In-Reply-To: <1383086460.21.0.449227959209.issue19413@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Just had a thought on a possible functional test case: - write a module file - load it - check for expected attributes - move it from name.py to name/__init__.py - reload it - check for new expected attributes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 05:43:03 2013 From: report at bugs.python.org (Milton Mobley) Date: Wed, 30 Oct 2013 04:43:03 +0000 Subject: [issue19443] add to dict fails after 1,000,000 items on py 2.7.5 Message-ID: <1383108183.39.0.692249653807.issue19443@psf.upfronthosting.co.za> New submission from Milton Mobley: d, i = {}, 0 while (i < 10000000): n = i + 1 d[n] = n i += 1 On Py 2.7.5 (windows7, x64, 4GB ram) this program slowed down obviously after passing 1,000,000 adds and never completed or raised an exception. Windows performance monitor showed it was only claiming about 1 MB memory per second, and stopped claiming more memory at about 646MB. The only other large memory consumer in the system was JRE using about 550 MB on behalf of Eclipse. ---------- components: Interpreter Core messages: 201705 nosy: miltmobley priority: normal severity: normal status: open title: add to dict fails after 1,000,000 items on py 2.7.5 type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 05:58:32 2013 From: report at bugs.python.org (Elizabeth Myers) Date: Wed, 30 Oct 2013 04:58:32 +0000 Subject: [issue19443] add to dict fails after 1,000,000 items on py 2.7.5 In-Reply-To: <1383108183.39.0.692249653807.issue19443@psf.upfronthosting.co.za> Message-ID: <1383109112.04.0.0952515383888.issue19443@psf.upfronthosting.co.za> Elizabeth Myers added the comment: Your test case, nor the one I wrote, trigger Python 2.7.5 nor 3.3.2 on Linux 64-bit: try: xrange except: xrange = range d = {} r = 10000000 ctr = 0 for n in xrange(r): d[n] = n ctr += 1 assert len(d) == r assert ctr == r ---------- nosy: +Elizacat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 06:00:40 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 30 Oct 2013 05:00:40 +0000 Subject: [issue19443] add to dict fails after 1,000,000 items on py 2.7.5 In-Reply-To: <1383108183.39.0.692249653807.issue19443@psf.upfronthosting.co.za> Message-ID: <1383109240.4.0.892462750934.issue19443@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Works for me -- on 64-bit OS X 10.9 running Python 2.7.5 ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 06:02:07 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 30 Oct 2013 05:02:07 +0000 Subject: [issue19441] itertools.tee improve documentation In-Reply-To: <1383087333.66.0.191656186181.issue19441@psf.upfronthosting.co.za> Message-ID: <1383109327.8.0.55688447698.issue19441@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 06:10:16 2013 From: report at bugs.python.org (Tim Peters) Date: Wed, 30 Oct 2013 05:10:16 +0000 Subject: [issue19443] add to dict fails after 1,000,000 items on py 2.7.5 In-Reply-To: <1383108183.39.0.692249653807.issue19443@psf.upfronthosting.co.za> Message-ID: <1383109816.34.0.816065782562.issue19443@psf.upfronthosting.co.za> Tim Peters added the comment: Just another data point: runs fine on Vista, 32-bit box, Python 2.7.5. Python is consuming about 320MB when the dict is done building. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 06:19:09 2013 From: report at bugs.python.org (Robert Merrill) Date: Wed, 30 Oct 2013 05:19:09 +0000 Subject: [issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC Message-ID: <1383110349.25.0.857290073089.issue19444@psf.upfronthosting.co.za> New submission from Robert Merrill: Same code but different problem as this issue: http://bugs.python.org/issue10897 The above-linked issue was closed as WONTFIX, but there is a secondary problem: the file descriptor that mmap.mmap() allocates is not set to close-on-exec. This means that any process you spawn using os.system() and the like, its children, its children's children etc will inherit this file descriptor. This is unexpected, unnecessary behavior, and potentially a huge pain if you mmap() a file and then spawn, say, inetd or something that does similar stuff, because now you have to kill every process that spawned from that in order to unmount filesystems or remove kernel modules that are being blocked as a result of the fds being open. ---------- components: Library (Lib) messages: 201709 nosy: rfm priority: normal severity: normal status: open title: mmap.mmap() allocates a file descriptor that isn't CLOEXEC type: resource usage versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 06:25:24 2013 From: report at bugs.python.org (Robert Merrill) Date: Wed, 30 Oct 2013 05:25:24 +0000 Subject: [issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC In-Reply-To: <1383110349.25.0.857290073089.issue19444@psf.upfronthosting.co.za> Message-ID: <1383110724.21.0.406666508799.issue19444@psf.upfronthosting.co.za> Robert Merrill added the comment: I should add a caveat: the fd that is created by mmap /will/ be set to close-on-exec if the fd you passed in was. But even if it's not, I see no reason why mmap should not be setting it anyway. At the very least, the documentation should bring the user's attention to this potential stumbling block. Currently it makes no mention of the fact that mmap duplicates file descriptors at all, much less how the flags are set. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 06:40:12 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 30 Oct 2013 05:40:12 +0000 Subject: [issue19407] PEP 453: update the "Installing Python Modules" documentation In-Reply-To: <1382791475.83.0.387983167617.issue19407@psf.upfronthosting.co.za> Message-ID: <1383111612.05.0.862267010759.issue19407@psf.upfronthosting.co.za> Nick Coghlan added the comment: Marcus Smith (aka @qwcode) has made good strides this week in getting the Python Packaging User Guide to a presentable state using the current Python docs theme. Bootstrapping: https://python-packaging-user-guide.readthedocs.org/en/latest/setup.html Usage: https://python-packaging-user-guide.readthedocs.org/en/latest/installation.html Accordingly, I think it makes sense to: 1. Arrange for a copy of this guide to be hosted somewhere on docs.python.org 2. Refer to that from the per-version distutils guides rather than referring directly to pip-installer.org Thoughts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 07:01:21 2013 From: report at bugs.python.org (Blaise Gassend) Date: Wed, 30 Oct 2013 06:01:21 +0000 Subject: [issue19445] heapq.heapify is n log(n), not linear Message-ID: <1383112881.24.0.0958145237124.issue19445@psf.upfronthosting.co.za> New submission from Blaise Gassend: The documentation for heapq.heapify indicates that it runs in linear time. I believe that this is incorrect, and that it runs in worst case n * log(n) time. I checked the implementation, and there are indeed n _siftup operations, which each appear to be worst case log(n). One example of the documentation pages that are wrong. http://docs.python.org/3.4/library/heapq.html#heapq.heappush ---------- assignee: docs at python components: Documentation messages: 201712 nosy: Blaise.Gassend, docs at python priority: normal severity: normal status: open title: heapq.heapify is n log(n), not linear versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 07:31:48 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 30 Oct 2013 06:31:48 +0000 Subject: [issue19072] classmethod doesn't honour descriptor protocol of wrapped callable In-Reply-To: <1379856164.11.0.6368818134.issue19072@psf.upfronthosting.co.za> Message-ID: <1383114708.38.0.789922963712.issue19072@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Graham, do we have a contributor agreement from you? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 07:36:21 2013 From: report at bugs.python.org (Graham Dumpleton) Date: Wed, 30 Oct 2013 06:36:21 +0000 Subject: [issue19072] classmethod doesn't honour descriptor protocol of wrapped callable In-Reply-To: <1379856164.11.0.6368818134.issue19072@psf.upfronthosting.co.za> Message-ID: <1383114981.43.0.144248390322.issue19072@psf.upfronthosting.co.za> Graham Dumpleton added the comment: I don't believe so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 08:17:48 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 30 Oct 2013 07:17:48 +0000 Subject: [issue19445] heapq.heapify is n log(n), not linear In-Reply-To: <1383112881.24.0.0958145237124.issue19445@psf.upfronthosting.co.za> Message-ID: <1383117468.5.0.359285941553.issue19445@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 08:18:16 2013 From: report at bugs.python.org (Nitin Kumar) Date: Wed, 30 Oct 2013 07:18:16 +0000 Subject: [issue19446] Integer division for negative numbers Message-ID: <1383117496.94.0.70226236706.issue19446@psf.upfronthosting.co.za> New submission from Nitin Kumar: Mathematically python is not giving correct output for integer division for negative number, e.g. : -7//2= -3 but python is giving output -4. ---------- components: IDLE files: Integer_division.py messages: 201715 nosy: Nitin.Kumar priority: normal severity: normal status: open title: Integer division for negative numbers type: enhancement versions: Python 3.3 Added file: http://bugs.python.org/file32420/Integer_division.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 08:20:56 2013 From: report at bugs.python.org (Nitin Kumar) Date: Wed, 30 Oct 2013 07:20:56 +0000 Subject: [issue19446] Integer division for negative numbers In-Reply-To: <1383117496.94.0.70226236706.issue19446@psf.upfronthosting.co.za> Message-ID: <1383117656.92.0.404413290827.issue19446@psf.upfronthosting.co.za> Changes by Nitin Kumar : Removed file: http://bugs.python.org/file32420/Integer_division.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 08:22:52 2013 From: report at bugs.python.org (Nitin Kumar) Date: Wed, 30 Oct 2013 07:22:52 +0000 Subject: [issue19446] Integer division for negative numbers In-Reply-To: <1383117496.94.0.70226236706.issue19446@psf.upfronthosting.co.za> Message-ID: <1383117772.64.0.300417003656.issue19446@psf.upfronthosting.co.za> Changes by Nitin Kumar : Added file: http://bugs.python.org/file32421/Integer_division.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 08:30:18 2013 From: report at bugs.python.org (Georg Brandl) Date: Wed, 30 Oct 2013 07:30:18 +0000 Subject: [issue19446] Integer division for negative numbers In-Reply-To: <1383117496.94.0.70226236706.issue19446@psf.upfronthosting.co.za> Message-ID: <1383118218.32.0.117281012372.issue19446@psf.upfronthosting.co.za> Georg Brandl added the comment: Hi Nitin, "a // b" is defined as the floor division operation, same as what "math.floor(a / b)" gives: the largest integer <= a / b. -7/2 is -3.5, the largest integer <= -3.5 is -4. ---------- nosy: +georg.brandl resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 08:33:02 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 30 Oct 2013 07:33:02 +0000 Subject: [issue19445] heapq.heapify is n log(n), not linear In-Reply-To: <1383112881.24.0.0958145237124.issue19445@psf.upfronthosting.co.za> Message-ID: <1383118382.88.0.274797566546.issue19445@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The run time is O(n) because the heapify algorithm runs bottom-to-top so most of the n//2 sift operations are working on very short heaps (i.e. half of them are at depth 1, a quarter of them are at depth 2, one eight at depth 3, etc). Please take a look at on-line references for heapifying. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 10:12:06 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 30 Oct 2013 09:12:06 +0000 Subject: [issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC In-Reply-To: <1383110349.25.0.857290073089.issue19444@psf.upfronthosting.co.za> Message-ID: <1383124326.87.0.882577885173.issue19444@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 10:23:44 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 30 Oct 2013 09:23:44 +0000 Subject: [issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC In-Reply-To: <1383110349.25.0.857290073089.issue19444@psf.upfronthosting.co.za> Message-ID: <1383125024.63.0.549718685127.issue19444@psf.upfronthosting.co.za> Christian Heimes added the comment: Can you suggest a documentation update? ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +christian.heimes, docs at python stage: -> needs patch versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 10:25:52 2013 From: report at bugs.python.org (Nitin Kumar) Date: Wed, 30 Oct 2013 09:25:52 +0000 Subject: [issue19446] Integer division for negative numbers In-Reply-To: <1383118218.32.0.117281012372.issue19446@psf.upfronthosting.co.za> Message-ID: Nitin Kumar added the comment: Hi Georg, Is there any operator for integer division in python? On Wed, Oct 30, 2013 at 1:00 PM, Georg Brandl wrote: > > Georg Brandl added the comment: > > Hi Nitin, > > "a // b" is defined as the floor division operation, same as what > "math.floor(a / b)" gives: the largest integer <= a / b. > > -7/2 is -3.5, the largest integer <= -3.5 is -4. > > ---------- > nosy: +georg.brandl > resolution: -> invalid > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 10:33:43 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 Oct 2013 09:33:43 +0000 Subject: [issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC In-Reply-To: <1383110349.25.0.857290073089.issue19444@psf.upfronthosting.co.za> Message-ID: <1383125623.97.0.697475009841.issue19444@psf.upfronthosting.co.za> STINNER Victor added the comment: "the file descriptor that mmap.mmap() allocates is not set to close-on-exec" In Python 3.4, the file descriptor is now non-inheritable, as a side effect of the PEP 446. http://www.python.org/dev/peps/pep-0446/ ---------- versions: +Python 3.3, Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 10:35:24 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 Oct 2013 09:35:24 +0000 Subject: [issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC In-Reply-To: <1383110349.25.0.857290073089.issue19444@psf.upfronthosting.co.za> Message-ID: <1383125724.4.0.932704079315.issue19444@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 10:42:07 2013 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Wed, 30 Oct 2013 09:42:07 +0000 Subject: [issue19447] py_compile.compile raises if a file has bad encoding Message-ID: <1383126127.06.0.0829407086057.issue19447@psf.upfronthosting.co.za> New submission from Bohuslav "Slavek" Kabrda: If py_compile.compile is used on a file with bad encoding (e.g. Lib/test/bad_coding2.py), the function raises even if doraise=False is passed. I'm attaching a patch that fixes this in 3.3 - I haven't tried on 3.4 yet and the code has changed, so I'm not sure it's problem there. (Background: During RPM build of Python 3 in Fedora, we use py_compile.compile to make sure all files are properly compiled and have newer timestamps. We use 'find' to get all *.py files under 'python3.3/' and then xargs to pass the files to Python script that compiles them. If one of the files causes py_compile.compile to raise, the rest doesn't get compiled.) ---------- components: Build files: 00186-dont-raise-from-py_compile.patch keywords: patch messages: 201721 nosy: bkabrda priority: normal severity: normal status: open title: py_compile.compile raises if a file has bad encoding versions: Python 3.3 Added file: http://bugs.python.org/file32422/00186-dont-raise-from-py_compile.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 10:45:36 2013 From: report at bugs.python.org (Robert Merrill) Date: Wed, 30 Oct 2013 09:45:36 +0000 Subject: [issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC In-Reply-To: <1383110349.25.0.857290073089.issue19444@psf.upfronthosting.co.za> Message-ID: <1383126336.73.0.264345539996.issue19444@psf.upfronthosting.co.za> Robert Merrill added the comment: I'm adding Library again because I think the current behavior is a bug and should be fixed in the 2.7 tree. Perhaps the documentation in older versions should be updated mmap.mmap should always set the FD_CLOEXEC flag on the descriptor that it gets from dup(). I don't see why we wouldn't do this, because if we are calling exec(), we are blowing away all python state, and only the mmap object should be using this file descriptor (since its existence is hidden from the user). Users should not be depending on the old behavior, because the interface which is presented to them gives them no indication that this fd even exists. Users are probably expecting the proposed behavior, because anyone who has worked with unix file descriptors in C would not expect: fd = os.open(...) mmap = mmap.mmap(fd, size) # do some stuff os.close(fd) To result in an extra inheritable fd still being there. Nothing in the documentation indicates that this would happen, either. ---------- components: +Library (Lib) versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 10:48:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 Oct 2013 09:48:52 +0000 Subject: [issue19447] py_compile.compile raises if a file has bad encoding In-Reply-To: <1383126127.06.0.0829407086057.issue19447@psf.upfronthosting.co.za> Message-ID: <1383126532.57.0.283500010199.issue19447@psf.upfronthosting.co.za> STINNER Victor added the comment: py_compile.compile() has been modified in Python 3.4. The encoding is now detected in the try/except block. You should write a unit test for your patch. http://docs.python.org/devguide/runtests.html#writing ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 10:55:08 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 30 Oct 2013 09:55:08 +0000 Subject: [issue19448] SSL: add OID / NID lookup Message-ID: <1383126908.52.0.345026933499.issue19448@psf.upfronthosting.co.za> New submission from Christian Heimes: For #17134 I need a decent way to map OIDs to human readable strings and vice versa. OpenSSL has a couple of method for the task, e.g. http://www.openssl.org/docs/crypto/OBJ_nid2obj.html The patch implements three ways to lookup NID, SN, LN and OID: by OpenSSL's internal numeric id (NID), by OID or by name: >>> ssl.txt2obj("MD5", name=True) ASN1Object(nid=4, shortname='MD5', longname='md5', oid='1.2.840.113549.2.5') >>> ssl.txt2obj("clientAuth", name=True) ASN1Object(nid=130, shortname='clientAuth', longname='TLS Web Client Authentication', oid='1.3.6.1.5.5.7.3.2') >>> ssl.txt2obj("1.3.6.1.5.5.7.3.1") ASN1Object(nid=129, shortname='serverAuth', longname='TLS Web Server Authentication', oid='1.3.6.1.5.5.7.3.1') ---------- files: ssl_asn1obj.patch keywords: patch messages: 201724 nosy: christian.heimes, giampaolo.rodola, janssen, pitrou priority: normal severity: normal stage: patch review status: open title: SSL: add OID / NID lookup type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32423/ssl_asn1obj.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 11:24:45 2013 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Wed, 30 Oct 2013 10:24:45 +0000 Subject: [issue19447] py_compile.compile raises if a file has bad encoding In-Reply-To: <1383126127.06.0.0829407086057.issue19447@psf.upfronthosting.co.za> Message-ID: <1383128685.37.0.456167899864.issue19447@psf.upfronthosting.co.za> Bohuslav "Slavek" Kabrda added the comment: Ok, I'm attaching a patch for 3.3 with a test case included. ---------- Added file: http://bugs.python.org/file32424/dont-raise-from-py_compile-test-included.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 11:34:27 2013 From: report at bugs.python.org (Robert Merrill) Date: Wed, 30 Oct 2013 10:34:27 +0000 Subject: [issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC In-Reply-To: <1383110349.25.0.857290073089.issue19444@psf.upfronthosting.co.za> Message-ID: <1383129267.85.0.242189612689.issue19444@psf.upfronthosting.co.za> Robert Merrill added the comment: Sorry, I correct my earlier statement: even if the fd you pass to mmap.mmap() is set to FD_CLOEXEC, the dup'd fd /will not be/ So this is a REALLY bad bug because users cannot workaround it except by just not using mmap ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 11:59:32 2013 From: report at bugs.python.org (Tomas Grahn) Date: Wed, 30 Oct 2013 10:59:32 +0000 Subject: [issue19449] csv.DictWriter can't handle extra non-string fields Message-ID: <1383130772.27.0.178945173135.issue19449@psf.upfronthosting.co.za> New submission from Tomas Grahn: When csv.DictWriter.writerow is fed a dict with extra fieldnames (and extrasaction='raise') and any of those extra fieldnames aren't strings, a TypeError-exception is thrown. To fix the issue; in csv.py, edit the line: raise ValueError("dict contains fields not in fieldnames: " + ", ".join(wrong_fields)) to: raise ValueError("dict contains fields not in fieldnames: " + ", ".join(repr(wrong_field) for wrong_field in wrong_fields)) Attached is a patch that fixes the problem (works in both 2.6 and 2.7, I haven't tried anything else). Here is a simple test to demonstrate the problem: import cStringIO, csv sio=cStringIO.StringIO() writer=csv.DictWriter(sio, ["foo", "bar"]) writer.writerow({1:"hello", 2:"world"}) ---------- files: csv-patch.diff keywords: patch messages: 201727 nosy: tomas_grahn priority: normal severity: normal status: open title: csv.DictWriter can't handle extra non-string fields type: behavior versions: Python 2.6, Python 2.7 Added file: http://bugs.python.org/file32425/csv-patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 12:12:38 2013 From: report at bugs.python.org (Marc Schlaich) Date: Wed, 30 Oct 2013 11:12:38 +0000 Subject: [issue19450] Bug in sqlite in Windows binaries Message-ID: <1383131558.55.0.853606379194.issue19450@psf.upfronthosting.co.za> New submission from Marc Schlaich: My System: $ python Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 >>> sqlite3.version '2.6.0' >>> sqlite3.sqlite_version '3.6.21' Test Script: import sqlite3 conn = sqlite3.connect(':memory:') conn.execute('PRAGMA foreign_keys = ON') fk = (conn.execute("PRAGMA foreign_keys").fetchone()[0]) print 'version = %s, foreign keys = %r' % (sqlite3.sqlite_version, bool(fk)) if not fk: raise Exception('No foreign keys!?') c = conn.cursor() c.executescript(''' create table if not exists main.one (resource_id TEXT PRIMARY KEY, data TEXT); create table if not exists main.two (node_id INTEGER PRIMARY KEY, data TEXT); create table if not exists main.mapping (node_id INTEGER REFERENCES two, resource_id TEXT REFERENCES one); insert into main.one(resource_id, data) values('A', 'A one thing'); insert into main.two(node_id, data) values(1, 'A two thing'); insert into main.mapping(resource_id, node_id) values('A', 1); insert into main.one(resource_id, data) values('B', 'Another one thing'); insert into main.two(node_id, data) values(2, 'Another two thing'); insert into main.mapping(resource_id, node_id) values('B', 2); insert into main.one(resource_id, data) values('C', 'Yet another one thing'); ''') for tbl in 'one', 'two', 'mapping': print 'TABLE main.%s:\n%s\n' % (tbl, '\n'.join(repr(r) for r in c.execute('select * from main.%s' % tbl).fetchall())) del_cmd = """delete from main.one where resource_id='B'""" print 'Attempting: %s' % (del_cmd,) try: c.execute(del_cmd) except Exception, e: print 'Failed to delete: %s' % e cmd = """delete from main.one where resource_id='C'""" print 'Attempting: %s' % (cmd,) c.execute(cmd) cmd = """delete from main.mapping where resource_id='B' AND node_id=2""" print '\nAttempting: %s' % (cmd,) c.execute(cmd) for tbl in 'one', 'two', 'mapping': print 'TABLE main.%s:\n%s\n' % (tbl, '\n'.join(repr(r) for r in c.execute('select * from main.%s' % tbl).fetchall())) print 'Attempting: %s' % (del_cmd,) c.execute(del_cmd) This fails with "sqlite3.IntegrityError: foreign key constraint failed". Original report comes from SO: http://stackoverflow.com/questions/9342763/sqlite3-foreign-keys-remembered The proposed solution (to upgrade sqlite) is not possible on Windows as it comes bundled with Python. So please update the bundled sqlite version where this bug is solved. ---------- components: Extension Modules messages: 201728 nosy: schlamar priority: normal severity: normal status: open title: Bug in sqlite in Windows binaries versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 12:24:10 2013 From: report at bugs.python.org (Marc Schlaich) Date: Wed, 30 Oct 2013 11:24:10 +0000 Subject: [issue18683] Core dumps on CentOS In-Reply-To: <1375962081.45.0.433865344111.issue18683@psf.upfronthosting.co.za> Message-ID: <1383132250.83.0.5242732981.issue18683@psf.upfronthosting.co.za> Marc Schlaich added the comment: Ok, these issues were probably due to the shipped version of PyGTK (which is used as event scheduler). Since I built my own Python and own PyGTK everything looks fine. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 14:16:02 2013 From: report at bugs.python.org (Daniele Sluijters) Date: Wed, 30 Oct 2013 13:16:02 +0000 Subject: [issue19451] urlparse accepts invalid hostnames Message-ID: <1383138962.68.0.105445419369.issue19451@psf.upfronthosting.co.za> New submission from Daniele Sluijters: Python 2's urlparse.urlparse() and Python 3's urllib.parse.urlparse() accept URI/URL's with underscores in the host/domain/subdomain. I believe this behaviour to be incorrect. A distinction needs to be made between DNS names and Uniform Resource Locators and Identifiers, urlparse is supposed to deal with the latter (correct me if I'm wrong). According to RFC 2181 section 11 on the syntax of DNS names the use of the underscore is allowed and in use around the internet, especially in TXT and SRV records. However, RFC 1738 on Uniform Resource Locators section 3.1 (and its updates) always define the 'hostname' part of the URL as being: Such a name consists of a sequence of domain labels separated by ".", each domain label starting and ending with an alphanumeric character and possibly also containing "-" characters. On top of that, RFC 2396 on URI's section 3.2.2: Hostnames take the form described in Section 3 of [RFC1034] and Section 2.1 of [RFC1123]: a sequence of domain labels separated by ".", each domain label starting and ending with an alphanumeric character and possibly also containing "-" characters. The underscore is never mentioned as being a valid character nor do any of the references in the RFC's as far as I've been able to see. Languages implementations vary: * Ruby URI.parse does not allow for underscores in domain labels. * Perl URI and URI::URL allow for underscores. * java.net.uri treats the underscore as an illegal character in the domain part. * org.apache.http.httphost since 4.2.3 treats the underscore as an illegal character in the domain part. Httpd's: * Apache: Seems to tolerate underscores but there's been a whole discussion about this on the mailing lists. * nginx: Matches a server_name of '_' to 'any invalid domain name'. It seems to accept server_names with underscores in them but the behaviour is currently unknown to me. Browsers: * IE cannot write cookies since IE 5.5 if host or subdomain part includes an underscore. * Just about every other browser is fine with it. Please note that I'm only talking about the host/domain/subdomain part of URI's and URL's, something like http://en.wikipedia.org/wiki/12-hour_clock is perfectly valid and should parse. ---------- components: Library (Lib) messages: 201730 nosy: daenney, orsenthil priority: normal severity: normal status: open title: urlparse accepts invalid hostnames 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 _______________________________________ From report at bugs.python.org Wed Oct 30 14:20:40 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 Oct 2013 13:20:40 +0000 Subject: [issue19443] add to dict fails after 1,000,000 items on py 2.7.5 In-Reply-To: <1383108183.39.0.692249653807.issue19443@psf.upfronthosting.co.za> Message-ID: <1383139240.94.0.470273171705.issue19443@psf.upfronthosting.co.za> STINNER Victor added the comment: It works for me on Linux 64-bit: $ python Python 2.7.3 (default, Aug 9 2012, 17:23:57) [GCC 4.7.1 20120720 (Red Hat 4.7.1-5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> d, i = {}, 0 >>> while (i < 10000000): ... n = i + 1 ... d[n] = n ... i += 1 ... >>> import os >>> os.system("grep VmRSS /proc/%s/status" % os.getpid()) VmRSS: 637984 kB 0 "On Py 2.7.5 (windows7, x64, 4GB ram) this program slowed down obviously after passing 1,000,000 adds and never completed or raised an exception." What is the exception? How much free memory do you have? If Python has not enough memory, Windows will probably starts to move memory to the disk and the system will becomes slower and slower. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 14:47:19 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 30 Oct 2013 13:47:19 +0000 Subject: [issue19449] csv.DictWriter can't handle extra non-string fields In-Reply-To: <1383130772.27.0.178945173135.issue19449@psf.upfronthosting.co.za> Message-ID: <1383140839.27.0.123830632801.issue19449@psf.upfronthosting.co.za> R. David Murray added the comment: I would argue that the TypeError is correct (field names must be strings), even though the way it is generated is a bit unorthodox :) Let's see what others think. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 14:56:25 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 30 Oct 2013 13:56:25 +0000 Subject: [issue19449] csv.DictWriter can't handle extra non-string fields In-Reply-To: <1383130772.27.0.178945173135.issue19449@psf.upfronthosting.co.za> Message-ID: <1383141385.38.0.701456935559.issue19449@psf.upfronthosting.co.za> R. David Murray added the comment: Rereading my post I disagree with myself. ValueError is probably better in this context (the difference between ValueError and TypeError is a bit grey, and Python is not necessarily completely consistent about it.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 14:57:26 2013 From: report at bugs.python.org (Peter Harris) Date: Wed, 30 Oct 2013 13:57:26 +0000 Subject: [issue19452] ElementTree iterparse documentation Message-ID: <1383141446.52.0.417040462191.issue19452@psf.upfronthosting.co.za> New submission from Peter Harris: Documentation on python website says: xml.etree.ElementTree.iterparse(source, events=None, parser=None) Parses an XML section into an element tree incrementally, and reports what?s going on to the user. source is a filename or file object containing XML data. events is a list of events to report back. But 'events' must be a *tuple* or iterparse raises "TypeError: invalid event tuple" Possibly also worth explaining that "start-ns" event is accompanied by a tuple of (namespace, url) rather than an element from the XML document. Currently the description just says "ns events are used to get detailed namespace information" but doesn't say how or give an example. ---------- assignee: docs at python components: Documentation messages: 201734 nosy: Peter.Harris, docs at python priority: normal severity: normal status: open title: ElementTree iterparse documentation versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 15:09:04 2013 From: report at bugs.python.org (Tomas Grahn) Date: Wed, 30 Oct 2013 14:09:04 +0000 Subject: [issue19449] csv.DictWriter can't handle extra non-string fields In-Reply-To: <1383130772.27.0.178945173135.issue19449@psf.upfronthosting.co.za> Message-ID: <1383142144.17.0.328761356986.issue19449@psf.upfronthosting.co.za> Tomas Grahn added the comment: If non-string field names aren't allowed then shouldn't they be caught at an earlier stage, rather then when the user feeds writerow a dict with an unexpected key? But why should the field names have to be strings in the first place? Everything else is passed through str before being written anyway... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 15:14:46 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 30 Oct 2013 14:14:46 +0000 Subject: [issue19451] urlparse accepts invalid hostnames In-Reply-To: <1383138962.68.0.105445419369.issue19451@psf.upfronthosting.co.za> Message-ID: <1383142486.92.0.6627108932.issue19451@psf.upfronthosting.co.za> R. David Murray added the comment: Python often defaults to the practical over the strictly-conforming (unless there is a 'strict' flag :) We generally follow the lead of the browsers in implementing our web related modules. The situation here appears to be a real mess. Here's an interesting overview on the just the DNS question: http://networkadminkb.com/KB/a156/windows-2003-dns-and-the-underscore.aspx Given that changing this would be a backward incompatible change, I recommend closing this as won't fix. I suspect the long term trend will be that everyone will eventually accept underscores, regardless of what the RFCs say. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 15:18:35 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 30 Oct 2013 14:18:35 +0000 Subject: [issue19407] PEP 453: update the "Installing Python Modules" documentation In-Reply-To: <1382791475.83.0.387983167617.issue19407@psf.upfronthosting.co.za> Message-ID: <1383142715.33.0.820295291844.issue19407@psf.upfronthosting.co.za> Nick Coghlan added the comment: Alternative (more sensible) option - leave the packaging user guide hosted on ReadTheDocs, and if we decide to add a python.org subdomain for it later, that won't break any existing links. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 15:20:53 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 30 Oct 2013 14:20:53 +0000 Subject: [issue19449] csv.DictWriter can't handle extra non-string fields In-Reply-To: <1383130772.27.0.178945173135.issue19449@psf.upfronthosting.co.za> Message-ID: <1383142853.19.0.640525451778.issue19449@psf.upfronthosting.co.za> R. David Murray added the comment: > But why should the field names have to be strings in the first place? Everything else is passed through str before being written anyway... Good point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 15:28:57 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 30 Oct 2013 14:28:57 +0000 Subject: [issue19414] OrderedDict.values() behavior for modified instance In-Reply-To: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> Message-ID: <1383143337.66.0.754603109888.issue19414@psf.upfronthosting.co.za> Ethan Furman added the comment: Do we currently have any data structures in Python, either built-in or in the stdlib, that aren't documented as raising RuntimeError if the size changes during iteration? list, dict, set, and defaultdict all behave this way. If not, I think OrderedDict should behave this way as well. ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 15:32:31 2013 From: report at bugs.python.org (Brett Cannon) Date: Wed, 30 Oct 2013 14:32:31 +0000 Subject: [issue19413] Reload semantics changed unexpectedly in Python 3.3 In-Reply-To: <1382843791.56.0.901507046365.issue19413@psf.upfronthosting.co.za> Message-ID: <1383143551.03.0.569311599678.issue19413@psf.upfronthosting.co.za> Brett Cannon added the comment: Fine with fixing it, but in context of PEP 451, not 3.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 16:01:15 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 30 Oct 2013 15:01:15 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1383145275.93.0.157945896898.issue19063@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Here is the preliminary patch to fix the problem. My patch produces 8bit for msg.as_string and msg.as_bytes for simplicity reason. If msg.as_string should gives content-transfer-encoding 7bit with 8bit data but msg.as_bytes should gives content-transfer-encoding 8bit with 8bit data, I can modify the patch. But it doesn't feel right... ---------- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file32426/fix_8bit_data_charset_none_set_payload.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 17:05:00 2013 From: report at bugs.python.org (Armin Rigo) Date: Wed, 30 Oct 2013 16:05:00 +0000 Subject: [issue19414] OrderedDict.values() behavior for modified instance In-Reply-To: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> Message-ID: <1383149100.19.0.669642676938.issue19414@psf.upfronthosting.co.za> Armin Rigo added the comment: 'list' doesn't, precisely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 17:24:45 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 30 Oct 2013 16:24:45 +0000 Subject: [issue19414] OrderedDict.values() behavior for modified instance In-Reply-To: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> Message-ID: <1383150285.96.0.220288682974.issue19414@psf.upfronthosting.co.za> Ethan Furman added the comment: Ah, right you are: list just acts wierd. ;) So the question then becomes is OrderedDict more like a list or more like a dict? It seems to me that OrderedDict is more like a dict. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 17:25:31 2013 From: report at bugs.python.org (Blaise Gassend) Date: Wed, 30 Oct 2013 16:25:31 +0000 Subject: [issue19445] heapq.heapify is n log(n), not linear In-Reply-To: <1383112881.24.0.0958145237124.issue19445@psf.upfronthosting.co.za> Message-ID: <1383150331.4.0.438000311662.issue19445@psf.upfronthosting.co.za> Blaise Gassend added the comment: I stand corrected. Sorry for the noise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 17:32:19 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Wed, 30 Oct 2013 16:32:19 +0000 Subject: [issue19414] OrderedDict.values() behavior for modified instance In-Reply-To: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> Message-ID: <1383150739.17.0.730645040969.issue19414@psf.upfronthosting.co.za> Nikolaus Rath added the comment: I agree that OrderedDict is more a dict than a list, but it is not clear to me why this means that it cannot extend a dict's functionality in that respect. OrderedDict already adds functionality to dict (preserving the order), so why shouldn't it also allow changes during iteration? I think these two things actually come together quite naturally, since it is the existence of an ordering that makes the behavior under changes during iteration well defined. Is there really a danger that people will get confused because a previously undefined operation now becomes officially supported with a defined meaning? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 17:41:13 2013 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 30 Oct 2013 16:41:13 +0000 Subject: [issue19452] ElementTree iterparse documentation In-Reply-To: <1383141446.52.0.417040462191.issue19452@psf.upfronthosting.co.za> Message-ID: <1383151273.46.0.340129636995.issue19452@psf.upfronthosting.co.za> Stefan Behnel added the comment: How about actually allowing a list in addition to a tuple? And, in fact, any sequence? I can't see a reason not to. For reference, lxml only expects it to be either None or an iterable. Essentially, I consider it more of a set-like filter, since the linear aspect of a tuple/list/sequence has no meaning for it. ---------- components: +XML nosy: +eli.bendersky, scoder type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 17:51:29 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 30 Oct 2013 16:51:29 +0000 Subject: [issue19435] Directory traversal attack for CGIHTTPRequestHandler In-Reply-To: <1383064441.57.0.197155402259.issue19435@psf.upfronthosting.co.za> Message-ID: <3d8wfm1cTBz7LkV@mail.python.org> Roundup Robot added the comment: New changeset e4fe8fcaef0d by Benjamin Peterson in branch '2.7': use the collapsed path in the run_cgi method (closes #19435) http://hg.python.org/cpython/rev/e4fe8fcaef0d New changeset b1ddcb220a7f by Benjamin Peterson in branch '3.1': use the collapsed path in the run_cgi method (closes #19435) http://hg.python.org/cpython/rev/b1ddcb220a7f New changeset dda1a32748e0 by Benjamin Peterson in branch '3.2': merge 3.1 (#19435) http://hg.python.org/cpython/rev/dda1a32748e0 New changeset 544b654d000c by Benjamin Peterson in branch '3.3': merge 3.2 (#19435) http://hg.python.org/cpython/rev/544b654d000c New changeset 493a99acaf00 by Benjamin Peterson in branch 'default': merge 3.3 (#19435) http://hg.python.org/cpython/rev/493a99acaf00 ---------- nosy: +python-dev resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 17:55:33 2013 From: report at bugs.python.org (Mark Richman) Date: Wed, 30 Oct 2013 16:55:33 +0000 Subject: [issue18458] interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update In-Reply-To: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> Message-ID: <1383152133.9.0.188553976293.issue18458@psf.upfronthosting.co.za> Mark Richman added the comment: I had to do `sudo sh ./patch_readline_issue_18458.sh` or the patch script itself would cause Python to crash. After applying this patch, I got the following output, and the problem is still *not* solved for me: -- running on OS X 10.9 -- 2.7 does not need to be patched - skipped -- 3.2 not found - skipped -- 3.3 not found - skipped -- 3.4 not found - skipped -- done ---------- nosy: +mrichman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 18:15:12 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 30 Oct 2013 17:15:12 +0000 Subject: [issue19424] _warnings: patch to avoid conversions from/to UTF-8 In-Reply-To: <1382982202.33.0.652166752386.issue19424@psf.upfronthosting.co.za> Message-ID: <1383153312.52.0.308908659444.issue19424@psf.upfronthosting.co.za> Zachary Ware added the comment: Adding to Vajrasky's report, the same commit also adds 3 warnings when building on Windows: ..\Objects\unicodeobject.c(10588): warning C4018: '>' : signed/unsigned mismatch [P:\Projects\OSS\Python\cpython\PCbuild\pythoncore.vcxproj] ..\Objects\unicodeobject.c(10592): warning C4018: '>' : signed/unsigned mismatch [P:\Projects\OSS\Python\cpython\PCbuild\pythoncore.vcxproj] ..\Objects\unicodeobject.c(10594): warning C4018: '>' : signed/unsigned mismatch [P:\Projects\OSS\Python\cpython\PCbuild\pythoncore.vcxproj] Vajrasky's patch doesn't fix the Windows warnings (but doesn't create any new ones either); the attached patch does (but likely doesn't do anything for the other). I don't know nearly enough C to say whether my patch is any good or not, just enough to say it compiles, doesn't break anything immediately obvious, and removes the warnings on Windows. ---------- nosy: +zach.ware Added file: http://bugs.python.org/file32427/issue19424-windows-warnings.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 18:15:13 2013 From: report at bugs.python.org (David Evans) Date: Wed, 30 Oct 2013 17:15:13 +0000 Subject: [issue19453] pydoc.py doesn't detect IronPython, help(foo) can hang Message-ID: <1383153313.2.0.219850254586.issue19453@psf.upfronthosting.co.za> New submission from David Evans: The pager functions used by help() in StdLib's pydoc.py don't detect IronPython correctly and the result is a lack of functionality or in some cases a hang. This is similar to issue 8110 in that the code attempts to detect windows with a check for "win32" from sys.platform and needs to check for "cli" as well to detect IronPython running on mono on linux/mac os or on windows. My naive change to workaround the problem was to add the two line test for "cli" amidst getpager() here: if sys.platform == 'win32' or sys.platform.startswith('os2'): return lambda text: tempfilepager(plain(text), 'more <') if sys.platform == 'cli': return plainpager # IronPython if hasattr(os, 'system') and os.system('(less) 2>/dev/null') == 0: return lambda text: pipepager(text, 'less') That two line addition allowed basic function and prevents the hang though maybe there is a better pager type that would work on IronPython. In our linux and windows tests though neither the tempfilepager nor pipepager would function on either platform. I submitted the report to the IronPython issues tracker and someone there suggested posting the patch here. ---------- components: Windows messages: 201750 nosy: owlmonkey priority: normal severity: normal status: open title: pydoc.py doesn't detect IronPython, help(foo) can hang type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 18:15:30 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 30 Oct 2013 17:15:30 +0000 Subject: [issue19414] OrderedDict.values() behavior for modified instance In-Reply-To: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> Message-ID: <1383153330.0.0.530161715846.issue19414@psf.upfronthosting.co.za> Ethan Furman added the comment: The further from dict it goes, the more there is to remember. Considering the work around is so simple, I just don't think it's worth it: for key in list(ordered_dict): if some_condition: del ordered_dict[key] A simple list around the dict and we're good to go; and this trick works with dicts, defaultdicts, sets, lists (when you don't want the skipping behavior), etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 18:27:24 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 30 Oct 2013 17:27:24 +0000 Subject: [issue19424] _warnings: patch to avoid conversions from/to UTF-8 In-Reply-To: <1382982202.33.0.652166752386.issue19424@psf.upfronthosting.co.za> Message-ID: <3d8xSC4nmmz7LjP@mail.python.org> Roundup Robot added the comment: New changeset 52ec6a3eeda5 by Victor Stinner in branch 'default': Issue #19424: Fix a compiler warning http://hg.python.org/cpython/rev/52ec6a3eeda5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 18:35:39 2013 From: report at bugs.python.org (Daniele Sluijters) Date: Wed, 30 Oct 2013 17:35:39 +0000 Subject: [issue19451] urlparse accepts invalid hostnames In-Reply-To: <1383138962.68.0.105445419369.issue19451@psf.upfronthosting.co.za> Message-ID: <1383154539.52.0.445062117813.issue19451@psf.upfronthosting.co.za> Daniele Sluijters added the comment: The link you mention only deals with the DNS side of things, this issue is specifically not about that, it's about the URI/URL side of things which is a very important distinction in this case. I'm also not entirely sure I agree with the sentiment of "it's a mess anyway" so lets ignore the RFC. There's an RFC for a reason and if more implementations started to behave accordingly the mess would clear itself up instead of becoming even more of a nightmare. I can agree with the practical over strict approach though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 18:42:18 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 30 Oct 2013 17:42:18 +0000 Subject: [issue19451] urlparse accepts invalid hostnames In-Reply-To: <1383138962.68.0.105445419369.issue19451@psf.upfronthosting.co.za> Message-ID: <1383154938.96.0.635420143882.issue19451@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, I said that link only dealt with the DNS side of things...where there are also incompatibilities. I don't think that strictly adhering to the URI RFCs would clear things up. What about those domains that have _s and want to run web services on them? It appears that the current RFCs have no provision for handling that case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 18:47:07 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 30 Oct 2013 17:47:07 +0000 Subject: [issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC In-Reply-To: <1383129267.85.0.242189612689.issue19444@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: I agree this should be fixed. Robert, want to submit a patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 19:20:23 2013 From: report at bugs.python.org (Peter Harris) Date: Wed, 30 Oct 2013 18:20:23 +0000 Subject: [issue19452] ElementTree iterparse documentation In-Reply-To: <1383141446.52.0.417040462191.issue19452@psf.upfronthosting.co.za> Message-ID: <1383157223.75.0.345219953178.issue19452@psf.upfronthosting.co.za> Peter Harris added the comment: Yeah it would make sense to accept any iterable, but I'm only proposing a documentation fix not a feature enhancement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 19:41:58 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Wed, 30 Oct 2013 18:41:58 +0000 Subject: [issue19414] OrderedDict.values() behavior for modified instance In-Reply-To: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> Message-ID: <1383158518.74.0.530749859751.issue19414@psf.upfronthosting.co.za> Nikolaus Rath added the comment: The workaround is trivial, but there is no technical necessity for it, and it involves copying the entire dict into a list purely for.. what exactly? I guess I do not understand the drawback of allowing changes. What is wrong with for key in ordered_dict: if some_condition: del ordered_dict[key] to be working? Is it really just the fact that the above could does not work for regular dicts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 19:42:26 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 30 Oct 2013 18:42:26 +0000 Subject: [issue19172] selectors: add keys() method In-Reply-To: <1380984038.36.0.521182029078.issue19172@psf.upfronthosting.co.za> Message-ID: <1383158546.48.0.219595441333.issue19172@psf.upfronthosting.co.za> Guido van Rossum added the comment: (Adding CF's new patch so I can compare and review it.) ---------- Added file: http://bugs.python.org/file32428/selectors_map-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 19:45:52 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Wed, 30 Oct 2013 18:45:52 +0000 Subject: [issue19414] OrderedDict.values() behavior for modified instance In-Reply-To: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> Message-ID: <1383158752.13.0.610940362267.issue19414@psf.upfronthosting.co.za> Nikolaus Rath added the comment: Ethan: when you say "..the more there is to remember", what exactly do you mean? I can see that it is important to remember that you're *not allowed* to make changes during iteration for a regular dict. But is there really a significant cognitive burden if it were allowed for ordered dicts? You're not forced to use the feature, since you can still safely continue to use ordered dicts like regular dicts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 19:47:39 2013 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 30 Oct 2013 18:47:39 +0000 Subject: [issue19377] Backport SVG mime type to Python 2 In-Reply-To: <1382622251.64.0.363936372729.issue19377@psf.upfronthosting.co.za> Message-ID: <1383158859.33.0.637452118845.issue19377@psf.upfronthosting.co.za> anatoly techtonik added the comment: I think we are talking about double standards. Why the .xz and .txz are worthy including in 2.7.5 and .svg is not? See issue #16316. http://bugs.python.org/issue15207 will break a lot of this stuff anyway, so I hope it will fix the issue. ---------- resolution: wont fix -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 19:48:10 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 30 Oct 2013 18:48:10 +0000 Subject: [issue19172] selectors: add keys() method In-Reply-To: <1380984038.36.0.521182029078.issue19172@psf.upfronthosting.co.za> Message-ID: <1383158890.75.0.188804868049.issue19172@psf.upfronthosting.co.za> Guido van Rossum added the comment: LGTM. Commit! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 19:51:56 2013 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 30 Oct 2013 18:51:56 +0000 Subject: [issue19454] devguide: Document what a "platform support" is Message-ID: <1383159116.46.0.184690879028.issue19454@psf.upfronthosting.co.za> New submission from anatoly techtonik: As a followup to issue19377 it would be nice if devguide contained a paragraph to resolve the conflicting point provided by http://bugs.python.org/msg187373 and http://bugs.python.org/msg201141 arguments. ---------- assignee: docs at python components: Devguide, Documentation messages: 201762 nosy: docs at python, ezio.melotti, techtonik priority: normal severity: normal status: open title: devguide: Document what a "platform support" is _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 19:56:06 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 30 Oct 2013 18:56:06 +0000 Subject: [issue19414] OrderedDict.values() behavior for modified instance In-Reply-To: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> Message-ID: <1383159366.43.0.0297034703791.issue19414@psf.upfronthosting.co.za> Ethan Furman added the comment: Firstly, you're not copying the entire dict, just its keys. [1] Secondly, you're only copying the keys when you'll be adding/deleting keys from the dict. Thirdly, using the list idiom means you can use OrderedDicts, defaultdicts, dicts, sets, and most likely any other mapping type the same way, whereas if you make OrderedDict special in this area you've locked out the other types. In my opinion the differences in OrderedDict should be limited to what is necessary to make a dict ordered. The ability to insert/delete keys while iterating is not necessary to maintaining an order, and the break from other dicts doesn't add enough value to make it worth it. So, yes, the short answer is because Python's other similar types don't do it that way, OrderedDict shouldn't either. [1] If the dict is large, collect the to_be_deleted keys in a separate list and remove them after the loop. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 19:58:01 2013 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 30 Oct 2013 18:58:01 +0000 Subject: [issue19377] Backport SVG mime type to Python 2 In-Reply-To: <1382622251.64.0.363936372729.issue19377@psf.upfronthosting.co.za> Message-ID: <1383159481.93.0.528811311716.issue19377@psf.upfronthosting.co.za> anatoly techtonik added the comment: Added issue19454 to settle this down. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 19:58:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 30 Oct 2013 18:58:52 +0000 Subject: [issue19437] More failures found by pyfailmalloc In-Reply-To: <1383071047.38.0.937526854844.issue19437@psf.upfronthosting.co.za> Message-ID: <3d8zTm1kVyzS6H@mail.python.org> Roundup Robot added the comment: New changeset 7097b5c39db0 by Victor Stinner in branch 'default': Issue #19437: Fix os.statvfs(), handle errors http://hg.python.org/cpython/rev/7097b5c39db0 New changeset b49f9aa12dae by Victor Stinner in branch 'default': Issue #19437: Fix select.epoll.poll(), fix code handling PyMem_New() error http://hg.python.org/cpython/rev/b49f9aa12dae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 20:02:47 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 30 Oct 2013 19:02:47 +0000 Subject: [issue19414] OrderedDict.values() behavior for modified instance In-Reply-To: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> Message-ID: <1383159767.89.0.031287512613.issue19414@psf.upfronthosting.co.za> Ethan Furman added the comment: Nikolaus, in reply to your question about "more to remember": Even though I may not use it myself, if it is allowed then at some point I will see it in code; when that happens the sequence of events is something like: 1) hey, that won't work 2) oh, wait, is this an OrderedDict? 3) (yes) oh, okay, it's fine then 3) (no) hmm, well, it was supposed to be, but a regular dict was passed in 4) okay, we either fix the code here to handle regular dicts (use list idiom); or go back to calling code and make this an OrderedDict I see that as a lot of extra effort for a non-necessary change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 20:03:05 2013 From: report at bugs.python.org (Milton Mobley) Date: Wed, 30 Oct 2013 19:03:05 +0000 Subject: [issue19443] add to dict fails after 1,000,000 items on py 2.7.5 In-Reply-To: <1383108183.39.0.692249653807.issue19443@psf.upfronthosting.co.za> Message-ID: <1383159785.33.0.896500179774.issue19443@psf.upfronthosting.co.za> Milton Mobley added the comment: I followed the suggestion of email responders to use xrange instead of while, and observed that 32-bit Suse Linux got past 44,000,000 adds before exiting with "Memory Error", while 64-bit Windows 7 slowed down markedly after 22,000,000 adds and was unusable after 44,000,000 adds. However, the program did not stop or raise an exception, which is a concern. The size of the dict was 1.6 GB at that level. My current suspicion is that Windows is not doing a good job of pushing memory already allocated by the process to the virtual file system as the process continues to request more memory. But in my opinion Python should be able to detect failure to complete an allocation request on Windows, and raise an appropriate exception, as it does for Linux. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 20:09:45 2013 From: report at bugs.python.org (Matthew Barnett) Date: Wed, 30 Oct 2013 19:09:45 +0000 Subject: [issue19443] add to dict fails after 1,000,000 items on py 2.7.5 In-Reply-To: <1383108183.39.0.692249653807.issue19443@psf.upfronthosting.co.za> Message-ID: <1383160185.52.0.615432510214.issue19443@psf.upfronthosting.co.za> Matthew Barnett added the comment: Works for me: Python 2.7.5, 64-bit, Windows 8.1 ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 20:11:58 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 30 Oct 2013 19:11:58 +0000 Subject: [issue19443] add to dict fails after 1,000,000 items on py 2.7.5 In-Reply-To: <1383108183.39.0.692249653807.issue19443@psf.upfronthosting.co.za> Message-ID: <1383160318.69.0.370055616081.issue19443@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > But in my opinion Python should be able to detect failure to complete an allocation request on Windows Which failure? You're telling us it doesn't fail, it just becomes slow. (by the way, have you checked whether your machine is swapping when that happens?) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 20:16:43 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 30 Oct 2013 19:16:43 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1383160603.92.0.568091130055.issue19063@psf.upfronthosting.co.za> R. David Murray added the comment: msg.as_string should not be producing a CTE of 8bit. I haven't looked at your patch so I don't know what you mean by having as_string produce 8bit data, but it can't be right :) To clarify: as_string must produce valid unicode data, and therefore *cannot* have any 8bit data in it. Unicode is not an 8bit channel (in SMTP terms) it is a 7bit channel (ie: restricted to ASCII). The *decoded* version of the message can have non-ASCII in it, but as_string is producing an *encoded* version. The CTE applies only to an encoded version. It gets a little confusing because in Python we are used to 'decoding' to unicode and 'encoding' to bytes, but in the email package we also sometimes 'encode' to ASCII but use unicode strings to store it. If we didn't have to maintain backward compatibility it would probably be better to just drop as_string :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 20:31:53 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 30 Oct 2013 19:31:53 +0000 Subject: [issue19172] selectors: add keys() method In-Reply-To: <1380984038.36.0.521182029078.issue19172@psf.upfronthosting.co.za> Message-ID: <3d90Cr5Wdvz7Ljc@mail.python.org> Roundup Robot added the comment: New changeset b0ae96700301 by Charles-Fran?ois Natali in branch 'default': Issue #19172: Add a get_map() method to selectors. http://hg.python.org/cpython/rev/b0ae96700301 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 20:32:25 2013 From: report at bugs.python.org (Ned Deily) Date: Wed, 30 Oct 2013 19:32:25 +0000 Subject: [issue18458] interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update In-Reply-To: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> Message-ID: <1383161545.47.0.000314231157573.issue18458@psf.upfronthosting.co.za> Ned Deily added the comment: Mark, I'm not sure I understand what you saw but the patch script will cause a Python crash as part of its testing so that is to be expected. You should not have to run the script using sudo. This script also only applies to Pythons installed from python.org (or otherwise installed into /Library/Frameworks). Please check which python you are using. Using whatever command name you enter to start the failing python, try the following (I'll assume you use "python2.7"): type python2.7 which python2.7 python2.7 -c "import sys;print(sys.version)" python2.7 -c "import sys;print(sys.executable)" The value for sys.executable should be: /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python In any case, you could manually rename _readline.so as shown in one of the earlier messages (substituting "2.7" for "3.3"). Or you could install 2.7.6rc1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 20:37:17 2013 From: report at bugs.python.org (Mark Richman) Date: Wed, 30 Oct 2013 19:37:17 +0000 Subject: [issue18458] interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update In-Reply-To: <1383161545.47.0.000314231157573.issue18458@psf.upfronthosting.co.za> Message-ID: Mark Richman added the comment: My mistake. I'm using /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -- *Mark Richman* web: www.markrichman.com email: mark at markrichman.com tel: (954) 234-9049 http://www.linkedin.com/in/mrichman On Wed, Oct 30, 2013 at 3:32 PM, Ned Deily wrote: > > Ned Deily added the comment: > > Mark, I'm not sure I understand what you saw but the patch script will > cause a Python crash as part of its testing so that is to be expected. You > should not have to run the script using sudo. This script also only > applies to Pythons installed from python.org (or otherwise installed into > /Library/Frameworks). Please check which python you are using. Using > whatever command name you enter to start the failing python, try the > following (I'll assume you use "python2.7"): > > type python2.7 > which python2.7 > python2.7 -c "import sys;print(sys.version)" > python2.7 -c "import sys;print(sys.executable)" > > The value for sys.executable should be: > > /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python > > In any case, you could manually rename _readline.so as shown in one of the > earlier messages (substituting "2.7" for "3.3"). Or you could install > 2.7.6rc1. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 20:39:47 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 30 Oct 2013 19:39:47 +0000 Subject: [issue18923] Use the new selectors module in the subprocess module In-Reply-To: <1378320095.08.0.301150241372.issue18923@psf.upfronthosting.co.za> Message-ID: <1383161987.85.0.861560147077.issue18923@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Here's an updated patch using the new selector.get_map() method. It removes ~100 lines to subprocess, which is always nice. ---------- Added file: http://bugs.python.org/file32429/subprocess_selectors-1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 20:43:18 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Wed, 30 Oct 2013 19:43:18 +0000 Subject: [issue19414] OrderedDict.values() behavior for modified instance In-Reply-To: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> Message-ID: <1383162198.49.0.518216682375.issue19414@psf.upfronthosting.co.za> Nikolaus Rath added the comment: Hmm. I see your point. You might be right (I'm not fully convinced yet though), but this bug is probably not a good place to go into more detail about this. So what would be the best way to fix the immediate problem this was originally about? Raise a RuntimeError (as Armin suggested), or just end the iteration? Note that RuntimeError would only be raised when the current element is removed from the dict, and the ordered dict would still tolerate other kinds of modifications. Both variants would also be a change from previous behavior (were removing the current elements works as long as you do not remove the next one as well). The minimally intrusive change would be to skip over elements that have been removed, but that comes at the expense of an additional membership test in each iteration. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 20:45:59 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 30 Oct 2013 19:45:59 +0000 Subject: [issue19172] selectors: add keys() method In-Reply-To: <1380984038.36.0.521182029078.issue19172@psf.upfronthosting.co.za> Message-ID: <1383162359.34.0.778728430151.issue19172@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Committed. Antoine, thanks for the idea and patch! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 21:11:18 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 30 Oct 2013 20:11:18 +0000 Subject: [issue17134] Use Windows' certificate store for CA certs In-Reply-To: <1360078143.8.0.938168290854.issue17134@psf.upfronthosting.co.za> Message-ID: <1383163878.74.0.558392341759.issue17134@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file32234/enum_cert_trust.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 21:11:28 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 30 Oct 2013 20:11:28 +0000 Subject: [issue17134] Use Windows' certificate store for CA certs In-Reply-To: <1360078143.8.0.938168290854.issue17134@psf.upfronthosting.co.za> Message-ID: <1383163888.13.0.549099698445.issue17134@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file30497/enumcertstore.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 21:11:34 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 30 Oct 2013 20:11:34 +0000 Subject: [issue17134] Use Windows' certificate store for CA certs In-Reply-To: <1360078143.8.0.938168290854.issue17134@psf.upfronthosting.co.za> Message-ID: <1383163894.16.0.599325589004.issue17134@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file30500/enumcertstore2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 21:13:36 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 30 Oct 2013 20:13:36 +0000 Subject: [issue19414] OrderedDict.values() behavior for modified instance In-Reply-To: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> Message-ID: <1383164016.53.0.252522595027.issue19414@psf.upfronthosting.co.za> Ethan Furman added the comment: Personally, I would rather see a RuntimeError raised. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 21:15:01 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 30 Oct 2013 20:15:01 +0000 Subject: [issue17134] Use Windows' certificate store for CA certs In-Reply-To: <1360078143.8.0.938168290854.issue17134@psf.upfronthosting.co.za> Message-ID: <1383164101.7.0.417655652671.issue17134@psf.upfronthosting.co.za> Christian Heimes added the comment: Here is a simplified version of my patch with doc updates. Changes: - Different functions for certs and CRLs: enum_certificates() / enum_crls() - encoding is now a string ('x509_asn' or 'pkcs_7_asn') - for certificates trust information is either a set of OIDs or True. The OIDs can be interpreter with the new functions #19448. Both functions are intended to be low level interfaces to Window's cert store. ---------- Added file: http://bugs.python.org/file32430/enum_cert_trust2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 21:24:42 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Oct 2013 20:24:42 +0000 Subject: [issue19414] OrderedDict.values() behavior for modified instance In-Reply-To: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> Message-ID: <1383164682.51.0.97310283442.issue19414@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue19332. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 22:47:23 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 30 Oct 2013 21:47:23 +0000 Subject: [issue19332] Guard against changing dict during iteration In-Reply-To: <1382364174.9.0.836332683158.issue19332@psf.upfronthosting.co.za> Message-ID: <1383169643.22.0.239594798295.issue19332@psf.upfronthosting.co.za> Ethan Furman added the comment: Raymond, please don't be so concise. Is the code unimportant because the scenario is so rare, or something else? ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 23:33:47 2013 From: report at bugs.python.org (Ned Deily) Date: Wed, 30 Oct 2013 22:33:47 +0000 Subject: [issue19450] Bug in sqlite in Windows binaries In-Reply-To: <1383131558.55.0.853606379194.issue19450@psf.upfronthosting.co.za> Message-ID: <1383172427.23.0.232541232574.issue19450@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- components: +Build, Windows -Extension Modules nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 23:52:55 2013 From: report at bugs.python.org (Eric Hanchrow) Date: Wed, 30 Oct 2013 22:52:55 +0000 Subject: [issue19455] LoggerAdapter class lacks documented "setLevel" method Message-ID: <1383173575.67.0.414384177388.issue19455@psf.upfronthosting.co.za> Changes by Eric Hanchrow : ---------- components: Library (Lib) nosy: Eric.Hanchrow priority: normal severity: normal status: open title: LoggerAdapter class lacks documented "setLevel" method type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 23:59:37 2013 From: report at bugs.python.org (Eric Hanchrow) Date: Wed, 30 Oct 2013 22:59:37 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1383173977.82.0.544511504832.issue19063@psf.upfronthosting.co.za> Eric Hanchrow added the comment: Put the following into a file named "repro.py", then type "python repro.py" at your shell. You'll see ``AttributeError: 'CustomAdapter' object has no attribute 'setLevel'`` import logging logging.basicConfig () class CustomAdapter(logging.LoggerAdapter): def process(self, msg, kwargs): return '[%s] %s' % (self.extra['connid'], msg), kwargs logger = logging.getLogger(__name__) adapter = CustomAdapter(logger, {'connid': '1234'}) adapter.setLevel (logging.WARN) adapter.warning ("Ahoy matey") ---------- nosy: +Eric.Hanchrow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 00:00:55 2013 From: report at bugs.python.org (Eric Hanchrow) Date: Wed, 30 Oct 2013 23:00:55 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1383174055.4.0.677474975362.issue19063@psf.upfronthosting.co.za> Eric Hanchrow added the comment: Gaah, please ignore that last message; I accidentally pasted it into the wrong page :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 00:01:38 2013 From: report at bugs.python.org (Eric Hanchrow) Date: Wed, 30 Oct 2013 23:01:38 +0000 Subject: [issue19455] LoggerAdapter class lacks documented "setLevel" method Message-ID: <1383174098.42.0.658562417274.issue19455@psf.upfronthosting.co.za> New submission from Eric Hanchrow: Put the following into a file named "repro.py", then type "python repro.py" at your shell. You'll see ``AttributeError: 'CustomAdapter' object has no attribute 'setLevel'`` import logging logging.basicConfig () class CustomAdapter(logging.LoggerAdapter): def process(self, msg, kwargs): return '[%s] %s' % (self.extra['connid'], msg), kwargs logger = logging.getLogger(__name__) adapter = CustomAdapter(logger, {'connid': '1234'}) adapter.setLevel (logging.WARN) adapter.warning ("Ahoy matey") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 00:11:54 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 30 Oct 2013 23:11:54 +0000 Subject: [issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC In-Reply-To: <1383110349.25.0.857290073089.issue19444@psf.upfronthosting.co.za> Message-ID: <1383174714.83.0.24631067568.issue19444@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 00:12:37 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 30 Oct 2013 23:12:37 +0000 Subject: [issue19456] ntpath doesn't join paths correctly when a drive is present Message-ID: <1383174757.86.0.861423882665.issue19456@psf.upfronthosting.co.za> New submission from Guido van Rossum: (Bruce Leban, on python-ideas:) """ ntpath still gets drive-relative paths wrong on Windows: >>> ntpath.join(r'\\a\b\c\d', r'\e\f') '\\e\\f' # should be r'\\a\b\e\f' >>> ntpath.join(r'C:\a\b\c\d', r'\e\f') '\\e\\f' # should be r'C:\e\f' (same behavior in Python 2.7 and 3.3) """ (Let's also make sure PEP 428 / pathlib fixes this.) ---------- components: Library (Lib) keywords: easy messages: 201784 nosy: gvanrossum, pitrou priority: normal severity: normal status: open title: ntpath doesn't join paths correctly when a drive is present type: behavior versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 00:28:04 2013 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 30 Oct 2013 23:28:04 +0000 Subject: [issue19455] LoggerAdapter class lacks documented "setLevel" method In-Reply-To: <1383174098.42.0.658562417274.issue19455@psf.upfronthosting.co.za> Message-ID: <1383175684.52.0.281689610392.issue19455@psf.upfronthosting.co.za> Vinay Sajip added the comment: The adapter provides only the logging methods such as debug(), info() etc., but not methods to configure the logger (such as setLevel). Just use adapter.logger.setLevel(logging.WARNING) ---------- nosy: +vinay.sajip resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 00:31:05 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Wed, 30 Oct 2013 23:31:05 +0000 Subject: [issue19414] iter(ordered_dict) yields keys not in dict in some circumstances In-Reply-To: <1382844474.66.0.775956254592.issue19414@psf.upfronthosting.co.za> Message-ID: <1383175865.73.0.638302084501.issue19414@psf.upfronthosting.co.za> Changes by Nikolaus Rath : ---------- title: OrderedDict.values() behavior for modified instance -> iter(ordered_dict) yields keys not in dict in some circumstances _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 00:33:42 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 30 Oct 2013 23:33:42 +0000 Subject: [issue19457] test.test_codeccallbacks.CodecCallbackTest.test_xmlcharrefreplace_with_surrogates() and test.test_unicode.UnicodeTest.test_encode_decimal_with_surrogates() loaded from *.pyc files fail with Python supporting wide unicode Message-ID: <1383176022.37.0.747916589963.issue19457@psf.upfronthosting.co.za> New submission from Arfrever Frehtes Taifersar Arahesis: test.test_codeccallbacks.CodecCallbackTest.test_xmlcharrefreplace_with_surrogates() and test.test_unicode.UnicodeTest.test_encode_decimal_with_surrogates() fail with Python supporting wide unicode, when they have been loaded from *.pyc files (test_codeccallbacks.pyc, test_unicode.pyc). (This bug can be reproduced when running `make test`, which runs test suite twice, firstly with *.pyc files initially absent.) This bug is a regression in 2.7.6rc1. These tests are absent in 2.7.5. These tests were added in 719ee60fc5e2. $ ./configure --enable-unicode=ucs4 ... $ make ... $ LD_LIBRARY_PATH="$(pwd)" ./python Lib/test/regrtest.py -v test_codeccallbacks ... $ LD_LIBRARY_PATH="$(pwd)" ./python Lib/test/regrtest.py -v test_codeccallbacks == CPython 2.7.6rc1 (2.7:dd12639b82bf, Oct 30 2013, 23:53:21) [GCC 4.8.1] == Linux-3.11.6 == /tmp/cpython/build/test_python_6715 Testing with flags: sys.flags(debug=0, py3k_warning=0, division_warning=0, division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, unicode=0, bytes_warning=0, hash_randomization=0) test_codeccallbacks test_backslashescape (test.test_codeccallbacks.CodecCallbackTest) ... ok test_badandgoodbackslashreplaceexceptions (test.test_codeccallbacks.CodecCallbackTest) ... ok test_badandgoodignoreexceptions (test.test_codeccallbacks.CodecCallbackTest) ... ok test_badandgoodreplaceexceptions (test.test_codeccallbacks.CodecCallbackTest) ... ok test_badandgoodstrictexceptions (test.test_codeccallbacks.CodecCallbackTest) ... ok test_badandgoodxmlcharrefreplaceexceptions (test.test_codeccallbacks.CodecCallbackTest) ... ok test_badhandlerresults (test.test_codeccallbacks.CodecCallbackTest) ... ok test_badlookupcall (test.test_codeccallbacks.CodecCallbackTest) ... ok test_badregistercall (test.test_codeccallbacks.CodecCallbackTest) ... ok test_bug828737 (test.test_codeccallbacks.CodecCallbackTest) ... ok test_callbacks (test.test_codeccallbacks.CodecCallbackTest) ... ok test_charmapencode (test.test_codeccallbacks.CodecCallbackTest) ... ok test_decodehelper (test.test_codeccallbacks.CodecCallbackTest) ... ok test_decodeunicodeinternal (test.test_codeccallbacks.CodecCallbackTest) ... ok test_decoding_callbacks (test.test_codeccallbacks.CodecCallbackTest) ... ok test_encodehelper (test.test_codeccallbacks.CodecCallbackTest) ... ok test_longstrings (test.test_codeccallbacks.CodecCallbackTest) ... ok test_lookup (test.test_codeccallbacks.CodecCallbackTest) ... ok test_translatehelper (test.test_codeccallbacks.CodecCallbackTest) ... ok test_unencodablereplacement (test.test_codeccallbacks.CodecCallbackTest) ... ok test_unicodedecodeerror (test.test_codeccallbacks.CodecCallbackTest) ... ok test_unicodeencodeerror (test.test_codeccallbacks.CodecCallbackTest) ... ok test_unicodetranslateerror (test.test_codeccallbacks.CodecCallbackTest) ... ok test_uninamereplace (test.test_codeccallbacks.CodecCallbackTest) ... ok test_unknownhandler (test.test_codeccallbacks.CodecCallbackTest) ... ok test_xmlcharnamereplace (test.test_codeccallbacks.CodecCallbackTest) ... ok test_xmlcharrefreplace (test.test_codeccallbacks.CodecCallbackTest) ... ok test_xmlcharrefreplace_with_surrogates (test.test_codeccallbacks.CodecCallbackTest) ... FAIL test_xmlcharrefvalues (test.test_codeccallbacks.CodecCallbackTest) ... ok ====================================================================== FAIL: test_xmlcharrefreplace_with_surrogates (test.test_codeccallbacks.CodecCallbackTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/cpython/Lib/test/test_codeccallbacks.py", line 93, in test_xmlcharrefreplace_with_surrogates exp, msg='%r.encode(%r)' % (s, encoding)) AssertionError: u'\U0001f49d'.encode('ascii') ---------------------------------------------------------------------- Ran 29 tests in 0.071s FAILED (failures=1) test test_codeccallbacks failed -- Traceback (most recent call last): File "/tmp/cpython/Lib/test/test_codeccallbacks.py", line 93, in test_xmlcharrefreplace_with_surrogates exp, msg='%r.encode(%r)' % (s, encoding)) AssertionError: u'\U0001f49d'.encode('ascii') 1 test failed: test_codeccallbacks $ LD_LIBRARY_PATH="$(pwd)" ./python Lib/test/regrtest.py -v test_unicode ... $ LD_LIBRARY_PATH="$(pwd)" ./python Lib/test/regrtest.py -v test_unicode == CPython 2.7.6rc1 (2.7:dd12639b82bf, Oct 30 2013, 23:53:21) [GCC 4.8.1] == Linux-3.11.6 == /tmp/cpython/build/test_python_7518 Testing with flags: sys.flags(debug=0, py3k_warning=0, division_warning=0, division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, unicode=0, bytes_warning=0, hash_randomization=0) test_unicode test___contains__ (test.test_unicode.UnicodeTest) ... ok test__format__ (test.test_unicode.UnicodeTest) ... ok test_bug1001011 (test.test_unicode.UnicodeTest) ... ok test_capitalize (test.test_unicode.UnicodeTest) ... ok test_center (test.test_unicode.UnicodeTest) ... ok test_codecs (test.test_unicode.UnicodeTest) ... ok test_codecs_charmap (test.test_unicode.UnicodeTest) ... ok test_codecs_errors (test.test_unicode.UnicodeTest) ... ok test_codecs_idna (test.test_unicode.UnicodeTest) ... ok test_codecs_utf7 (test.test_unicode.UnicodeTest) ... ok test_codecs_utf8 (test.test_unicode.UnicodeTest) ... ok test_comparison (test.test_unicode.UnicodeTest) ... ok test_concatenation (test.test_unicode.UnicodeTest) ... ok test_constructor (test.test_unicode.UnicodeTest) ... ok test_contains (test.test_unicode.UnicodeTest) ... ok test_conversion (test.test_unicode.UnicodeTest) ... ok test_count (test.test_unicode.UnicodeTest) ... ok test_encode_decimal (test.test_unicode.UnicodeTest) ... ok test_encode_decimal_with_surrogates (test.test_unicode.UnicodeTest) ... FAIL test_endswith (test.test_unicode.UnicodeTest) ... ok test_expandtabs (test.test_unicode.UnicodeTest) ... ok test_expandtabs_overflows_gracefully (test.test_unicode.UnicodeTest) ... ok test_extended_getslice (test.test_unicode.UnicodeTest) ... ok test_find (test.test_unicode.UnicodeTest) ... ok test_find_etc_raise_correct_error_messages (test.test_unicode.UnicodeTest) ... ok test_floatformatting (test.test_unicode.UnicodeTest) ... ok test_format (test.test_unicode.UnicodeTest) ... ok test_format_auto_numbering (test.test_unicode.UnicodeTest) ... ok test_format_float (test.test_unicode.UnicodeTest) ... ok test_format_huge_item_number (test.test_unicode.UnicodeTest) ... ok test_format_huge_precision (test.test_unicode.UnicodeTest) ... ok test_format_huge_width (test.test_unicode.UnicodeTest) ... ok test_format_subclass (test.test_unicode.UnicodeTest) ... ok test_formatting (test.test_unicode.UnicodeTest) ... ok test_formatting_huge_precision (test.test_unicode.UnicodeTest) ... ok test_formatting_huge_width (test.test_unicode.UnicodeTest) ... ok test_hash (test.test_unicode.UnicodeTest) ... ok test_index (test.test_unicode.UnicodeTest) ... ok test_inplace_rewrites (test.test_unicode.UnicodeTest) ... ok test_isalnum (test.test_unicode.UnicodeTest) ... ok test_isalnum_non_bmp (test.test_unicode.UnicodeTest) ... ok test_isalpha (test.test_unicode.UnicodeTest) ... ok test_isalpha_non_bmp (test.test_unicode.UnicodeTest) ... ok test_isdecimal (test.test_unicode.UnicodeTest) ... ok test_isdecimal_non_bmp (test.test_unicode.UnicodeTest) ... ok test_isdigit (test.test_unicode.UnicodeTest) ... ok test_isdigit_non_bmp (test.test_unicode.UnicodeTest) ... ok test_islower (test.test_unicode.UnicodeTest) ... ok test_islower_non_bmp (test.test_unicode.UnicodeTest) ... ok test_isnumeric (test.test_unicode.UnicodeTest) ... ok test_isnumeric_non_bmp (test.test_unicode.UnicodeTest) ... ok test_isspace (test.test_unicode.UnicodeTest) ... ok test_isspace_non_bmp (test.test_unicode.UnicodeTest) ... ok test_issue8271 (test.test_unicode.UnicodeTest) ... ok test_istitle (test.test_unicode.UnicodeTest) ... ok test_istitle_non_bmp (test.test_unicode.UnicodeTest) ... ok test_isupper (test.test_unicode.UnicodeTest) ... ok test_isupper_non_bmp (test.test_unicode.UnicodeTest) ... ok test_join (test.test_unicode.UnicodeTest) ... ok test_literals (test.test_unicode.UnicodeTest) ... ok test_ljust (test.test_unicode.UnicodeTest) ... ok test_lower (test.test_unicode.UnicodeTest) ... ok test_mul (test.test_unicode.UnicodeTest) ... ok test_none_arguments (test.test_unicode.UnicodeTest) ... ok test_partition (test.test_unicode.UnicodeTest) ... ok test_printing (test.test_unicode.UnicodeTest) ... ok test_raiseMemError (test.test_unicode.UnicodeTest) ... ok test_replace (test.test_unicode.UnicodeTest) ... ok test_replace_overflow (test.test_unicode.UnicodeTest) ... ok test_repr (test.test_unicode.UnicodeTest) ... ok test_rfind (test.test_unicode.UnicodeTest) ... ok test_rindex (test.test_unicode.UnicodeTest) ... ok test_rjust (test.test_unicode.UnicodeTest) ... ok test_rpartition (test.test_unicode.UnicodeTest) ... ok test_rsplit (test.test_unicode.UnicodeTest) ... ok test_slice (test.test_unicode.UnicodeTest) ... ok test_split (test.test_unicode.UnicodeTest) ... ok test_splitlines (test.test_unicode.UnicodeTest) ... ok test_startswith (test.test_unicode.UnicodeTest) ... ok test_startswith_endswith_errors (test.test_unicode.UnicodeTest) ... ok test_strip (test.test_unicode.UnicodeTest) ... ok test_subscript (test.test_unicode.UnicodeTest) ... ok test_surrogates (test.test_unicode.UnicodeTest) ... ok test_swapcase (test.test_unicode.UnicodeTest) ... ok test_title (test.test_unicode.UnicodeTest) ... ok test_translate (test.test_unicode.UnicodeTest) ... ok test_ucs4 (test.test_unicode.UnicodeTest) ... ok test_unicode_repr (test.test_unicode.UnicodeTest) ... ok test_upper (test.test_unicode.UnicodeTest) ... ok test_utf8_decode_invalid_sequences (test.test_unicode.UnicodeTest) ... ok test_utf8_decode_valid_sequences (test.test_unicode.UnicodeTest) ... ok test_zfill (test.test_unicode.UnicodeTest) ... ok ====================================================================== FAIL: test_encode_decimal_with_surrogates (test.test_unicode.UnicodeTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/cpython/Lib/test/test_unicode.py", line 1672, in test_encode_decimal_with_surrogates '123' + exp) File "/tmp/cpython/Lib/test/test_unicode.py", line 45, in assertEqual super(UnicodeTest, self).assertEqual(first, second, msg) AssertionError: '123💝' != '123��' ---------------------------------------------------------------------- Ran 92 tests in 16.002s FAILED (failures=1) test test_unicode failed -- Traceback (most recent call last): File "/tmp/cpython/Lib/test/test_unicode.py", line 1672, in test_encode_decimal_with_surrogates '123' + exp) File "/tmp/cpython/Lib/test/test_unicode.py", line 45, in assertEqual super(UnicodeTest, self).assertEqual(first, second, msg) AssertionError: '123💝' != '123��' 1 test failed: test_unicode ---------- assignee: serhiy.storchaka messages: 201786 nosy: Arfrever, benjamin.peterson, ezio.melotti, haypo, lemburg, serhiy.storchaka priority: release blocker severity: normal status: open title: test.test_codeccallbacks.CodecCallbackTest.test_xmlcharrefreplace_with_surrogates() and test.test_unicode.UnicodeTest.test_encode_decimal_with_surrogates() loaded from *.pyc files fail with Python supporting wide unicode versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 00:37:51 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 30 Oct 2013 23:37:51 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1383176271.97.0.705752872036.issue19063@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- Removed message: http://bugs.python.org/msg201781 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 00:37:55 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 30 Oct 2013 23:37:55 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1383176275.7.0.940557754706.issue19063@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- Removed message: http://bugs.python.org/msg201782 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 00:41:14 2013 From: report at bugs.python.org (Eric Hanchrow) Date: Wed, 30 Oct 2013 23:41:14 +0000 Subject: [issue19455] LoggerAdapter class lacks documented "setLevel" method In-Reply-To: <1383174098.42.0.658562417274.issue19455@psf.upfronthosting.co.za> Message-ID: <1383176474.26.0.869379702354.issue19455@psf.upfronthosting.co.za> Eric Hanchrow added the comment: I should have been clearer: the problem is that the docs (http://docs.python.org/2/library/logging.html#logging.LoggerAdapter) say In addition to the above, LoggerAdapter supports the following methods of Logger, i.e. debug(), info(), warning(), error(), exception(), critical(), log(), isEnabledFor(), getEffectiveLevel(), setLevel(), hasHandlers(). So the code and the docs disagree. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 01:36:10 2013 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 31 Oct 2013 00:36:10 +0000 Subject: [issue19455] LoggerAdapter class lacks documented "setLevel" method In-Reply-To: <1383174098.42.0.658562417274.issue19455@psf.upfronthosting.co.za> Message-ID: <1383179770.87.0.847867389424.issue19455@psf.upfronthosting.co.za> Vinay Sajip added the comment: Okay, I see. I can't add the methods to the code (as feature additions aren't allowed in micro releases, and 2.7 is the last 2.x release). So I'll update the documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 02:08:16 2013 From: report at bugs.python.org (Eric Hanchrow) Date: Thu, 31 Oct 2013 01:08:16 +0000 Subject: [issue19455] LoggerAdapter class lacks documented "setLevel" method In-Reply-To: <1383179770.87.0.847867389424.issue19455@psf.upfronthosting.co.za> Message-ID: Eric Hanchrow added the comment: Thanks! On Wed, Oct 30, 2013 at 5:36 PM, Vinay Sajip wrote: > > Vinay Sajip added the comment: > > Okay, I see. I can't add the methods to the code (as feature additions aren't allowed in micro releases, and 2.7 is the last 2.x release). So I'll update the documentation. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 02:11:53 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 31 Oct 2013 01:11:53 +0000 Subject: [issue19455] LoggerAdapter class lacks documented "setLevel" method In-Reply-To: <1383174098.42.0.658562417274.issue19455@psf.upfronthosting.co.za> Message-ID: <3d97ll2HSHz7LjN@mail.python.org> Roundup Robot added the comment: New changeset db40b69f9c0a by Vinay Sajip in branch '2.7': Issue #19455: Corrected inaccuracies in documentation and corrected some incorrect cross-references. http://hg.python.org/cpython/rev/db40b69f9c0a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 02:30:52 2013 From: report at bugs.python.org (Martin Panter) Date: Thu, 31 Oct 2013 01:30:52 +0000 Subject: [issue15873] datetime: add ability to parse RFC 3339 dates and times In-Reply-To: <1346965730.56.0.810546720554.issue15873@psf.upfronthosting.co.za> Message-ID: <1383183052.91.0.608669996209.issue15873@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 03:47:19 2013 From: report at bugs.python.org (Hank Christian) Date: Thu, 31 Oct 2013 02:47:19 +0000 Subject: [issue19458] Invitation to connect on LinkedIn Message-ID: <1503784651.35972534.1383187566785.JavaMail.app@ela4-bed80.prod> New submission from Hank Christian: LinkedIn ------------ Python, I'd like to add you to my professional network on LinkedIn. - Henry Henry Christian ADJUNCT PROFESSOR at Central Texas College Greater Los Angeles Area Confirm that you know Henry Christian: https://www.linkedin.com/e/-3qcne3-hnfe5x2a-17/isd/10674146693/f8KKDSuG/?hs=false&tok=1ZDH7D-C56MRY1 -- You are receiving Invitation to Connect emails. Click to unsubscribe: http://www.linkedin.com/e/-3qcne3-hnfe5x2a-17/z2oU7dKDzpt2G7xQz2FC2SclHmnUGzmsk0c/goo/report%40bugs%2Epython%2Eorg/20061/I5845690646_1/?hs=false&tok=1LjfL2tR56MRY1 (c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA. ---------- messages: 201791 nosy: hankchristian priority: normal severity: normal status: open title: Invitation to connect on LinkedIn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 04:06:38 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 31 Oct 2013 03:06:38 +0000 Subject: [issue19458] Invitation to connect on LinkedIn Message-ID: <1383188798.31.0.283717192005.issue19458@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- Removed message: http://bugs.python.org/msg201791 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 04:06:54 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 31 Oct 2013 03:06:54 +0000 Subject: [issue19458] spam Message-ID: <1383188814.96.0.242191993627.issue19458@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- status: open -> closed title: Invitation to connect on LinkedIn -> spam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 05:29:11 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 31 Oct 2013 04:29:11 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1383193751.09.0.955425316692.issue19063@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Okay, so for this case, what are the correct outputs for the cte and the message? from email.charset import Charset from email.message import Message cs = Charset('utf-8') cs.body_encoding = None # disable base64 msg = Message() msg.set_payload('???', cs) msg.as_string() ==> cte -> 7bit message -> ??? or \\u0410\\u0411\\u0412 or \xd0\x90\xd0\x91\xd0\x92? msg.as_bytes() ==> cte -> 8bit message -> \\u0410\\u0411\\u0412 or \xd0\x90\xd0\x91\xd0\x92? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 06:38:53 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 31 Oct 2013 05:38:53 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1383197933.66.0.731679841681.issue19063@psf.upfronthosting.co.za> R. David Murray added the comment: cte base64 I think (see below). Basically, set_payload should be putting the surrogateescape encoded utf-8 into the _payload (which it should now be doing), and probably calling set_charset. The cte will at that point be 8bit, but when as_string calls Generator, it will get converted to 7bit clean by doing (I think) a base64 encode and emitting that as the CTE. I have to look through the code to remind myself how it all works, which I haven't had time for yet, which is why I haven't tried to make a fix myself yet. (Yes, this is poor design, but we are dealing with a long line of legacy code and API here...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 07:13:31 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 31 Oct 2013 06:13:31 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1383200011.92.0.475795249275.issue19063@psf.upfronthosting.co.za> Vajrasky Kok added the comment: So msg.as_string() => cte -> base64 message -> 0JDQkdCS # base64 encoded string What about msg.as_bytes()? Should it be: cte -> 8bit message -> \\u0410\\u0411\\u0412 (raw-unicode-escape) or \xd0\x90\xd0\x91\xd0\x92 (utf-8)? or message -> 0JDQkdCS (base64) as well? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 09:48:31 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 31 Oct 2013 08:48:31 +0000 Subject: [issue19413] Reload semantics changed unexpectedly in Python 3.3 In-Reply-To: <1382843791.56.0.901507046365.issue19413@psf.upfronthosting.co.za> Message-ID: <1383209311.35.0.385549982282.issue19413@psf.upfronthosting.co.za> Eric Snow added the comment: I'm fine with not fixing this for 3.3. Does this need to wait on PEP 451 acceptance? ---------- versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 11:23:55 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 31 Oct 2013 10:23:55 +0000 Subject: [issue19450] Bug in sqlite in Windows binaries In-Reply-To: <1383131558.55.0.853606379194.issue19450@psf.upfronthosting.co.za> Message-ID: <1383215035.33.0.25031593779.issue19450@psf.upfronthosting.co.za> Martin v. L?wis added the comment: It's certainly possible to update SQLite without rebuilding Python. Just replace sqlite3.dll with a newer version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 11:31:10 2013 From: report at bugs.python.org (Berker Peksag) Date: Thu, 31 Oct 2013 10:31:10 +0000 Subject: [issue19172] selectors: add keys() method In-Reply-To: <1380984038.36.0.521182029078.issue19172@psf.upfronthosting.co.za> Message-ID: <1383215470.76.0.851826784464.issue19172@psf.upfronthosting.co.za> Berker Peksag added the comment: + .. method:: get_map() + + Return a mapping of file objects to selector keys. I kind of feel like a walking linter though I think this needs a versionadded tag :) ---------- keywords: -needs review nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 11:52:07 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 31 Oct 2013 10:52:07 +0000 Subject: [issue19418] audioop.c giving signed/unsigned warnings on Windows In-Reply-To: <1382903078.0.0.055907083151.issue19418@psf.upfronthosting.co.za> Message-ID: <3d9NdF3k0jz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 0848c90a5dd1 by Tim Golden in branch 'default': Issue #19418 Fix some warnings on Win64 http://hg.python.org/cpython/rev/0848c90a5dd1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 11:52:37 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Thu, 31 Oct 2013 10:52:37 +0000 Subject: [issue19172] selectors: add keys() method In-Reply-To: <1383215470.76.0.851826784464.issue19172@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Berker Peksag added the comment: > > + .. method:: get_map() > + > + Return a mapping of file objects to selector keys. > > I kind of feel like a walking linter though I think this needs a versionadded tag :) Well, selectors have been added to 3.4 - which hasn't been released yet - so no versionadded is needed (there's one at the module-level). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 11:52:59 2013 From: report at bugs.python.org (=?utf-8?q?Caol=C3=A1n_McNamara?=) Date: Thu, 31 Oct 2013 10:52:59 +0000 Subject: [issue19459] Fatal Python error: Py_Initialize: Unable to get the locale encoding: GEORGIAN-PS Message-ID: <1383216779.28.0.251946690468.issue19459@psf.upfronthosting.co.za> New submission from Caol?n McNamara: LANG=ka_GE.georgianps /usr/bin/python3 Fatal Python error: Py_Initialize: Unable to get the locale encoding LookupError: unknown encoding: GEORGIAN-PS Aborted (core dumped) but with python-2.7.5 no crash... LANG=ka_GE.georgianps /usr/bin/python2 Python 2.7.5 (default, Oct 8 2013, 12:19:40) [GCC 4.8.1 20130603 (Red Hat 4.8.1-1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> (fedora 19) ---------- components: Unicode messages: 201800 nosy: Caol?n.McNamara, ezio.melotti priority: normal severity: normal status: open title: Fatal Python error: Py_Initialize: Unable to get the locale encoding: GEORGIAN-PS type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 11:56:24 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Oct 2013 10:56:24 +0000 Subject: [issue19459] Fatal Python error: Py_Initialize: Unable to get the locale encoding: GEORGIAN-PS In-Reply-To: <1383216779.28.0.251946690468.issue19459@psf.upfronthosting.co.za> Message-ID: <1383216984.13.0.883911668339.issue19459@psf.upfronthosting.co.za> STINNER Victor added the comment: This bug was initially reported in LibreOffice: https://bugs.freedesktop.org/show_bug.cgi?id=68850 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 12:24:45 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Oct 2013 11:24:45 +0000 Subject: [issue19459] Fatal Python error: Py_Initialize: Unable to get the locale encoding: GEORGIAN-PS In-Reply-To: <1383216779.28.0.251946690468.issue19459@psf.upfronthosting.co.za> Message-ID: <1383218685.93.0.81354063975.issue19459@psf.upfronthosting.co.za> STINNER Victor added the comment: I found three georgian encodings: https://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/charmaps/GEORGIAN-PS;h=64615ff4344d74ea0c70cfd7a6c6c8019afb884e;hb=HEAD https://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/charmaps/GEORGIAN-ACADEMY;h=9dc1bc9e782e9fe6092a00daf1a75274fd6dd738;hb=HEAD http://tools.ietf.org/html/draft-giasher-geostd8-00 The first one ("GEORGIAN-PS") is probably the most accurate because it is the one included in the GNU libc. Could you please try to copy attached georgian_ps.py file into /usr/lib64/python3.3/encodings/ (or /usr/lib/python3.3/encodings/ for 32-bit Linux)? Then try to print georgian letters using: print(bytes(range(0xc0, 0xe6)).decode("GEORGIAN-PS")) Please give me also your locale encoding: import locale; print(locale.getpreferredencoding()) @Caol?n: Do you know the GEORGIAN-ACADEMY encoding? It doesn't look to be used by any glibc locale. On my Fedora 18, I have 3 georgian locales: * ka_GE.georgianps: locale encoding GEORGIAN-PS * ka_GE: locale encoding GEORGIAN-PS * ka_GE.utf8: locale encoding UTF-8 You can workaround this issue by switching your locale from ka_GE.georgianps to ka_GE.utf8. ---------- Added file: http://bugs.python.org/file32431/georgian_ps.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 12:25:06 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Oct 2013 11:25:06 +0000 Subject: [issue19459] Python does not support the GEORGIAN-PS charset In-Reply-To: <1383216779.28.0.251946690468.issue19459@psf.upfronthosting.co.za> Message-ID: <1383218706.27.0.873376495497.issue19459@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Fatal Python error: Py_Initialize: Unable to get the locale encoding: GEORGIAN-PS -> Python does not support the GEORGIAN-PS charset versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 12:28:38 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Oct 2013 11:28:38 +0000 Subject: [issue19457] test.test_codeccallbacks.CodecCallbackTest.test_xmlcharrefreplace_with_surrogates() and test.test_unicode.UnicodeTest.test_encode_decimal_with_surrogates() loaded from *.pyc files fail with Python supporting wide unicode In-Reply-To: <1383176022.37.0.747916589963.issue19457@psf.upfronthosting.co.za> Message-ID: <1383218918.15.0.0975337456691.issue19457@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This issue is not release blocker because it affects only testing. Here is a patch which should fix tests. ---------- components: +Tests keywords: +patch priority: release blocker -> normal stage: -> patch review type: -> behavior Added file: http://bugs.python.org/file32432/issue19457.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 12:31:26 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Oct 2013 11:31:26 +0000 Subject: [issue19457] test.test_codeccallbacks.CodecCallbackTest.test_xmlcharrefreplace_with_surrogates() and test.test_unicode.UnicodeTest.test_encode_decimal_with_surrogates() loaded from *.pyc files fail with Python supporting wide unicode In-Reply-To: <1383176022.37.0.747916589963.issue19457@psf.upfronthosting.co.za> Message-ID: <1383219086.29.0.0755363713302.issue19457@psf.upfronthosting.co.za> STINNER Victor added the comment: + if u'\ud83d\udc9d' != u'\U0001f49d': If would prefer a test on sys.maxunicode, something like: if sys.maxunicode == 0xffff: Oh, I didn't remember that Python supports surrogate pairs, but not always. Support of non-BMP characters in Python 2 is ugly :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 12:37:25 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Oct 2013 11:37:25 +0000 Subject: [issue19459] Python does not support the GEORGIAN-PS charset In-Reply-To: <1383216779.28.0.251946690468.issue19459@psf.upfronthosting.co.za> Message-ID: <1383219445.98.0.0174200089779.issue19459@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +lemburg, loewis, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 12:53:39 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 31 Oct 2013 11:53:39 +0000 Subject: [issue19413] Reload semantics changed unexpectedly in Python 3.3 In-Reply-To: <1382843791.56.0.901507046365.issue19413@psf.upfronthosting.co.za> Message-ID: <1383220419.12.0.755328915545.issue19413@psf.upfronthosting.co.za> Nick Coghlan added the comment: Failing test case showing that Python 3.3 can't reload a module that is converted to a package behind importlib's back (I like this better than the purely introspection based tests, since it shows a real, albeit obscure, regression due to this behavioural change): $ ./broken_reload.py E ====================================================================== ERROR: test_module_to_package (__main__.TestBadReload) ---------------------------------------------------------------------- Traceback (most recent call last): File "./broken_reload.py", line 28, in test_module_to_package imp.reload(mod) File "/usr/lib64/python3.3/imp.py", line 271, in reload return module.__loader__.load_module(name) File "", line 586, in _check_name_wrapper File "", line 1024, in load_module File "", line 1005, in load_module File "", line 562, in module_for_loader_wrapper File "", line 855, in _load_module File "", line 950, in get_code File "", line 1043, in path_stats FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp_n48mm/to_be_reloaded.py' ---------------------------------------------------------------------- Ran 1 test in 0.002s FAILED (errors=1) Interactive session showing that import.c didn't have this problem, since it reran the whole search (foo is just a toy module I had lying around in my play directory): $ python Python 2.7.5 (default, Oct 8 2013, 12:19:40) [GCC 4.8.1 20130603 (Red Hat 4.8.1-1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import foo Hello >>> foo.__file__ 'foo.py' >>> import os >>> os.mkdir("foo") >>> os.rename('foo.py', 'foo/__init__.py') >>> reload(foo) Hello >>> foo.__file__ 'foo/__init__.py' >>> ---------- Added file: http://bugs.python.org/file32433/broken_reload.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 13:01:27 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 31 Oct 2013 12:01:27 +0000 Subject: [issue4331] Add functools.partialmethod In-Reply-To: <1226817180.09.0.841012218041.issue4331@psf.upfronthosting.co.za> Message-ID: <1383220887.21.0.762711271109.issue4331@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 13:06:08 2013 From: report at bugs.python.org (Matt Joiner) Date: Thu, 31 Oct 2013 12:06:08 +0000 Subject: [issue4331] Add functools.partialmethod In-Reply-To: <1226817180.09.0.841012218041.issue4331@psf.upfronthosting.co.za> Message-ID: <1383221168.75.0.655304023864.issue4331@psf.upfronthosting.co.za> Changes by Matt Joiner : ---------- nosy: -anacrolix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 13:28:52 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 31 Oct 2013 12:28:52 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1383222532.22.0.584982337263.issue19406@psf.upfronthosting.co.za> Nick Coghlan added the comment: Added most of the nosy list from the tracking issue 19347. Updated draft docs. I believe this version of the module docs should be complete (since the installation guide updates are covered by issue 19407). While Donald's attached patch is incomplete, the version on GitHub looks basically ready to go (aside from --root not working when running pip from a wheel file): https://github.com/dstufft/cpython/compare/ensurepip Shall we proceed with the commit based on the currently available pip, so Martin and Ned can get started on the installer updates? ---------- nosy: +loewis, ned.deily, tshepang Added file: http://bugs.python.org/file32434/pep453_ensurepip_docs_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 13:31:21 2013 From: report at bugs.python.org (Donald Stufft) Date: Thu, 31 Oct 2013 12:31:21 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1383222681.61.0.968578735852.issue19406@psf.upfronthosting.co.za> Donald Stufft added the comment: For what it's worth I can get --root ready to go shortly, I have a patch against pip for it (https://github.com/pypa/pip/pull/1272) I just need to write some tests to ensure it keeps working. Let me go off and do that right now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 13:35:07 2013 From: report at bugs.python.org (Donald Stufft) Date: Thu, 31 Oct 2013 12:35:07 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1383222907.46.0.561550126717.issue19406@psf.upfronthosting.co.za> Donald Stufft added the comment: I also need to update the bundled Wheel to one that was created with Python 3.4 instead of 2.7 (which matters until the fix for https://github.com/pypa/pip/issues/1067 which is https://github.com/pypa/pip/pull/1251 lands). That fixes the issue where the wheel will have pip2, and pip2.7 baked into it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 13:44:47 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 31 Oct 2013 12:44:47 +0000 Subject: [issue19437] More failures found by pyfailmalloc In-Reply-To: <1383071047.38.0.937526854844.issue19437@psf.upfronthosting.co.za> Message-ID: <3d9R7f557yzNXr@mail.python.org> Roundup Robot added the comment: New changeset d191d22a9d23 by Victor Stinner in branch 'default': Issue #19437: Fix _pickle, don't call _Unpickler_SkipConsumed() with an http://hg.python.org/cpython/rev/d191d22a9d23 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 13:51:01 2013 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 31 Oct 2013 12:51:01 +0000 Subject: [issue19452] ElementTree iterparse documentation In-Reply-To: <1383141446.52.0.417040462191.issue19452@psf.upfronthosting.co.za> Message-ID: <1383223861.69.0.31577094759.issue19452@psf.upfronthosting.co.za> Eli Bendersky added the comment: Thanks for the report, Peter. This is indeed a documentation fix for Python 3.3; note that in 3.4 (default branch), the restriction was lifted and iterparse now accepts any iterable sequence. The documentation also reflects that (saying that 'events' is a sequence). I'll update the 3.3 docs to address this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 13:51:12 2013 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 31 Oct 2013 12:51:12 +0000 Subject: [issue19452] ElementTree iterparse documentation In-Reply-To: <1383141446.52.0.417040462191.issue19452@psf.upfronthosting.co.za> Message-ID: <1383223872.01.0.275394823314.issue19452@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 13:55:46 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 31 Oct 2013 12:55:46 +0000 Subject: [issue19452] ElementTree iterparse documentation In-Reply-To: <1383141446.52.0.417040462191.issue19452@psf.upfronthosting.co.za> Message-ID: <3d9RNL0p43zT0m@mail.python.org> Roundup Robot added the comment: New changeset e6941225e014 by Eli Bendersky in branch '3.3': Issue #19452: Clarify the documentation of iterparse w.r.t. events argument. http://hg.python.org/cpython/rev/e6941225e014 New changeset 2a996cecf762 by Eli Bendersky in branch 'default': Null merge for issue #19452 http://hg.python.org/cpython/rev/2a996cecf762 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 13:56:10 2013 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 31 Oct 2013 12:56:10 +0000 Subject: [issue19452] ElementTree iterparse documentation In-Reply-To: <1383141446.52.0.417040462191.issue19452@psf.upfronthosting.co.za> Message-ID: <1383224170.29.0.867360948108.issue19452@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 13:56:46 2013 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 31 Oct 2013 12:56:46 +0000 Subject: [issue16425] minidom replaceChild(new_child, old_child) removes new_child even if in another document In-Reply-To: <1352279150.2.0.240477416324.issue16425@psf.upfronthosting.co.za> Message-ID: <1383224206.84.0.891044078991.issue16425@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: -eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 13:59:03 2013 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 31 Oct 2013 12:59:03 +0000 Subject: [issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser In-Reply-To: <1381041750.41.0.637077946349.issue19176@psf.upfronthosting.co.za> Message-ID: <1383224343.35.0.114090373272.issue19176@psf.upfronthosting.co.za> Eli Bendersky added the comment: Thanks for the report, Martin. I'll take a look once I get some time ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 14:19:06 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Oct 2013 13:19:06 +0000 Subject: [issue19457] test.test_codeccallbacks.CodecCallbackTest.test_xmlcharrefreplace_with_surrogates() and test.test_unicode.UnicodeTest.test_encode_decimal_with_surrogates() loaded from *.pyc files fail with Python supporting wide unicode In-Reply-To: <1383176022.37.0.747916589963.issue19457@psf.upfronthosting.co.za> Message-ID: <1383225546.88.0.0374009645238.issue19457@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > + if u'\ud83d\udc9d' != u'\U0001f49d': > > If would prefer a test on sys.maxunicode, something like: > > if sys.maxunicode == 0xffff: No. 1. The check is true only on wide build. 2. It depends on how test module was loaded, true if it loaded from .py-file and false if it loaded from .py[co]-file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 14:27:33 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Oct 2013 13:27:33 +0000 Subject: [issue19457] test.test_codeccallbacks.CodecCallbackTest.test_xmlcharrefreplace_with_surrogates() and test.test_unicode.UnicodeTest.test_encode_decimal_with_surrogates() loaded from *.pyc files fail with Python supporting wide unicode In-Reply-To: <1383176022.37.0.747916589963.issue19457@psf.upfronthosting.co.za> Message-ID: <1383226053.75.0.296098161216.issue19457@psf.upfronthosting.co.za> STINNER Victor added the comment: > 2. It depends on how test module was loaded, true if it loaded from .py-file and false if it loaded from .py[co]-file. I tested with Python compiled in narrow or wide build: len(u'\ud83d\udc9d') value changes depending if the file is compiled to PYC in narrow or wide build. Oh, I have a headache. I didn't remember that Python 2 was so much broken with non-BMP characters :-p ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 14:27:59 2013 From: report at bugs.python.org (Donald Stufft) Date: Thu, 31 Oct 2013 13:27:59 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1383226079.94.0.747941367887.issue19406@psf.upfronthosting.co.za> Donald Stufft added the comment: Ok, merged in the --root fix to pip and created a Wheel using Python 3.4 (which I installed the Wheel distribution using an ensurepip installed pip ;) ). Updated on github and a patch added, all outstanding issues that affect this patch exist on the pip side of things. Primarily https://github.com/pypa/pip/issues/1067 which, since I created the new pip wheel using 3.4, only affects this patch in that setuptools is still version specific. This'll be fixed soon in pip. ---------- Added file: http://bugs.python.org/file32435/ensurepip.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 14:54:40 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 31 Oct 2013 13:54:40 +0000 Subject: [issue4331] Add functools.partialmethod In-Reply-To: <1226817180.09.0.841012218041.issue4331@psf.upfronthosting.co.za> Message-ID: <1383227680.77.0.177537524818.issue4331@psf.upfronthosting.co.za> Nick Coghlan added the comment: Updated patch based on Alon's last patch. The major functional change is to ensure __self__ is set appropriately on any bound methods returned by the descriptor. I also updated the docs and docstring, and added a What's New entry (as well as rewording the existing entry for functools.singledispatch) There were a few other cosmetic changes, with the most noticeable being moving the partialmethod implementation and tests adjacent to the existing ones for functools.partial. Assuming nobody pokes any significant holes in this idea and implementation in the meantime, I'll commit this before beta 1. ---------- Added file: http://bugs.python.org/file32436/issue4331_partialmethod.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 15:32:31 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 31 Oct 2013 14:32:31 +0000 Subject: [issue19413] Reload semantics changed unexpectedly in Python 3.3 In-Reply-To: <1382843791.56.0.901507046365.issue19413@psf.upfronthosting.co.za> Message-ID: <1383229951.88.0.594073264073.issue19413@psf.upfronthosting.co.za> Brett Cannon added the comment: No, the fix can go into Python 3.4 right now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 15:33:54 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 31 Oct 2013 14:33:54 +0000 Subject: [issue19282] dbm.open should be a context manager In-Reply-To: <1382082310.98.0.0309554787542.issue19282@psf.upfronthosting.co.za> Message-ID: <1383230034.93.0.998334327313.issue19282@psf.upfronthosting.co.za> Nick Coghlan added the comment: Patch looks reasonable to me - if nobody beats me to it, I'll commit this before beta 1 :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 15:36:39 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 31 Oct 2013 14:36:39 +0000 Subject: [issue19385] dbm.dumb should be consistent when the database is closed In-Reply-To: <1382683121.03.0.174486602388.issue19385@psf.upfronthosting.co.za> Message-ID: <1383230199.35.0.654132563544.issue19385@psf.upfronthosting.co.za> Nick Coghlan added the comment: Patch looks good to me, I'll apply it when I apply issue 19282. ---------- assignee: -> ncoghlan nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 15:37:23 2013 From: report at bugs.python.org (Marc Schlaich) Date: Thu, 31 Oct 2013 14:37:23 +0000 Subject: [issue19450] Bug in sqlite in Windows binaries In-Reply-To: <1383131558.55.0.853606379194.issue19450@psf.upfronthosting.co.za> Message-ID: <1383230243.4.0.225826726799.issue19450@psf.upfronthosting.co.za> Marc Schlaich added the comment: Ah that's great. The issue is resolved with SQLite 3.8.1. However, would be great if a newer SQLite version comes already bundled with Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 15:54:36 2013 From: report at bugs.python.org (Eric Hanchrow) Date: Thu, 31 Oct 2013 14:54:36 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1383231276.91.0.986046188753.issue19063@psf.upfronthosting.co.za> Changes by Eric Hanchrow : ---------- nosy: -Eric.Hanchrow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 16:03:14 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Oct 2013 15:03:14 +0000 Subject: [issue17405] Add _Py_memset_s() to securely clear memory In-Reply-To: <1363107252.29.0.782882608.issue17405@psf.upfronthosting.co.za> Message-ID: <1383231794.74.0.0442638431958.issue17405@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 16:03:20 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Oct 2013 15:03:20 +0000 Subject: [issue17016] _sre: avoid relying on pointer overflow In-Reply-To: <1358870068.45.0.162917053865.issue17016@psf.upfronthosting.co.za> Message-ID: <1383231800.58.0.523619967176.issue17016@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 16:06:49 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 31 Oct 2013 15:06:49 +0000 Subject: [issue19457] test.test_codeccallbacks.CodecCallbackTest.test_xmlcharrefreplace_with_surrogates() and test.test_unicode.UnicodeTest.test_encode_decimal_with_surrogates() loaded from *.pyc files fail with Python supporting wide unicode In-Reply-To: <1383176022.37.0.747916589963.issue19457@psf.upfronthosting.co.za> Message-ID: <3d9VHX1f3TzS6H@mail.python.org> Roundup Robot added the comment: New changeset 8d5df9602a72 by Serhiy Storchaka in branch '2.7': Issue #19457: Fixed xmlcharrefreplace tests on wide build when tests are http://hg.python.org/cpython/rev/8d5df9602a72 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 16:09:08 2013 From: report at bugs.python.org (Tom Hines) Date: Thu, 31 Oct 2013 15:09:08 +0000 Subject: [issue10685] trace does not ignore --ignore-module In-Reply-To: <1292157270.73.0.200325030661.issue10685@psf.upfronthosting.co.za> Message-ID: <1383232148.85.0.556301234884.issue10685@psf.upfronthosting.co.za> Tom Hines added the comment: The trace module ignores the --ignore-dir option for both the --listfuncs and --trackcalls modes. I have attached a patch. ---------- keywords: +patch nosy: +tomhines Added file: http://bugs.python.org/file32437/trace.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 16:13:47 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Oct 2013 15:13:47 +0000 Subject: [issue19385] dbm.dumb should be consistent when the database is closed In-Reply-To: <1382683121.03.0.174486602388.issue19385@psf.upfronthosting.co.za> Message-ID: <1383232427.11.0.510120021862.issue19385@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Additional checks can slowdown the code. It doesn't matter in some operations, but not on __len__, __contains__, etc. EAFP approach is to catch AttributeError and raise appropriate dbm.dumb.error exception. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 16:16:24 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Oct 2013 15:16:24 +0000 Subject: [issue19385] dbm.dumb should be consistent when the database is closed In-Reply-To: <1382683121.03.0.174486602388.issue19385@psf.upfronthosting.co.za> Message-ID: <1383232584.55.0.625522792758.issue19385@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yet one nitpick. I think that closing check should be after argument type check and key encoding. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 16:16:53 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 31 Oct 2013 15:16:53 +0000 Subject: [issue17405] Add _Py_memset_s() to securely clear memory In-Reply-To: <1363107252.29.0.782882608.issue17405@psf.upfronthosting.co.za> Message-ID: <1383232613.08.0.440031090005.issue17405@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think I still don't understand the use case within Python. Why would you want to clear the internal state of a hash object? If you can read the computer's memory, you probably have access to sensitive data already? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 16:24:47 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Oct 2013 15:24:47 +0000 Subject: [issue19457] test.test_codeccallbacks.CodecCallbackTest.test_xmlcharrefreplace_with_surrogates() and test.test_unicode.UnicodeTest.test_encode_decimal_with_surrogates() loaded from *.pyc files fail with Python supporting wide unicode In-Reply-To: <1383176022.37.0.747916589963.issue19457@psf.upfronthosting.co.za> Message-ID: <1383233087.28.0.461939052581.issue19457@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Arfrever for your report. And please describe a problem in the body of the issue, not in its title. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 16:59:31 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 31 Oct 2013 15:59:31 +0000 Subject: [issue19460] Add test for MIMENonMultipart Message-ID: <1383235171.21.0.576245026541.issue19460@psf.upfronthosting.co.za> New submission from Vajrasky Kok: Apparently there is no test for MIMENonMultipart. [sky at localhost cpython]$ grep -R MIMENonMultipart Lib/test/* [sky at localhost cpython]$ Attached the patch to add test for MIMENonMultipart. ---------- components: Tests files: add_test_non_multipart.patch keywords: patch messages: 201827 nosy: r.david.murray, vajrasky priority: normal severity: normal status: open title: Add test for MIMENonMultipart versions: Python 3.4 Added file: http://bugs.python.org/file32438/add_test_non_multipart.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 17:07:37 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Oct 2013 16:07:37 +0000 Subject: [issue4350] Remove dead code from Tkinter.py In-Reply-To: <1227053659.32.0.711141995765.issue4350@psf.upfronthosting.co.za> Message-ID: <1383235657.19.0.384696669704.issue4350@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 17:07:52 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Oct 2013 16:07:52 +0000 Subject: [issue6157] Tkinter.Text: changes for bbox, debug, and edit methods. In-Reply-To: <1243800373.79.0.587066766962.issue6157@psf.upfronthosting.co.za> Message-ID: <1383235672.57.0.36739699785.issue6157@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 17:07:54 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Oct 2013 16:07:54 +0000 Subject: [issue6159] Tkinter.PanedWindow: docstring fixes, change in paneconfigure and removed some returns In-Reply-To: <1243812482.01.0.481805459937.issue6159@psf.upfronthosting.co.za> Message-ID: <1383235674.61.0.512448843645.issue6159@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 17:08:01 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Oct 2013 16:08:01 +0000 Subject: [issue6160] Tkinter.Spinbox: fix for bbox and removed some uninteresting returns In-Reply-To: <1243826530.3.0.945381049334.issue6160@psf.upfronthosting.co.za> Message-ID: <1383235681.71.0.67717715929.issue6160@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 17:08:09 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Oct 2013 16:08:09 +0000 Subject: [issue6167] Tkinter.Scrollbar: the activate method needs to return a value, and set should take only two args In-Reply-To: <1243887092.8.0.492821608561.issue6167@psf.upfronthosting.co.za> Message-ID: <1383235689.19.0.0292091380698.issue6167@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 17:08:15 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Oct 2013 16:08:15 +0000 Subject: [issue6181] Tkinter.Listbox several minor issues In-Reply-To: <1243977899.25.0.845872446641.issue6181@psf.upfronthosting.co.za> Message-ID: <1383235695.71.0.0748097618368.issue6181@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 17:08:31 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Oct 2013 16:08:31 +0000 Subject: [issue6225] Fixing several minor bugs in Tkinter.Canvas and one in Misc._configure In-Reply-To: <1244325396.24.0.788727463424.issue6225@psf.upfronthosting.co.za> Message-ID: <1383235711.27.0.428903554671.issue6225@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 17:15:39 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Oct 2013 16:15:39 +0000 Subject: [issue18684] Pointers point out of array bound in _sre.c In-Reply-To: <1375962984.07.0.918202360038.issue18684@psf.upfronthosting.co.za> Message-ID: <1383236139.76.0.720073554555.issue18684@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 17:23:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 31 Oct 2013 16:23:52 +0000 Subject: [issue19437] More failures found by pyfailmalloc In-Reply-To: <1383071047.38.0.937526854844.issue19437@psf.upfronthosting.co.za> Message-ID: <3d9X0R0428z7LjP@mail.python.org> Roundup Robot added the comment: New changeset 9b37fbda9043 by Victor Stinner in branch 'default': Issue #19437: Fix get_filter() from _warnings, don't call PyObject_IsSubclass() http://hg.python.org/cpython/rev/9b37fbda9043 New changeset e035b4656088 by Victor Stinner in branch 'default': Issue #19437: Fix show_warning() of _warnings, stop at the first error to not http://hg.python.org/cpython/rev/e035b4656088 New changeset 1181fcc02fe7 by Victor Stinner in branch 'default': Issue #19437: Fix fill_and_set_sslerror() of _ssl, handle Py_BuildValue() http://hg.python.org/cpython/rev/1181fcc02fe7 New changeset ae4bdd4b7240 by Victor Stinner in branch 'default': Issue #19437: Fix PyCArrayType constructor, raise MemoryError on PyMem_Malloc() http://hg.python.org/cpython/rev/ae4bdd4b7240 New changeset a0e2c2cb60f6 by Victor Stinner in branch 'default': Issue #19437: Fix PyCFuncPtrType constructor, handle http://hg.python.org/cpython/rev/a0e2c2cb60f6 New changeset 8f58e57e0d59 by Victor Stinner in branch 'default': Issue #19437: Fix newPySSLSocket(), handle PyWeakref_NewRef() failure http://hg.python.org/cpython/rev/8f58e57e0d59 New changeset 985f8762ee3e by Victor Stinner in branch 'default': Issue #19437: Fix r_PyLong() of marshal module, stop immediatly at first http://hg.python.org/cpython/rev/985f8762ee3e New changeset 9e836a945ea9 by Victor Stinner in branch 'default': Issue #19437: Fix r_object() of marshal module, handle r_byte() failure for http://hg.python.org/cpython/rev/9e836a945ea9 New changeset fc54e2848c98 by Victor Stinner in branch 'default': Issue #19437: Fix r_object() of marshal module, handle PyDict_SetItem() failure http://hg.python.org/cpython/rev/fc54e2848c98 New changeset 995173ed248a by Victor Stinner in branch 'default': Issue #19437: Cleanup r_ref() of the marshal module http://hg.python.org/cpython/rev/995173ed248a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 18:24:06 2013 From: report at bugs.python.org (=?utf-8?q?Nacsa_Krist=C3=B3f?=) Date: Thu, 31 Oct 2013 17:24:06 +0000 Subject: [issue19461] RawConfigParser modifies empty strings unconditionally Message-ID: <1383240246.91.0.876276014549.issue19461@psf.upfronthosting.co.za> New submission from Nacsa Krist?f: http://hg.python.org/cpython/file/8d5df9602a72/Lib/ConfigParser.py#l529 RawConfigParser has a special case of replacing '""' with '' in reader. However the writer does not do the same. This may cause problems, for example if you merge multiple ini files into one and the 3rd party program that should use the output segfaults on an ini that has `key=` instead of `key=value`, as it is in my case. :) I think that the reasoning with the reader maybe was that an empty string must be an empty python string. However there is no option to control how it gets written back to the output. One can of course walkaround it by replacing the '' values with '""', but I think the standard library is ought to be consistent, walkarounds are unpythonic, a raw parser should be transparent either way, and there should preferrably be one obvious way to do it. I think this is not just unintuitive (especially in a parser called "raw"), but goes against the philosophy of "refusing the temptation to guess". As I know, the syntax of .ini files is not exactly well-defined, so the best option in my opinion would be allowing to configure the parser how to treat these values. Whether or not adding this option is viable, I think the problem still remains that the writer now works inconsistently of the reader. ---------- components: Library (Lib) messages: 201829 nosy: Nacsa.Krist?f priority: normal severity: normal status: open title: RawConfigParser modifies empty strings unconditionally type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 18:25:41 2013 From: report at bugs.python.org (=?utf-8?q?Nacsa_Krist=C3=B3f?=) Date: Thu, 31 Oct 2013 17:25:41 +0000 Subject: [issue19461] RawConfigParser modifies empty strings unconditionally In-Reply-To: <1383240246.91.0.876276014549.issue19461@psf.upfronthosting.co.za> Message-ID: <1383240341.84.0.799212485211.issue19461@psf.upfronthosting.co.za> Nacsa Krist?f added the comment: typo: `key=` instead of `key=value` was meant as `key=` instead of `key=""` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 18:28:37 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 31 Oct 2013 17:28:37 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1383240517.32.0.880750516125.issue19063@psf.upfronthosting.co.za> R. David Murray added the comment: as_bytes should be producing the raw utf8 bytes with cte 8bit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 18:30:36 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 31 Oct 2013 17:30:36 +0000 Subject: [issue19460] Add test for MIMENonMultipart In-Reply-To: <1383235171.21.0.576245026541.issue19460@psf.upfronthosting.co.za> Message-ID: <1383240636.99.0.199101768088.issue19460@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- components: +email nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 18:32:58 2013 From: report at bugs.python.org (Artem Ustinov) Date: Thu, 31 Oct 2013 17:32:58 +0000 Subject: [issue19462] Add remove_argument() method to argparse.ArgumentParser Message-ID: <1383240778.45.0.779487488351.issue19462@psf.upfronthosting.co.za> New submission from Artem Ustinov: In order to migrate from optparse to argparse we need to have an ability to substitute anguments, e.g. remove and then create. In our framework we use the command line utility base class and then inherit the particular tools from it. The parser in base class uses add_argument() to populate the general argument list but for some tools it is needed to modify the inherited arguments set and make some arguments to have the modified meaning. With optparse we've just used remove_option() and then added the modified one with add_option() but argparse currently does not have this functionality. For the purpose above we just need to have remove_argument() or modify_argument() methods in orgparse ---------- components: Library (Lib) messages: 201832 nosy: ustinov priority: normal severity: normal status: open title: Add remove_argument() method to argparse.ArgumentParser type: enhancement versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 18:40:56 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 31 Oct 2013 17:40:56 +0000 Subject: [issue19418] audioop.c giving signed/unsigned warnings on Windows In-Reply-To: <1382903078.0.0.055907083151.issue19418@psf.upfronthosting.co.za> Message-ID: <3d9YjN11KCz7LjP@mail.python.org> Roundup Robot added the comment: New changeset 54bf7b5ec3b6 by Tim Golden in branch '3.3': Issue #19418 Fix some warnings on Win64 http://hg.python.org/cpython/rev/54bf7b5ec3b6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 18:47:42 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 31 Oct 2013 17:47:42 +0000 Subject: [issue19461] RawConfigParser modifies empty strings unconditionally In-Reply-To: <1383240246.91.0.876276014549.issue19461@psf.upfronthosting.co.za> Message-ID: <1383241662.54.0.860700622269.issue19461@psf.upfronthosting.co.za> R. David Murray added the comment: A configurable option is probably the only way forward, due to backward compatibility reasons, but ?ukasz will know for sure. If so, it can only go in the *next* version of Python, and while we haven't hit beta yet on 3.4 it may be too late for anyone to have time to get it in before then. Also, I was under the impression that 'key=' was the canonical way to indicate an empty value in an ini file. As you say, the format is not well defined (no surprise). ---------- keywords: +easy nosy: +lukasz.langa, r.david.murray stage: -> needs patch type: behavior -> enhancement versions: +Python 3.5 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 18:51:52 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 31 Oct 2013 17:51:52 +0000 Subject: [issue19418] audioop.c giving signed/unsigned warnings on Windows In-Reply-To: <1382903078.0.0.055907083151.issue19418@psf.upfronthosting.co.za> Message-ID: <1383241912.95.0.120841147874.issue19418@psf.upfronthosting.co.za> Tim Golden added the comment: Fixed in 3.3 / 3.4 ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 18:54:02 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 31 Oct 2013 17:54:02 +0000 Subject: [issue19462] Add remove_argument() method to argparse.ArgumentParser In-Reply-To: <1383240778.45.0.779487488351.issue19462@psf.upfronthosting.co.za> Message-ID: <1383242042.95.0.931946386674.issue19462@psf.upfronthosting.co.za> R. David Murray added the comment: Does conflict_handler='resolve' address your use case? It sounds like it should. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 19:01:13 2013 From: report at bugs.python.org (Derek Wilson) Date: Thu, 31 Oct 2013 18:01:13 +0000 Subject: [issue5715] listen socket close in SocketServer.ForkingMixIn.process_request() In-Reply-To: <1239064250.04.0.401358738839.issue5715@psf.upfronthosting.co.za> Message-ID: <1383242473.78.0.743279835902.issue5715@psf.upfronthosting.co.za> Derek Wilson added the comment: this would still be nice to have fixed ... any progress? ---------- nosy: +underrun versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 19:11:56 2013 From: report at bugs.python.org (Artem Ustinov) Date: Thu, 31 Oct 2013 18:11:56 +0000 Subject: [issue19462] Add remove_argument() method to argparse.ArgumentParser In-Reply-To: <1383242042.95.0.931946386674.issue19462@psf.upfronthosting.co.za> Message-ID: Artem Ustinov added the comment: We need argparse to raise an error for conflicting options and that's why we need to implicitly substitute an option when we need it On 31 Oct 2013 19:54, "R. David Murray" wrote: > > R. David Murray added the comment: > > Does conflict_handler='resolve' address your use case? It sounds like it > should. > > ---------- > nosy: +r.david.murray > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 19:13:59 2013 From: report at bugs.python.org (Artem Ustinov) Date: Thu, 31 Oct 2013 18:13:59 +0000 Subject: [issue19462] Add remove_argument() method to argparse.ArgumentParser In-Reply-To: Message-ID: Artem Ustinov added the comment: Explicitly substitute, excuse me On 31 Oct 2013 20:11, "Artem Ustinov" wrote: > > Artem Ustinov added the comment: > > We need argparse to raise an error for conflicting options and that's why > we need to implicitly substitute an option when we need it > On 31 Oct 2013 19:54, "R. David Murray" wrote: > > > > > R. David Murray added the comment: > > > > Does conflict_handler='resolve' address your use case? It sounds like it > > should. > > > > ---------- > > nosy: +r.david.murray > > > > _______________________________________ > > Python tracker > > > > _______________________________________ > > > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 19:45:21 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 31 Oct 2013 18:45:21 +0000 Subject: [issue19349] Not so correct exception message when running venv In-Reply-To: <1382445461.71.0.435225941381.issue19349@psf.upfronthosting.co.za> Message-ID: <3d9b7H3TDzz7Lkw@mail.python.org> Roundup Robot added the comment: New changeset 731bdec35fdd by Vinay Sajip in branch '3.3': Issue #19349: Corrected error message. http://hg.python.org/cpython/rev/731bdec35fdd New changeset e97d9926da83 by Vinay Sajip in branch 'default': Closes #19349: Merged fix from 3.3. http://hg.python.org/cpython/rev/e97d9926da83 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 19:53:22 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 31 Oct 2013 18:53:22 +0000 Subject: [issue19463] assertGdbRepr depends on hash randomization / endianess Message-ID: <1383245602.59.0.0634998131847.issue19463@psf.upfronthosting.co.za> New submission from Christian Heimes: I'm seeing some unrelated test failures on PPC Linux (big endian) in my PEP-456 branch. http://buildbot.python.org/all/builders/PPC64%20PowerLinux%20custom/builds/17/steps/test/logs/stdio ====================================================================== FAIL: test_frozensets (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of frozensets ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/custom.edelsohn-powerlinux-ppc64/build/Lib/test/test_gdb.py", line 331, in test_frozensets self.assertGdbRepr(frozenset(['a', 'b']), "frozenset({'a', 'b'})") File "/home/shager/cpython-buildarea/custom.edelsohn-powerlinux-ppc64/build/Lib/test/test_gdb.py", line 231, in assertGdbRepr % (gdb_repr, exp_repr, gdb_output))) AssertionError: "frozenset({'b', 'a'})" != "frozenset({'a', 'b'})" - frozenset({'b', 'a'}) ? ^ ^ + frozenset({'a', 'b'}) ? ^ ^ ====================================================================== FAIL: test_sets (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of sets ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/custom.edelsohn-powerlinux-ppc64/build/Lib/test/test_gdb.py", line 316, in test_sets self.assertGdbRepr(set(['a', 'b']), "{'a', 'b'}") File "/home/shager/cpython-buildarea/custom.edelsohn-powerlinux-ppc64/build/Lib/test/test_gdb.py", line 231, in assertGdbRepr % (gdb_repr, exp_repr, gdb_output))) AssertionError: "{'b', 'a'}" != "{'a', 'b'}" - {'b', 'a'} + {'a', 'b'} ---------- components: Tests messages: 201841 nosy: christian.heimes priority: low severity: normal stage: needs patch status: open title: assertGdbRepr depends on hash randomization / endianess type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 19:56:35 2013 From: report at bugs.python.org (Adam Polkosnik) Date: Thu, 31 Oct 2013 18:56:35 +0000 Subject: [issue6839] zipfile can't extract file In-Reply-To: <1252094279.03.0.456295268952.issue6839@psf.upfronthosting.co.za> Message-ID: <1383245795.19.0.343804172025.issue6839@psf.upfronthosting.co.za> Adam Polkosnik added the comment: Just tested my patch on mac, and it appears that it didn't work on OSX (and likely on other unix platforms too). Conclusion... os.path.basename() will not do anything to windows paths when running on unix. I'm thinking that instead of bailing at 'File name in directory "%s" and header "%s" differ.', the library should just print a warning, and continue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 19:56:52 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Oct 2013 18:56:52 +0000 Subject: [issue6157] Tkinter.Text: changes for bbox, debug, and edit methods. In-Reply-To: <1243800373.79.0.587066766962.issue6157@psf.upfronthosting.co.za> Message-ID: <1383245812.63.0.94317740007.issue6157@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Add tkinter basic options tests versions: -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 19:58:43 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Oct 2013 18:58:43 +0000 Subject: [issue6157] Tkinter.Text: changes for bbox, debug, and edit methods. In-Reply-To: <1243800373.79.0.587066766962.issue6157@psf.upfronthosting.co.za> Message-ID: <1383245923.36.0.751238857835.issue6157@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Issue19085 adds test file in which test for this issue should be placed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 20:01:38 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 31 Oct 2013 19:01:38 +0000 Subject: [issue19462] Add remove_argument() method to argparse.ArgumentParser In-Reply-To: <1383240778.45.0.779487488351.issue19462@psf.upfronthosting.co.za> Message-ID: <1383246098.74.0.468975178577.issue19462@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 20:11:43 2013 From: report at bugs.python.org (Jeff Hardy) Date: Thu, 31 Oct 2013 19:11:43 +0000 Subject: [issue19453] pydoc.py doesn't detect IronPython, help(foo) can hang In-Reply-To: <1383153313.2.0.219850254586.issue19453@psf.upfronthosting.co.za> Message-ID: <1383246703.36.0.171988418143.issue19453@psf.upfronthosting.co.za> Changes by Jeff Hardy : ---------- nosy: +jeff.hardy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 20:15:34 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 31 Oct 2013 19:15:34 +0000 Subject: [issue19464] Remove warnings from Windows buildbot "clean" script Message-ID: <1383246934.8.0.971910154804.issue19464@psf.upfronthosting.co.za> New submission from Zachary Ware: Here's a patch to remove the compiler warning raised during the "clean" step on the Windows buildbots. The warning is about the fact that ssl.vcxproj doesn't have an NMakeCleanCommandLine command; the patch adds such a command that simply echos "OpenSSL must be cleaned manually if you want to rebuild it." Since Tools/buildbot/clean.bat is also called by Tools/buildbot/build.bat, this also removes 4 warnings from the "compile" step as well. ---------- components: Build, Windows files: mask_ssl_clean_warnings.diff keywords: patch messages: 201844 nosy: brian.curtin, pitrou, tim.golden, zach.ware priority: normal severity: normal status: open title: Remove warnings from Windows buildbot "clean" script type: enhancement versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32439/mask_ssl_clean_warnings.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 21:19:54 2013 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 31 Oct 2013 20:19:54 +0000 Subject: [issue19141] Windows Launcher fails to respect PATH In-Reply-To: <1380669409.4.0.896421919729.issue19141@psf.upfronthosting.co.za> Message-ID: <1383250794.0.0.57845943276.issue19141@psf.upfronthosting.co.za> Vinay Sajip added the comment: Closing, as no activity following Mark's comment. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 21:26:31 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 31 Oct 2013 20:26:31 +0000 Subject: [issue17933] format str bug in urllib request.py In-Reply-To: <1367974224.67.0.224732033427.issue17933@psf.upfronthosting.co.za> Message-ID: <1383251191.8.0.785637024794.issue17933@psf.upfronthosting.co.za> R. David Murray added the comment: This was changed to %r by Benjamin Peterson in 27e470952085. ---------- resolution: -> out of date stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 21:29:14 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 31 Oct 2013 20:29:14 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1383251354.92.0.124712718654.issue19183@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: http://bugs.python.org/file32440/fb2f9c0bbca9.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 21:32:25 2013 From: report at bugs.python.org (Milton Mobley) Date: Thu, 31 Oct 2013 20:32:25 +0000 Subject: [issue19443] add to dict fails after 1,000,000 items on py 2.7.5 In-Reply-To: <1383108183.39.0.692249653807.issue19443@psf.upfronthosting.co.za> Message-ID: <1383251545.91.0.471684711888.issue19443@psf.upfronthosting.co.za> Milton Mobley added the comment: I now believe the problem of slow execution is caused by performance of the Windows 7 page file, and not by a Python bug. Others reported that similar tests worked on Windows 8.1 and various Linux systems. So I request to close or withdraw the Python "bug". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 21:38:03 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 31 Oct 2013 20:38:03 +0000 Subject: [issue17883] Fix buildbot testing of Tkinter In-Reply-To: <1367355915.98.0.26398929673.issue17883@psf.upfronthosting.co.za> Message-ID: <1383251883.3.0.468789428761.issue17883@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file30080/2.7_rt.bat_tcltk_fix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 21:38:07 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 31 Oct 2013 20:38:07 +0000 Subject: [issue17883] Fix buildbot testing of Tkinter In-Reply-To: <1367355915.98.0.26398929673.issue17883@psf.upfronthosting.co.za> Message-ID: <1383251887.98.0.656879634109.issue17883@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file30156/issue17883.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 21:38:15 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 31 Oct 2013 20:38:15 +0000 Subject: [issue17883] Fix buildbot testing of Tkinter In-Reply-To: <1367355915.98.0.26398929673.issue17883@psf.upfronthosting.co.za> Message-ID: <1383251895.69.0.241090293138.issue17883@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file30196/issue17883-tmp-test.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 21:40:57 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 31 Oct 2013 20:40:57 +0000 Subject: [issue19443] add to dict fails after 1,000,000 items on py 2.7.5 In-Reply-To: <1383108183.39.0.692249653807.issue19443@psf.upfronthosting.co.za> Message-ID: <1383252057.88.0.300745938671.issue19443@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 21:41:42 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 31 Oct 2013 20:41:42 +0000 Subject: [issue19464] Remove warnings from Windows buildbot "clean" script In-Reply-To: <1383246934.8.0.971910154804.issue19464@psf.upfronthosting.co.za> Message-ID: <1383252102.8.0.514521215342.issue19464@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- assignee: -> tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 21:42:32 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 31 Oct 2013 20:42:32 +0000 Subject: [issue17883] Fix buildbot testing of Tkinter In-Reply-To: <1367355915.98.0.26398929673.issue17883@psf.upfronthosting.co.za> Message-ID: <1383252152.53.0.341190223655.issue17883@psf.upfronthosting.co.za> Zachary Ware added the comment: Buildbots are still hanging on test_ttk_guionly and failing test_tcl and both patches still apply cleanly. Is there anything I can do to help move this forward again? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 22:00:00 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 31 Oct 2013 21:00:00 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1383253200.09.0.596073021325.issue19183@psf.upfronthosting.co.za> Christian Heimes added the comment: I had to add the conversion from LE to host endianess. The missing conversion was affecting and degrading hash value dispersion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 22:34:52 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Oct 2013 21:34:52 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <1383255292.49.0.252495780139.issue19085@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch addresses Ezio's comments. ---------- Added file: http://bugs.python.org/file32441/tkinter_options_tests_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 22:36:01 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 31 Oct 2013 21:36:01 +0000 Subject: [issue18985] Improve the documentation in fcntl module In-Reply-To: <1378722919.93.0.901392318122.issue18985@psf.upfronthosting.co.za> Message-ID: <1383255361.15.0.296683204535.issue18985@psf.upfronthosting.co.za> R. David Murray added the comment: Here's my suggestion. ---------- Added file: http://bugs.python.org/file32442/fcntl-doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 23:00:17 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Oct 2013 22:00:17 +0000 Subject: [issue5715] listen socket close in SocketServer.ForkingMixIn.process_request() In-Reply-To: <1239064250.04.0.401358738839.issue5715@psf.upfronthosting.co.za> Message-ID: <1383256817.56.0.607481196937.issue5715@psf.upfronthosting.co.za> STINNER Victor added the comment: > this would still be nice to have fixed ... any progress? Python 3.4 behaves a little bit better: all files and sockets are non-inheritable by default. It does not fix the issue if you fork without exec. To fix this issue, we need a patch. Nobody proposed something to fix the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 23:19:54 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Oct 2013 22:19:54 +0000 Subject: [issue17405] Add _Py_memset_s() to securely clear memory In-Reply-To: <1363107252.29.0.782882608.issue17405@psf.upfronthosting.co.za> Message-ID: <1383257994.08.0.398391096456.issue17405@psf.upfronthosting.co.za> STINNER Victor added the comment: Some comments: - I don't have small files which just contain one function. Do you expect that we may add other security-related functions? You may add a "pysecurity.c" file. (It's maybe a stupid idea.) - Why only a few hash functions (sha1, sha3)? We must use the same policy for all hash functions: always force memset() or never use memset(). - Why not touching the ssl module? PySSL_dealloc() and context_dealloc() for example. - Would it be possible to use a custom memory allocator which would memset() the memory before releasing it for security related objects? If yes, would it be possible to switch it on or off at runtime? It may be interesting if memset() has a visible overhead on performances. Antoine wrote: "I think I still don't understand the use case within Python. Why would you want to clear the internal state of a hash object? If you can read the computer's memory, you probably have access to sensitive data already?" Data are usually duplicated in many places. I'm also dubious that memset() adds any security. If it has no impact on performance, why not using memset() for hash functions and security modules like ssl. But for example, ssl.RAND_bytes() stores its result in a common bytes object. The bytes type doesn't use a custom memory allocator, and so the secret random bytes will still be present in memory after the bytes object has been "deleted". If you really care of security, you may need a security allocator which reset all memory blocks on free(), not only a few modules. And what happens when you pass data to a C module which copies the data somewhere. Does it later reset correctly the memory when data becomes useless? @Christian: Do you have examples of other projects clearing the memory when objects are destroyed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 23:24:11 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Oct 2013 22:24:11 +0000 Subject: [issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC In-Reply-To: <1383110349.25.0.857290073089.issue19444@psf.upfronthosting.co.za> Message-ID: <1383258251.78.0.428597210193.issue19444@psf.upfronthosting.co.za> STINNER Victor added the comment: > Robert, want to submit a patch? If someone wants to work on a patch, here is the code of Python 3.4 to duplicate a file descriptor and make it non-inheritable. http://hg.python.org/cpython/file/e97d9926da83/Python/fileutils.c#l978 and http://hg.python.org/cpython/file/e97d9926da83/Python/fileutils.c#l618 The code is complex because it has optimized versions for each operating system. Only supporting Windows and fcntl() is enough for Python 2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 23:36:21 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Oct 2013 22:36:21 +0000 Subject: [issue19465] selectors: provide a helper to choose a selector using constraints Message-ID: <1383258981.48.0.274242938687.issue19465@psf.upfronthosting.co.za> New submission from STINNER Victor: multiprocess, telnetlib (and subprocess in a near future, see #18923) use the following code to select the best selector: # poll/select have the advantage of not requiring any extra file descriptor, # contrarily to epoll/kqueue (also, they require a single syscall). if hasattr(selectors, 'PollSelector'): _TelnetSelector = selectors.PollSelector else: _TelnetSelector = selectors.SelectSelector I don't like the principle of "a default selector", selectors.DefaultSelector should be removed in my opinion. I would prefer a function returning the best selector using constraints. Example: def get_selector(use_fd=True) -> BaseSelector: ... By default, it would return the same than the current DefaultSelector. But if you set use_fd=False, the choice would be restricted to select() or poll(). I don't want to duplicate code like telnetlib uses in each module, it's harder to maintain. The selectors module may get new selectors in the future, see for example #18931. Except use_fd, I don't have other ideas of constraints. I read somewhere that differenet selectors may have different limits on the number of file descriptors. I don't know if it's useful to use such constraint? ---------- messages: 201855 nosy: gvanrossum, haypo, neologix priority: normal severity: normal status: open title: selectors: provide a helper to choose a selector using constraints versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 23:45:54 2013 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 31 Oct 2013 22:45:54 +0000 Subject: [issue19465] selectors: provide a helper to choose a selector using constraints In-Reply-To: <1383258981.48.0.274242938687.issue19465@psf.upfronthosting.co.za> Message-ID: <1383259554.9.0.918860098039.issue19465@psf.upfronthosting.co.za> Guido van Rossum added the comment: What's the use case for not wanting to use an extra FD? Nevertheless I'm fine with using a function to pick the default selector (but it requires some changes to asyncio too, which currently uses DefaultSelector). Something I would find useful would be a way to override the selector choice on the command line. I currently have to build this into the app's arg parser and main(), e.g. http://code.google.com/p/tulip/source/browse/examples/sink.py#64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 23:59:13 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Oct 2013 22:59:13 +0000 Subject: [issue19465] selectors: provide a helper to choose a selector using constraints In-Reply-To: <1383258981.48.0.274242938687.issue19465@psf.upfronthosting.co.za> Message-ID: <1383260353.22.0.783819472357.issue19465@psf.upfronthosting.co.za> STINNER Victor added the comment: > What's the use case for not wanting to use an extra FD? A selector may be used a few millisecond just to check if a socket is ready, and then destroyed. For such use case, select() is maybe enough (1 syscall). Epoll requires more system calls: create the epoll FD, register the socket, poll, destroy the epoll FD (4 syscalls). ---------- _______________________________________ Python tracker _______________________________________