From report at bugs.python.org Mon Jul 1 00:00:04 2013 From: report at bugs.python.org (Roger Serwy) Date: Sun, 30 Jun 2013 22:00:04 +0000 Subject: [issue18318] Idle: stop depending on console output In-Reply-To: <1372373009.47.0.618602359328.issue18318@psf.upfronthosting.co.za> Message-ID: <1372629604.76.0.668178606379.issue18318@psf.upfronthosting.co.za> Roger Serwy added the comment: This looks similar to issue13582 with the patch to redirect console writes to a GUI text box. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 00:36:27 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jun 2013 22:36:27 +0000 Subject: [issue18189] IDLE Improvements: Unit test for Delegator.py In-Reply-To: <1370950219.82.0.574615156859.issue18189@psf.upfronthosting.co.za> Message-ID: <1372631787.55.0.0950205965355.issue18189@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I asked on the core-mentorship list about pydev test philosophy. I got useful answers from Nick and Antoine that can be summarized as "We are pragmatic, not dogmatic." One may have to be a list member to read this link, but here it is. http://mail.python.org/mailman/private/core-mentorship/2013-June/001855.html I tried out multiple test methods, but decided that I preferred the continuous scenario in the patch that follows. Because the code was written before the addition of sets, the private cache was a dict used as a set. I changed it to a set. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 00:38:18 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 30 Jun 2013 22:38:18 +0000 Subject: [issue18189] IDLE Improvements: Unit test for Delegator.py In-Reply-To: <1370950219.82.0.574615156859.issue18189@psf.upfronthosting.co.za> Message-ID: <3bk67G2RZSz7LmM@mail.python.org> Roundup Robot added the comment: New changeset 231c122b44b6 by Terry Jan Reedy in branch '2.7': Issue #18189: add test_delegator for Idle Delegator class. http://hg.python.org/cpython/rev/231c122b44b6 New changeset c7605471e8ae by Terry Jan Reedy in branch '3.3': Issue #18189: add test_delegator for Idle Delegator class. http://hg.python.org/cpython/rev/c7605471e8ae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 00:39:33 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jun 2013 22:39:33 +0000 Subject: [issue18189] IDLE Improvements: Unit test for Delegator.py In-Reply-To: <1370950219.82.0.574615156859.issue18189@psf.upfronthosting.co.za> Message-ID: <1372631973.78.0.540507332104.issue18189@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 01:08:17 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 30 Jun 2013 23:08:17 +0000 Subject: [issue8515] idle "Run Module" (F5) does not set __file__ variable In-Reply-To: <1272071890.53.0.295001627395.issue8515@psf.upfronthosting.co.za> Message-ID: <3bk6ns1JNDz7LmZ@mail.python.org> Roundup Robot added the comment: New changeset a958b7f16a7d by Terry Jan Reedy in branch '2.7': Issue #8515: Set __file__ when run file in IDLE. Backport 2c276d0553ff by http://hg.python.org/cpython/rev/a958b7f16a7d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 01:09:39 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jun 2013 23:09:39 +0000 Subject: [issue18288] Idle 2.7: Run Module does not set __file__ In-Reply-To: <1372014649.46.0.451507262065.issue18288@psf.upfronthosting.co.za> Message-ID: <1372633779.46.0.667035202096.issue18288@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thanks Roger, problem fixed. ---------- dependencies: +idle "Run Module" (F5) does not set __file__ variable resolution: -> duplicate stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 01:38:25 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jun 2013 23:38:25 +0000 Subject: [issue13582] IDLE and pythonw.exe stderr problem In-Reply-To: <1323632290.53.0.810720020667.issue13582@psf.upfronthosting.co.za> Message-ID: <1372635505.47.0.91320357438.issue13582@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Todd, do you have a Mac to test this on? This patch treat sending messages to a widget as a backup option. In 18318 I propose we make Idle a true gui app, with all messages other than 'No tkinter' handled by the gui. Console writing, when available, would then be a secondary option for those who want it. But in the meanwhile, I would like this or something like it applied. ---------- nosy: +Todd.Rovito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 01:44:31 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 30 Jun 2013 23:44:31 +0000 Subject: [issue5308] cannot marshal objects with more than 2**31 elements In-Reply-To: <1234997106.01.0.558053875674.issue5308@psf.upfronthosting.co.za> Message-ID: <1372635871.18.0.835682680563.issue5308@psf.upfronthosting.co.za> Christian Heimes added the comment: The macro W_SIZE at http://hg.python.org/cpython/file/dbdb6f7f9a1a/Python/marshal.c#l130 has introduced a reference leak at http://hg.python.org/cpython/file/dbdb6f7f9a1a/Python/marshal.c#l390 . Because W_SIZE returns in an error case the reference count of PyObject *utf8 isn't decreased. CID 1040640 (#1 of 1): Resource leak (RESOURCE_LEAK) leaked_storage: Variable "utf8" going out of scope leaks the storage it points to. ---------- nosy: +christian.heimes resolution: fixed -> stage: committed/rejected -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 01:53:18 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jun 2013 23:53:18 +0000 Subject: [issue18318] Idle: stop depending on console output In-Reply-To: <1372373009.47.0.618602359328.issue18318@psf.upfronthosting.co.za> Message-ID: <1372636398.79.0.0432519541796.issue18318@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The proposal here is to flip the roles of text console and graphics gui, rather than to indefinitely bandage the current roles. I would want that even with the patch for #13582 applied (which I hope can be done soon). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 02:00:10 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 01 Jul 2013 00:00:10 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1372636810.42.0.61547713627.issue15767@psf.upfronthosting.co.za> Guido van Rossum added the comment: Hey Brett, Sorry for reopening this issue. I am confused by the spec for ModuleNotFoundError. Look at this (in a pretty recent repo): $ ./python.exe Python 3.4.0a0 (default:8f22e03f5f07, Jun 27 2013, 08:49:16) [GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.60))] on darwin Type "help", "copyright", "credits" or "license" for more information. [1] >>> import bogus Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'bogus' [2] >>> from re import bogus Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: cannot import name bogus [3] >>> import re.bogus Traceback (most recent call last): File "", line 1553, 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 're.bogus'; re is not a package Given that it knows that re is not a package, I would have expected [2] not to raise ModuleNotFoundError, because there is no way that bogus could be a package. OTOH, I would have expected [3] to raise ModuleNotFoundError, since this syntax implies that bogus is a submodule. But perhaps I am missing something and I need to look at the distinction differently? Sadly the docs don't really help me; they claim to explain why I get ModuleNotFoundError in [2], but the motivation "as the specific attribute being requested cannot be known a priori to be a module or some other type of object" seems wrong, given that [3] proves it *does* know. (Aside, it's also odd that bogus is quoted in the error message for [1] and [3] but not for [2] -- in fact the phrasing of [2] compared to [1] seems arbitrarily different, both seem to tell me exactly the same thing.) ---------- nosy: +gvanrossum status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 02:22:44 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 01 Jul 2013 00:22:44 +0000 Subject: [issue18244] singledispatch: When virtual-inheriting ABCs at distinct points in MRO, composed MRO is dependent on haystack ordering In-Reply-To: <1371490468.22.0.590624884808.issue18244@psf.upfronthosting.co.za> Message-ID: <1372638164.97.0.216553744816.issue18244@psf.upfronthosting.co.za> Guido van Rossum added the comment: Ok, let's do it. I just sent you a review of your latest code (admitting I don't actually follow the logic in full detail, so I'm mostly harping on tests and comments...). Regarding the PEP: feel free to update this. Clearly nobody read it this carefully before... "Final" in the Python world doesn't mean "every typo remains forever" and for PEPs this young that also applies to esoteric details that were perhaps not fully, or not correctly, specified before. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 02:25:49 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 01 Jul 2013 00:25:49 +0000 Subject: [issue18331] Document that runpy.run_path and run_module copy the module globals In-Reply-To: <1372602782.77.0.618152195123.issue18331@psf.upfronthosting.co.za> Message-ID: <1372638349.5.0.394327629375.issue18331@psf.upfronthosting.co.za> Nick Coghlan added the comment: As Richard said, the __globals__ attributes of the functions are pointing at the real module dictionary, which may have been cleared when the temporary module was destroyed. However, I just checked the docs and they don't actually mention the fact that run_path and run_module currently return a copy of the globals - they say they "return the resulting module globals dictionary." Since I would prefer it if the functions actually worked as advertised, I suggest we document the namespace copying as a CPython implementation detail, rather than as a guaranteed feature. That way we can eliminate these copy operations once the module namespace purging has been eliminated. Some related references: Don't purge module dicts before shutdown: issue 18214 Don't purge module dicts at all: issue 812369 More robust finalisation semantics: PEP 442 We should also tidy up the headings in the data model reference ( http://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy) so we can link directly to the section that mentions the CPython module clearing implementation detail this behaviour is designed to work around. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python stage: -> needs patch title: runpy.run_path gives functions with corrupted .__globals__ -> Document that runpy.run_path and run_module copy the module globals type: behavior -> enhancement versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 02:28:51 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Mon, 01 Jul 2013 00:28:51 +0000 Subject: [issue17814] Popen.stdin/stdout/stderr documentation should mention object type In-Reply-To: <1366586086.38.0.427506521088.issue17814@psf.upfronthosting.co.za> Message-ID: <1372638531.02.0.78416363135.issue17814@psf.upfronthosting.co.za> Changes by Nikolaus Rath : ---------- keywords: +patch Added file: http://bugs.python.org/file30736/subprocess_rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 02:29:54 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Mon, 01 Jul 2013 00:29:54 +0000 Subject: [issue17814] Popen.stdin/stdout/stderr documentation should mention object type In-Reply-To: <1366586086.38.0.427506521088.issue17814@psf.upfronthosting.co.za> Message-ID: <1372638594.14.0.661738488077.issue17814@psf.upfronthosting.co.za> Nikolaus Rath added the comment: patch attached. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 03:04:19 2013 From: report at bugs.python.org (Martin Panter) Date: Mon, 01 Jul 2013 01:04:19 +0000 Subject: [issue6181] Tkinter.Listbox several minor issues In-Reply-To: <1243977899.25.0.845872446641.issue6181@psf.upfronthosting.co.za> Message-ID: <1372640659.97.0.558888059012.issue6181@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 03:12:18 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Mon, 01 Jul 2013 01:12:18 +0000 Subject: [issue18334] type(name, bases, dict) does not call metaclass' __prepare__ attribute Message-ID: <1372641138.46.0.644775856541.issue18334@psf.upfronthosting.co.za> New submission from Nikolaus Rath: When using the three parameter form of type to create a new class, and any of the base classes has a metaclass with a __prepare__ function, the __prepare__ function is not executed: >>> class CustomMetaclass(type): ... @classmethod ... def __prepare__(cls, name, bases): ... return { 'prepared_for': name } ... >>> class ParentClass(metaclass=CustomMetaclass): ... pass ... >>> class ClassOne(ParentClass): ... pass ... >>> ClassTwo = type('ClassTwo', (ParentClass,), {}) >>> ClassOne.prepared_for 'ClassOne' >>> ClassTwo.prepared_for 'ParentClass' >>> 'prepared_for' in ClassOne.__dict__ True >>> 'prepared_for' in ClassTwo.__dict__ False I am not sure if that is intended behavior or not. I am attaching a doc patch for the case that this is intended. ---------- components: Interpreter Core files: type_doc_patch.diff keywords: patch messages: 192099 nosy: Nikratio priority: normal severity: normal status: open title: type(name, bases, dict) does not call metaclass' __prepare__ attribute type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file30737/type_doc_patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 03:50:32 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 01 Jul 2013 01:50:32 +0000 Subject: [issue18334] type(name, bases, dict) does not call metaclass' __prepare__ attribute In-Reply-To: <1372641138.46.0.644775856541.issue18334@psf.upfronthosting.co.za> Message-ID: <1372643432.44.0.257740034634.issue18334@psf.upfronthosting.co.za> R. David Murray added the comment: "Intentional" is not perhaps the exactly right term, but it is working as expected. There was a thread about this on python-dev ("PEP 3115 compliant dynamic type creation" and "adding types.build_class for 3.3"), that ultimately resulted in the addition of the 'new_class' function to the types module. The documentation should probably just say that types doesn't handle metaclass __prepare__, and provide a link to the new_class function. ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python, ncoghlan, r.david.murray versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 04:00:51 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 01 Jul 2013 02:00:51 +0000 Subject: [issue18334] type(name, bases, dict) does not call metaclass' __prepare__ attribute In-Reply-To: <1372641138.46.0.644775856541.issue18334@psf.upfronthosting.co.za> Message-ID: <1372644051.25.0.14734030915.issue18334@psf.upfronthosting.co.za> Nick Coghlan added the comment: I think we should actually go further, and explicitly defer to http://docs.python.org/3/library/types#dynamic-type-creation for dynamic type creation. Type shouldn't be called with arbitrary bases any more, precisely *because* doing so breaks __prepare__ handling. It's only safe to call a metaclass directly with arbitrary bases if you call types.prepare_class first: mcl, namespace, kwds = types.prepare_class(name, bases) cls = mcl(name, bases, namespace, **kwds) You can only skip types.prepare_class if you *know* you already have the right metaclass (such as when there aren't any base classes defined). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 04:19:17 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Mon, 01 Jul 2013 02:19:17 +0000 Subject: [issue18334] type(name, bases, dict) does not call metaclass' __prepare__ attribute In-Reply-To: <1372641138.46.0.644775856541.issue18334@psf.upfronthosting.co.za> Message-ID: <1372645157.97.0.747655652828.issue18334@psf.upfronthosting.co.za> Nikolaus Rath added the comment: In that cases, maybe type(name, cls, clsdict) should actually raise an error if there's a metaclass with __prepare__ involved? Presumably that would break only code that was already broken, but it would convert previously hidden behavioral bugs into an explicit expressions raised at the right point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 04:40:36 2013 From: report at bugs.python.org (Todd Rovito) Date: Mon, 01 Jul 2013 02:40:36 +0000 Subject: [issue7136] Idle File Menu Option Improvement In-Reply-To: <1255567244.32.0.288243785856.issue7136@psf.upfronthosting.co.za> Message-ID: <1372646436.46.0.952776801737.issue7136@psf.upfronthosting.co.za> Todd Rovito added the comment: PING!!!! It has been a month since Roger's last comment on the patch looking good, can somebody please commit or post feedback. Thanks. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 05:23:05 2013 From: report at bugs.python.org (Todd Rovito) Date: Mon, 01 Jul 2013 03:23:05 +0000 Subject: [issue13582] IDLE and pythonw.exe stderr problem In-Reply-To: <1323632290.53.0.810720020667.issue13582@psf.upfronthosting.co.za> Message-ID: <1372648985.46.0.0579860639137.issue13582@psf.upfronthosting.co.za> Todd Rovito added the comment: Yes I have a Mac and I am glad to help, so I gave it a test run tonight. The first thing I did was apply the patch then I ran idle from the console like so: ./python.exe Lib/idlelib/idle.py For testing I used a simple print command to print to stderr: sys.stderr.write("spam/n") which I got the output of spam/n6 I also tried to use the newer print function: print("fatal error", file=sys.stderr) Python 3.4 on the Mac behaved exactly the same way with or without the patch. I got the stderr output in the Python shell and nothing appeared in the console. With the patch applied I saw no dialog box to capture the stderr output. Maybe I didn't perform the test correctly? Another thing to consider is for Mac IDLE runs in a special mode via macosxSupport.py which I turn on by forcing runningAsOSXApp() to always return True. Even after setting runningAsOSXApp() to true a dialog box does not appear when writing to stderr. Maybe I am not testing this patch correctly? Let me know if I can do anything else to help, thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 06:14:35 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Jul 2013 04:14:35 +0000 Subject: [issue13582] IDLE and pythonw.exe stderr problem In-Reply-To: <1323632290.53.0.810720020667.issue13582@psf.upfronthosting.co.za> Message-ID: <1372652075.48.0.478413158319.issue13582@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Print in the user process goes to shell window. You need to stimulate (or just add) print or warn in the idle process, which normally goes to console, or nowhere. It is hard (intentionally, I am sure) to dynamically manipulate idle process code. Roger said "try adding a "raise Exception" to a constructor for one of the extensions". I would start with a warning in PyShell. See doc or test_warnings for an example warnings call. ---------- stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 06:18:45 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Jul 2013 04:18:45 +0000 Subject: [issue7136] Idle File Menu Option Improvement In-Reply-To: <1255567244.32.0.288243785856.issue7136@psf.upfronthosting.co.za> Message-ID: <1372652325.24.0.718960503033.issue7136@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am planning to commit. PS. Shorter names that include '27', '33', etc, are easier to work with ;-). ---------- assignee: roger.serwy -> terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 06:52:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Jul 2013 04:52:43 +0000 Subject: [issue7136] Idle File Menu Option Improvement In-Reply-To: <1255567244.32.0.288243785856.issue7136@psf.upfronthosting.co.za> Message-ID: <3bkGRG5hBPz7Lkw@mail.python.org> Roundup Robot added the comment: New changeset 26ef5d5d5c3e by Terry Jan Reedy in branch '2.7': Issue #7136: In the Idle File menu, "New Window" is renamed "New File". http://hg.python.org/cpython/rev/26ef5d5d5c3e New changeset c39ddff53694 by Terry Jan Reedy in branch '3.3': Issue #7136: In the Idle File menu, "New Window" is renamed "New File". http://hg.python.org/cpython/rev/c39ddff53694 New changeset 5bc3d8d22a93 by Terry Jan Reedy in branch 'default': (merge) Issue #7136: In the Idle File menu, "New Window" is renamed "New File". http://hg.python.org/cpython/rev/5bc3d8d22a93 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 07:05:40 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Jul 2013 05:05:40 +0000 Subject: [issue7136] Idle File Menu Option Improvement In-Reply-To: <1255567244.32.0.288243785856.issue7136@psf.upfronthosting.co.za> Message-ID: <1372655140.17.0.188209937431.issue7136@psf.upfronthosting.co.za> Terry J. Reedy added the comment: For some reason, the idlelib/help.txt was reformatted with double indents (not sure I like this) for 3.4 but not 3.3. So parts of the patch against 3.4 would not apply to 3.3, which must be patched first. And the merge to 3.4 likewise failed for two files. We should have the same text for all versions except where is actually matters. Or replace with the doc, as proposed elsewhere. The 'new window' issue is "Blank file editor window for a new file" versus "File editor window pre-loaded with existing file". "New file" captures the difference between the two where as "New window" is the same for both. So even native English speaker could be initially confused. When I tested, "New file" looks right. File / New may be standard on Windows, but File / New File looks fine to me. Toby, thank you for sharing your experience. We need more of such, even if we have been slow to respond. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 07:06:16 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Jul 2013 05:06:16 +0000 Subject: [issue7136] Idle File Menu Option Improvement In-Reply-To: <1255567244.32.0.288243785856.issue7136@psf.upfronthosting.co.za> Message-ID: <1372655176.94.0.733817981028.issue7136@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 07:32:55 2013 From: report at bugs.python.org (Gabriel Genellina) Date: Mon, 01 Jul 2013 05:32:55 +0000 Subject: [issue18244] singledispatch: When virtual-inheriting ABCs at distinct points in MRO, composed MRO is dependent on haystack ordering In-Reply-To: <1371490468.22.0.590624884808.issue18244@psf.upfronthosting.co.za> Message-ID: <1372656775.19.0.429269870242.issue18244@psf.upfronthosting.co.za> Changes by Gabriel Genellina : ---------- nosy: +ggenellina _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 07:33:49 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Jul 2013 05:33:49 +0000 Subject: [issue18335] Add textwrap.dedent, .indent, as str methods. Message-ID: <1372656829.33.0.351971247179.issue18335@psf.upfronthosting.co.za> New submission from Terry J. Reedy: To end proposals for new syntax to do what they do for triple-quoted strings. Nick Coghlan gave reasons as follows: run time cost small, can be optimized away, would be used more than some other string methods. http://mail.python.org/pipermail/python-ideas/2013-July/021717.html In response, Guido said "That's a compelling argument. Let's do it." http://mail.python.org/pipermail/python-ideas/2013-July/021718.html ---------- messages: 192109 nosy: ncoghlan, terry.reedy priority: normal severity: normal stage: test needed status: open title: Add textwrap.dedent, .indent, as str methods. type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 07:41:46 2013 From: report at bugs.python.org (Gabriel Genellina) Date: Mon, 01 Jul 2013 05:41:46 +0000 Subject: [issue13582] IDLE and pythonw.exe stderr problem In-Reply-To: <1323632290.53.0.810720020667.issue13582@psf.upfronthosting.co.za> Message-ID: <1372657306.97.0.234858832108.issue13582@psf.upfronthosting.co.za> Changes by Gabriel Genellina : ---------- nosy: +ggenellina _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 07:42:01 2013 From: report at bugs.python.org (Gabriel Genellina) Date: Mon, 01 Jul 2013 05:42:01 +0000 Subject: [issue18318] Idle: stop depending on console output In-Reply-To: <1372373009.47.0.618602359328.issue18318@psf.upfronthosting.co.za> Message-ID: <1372657321.78.0.472674000153.issue18318@psf.upfronthosting.co.za> Changes by Gabriel Genellina : ---------- nosy: +ggenellina _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 07:52:57 2013 From: report at bugs.python.org (SpaghettiToastBook) Date: Mon, 01 Jul 2013 05:52:57 +0000 Subject: [issue18335] Add textwrap.dedent, .indent, as str methods. In-Reply-To: <1372656829.33.0.351971247179.issue18335@psf.upfronthosting.co.za> Message-ID: <1372657977.09.0.915063799551.issue18335@psf.upfronthosting.co.za> Changes by SpaghettiToastBook : ---------- nosy: +SpaghettiToastBook _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 08:08:49 2013 From: report at bugs.python.org (Chris Rebert) Date: Mon, 01 Jul 2013 06:08:49 +0000 Subject: [issue18335] Add textwrap.dedent, .indent, as str methods. In-Reply-To: <1372656829.33.0.351971247179.issue18335@psf.upfronthosting.co.za> Message-ID: <1372658929.78.0.806103014845.issue18335@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 08:26:29 2013 From: report at bugs.python.org (paul j3) Date: Mon, 01 Jul 2013 06:26:29 +0000 Subject: [issue16468] argparse only supports iterable choices In-Reply-To: <1352867539.71.0.970228461518.issue16468@psf.upfronthosting.co.za> Message-ID: <1372659989.34.0.282834217356.issue16468@psf.upfronthosting.co.za> paul j3 added the comment: chris.jerdonek wrote: "Also, to answer a previous question, the three places in which the choices string is used are: in the usage string (separator=','), in the help string when expanding "%(choices)s" (separator=', '), and in the error message text (separator=', ' with repr() instead of str())." In the usage string, the ',' is used to make a compact representation of the choices. The ', ' separator is used in the help line, where space isn't as tight. This 'choices formatting' is called during 'add_argument()' simply as a side effect of checking for valid parameters, especially 'nargs' (that it, is an integer or an acceptable string). Previously 'nargs' errors were not caught until 'parse_args' was used. This is discussed in http://bugs.python.org/issue9849 Argparse needs better error handling for nargs http://bugs.python.org/issue16970 argparse: bad nargs value raises misleading message On the issue of what error type to raise, my understanding is that 'ArgumentError' is the preferred choice when it affects a particular argument. parse_args() nearly always raises an ArgumentError. Once add_argument has created an action, it too can raise an ArgumentError. ArgumentError provides a standard way of identifying which action is giving the problem. While testing 'metavar="range(0,20)"', I discovered that the usage formatter strips off parenthesis. A regex expression that removes excess 'mutually exclusive group' notation is responsible for this. The simple fix is to modify the regex so it distinguishes between ' (...)' and 'range(...)'. I intend to create a new issue for this, since it affects any metavar the includes (). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 09:19:51 2013 From: report at bugs.python.org (Thomas Guettler) Date: Mon, 01 Jul 2013 07:19:51 +0000 Subject: [issue18336] codecs: Link to readline module (history) instead of fd.readline() Message-ID: <1372663191.71.0.440770388569.issue18336@psf.upfronthosting.co.za> New submission from Thomas Guettler: The documentation of codecs.readline() has a link to the readline module. That the same word with a total different meaning! http://docs.python.org/2/library/codecs.html?highlight=readline#codecs.StreamReader.readline The GNU readline module is about the history like bash or interactive python. ---------- assignee: docs at python components: Documentation messages: 192111 nosy: docs at python, guettli priority: normal severity: normal status: open title: codecs: Link to readline module (history) instead of fd.readline() versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 09:30:57 2013 From: report at bugs.python.org (Thomas Guettler) Date: Mon, 01 Jul 2013 07:30:57 +0000 Subject: [issue18337] codecs: StremReader readline() breaks on undocumented characters Message-ID: <1372663857.57.0.575592634078.issue18337@psf.upfronthosting.co.za> New submission from Thomas Guettler: The stream reader of codecs.open() breaks on undocumented characters: http://docs.python.org/2/library/codecs.html?highlight=codecs%20readline#codecs.StreamReader.readline import tempfile temp=tempfile.mktemp() fd=open(temp, 'wb') fd.write('abc\ndef\x85ghi') fd.close() import codecs fd=codecs.open(temp, 'rb', 'latin1') while True: line=fd.readline() if not line: break print repr(line) Result: u'abc\n' u'def\x85' u'ghi' Related: http://stackoverflow.com/questions/16227114/utf-8-files-read-in-python-will-line-break-at-character-x85 ---------- assignee: docs at python components: Documentation messages: 192112 nosy: docs at python, guettli priority: normal severity: normal status: open title: codecs: StremReader readline() breaks on undocumented characters versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 09:35:31 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 01 Jul 2013 07:35:31 +0000 Subject: [issue18334] type(name, bases, dict) does not call metaclass' __prepare__ attribute In-Reply-To: <1372641138.46.0.644775856541.issue18334@psf.upfronthosting.co.za> Message-ID: <1372664131.9.0.919052520477.issue18334@psf.upfronthosting.co.za> Nick Coghlan added the comment: Unfortunately, it's not that simple, as calling type(name, bases, namespace) is *exactly* what a subclass will do as part of creating the type object. >From inside the type implementation, we can't tell the difference between "properly called from the child type" and "improperly called without preparing the namespace first". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 10:35:11 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 01 Jul 2013 08:35:11 +0000 Subject: [issue18335] Add textwrap.dedent, .indent, as str methods. In-Reply-To: <1372656829.33.0.351971247179.issue18335@psf.upfronthosting.co.za> Message-ID: <1372667711.09.0.322623674208.issue18335@psf.upfronthosting.co.za> Nick Coghlan added the comment: It turns out there's one slight wrinkle in this grand plan: it won't work for docstrings without some additional tweaking to allow for method calls in the docstring detection. >>> def f(): ... """example""".lower() ... >>> print(f.__doc__) None >>> import dis >>> dis.dis(f) 2 0 LOAD_CONST 1 ('example') 3 LOAD_ATTR 0 (lower) 6 CALL_FUNCTION 0 (0 positional, 0 keyword pair) 9 POP_TOP 10 LOAD_CONST 0 (None) 13 RETURN_VALUE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 10:36:43 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 01 Jul 2013 08:36:43 +0000 Subject: [issue18335] Add textwrap.dedent, .indent, as str methods. In-Reply-To: <1372656829.33.0.351971247179.issue18335@psf.upfronthosting.co.za> Message-ID: <1372667803.78.0.52496464969.issue18335@psf.upfronthosting.co.za> Nick Coghlan added the comment: I still think the methods are worth adding regardless - I just anticipate a request to allow method calls on docstrings to follow not long after ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 11:12:54 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Jul 2013 09:12:54 +0000 Subject: [issue18336] codecs: Link to readline module (history) instead of fd.readline() In-Reply-To: <1372663191.71.0.440770388569.issue18336@psf.upfronthosting.co.za> Message-ID: <1372669974.22.0.522166697251.issue18336@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: docs at python -> serhiy.storchaka keywords: +easy nosy: +serhiy.storchaka stage: -> needs patch versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 11:35:33 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Jul 2013 09:35:33 +0000 Subject: [issue18335] Add textwrap.dedent, .indent, as str methods. In-Reply-To: <1372656829.33.0.351971247179.issue18335@psf.upfronthosting.co.za> Message-ID: <1372671333.04.0.382085162705.issue18335@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: str already have too many methods. Who uses str.swapcase() or str.zfill() now? I'm -0.5 for adding any new str methods. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 11:36:06 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Jul 2013 09:36:06 +0000 Subject: [issue18337] codecs: StremReader readline() breaks on undocumented characters In-Reply-To: <1372663857.57.0.575592634078.issue18337@psf.upfronthosting.co.za> Message-ID: <1372671366.45.0.864165837714.issue18337@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your report. This is a duplicate of issue18291. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> codecs.open interprets space as line ends versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 11:41:45 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Jul 2013 09:41:45 +0000 Subject: [issue18291] codecs.open interprets space as line ends In-Reply-To: <1372079472.71.0.230881178227.issue18291@psf.upfronthosting.co.za> Message-ID: <1372671705.17.0.352058948202.issue18291@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In contrary to documentation str.splitlines() splits lines not only on '\n', '\r\n' and '\r'. >>> 'a'.join(chr(i) for i in range(32)).splitlines(True) ['\x00a\x01a\x02a\x03a\x04a\x05a\x06a\x07a\x08a\ta\n', 'a\x0b', 'a\x0c', 'a\r', 'a\x0ea\x0fa\x10a\x11a\x12a\x13a\x14a\x15a\x16a\x17a\x18a\x19a\x1aa\x1ba\x1c', 'a\x1d', 'a\x1e', 'a\x1f'] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 12:26:02 2013 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 01 Jul 2013 10:26:02 +0000 Subject: [issue18244] singledispatch: When virtual-inheriting ABCs at distinct points in MRO, composed MRO is dependent on haystack ordering In-Reply-To: <1371490468.22.0.590624884808.issue18244@psf.upfronthosting.co.za> Message-ID: <1372674362.6.0.907727143285.issue18244@psf.upfronthosting.co.za> Changes by ?ukasz Langa : Added file: http://bugs.python.org/file30738/issue18244.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:01:27 2013 From: report at bugs.python.org (Jari Aalto) Date: Mon, 01 Jul 2013 11:01:27 +0000 Subject: [issue18338] option --version should send output to STDOUT Message-ID: <1372676487.3.0.302989276182.issue18338@psf.upfronthosting.co.za> New submission from Jari Aalto: C.f. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=603851 When user is calling program with options, it is not an error condition to run: python --version The output is now sent to stderr. Please change to send to stdout as in other *nix utilities, in order to collect in shell scrips: version=$(python --version) ---------- components: Interpreter Core messages: 192119 nosy: jaalto priority: normal severity: normal status: open title: option --version should send output to STDOUT versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:08:56 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Jul 2013 11:08:56 +0000 Subject: [issue18240] hmac unnecessarily restricts input to "bytes" In-Reply-To: <1371465508.71.0.540084524464.issue18240@psf.upfronthosting.co.za> Message-ID: <3bkQnM3HvDz7Lk2@mail.python.org> Roundup Robot added the comment: New changeset 636947fe131e by Christian Heimes in branch 'default': Issue 18240: The HMAC module is no longer restricted to bytes and accepts http://hg.python.org/cpython/rev/636947fe131e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:09:50 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Jul 2013 11:09:50 +0000 Subject: [issue18240] hmac unnecessarily restricts input to "bytes" In-Reply-To: <1371465508.71.0.540084524464.issue18240@psf.upfronthosting.co.za> Message-ID: <1372676990.83.0.897545112789.issue18240@psf.upfronthosting.co.za> Christian Heimes added the comment: Your CLA came through and I have applied your patch. Thank you very much for your contribution! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:22:55 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Jul 2013 11:22:55 +0000 Subject: [issue18338] option --version should send output to STDOUT In-Reply-To: <1372676487.3.0.302989276182.issue18338@psf.upfronthosting.co.za> Message-ID: <1372677775.48.0.539170982071.issue18338@psf.upfronthosting.co.za> Christian Heimes added the comment: Your proposal is reasonable. I'm flagging it for Python 3.4+ as it's a backward incompatible modification. ---------- nosy: +christian.heimes stage: -> needs patch type: -> behavior versions: +Python 3.4 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:51:15 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 01 Jul 2013 11:51:15 +0000 Subject: [issue18236] str.isspace should use the Unicode White_Space property In-Reply-To: <1371431190.78.0.117337167573.issue18236@psf.upfronthosting.co.za> Message-ID: <1372679475.45.0.0922674915738.issue18236@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 14:05:21 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 01 Jul 2013 12:05:21 +0000 Subject: [issue18291] codecs.open interprets space as line ends In-Reply-To: <1372079472.71.0.230881178227.issue18291@psf.upfronthosting.co.za> Message-ID: <1372680321.39.0.423685810973.issue18291@psf.upfronthosting.co.za> R. David Murray added the comment: There are two issues that I could find related to these characters, one of them still open: #18236 and #7643. The latter contains a fairly complete discussion of the underlying issue, but on a quick read through it is not clear to me if the linebreak issue was actually completely addressed. It would be good if someone unicode knowledgeable would read through that issue and see if the current state of affairs is in fact correct, and if so (as seems likely, given that there were unicode experts weighing in on that issue) we need to improve the splitlines docs at least (as was suggested in that issue but not done). How tightly related that issue is to this one depends on how codecs and IO implement their linebreak algorithms Perhaps we should retitle this issue "make Python's treatment of 'information separator' and other line break characters consistent". Since backward compatibility is an issue, if there are changes to be made there may be changes that can only be made in 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 14:12:33 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Jul 2013 12:12:33 +0000 Subject: [issue18339] Segfault in Unpickler_set_memo() Message-ID: <1372680753.86.0.0895011260211.issue18339@psf.upfronthosting.co.za> New submission from Christian Heimes: Unpickler_set_memo() crashes when the unpickler's memo attribute is set to a dict with negative numbers. The descriptor uses _Unpickler_MemoPut() which uses the dict key as index to a C array. Python 3.3.0 (v3.3.0:bd8afb90ebf2, Feb 8 2013, 00:38:29) [GCC 4.7.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys, pickle >>> p = pickle.Unpickler(sys.stdin) >>> p.memo = {-1: None} segfault The issue was found be Coverity Scan: CID 486776 (#1 of 1): Improper use of negative value (NEGATIVE_RETURNS) negative_returns: Passing variable "idx" to a parameter that cannot be negative. 5955 if (_Unpickler_MemoPut(self, idx, value) < 0) ---------- files: memo.patch keywords: patch messages: 192124 nosy: christian.heimes priority: normal severity: normal stage: needs patch status: open title: Segfault in Unpickler_set_memo() type: crash versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30739/memo.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 14:20:16 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2013 12:20:16 +0000 Subject: [issue18312] "make distclean" deletes files under .hg directory In-Reply-To: <1372296464.66.0.963255474553.issue18312@psf.upfronthosting.co.za> Message-ID: <1372681216.38.0.68877885141.issue18312@psf.upfronthosting.co.za> STINNER Victor added the comment: Is there at least one developer against my change make_distclean.patch? If not, I suggest to apply this patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 14:25:50 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 01 Jul 2013 12:25:50 +0000 Subject: [issue18312] "make distclean" deletes files under .hg directory In-Reply-To: <1372296464.66.0.963255474553.issue18312@psf.upfronthosting.co.za> Message-ID: <1372681550.46.0.400114384051.issue18312@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, I am against it. See python-dev for reason (it would no longer be a 'distclean'). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:18:59 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Jul 2013 13:18:59 +0000 Subject: [issue18339] Segfault in Unpickler_set_memo() In-Reply-To: <1372680753.86.0.0895011260211.issue18339@psf.upfronthosting.co.za> Message-ID: <3bkTgQ3k77zLrK@mail.python.org> Roundup Robot added the comment: New changeset 17b7af660f82 by Christian Heimes in branch '3.3': Issue #18339: Negative ints keys in unpickler.memo dict no longer cause a http://hg.python.org/cpython/rev/17b7af660f82 New changeset f3372692ca20 by Christian Heimes in branch 'default': Issue #18339: Negative ints keys in unpickler.memo dict no longer cause a http://hg.python.org/cpython/rev/f3372692ca20 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:19:27 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Jul 2013 13:19:27 +0000 Subject: [issue18339] Segfault in Unpickler_set_memo() In-Reply-To: <1372680753.86.0.0895011260211.issue18339@psf.upfronthosting.co.za> Message-ID: <1372684767.54.0.406514285403.issue18339@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- resolution: -> fixed stage: needs patch -> commit review status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:59:10 2013 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 01 Jul 2013 13:59:10 +0000 Subject: [issue18244] Adopt C3-based linearization for improved ABC support in functools.singledispatch In-Reply-To: <1371490468.22.0.590624884808.issue18244@psf.upfronthosting.co.za> Message-ID: <1372687150.03.0.330681359973.issue18244@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- title: singledispatch: When virtual-inheriting ABCs at distinct points in MRO, composed MRO is dependent on haystack ordering -> Adopt C3-based linearization for improved ABC support in functools.singledispatch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 16:03:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Jul 2013 14:03:38 +0000 Subject: [issue18244] Adopt C3-based linearization for improved ABC support in functools.singledispatch In-Reply-To: <1371490468.22.0.590624884808.issue18244@psf.upfronthosting.co.za> Message-ID: <3bkVfx5s4Pz7Ljg@mail.python.org> Roundup Robot added the comment: New changeset a2672dc7c805 by ?ukasz Langa in branch 'default': Issue #18244: Adopt C3-based linearization in functools.singledispatch for improved ABC support http://hg.python.org/cpython/rev/a2672dc7c805 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 16:18:08 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 01 Jul 2013 14:18:08 +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: <1372688288.39.0.0565407031524.issue14455@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've attached a slightly updated version of the patch. The documentation now lists dump and load as the primary API, with the old API as a deprecated alternative. The code hasn't been changed to relect this yet, but does contain a number of tweaks and bugfixes (and a new testcase that ensures that decoding UTF-16 and UTF-32 files actually works, after testing that those encodings are supported by Apple's tools). NOTE: no review of this version is needed, I'm mostly posting as backup. ---------- Added file: http://bugs.python.org/file30740/issue-14455-v6.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 16:20:18 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Jul 2013 14:20:18 +0000 Subject: [issue18339] Segfault in Unpickler_set_memo() In-Reply-To: <1372680753.86.0.0895011260211.issue18339@psf.upfronthosting.co.za> Message-ID: <1372688418.39.0.708112233626.issue18339@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry that I was late with review. Here is some nitpicks from me. Using assertRaises() as context manager in this case looks cleaner to me: with self.assertRaises(ValueError): unpickler.memo = {-1: None} Moving the `if (idx == -1 && PyErr_Occurred())` check inside the `if (idx < 0)` block will increase the perfomance a little. ---------- nosy: +serhiy.storchaka status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 16:23:45 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Jul 2013 14:23:45 +0000 Subject: [issue5308] cannot marshal objects with more than 2**31 elements In-Reply-To: <1234997106.01.0.558053875674.issue5308@psf.upfronthosting.co.za> Message-ID: <1372688625.91.0.94272373679.issue5308@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Good catch. There is another resource leak for general bytes-like object (the buffer can be not released). Here is a patch. ---------- Added file: http://bugs.python.org/file30741/marshal_string_leak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 16:27:05 2013 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 01 Jul 2013 14:27:05 +0000 Subject: [issue18244] Adopt C3-based linearization for improved ABC support in functools.singledispatch In-Reply-To: <1371490468.22.0.590624884808.issue18244@psf.upfronthosting.co.za> Message-ID: <1372688825.2.0.480946480623.issue18244@psf.upfronthosting.co.za> ?ukasz Langa added the comment: I committed the patch with minor docstring and comment fixes; one test was tweaked to be hash randomization-proof. Edward, thanks for taking the time to file the bug. Guido, thanks for a thorough and illuminating review process. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 17:20:36 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 01 Jul 2013 15:20:36 +0000 Subject: [issue18335] Add textwrap.dedent, .indent, as str methods. In-Reply-To: <1372656829.33.0.351971247179.issue18335@psf.upfronthosting.co.za> Message-ID: <1372692036.39.0.602364812719.issue18335@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 17:24:21 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 01 Jul 2013 15:24:21 +0000 Subject: [issue18335] Add textwrap.dedent, .indent, as str methods. In-Reply-To: <1372656829.33.0.351971247179.issue18335@psf.upfronthosting.co.za> Message-ID: <1372692261.77.0.0587307253893.issue18335@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: .dedent() is a no-brainer. JFDI. +1 .indent() I guess makes sense for symmetry, although I've rarely used it. -0 As for docstrings, I can imagine other alternatives, so let's let someone interested in that go through the PEP process. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 17:51:04 2013 From: report at bugs.python.org (V.E.O) Date: Mon, 01 Jul 2013 15:51:04 +0000 Subject: [issue18340] float related test has problem with Denormal Flush to Zero compiler options Message-ID: <1372693864.33.0.227282156373.issue18340@psf.upfronthosting.co.za> New submission from V.E.O: With Intel Compiler's default options or GCC with -mfpmath=sse, the built Python failed at float related test. For failures in test_strtod: Traceback (most recent call last): File ".\test_strtod.py", line 190, in test_boundaries self.check_strtod(s) File ".\test_strtod.py", line 104, in check_strtod "expected {}, got {}".format(s, expected, got)) AssertionError: '0x0.fffffffffffffp-1022' != '0x0.0p+0' - 0x0.fffffffffffffp-1022 + 0x0.0p+0 : Incorrectly rounded str->float conversion for 22250738585072008690e-327: expected 0x0.fffffffffffffp-1022, got 0x0.0p+0 22250738585072008690e-327 is less than positive normalize float 2250738585072014e-308 in sys.float_info, that is denormal float With SSE optimization opened on current compilers, Denormal Flush to Zero feature will flush all denormal float to 0 to avoid hardware unsupport and increase performance. The tests here better be skipped on DFZ opened binaries. http://bugs.python.org/issue1672332 is related to this problem. Reference: http://software.intel.com/sites/products/documentation/doclib/iss/2013/compiler/cpp-lin/GUID-3A5C3E47-250D-4178-A0D4-6C4ACDDA5EB8.htm ---------- components: Tests messages: 192134 nosy: V.E.O, mark.dickinson priority: normal severity: normal status: open title: float related test has problem with Denormal Flush to Zero compiler options type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 17:52:42 2013 From: report at bugs.python.org (Jim Carroll) Date: Mon, 01 Jul 2013 15:52:42 +0000 Subject: [issue18341] enhancements zlib.compress/decompress to accept Py_buffer Message-ID: <1372693962.8.0.934834831388.issue18341@psf.upfronthosting.co.za> New submission from Jim Carroll: We were looking to squeak maximum performance out of zlib.compress. We noticed in py3k, zlib.compress already accepts Py_buffer?s, but in 2.x, compress required strings. We?ve modified the compress (and decompress for orthogonal completeness), see the attached patch. ---------- components: Extension Modules files: zlibmodule.c.patch keywords: patch messages: 192135 nosy: jamercee priority: normal severity: normal status: open title: enhancements zlib.compress/decompress to accept Py_buffer type: enhancement versions: Python 2.7 Added file: http://bugs.python.org/file30742/zlibmodule.c.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 18:07:34 2013 From: report at bugs.python.org (Todd Rovito) Date: Mon, 01 Jul 2013 16:07:34 +0000 Subject: [issue18226] IDLE Unit test for FormatParagrah.py In-Reply-To: <1371335636.99.0.534048602964.issue18226@psf.upfronthosting.co.za> Message-ID: <1372694854.54.0.2576099713.issue18226@psf.upfronthosting.co.za> Todd Rovito added the comment: Here is a uncompleted patch but works for the most part. I thought I would post just in case somebody wanted to provide me comments on the general direction of the patch. The naming might have to change but this follows Terry Reedy's model of monkey patching. ---------- keywords: +patch Added file: http://bugs.python.org/file30743/18226IDLEUnitTestFormatParagraph.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 18:09:42 2013 From: report at bugs.python.org (Todd Rovito) Date: Mon, 01 Jul 2013 16:09:42 +0000 Subject: [issue18292] IDLE Improvements: Unit test for AutoExpand.py In-Reply-To: <1372098554.92.0.798687151295.issue18292@psf.upfronthosting.co.za> Message-ID: <1372694982.9.0.967676389524.issue18292@psf.upfronthosting.co.za> Changes by Todd Rovito : ---------- nosy: +Todd.Rovito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 18:14:58 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 01 Jul 2013 16:14:58 +0000 Subject: [issue18302] test_multiprocessing: test.support.import_module() does not ignore the ImportError on SemLock In-Reply-To: <1372187205.63.0.099845572882.issue18302@psf.upfronthosting.co.za> Message-ID: <1372695298.76.0.60540359572.issue18302@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> brett.cannon stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 18:24:13 2013 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 01 Jul 2013 16:24:13 +0000 Subject: [issue18340] float related test has problem with Denormal Flush to Zero compiler options In-Reply-To: <1372693864.33.0.227282156373.issue18340@psf.upfronthosting.co.za> Message-ID: <1372695853.07.0.224144481505.issue18340@psf.upfronthosting.co.za> Mark Dickinson added the comment: What operating system and hardware is this on? Is there a good reason for wanting to compile with optimisations that break IEEE 754 behaviour? If Python's configure script isn't using the right options, then that's a build problem rather than a problem with the tests. I'm rather surprised if these optimizations are turned on by default on mainstream systems. By the way, what do you mean by DFZ? It's not a TLA that I'm familiar with. Do you mean FTZ (subnormal *results* get replaced by zero)? Or DAZ (subnormal *inputs* get replaced by zero)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 18:27:29 2013 From: report at bugs.python.org (Martin Kysel) Date: Mon, 01 Jul 2013 16:27:29 +0000 Subject: [issue16272] C-API documentation clarification for tp_dictoffset In-Reply-To: <1350520063.61.0.687481658196.issue16272@psf.upfronthosting.co.za> Message-ID: <1372696049.09.0.388148468299.issue16272@psf.upfronthosting.co.za> Changes by Martin Kysel : ---------- nosy: +mkysel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 18:33:50 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 01 Jul 2013 16:33:50 +0000 Subject: [issue18342] Use the repr of a module name for ModuleNotFoundError in ceval.c Message-ID: <1372696430.42.0.571776913898.issue18342@psf.upfronthosting.co.za> New submission from Brett Cannon: >>> from re import bogus Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: cannot import name bogus Should have 'bogus' using the repr to match the other cases of ModuleNotFoundError ---------- assignee: brett.cannon components: Interpreter Core keywords: easy messages: 192138 nosy: brett.cannon priority: normal severity: normal stage: needs patch status: open title: Use the repr of a module name for ModuleNotFoundError in ceval.c versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 18:43:44 2013 From: report at bugs.python.org (Martin Kysel) Date: Mon, 01 Jul 2013 16:43:44 +0000 Subject: [issue16665] doc for builtin hex() is poor In-Reply-To: <1355257997.08.0.0348964643873.issue16665@psf.upfronthosting.co.za> Message-ID: <1372697024.01.0.229483744489.issue16665@psf.upfronthosting.co.za> Changes by Martin Kysel : ---------- nosy: +mkysel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 18:54:57 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 01 Jul 2013 16:54:57 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1372697697.05.0.470265005866.issue15767@psf.upfronthosting.co.za> Brett Cannon added the comment: Obviously no worries for opening this up again; if something isn't clear better to get it sorted out now rather than after 3.4 is out that door. So I see two questions: why isn't ImportError being raised in the ``import re.bogus`` case and why the subtle difference in exception messages. Let's deal with the latter first since it's the easiest: it's because that's how it was in Python 3.3:: > python3.3 ~ Python 3.3.2 (default, Jun 19 2013, 13:30:51) [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 bogus Traceback (most recent call last): File "", line 1, in ImportError: No module named 'bogus' >>> from re import bogus Traceback (most recent call last): File "", line 1, in ImportError: cannot import name bogus >>> import re.bogus 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 're.bogus'; re is not a package All I did for ModuleNotFoundError is change what exception is raised. I didn't muck with any messages in adding this exception to keep the change minimal (at least to start with). It also doesn't help that in your case [2] (the ``from re import bogus`` case) is actually not handled by importlib but ceval.c. I really hate the semantics of ``from ... import`` and __import__ in this specific instance. Hopefully it can be something I can clean up in Python 4. Anyway, it can be updated to match: http://bugs.python.org/issue18342 As for the ``import re.bogus`` case not raising ModuleNotFoundError, I'm fine with changing it. I don't have a clear recollection as to why I chose to leave it as-is, but I also can't come up with a good reason to not change it. And to explain why the ``from ... import`` case raises ModuleNotFoundError even when re is a module and obviously not a package is that while that might be true now, that does not necessarily hold in the future. If you have been using something like an object to hold attributes but then decide to switch to a module, this instance would break. Plus ``from ... import`` has never directly distinguished between a missing attribute and a missing module. Once again, something I would like to change in Python 4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 18:55:58 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 01 Jul 2013 16:55:58 +0000 Subject: [issue17845] Clarify successful build message In-Reply-To: <1366911874.8.0.692153365711.issue17845@psf.upfronthosting.co.za> Message-ID: <1372697758.73.0.787962219429.issue17845@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 18:58:49 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 01 Jul 2013 16:58:49 +0000 Subject: [issue17630] Create a pure Python zipfile importer In-Reply-To: <1365026756.4.0.0705755124355.issue17630@psf.upfronthosting.co.za> Message-ID: <1372697929.24.0.86263077539.issue17630@psf.upfronthosting.co.za> Brett Cannon added the comment: Paul's review did find one non-optimal thing the code is doing. I'll fix it the next time there's a need to upload a new patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 19:13:15 2013 From: report at bugs.python.org (Todd Rovito) Date: Mon, 01 Jul 2013 17:13:15 +0000 Subject: [issue7136] Idle File Menu Option Improvement In-Reply-To: <1255567244.32.0.288243785856.issue7136@psf.upfronthosting.co.za> Message-ID: <1372698794.99.0.691757959324.issue7136@psf.upfronthosting.co.za> Todd Rovito added the comment: Terry I am sorry the push didn't go smooth. I thought I had checked the patch with 2.7 and 3.4 and it applied for me but maybe I missed something? For sure I didn't check 3.3 but from here on out I will. Awhile ago I worked on a issue to synchronize the documentation here: http://bugs.python.org/issue5066 Mr. Andrew Svetlov was kind enough to push the patch but he only pushed it for 3.4 which I am not sure why? Then Zachary Ware had the excellent suggestion of making the help.txt generate from the rst file http://bugs.python.org/issue16893. So with all that being said I am confused about the direction of IDLE documentation. Maybe we should reopen issue 5066 or create a new issue to sync help.txt and idle.rst across all version from 2.7 - 3.4? Then apply Zachary's patch to automate the creation of help.txt. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 19:43:18 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 01 Jul 2013 17:43:18 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1372700598.24.0.605983466886.issue15767@psf.upfronthosting.co.za> Guido van Rossum added the comment: Ok, the history of all that makes sense, except now I wonder if ModuleNotFoundError is useful at all. I just reviewed a patch for 3.4 and in the latest revision all ImportError checks were replaced with ModuleNotFoundError checks. What purpose does that have except encouraging code churn? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 19:44:36 2013 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 01 Jul 2013 17:44:36 +0000 Subject: [issue18340] float related test has problem with Denormal Flush to Zero compiler options In-Reply-To: <1372693864.33.0.227282156373.issue18340@psf.upfronthosting.co.za> Message-ID: <1372700676.51.0.553733559986.issue18340@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 19:45:17 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Jul 2013 17:45:17 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1372697697.05.0.470265005866.issue15767@psf.upfronthosting.co.za> Message-ID: <1372700706.2594.0.camel@fsol> Antoine Pitrou added the comment: Le lundi 01 juillet 2013 ? 16:54 +0000, Brett Cannon a ?crit : > As for the ``import re.bogus`` case not raising ModuleNotFoundError, > I'm fine with changing it. +1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 19:53:28 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 01 Jul 2013 17:53:28 +0000 Subject: [issue18327] swapped arguments in compatible_for_assignment()? In-Reply-To: <1372532925.38.0.271653772611.issue18327@psf.upfronthosting.co.za> Message-ID: <1372701208.81.0.796369714454.issue18327@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Fortunately, compatible_for_assignment() handles both arguments exactly the same way, except maybe in error messages. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 20:12:09 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Jul 2013 18:12:09 +0000 Subject: [issue17097] multiprocessing BaseManager serve_client() does not check EINTR on recv In-Reply-To: <1359715424.77.0.356613938118.issue17097@psf.upfronthosting.co.za> Message-ID: <3bkc9h60fZz7Ljx@mail.python.org> Roundup Robot added the comment: New changeset bc34fe4a0d58 by Richard Oudkerk in branch '2.7': Issue #17097: Make multiprocessing ignore EINTR. http://hg.python.org/cpython/rev/bc34fe4a0d58 New changeset 3ec5267f51ff by Richard Oudkerk in branch '3.3': Issue #17097: Make multiprocessing ignore EINTR. http://hg.python.org/cpython/rev/3ec5267f51ff New changeset 035577781505 by Richard Oudkerk in branch 'default': Issue #17097: Merge. http://hg.python.org/cpython/rev/035577781505 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 20:17:55 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 01 Jul 2013 18:17:55 +0000 Subject: [issue18342] Use the repr of a module name for ModuleNotFoundError in ceval.c In-Reply-To: <1372696430.42.0.571776913898.issue18342@psf.upfronthosting.co.za> Message-ID: <1372702675.73.0.49525504806.issue18342@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 21:02:01 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Jul 2013 19:02:01 +0000 Subject: [issue18340] float related test has problem with Denormal Flush to Zero compiler options In-Reply-To: <1372693864.33.0.227282156373.issue18340@psf.upfronthosting.co.za> Message-ID: <1372705321.63.0.788766345436.issue18340@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 21:35:57 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 01 Jul 2013 19:35:57 +0000 Subject: [issue17097] multiprocessing BaseManager serve_client() does not check EINTR on recv In-Reply-To: <1359715424.77.0.356613938118.issue17097@psf.upfronthosting.co.za> Message-ID: <1372707357.49.0.405312727431.issue17097@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 21:58:31 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Jul 2013 19:58:31 +0000 Subject: [issue18112] PEP 442 implementation In-Reply-To: <1371320764.63.0.0772595125462.issue18112@psf.upfronthosting.co.za> Message-ID: <1372708711.35.0.33494018322.issue18112@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file30604/1d47c88412ac.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 21:58:57 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Jul 2013 19:58:57 +0000 Subject: [issue18112] PEP 442 implementation In-Reply-To: <1371320764.63.0.0772595125462.issue18112@psf.upfronthosting.co.za> Message-ID: <1372708737.91.0.998548525716.issue18112@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Added file: http://bugs.python.org/file30744/39731f1d2d38.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 21:59:08 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Jul 2013 19:59:08 +0000 Subject: [issue18112] PEP 442 implementation In-Reply-To: <1371320764.63.0.0772595125462.issue18112@psf.upfronthosting.co.za> Message-ID: <1372708748.03.0.927997809577.issue18112@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Updated patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 22:05:20 2013 From: report at bugs.python.org (paul j3) Date: Mon, 01 Jul 2013 20:05:20 +0000 Subject: [issue9938] Documentation for argparse interactive use In-Reply-To: <1285338690.84.0.283413950067.issue9938@psf.upfronthosting.co.za> Message-ID: <1372709120.22.0.917495801817.issue9938@psf.upfronthosting.co.za> paul j3 added the comment: The exit and error methods are mentioned in the 3.4 documentation, but there are no examples of modifying them. 16.4.5.9. Exiting methods ArgumentParser.exit(status=0, message=None) ArgumentParser.error(message) test_argparse.py has a subclass that redefines these methods, though I think it is more complex than necessary. class ErrorRaisingArgumentParser(argparse.ArgumentParser): In http://bugs.python.org/file30204/test_intermixed.py , part of http://bugs.python.org/issue14191 , which creates a parser mode that is closer to optparse in style, I simply use: def error(self, message): usage = self.format_usage() raise Exception('%s%s'%(usage, message)) ArgumentParser.error = error to catch errors. https://github.com/nodeca/argparse a Javascript port of argparse, adds a 'debug' option to the ArgumentParser, that effectively redefines this error method. They use that extensively in testing. Another approach is to trap the sysexit. Ipython does that when argparse is run interactively. Even the simple try block works, though the SystemExit 2 has no information about the error. try: args = parser.parse_args('X'.split()) except SystemExit as e: print(e) Finally, plac ( https://pypi.python.org/pypi/plac ) is a pypi package that is built on argparse. It has a well developed interactive mode, and integrates threads and multiprocessing. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 22:13:57 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 01 Jul 2013 20:13:57 +0000 Subject: [issue18335] Add textwrap.dedent, .indent, as str methods. In-Reply-To: <1372656829.33.0.351971247179.issue18335@psf.upfronthosting.co.za> Message-ID: <1372709637.37.0.58146019145.issue18335@psf.upfronthosting.co.za> ?ric Araujo added the comment: IMO it?s fine that docstrings continue to live as pure string literals, and documentation tools continue to follow PEP 257?s advice. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 23:00:33 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Jul 2013 21:00:33 +0000 Subject: [issue18339] Segfault in Unpickler_set_memo() In-Reply-To: <1372680753.86.0.0895011260211.issue18339@psf.upfronthosting.co.za> Message-ID: <3bkgw03zbpz7Ljg@mail.python.org> Roundup Robot added the comment: New changeset fa0a03afe359 by Christian Heimes in branch '3.3': Issue #18339: use with self.assertRaises() to make test case more readable http://hg.python.org/cpython/rev/fa0a03afe359 New changeset de44cd866bb0 by Christian Heimes in branch 'default': Issue #18339: use with self.assertRaises() to make test case more readable http://hg.python.org/cpython/rev/de44cd866bb0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 23:16:42 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Jul 2013 21:16:42 +0000 Subject: [issue18339] Segfault in Unpickler_set_memo() In-Reply-To: <1372680753.86.0.0895011260211.issue18339@psf.upfronthosting.co.za> Message-ID: <1372713402.65.0.380778858407.issue18339@psf.upfronthosting.co.za> Christian Heimes added the comment: I don't think that a reordered idx < 0 check is going to make any measurable difference. I like the separate checks as they make the code easier to understand. The first check tests for error in PyLong_AsSsize_t() and the second one checks for positive integers. ---------- stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 23:36:29 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Jul 2013 21:36:29 +0000 Subject: [issue18328] Use after free in pystate.c In-Reply-To: <1372535617.95.0.680763936377.issue18328@psf.upfronthosting.co.za> Message-ID: <1372714589.72.0.868481547605.issue18328@psf.upfronthosting.co.za> Christian Heimes added the comment: I was talking about memory address reuse, too. After all the code doesn't access data at the pointer's address but rather uses the address as an identifier. I agree that the code should not behave erroneous under current circumstances. The GIL ensures serialization and provides a memory barrier. But it's hard to tell what might happen in the future and in embedded applications. It smells fishy. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 23:43:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Jul 2013 21:43:19 +0000 Subject: [issue18328] Use after free in pystate.c In-Reply-To: <1372535617.95.0.680763936377.issue18328@psf.upfronthosting.co.za> Message-ID: <3bkhsL68qFz7LlQ@mail.python.org> Roundup Robot added the comment: New changeset ff30bf84b378 by Christian Heimes in branch '3.3': Issue #18328: Reorder ops in PyThreadState_Delete*() functions. Now the http://hg.python.org/cpython/rev/ff30bf84b378 New changeset ebe064e542ef by Christian Heimes in branch 'default': Issue #18328: Reorder ops in PyThreadState_Delete*() functions. Now the http://hg.python.org/cpython/rev/ebe064e542ef ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 23:43:36 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Jul 2013 21:43:36 +0000 Subject: [issue18328] Use after free in pystate.c In-Reply-To: <1372535617.95.0.680763936377.issue18328@psf.upfronthosting.co.za> Message-ID: <1372715016.87.0.826831686922.issue18328@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 Mon Jul 1 23:58:47 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Jul 2013 21:58:47 +0000 Subject: [issue18340] float related test has problem with Denormal Flush to Zero compiler options In-Reply-To: <1372693864.33.0.227282156373.issue18340@psf.upfronthosting.co.za> Message-ID: <1372715927.22.0.464718517229.issue18340@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm not able to reproduce the error on my system $ CFLAGS="-mfpmath=sse" ./configure --config-cache --with-pydebug $ make $ ./python -m test test_strtod [1/1] test_strtod 1 test OK. Linux 3.5.0-28 X86_64 gcc-Version 4.7.2 Intel(R) Core(TM) i7-2860QM CPU @ 2.50GHz ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 00:04:41 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Jul 2013 22:04:41 +0000 Subject: [issue18343] faulthandler_register_py() may use _Py_sighandler_t previous with initialization Message-ID: <1372716281.26.0.896390159494.issue18343@psf.upfronthosting.co.za> New submission from Christian Heimes: faulthandler_register_py() may use the variable previous uninitialized if user->enabled is set. Excerpt from Coverity log: var_decl: Declaring variable "previous" without initializer. 711 _Py_sighandler_t previous; 8. Condition "!user->enabled", taking false branch 738 if (!user->enabled) { CID 984060 (#1 of 1): Uninitialized scalar variable (UNINIT) 12. uninit_use: Using uninitialized value "previous": field "previous"."sa_restorer" is uninitialized. 752 user->previous = previous; ---------- assignee: haypo messages: 192154 nosy: christian.heimes, haypo priority: normal severity: normal stage: needs patch status: open title: faulthandler_register_py() may use _Py_sighandler_t previous with initialization type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 00:13:21 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Jul 2013 22:13:21 +0000 Subject: [issue18226] IDLE Unit test for FormatParagrah.py In-Reply-To: <1371335636.99.0.534048602964.issue18226@psf.upfronthosting.co.za> Message-ID: <1372716801.1.0.598051086693.issue18226@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The test passes as written, so I am not sure what 'mostly works' means. I said elsewhere, and revised README to match, that I changed my mind about test case names starting with 'Test'. Ending with 'Test' is much more common in /test and I decided from experience that it works better in verbose listings. A complete test of FormatParagraph might have these test cases: Is_Get_Test (with methods for is_ and get_ functions) FindTest ReformatFunctionTest ReformatClassTest I am assuming that the latter 3 will each need multiple tests. You can add blank subclasses, possibly with comments on what to do, as I did in test_grep. (While reviewing reformat_paragraph, you might consider whether you think the 'xxx Should' comments are valid.) Guido just reminded pydev readers that a proper docstring is a single summary line, with period, optionally followed by a blank line and more explanation. For multiple lines, the closing ''' should be on its own line. Idle is deficient in this regard, either omitting docstrings where needed or writing docstrings as comments or mis-formatting multiple lines. Writing tests is a good time to add or revise them because one has to understand the function to test it. See comments on review. I think putting a mock text widget and mock editor class together is one file. They should eventually be filled out, but starting with pass is ok. But see next message. -- 'Monkey-patching' is importing a module and changing a binding within the module. For Idle testing, a reason to do this is to avoid using tkinter. For example, test_config_name imports configSectionNameDialog and rebinds tkMessageBox to a mock_tk.Mbox*. This is necessary because even though methods are rebound as attributes of a dummy class in the test module, their read-only .__globals__ attribute still points to the module where they are defined. Monkey patching is only needed for global names used within the method tested. All self.xyx attribute references are resolved with the dummy instance and class. Hence mock Var is used in the dummy class but not monkey-patched into the imported module. This test does not monkey patch and does not need too. The only imported glogals are re and idleConf, and the latter does not (I presume) involve tkinter. Neither do any of the objects defined in the module. It is really handy for testing that FormatParagraph is initialized with a passed-in editwin argument, so we can simply pass in a non-gui substitute for testing. * This is done is a setup function so it can and will be undone in a matching teardown function. ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 00:17:41 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Jul 2013 22:17:41 +0000 Subject: [issue18343] faulthandler_register_py() may use _Py_sighandler_t previous with initialization In-Reply-To: <1372716281.26.0.896390159494.issue18343@psf.upfronthosting.co.za> Message-ID: <3bkjd050hjz7LlQ@mail.python.org> Roundup Robot added the comment: New changeset 229dde749ed6 by Victor Stinner in branch '3.3': Issue #18343: faulthandler.register() now keeps the previous signal handler http://hg.python.org/cpython/rev/229dde749ed6 New changeset 74b7ff20e0e4 by Victor Stinner in branch 'default': (Merge 3.3) Issue #18343: faulthandler.register() now keeps the previous signal http://hg.python.org/cpython/rev/74b7ff20e0e4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 00:18:59 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2013 22:18:59 +0000 Subject: [issue18343] faulthandler_register_py() may use _Py_sighandler_t previous with initialization In-Reply-To: <1372716281.26.0.896390159494.issue18343@psf.upfronthosting.co.za> Message-ID: <1372717139.45.0.542714014949.issue18343@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks for the report! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 00:21:49 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2013 22:21:49 +0000 Subject: [issue18340] float related test has problem with Denormal Flush to Zero compiler options In-Reply-To: <1372693864.33.0.227282156373.issue18340@psf.upfronthosting.co.za> Message-ID: <1372717309.42.0.413229483271.issue18340@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 00:23:49 2013 From: report at bugs.python.org (Eric Snow) Date: Mon, 01 Jul 2013 22:23:49 +0000 Subject: [issue18335] Add textwrap.dedent, .indent, as str methods. In-Reply-To: <1372656829.33.0.351971247179.issue18335@psf.upfronthosting.co.za> Message-ID: <1372717429.55.0.695961235782.issue18335@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 00:40:29 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 01 Jul 2013 22:40:29 +0000 Subject: [issue18340] float related test has problem with Denormal Flush to Zero compiler options In-Reply-To: <1372693864.33.0.227282156373.issue18340@psf.upfronthosting.co.za> Message-ID: <1372718429.66.0.639810531661.issue18340@psf.upfronthosting.co.za> Stefan Krah added the comment: With gcc I cannot reproduce this either. For icc perhaps we should just set "-fp-model strict" in ./configure. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 00:46:53 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Jul 2013 22:46:53 +0000 Subject: [issue18333] Memory leak in _pickle.c:Unpickler_set_memo() In-Reply-To: <1372611656.54.0.917364518453.issue18333@psf.upfronthosting.co.za> Message-ID: <1372718813.41.0.270927425929.issue18333@psf.upfronthosting.co.za> Christian Heimes added the comment: After a good night sleep I realized it's a false positive. All gotos are inside the while block. The while block is only entered when PyDict_Size(obj) > 0. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 01:11:04 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Jul 2013 23:11:04 +0000 Subject: [issue18344] _bufferedreader_read_all() may leak reference to data Message-ID: <1372720264.13.0.315058042183.issue18344@psf.upfronthosting.co.za> New submission from Christian Heimes: Modules/_io/bufferedio.c:_bufferedreader_read_all() doesn't call Py_XDECREF(data) multiple times and may leak a reference in an error case. For example the ref leak occurs when current_size > 0 and PyObject_CallMethodObjArgs(self->raw, _PyIO_str_readall, NULL) fails orbuffered_flush_and_rewind_unlocked(self) fails. There are a few more places where data isn't decrefed on return, too. CID 715364 (#2 of 2): Resource leak (RESOURCE_LEAK) leaked_storage: Variable "data" going out of scope leaks the storage it points to. ---------- components: Extension Modules messages: 192160 nosy: christian.heimes priority: normal severity: normal stage: needs patch status: open title: _bufferedreader_read_all() may leak reference to data type: resource usage versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 01:12:36 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2013 23:12:36 +0000 Subject: [issue18344] _bufferedreader_read_all() may leak reference to data In-Reply-To: <1372720264.13.0.315058042183.issue18344@psf.upfronthosting.co.za> Message-ID: <1372720356.73.0.841282726776.issue18344@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +pitrou, sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 01:38:20 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 01 Jul 2013 23:38:20 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1372721900.73.0.117241414476.issue15767@psf.upfronthosting.co.za> Brett Cannon added the comment: The impetus of ModuleNotFoundError is the need for something similar in importlib thanks to ``from ... import``. When you do something like __import__('os', fromlist=['path']), any ImportError must be silenced **if** it relates only to the fact that the module can't be found. Other errors directly related to technical errors which also raised ImportError are supposed to propagate. Before ModuleNotFoundError I was setting a made-up attribute called _not_found on ImportError and then raising the exception. I could then catch the exception and introspect for that case as necessary. See http://hg.python.org/cpython/file/3e10025346c1/Lib/importlib/_bootstrap.py for the last revision that contained _not_found. Since I had a legitimate case of wanting to differentiate between ImportError (which represents both technical errors and an inability to find a module) and the more specific case of simply not finding a module, I decided to formalize the distinction. It made sense to me so that the old try/except ImportError trick to ignore missing module could not accidentally catch the technical error use of ImportError by accident and mask the problem. Now if you still think the subclass is not worth it then I probably need a better solution than a faked private attribute on ImportError to delineate the technical error/module not found difference as I had already received one bug report asking to define what _not_found was. ImportError could grow a not_found attribute formally or even a 'reason' attribute which could be set to some enum value representing the fact the exception was triggered because the module simply wasn't found (although that seems unnecessary and more like errno from OSError). To summarize, the options I see are: 1. Back to _not_found on ImportError (only existed to start with as it was too late in 3.3 to come up with a better solution) 2. Keep ModuleNotFoundError (this option can include reverting all of the ``except ImportError`` changes I made and just allow the exception to exist if you want) 3. Add a not_found attribute to ImportError more formally (defaults to None for undefined, set to True/False to clearly signal when an obvious answer is known) 4. Add a 'reason' attribute that can be set to an enum which has a value which represents "module not found" I can't easily make it a private exception that I prevent from escaping importlib thanks to trying to allow the accelerated version of import to use importlib's fromlist code (see how _handle_fromlist is called with its import_ argument). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 01:43:40 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Jul 2013 23:43:40 +0000 Subject: [issue18226] IDLE Unit test for FormatParagrah.py In-Reply-To: <1371335636.99.0.534048602964.issue18226@psf.upfronthosting.co.za> Message-ID: <1372722220.88.0.0548548711201.issue18226@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The patch models Text.data as a single string. But a tkinter Text contains a sequence of strings. While the single sequence works for the one test of the ...event method, a list of strings is needed for .get and many other methods with position parameters to actually work. And .get is needed for testing find_paragraph and, I am sure, other methods of other classes. I am not sure of the correct initialization, but it mostly will not matter. More troublesome is that tkinter lines start at 1, not 0. Possible responses are 1) add a dummy first line to self.data, 2) added all line number by -1 before indexing, or 3) ignore the difference as it will not matter for most tests. I like 3). Any test that cares can prepend an extra \n to the beginning of the text is loads into the editor. Choosing 3, the methods would be def __init__(self): self.data = [''] # I think def setData(self, text) self.data = text.split('\n) def getData(self): return '\n'.join(self.data) # easy so far ;-) def _decode(self, position): # private helper line, col = position.split('.') line = int(line) col = len(self.data[line]) if col == '0 lineend' else int(col) return line, col Doc string for Text.get(self, index1, index2=None) is "Return the text from INDEX1 to INDEX2 (not included)." Interpreting this gives def get(self, start, end=None): line, col = self._decode(start) if end is None: return self.data[line][col] else: endline, endcol = self._decode(end) if line == endline: return self.data[line][col:endcol] else: lines = [self.data[line][col:]] for i in range(line+1, endline): lines.append(self.data[i]) lines.append(self.data[endline][:endcol]) return '\n'.join(lines) This .get code can be used or adapted for .count, .dump, .delete, .replace, and even .insert. At this point, we need a test for the mock Text class. Maybe we can extract something from tkinter.Text tests. I am not sure how far to go with this; at some point (use of marks or tags?), we say "Use tkinter.Text and make it a gui test.". But handling as least basic indexing and pairs of indexes seems essential to me. For gui methods like .see and .scan*, the docstring should be something short like "Gui method, do nothing." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 01:56:43 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2013 23:56:43 +0000 Subject: [issue17870] Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function In-Reply-To: <1367269025.02.0.400879045482.issue17870@psf.upfronthosting.co.za> Message-ID: <1372723003.78.0.256567073595.issue17870@psf.upfronthosting.co.za> STINNER Victor added the comment: Updated patch (version 3), addressing last issues of Mark's review: - add a simple unit test in _testcapi: check that PyLong_AsIntMax_t(INTMAX_INT - 1), PyLong_AsIntMax_t(INTMAX_MAX + 1) and PyLong_AsUintMax_t(UINTMAX_MAX + 1) fail with OverflowError - rely on stdint.h on Windows, with a fallback on __int64 for Visual Studio 2008 - PyLong_AsIntMax_t() and PyLong_AsUintMax_t() compute directly the result (rather than calling _PyLong_AsByteArray) I give you one or two days for a last review, and then I'm going to commit the new functions. ---------- Added file: http://bugs.python.org/file30745/intmax_t-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 01:58:04 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2013 23:58:04 +0000 Subject: [issue18342] Use the repr of a module name for ModuleNotFoundError in ceval.c In-Reply-To: <1372696430.42.0.571776913898.issue18342@psf.upfronthosting.co.za> Message-ID: <1372723084.69.0.490611621159.issue18342@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 02:01:06 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2013 00:01:06 +0000 Subject: [issue18338] python --version should send output to STDOUT In-Reply-To: <1372676487.3.0.302989276182.issue18338@psf.upfronthosting.co.za> Message-ID: <1372723266.24.0.971936997026.issue18338@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: option --version should send output to STDOUT -> python --version should send output to STDOUT _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 02:03:25 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2013 00:03:25 +0000 Subject: [issue18338] python --version should send output to STDOUT In-Reply-To: <1372676487.3.0.302989276182.issue18338@psf.upfronthosting.co.za> Message-ID: <1372723405.24.0.674064472073.issue18338@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 02:06:00 2013 From: report at bugs.python.org (Phil Webster) Date: Tue, 02 Jul 2013 00:06:00 +0000 Subject: [issue18226] IDLE Unit test for FormatParagrah.py In-Reply-To: <1371335636.99.0.534048602964.issue18226@psf.upfronthosting.co.za> Message-ID: <1372723560.28.0.419468425156.issue18226@psf.upfronthosting.co.za> Phil Webster added the comment: I'm not sure if this is worth pursuing, but I made a mock Text Widget that behaves more like an actual Text Widget. I've attached my modified mock_tk.py which I used to create a mock editor window. This works for the test I made in #18279, but I am also working on a version similar to Todd's for that issue. ---------- Added file: http://bugs.python.org/file30746/mock_tk.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 02:12:36 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2013 00:12:36 +0000 Subject: [issue18042] Provide enum.unique class decorator In-Reply-To: <1369299378.37.0.789518154232.issue18042@psf.upfronthosting.co.za> Message-ID: <1372723956.49.0.913001820571.issue18042@psf.upfronthosting.co.za> STINNER Victor added the comment: The documentation still contains an "Interesting example": UniqueEnum. I would prefer to only have one obvious way to get unique enum, so please just drop this example. Or at least, mention the new decorator in the example. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 02:14:41 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2013 00:14:41 +0000 Subject: [issue11016] Re-implementation of the stat module in C In-Reply-To: <1296039446.69.0.66523737586.issue11016@psf.upfronthosting.co.za> Message-ID: <1372724081.68.0.535145798181.issue11016@psf.upfronthosting.co.za> STINNER Victor added the comment: Can we re-close this issue? Or is there still something to do? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 02:16:12 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2013 00:16:12 +0000 Subject: [issue17206] Py_XDECREF() expands its argument multiple times In-Reply-To: <1360858057.09.0.617835061471.issue17206@psf.upfronthosting.co.za> Message-ID: <1372724172.79.0.500405016404.issue17206@psf.upfronthosting.co.za> STINNER Victor added the comment: "So it seems that the best option would be to increase the stack size used when linking (/STACK:). I would suggest increasing it to 3MB using /STACK:3145728." Does Python allocate the whole stack (physical pages) at startup, or is it done on demand as on Linux? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 02:26:09 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Jul 2013 00:26:09 +0000 Subject: [issue11016] Re-implementation of the stat module in C In-Reply-To: <1296039446.69.0.66523737586.issue11016@psf.upfronthosting.co.za> Message-ID: <1372724769.61.0.938504173846.issue11016@psf.upfronthosting.co.za> Christian Heimes added the comment: Let's close it. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 02:34:30 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2013 00:34:30 +0000 Subject: [issue7267] format method: c presentation type broken In-Reply-To: <1257438168.68.0.774312526176.issue7267@psf.upfronthosting.co.za> Message-ID: <1372725270.81.0.302022447033.issue7267@psf.upfronthosting.co.za> STINNER Victor added the comment: u'{0:c}'.format(256) calls 256.__format__('c') which returns a str (bytes) object, so we must reject value outside range(0, 256). The real fix for this issue is to upgrade to Python 3. Attached patch works around the inital issue (u'{0:c}'.format(256)) by raising OverflowError on int.__format__('c') if the value is not in range(0, 256). ---------- Added file: http://bugs.python.org/file30747/int_format_c.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 02:36:30 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2013 00:36:30 +0000 Subject: [issue12520] spurious output in test_warnings In-Reply-To: <1310162087.96.0.0645657657853.issue12520@psf.upfronthosting.co.za> Message-ID: <1372725390.66.0.897001265515.issue12520@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 04:12:44 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 02 Jul 2013 02:12:44 +0000 Subject: [issue16499] CLI option for isolated mode In-Reply-To: <1353248771.63.0.703024605939.issue16499@psf.upfronthosting.co.za> Message-ID: <1372731164.61.0.762808324013.issue16499@psf.upfronthosting.co.za> Nick Coghlan added the comment: I've come around to the idea of having this available as an option in the default interpreter. A separate binary could then just make it the default behaviour (leaning on PEP 432 to do so), which is more shebang line friendly and allows Linux distros to better distinguish between "default behaviour of Python when running user scripts" and "default behaviour of Python when running system applications" in a way that simple symlinks can't. However, whether or not to provide such a binary (and whether or not to rewrite shebang lines in system packages to use it) would become our problem rather than an upstream problem. So +1 from me for a -I isolated mode, and I'll adjust PEP 432 as necessary to cope. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 04:19:49 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 02 Jul 2013 02:19:49 +0000 Subject: [issue16499] CLI option for isolated mode In-Reply-To: <1372731164.61.0.762808324013.issue16499@psf.upfronthosting.co.za> Message-ID: <20130701221945.7e3048e5@anarchist> Barry A. Warsaw added the comment: On Jul 02, 2013, at 02:12 AM, Nick Coghlan wrote: >So +1 from me for a -I isolated mode, and I'll adjust PEP 432 as necessary to >cope. PEP 394 is probably related to any such additional binary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 06:54:10 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 02 Jul 2013 04:54:10 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1372740850.06.0.194919683938.issue15767@psf.upfronthosting.co.za> Guido van Rossum added the comment: [switching to gmail-powered account] I'm sorry, but this seems like it should be an importlib internal affair. The new exception is too much in everyone's face, because the exception name gets printed on every traceback. I like #4, #3 is also acceptable. But #4 seems best because it can obviate a bunch of exception message parsing in user code, I'm sure. Though we shouldn't go overboard with distinguishing cases, the two different places where you currently raise MNFE should be distinguished IMO. ---------- nosy: +Guido.van.Rossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 07:01:46 2013 From: report at bugs.python.org (Todd Rovito) Date: Tue, 02 Jul 2013 05:01:46 +0000 Subject: [issue18226] IDLE Unit test for FormatParagrah.py In-Reply-To: <1371335636.99.0.534048602964.issue18226@psf.upfronthosting.co.za> Message-ID: <1372741306.09.0.0891432266065.issue18226@psf.upfronthosting.co.za> Todd Rovito added the comment: Terry, Thank you for the feedback this helps me alot! I will work with Phil Webster and will use his Text Widget and EditorWindow classes. Hopefully this will help us converge on a strong unit test for FormatParagraph.py. Thanks for the reminder about triple quoted strings I think your idea to make sure those strings are in place now is excellent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 07:21:59 2013 From: report at bugs.python.org (V.E.O) Date: Tue, 02 Jul 2013 05:21:59 +0000 Subject: [issue18340] float related test has problem with Denormal Flush to Zero compiler options In-Reply-To: <1372693864.33.0.227282156373.issue18340@psf.upfronthosting.co.za> Message-ID: <1372742519.91.0.0225368573442.issue18340@psf.upfronthosting.co.za> V.E.O added the comment: Hi Mark, Sorry for unclear DFZ abbreviation, that is when compiler opened with FTZ and DAZ feature. My operating system is Linux X64, I only tried Intel Compiler. In default optimization mode, the FTZ option is opened. Don't known why Intel make it the default option, maybe they think performance handling Subnormal number values and compatibility with some hardware. https://en.wikipedia.org/wiki/Subnormal_number#Disabling_denormal_floats_at_the_code_level The configure script of Python may not have precise detection on Intel Compiler, that feature can be closed with -no-ftz options. Hi Christian, I've not test GCC's DFZ/FTZ options, I'd like to test it myself and report here. Maybe '-ffast-math' is the right option. Hi Stefan, Tried to change the mode, but not work, seems the right options is '-no-ftz'. Regards, V.E.O ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 08:09:05 2013 From: report at bugs.python.org (Thomas Heller) Date: Tue, 02 Jul 2013 06:09:05 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1372745345.1.0.904472033716.issue15767@psf.upfronthosting.co.za> Changes by Thomas Heller : ---------- nosy: +theller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 08:27:09 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Jul 2013 06:27:09 +0000 Subject: [issue18226] IDLE Unit test for FormatParagrah.py In-Reply-To: <1371335636.99.0.534048602964.issue18226@psf.upfronthosting.co.za> Message-ID: <1372746429.24.0.302256663103.issue18226@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Phil (and Todd): I do not know what you mean by "behaves like more like an actual Text Widget" and whether you are talking about internal or external behavior. But I know that tk does not use an immutable string to hold the text. There is no such thing in C. Tk might use one array of 2-byte words with a gap at the cursor and an auxiliary line pointer array, or it might use an array of line structure similar to what I did (but again with arrays rather than immutable strings for each line), or possibly some other structure, However we could only imitate the internals of tk.Text by using (deprecated) PyUNICODE arrays (see the array doc) and doing much more programming effort. Re-splitting a single line over and over is too inefficient to consider for a repository patch. I believe your particular indexToInt with getLine makes the conversion O(n*n) instead of 'just' O(n), whereas keeping the line in split form makes it O(1). Side note, as far as I know, "re.split('\n', text)" (the r prefix is not needed here) does the same thing as text.split('\n'). But it is slower and harder to type. We don't use re when a string method does the same thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 09:16:30 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Jul 2013 07:16:30 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1372749390.54.0.352874671477.issue15767@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If most user code should catch a ModuleNotFoundError exception, perhaps it will be better rename old ImportError to ImportlibError (or ImportingError, or ImportMachineryError, or BaseImportError) and new ModuleNotFoundError to ImportError. This will left most existing user code untouched. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 09:19:38 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Jul 2013 07:19:38 +0000 Subject: [issue18344] _bufferedreader_read_all() may leak reference to data In-Reply-To: <1372720264.13.0.315058042183.issue18344@psf.upfronthosting.co.za> Message-ID: <1372749578.39.0.612400741967.issue18344@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 09:25:00 2013 From: report at bugs.python.org (=?utf-8?q?Kim_Gr=C3=A4sman?=) Date: Tue, 02 Jul 2013 07:25:00 +0000 Subject: [issue18314] Have os.unlink remove junction points In-Reply-To: <1372335321.1.0.479247042071.issue18314@psf.upfronthosting.co.za> Message-ID: <1372749900.4.0.556331859499.issue18314@psf.upfronthosting.co.za> Kim Gr?sman added the comment: This comment outlines how to tell junction points from other mount points: http://www.codeproject.com/Articles/21202/Reparse-Points-in-Vista?msg=3651130#xx3651130xx This should port straight into Py_DeleteFileW. Would anyone be interested in a patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 09:29:01 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 02 Jul 2013 07:29:01 +0000 Subject: [issue18344] _bufferedreader_read_all() may leak reference to data In-Reply-To: <1372720264.13.0.315058042183.issue18344@psf.upfronthosting.co.za> Message-ID: <1372750141.87.0.796927512375.issue18344@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Patch attached. ---------- keywords: +patch Added file: http://bugs.python.org/file30748/buf-readall.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 09:54:33 2013 From: report at bugs.python.org (V.E.O) Date: Tue, 02 Jul 2013 07:54:33 +0000 Subject: [issue18340] float related test has problem with Denormal Flush to Zero compiler options In-Reply-To: <1372693864.33.0.227282156373.issue18340@psf.upfronthosting.co.za> Message-ID: <1372751673.61.0.165693805567.issue18340@psf.upfronthosting.co.za> V.E.O added the comment: Hi All, >From my test, GCC will not enforce DFZ/FTZ only by compiler options. It needs code modify register flag. I think it's a problem with Intel Compiler. Maybe from platform.python_compiler(), these tests can identify the compiler and be skipped. But the identification is ambiguous, for in Linux it's "GCC Intel(R) C++ gcc x.x mode", in Windows it's like "MSC v.1600 32 bit (Intel)" If the support for Intel Compiler is not OK, we can pending these issues for future fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 09:58:01 2013 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 02 Jul 2013 07:58:01 +0000 Subject: [issue18340] float related test has problem with Denormal Flush to Zero compiler options In-Reply-To: <1372693864.33.0.227282156373.issue18340@psf.upfronthosting.co.za> Message-ID: <1372751881.82.0.406251471082.issue18340@psf.upfronthosting.co.za> Mark Dickinson added the comment: > From my test, GCC will not enforce DFZ/FTZ only by compiler options. It > needs code modify register flag. But in normal use, the Python process should be starting in a sensible default state, with the DAZ and FTZ flags disabled, so I'm confused about how the DAZ / FTZ flags ever get set in the first place. Are you embedding Python in another app? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 10:41:06 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Jul 2013 08:41:06 +0000 Subject: [issue18345] logging: file creation options with FileHandler and friends Message-ID: <1372754466.44.0.0217730014706.issue18345@psf.upfronthosting.co.za> New submission from Antoine Pitrou: When starting a service as root, you may want your log files to be created as another user (the service may drop privileges later). It would be nice to have a "chown" option to FileHander. For example it could take either a "username" string, or a ("username", "groupname") tuple. (a similar request may be made for chmod, but umask helps a lot there) This is quite low-priority :) ---------- components: Library (Lib) messages: 192181 nosy: pitrou, vinay.sajip priority: low severity: normal status: open title: logging: file creation options with FileHandler and friends type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 11:03:52 2013 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 02 Jul 2013 09:03:52 +0000 Subject: [issue17870] Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function In-Reply-To: <1367269025.02.0.400879045482.issue17870@psf.upfronthosting.co.za> Message-ID: <1372755832.16.0.773673126594.issue17870@psf.upfronthosting.co.za> Mark Dickinson added the comment: Yes, I apologise; I haven't had time for review. I'll unassign so that someone else can pick this up. It would still be good to have an independent review from someone before this goes in, though. ---------- assignee: mark.dickinson -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 11:09:39 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 02 Jul 2013 09:09:39 +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: <1372756179.64.0.70355514353.issue14455@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This version should be better: * There should be no lines longer than 80 characters * Changed coding style of the (private) XML plist writer classes to PEP8 * Public API is now dump/dumps and load/loads, the old API is still available and deprecated -> As mentioned before I'm not entirely sure if doing this is the right solution, but it does give us a clean path to remove deprecated functionality later on (in particular the Dict and Data classes). -> What I haven't done yet, and probably should, is to write a 2to3 fixer that converts code to the new API. * Grouped source in more logical segments (deprecated, xml support, binary support, generic code). * The previous item means that I've moved even more code around, I looked into minimizing the patch but the original module could not be easily extended without moving code around. * Added some more tests -> I might add more tests when I manage to run coverage.py, for some reason the instructions in the dev-guide don't work for me with a framework install :-( I might add a documentation comment to the binary plist support code that gives an overview of the file format with pointers to more information, but other than that and possible test coverage improvements the patch should be done. ---------- Added file: http://bugs.python.org/file30749/issue-14455-v7.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 11:13:29 2013 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 02 Jul 2013 09:13:29 +0000 Subject: [issue18244] Adopt C3-based linearization for improved ABC support in functools.singledispatch In-Reply-To: <1371490468.22.0.590624884808.issue18244@psf.upfronthosting.co.za> Message-ID: <1372756409.74.0.919981752414.issue18244@psf.upfronthosting.co.za> ?ukasz Langa added the comment: For the record, the PEP has been updated [1]_ and so has been the backport for 2.6 - 3.3 [2]_. .. [1] http://hg.python.org/peps/rev/000a8986ef73 .. [2] https://pypi.python.org/pypi/singledispatch/3.4.0.2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 11:38:48 2013 From: report at bugs.python.org (V.E.O) Date: Tue, 02 Jul 2013 09:38:48 +0000 Subject: [issue18340] float related test has problem with Denormal Flush to Zero compiler options In-Reply-To: <1372693864.33.0.227282156373.issue18340@psf.upfronthosting.co.za> Message-ID: <1372757928.16.0.56704311791.issue18340@psf.upfronthosting.co.za> V.E.O added the comment: Hi Mark, If these flag is opened by code running in Python, DAZ FTZ flags should be opened. With Intel Compiler, in default, they add code opening the flag for you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 12:09:41 2013 From: report at bugs.python.org (me21) Date: Tue, 02 Jul 2013 10:09:41 +0000 Subject: [issue18346] Backporting of issue 8828 to Python 2.7 Message-ID: <1372759781.12.0.359437374117.issue18346@psf.upfronthosting.co.za> New submission from me21: It would be nice to backport http://bugs.python.org/issue8828 to Python 2.7. For example, Django depends on atomic renames with its file-based sessions, and it still supports Python 2.x. There was a bug in Django because of this (https://code.djangoproject.com/ticket/9084), and they ended up with non-atomic workaround. Some other third-party libraries could be affected as well. ---------- components: Library (Lib), Windows messages: 192186 nosy: me21 priority: normal severity: normal status: open title: Backporting of issue 8828 to Python 2.7 type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 12:11:39 2013 From: report at bugs.python.org (Alexandr Zarubkin) Date: Tue, 02 Jul 2013 10:11:39 +0000 Subject: [issue18346] Backporting of atomic file rename to Python 2.7 In-Reply-To: <1372759781.12.0.359437374117.issue18346@psf.upfronthosting.co.za> Message-ID: <1372759899.23.0.259216724572.issue18346@psf.upfronthosting.co.za> Changes by Alexandr Zarubkin : ---------- title: Backporting of issue 8828 to Python 2.7 -> Backporting of atomic file rename to Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 13:42:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 02 Jul 2013 11:42:32 +0000 Subject: [issue17273] multiprocessing.pool.Pool task/worker handlers are not fork safe In-Reply-To: <1361514053.16.0.91883779216.issue17273@psf.upfronthosting.co.za> Message-ID: <3bl3Tg5z3nz7Ljk@mail.python.org> Roundup Robot added the comment: New changeset 389788ba6bcb by Richard Oudkerk in branch '2.7': Issue #17273: Clarify that pool methods can only be used by parent process. http://hg.python.org/cpython/rev/389788ba6bcb New changeset 57fe80fda9be by Richard Oudkerk in branch '3.3': Issue #17273: Clarify that pool methods can only be used by parent process. http://hg.python.org/cpython/rev/57fe80fda9be New changeset 7ccf3d36ad13 by Richard Oudkerk in branch 'default': Issue #17273: Clarify that pool methods can only be used by parent process. http://hg.python.org/cpython/rev/7ccf3d36ad13 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 13:45:39 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 02 Jul 2013 11:45:39 +0000 Subject: [issue17273] Pool methods can only be used by parent process. In-Reply-To: <1361514053.16.0.91883779216.issue17273@psf.upfronthosting.co.za> Message-ID: <1372765539.13.0.997730397502.issue17273@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed title: multiprocessing.pool.Pool task/worker handlers are not fork safe -> Pool methods can only be used by parent process. type: behavior -> versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 14:02:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 02 Jul 2013 12:02:31 +0000 Subject: [issue14206] multiprocessing.Queue documentation is lacking important details In-Reply-To: <1330993962.13.0.893864771053.issue14206@psf.upfronthosting.co.za> Message-ID: <3bl3wl00MSz7LlQ@mail.python.org> Roundup Robot added the comment: New changeset f35401dba89f by Richard Oudkerk in branch '2.7': Issue #14206: Clarify docs for Queue.join_cancel_thread(). http://hg.python.org/cpython/rev/f35401dba89f New changeset 9746f217a270 by Richard Oudkerk in branch '3.3': Issue #14206: Clarify docs for Queue.join_cancel_thread(). http://hg.python.org/cpython/rev/9746f217a270 New changeset d0b48efac9de by Richard Oudkerk in branch 'default': Issue #14206: Clarify docs for Queue.join_cancel_thread(). http://hg.python.org/cpython/rev/d0b48efac9de ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 14:03:00 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 02 Jul 2013 12:03:00 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1372749390.54.0.352874671477.issue15767@psf.upfronthosting.co.za> Message-ID: <20130702080257.7b817d57@limelight.wooz.org> Barry A. Warsaw added the comment: On Jul 02, 2013, at 07:16 AM, Serhiy Storchaka wrote: >If most user code should catch a ModuleNotFoundError exception, perhaps it >will be better rename old ImportError to ImportlibError (or ImportingError, >or ImportMachineryError, or BaseImportError) and new ModuleNotFoundError to >ImportError. This will left most existing user code untouched. I urge some caution here. I don't know that the above will cause problems, but I do think you're walking into PEP territory. I would feel much more comfortable with an analysis based on testing existing third party code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 14:04:00 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 02 Jul 2013 12:04:00 +0000 Subject: [issue14206] multiprocessing.Queue documentation is lacking important details In-Reply-To: <1330993962.13.0.893864771053.issue14206@psf.upfronthosting.co.za> Message-ID: <1372766640.2.0.975898332169.issue14206@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- resolution: -> fixed stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 14:04:18 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 02 Jul 2013 12:04:18 +0000 Subject: [issue14206] multiprocessing.Queue documentation is lacking important details In-Reply-To: <1330993962.13.0.893864771053.issue14206@psf.upfronthosting.co.za> Message-ID: <1372766658.47.0.382186844758.issue14206@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 14:26:31 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 02 Jul 2013 12:26:31 +0000 Subject: [issue18346] Backporting of atomic file rename to Python 2.7 In-Reply-To: <1372759781.12.0.359437374117.issue18346@psf.upfronthosting.co.za> Message-ID: <1372767991.07.0.964034700821.issue18346@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Issue #8828 adds a new API to the os module, as such it is inappropriate for a back port (no new features in stable releases) ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 14:41:04 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 02 Jul 2013 12:41:04 +0000 Subject: [issue17261] multiprocessing.manager BaseManager cannot return proxies from proxies remotely (when listening on '') In-Reply-To: <1361402442.38.0.214511208873.issue17261@psf.upfronthosting.co.za> Message-ID: <3bl4nC6RddzRFn@mail.python.org> Roundup Robot added the comment: New changeset 20b59fec1123 by Richard Oudkerk in branch '2.7': Issue #17261: Ensure multiprocessing's proxies use proper address. http://hg.python.org/cpython/rev/20b59fec1123 New changeset be4b9e677187 by Richard Oudkerk in branch '3.3': Issue #17261: Ensure multiprocessing's proxies use proper address. http://hg.python.org/cpython/rev/be4b9e677187 New changeset 7387b884f833 by Richard Oudkerk in branch 'default': Issue #17261: Ensure multiprocessing's proxies use proper address. http://hg.python.org/cpython/rev/7387b884f833 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 14:41:56 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 02 Jul 2013 12:41:56 +0000 Subject: [issue17261] multiprocessing.manager BaseManager cannot return proxies from proxies remotely (when listening on '') In-Reply-To: <1361402442.38.0.214511208873.issue17261@psf.upfronthosting.co.za> Message-ID: <1372768916.42.0.656896766657.issue17261@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 14:48:34 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Jul 2013 12:48:34 +0000 Subject: [issue18346] Backporting of atomic file rename to Python 2.7 In-Reply-To: <1372759781.12.0.359437374117.issue18346@psf.upfronthosting.co.za> Message-ID: <1372769314.42.0.555949218214.issue18346@psf.upfronthosting.co.za> Christian Heimes added the comment: Some people have developed a ctypes interface to MoveFileExW(). For example https://github.com/mitsuhiko/python-atomicfile/ . ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 14:50:34 2013 From: report at bugs.python.org (Scott Leerssen) Date: Tue, 02 Jul 2013 12:50:34 +0000 Subject: [issue15301] os.chown: OverflowError: Python int too large to convert to C long In-Reply-To: <1341800139.98.0.546402243809.issue15301@psf.upfronthosting.co.za> Message-ID: <1372769434.88.0.770337219619.issue15301@psf.upfronthosting.co.za> Scott Leerssen added the comment: Regarding whether or not to include the fix in 2.7, I'd like to suggest that it be included there as well. It will be quite some time before the project on which I work moves to Python 3, and I just hit the same issue. ---------- nosy: +Scott.Leerssen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 15:08:49 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 02 Jul 2013 13:08:49 +0000 Subject: [issue18312] "make distclean" deletes files under .hg directory In-Reply-To: <1372296464.66.0.963255474553.issue18312@psf.upfronthosting.co.za> Message-ID: <3bl5PD3gSqzPrk@mail.python.org> Roundup Robot added the comment: New changeset 5896f887a93a by Eric V. Smith in branch '2.7': Closes #18312: 'make distclean' no longer deletes files in dot-directories. http://hg.python.org/cpython/rev/5896f887a93a New changeset 910ec3471d55 by Eric V. Smith in branch '3.3': Closes #18312: 'make distclean' no longer deletes files in dot-directories. http://hg.python.org/cpython/rev/910ec3471d55 New changeset 8e838598eed1 by Eric V. Smith in branch 'default': #18312: merge from 3.3. http://hg.python.org/cpython/rev/8e838598eed1 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 15:42:39 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 02 Jul 2013 13:42:39 +0000 Subject: [issue18312] "make distclean" deletes files under .hg directory In-Reply-To: <1372296464.66.0.963255474553.issue18312@psf.upfronthosting.co.za> Message-ID: <1372772559.9.0.50042238289.issue18312@psf.upfronthosting.co.za> R. David Murray added the comment: Unfortunately make distclean is now failing on the buildbots. Which reminds us that there is another place that that target, including the 'find' at issue, is used. Presumably there is an issue with tests not cleaning up after themselves that ought to be fixed, but for now we just need to re-fix make distclean. http://buildbot.python.org/all/builders/x86%20Tiger%202.7/builds/2030/steps/clean/logs/stdio ---------- stage: committed/rejected -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 16:08:31 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 02 Jul 2013 14:08:31 +0000 Subject: [issue18312] "make distclean" deletes files under .hg directory In-Reply-To: <1372296464.66.0.963255474553.issue18312@psf.upfronthosting.co.za> Message-ID: <1372774111.82.0.297689892011.issue18312@psf.upfronthosting.co.za> R. David Murray added the comment: Hmm. I may be pointing the finger at the wrong thing here...looking at more logs I'm now not sure what is up with the buildbots. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 16:16:02 2013 From: report at bugs.python.org (Ramchandra Apte) Date: Tue, 02 Jul 2013 14:16:02 +0000 Subject: [issue18305] [patch] Fast sum() for non-numbers In-Reply-To: <1372228439.5.0.789865081817.issue18305@psf.upfronthosting.co.za> Message-ID: <1372774562.48.0.8227283929.issue18305@psf.upfronthosting.co.za> Ramchandra Apte added the comment: I agree with Sergey. Would be nice if it could use copy.copy (though that might change behaviour a bit) ---------- nosy: +Ramchandra Apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 16:24:29 2013 From: report at bugs.python.org (Ramchandra Apte) Date: Tue, 02 Jul 2013 14:24:29 +0000 Subject: [issue18338] python --version should send output to STDOUT In-Reply-To: <1372676487.3.0.302989276182.issue18338@psf.upfronthosting.co.za> Message-ID: <1372775069.62.0.848084021002.issue18338@psf.upfronthosting.co.za> Ramchandra Apte added the comment: > Your proposal is reasonable. I'm flagging it for Python 3.4+ as it's a backward incompatible modification. Agree. ---------- nosy: +Ramchandra Apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 16:26:57 2013 From: report at bugs.python.org (Brett Cannon) Date: Tue, 02 Jul 2013 14:26:57 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1372775217.28.0.469727212699.issue15767@psf.upfronthosting.co.za> Brett Cannon added the comment: OK, I'll revert the changes related to ModuleNotFoundError. As for adding a 'reason' attribute, I see two sticking points. One is how to set the enum value. There is both the C code issue (specifically so ceval.c and import.c can use the values) as well as importlib's bootstrapping restrictions. I'll have to think about whether there is any reasonable way to make it work. Second, as you hinted at Guido, is exactly what the acceptable cases may be. I would probably start with any ImportError raised directly by import itself and nothing more. Other things from loaders (e.g. bad magic number, stale bytecode, etc.) could be initially left out. That would mean the following possible values: * module is not a package * module not found * None in sys.modules But the bootstrapping issues for the enum module is probably going to be the showstopper for this. That suggests either adding not_found or figuring out some way to prevent _not_found from leaking outside of importlib (which I now think I can do somewhat reasonably). ---------- resolution: fixed -> stage: committed/rejected -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 16:39:21 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 02 Jul 2013 14:39:21 +0000 Subject: [issue18346] Backporting of atomic file rename to Python 2.7 In-Reply-To: <1372759781.12.0.359437374117.issue18346@psf.upfronthosting.co.za> Message-ID: <1372775961.21.0.573953735278.issue18346@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 16:41:24 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Jul 2013 14:41:24 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1372776084.19.0.179497735269.issue15767@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > But the bootstrapping issues for the enum module is probably going > to be the showstopper for this. Have we succumbed to the enum religion already? Just make it a plain string. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 16:59:04 2013 From: report at bugs.python.org (Brett Cannon) Date: Tue, 02 Jul 2013 14:59:04 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1372777143.99.0.886696155706.issue15767@psf.upfronthosting.co.za> Brett Cannon added the comment: In this instance where there are only a set number of options are expected to be officially valid, yes I think enums are a good fit. As for strings, the only way I would be okay with that is defining the strings either as attributes on ImportError itself or off of importlib to make it easy to do a comparison. But in that case I might as well just drop _not_found and use ``str(exc).startswith('No module named ')`` to detect what I need and be done with it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 17:01:11 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Jul 2013 15:01:11 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1372777143.99.0.886696155706.issue15767@psf.upfronthosting.co.za> Message-ID: <686107171.135407623.1372777265361.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > In this instance where there are only a set number of options are > expected to be officially valid, yes I think enums are a good fit. They are a good fit, that doesn't mean they're the only one. > As for strings, the only way I would be okay with that is defining > the strings either as attributes on ImportError itself or off of > importlib to make it easy to do a comparison. What does that mean? I don't understand how `exc.reason == 'module_not_found'` is harder than `exc.reason == ImportReason.MODULE_NOT_FOUND`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 17:23:43 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Jul 2013 15:23:43 +0000 Subject: [issue18346] Backporting of atomic file rename to Python 2.7 In-Reply-To: <1372759781.12.0.359437374117.issue18346@psf.upfronthosting.co.za> Message-ID: <1372778623.3.0.25655104256.issue18346@psf.upfronthosting.co.za> Christian Heimes added the comment: I had some spare time: https://pypi.python.org/pypi/pyosreplace . Please test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 17:28:24 2013 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 02 Jul 2013 15:28:24 +0000 Subject: [issue17206] Py_XDECREF() expands its argument multiple times In-Reply-To: <1360858057.09.0.617835061471.issue17206@psf.upfronthosting.co.za> Message-ID: <1372778904.78.0.32755237865.issue17206@psf.upfronthosting.co.za> Jeremy Kloth added the comment: The /STACK:reserve[,commit] linker option uses 'reserve' as the upper limit of bytes to allow the executable to allocate. The optional 'commit' value (default of 4096) is the amount of physical memory allocated as needed. Therefore the reserve could be as large as needed to prevent stack overflows without impacting the actually memory footprint of the executable. Maybe we should consider increasing the reserve to match that of Linux (8MB)? From the list I posted above, the huge increase in stack use in Python-ast.c could lead to other overflows for certain expressions. Attached is the patch to the project file to increase the stack reserve to 4MB. The actual value doesn't impact the memory requirements of the debug build except in edge cases that would otherwise result in stack overflow exceptions. ---------- Added file: http://bugs.python.org/file30750/project.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 17:32:57 2013 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 02 Jul 2013 15:32:57 +0000 Subject: [issue17206] Py_XDECREF() expands its argument multiple times In-Reply-To: <1360858057.09.0.617835061471.issue17206@psf.upfronthosting.co.za> Message-ID: <1372779177.38.0.492028022379.issue17206@psf.upfronthosting.co.za> Jeremy Kloth added the comment: I forgot to note that with the increased stack reserve my previous patches to Py_DECREF() and related macros are no longer needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 17:45:01 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2013 15:45:01 +0000 Subject: [issue17206] Py_XDECREF() expands its argument multiple times In-Reply-To: <1360858057.09.0.617835061471.issue17206@psf.upfronthosting.co.za> Message-ID: <1372779901.78.0.750524501443.issue17206@psf.upfronthosting.co.za> STINNER Victor added the comment: Jeremy: "stack for python_d.exe has been already up'ed to 2100000" Indeed, but not recently (changeset 97361d917d22): << Issue 2286: bump up the stack size of the 64-bit debug python_d.exe to 2100000. The default value of 200000 causes a stack overflow at 1965 iterations of r_object() in marshal.c, 35 iterations before the 2000 limit enforced by MAX_MARSHAL_STACK_DEPTH. >> Oh it looks like it was the same issue: "Stack overflow exception caused by test_marshal on Windows x64". See issue #2286. Amaury wrote in this issue (in 2008, msg63540): "Can you try to raise the stack size on x64 builds? If 2Mb is enough for 32bit, 4Mb should be good in your case." Jeremy: "Therefore the reserve could be as large as needed to prevent stack overflows without impacting the actually memory footprint of the executable. Maybe we should consider increasing the reserve to match that of Linux (8MB)?" Ah ok, if the memory footprint is unchanged, yes please increase the arbitrary limit. I would suggest 8 MB. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 18:06:40 2013 From: report at bugs.python.org (Brett Cannon) Date: Tue, 02 Jul 2013 16:06:40 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1372781200.96.0.464797971787.issue15767@psf.upfronthosting.co.za> Brett Cannon added the comment: It's not a question of harder but more error-prone since a typo in the string won't be directly noticed while mistyping an attribute name will be. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 18:14:06 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 02 Jul 2013 16:14:06 +0000 Subject: [issue18224] pyvenv pydoc.py script causing AttributeErrors on Windows In-Reply-To: <1371306434.01.0.246562250059.issue18224@psf.upfronthosting.co.za> Message-ID: <1372781646.75.0.810374870304.issue18224@psf.upfronthosting.co.za> ?ric Araujo added the comment: That?s too bad; it?s annoying to lose the ability to just use ?pydoc x? if a venv is activated. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 18:16:19 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Jul 2013 16:16:19 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1372781200.96.0.464797971787.issue15767@psf.upfronthosting.co.za> Message-ID: <215447368.135611099.1372781772128.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > It's not a question of harder but more error-prone since a typo in > the string won't be directly noticed while mistyping an attribute > name will be. Ok, agreed. I guess it's ok, if it only adds one or two attributes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 18:36:13 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 02 Jul 2013 16:36:13 +0000 Subject: [issue18312] "make distclean" deletes files under .hg directory In-Reply-To: <1372296464.66.0.963255474553.issue18312@psf.upfronthosting.co.za> Message-ID: <1372782973.41.0.122560240899.issue18312@psf.upfronthosting.co.za> R. David Murray added the comment: OK, this looks like a false alarm. I still don't understand those @ failures or the input error on the makefile, but there doesn't seem to be a problem with this patch. ---------- stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 19:13:19 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 02 Jul 2013 17:13:19 +0000 Subject: [issue2286] Stack overflow exception caused by test_marshal on Windows x64 In-Reply-To: <1205499475.78.0.0465561571315.issue2286@psf.upfronthosting.co.za> Message-ID: <1372785199.96.0.696091896131.issue2286@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Reopening because I think this is again a problem for Win64 and 3.x. The Win64 buildbots always seem to crash on test_marshal (and I do too). It appears to be BugsTestCase.test_loads_2x_code() which crashes, which is virtually the same as test_loads_recursion(). ---------- nosy: +sbt status: closed -> open versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 19:31:39 2013 From: report at bugs.python.org (Adam Urban) Date: Tue, 02 Jul 2013 17:31:39 +0000 Subject: [issue18347] ElementTree corrupts cAse of closing tags when html method is specified Message-ID: <1372786299.24.0.986452564327.issue18347@psf.upfronthosting.co.za> New submission from Adam Urban: import xml.etree.ElementTree as ET tree = ET.parse("myinput.xml") tree.write("myoutput.xml", encoding="utf-16le", xml_declaration=False, default_namespace=None, method="html") If the source XML has a tag like this: someData ElementTree will output it like this when html is specified as the "method": someData ---------- components: XML messages: 192212 nosy: Adam.Urban, eli.bendersky, serhiy.storchaka priority: normal severity: normal status: open title: ElementTree corrupts cAse of closing tags when html method is specified 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 Tue Jul 2 19:45:05 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 02 Jul 2013 17:45:05 +0000 Subject: [issue2286] Stack overflow exception caused by test_marshal on Windows x64 In-Reply-To: <1205499475.78.0.0465561571315.issue2286@psf.upfronthosting.co.za> Message-ID: <1372787105.08.0.810277120861.issue2286@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Closing because this is caused by #17206 and is already discussed there. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 19:47:11 2013 From: report at bugs.python.org (roskakori) Date: Tue, 02 Jul 2013 17:47:11 +0000 Subject: [issue18348] Additional code pages for EBCDIC Message-ID: <1372787231.53.0.326876214252.issue18348@psf.upfronthosting.co.za> New submission from roskakori: Currently Python includes a codec for EBCDIC international (cp500) but seems to be missing any further EBCDIC codecs. These encodings are widly used on mainframe platforms, popular in finance and insurance. Descriptions of these codepages are available from IBM: . These descriptions also include mapping files although not in a format that can readily be processed by gencodec.py. So instead I used the codecs included with Java 1.7 to generate mappings for gencodec.py. You can find them in the attached ZIP archive. As Java also runs on mainframe platforms, IBM should be interested in the Java codecs to be correct and complete. The converter is available from . To build the cp*.txt for EBCDIC, simply run: $ git clone https://github.com/roskakori/CodecMapper.git $ cd CodecMapper $ ant ebcdic IBM lists a large number of EBCDIC codepages, I only attached the ones listed in the German Wikipedia: . This also includes cp500 for comparison with your current cp500. And it lacks EDF03DRV because even Java does not support it. Currently Java 1.7 supports 43 variants. To get a list of them, use: $ ant list | grep -i ' ibm' This would also fix issue 1097797: Encoding for Code Page 273 used by EBCDIC Germany Austria. ---------- components: Unicode files: cp_ebcdic.zip messages: 192214 nosy: ezio.melotti, lemburg, roskakori priority: normal severity: normal status: open title: Additional code pages for EBCDIC type: enhancement Added file: http://bugs.python.org/file30751/cp_ebcdic.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 20:14:17 2013 From: report at bugs.python.org (Sergey) Date: Tue, 02 Jul 2013 18:14:17 +0000 Subject: [issue18305] [patch] Fast sum() for non-numbers In-Reply-To: <1372228439.5.0.789865081817.issue18305@psf.upfronthosting.co.za> Message-ID: <1372788857.75.0.981016089258.issue18305@psf.upfronthosting.co.za> Sergey added the comment: > I don't know about IronPython, but Jython and PyPy have same behavior as CPython. Right. I was wrong, at least Jython and PyPy suffer from this bug too. > I think that it is worthwhile to discuss the idea at first in the Python-Ideas mailing list [1]. Ok, wrote to Python-Ideas, thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 22:42:10 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Jul 2013 20:42:10 +0000 Subject: [issue18347] ElementTree corrupts cAse of closing tags when html method is specified In-Reply-To: <1372786299.24.0.986452564327.issue18347@psf.upfronthosting.co.za> Message-ID: <1372797730.62.0.76011301058.issue18347@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm able to confirm the issue for Python 2.7 and 3.x: >>> import xml.etree.ElementTree as ET >>> tree = ET.fromstring("someData") >>> ET.tostring(tree, encoding="utf-8", method="html") b'someData' ---------- nosy: +christian.heimes stage: -> needs patch versions: -Python 2.6, Python 3.1, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 22:54:08 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Jul 2013 20:54:08 +0000 Subject: [issue18348] Additional code pages for EBCDIC In-Reply-To: <1372787231.53.0.326876214252.issue18348@psf.upfronthosting.co.za> Message-ID: <1372798448.64.0.0115869062341.issue18348@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 23:06:01 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Jul 2013 21:06:01 +0000 Subject: [issue18347] ElementTree corrupts cAse of closing tags when html method is specified In-Reply-To: <1372786299.24.0.986452564327.issue18347@psf.upfronthosting.co.za> Message-ID: <1372799161.76.0.198309969399.issue18347@psf.upfronthosting.co.za> Christian Heimes added the comment: Attached fix with unit test The HTML serializer has a line tag = tag.lower() and used the lower tag to write the end tag. ---------- keywords: +patch Added file: http://bugs.python.org/file30752/18347_taglower.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 00:02:02 2013 From: report at bugs.python.org (Matthew Barnett) Date: Tue, 02 Jul 2013 22:02:02 +0000 Subject: [issue18286] Python 3.3 - Slowing down computer In-Reply-To: <1371928488.87.0.904340213253.issue18286@psf.upfronthosting.co.za> Message-ID: <1372802522.65.0.609749350963.issue18286@psf.upfronthosting.co.za> Matthew Barnett added the comment: > with open('url_list.txt') as f: > > content = f.readlines() > content = ''.join(content) > Why are you reading all of the lines and then joining them together like that? Why not just do: content = f.read() > content = list(content) Why are you making a list? You could just as easily index the string. > if content[0] == 'h' and content[1] == 't' and content[2] =='t': If 'content' is a string, then that can be: if content.startswith('htt'): > print("Make sure that you remove http:/ !") > time.sleep(1) > sys.exit("") > elif content[0] != 'w' and content[1] != 'w' and content[2] != 'w': If 'content' is a string, then that can be: elif content.startswith('www'): > print("Make sure that you have the www. at the start!") > print(content[0],content[1]) > time.sleep(1) > sys.exit("") > os.system("CLS") > else: > print("Configuration looks fine!") > time.sleep(1) > with open('url_list.txt') as f: Now you're reading it for a second time! > content_url = f.readlines() > content_join = ''.join(content_url) > print("You will load video url",content_join,".") > time.sleep(1) > os.system("CLS") > print("Processing...") > time.sleep(1) > > > global x 'global' has no effect outside a function. > x = 0 > time.sleep(1) > if x > 35: > print("Warning! Your computer could go unstable!") > time.sleep(1) > os.system("CLS") > print("Are you sure you want to select that many? - yes - no") > while "1" == "1": Or: while True: > _answer_ = input("|yes| |no| - ") > if _answer == "yes": > break > elif answer == "no": You have '_answer_', '_answer' and 'answer'. > sys.exit("Quitting application") > else: > print("Invalid input!") > time.sleep(1) > os.system("CLS") > > elif x in range(1,35): Or: elif 1 <= x <= 35: > print("Seems fine") > elif x < 0: > print("Warning!") > print("Out of range value!") > os.system("CLS") > time.sleep(5) > sys.exit("") > os.system("CLS") > time.sleep(5) > print("Starting now!") > while x > 0: > x = x - 1 > os.system("start "+content_join) You're starting up to 35 processes (or possibly more). That's going to slow down your machine. > > time.sleep(10) > os.system("taskkill /f /im chrome.exe") > os.system("start test.py") Now you're repeating the whole procedure (I think). That's going to slow down your machine even more. > sys.exit("restarting") So it looks like your problem is not the fault of Python itself, but due to what you're doing with it. ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 00:24:32 2013 From: report at bugs.python.org (B Maqueira) Date: Tue, 02 Jul 2013 22:24:32 +0000 Subject: [issue15797] bdist_msi does not pass -install/remove flags to install_script In-Reply-To: <1346147472.01.0.0635028414042.issue15797@psf.upfronthosting.co.za> Message-ID: <1372803872.64.0.0842772165669.issue15797@psf.upfronthosting.co.za> B Maqueira added the comment: Hi Eric, Any news/status on this bug? For a use case of this functionality please have a look at a demo I did a while ago at CamPUG (https://github.com/campug/braudel_sample_server). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 01:01:58 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2013 23:01:58 +0000 Subject: [issue3329] API for setting the memory allocator used by Python In-Reply-To: <1215632933.18.0.0332019532518.issue3329@psf.upfronthosting.co.za> Message-ID: <1372806118.46.0.617005489458.issue3329@psf.upfronthosting.co.za> STINNER Victor added the comment: Updated patch (version 9): - update API to the last version of the PEP - PYMEM_DOMAIN_RAW now also have a well defined behaviour when requesting an allocation of zero bytes: PyMem_RawMalloc(0) now calls malloc(1) - enhance the documentation (ex: mention default allocators) - _testcapi checks also that PyMem_RawMalloc(0) is non-NULL ---------- Added file: http://bugs.python.org/file30753/py_setallocators-9.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 01:02:16 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2013 23:02:16 +0000 Subject: [issue3329] API for setting the memory allocator used by Python In-Reply-To: <1215632933.18.0.0332019532518.issue3329@psf.upfronthosting.co.za> Message-ID: <1372806136.62.0.593332656523.issue3329@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file30629/py_setallocators-6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 01:02:19 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2013 23:02:19 +0000 Subject: [issue3329] API for setting the memory allocator used by Python In-Reply-To: <1215632933.18.0.0332019532518.issue3329@psf.upfronthosting.co.za> Message-ID: <1372806139.35.0.839799182235.issue3329@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file30645/py_setallocators-7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 01:02:55 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2013 23:02:55 +0000 Subject: [issue3329] API for setting the memory allocator used by Python In-Reply-To: <1215632933.18.0.0332019532518.issue3329@psf.upfronthosting.co.za> Message-ID: <1372806175.07.0.759781804889.issue3329@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file30653/py_setallocators-8.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 02:47:12 2013 From: report at bugs.python.org (Jonathan) Date: Wed, 03 Jul 2013 00:47:12 +0000 Subject: [issue7292] Multiprocessing Joinable race condition? In-Reply-To: <1257748286.94.0.346139031927.issue7292@psf.upfronthosting.co.za> Message-ID: <1372812432.89.0.297111921658.issue7292@psf.upfronthosting.co.za> Jonathan added the comment: I can't even find the code I was having issues with anymore and I'm not doing anything related to this right now. So, unless Ramchandra can still reproduce this I'm going to say go ahead and close it. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 08:16:51 2013 From: report at bugs.python.org (paul j3) Date: Wed, 03 Jul 2013 06:16:51 +0000 Subject: [issue18349] argparse usage should preserve () in metavars such as range(20) Message-ID: <1372832211.16.0.544648995095.issue18349@psf.upfronthosting.co.za> New submission from paul j3: As discussed in issue 16468, a metavar may be used to provide an alternative representation of a choices option. However if a metvar like 'range(20)' is used, usage formatter strips off the '()'. >>> parser.add_argument('foo', type=int, choices=range(20), metavar='range(0,20)') >>> parser.format_usage() # expect: 'usage: PROG [-h] range(0,20)\n' # actual: 'usage: PROG [-h] range0,20\n' This is done by a line in the help formater that removes excess mutually exclusive group notation: HelpFormatter._format_actions_usage ... text = _re.sub(r'\(([^|]*)\)', r'\1', text) A solution is to change this line to distinguish between a case like ' (...)' and 'range(...)' text = _re.sub(r'( )\(([^|]*)\)', r'\1\2', text) ---------- files: metaparen.patch keywords: patch messages: 192222 nosy: paul.j3 priority: normal severity: normal status: open title: argparse usage should preserve () in metavars such as range(20) Added file: http://bugs.python.org/file30754/metaparen.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 08:19:39 2013 From: report at bugs.python.org (paul j3) Date: Wed, 03 Jul 2013 06:19:39 +0000 Subject: [issue18349] argparse usage should preserve () in metavars such as range(20) In-Reply-To: <1372832211.16.0.544648995095.issue18349@psf.upfronthosting.co.za> Message-ID: <1372832379.32.0.689221085074.issue18349@psf.upfronthosting.co.za> Changes by paul j3 : ---------- components: +Library (Lib) type: -> behavior versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 09:24:14 2013 From: report at bugs.python.org (Dev Player) Date: Wed, 03 Jul 2013 07:24:14 +0000 Subject: [issue13582] IDLE and pythonw.exe stderr problem In-Reply-To: <1323632290.53.0.810720020667.issue13582@psf.upfronthosting.co.za> Message-ID: <1372836254.4.0.429275259278.issue13582@psf.upfronthosting.co.za> Dev Player added the comment: I may be mistaken but I thought, as of not too long ago, that pythonw.exe is no longer needed by current versions. 2.7.5 ---------- nosy: +devplayer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 09:41:02 2013 From: report at bugs.python.org (py.user) Date: Wed, 03 Jul 2013 07:41:02 +0000 Subject: [issue18206] license url in site.py should always use X.Y.Z form of version number In-Reply-To: <1371162560.09.0.685782864566.issue18206@psf.upfronthosting.co.za> Message-ID: <1372837262.46.0.640209637084.issue18206@psf.upfronthosting.co.za> Changes by py.user : Added file: http://bugs.python.org/file30755/issue18206_test.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 11:06:04 2013 From: report at bugs.python.org (Frankie Jhou) Date: Wed, 03 Jul 2013 09:06:04 +0000 Subject: [issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express In-Reply-To: <1260858478.84.0.495655867168.issue7511@psf.upfronthosting.co.za> Message-ID: <1372842364.41.0.865723190049.issue7511@psf.upfronthosting.co.za> Frankie Jhou added the comment: Microsoft using Visual Studio 2012 (VC 11.0) now, Errors happened again. I just want to install Cython......... Error: Unable to find vcvarsall.bat ValueError: [u'path', u'include', u'lib'] NameError: name 'KEY_BASE' is not defined KeyError: '9.0' error: command 'cl.exe' failed: No such file or directory ---------- nosy: +Frankie.Jhou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 11:46:24 2013 From: report at bugs.python.org (Berker Peksag) Date: Wed, 03 Jul 2013 09:46:24 +0000 Subject: [issue18338] python --version should send output to STDOUT In-Reply-To: <1372676487.3.0.302989276182.issue18338@psf.upfronthosting.co.za> Message-ID: <1372844784.54.0.285628281195.issue18338@psf.upfronthosting.co.za> Berker Peksag added the comment: Here is a patch with an updated test. The -v flag also sends the output to stderr. Should that be fixed too? See Modules/main.c:678 and Lib/test/test_cmd_line.py:l47 ---------- keywords: +patch nosy: +berker.peksag stage: needs patch -> patch review Added file: http://bugs.python.org/file30756/issue18338.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 12:29:43 2013 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Wed, 03 Jul 2013 10:29:43 +0000 Subject: [issue18350] Python 3 unittest framework broken? Message-ID: <1372847383.07.0.708601555612.issue18350@psf.upfronthosting.co.za> New submission from Bo?tjan Mejak: I fired up the test suite runtests.py of wxPython Phoenix and I get this: File "C:\Program Files\Python 3.3.2\lib\unittest\runner.py", line 63, in addSuccess self.stream.write('.') TypeError: 'str' does not support the buffer interface Can you confirm whether this is a bug in the unittest framework on the Python side or in the wxPython Phoenix source code side? ---------- components: Tests messages: 192226 nosy: bostjan.mejak priority: normal severity: normal status: open title: Python 3 unittest framework broken? type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 12:31:07 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 03 Jul 2013 10:31:07 +0000 Subject: [issue7292] Multiprocessing Joinable race condition? In-Reply-To: <1257748286.94.0.346139031927.issue7292@psf.upfronthosting.co.za> Message-ID: <1372847467.38.0.454672120205.issue7292@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- resolution: -> works for me stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 12:32:37 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Jul 2013 10:32:37 +0000 Subject: [issue18347] ElementTree corrupts cAse of closing tags when html method is specified In-Reply-To: <1372786299.24.0.986452564327.issue18347@psf.upfronthosting.co.za> Message-ID: <1372847557.69.0.407204048117.issue18347@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. Please add a reference to this issue in the test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 12:36:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Jul 2013 10:36:58 +0000 Subject: [issue18338] python --version should send output to STDOUT In-Reply-To: <1372676487.3.0.302989276182.issue18338@psf.upfronthosting.co.za> Message-ID: <1372847818.54.0.53344186487.issue18338@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 13:02:34 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 03 Jul 2013 11:02:34 +0000 Subject: [issue18350] Python 3 unittest framework broken? In-Reply-To: <1372847383.07.0.708601555612.issue18350@psf.upfronthosting.co.za> Message-ID: <1372849354.42.0.243192626411.issue18350@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: wxPython tests override unittest.TextTestRunner: self.stream = unittest.runner._WritelnDecorator(BytesIO()) Using bytes is wrong. Output stream should be a text file. ---------- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 13:37:25 2013 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Wed, 03 Jul 2013 11:37:25 +0000 Subject: [issue18350] Python 3 unittest framework broken? In-Reply-To: <1372847383.07.0.708601555612.issue18350@psf.upfronthosting.co.za> Message-ID: <1372851445.39.0.860060915674.issue18350@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: So how exactly can this critical line of code (that you posted) be fixed to make running wxPython Phoenix tests work? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 13:53:11 2013 From: report at bugs.python.org (Mark Kubacki) Date: Wed, 03 Jul 2013 11:53:11 +0000 Subject: [issue5639] Support TLS SNI extension in ssl module In-Reply-To: <1238567905.09.0.139467917453.issue5639@psf.upfronthosting.co.za> Message-ID: <1372852391.31.0.318336899613.issue5639@psf.upfronthosting.co.za> Changes by Mark Kubacki : Added file: http://bugs.python.org/file30757/python-2.7.5-tlssni.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 13:58:19 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 03 Jul 2013 11:58:19 +0000 Subject: [issue18350] Python 3 unittest framework broken? In-Reply-To: <1372847383.07.0.708601555612.issue18350@psf.upfronthosting.co.za> Message-ID: <1372852699.75.0.0796039701316.issue18350@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This is an issue with wxPython, please report this issue to the wxPython team. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 13:58:44 2013 From: report at bugs.python.org (Jens Timmerman) Date: Wed, 03 Jul 2013 11:58:44 +0000 Subject: [issue4130] Intel icc 9.1 does not support __int128_t used by ctypes In-Reply-To: <1224103336.6.0.753228794094.issue4130@psf.upfronthosting.co.za> Message-ID: <1372852724.75.0.961544562598.issue4130@psf.upfronthosting.co.za> Jens Timmerman added the comment: I believe this pull request fixed this upstream (it did for me) https://github.com/atgreen/libffi/pull/43 I fixed this by including "xmmintrin.h" instead of switching to reg_args->sse[ssecount].m (as per http://software.intel.com/en-us/forums/topic/303826 ) ---------- nosy: +Jens.Timmerman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 14:05:45 2013 From: report at bugs.python.org (Mark Kubacki) Date: Wed, 03 Jul 2013 12:05:45 +0000 Subject: [issue5639] Support TLS SNI extension in ssl module In-Reply-To: <1238567905.09.0.139467917453.issue5639@psf.upfronthosting.co.za> Message-ID: <1372853145.58.0.904209720543.issue5639@psf.upfronthosting.co.za> Mark Kubacki added the comment: Python 2.7 is still used in production. Given the scarcity of IPv4-addresses ? and with CDNs (think: Amazon, Akamai, EdgeCast?) starting to offer HTTP+SSL ? the need for SNI arises in order to avoid pitfalls such as shared certificates. The lack of ubiquitous support for TLS SNI could cause delays in HTTPS-everywhere?deployments. Therefore, in the light of the latest revelations about mass surveillance, I'd like even to argue that this is a matter of security and privacy. ---------- nosy: +markk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 14:10:04 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Jul 2013 12:10:04 +0000 Subject: [issue5639] Support TLS SNI extension in ssl module In-Reply-To: <1372853145.58.0.904209720543.issue5639@psf.upfronthosting.co.za> Message-ID: <1871524188.137922603.1372853397890.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: Mark, thanks for the patch. However, unless exceptional situations, we don't backport features to bugfix branches. The next Python 2.7 version will probably not be released before 2014, so even if your patch were integrated, widespread deployment would still be delayed significantly. By contrast, Python 3.2 has SNI support and it was released in February 2011. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 14:38:09 2013 From: report at bugs.python.org (Mark Kubacki) Date: Wed, 03 Jul 2013 12:38:09 +0000 Subject: [issue5639] Support TLS SNI extension in ssl module In-Reply-To: <1238567905.09.0.139467917453.issue5639@psf.upfronthosting.co.za> Message-ID: <1372855089.82.0.137926432674.issue5639@psf.upfronthosting.co.za> Mark Kubacki added the comment: Antoine, thank you for the heads-up. As long as I've reminded distribution maintainers of this issue and this or a similar patch (always send a server_hostname with TLS, if one is missing) will be integrated (please do!) I've accomplished my goal. BTW, today I've encountered a similar certificate. Semper aliquid haeret: subjectAltName=DNS:cdn.cloudtop.org,DNS:barely-legal-spam.com,DNS:*.banging-ham.com,DNS:jimmyforcongress2014.com ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 14:43:12 2013 From: report at bugs.python.org (Mark Kubacki) Date: Wed, 03 Jul 2013 12:43:12 +0000 Subject: [issue16113] Add SHA-3 (Keccak) support In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1372855392.8.0.1217033147.issue16113@psf.upfronthosting.co.za> Changes by Mark Kubacki : ---------- nosy: +markk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 14:44:53 2013 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 03 Jul 2013 12:44:53 +0000 Subject: [issue18286] Python 3.3 - Slowing down computer In-Reply-To: <1371928488.87.0.904340213253.issue18286@psf.upfronthosting.co.za> Message-ID: <1372855493.61.0.909698870987.issue18286@psf.upfronthosting.co.za> Ramchandra Apte added the comment: The problem is with OP's code; not Python. Please close this bug as invalid. OP can ask on the Python mailing list to fix his code. ---------- nosy: +Ramchandra Apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 15:11:12 2013 From: report at bugs.python.org (Brett Cannon) Date: Wed, 03 Jul 2013 13:11:12 +0000 Subject: [issue18351] Incorrect variable name in importlib._bootstrap._get_sourcefile Message-ID: <1372857072.23.0.433996899216.issue18351@psf.upfronthosting.co.za> New submission from Brett Cannon: http://hg.python.org/cpython/file/8e838598eed1/Lib/importlib/_bootstrap.py#l455 : source_stats does not exist and instead should be source_path. ---------- assignee: brett.cannon components: IO messages: 192237 nosy: brett.cannon priority: normal severity: normal stage: test needed status: open title: Incorrect variable name in importlib._bootstrap._get_sourcefile type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 15:57:27 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Jul 2013 13:57:27 +0000 Subject: [issue18286] Python 3.3 - Slowing down computer In-Reply-To: <1371928488.87.0.904340213253.issue18286@psf.upfronthosting.co.za> Message-ID: <1372859847.46.0.772860845968.issue18286@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 16:02:10 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 03 Jul 2013 14:02:10 +0000 Subject: [issue13582] IDLE and pythonw.exe stderr problem In-Reply-To: <1323632290.53.0.810720020667.issue13582@psf.upfronthosting.co.za> Message-ID: <1372860130.01.0.859319758111.issue13582@psf.upfronthosting.co.za> Terry J. Reedy added the comment: No change. pythonw.exe is still present and in use. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 16:43:25 2013 From: report at bugs.python.org (Olivier Gagnon) Date: Wed, 03 Jul 2013 14:43:25 +0000 Subject: [issue18352] collections.Counter with added attributes are not deepcopied properly. Message-ID: <1372862605.72.0.11799816843.issue18352@psf.upfronthosting.co.za> New submission from Olivier Gagnon: The following code shows that the Counter is not deepcopied properly. The same code with an user defined class or a dict is copied with the "b" attribute. import collections import copy count = collections.Counter() count.b = 3 print(count.b) # prints 3 count_copy = copy.deepcopy(count) print(count_copy.b) # raise AttributeError: 'Counter' object has no attribute 'b' ---------- components: Library (Lib) messages: 192239 nosy: Olivier.Gagnon priority: normal severity: normal status: open title: collections.Counter with added attributes are not deepcopied properly. type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 16:43:28 2013 From: report at bugs.python.org (William Schwartz) Date: Wed, 03 Jul 2013 14:43:28 +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: <1372862608.38.0.0810492085096.issue13153@psf.upfronthosting.co.za> William Schwartz added the comment: Looks like this issue is closed, but I got IDLE to crash. On Python 3.3.2, Windows 7, and Tk version 8.5, IDLE crashes when pasting \U0001F382 (Unicode birthday cake character). Below is the version string for the Python I'm running. Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:06:53) [MSC v.1600 64 bit (AMD64)] on win32. According to http://docs.python.org/3.3/whatsnew/changelog.html this issue was fixed in Python 3.3.1 RC 1. Indeed the patch discussed above exists in the cpython 3.3 branch: http://hg.python.org/cpython/file/910ec3471d55/Modules/_tkinter.c. But IDLE still crashes, at least for me. ---------- nosy: +William.Schwartz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 16:49:50 2013 From: report at bugs.python.org (Madison May) Date: Wed, 03 Jul 2013 14:49:50 +0000 Subject: [issue18352] collections.Counter with added attributes are not deepcopied properly. In-Reply-To: <1372862605.72.0.11799816843.issue18352@psf.upfronthosting.co.za> Message-ID: <1372862990.7.0.319174749493.issue18352@psf.upfronthosting.co.za> Changes by Madison May : ---------- nosy: +madison.may _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 16:55:06 2013 From: report at bugs.python.org (Yogesh Chaudhari) Date: Wed, 03 Jul 2013 14:55:06 +0000 Subject: [issue17845] Clarify successful build message In-Reply-To: <1366911874.8.0.692153365711.issue17845@psf.upfronthosting.co.za> Message-ID: <1372863306.19.0.231042132475.issue17845@psf.upfronthosting.co.za> Yogesh Chaudhari added the comment: Patch to modify setup.py comments on successful build ---------- keywords: +patch nosy: +Yogesh.Chaudhari Added file: http://bugs.python.org/file30758/issue17845.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 17:04:18 2013 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Wed, 03 Jul 2013 15:04:18 +0000 Subject: [issue18350] Python 3 unittest framework broken? In-Reply-To: <1372847383.07.0.708601555612.issue18350@psf.upfronthosting.co.za> Message-ID: <1372863858.21.0.584338027576.issue18350@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: By "output stream should be a text file", have you ment the line should be self.stream = unittest.runner._WriteInDecorator(StringIO()) Can you provide me a little hint so that I can make a patch for the wxPython team? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 17:08:35 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Jul 2013 15:08:35 +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: <1372864115.96.0.998167657391.issue13153@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Unfortunately I can't reproduce a crash on Linux. Perhaps this is Windows only issue. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 17:14:48 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 03 Jul 2013 15:14:48 +0000 Subject: [issue18350] Python 3 unittest framework broken? In-Reply-To: <1372847383.07.0.708601555612.issue18350@psf.upfronthosting.co.za> Message-ID: <1372864488.01.0.655093238072.issue18350@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Sorry, this bug tracker is for core Python only. Please discuss this issue on wxPython-dev mailing list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 17:58:51 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Jul 2013 15:58:51 +0000 Subject: [issue18352] collections.Counter with added attributes are not deepcopied properly. In-Reply-To: <1372862605.72.0.11799816843.issue18352@psf.upfronthosting.co.za> Message-ID: <1372867131.69.0.784705949828.issue18352@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a preliminary patch. It changes copying and pickling to preserve instance attributes. Actually I'm not sure which attributes should be copied. I doubt -- should this be considered as a fix or as a new feature? Perhaps OrderedDict should be changed in same way. ---------- keywords: +patch nosy: +rhettinger, serhiy.storchaka stage: -> patch review versions: +Python 3.4 -Python 3.3 Added file: http://bugs.python.org/file30759/counter_copy_attrs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 19:24:13 2013 From: report at bugs.python.org (Olivier Hervieu) Date: Wed, 03 Jul 2013 17:24:13 +0000 Subject: [issue18033] Example for Profile Module shows incorrect method In-Reply-To: <1369235558.14.0.532987051887.issue18033@psf.upfronthosting.co.za> Message-ID: <1372872253.22.0.486435776092.issue18033@psf.upfronthosting.co.za> Olivier Hervieu added the comment: Here is a fixed version for python2.7. Using StringIO instead of io module fixes the problem pointed by Ezio. The print_stats method dumps the stats either on sys.stdout if `Stats` class is declared without a stream specification or in the given stream parameter (the name print_stats may be a bit misleading). ---------- nosy: +ohe Added file: http://bugs.python.org/file30760/issue18033_py2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 19:43:07 2013 From: report at bugs.python.org (Wolf Ihlenfeldt) Date: Wed, 03 Jul 2013 17:43:07 +0000 Subject: [issue18353] PyUnicode_WRITE_CHAR macro definition missing Message-ID: <1372873387.67.0.379053408423.issue18353@psf.upfronthosting.co.za> New submission from Wolf Ihlenfeldt: Above macro is mentioned in the documentation (3.3.2), but does not appear in the header files. Associated function PyUnicode_WriteChar() is present and works as expected. ---------- assignee: docs at python components: Documentation, Unicode messages: 192247 nosy: Wolf.Ihlenfeldt, docs at python, ezio.melotti priority: normal severity: normal status: open title: PyUnicode_WRITE_CHAR macro definition missing type: compile error versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 19:51:48 2013 From: report at bugs.python.org (Eric Snow) Date: Wed, 03 Jul 2013 17:51:48 +0000 Subject: [issue18352] collections.Counter with added attributes are not deepcopied properly. In-Reply-To: <1372862605.72.0.11799816843.issue18352@psf.upfronthosting.co.za> Message-ID: <1372873908.09.0.0453236837366.issue18352@psf.upfronthosting.co.za> Eric Snow added the comment: OrderedDict already copies the instance dict in __reduce__(). Are you talking about something more than that? ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 20:02:52 2013 From: report at bugs.python.org (Mark Kubacki) Date: Wed, 03 Jul 2013 18:02:52 +0000 Subject: [issue16692] Support TLS 1.1 and TLS 1.2 In-Reply-To: <1355592665.89.0.539973629387.issue16692@psf.upfronthosting.co.za> Message-ID: <1372874572.24.0.885789483186.issue16692@psf.upfronthosting.co.za> Mark Kubacki added the comment: Raw backport for Python 2.7. ?raw? like in some options are in _ssl only. (_ssl.{err_names_to_codes,err_codes_to_names,lib_codes_to_names,?}) ---------- nosy: +markk Added file: http://bugs.python.org/file30761/python-2.7.5-tls1.1-and-tls1.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 20:03:54 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Jul 2013 18:03:54 +0000 Subject: [issue16692] Support TLS 1.1 and TLS 1.2 In-Reply-To: <1355592665.89.0.539973629387.issue16692@psf.upfronthosting.co.za> Message-ID: <1372874634.86.0.669240159761.issue16692@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ha. If you're insisting on backporting SSL stuff, I think the best option would be to create a third-party backport of the whole ssl module on PyPI. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 20:47:14 2013 From: report at bugs.python.org (Daniel Holth) Date: Wed, 03 Jul 2013 18:47:14 +0000 Subject: [issue18354] http://www.python.org/doc/ has outdated note Message-ID: <1372877234.32.0.505544665385.issue18354@psf.upfronthosting.co.za> New submission from Daniel Holth: Please remove the note. Note A new documentation project, which will be merged into the Python documentation soon, covers creating, installing and distributing Python packages: The Hitchhiker's Guide to Packaging (creating and distributing Python packages) ---------- assignee: docs at python components: Documentation messages: 192251 nosy: dholth, docs at python priority: normal severity: normal status: open title: http://www.python.org/doc/ has outdated note type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 21:40:33 2013 From: report at bugs.python.org (paul j3) Date: Wed, 03 Jul 2013 19:40:33 +0000 Subject: [issue16933] argparse: remove magic from examples In-Reply-To: <1357911858.69.0.0703193383433.issue16933@psf.upfronthosting.co.za> Message-ID: <1372880433.85.0.0356822980916.issue16933@psf.upfronthosting.co.za> paul j3 added the comment: There still is one "choices='XYZ'" example (16.4.5.1. Sub-commands) but the focus isn't on choices. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 21:40:59 2013 From: report at bugs.python.org (Brian Curtin) Date: Wed, 03 Jul 2013 19:40:59 +0000 Subject: [issue18354] http://www.python.org/doc/ has outdated note In-Reply-To: <1372877234.32.0.505544665385.issue18354@psf.upfronthosting.co.za> Message-ID: <1372880459.58.0.0787148162259.issue18354@psf.upfronthosting.co.za> Brian Curtin added the comment: Can you say why? ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 22:06:52 2013 From: report at bugs.python.org (paul j3) Date: Wed, 03 Jul 2013 20:06:52 +0000 Subject: [issue16977] argparse: mismatch between choices parsing and usage/error message In-Reply-To: <1358303407.58.0.0453921356618.issue16977@psf.upfronthosting.co.za> Message-ID: <1372882012.91.0.445422368597.issue16977@psf.upfronthosting.co.za> paul j3 added the comment: test_argparse.py has some "choices='abc'" cases. In those should "parser.parse_args(['--foo','bc'])" be considered a success or failure? The underlying issue here is that while string iteration behaves like list iteration, string __contains__ looks for substrings, not just one character that matches. (String __contains__ also returns a TypeError if its argument is not a string.) But other than removing poor examples in documentation and tests, I'm not sure this issue requires a change. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 22:46:27 2013 From: report at bugs.python.org (David Edelsohn) Date: Wed, 03 Jul 2013 20:46:27 +0000 Subject: [issue11185] test_wait4 error on AIX In-Reply-To: <1297424402.38.0.348928652961.issue11185@psf.upfronthosting.co.za> Message-ID: <1372884387.61.0.544404672865.issue11185@psf.upfronthosting.co.za> David Edelsohn added the comment: The patch in msg128727 is correct for AIX and should be applied. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 22:49:34 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Jul 2013 20:49:34 +0000 Subject: [issue18352] collections.Counter with added attributes are not deepcopied properly. In-Reply-To: <1372862605.72.0.11799816843.issue18352@psf.upfronthosting.co.za> Message-ID: <1372884574.42.0.790068480121.issue18352@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I mean OrderedDict.copy(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 23:03:01 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jul 2013 21:03:01 +0000 Subject: [issue16463] test_timeout failure on the RHEL buildbot In-Reply-To: <1352757217.25.0.912881014186.issue16463@psf.upfronthosting.co.za> Message-ID: <1372885381.54.0.192853431555.issue16463@psf.upfronthosting.co.za> STINNER Victor added the comment: The failure still occurs on different buildbots. Another example: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%20dtrace%203.3/builds/711/steps/test/logs/stdio ====================================================================== FAIL: testConnectTimeout (test.test_timeout.TCPTimeoutTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.3.koobs-freebsd/build/Lib/test/test_timeout.py", line 222, in testConnectTimeout self._sock_operation(1, 0.001, 'connect', self.addr_remote) File "/usr/home/buildbot/python/3.3.koobs-freebsd/build/Lib/test/test_timeout.py", line 126, in _sock_operation self.assertLess(delta, timeout + self.fuzz) AssertionError: 5.352813243865967 not less than 2.001 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 23:36:35 2013 From: report at bugs.python.org (paul j3) Date: Wed, 03 Jul 2013 21:36:35 +0000 Subject: [issue9625] argparse: Problem with defaults for variable nargs when using choices In-Reply-To: <1282036744.37.0.964764969496.issue9625@psf.upfronthosting.co.za> Message-ID: <1372887395.2.0.838668912886.issue9625@psf.upfronthosting.co.za> paul j3 added the comment: Change "choices='abc'" to "choices=['a', 'b', 'c']", as discussed in issue 16977 (use of string choices is a bad example) ---------- Added file: http://bugs.python.org/file30762/issue9625_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 23:53:23 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jul 2013 21:53:23 +0000 Subject: [issue18308] checkRecvmsgAddress wrong in test_socket.py (AIX failures) In-Reply-To: <1372261030.27.0.471709034157.issue18308@psf.upfronthosting.co.za> Message-ID: <1372888403.45.0.73375467835.issue18308@psf.upfronthosting.co.za> STINNER Victor added the comment: "The scope_id in the original bind call defaults to "0", which represents an ambiguous scoped address and allows the IPV6 protocol and implementation to choose the interface or site identifier." Ok, so here is a patch using scope_id=1 to get a reliable IPv6 address. Can you please try it on AIX? ---------- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file30763/scope_id.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 00:27:54 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 03 Jul 2013 22:27:54 +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: <1372890474.37.0.197427185996.issue13153@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I verified problem continuing problem windows. There is only a 'crash' when running under pythonw, which does not happenon linux, as far as I know. When running on a console, the error traceback is the same as in msg145581 (with line numbers altered). Changing some ValueError to a TclError did not affect either UnicodeDecodeError or the problem of error reports crashing Idle because there is no stderr to send them to. This type of crash is a generic problem addressed by #13582. The solution to that would solve the crash part of this issue, but not the message. I would like to see the 2.x message, possibly improved. Perhaps we should resurrect the 2.x codec for processing text pasted into the shell. As for text windows, # -*- coding: utf-8 -*- print('?') # ???? which is not good either. ---------- resolution: fixed -> versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 01:08:38 2013 From: report at bugs.python.org (Eric Snow) Date: Wed, 03 Jul 2013 23:08:38 +0000 Subject: [issue18342] Use the repr of a module name for ModuleNotFoundError in ceval.c In-Reply-To: <1372696430.42.0.571776913898.issue18342@psf.upfronthosting.co.za> Message-ID: <1372892918.12.0.58674495921.issue18342@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 02:44:56 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 04 Jul 2013 00:44:56 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1372898696.46.0.320373589634.issue15767@psf.upfronthosting.co.za> Eric Snow added the comment: > I'm sorry, but this seems like it should be an importlib internal > affair. The new exception is too much in everyone's face, because > the exception name gets printed on every traceback. That's the crux of the issue. If there isn't much utility outside importlib to distinguishing between module-not-found and other causes of ImportError, then there isn't much point to a new exception. It just boils down to what the other potential causes of ImportError are and how much people care about them. I keep thinking about PEP 3151 (IOError/OSError hierarchy rework) and the lessons we've learned about exception attributes vs. subclasses. For readability and write-ability, I'd rather write this: try: from _collections import OrderedDict except ModuleNotFoundError: pass than this: try: from _collections import OrderedDict except ImportError as e: if e.reason is not importlib.machinery.ImportReason.MODULE_NOT_FOUND: raise But the relevant question is, what is the benefit (outside importlib) of either over this: try: from _collections import OrderedDict except ImportError: pass ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 03:26:40 2013 From: report at bugs.python.org (Russkel) Date: Thu, 04 Jul 2013 01:26:40 +0000 Subject: [issue18355] Merge super() guide into documentation Message-ID: <1372901200.41.0.725969821731.issue18355@psf.upfronthosting.co.za> New submission from Russkel: When looking for documentation on the correct usage on super (http://docs.python.org/2/library/functions.html?highlight=super#super), the documentation links to this rather will written blog post http://rhettinger.wordpress.com/2011/05/26/super-considered-super/ by Mr. Hettinger. I think there is value in merging that blog post into a HOWTO and including in the official documentation. I'm more than willing to create a patch if this is considered a good idea. ---------- assignee: docs at python components: Documentation messages: 192262 nosy: Russkel, docs at python, rhettinger priority: normal severity: normal status: open title: Merge super() guide into documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 04:09:54 2013 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 04 Jul 2013 02:09:54 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1372903794.6.0.85017254048.issue15767@psf.upfronthosting.co.za> Guido van Rossum added the comment: Right. Outside importlib there shouldn't be a need to distinguish between the cases (especially given that the exception works differently than its name suggests). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 04:13:42 2013 From: report at bugs.python.org (David Edelsohn) Date: Thu, 04 Jul 2013 02:13:42 +0000 Subject: [issue18308] checkRecvmsgAddress wrong in test_socket.py (AIX failures) In-Reply-To: <1372261030.27.0.471709034157.issue18308@psf.upfronthosting.co.za> Message-ID: <1372904022.17.0.0545127815287.issue18308@psf.upfronthosting.co.za> David Edelsohn added the comment: The patch in msg192259 probably will work on the particular AIX system runnnig the buildbot, but I do not believe that the patch is the correct solution for the problem. scope_id 1 is not necessarily the correct link for IPv6 address ::1. The scope_id values are system dependent and the result could be any value depending on the interfaces available on the particular system running the test. scope_id 1 might not exist on the system, and forcing that value would generate an error. I think the safest solution is not to compare scope_id when comparing addresses. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 04:14:23 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 04 Jul 2013 02:14:23 +0000 Subject: [issue16251] pickle special methods are looked up on the instance rather than the type In-Reply-To: <1350411894.01.0.763638555345.issue16251@psf.upfronthosting.co.za> Message-ID: <1372904063.72.0.712257055167.issue16251@psf.upfronthosting.co.za> Eric Snow added the comment: > I think you are overreacting. Yeah, maybe so. :) I just found the problem I ran into to be really hard to diagnose due to how pickle does lookup, and figured it would be worth addressing to save someone else the same headache later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 04:23:30 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Jul 2013 02:23:30 +0000 Subject: [issue18341] enhancements zlib.compress/decompress to accept Py_buffer In-Reply-To: <1372693962.8.0.934834831388.issue18341@psf.upfronthosting.co.za> Message-ID: <1372904610.37.0.331069980605.issue18341@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: This is not a bugfix, but a new feature, and 2.7 is closed for new features. Sorry. If you think the closing of this bug report is a mistake, reopen with your argument. ---------- nosy: +jcea resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 04:37:51 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 04 Jul 2013 02:37:51 +0000 Subject: [issue18093] Move main functions to a separate Programs directory In-Reply-To: <1369828290.2.0.750301008205.issue18093@psf.upfronthosting.co.za> Message-ID: <1372905471.95.0.246611542555.issue18093@psf.upfronthosting.co.za> Eric Snow added the comment: Looks good to me. What else needs to be done in this area that will help with work on PEP 432? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 05:32:17 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 04 Jul 2013 03:32:17 +0000 Subject: [issue18093] Move main functions to a separate Programs directory In-Reply-To: <1369828290.2.0.750301008205.issue18093@psf.upfronthosting.co.za> Message-ID: <1372908737.17.0.911401196615.issue18093@psf.upfronthosting.co.za> Eric Snow added the comment: What about Modules/main.c? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 06:29:41 2013 From: report at bugs.python.org (Ramchandra Apte) Date: Thu, 04 Jul 2013 04:29:41 +0000 Subject: [issue18338] python --version should send output to STDOUT In-Reply-To: <1372844784.54.0.285628281195.issue18338@psf.upfronthosting.co.za> Message-ID: Ramchandra Apte added the comment: On 3 July 2013 15:16, Berker Peksag wrote: > > Berker Peksag added the comment: > > Here is a patch with an updated test. > > The -v flag also sends the output to stderr. Should that be fixed too? See > Modules/main.c:678 and Lib/test/test_cmd_line.py:l47 > > ---------- > keywords: +patch > nosy: +berker.peksag > stage: needs patch -> patch review > Added file: http://bugs.python.org/file30756/issue18338.diff > > No, -v is for debugging purposes and should go to stderr IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 06:30:25 2013 From: report at bugs.python.org (Ramchandra Apte) Date: Thu, 04 Jul 2013 04:30:25 +0000 Subject: [issue18338] python --version should send output to STDOUT In-Reply-To: <1372847818.54.0.53344186487.issue18338@psf.upfronthosting.co.za> Message-ID: Ramchandra Apte added the comment: No, I think that On 3 July 2013 16:06, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > LGTM. > > ---------- > nosy: +serhiy.storchaka > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 06:35:00 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 04 Jul 2013 04:35:00 +0000 Subject: [issue18266] Fix test discovery for test_largefile.py In-Reply-To: <1371675654.81.0.262540951411.issue18266@psf.upfronthosting.co.za> Message-ID: <1372912500.36.0.0118074671055.issue18266@psf.upfronthosting.co.za> Zachary Ware added the comment: Here's a stab at fixing that issue. It works, but I don't know that it's the best solution. This patch converts test_seek into setUp, and attempts to make sure the test file is in the same state at the beginning of each test, with a new tearDownClass removing the file after each implementation has been tested. setUp also tries not to recreate the file from scratch each time, as doing so would make the test take an unreasonably long time on Windows (currently the test takes around 5 minutes on my Windows 7 machine, creating the file twice. I have not yet tested this patch on Windows, but should be able to before Saturday). With this change, load_tests has been removed, and the Py/C test subclasses are created manually. Since this has moved from strictly test discovery fixes to a bit more of a refactor, I made a few other minor changes as well. I removed the verbose prints and wrapped a couple of long lines, changed the filesystem test (which is now in setUpModule) to remove its test file, and fixed a couple of comments. Also, I removed 'oldhandler' from the issue490453 fix (since it was unused and only served to confuse me until I did some research on it), though I suppose if preferred, it could be saved to reset the signal handler at the end of the run. Either way, that whole fix was also moved into setUpModule with other setup code. This patch is against 3.3; it does not apply cleanly to default due to a conflict between IOError and OSError in two places. It should merge forward fine, though. ---------- Added file: http://bugs.python.org/file30764/test_largefile_discovery.v2-3.3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 07:30:20 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 04 Jul 2013 05:30:20 +0000 Subject: [issue17767] Fix test discovery for test_locale.py In-Reply-To: <1366141872.94.0.252098297991.issue17767@psf.upfronthosting.co.za> Message-ID: <1372915820.73.0.339173230605.issue17767@psf.upfronthosting.co.za> Zachary Ware added the comment: Here's a new patch addressing Serhiy's Rietveld comment. This patch also includes the addition of 'flush=True' to the verbose print in BaseLocalizedTest.setUp to make output look a little nicer. ---------- Added file: http://bugs.python.org/file30765/test_locale_discovery.v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 07:30:47 2013 From: report at bugs.python.org (paul j3) Date: Thu, 04 Jul 2013 05:30:47 +0000 Subject: [issue16468] argparse only supports iterable choices In-Reply-To: <1352867539.71.0.970228461518.issue16468@psf.upfronthosting.co.za> Message-ID: <1372915847.71.0.841734611143.issue16468@psf.upfronthosting.co.za> paul j3 added the comment: I'd suggest not worrying about the default metavar in the _expand_help() method. The formatted choice string created in that method is only used if the help line includes a '%(choices)s' string. The programmer can easily omit that if he isn't happy with the expanded list. TestHelpVariableExpansion is the only test in test_argparse.py that uses it. Sig('--foo', choices=['a', 'b', 'c'], help='foo %(prog)s %(default)s %(choices)s') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 08:35:18 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 04 Jul 2013 06:35:18 +0000 Subject: [issue18181] super vs. someclass.__getattribute__ In-Reply-To: <1370870153.93.0.646087371852.issue18181@psf.upfronthosting.co.za> Message-ID: <1372919718.57.0.683692400287.issue18181@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Updated version of the patch, with some semantic changes and tests for the Python level API. Known issues: * Patches uses tabs for indentation * No tests for the C level API * I don't like implementation of slot_tp_getattro_super ---------- Added file: http://bugs.python.org/file30766/issue-18181-poc-v4.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 08:35:45 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 04 Jul 2013 06:35:45 +0000 Subject: [issue18181] super vs. someclass.__getattribute__ In-Reply-To: <1370870153.93.0.646087371852.issue18181@psf.upfronthosting.co.za> Message-ID: <1372919745.65.0.303652723337.issue18181@psf.upfronthosting.co.za> Changes by Ronald Oussoren : Removed file: http://bugs.python.org/file30555/issue-18181-poc-v3.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 08:35:55 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 04 Jul 2013 06:35:55 +0000 Subject: [issue18181] super vs. someclass.__getattribute__ In-Reply-To: <1370870153.93.0.646087371852.issue18181@psf.upfronthosting.co.za> Message-ID: <1372919755.93.0.769207214205.issue18181@psf.upfronthosting.co.za> Changes by Ronald Oussoren : Removed file: http://bugs.python.org/file30546/issue-18181-poc.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 08:36:05 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 04 Jul 2013 06:36:05 +0000 Subject: [issue18181] super vs. someclass.__getattribute__ In-Reply-To: <1370870153.93.0.646087371852.issue18181@psf.upfronthosting.co.za> Message-ID: <1372919765.76.0.185686204243.issue18181@psf.upfronthosting.co.za> Changes by Ronald Oussoren : Removed file: http://bugs.python.org/file30528/supers.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 08:36:12 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 04 Jul 2013 06:36:12 +0000 Subject: [issue18181] super vs. someclass.__getattribute__ In-Reply-To: <1370870153.93.0.646087371852.issue18181@psf.upfronthosting.co.za> Message-ID: <1372919772.75.0.40724290073.issue18181@psf.upfronthosting.co.za> Changes by Ronald Oussoren : Removed file: http://bugs.python.org/file30556/super-hook-proposal.rst _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 08:37:04 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 04 Jul 2013 06:37:04 +0000 Subject: [issue18181] super vs. someclass.__getattribute__ In-Reply-To: <1370870153.93.0.646087371852.issue18181@psf.upfronthosting.co.za> Message-ID: <1372919824.84.0.524042437167.issue18181@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Also updated the draft PEP text ---------- Added file: http://bugs.python.org/file30767/super-hook-proposal.rst _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 09:55:20 2013 From: report at bugs.python.org (Michelle Arzul) Date: Thu, 04 Jul 2013 07:55:20 +0000 Subject: [issue18356] help(numpy) causes segfault on exit Message-ID: <1372924520.77.0.111539946992.issue18356@psf.upfronthosting.co.za> New submission from Michelle Arzul: As far as we could tell this bug is only consistently reproducible on Ubuntu 13.04. A line in pydoc.py causes a segfault when help(numpy) (no other libraries that I know of) exits. The offending method is pipepager(). For a full trackdown and workaround of the problem see http://stackoverflow.com/questions/17344974/python-helpnumpy-causes-segfault-on-exit ---------- assignee: docs at python components: Documentation messages: 192276 nosy: Leeward, docs at python priority: normal severity: normal status: open title: help(numpy) causes segfault on exit type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 09:56:08 2013 From: report at bugs.python.org (=?utf-8?q?Mathias_Fr=C3=B6hlich?=) Date: Thu, 04 Jul 2013 07:56:08 +0000 Subject: [issue18309] Make python slightly more relocatable In-Reply-To: <1372262450.0.0.792872111515.issue18309@psf.upfronthosting.co.za> Message-ID: <1372924568.49.0.260243772919.issue18309@psf.upfronthosting.co.za> Mathias Fr?hlich added the comment: Hi Ronald, Eric, Nick, Looking up the symbol name of the current function should work also. And I am free to rename these functions to whatever you like. Attached is version 2 of the patch with the suggested changes. The windows implementation is still untested. It would be interesting to know if this kind of lookup scheme can be included into PEP 432. Provided the spirit of this PEP, I can imagine to provide several functions to build up the pythonpath starting from something. So say, have a 'get python path from argv[0]', a 'get python path from shared python library' and a 'get python path from prefix' function (I may miss a variant). Also a 'build python path from python home root entry point' function would be useful and could be used by the above functions. An application embedding python can then call those functions that are sensible for its own use and installation scheme to set the module path in the PyConfig struct. The Py_ReadConfig function will internally use the above suggested functions to build up the default configuration if not already provided. Greetings Mathias ---------- Added file: http://bugs.python.org/file30768/python-relative-path-lookup-v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 10:07:29 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 04 Jul 2013 08:07:29 +0000 Subject: [issue18356] help(numpy) causes segfault on exit In-Reply-To: <1372924520.77.0.111539946992.issue18356@psf.upfronthosting.co.za> Message-ID: <1372925249.84.0.0575598692012.issue18356@psf.upfronthosting.co.za> Christian Heimes added the comment: Please provide more information about your setup. Not everybody has access to a Ubuntu 13.04 box * exact Python version * NumPy version * platform (X86, X86_64, ARM) * Kernel, libc and compiler version are useful, too * terminal application * environment variables (output of ``export``, you may want to strip sensible values like DBus address). Especially TERM, PAGER and all LESS* variables are of interest. ---------- components: +Library (Lib) -Documentation nosy: +christian.heimes versions: +3rd party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 10:33:28 2013 From: report at bugs.python.org (Michelle Arzul) Date: Thu, 04 Jul 2013 08:33:28 +0000 Subject: [issue18356] help(numpy) causes segfault on exit In-Reply-To: <1372924520.77.0.111539946992.issue18356@psf.upfronthosting.co.za> Message-ID: <1372926808.36.0.949981821048.issue18356@psf.upfronthosting.co.za> Michelle Arzul added the comment: I'm no expert, I just found the bug... but I'll try my best. * exact Python version: 2.7.4 (GCC 4.7.3) * NumPy version: 1.7.1 * platform (X86, X86_64, ARM): i686 * Kernel: Linux 3.8.0-25-generic #37-Ubuntu SMP Thu Jun 6 20:47:30 UTC 2013 i686 i686 i686 GNU/Linux * libc: ldd (Ubuntu EGLIBC 2.17-0ubuntu5) 2.17 * compiler: gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1) * terminal application: not sure what you mean * environment variables: TERM="xterm" (PAGER is not present) LESSCLOSE="/usr/bin/lesspipe %s %s" LESSOPEN="| /usr/bin/lesspipe %s" If you need anything else please let me know. ---------- components: +Documentation -Library (Lib) versions: -3rd party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 11:18:42 2013 From: report at bugs.python.org (Paul) Date: Thu, 04 Jul 2013 09:18:42 +0000 Subject: [issue18291] codecs.open interprets space as line ends In-Reply-To: <1372079472.71.0.230881178227.issue18291@psf.upfronthosting.co.za> Message-ID: <1372929522.34.0.222432057592.issue18291@psf.upfronthosting.co.za> Paul added the comment: Right, #7643 indeed seems to be exactly about the issue I described here (for as much as I know unicode which isn't all that much). So maybe they should be merged. The issue was closed March 2010, is that after 2.7.3 was released? By the way, where I wrote \x12, \x13, \x14, and \x15, I should have written \x1c, \x1d, \x1e, \x1f (the hex representation of characters 28 to 31). Lost in translation, I guess. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 11:19:39 2013 From: report at bugs.python.org (Sergey) Date: Thu, 04 Jul 2013 09:19:39 +0000 Subject: [issue18305] [patch] Fast sum() for non-numbers In-Reply-To: <1372228439.5.0.789865081817.issue18305@psf.upfronthosting.co.za> Message-ID: <1372929579.22.0.846067112129.issue18305@psf.upfronthosting.co.za> Sergey added the comment: This patch implements another solution to the same bug. But instead of changing default code it adds a special case optimization for lists, tuples and strings, similar to those two special cases for numbers, that are already there. === Lists === No patch: $ ./python -mtimeit --setup="x=[[1,2,3]]*10000" "sum(x,[])" 10 loops, best of 3: 885 msec per loop fastsum.patch: $ ./python -mtimeit --setup="x=[[1,2,3]]*10000" "sum(x,[])" 1000 loops, best of 3: 524 usec per loop fastsum-special.patch: $ ./python -mtimeit --setup="x=[[1,2,3]]*10000" "sum(x,[])" 1000 loops, best of 3: 298 usec per loop Result: 3000 times faster. === Tuples === No patch: $ ./python -mtimeit --setup="x=[(1,2,3)]*10000" "sum(x,())" 10 loops, best of 3: 585 msec per loop fastsum.patch: $ ./python -mtimeit --setup="x=[(1,2,3)]*10000" "sum(x,())" 10 loops, best of 3: 585 msec per loop fastsum-special.patch: $ ./python -mtimeit --setup="x=[(1,2,3)]*10000" "sum(x,())" 1000 loops, best of 3: 536 usec per loop Result: 1000 times faster. === Strings === No patch (just string check removed): $ ./python -mtimeit --setup="x=['abc']*100000" "sum(x,'')" 10 loops, best of 3: 1.52 sec per loop fastsum.patch (+ string check removed): $ ./python -mtimeit --setup="x=['abc']*100000" "sum(x,'')" 10 loops, best of 3: 1.52 sec per loop fastsum-special.patch $ ./python -mtimeit --setup="x=['abc']*100000" "sum(x,'')" 10 loops, best of 3: 27.8 msec per loop join: $ ./python -mtimeit --setup="x=['abc']*100000" "''.join(x)" 1000 loops, best of 3: 1.66 msec per loop Result: 50 times faster, but still constantly slower than join. NB: The string part of this patch is a Proof-of-Concept, just for tests, to demonstrate, that sum can really be O(n) for strings. It was written for python 2.7.5, won't work for python3, and is not expected to be applied to python2, as it changes the behavior of sum, allowing it to sum strings. But! If string part is stripped from the patch it works for both python2 and python3, and does not change existing behavior, except making sum faster. ---------- Added file: http://bugs.python.org/file30769/fastsum-special.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 11:21:07 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 04 Jul 2013 09:21:07 +0000 Subject: [issue18329] for line in socket.makefile() speed degradation In-Reply-To: <1372541158.63.0.507892499267.issue18329@psf.upfronthosting.co.za> Message-ID: <1372929667.53.0.502153919615.issue18329@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 12:09:41 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 04 Jul 2013 10:09:41 +0000 Subject: [issue18353] PyUnicode_WRITE_CHAR macro definition missing In-Reply-To: <1372873387.67.0.379053408423.issue18353@psf.upfronthosting.co.za> Message-ID: <1372932581.66.0.20572368358.issue18353@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I'll declare that the documentation is in error. I was pondering adding this macro, and the API changed forth and back several times (also after other people started contributing to the new Unicode API). The API is now what is implemented, and the documentation should follow. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 12:37:05 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 04 Jul 2013 10:37:05 +0000 Subject: [issue18329] for line in socket.makefile() speed degradation In-Reply-To: <1372541158.63.0.507892499267.issue18329@psf.upfronthosting.co.za> Message-ID: <1372934225.62.0.822825151921.issue18329@psf.upfronthosting.co.za> Christian Heimes added the comment: I first suspected that file based IO involves too many syscalls and context switches. However ``strace -c`` showed only minor differences in the amount of syscalls. The difference between read() and recvfrom() should not make any difference. perf revealed that the makefile() test uses much more CPU cycles. A quick check with python3.3 -m profile points to Python method call overhead. Five methods are called more than 122,000 times each and a couple of attributes are checked, too. Perhaps we can optimize away _checkReadable() and _checkClosed()? I think I know what's going on here. For socket IO readline() uses a readahead buffer size of 1. For each char a cascade of Python functions is called. os.fdopen() uses a default buffering of 4096 (or more) so it's not affected. ---------- Added file: http://bugs.python.org/file30770/perf.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 12:39:07 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 04 Jul 2013 10:39:07 +0000 Subject: [issue18329] for line in socket.makefile() speed degradation In-Reply-To: <1372541158.63.0.507892499267.issue18329@psf.upfronthosting.co.za> Message-ID: <1372934347.36.0.448414019902.issue18329@psf.upfronthosting.co.za> Christian Heimes added the comment: Summary: makefile: 611990 primitive calls fdopen: 1629 primitive calls ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 13:25:43 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Thu, 04 Jul 2013 11:25:43 +0000 Subject: [issue11185] test_wait4 error on AIX In-Reply-To: <1297424402.38.0.348928652961.issue11185@psf.upfronthosting.co.za> Message-ID: <1372937143.63.0.179911833149.issue11185@psf.upfronthosting.co.za> Changes by Charles-Fran?ois Natali : ---------- assignee: -> neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 13:33:28 2013 From: report at bugs.python.org (Fraser Tweedale) Date: Thu, 04 Jul 2013 11:33:28 +0000 Subject: [issue18357] add tests for dictview set difference operations Message-ID: <1372937608.11.0.328710498036.issue18357@psf.upfronthosting.co.za> New submission from Fraser Tweedale: The Python documentation states that set-like dictionary view objects support set difference (-), however, this behaviour is untested. Add some tests for this behaviour. (This issue was discovered because PyPy doesn't support (-) for dictviews, yet they claimed to pass the test suite. Well, they did pass it ^_^ ---------- components: Tests files: dictview-set-sub-test.patch keywords: patch messages: 192285 nosy: frasertweedale priority: normal severity: normal status: open title: add tests for dictview set difference operations type: enhancement versions: Python 2.7 Added file: http://bugs.python.org/file30771/dictview-set-sub-test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 13:43:26 2013 From: report at bugs.python.org (Russkel) Date: Thu, 04 Jul 2013 11:43:26 +0000 Subject: [issue18358] update links to Apple Style Guide Message-ID: <1372938206.65.0.563534327842.issue18358@psf.upfronthosting.co.za> New submission from Russkel: Apple has relocated and renamed their style guide. This patch reflects those changes and provides links to both PDF and online version. ---------- components: Devguide files: style-guide-fixes.patch keywords: patch messages: 192286 nosy: Russkel, ezio.melotti priority: normal severity: normal status: open title: update links to Apple Style Guide Added file: http://bugs.python.org/file30772/style-guide-fixes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 14:03:52 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 04 Jul 2013 12:03:52 +0000 Subject: [issue18358] update links to Apple Style Guide In-Reply-To: <1372938206.65.0.563534327842.issue18358@psf.upfronthosting.co.za> Message-ID: <1372939432.21.0.466178014621.issue18358@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This is a duplicate of #18021 ---------- nosy: +ronaldoussoren resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Update broken link to Apple Publication Style Guide type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 14:08:53 2013 From: report at bugs.python.org (Russ Webber) Date: Thu, 04 Jul 2013 12:08:53 +0000 Subject: [issue18358] update links to Apple Style Guide In-Reply-To: <1372938206.65.0.563534327842.issue18358@psf.upfronthosting.co.za> Message-ID: <1372939733.53.0.806395656443.issue18358@psf.upfronthosting.co.za> Russ Webber added the comment: So it is. Sorry, should have searched first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 15:11:55 2013 From: report at bugs.python.org (Fraser Tweedale) Date: Thu, 04 Jul 2013 13:11:55 +0000 Subject: [issue18357] add tests for dictview set difference operations In-Reply-To: <1372937608.11.0.328710498036.issue18357@psf.upfronthosting.co.za> Message-ID: <1372943515.98.0.411637331832.issue18357@psf.upfronthosting.co.za> Fraser Tweedale added the comment: and here's a patch for python3 (the earlier patch is for the 2.7 branch). ---------- Added file: http://bugs.python.org/file30773/dictview-set-sub-test-python3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 16:03:55 2013 From: report at bugs.python.org (yoch) Date: Thu, 04 Jul 2013 14:03:55 +0000 Subject: [issue18359] pickle fail to handle some class with __new__ Message-ID: <1372946635.32.0.0668424170567.issue18359@psf.upfronthosting.co.za> New submission from yoch: Hi, If some class objects have extra arguments in the __new__ constructor , pickle fail to serialize it. Here the output of provided test-case : Traceback (most recent call last): File "/home/yoch/bug.py", line 19, in y = pickle.load(fp) TypeError: __new__() missing 1 required positional argument: 'arg' Best regards ---------- components: Library (Lib) files: bug.py messages: 192290 nosy: yoch.melka priority: normal severity: normal status: open title: pickle fail to handle some class with __new__ versions: Python 3.3 Added file: http://bugs.python.org/file30774/bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 16:08:15 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 04 Jul 2013 14:08:15 +0000 Subject: [issue18359] pickle fail to handle some class with __new__ In-Reply-To: <1372946635.32.0.0668424170567.issue18359@psf.upfronthosting.co.za> Message-ID: <1372946895.45.0.357381555957.issue18359@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This is expected, your class must say how this __new__ constructor can be called. http://docs.python.org/2/library/pickle.html#object.__getnewargs__ ---------- nosy: +amaury.forgeotdarc resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 16:22:52 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 04 Jul 2013 14:22:52 +0000 Subject: [issue18356] help(numpy) causes segfault on exit In-Reply-To: <1372924520.77.0.111539946992.issue18356@psf.upfronthosting.co.za> Message-ID: <1372947772.29.0.949175422059.issue18356@psf.upfronthosting.co.za> R. David Murray added the comment: pydoc doesn't do anything special other than import the module. Well, there's some special code in linecache for getting docstrings from C modules, I think, so that could be something to check. Does Ubuntu have local patches to numpy? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 16:50:40 2013 From: report at bugs.python.org (Michelle Arzul) Date: Thu, 04 Jul 2013 14:50:40 +0000 Subject: [issue18356] help(numpy) causes segfault on exit In-Reply-To: <1372924520.77.0.111539946992.issue18356@psf.upfronthosting.co.za> Message-ID: <1372949440.03.0.895811536468.issue18356@psf.upfronthosting.co.za> Michelle Arzul added the comment: Apparently it only occurs with the Ubuntu packaged versions of Python and numpy. Somebody who was able to reproduce my problem had it with python-2.7.4-0ubuntu1-amd64 and python-numpy-1:1.7.1-1ubuntu1-amd64 which exhibited the same behaviour. Apparently python-dbg and python-numpy-dbg do not reproduce the error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 17:01:24 2013 From: report at bugs.python.org (Dale Smith) Date: Thu, 04 Jul 2013 15:01:24 +0000 Subject: [issue18360] Won't install. Keeps telling me DLL is missing. Message-ID: <1372950084.82.0.921928840895.issue18360@psf.upfronthosting.co.za> New submission from Dale Smith: When I click install -> run, it tells me a DLL is missing and to contact my vendor (Windows 7 Home Premium). This is the only installation that does this. I cannot find an answer anywhere and all other installations work fine. What could be causing this? Which DLL is specific only to this installation that Microsoft does not have an answer to? Thank you. ---------- components: Installation messages: 192294 nosy: daleastar priority: normal severity: normal status: open title: Won't install. Keeps telling me DLL is missing. type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 17:09:04 2013 From: report at bugs.python.org (paul j3) Date: Thu, 04 Jul 2013 15:09:04 +0000 Subject: [issue16977] argparse: mismatch between choices parsing and usage/error message In-Reply-To: <1358303407.58.0.0453921356618.issue16977@psf.upfronthosting.co.za> Message-ID: <1372950544.28.0.271911541037.issue16977@psf.upfronthosting.co.za> paul j3 added the comment: Changing _check_value from: def _check_value(self, action, value): # converted value must be one of the choices (if specified) if action.choices is not None and value not in action.choices: ... to def _check_value(self, action, value): # converted value must be one of the choices (if specified) if action.choices is not None: choices = action.choices if isinstance(choices, str): choices = list(choices) if value not in action.choices: ... would correct the string search without affecting other types of choices. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 17:20:52 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 04 Jul 2013 15:20:52 +0000 Subject: [issue18329] for line in socket.makefile() speed degradation In-Reply-To: <1372541158.63.0.507892499267.issue18329@psf.upfronthosting.co.za> Message-ID: <1372951252.36.0.614183823815.issue18329@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > I think I know what's going on here. For socket IO readline() uses a > readahead buffer size of 1. Why is that? I think that makefile(mode='rb') and fdopen() both create BufferedReader objects with the same buffer size. It looks to me like there are the same number of reads for both cases (about 120,000 ~ data_size/buffer_size). But with SocketIO, there are 5 function calls for each read into the buffer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 18:06:32 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 04 Jul 2013 16:06:32 +0000 Subject: [issue18329] for line in socket.makefile() speed degradation In-Reply-To: <1372541158.63.0.507892499267.issue18329@psf.upfronthosting.co.za> Message-ID: <1372953992.63.0.370933062597.issue18329@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Using while True: if not fileobj.read(8192): break instead of for line in fileobj: pass results in higher throughput, but a similar slowdown with makefile(). So this is not a problem specific to readline(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 18:06:42 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 04 Jul 2013 16:06:42 +0000 Subject: [issue18329] for line in socket.makefile() speed degradation In-Reply-To: <1372541158.63.0.507892499267.issue18329@psf.upfronthosting.co.za> Message-ID: <1372954002.09.0.672281191135.issue18329@psf.upfronthosting.co.za> Christian Heimes added the comment: Err, you are right. It's buffered. I misread one function call and thought it's not buffered at all. >>> COUNT = 1000000 >>> LINELEN = 1000 >>> int(LINELEN * COUNT / 8192) 122070 The number looks familiar, doesn't it? :) I still stand by my analysis that the slow down is caused by Python's method call overhead and the extra function call to _checkReadable(), readable and _checkClosed(). A C implementation of the raw SocketIO class would reduce the overhead. The implementation of SocketIO assumes that performance is dominated by IO (e.g. slow internet connection). A local socket pair is faster than 10GBit/sec ethernet or 8 GBit/sec fibre channel. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 18:56:41 2013 From: report at bugs.python.org (Madison May) Date: Thu, 04 Jul 2013 16:56:41 +0000 Subject: [issue18021] Update broken link to Apple Publication Style Guide In-Reply-To: <1369055538.2.0.556134337366.issue18021@psf.upfronthosting.co.za> Message-ID: <1372957001.14.0.618233816183.issue18021@psf.upfronthosting.co.za> Madison May added the comment: If the general consensus is that the APSG link should be removed, here's one more patch for you. ---------- Added file: http://bugs.python.org/file30775/apsg_removed.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 19:19:43 2013 From: report at bugs.python.org (Madison May) Date: Thu, 04 Jul 2013 17:19:43 +0000 Subject: [issue18351] Incorrect variable name in importlib._bootstrap._get_sourcefile In-Reply-To: <1372857072.23.0.433996899216.issue18351@psf.upfronthosting.co.za> Message-ID: <1372958383.54.0.408945563527.issue18351@psf.upfronthosting.co.za> Madison May added the comment: Here's a 5 character patch for the sake of completeness. ---------- keywords: +patch nosy: +madison.may Added file: http://bugs.python.org/file30776/Issue18351.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 20:30:10 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 04 Jul 2013 18:30:10 +0000 Subject: [issue18329] for line in socket.makefile() speed degradation In-Reply-To: <1372541158.63.0.507892499267.issue18329@psf.upfronthosting.co.za> Message-ID: <1372962610.64.0.211519797617.issue18329@psf.upfronthosting.co.za> Richard Oudkerk added the comment: The only real reason for implementing SocketIO in pure Python is because read() and write() do not work on Windows with sockets. (I think there are also a few complications involving SSL sockets and the close() method.) On Windows I have implemented a file object type in C which works with pipe handles. I hope to use it in multiprocessing at some point. It would not be too difficult to support sockets as well and use that instead of SocketIO. For Unix, FileIO can be used instead of SocketIO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 20:54:03 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 04 Jul 2013 18:54:03 +0000 Subject: [issue18329] for line in socket.makefile() speed degradation In-Reply-To: <1372541158.63.0.507892499267.issue18329@psf.upfronthosting.co.za> Message-ID: <1372964043.04.0.661858578314.issue18329@psf.upfronthosting.co.za> Christian Heimes added the comment: There is little bit more to it. A comment in the class' body describes the reason for SockteIO: # One might wonder why not let FileIO do the job instead. There are two # main reasons why FileIO is not adapted: # - it wouldn't work under Windows (where you can't used read() and # write() on a socket handle) # - it wouldn't work with socket timeouts (FileIO would ignore the # timeout and consider the socket non-blocking) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 21:02:08 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 04 Jul 2013 19:02:08 +0000 Subject: [issue18329] for line in socket.makefile() speed degradation In-Reply-To: <1372964043.04.0.661858578314.issue18329@psf.upfronthosting.co.za> Message-ID: <51D5C6A6.7020108@gmail.com> Richard Oudkerk added the comment: Ah. I had not thought of socket timeouts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 21:02:42 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 04 Jul 2013 19:02:42 +0000 Subject: [issue18351] Incorrect variable name in importlib._bootstrap._get_sourcefile In-Reply-To: <1372857072.23.0.433996899216.issue18351@psf.upfronthosting.co.za> Message-ID: <1372964562.51.0.655796565287.issue18351@psf.upfronthosting.co.za> Brett Cannon added the comment: Any chance you want to write some tests for the function? =) ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 21:05:42 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Jul 2013 19:05:42 +0000 Subject: [issue11185] test_wait4 error on AIX In-Reply-To: <1297424402.38.0.348928652961.issue11185@psf.upfronthosting.co.za> Message-ID: <3bmTD61JVcz7Lkm@mail.python.org> Roundup Robot added the comment: New changeset b3ea1b5a1617 by Antoine Pitrou in branch '3.3': Issue #11185: Fix test_wait4 under AIX. Patch by S?bastien Sabl?. http://hg.python.org/cpython/rev/b3ea1b5a1617 New changeset 8055521e372f by Antoine Pitrou in branch 'default': Issue #11185: Fix test_wait4 under AIX. Patch by S?bastien Sabl?. http://hg.python.org/cpython/rev/8055521e372f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 21:11:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Jul 2013 19:11:19 +0000 Subject: [issue11185] test_wait4 error on AIX In-Reply-To: <1297424402.38.0.348928652961.issue11185@psf.upfronthosting.co.za> Message-ID: <3bmTLb21HRz7Lq5@mail.python.org> Roundup Robot added the comment: New changeset e3fd5fc5dc47 by Antoine Pitrou in branch '2.7': Issue #11185: Fix test_wait4 under AIX. Patch by S?bastien Sabl?. http://hg.python.org/cpython/rev/e3fd5fc5dc47 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 21:29:26 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 04 Jul 2013 19:29:26 +0000 Subject: [issue18302] test_multiprocessing: test.support.import_module() does not ignore the ImportError on SemLock In-Reply-To: <1372187205.63.0.099845572882.issue18302@psf.upfronthosting.co.za> Message-ID: <1372966166.07.0.723640525402.issue18302@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +add ModuleNotFoundError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 21:30:09 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Jul 2013 19:30:09 +0000 Subject: [issue11185] test_wait4 error on AIX In-Reply-To: <1297424402.38.0.348928652961.issue11185@psf.upfronthosting.co.za> Message-ID: <1372966209.44.0.557276984667.issue11185@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you. This should be fixed now. Please reopen if not. ---------- nosy: +pitrou resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.3, Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 21:30:15 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 04 Jul 2013 19:30:15 +0000 Subject: [issue18200] Update stdlib to use ModuleNotFoundError In-Reply-To: <1371070908.67.0.272178306242.issue18200@psf.upfronthosting.co.za> Message-ID: <1372966215.18.0.745894126974.issue18200@psf.upfronthosting.co.za> Brett Cannon added the comment: As ModuleNotFoundError is going to be reverted so should the changesets for this issue. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 21:36:23 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 04 Jul 2013 19:36:23 +0000 Subject: [issue18200] Update stdlib to use ModuleNotFoundError In-Reply-To: <1371070908.67.0.272178306242.issue18200@psf.upfronthosting.co.za> Message-ID: <1372966583.62.0.09726734135.issue18200@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: -add ModuleNotFoundError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 21:36:36 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 04 Jul 2013 19:36:36 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1372966596.08.0.153399163055.issue15767@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Update stdlib to use ModuleNotFoundError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 21:39:50 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jul 2013 19:39:50 +0000 Subject: [issue18329] for line in socket.makefile() speed degradation In-Reply-To: <1372541158.63.0.507892499267.issue18329@psf.upfronthosting.co.za> Message-ID: <1372966790.77.0.288151374713.issue18329@psf.upfronthosting.co.za> STINNER Victor added the comment: On Python 2, socket.makefile("rb") duplicates the file descriptor and creates a new file object: fileobj.read() calls the C function read(). On Python 3, socket.makefile("rb") creates a SocketIO wrapped in BufferedReader: fileobj.read() calls the C function recv() (recvfrom() syscall). For a UNIX socket, read() is maybe more efficient than recv(). ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 21:41:37 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 04 Jul 2013 19:41:37 +0000 Subject: [issue18361] Move dev-in-a-box to os.cpu_count() Message-ID: <1372966897.43.0.367551920438.issue18361@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: brett.cannon keywords: easy nosy: brett.cannon priority: low severity: normal stage: needs patch status: open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 21:45:56 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 04 Jul 2013 19:45:56 +0000 Subject: [issue18362] Make build_cpython.py from dev-in-a-box work outside of a box Message-ID: <1372967156.42.0.772403047151.issue18362@psf.upfronthosting.co.za> New submission from Brett Cannon: No reason why it can't be generalized to accept a directory argument so that it can be used by anyone to build a checkout of CPython whether it is in a box or not. Would also help maintain the code as me (and one else who cared to) could then just always use the script to build CPython. ---------- messages: 192310 nosy: brett.cannon priority: normal severity: normal stage: needs patch status: open title: Make build_cpython.py from dev-in-a-box work outside of a box _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 21:49:43 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 04 Jul 2013 19:49:43 +0000 Subject: [issue18363] Change use of acronym tag in devinabox index.html to abbr Message-ID: <1372967383.82.0.0641112883991.issue18363@psf.upfronthosting.co.za> New submission from Brett Cannon: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/abbr ---------- assignee: brett.cannon keywords: easy messages: 192311 nosy: brett.cannon priority: low severity: normal status: open title: Change use of acronym tag in devinabox index.html to abbr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 21:55:02 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 04 Jul 2013 19:55:02 +0000 Subject: [issue17845] Clarify successful build message In-Reply-To: <1366911874.8.0.692153365711.issue17845@psf.upfronthosting.co.za> Message-ID: <1372967702.83.0.565501386439.issue17845@psf.upfronthosting.co.za> Brett Cannon added the comment: First, thanks to Yogesh for writing a patch! Second, I still think the second line should be "The necessary bits to build these optional modules were not found:". I purposefully like the vagueness of it so we don't start going on about external vs. system, whether header files needs to be mentioned, etc. That is a perk for people who aren't C programmers and don't want to know what a header file is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 21:57:05 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jul 2013 19:57:05 +0000 Subject: [issue18329] for line in socket.makefile() speed degradation In-Reply-To: <1372541158.63.0.507892499267.issue18329@psf.upfronthosting.co.za> Message-ID: <1372967825.59.0.809649326743.issue18329@psf.upfronthosting.co.za> STINNER Victor added the comment: My results of the benchmark on Linux 3.9, first with a loop calling fileobj.read(8192) ("read"), then with the "for line in fileobj: pass" ("readline"). $ python2.7 bench_socket_read.py TCP mode, makefile method. 1775085.8 lines per second (1692.9 MB/s). Delay is 0.56 seconds TCP mode, fdopen method. 2767162.2 lines per second (2639.0 MB/s). Delay is 0.36 seconds UNIX mode, makefile method. 5238015.2 lines per second (4995.4 MB/s). Delay is 0.19 seconds UNIX mode, fdopen method. 6218906.2 lines per second (5930.8 MB/s). Delay is 0.16 seconds $ python3.4 bench_socket_read.py TCP mode, makefile method. 1403075.1 lines per second (1338.1 MB/s). Delay is 0.71 seconds TCP mode, fdopen method. 2324254.2 lines per second (2216.6 MB/s). Delay is 0.43 seconds UNIX mode, makefile method. 1770625.0 lines per second (1688.6 MB/s). Delay is 0.56 seconds UNIX mode, fdopen method. 4953624.6 lines per second (4724.1 MB/s). Delay is 0.20 seconds $ python2.7 bench_socket_readline.py TCP mode, makefile method. 246268.2 lines per second (234.9 MB/s). Delay is 4.06 seconds TCP mode, fdopen method. 1980998.2 lines per second (1889.2 MB/s). Delay is 0.50 seconds UNIX mode, makefile method. 3378778.4 lines per second (3222.3 MB/s). Delay is 0.30 seconds UNIX mode, fdopen method. 3271267.0 lines per second (3119.7 MB/s). Delay is 0.31 seconds $ python3.4 bench_socket_readline.py TCP mode, makefile method. 826646.7 lines per second (788.4 MB/s). Delay is 1.21 seconds TCP mode, fdopen method. 1664917.8 lines per second (1587.8 MB/s). Delay is 0.60 seconds UNIX mode, makefile method. 942409.0 lines per second (898.8 MB/s). Delay is 1.06 seconds UNIX mode, fdopen method. 2619285.2 lines per second (2497.9 MB/s). Delay is 0.38 seconds The results of the "read" benchmark for "UNIX mode, makefile method" case are very different on Python 2.7 (call read()) and Python 3.4 (call recv()): 4995.4 MB/s vs 1688.6 MB/s (2.95x slower). Readline on TCP is much faster on Python 3.4 than 2.7: 788.4 MB/s vs 234.9 MB/s (3.4x faster). I don't know why, but I don't want to investigate (it is not a regression) :-) The slowdown on other readline tests are less interesting: Python 3.4 is 16% slower for "TCP mode, fdopen method" and 20% slower for "UNIX mode, fdopen method". It would be interesting to have the same benchmark implemented in C to compare "raw" performances, so it would be possible to measure the overhead of Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 21:58:42 2013 From: report at bugs.python.org (Phil Webster) Date: Thu, 04 Jul 2013 19:58:42 +0000 Subject: [issue18279] IDLE Unit test for RstripExtension.py In-Reply-To: <1371854273.68.0.541594598967.issue18279@psf.upfronthosting.co.za> Message-ID: <1372967922.13.0.0750403379547.issue18279@psf.upfronthosting.co.za> Phil Webster added the comment: Added to Terry's Text Widget code (in #18226) and created mock_idle.py for the mock EditorWindow. Todd's FormatParagraph test in the aforementioned issue also passes with the mock EditorWindow. ---------- Added file: http://bugs.python.org/file30777/test_rstrip2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 22:17:38 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 04 Jul 2013 20:17:38 +0000 Subject: [issue18360] Won't install. Keeps telling me DLL is missing. In-Reply-To: <1372950084.82.0.921928840895.issue18360@psf.upfronthosting.co.za> Message-ID: <1372969058.76.0.543889613992.issue18360@psf.upfronthosting.co.za> R. David Murray added the comment: Exactly which installer are you trying to run and where did you download it from? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 22:45:27 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 04 Jul 2013 20:45:27 +0000 Subject: [issue18329] for line in socket.makefile() speed degradation In-Reply-To: <1372541158.63.0.507892499267.issue18329@psf.upfronthosting.co.za> Message-ID: <1372970727.05.0.337856426705.issue18329@psf.upfronthosting.co.za> Richard Oudkerk added the comment: I find that by adding the lines fileobj.raw.readinto = ss.recv_into fileobj.raw.read = ss.recv the speed with makefile() is about 30% slower than with fdopen(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 22:54:14 2013 From: report at bugs.python.org (Dale Smith) Date: Thu, 04 Jul 2013 20:54:14 +0000 Subject: [issue18360] Won't install. Keeps telling me DLL is missing. In-Reply-To: <1372969058.76.0.543889613992.issue18360@psf.upfronthosting.co.za> Message-ID: <51D5E0F5.1070304@eavillage.com> Dale Smith added the comment: http://www.python.org/ftp/python/2.7.5/python-2.7.5.msi That is the URL I downloaded from and the installer. Thank you, Dale On 7/4/2013 4:17 PM, R. David Murray wrote: > R. David Murray added the comment: > > Exactly which installer are you trying to run and where did you download it from? > > ---------- > nosy: +r.david.murray > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 00:16:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Jul 2013 22:16:30 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <3bmYSF33yNz7LqV@mail.python.org> Roundup Robot added the comment: New changeset 0e4e062751fa by Brett Cannon in branch 'default': Issue #15767: Back out 8d28d44f3a9a related to ModuleNotFoundError. http://hg.python.org/cpython/rev/0e4e062751fa New changeset e3ec8b176a80 by Brett Cannon in branch 'default': Issue #15767: Revert 3a50025f1900 for ModuleNotFoundError http://hg.python.org/cpython/rev/e3ec8b176a80 New changeset ee9662d77ebb by Brett Cannon in branch 'default': Issue #15767: back out 8a0ed9f63c6e, finishing the removal of http://hg.python.org/cpython/rev/ee9662d77ebb New changeset de947db308ba by Brett Cannon in branch 'default': Issue #15767: Excise the remaining instances of ModuleNotFoundError http://hg.python.org/cpython/rev/de947db308ba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 00:16:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Jul 2013 22:16:30 +0000 Subject: [issue18200] Update stdlib to use ModuleNotFoundError In-Reply-To: <1371070908.67.0.272178306242.issue18200@psf.upfronthosting.co.za> Message-ID: <3bmYSG1GmMz7Lnt@mail.python.org> Roundup Robot added the comment: New changeset 7769c4d72806 by Brett Cannon in branch 'default': Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) http://hg.python.org/cpython/rev/7769c4d72806 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 00:16:59 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 04 Jul 2013 22:16:59 +0000 Subject: [issue18200] Update stdlib to use ModuleNotFoundError In-Reply-To: <1371070908.67.0.272178306242.issue18200@psf.upfronthosting.co.za> Message-ID: <1372976219.34.0.104805128245.issue18200@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 00:17:40 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 04 Jul 2013 22:17:40 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1372976260.78.0.414766895144.issue15767@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 00:17:53 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 04 Jul 2013 22:17:53 +0000 Subject: [issue18302] test_multiprocessing: test.support.import_module() does not ignore the ImportError on SemLock In-Reply-To: <1372187205.63.0.099845572882.issue18302@psf.upfronthosting.co.za> Message-ID: <1372976273.49.0.0249859500969.issue18302@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 00:26:22 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jul 2013 22:26:22 +0000 Subject: [issue18302] test_multiprocessing: test.support.import_module() does not ignore the ImportError on SemLock In-Reply-To: <1372187205.63.0.099845572882.issue18302@psf.upfronthosting.co.za> Message-ID: <1372976782.82.0.315625855788.issue18302@psf.upfronthosting.co.za> STINNER Victor added the comment: Brett: Why did you close this issue? It still occurs on the buildbot: http://buildbot.python.org/all/builders/x86%20FreeBSD%206.4%203.x/builds/3794/steps/test/logs/stdio ---------- resolution: out of date -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 00:45:18 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 04 Jul 2013 22:45:18 +0000 Subject: [issue18302] test_multiprocessing: test.support.import_module() does not ignore the ImportError on SemLock In-Reply-To: <1372187205.63.0.099845572882.issue18302@psf.upfronthosting.co.za> Message-ID: <1372977918.7.0.608734918478.issue18302@psf.upfronthosting.co.za> Brett Cannon added the comment: Because I removed ModuleNotFoundError; check the buildbot again and you will notice it is 8 changesets behind, most of which are related to the removal of ModuleNotFoundError. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 00:54:36 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 04 Jul 2013 22:54:36 +0000 Subject: [issue18364] Remove _not_found hack from importlib Message-ID: <1372978476.87.0.491893318984.issue18364@psf.upfronthosting.co.za> New submission from Brett Cannon: Having a private attribute has already caused one bug report. I want to try and come up with something that doesn't leak outside of importlib. ---------- assignee: brett.cannon components: Library (Lib) messages: 192322 nosy: brett.cannon priority: normal severity: normal stage: needs patch status: open title: Remove _not_found hack from importlib versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 01:41:50 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Jul 2013 23:41:50 +0000 Subject: [issue18347] ElementTree corrupts cAse of closing tags when html method is specified In-Reply-To: <1372786299.24.0.986452564327.issue18347@psf.upfronthosting.co.za> Message-ID: <3bmbLj6xBfz7Lk2@mail.python.org> Roundup Robot added the comment: New changeset df79735b21c1 by Christian Heimes in branch '3.3': Issue #18347: ElementTree's html serializer now preserves the case of closing tags. http://hg.python.org/cpython/rev/df79735b21c1 New changeset d5536c06a082 by Christian Heimes in branch 'default': Issue #18347: ElementTree's html serializer now preserves the case of closing tags. http://hg.python.org/cpython/rev/d5536c06a082 New changeset 328781ae35d2 by Christian Heimes in branch '2.7': Issue #18347: ElementTree's html serializer now preserves the case of closing tags. http://hg.python.org/cpython/rev/328781ae35d2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 01:42:23 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 04 Jul 2013 23:42:23 +0000 Subject: [issue18347] ElementTree corrupts cAse of closing tags when html method is specified In-Reply-To: <1372786299.24.0.986452564327.issue18347@psf.upfronthosting.co.za> Message-ID: <1372981343.8.0.928828124893.issue18347@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 Fri Jul 5 01:48:47 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 04 Jul 2013 23:48:47 +0000 Subject: [issue16396] Importing ctypes.wintypes on Linux gives a traceback In-Reply-To: <1351956172.0.0.64927799046.issue16396@psf.upfronthosting.co.za> Message-ID: <1372981727.3.0.0362327466017.issue16396@psf.upfronthosting.co.za> Christian Heimes added the comment: RM, please decide. :) ---------- assignee: -> benjamin.peterson stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 01:54:48 2013 From: report at bugs.python.org (Mark Kubacki) Date: Thu, 04 Jul 2013 23:54:48 +0000 Subject: [issue5639] Support TLS SNI extension in ssl module In-Reply-To: <1238567905.09.0.139467917453.issue5639@psf.upfronthosting.co.za> Message-ID: <1372982088.62.0.592806539212.issue5639@psf.upfronthosting.co.za> Changes by Mark Kubacki : Removed file: http://bugs.python.org/file30757/python-2.7.5-tlssni.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 01:57:17 2013 From: report at bugs.python.org (Mark Kubacki) Date: Thu, 04 Jul 2013 23:57:17 +0000 Subject: [issue5639] Support TLS SNI extension in ssl module In-Reply-To: <1238567905.09.0.139467917453.issue5639@psf.upfronthosting.co.za> Message-ID: <1372982237.48.0.134612155624.issue5639@psf.upfronthosting.co.za> Changes by Mark Kubacki : Added file: http://bugs.python.org/file30778/python-2.7.5-tlssni.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 01:58:02 2013 From: report at bugs.python.org (Mark Kubacki) Date: Thu, 04 Jul 2013 23:58:02 +0000 Subject: [issue5639] Support TLS SNI extension in ssl module In-Reply-To: <1238567905.09.0.139467917453.issue5639@psf.upfronthosting.co.za> Message-ID: <1372982282.62.0.428821813885.issue5639@psf.upfronthosting.co.za> Changes by Mark Kubacki : Removed file: http://bugs.python.org/file30778/python-2.7.5-tlssni.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 02:05:03 2013 From: report at bugs.python.org (Mark Kubacki) Date: Fri, 05 Jul 2013 00:05:03 +0000 Subject: [issue5639] Support TLS SNI extension in ssl module In-Reply-To: <1238567905.09.0.139467917453.issue5639@psf.upfronthosting.co.za> Message-ID: <1372982703.18.0.449797477838.issue5639@psf.upfronthosting.co.za> Changes by Mark Kubacki : Added file: http://bugs.python.org/file30779/python-2.7.5-tlssni.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 04:02:06 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 05 Jul 2013 02:02:06 +0000 Subject: [issue18364] Remove _not_found hack from importlib In-Reply-To: <1372978476.87.0.491893318984.issue18364@psf.upfronthosting.co.za> Message-ID: <1372989726.06.0.758850577204.issue18364@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 04:28:17 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Jul 2013 02:28:17 +0000 Subject: [issue18279] IDLE Unit test for RstripExtension.py In-Reply-To: <1371854273.68.0.541594598967.issue18279@psf.upfronthosting.co.za> Message-ID: <1372991296.99.0.389515059938.issue18279@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I want to make two separate commits. First add mock Text into mock_tk.py, and add a new test_text.py. I suggested looking at the tkinter Text test. I turns out that it only tests a few special search cases. I am guessing that they have something to do with the tkinter interface. If neither you nor Todd feel like writing the Text test, I will. Let me know either way. Second, add the new mock_idle and test_rstrip files. For the latter, at least one line should have no whitespace, and one should have an indent. With an indent, the test would fail if rstrip in the tested file were changed to strip. In the tearDown method, the apparent purpose of self.rstripextension = None is to actually do del self.rstripextension and that happens automatically when self disappears. With a mock editor window, there is no need for "root.destroy" and hence for the close call, and hence for the tearDown method. With only one test method, the setUp lines can be part of the test. For the attribute names, I strongly prefer 'rstrip' to 'rstripExtension' and 'editor' to 'mockEditorWindow'. I am curious about this comment: # Note: Tkinter always adds a newline at the end of the text widget, # hence the newline in the expected_text string In live Idle, I tried 'strip trailing whitespace' with text that did not end with \n and there was none visible after. An annoyance is that after stripping the filename is prefixed with * to indicate that it has been changed and needs to be changed, even when it has not (or should not have been). Closing brings up the unnecessary 'Changed, save?' box. Is this related to the comment? ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 04:44:25 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 05 Jul 2013 02:44:25 +0000 Subject: [issue18200] Update stdlib to use ModuleNotFoundError In-Reply-To: <1371070908.67.0.272178306242.issue18200@psf.upfronthosting.co.za> Message-ID: <1372992265.59.0.934027416946.issue18200@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: > As ModuleNotFoundError is going to be reverted so should the changesets for this issue. Could you possibly clarify this?. Pointers? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 08:49:07 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Jul 2013 06:49:07 +0000 Subject: [issue18365] Idle: mock Text class and test thereof Message-ID: <1373006946.99.0.696971871982.issue18365@psf.upfronthosting.co.za> New submission from Terry J. Reedy: test_rstrip2.patch contain a Text class to be added to mock_tk.py. The purpose of a mock class is to imitate another class with respect to certain behaviors. The way to verify that is does that is to run the same set of tests for those behaviors with both. This is similar in idea and will be the same in execution as running the same set of tests with a Python-coded module and a c-coded accelerator version of at least some functions of the module. The trick is to do this without code duplication is write a mixin class with the tests and derive two testcase classes using the mixin. ---------- assignee: terry.reedy components: IDLE messages: 192327 nosy: Todd.Rovito, philwebster, terry.reedy priority: normal severity: normal stage: test needed status: open title: Idle: mock Text class and test thereof type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 08:55:20 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Jul 2013 06:55:20 +0000 Subject: [issue18226] IDLE Unit test for FormatParagrah.py In-Reply-To: <1371335636.99.0.534048602964.issue18226@psf.upfronthosting.co.za> Message-ID: <1373007320.51.0.0901292144359.issue18226@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: -> terry.reedy dependencies: +Idle: mock Text class and test thereof _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 08:56:52 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Jul 2013 06:56:52 +0000 Subject: [issue18365] Idle: mock Text class and test thereof In-Reply-To: <1373006946.99.0.696971871982.issue18365@psf.upfronthosting.co.za> Message-ID: <1373007412.83.0.843300571148.issue18365@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The rstrip patch is with #18279. Design discussion occurred on #18226. Both issues and other future issues depend on this one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 08:57:33 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Jul 2013 06:57:33 +0000 Subject: [issue18279] IDLE Unit test for RstripExtension.py In-Reply-To: <1371854273.68.0.541594598967.issue18279@psf.upfronthosting.co.za> Message-ID: <1373007453.17.0.284313803906.issue18279@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I decided that the first commit should be a separate issue that this issue depends on. ---------- assignee: -> terry.reedy dependencies: +Idle: mock Text class and test thereof _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 09:31:03 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 05 Jul 2013 07:31:03 +0000 Subject: [issue18221] abspath strips trailing spaces on win32 In-Reply-To: <1371299882.82.0.523042534705.issue18221@psf.upfronthosting.co.za> Message-ID: <1373009463.97.0.32771034275.issue18221@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 09:33:19 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 05 Jul 2013 07:33:19 +0000 Subject: [issue18222] os.path.abspath should accept multiple path parts and join them In-Reply-To: <1371300014.52.0.302689191901.issue18222@psf.upfronthosting.co.za> Message-ID: <1373009599.88.0.0672629162045.issue18222@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 09:45:11 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 05 Jul 2013 07:45:11 +0000 Subject: [issue18231] What's new in Python should explain what's new in UCD In-Reply-To: <1371406253.35.0.589040711268.issue18231@psf.upfronthosting.co.za> Message-ID: <1373010311.22.0.927041633844.issue18231@psf.upfronthosting.co.za> Ezio Melotti added the comment: I agree with Martin, mentioning that the database has been updated should be enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 10:21:33 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 05 Jul 2013 08:21:33 +0000 Subject: [issue18232] running a suite with no tests is not an error In-Reply-To: <1371411159.89.0.919313216558.issue18232@psf.upfronthosting.co.za> Message-ID: <1373012493.07.0.0405480415216.issue18232@psf.upfronthosting.co.za> Ezio Melotti added the comment: > I'm thinking I'll add a '--min-tests=X' parameter to unittest.main, > with the semantic that if there are less than X tests executed, the > test run will be considered a failure, The minimum number of tests is a fast moving target, and unless you know exactly how many tests you have and use that value, missing tests will be undetected. If you only want to distinguish between 0 and more tests, a boolean flag is enough, but checking that at least 1 test in the whole test suite is run is quite pointless IMHO (I assume it's quite easy to notice if/when it happens). Making this per-module or even per-class would be more interesting (because it's harder to spot these problems), but OTOH there's no way to know for sure if this is what the user wants. A good compromise might be using a boolean flag that generates a warning by using some heuristic (e.g. test discovery found a test_*.py file that defines no tests, or a TestCase class that defines no test_* methods and has no subclasses (or have no subclasses with test_* methods)). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 15:20:15 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Jul 2013 13:20:15 +0000 Subject: [issue18200] Update stdlib to use ModuleNotFoundError In-Reply-To: <1371070908.67.0.272178306242.issue18200@psf.upfronthosting.co.za> Message-ID: <1373030415.81.0.0530086630415.issue18200@psf.upfronthosting.co.za> Brett Cannon added the comment: Discussion occurred on http://bugs.python.org/issue15767 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 17:19:14 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 05 Jul 2013 15:19:14 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1373037554.72.0.013605980482.issue15767@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 17:32:01 2013 From: report at bugs.python.org (Dale Smith) Date: Fri, 05 Jul 2013 15:32:01 +0000 Subject: [issue18360] Won't install. Keeps telling me DLL is missing. In-Reply-To: <1372969058.76.0.543889613992.issue18360@psf.upfronthosting.co.za> Message-ID: <51D6E6F1.2080505@eavillage.com> Dale Smith added the comment: Was that all the correct information? Do you need more... i.e. about my computer etc? On 7/4/2013 4:17 PM, R. David Murray wrote: > R. David Murray added the comment: > > Exactly which installer are you trying to run and where did you download it from? > > ---------- > nosy: +r.david.murray > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 18:27:31 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Fri, 05 Jul 2013 16:27:31 +0000 Subject: [issue18335] Add textwrap.dedent, .indent, as str methods. In-Reply-To: <1372656829.33.0.351971247179.issue18335@psf.upfronthosting.co.za> Message-ID: <1373041651.92.0.200714757258.issue18335@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 18:27:55 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Fri, 05 Jul 2013 16:27:55 +0000 Subject: [issue18354] http://www.python.org/doc/ has outdated note In-Reply-To: <1372877234.32.0.505544665385.issue18354@psf.upfronthosting.co.za> Message-ID: <1373041675.38.0.74799056012.issue18354@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 18:39:51 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 05 Jul 2013 16:39:51 +0000 Subject: [issue18362] Make build_cpython.py from dev-in-a-box work outside of a box In-Reply-To: <1372967156.42.0.772403047151.issue18362@psf.upfronthosting.co.za> Message-ID: <1373042391.73.0.312888320301.issue18362@psf.upfronthosting.co.za> Eric Snow added the comment: Out of the box thinking, eh? ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 18:50:02 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2013 16:50:02 +0000 Subject: [issue18353] PyUnicode_WRITE_CHAR macro definition missing In-Reply-To: <1372873387.67.0.379053408423.issue18353@psf.upfronthosting.co.za> Message-ID: <1373043002.66.0.260216033969.issue18353@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't remember where this macro come from. It is mention in my review of the PEP (the text of the PEP, not the implementation): http://mail.python.org/pipermail/python-dev/2011-September/113668.html PyUnicode_WRITE_CHAR() was removed from the PEP by the following commit: http://hg.python.org/peps/rev/5c69799e1a94 I'm not sure that the macro ever existed :-) Anyway, it should be removed from the doc! ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 19:01:26 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2013 17:01:26 +0000 Subject: [issue18356] help(numpy) causes segfault on exit In-Reply-To: <1372924520.77.0.111539946992.issue18356@psf.upfronthosting.co.za> Message-ID: <1373043686.18.0.527184654814.issue18356@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 19:02:58 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2013 17:02:58 +0000 Subject: [issue18356] help(numpy) causes segfault on exit In-Reply-To: <1372924520.77.0.111539946992.issue18356@psf.upfronthosting.co.za> Message-ID: <1373043778.89.0.186403416859.issue18356@psf.upfronthosting.co.za> STINNER Victor added the comment: > For a full trackdown and workaround of the problem see http://stackoverflow.com/questions/17344974/python-helpnumpy-causes-segfault-on-exit The gdb trace is not interesting because it stopped at SIGPIPE, which is not an error. Please rerun your program in gdb and ignore SIGPIPE (type "handle SIGPIPE noprint nostop") or continue on PIPE (type "cont"). Then when you get the crash, please copy/paste the gdb traceback here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 19:12:02 2013 From: report at bugs.python.org (Madison May) Date: Fri, 05 Jul 2013 17:12:02 +0000 Subject: [issue18351] Incorrect variable name in importlib._bootstrap._get_sourcefile In-Reply-To: <1372857072.23.0.433996899216.issue18351@psf.upfronthosting.co.za> Message-ID: <1373044322.3.0.363271052551.issue18351@psf.upfronthosting.co.za> Madison May added the comment: I'd be glad to -- I'll get right to work =). On a related note, rpartition is also misspelled in _get_sourcefile() on line 446. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 19:26:12 2013 From: report at bugs.python.org (Madison May) Date: Fri, 05 Jul 2013 17:26:12 +0000 Subject: [issue18351] Incorrect variable name in importlib._bootstrap._get_sourcefile In-Reply-To: <1372857072.23.0.433996899216.issue18351@psf.upfronthosting.co.za> Message-ID: <1373045172.9.0.509671925178.issue18351@psf.upfronthosting.co.za> Madison May added the comment: You might have to bear with me -- I'm a bit new to this. What's the protocol for functions like _get_sourcepath() that require support files for testing? I'll should probably have a couple .pyc's, .pyo's and .py files to use for testing purposes. Additionally, would you recommend writing tests for _get_sourcepath() in test_imp.py, or would another location prove better in your opinion? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 19:36:49 2013 From: report at bugs.python.org (Madison May) Date: Fri, 05 Jul 2013 17:36:49 +0000 Subject: [issue18351] Incorrect variable name in importlib._bootstrap._get_sourcefile In-Reply-To: <1372857072.23.0.433996899216.issue18351@psf.upfronthosting.co.za> Message-ID: <1373045809.63.0.330610229059.issue18351@psf.upfronthosting.co.za> Madison May added the comment: Yet another _get_sourcefile() related bug to report. Line 453 should be: source_path = bytcode_path[:-1] instead of source_path = bytcode_path[-1:] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 19:48:46 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Jul 2013 17:48:46 +0000 Subject: [issue18351] Incorrect variable name in importlib._bootstrap._get_sourcefile In-Reply-To: <1372857072.23.0.433996899216.issue18351@psf.upfronthosting.co.za> Message-ID: <1373046526.31.0.573901179665.issue18351@psf.upfronthosting.co.za> Brett Cannon added the comment: Wow, I really botched that function. And no one seems to really use it to notice the errors (or at least the branches in the function where the errors exist are never reached). =) So the tests should go in test_importlib or test_import (I'm leaning towards the latter since this function is for the C API). As for the files, I wouldn't create any and instead mock out importlib._bootstrap._path_isfile() to return the value you want. And one last thing, Madison, is to do the patch against Python 3.3 if you can. This obviously needs to be backported so it's best to start there and then work forward. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 20:30:40 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Jul 2013 18:30:40 +0000 Subject: [issue18326] Mention keywork only in list.sort docs In-Reply-To: <1372511136.61.0.278425078947.issue18326@psf.upfronthosting.co.za> Message-ID: <1373049040.38.0.864706233111.issue18326@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- title: Not Clear Docs -> Mention keywork only in list.sort docs type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 20:51:25 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 05 Jul 2013 18:51:25 +0000 Subject: [issue18357] add tests for dictview set difference operations In-Reply-To: <1372937608.11.0.328710498036.issue18357@psf.upfronthosting.co.za> Message-ID: <1373050285.43.0.751820041669.issue18357@psf.upfronthosting.co.za> ?ric Araujo added the comment: Looks good to me. ---------- nosy: +eric.araujo stage: -> patch review versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 20:55:22 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 05 Jul 2013 18:55:22 +0000 Subject: [issue18354] http://www.python.org/doc/ has outdated note In-Reply-To: <1372877234.32.0.505544665385.issue18354@psf.upfronthosting.co.za> Message-ID: <1373050522.43.0.504452274215.issue18354@psf.upfronthosting.co.za> ?ric Araujo added the comment: The HHGP was an opinionated, distribute-centric user guide, which is now outdated and obsoleted by the upcoming Python packaging user documentation, which will cover more tools and be blessed by Nick Coghlan and the developers of packaging tools. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 20:55:45 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Jul 2013 18:55:45 +0000 Subject: [issue18366] Look into using setuptools 0.8 with devinabox Message-ID: <1373050545.72.0.913004970997.issue18366@psf.upfronthosting.co.za> New submission from Brett Cannon: Setuptools 0.8 uses a Python 2/3 compatible codebase so it should simplify the instructions for running coverage.py. ---------- assignee: brett.cannon messages: 192343 nosy: brett.cannon priority: normal severity: normal status: open title: Look into using setuptools 0.8 with devinabox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 20:56:28 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 05 Jul 2013 18:56:28 +0000 Subject: [issue18354] http://www.python.org/doc/ has outdated note In-Reply-To: <1372877234.32.0.505544665385.issue18354@psf.upfronthosting.co.za> Message-ID: <1373050588.97.0.706189366088.issue18354@psf.upfronthosting.co.za> ?ric Araujo added the comment: Also I don?t think we?ll ever have documentation for non-stdlib libs/tools in the standard docs, so the HHGP or new packaging user doc won?t ?be merged into the Python documentation?. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 20:57:14 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Jul 2013 18:57:14 +0000 Subject: [issue18326] Mention 'keyword only' for list.sort, improve glossary. In-Reply-To: <1372511136.61.0.278425078947.issue18326@psf.upfronthosting.co.za> Message-ID: <1373050634.92.0.748243178406.issue18326@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 'keyword argument' refers one to 'argument'. The entry for the latter says that there are only two types of arguments, keyword and positional. That is true as to how actual arguments are passed. There are 3 possibilities for how a single argument for a parameter might be passed: standard - positional or keyword positional only (args for many C functions, not specifically indicated) keyword only (follow '*' or '*args' after signature. These are explained in the parameter entry. Keyword-only parameters have to be matched by keyword arguments. I think it a bit misleading to say "There are two types of arguments". That actually means "There are two ways of passing an argument". Precede it by 'name=' or not. An object is the same whether passed by name or position. Calling a name a keyword in this context is also misleading since 'keyword' otherwise means a reserved word that cannot be used as a name. Using an actual keyword to name an argument is illegal: 'for = 2' raises. ---------- nosy: +terry.reedy title: Mention keywork only in list.sort docs -> Mention 'keyword only' for list.sort, improve glossary. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 20:58:44 2013 From: report at bugs.python.org (Zachary Ware) Date: Fri, 05 Jul 2013 18:58:44 +0000 Subject: [issue18266] Fix test discovery for test_largefile.py In-Reply-To: <1371675654.81.0.262540951411.issue18266@psf.upfronthosting.co.za> Message-ID: <1373050724.4.0.920934619811.issue18266@psf.upfronthosting.co.za> Zachary Ware added the comment: After testing on Windows, here's version 3. This version changes tearDownClass to truncate the file rather than unlink it, and adds a check to make sure the file is properly truncated to 0 length. Unlinking the file makes the test take an extra 40 seconds on my machine, I suspect due to Windows trying to simultaneously deallocate one 2GB file and build another. To go with that change, tearDownModule is added, which does unlink TESTFN. Also changed in this version, I've removed the "use_resources = ['largefile',]" assignment I had added to the "if __name__ == '__main__'" stanza; I've since learned that it has no effect (support.requires lets anything pass if the test module's __name__ is "__main__"). ---------- Added file: http://bugs.python.org/file30780/test_largefile_discovery.v3-3.3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 21:03:45 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 05 Jul 2013 19:03:45 +0000 Subject: [issue18357] add tests for dictview set difference operations In-Reply-To: <1372937608.11.0.328710498036.issue18357@psf.upfronthosting.co.za> Message-ID: <1373051025.9.0.939113609773.issue18357@psf.upfronthosting.co.za> Eric Snow added the comment: Same here. ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 21:06:10 2013 From: report at bugs.python.org (Brian Curtin) Date: Fri, 05 Jul 2013 19:06:10 +0000 Subject: [issue18354] http://www.python.org/doc/ has outdated note In-Reply-To: <1372877234.32.0.505544665385.issue18354@psf.upfronthosting.co.za> Message-ID: <1373051170.7.0.63911431444.issue18354@psf.upfronthosting.co.za> Brian Curtin added the comment: Fixed in r14798 of the site. ---------- assignee: docs at python -> brian.curtin resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 21:15:39 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Jul 2013 19:15:39 +0000 Subject: [issue18367] See if a venv setup can be used for devinabox for coverage Message-ID: <1373051739.1.0.739747420449.issue18367@psf.upfronthosting.co.za> New submission from Brett Cannon: Right now there is a bunch of contorting with setuptools and coverage.py's checkout to get things in reasonable places, etc. Might be easiest to create a venv from the built checkout and then install both setuptools and the coverage.py checkout into the venv for easier setup/cleanup. Might even be lucky enough that the venv can be left in place and simply have users do ``../cpython/python Tools/scripts/pyvenv --upgrade`` to have it start using their own built version so that the basic setup for at least setuptools works and then they only need to build coverage.py themselves (which is already scripted). ---------- messages: 192349 nosy: brett.cannon priority: normal severity: normal status: open title: See if a venv setup can be used for devinabox for coverage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 21:39:16 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Jul 2013 19:39:16 +0000 Subject: [issue18360] Won't install. Keeps telling me DLL is missing. In-Reply-To: <1372950084.82.0.921928840895.issue18360@psf.upfronthosting.co.za> Message-ID: <1373053156.11.0.656306326156.issue18360@psf.upfronthosting.co.za> Terry J. Reedy added the comment: When responding by email, *please* delete the quote, except perhaps for a line or two if really needed. The email signature is *never* needed and *always* noise. I install on Windows with no problem. I presume you too see 'Install' by right-clicking on the .msi file in Explorer or elsewhere. Does the message tell you *what* .dll is missing? I suspect that it is one of the Windows dlls that are needed for msi installs and not included in the .msi. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 21:58:46 2013 From: report at bugs.python.org (Zachary Ware) Date: Fri, 05 Jul 2013 19:58:46 +0000 Subject: [issue18326] Mention 'keyword only' for list.sort, improve glossary. In-Reply-To: <1372511136.61.0.278425078947.issue18326@psf.upfronthosting.co.za> Message-ID: <1373054326.28.0.629456302269.issue18326@psf.upfronthosting.co.za> Zachary Ware added the comment: How about this patch? I agree that "types of arguments/parameters" has great potential for confusion, so the glossary has been changed to "kinds of argument/parameter" (dropping the pluralization as well; it is unnecessary). I think just taking the word "type" out of it makes the rest of each entry unambiguous. To list.sort, I simply added a line: ":meth:`sort` accepts two arguments which can only be passed by keyword:". I considered making each parameter's description an indented block after that, but that seems like more change than is really necessary, and the patched version doesn't look too bad to me. ---------- keywords: +patch nosy: +zach.ware Added file: http://bugs.python.org/file30781/issue18326.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 22:02:43 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 20:02:43 +0000 Subject: [issue18368] PyOS_StdioReadline() leaks memory when realloc() fails Message-ID: <1373054563.49.0.685653845765.issue18368@psf.upfronthosting.co.za> New submission from Christian Heimes: PyOS_StdioReadline() contains code such as: p = (char *)PyMem_REALLOC(p, n + incr); The code looses its pointer to p when realloc fails and has no chance to free the memory in p. Also the code sets PyExc_OverflowError when incr > INT_MAX but it doesn't return NULL to signal the error. ---------- components: Interpreter Core files: osreadline.patch keywords: patch messages: 192352 nosy: christian.heimes priority: normal severity: normal stage: patch review status: open title: PyOS_StdioReadline() leaks memory when realloc() fails type: resource usage versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30782/osreadline.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 22:10:37 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 20:10:37 +0000 Subject: [issue18369] X509 cert class for ssl module Message-ID: <1373055037.38.0.259814019718.issue18369@psf.upfronthosting.co.za> New submission from Christian Heimes: I'm working on a X509 certificate class for the SSL module. Eventually methods like getpeercert() are going to return X509 instances and the Python interface can decide if it should return a dict, DER bytes or whatever. IMHO it's a mandatory requirement for OCSP support, too. The patch contains a very real proof of concept. ---------- components: Extension Modules files: ssl_pyx509cert.patch keywords: patch messages: 192353 nosy: christian.heimes, pitrou priority: normal severity: normal status: open title: X509 cert class for ssl module type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file30783/ssl_pyx509cert.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 22:12:22 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Jul 2013 20:12:22 +0000 Subject: [issue18369] X509 cert class for ssl module In-Reply-To: <1373055037.38.0.259814019718.issue18369@psf.upfronthosting.co.za> Message-ID: <1373055142.54.0.623350662619.issue18369@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Yeah, this is probably inevitable. Major concern is how to maintain compatibility with getpeercert() currently returning a dict. Should we make X509 a dict subclass? (yikes :-)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 22:24:05 2013 From: report at bugs.python.org (Aivar Annamaa) Date: Fri, 05 Jul 2013 20:24:05 +0000 Subject: [issue18370] ast.parse produces -1 as col_offset for triple-quoted strings Message-ID: <1373055845.95.0.233623279769.issue18370@psf.upfronthosting.co.za> New submission from Aivar Annamaa: AST nodes for triple-quoted strings have -1 in col_offset field, as presented in the attached file. ---------- components: Interpreter Core files: col_offset_bug.py messages: 192355 nosy: Aivar.Annamaa priority: normal severity: normal status: open title: ast.parse produces -1 as col_offset for triple-quoted strings type: behavior versions: Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file30784/col_offset_bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 22:34:57 2013 From: report at bugs.python.org (Zachary Ware) Date: Fri, 05 Jul 2013 20:34:57 +0000 Subject: [issue17202] Add .bat line to .hgeol In-Reply-To: <1360824086.93.0.558513852083.issue17202@psf.upfronthosting.co.za> Message-ID: <1373056497.81.0.300021480728.issue17202@psf.upfronthosting.co.za> Zachary Ware added the comment: I have recently learned why this issue had seemed transient to me previously: the hg eol extension apparently causes hg to create all files that are not explicitly set to LF or BIN using CRLF on Windows. Thus, this is what happens: """ P:\Python\cpython\Doc>rem In a fresh checkout made with the 'eol' extension disabled: P:\Python\cpython\Doc>make.bat update The system cannot find the batch label specified - update P:\Python\cpython\Doc>cd .. P:\Python\cpython>hg up null 0 files updated, 0 files merged, 3689 files removed, 0 files unresolved P:\Python\cpython>hg --config extensions.eol= up default 3689 files updated, 0 files merged, 0 files removed, 0 files unresolved P:\Python\cpython>cd Doc P:\Python\cpython\Doc>make.bat update Updating 'tools\sphinx': At revision 89001. Updating 'tools\docutils': At revision 89001. Updating 'tools\jinja2': At revision 89001. Updating 'tools\pygments': At revision 89001. P:\Python\cpython\Doc> """ Thus, a usable workaround is to enable the eol extension in hgrc and make your checkout that way. However, this doesn't help anyone who is trying to build from a tarball; Doc/make.bat will have LF line endings and at least 'update' will not work. Perhaps a less extensive change would be to add "**.bat = BIN", and then convert Doc/make.bat to CRLF explicitly? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 22:35:36 2013 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Fri, 05 Jul 2013 20:35:36 +0000 Subject: [issue18233] SSLSocket.getpeercertchain() In-Reply-To: <1371415195.44.0.636993698614.issue18233@psf.upfronthosting.co.za> Message-ID: <1373056536.0.0.621390942646.issue18233@psf.upfronthosting.co.za> Changes by Michele Orr? : ---------- nosy: +maker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 22:38:43 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Jul 2013 20:38:43 +0000 Subject: [issue18326] Mention 'keyword only' for list.sort, improve glossary. In-Reply-To: <1372511136.61.0.278425078947.issue18326@psf.upfronthosting.co.za> Message-ID: <1373056723.43.0.0652590358315.issue18326@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The new 'which' should be 'that'. Other than that, looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 22:44:46 2013 From: report at bugs.python.org (Zachary Ware) Date: Fri, 05 Jul 2013 20:44:46 +0000 Subject: [issue18326] Mention 'keyword only' for list.sort, improve glossary. In-Reply-To: <1372511136.61.0.278425078947.issue18326@psf.upfronthosting.co.za> Message-ID: <1373057086.44.0.184279776729.issue18326@psf.upfronthosting.co.za> Changes by Zachary Ware : Added file: http://bugs.python.org/file30785/issue18326.that.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 22:52:21 2013 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Fri, 05 Jul 2013 20:52:21 +0000 Subject: [issue18369] X509 cert class for ssl module In-Reply-To: <1373055037.38.0.259814019718.issue18369@psf.upfronthosting.co.za> Message-ID: <1373057541.39.0.5069445885.issue18369@psf.upfronthosting.co.za> Changes by Michele Orr? : ---------- nosy: +maker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 22:55:29 2013 From: report at bugs.python.org (YS) Date: Fri, 05 Jul 2013 20:55:29 +0000 Subject: [issue18371] Should be able to specify SSL version for smtplib Message-ID: <1373057729.16.0.874642993886.issue18371@psf.upfronthosting.co.za> New submission from YS: Currently, smtplib is not able to connect to hotmail, giving an SSL version error (at least on some platfroms). See http://stackoverflow.com/q/17434143/429850 and http://stackoverflow.com/q/17011816/429850. Perhaps there should be an option like smtplib.SMTP(ssl_version=SSLV3)? ---------- components: Library (Lib) messages: 192358 nosy: yasaharu priority: normal severity: normal status: open title: Should be able to specify SSL version for smtplib type: behavior versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 22:55:42 2013 From: report at bugs.python.org (Aivar Annamaa) Date: Fri, 05 Jul 2013 20:55:42 +0000 Subject: [issue18370] ast.parse produces -1 as col_offset for triple-quoted strings In-Reply-To: <1373055845.95.0.233623279769.issue18370@psf.upfronthosting.co.za> Message-ID: <1373057742.56.0.363216993755.issue18370@psf.upfronthosting.co.za> Aivar Annamaa added the comment: Didn't notice before: the lineno attribute is also wrong ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 22:58:31 2013 From: report at bugs.python.org (John McDonald) Date: Fri, 05 Jul 2013 20:58:31 +0000 Subject: [issue3692] improper scope in list comprehension, when used in class declaration In-Reply-To: <1219792814.12.0.663300668565.issue3692@psf.upfronthosting.co.za> Message-ID: <1373057911.79.0.783796839199.issue3692@psf.upfronthosting.co.za> John McDonald added the comment: Could we possibly revisit this? This feels like an implementation detail, not something specified. Consider the different cases: Type "help", "copyright", "credits" or "license" for more information. >>> class A: ... b = 5 ... print(locals()) ... x = [i*i for i in range(b)] ... {'__qualname__': 'A', '__locals__': {...}, '__module__': '__main__', 'b': 5} This case works, and shows that 'b' is clearly in locals(). >>> class A: ... b = 5 ... c = b * b ... print(locals()) ... d = [] ... for i in range(b): ... d.append(i*i) ... print(locals()) ... e = [i*i for i in range(b) if i*i < c] ... {'__locals__': {...}, '__qualname__': 'A', 'b': 5, '__module__': '__main__', 'c': 25} {'__qualname__': 'A', 'b': 5, '__module__': '__main__', 'c': 25, 'i': 4, 'd': [0, 1, 4, 9, 16], '__locals__': {...}} Traceback (most recent call last): File "", line 1, in File "", line 9, in A File "", line 9, in NameError: global name 'c' is not defined Again, it feels really arbitrary that the variable can be used in certain places in the list comprehension, but not others. And of course, all of this works properly if you place the definitions either at global scope or within a function. ---------- nosy: +John.McDonald _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 23:09:13 2013 From: report at bugs.python.org (Aivar Annamaa) Date: Fri, 05 Jul 2013 21:09:13 +0000 Subject: [issue18370] ast.parse produces wrong lineno and col_offset for triple-quoted strings In-Reply-To: <1373055845.95.0.233623279769.issue18370@psf.upfronthosting.co.za> Message-ID: <1373058553.94.0.372288569011.issue18370@psf.upfronthosting.co.za> Changes by Aivar Annamaa : ---------- title: ast.parse produces -1 as col_offset for triple-quoted strings -> ast.parse produces wrong lineno and col_offset for triple-quoted strings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 23:10:21 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 21:10:21 +0000 Subject: [issue18369] X509 cert class for ssl module In-Reply-To: <1373055037.38.0.259814019718.issue18369@psf.upfronthosting.co.za> Message-ID: <1373058621.53.0.0873159772734.issue18369@psf.upfronthosting.co.za> Christian Heimes added the comment: A dict subclass? Oh heck ... I have slightly different plans. But first, do you agree that the _ssl C extension and all its methods are consider an internal API? How about the _ssl module's method returns X509 objects and the Python module calls methods on the X509 object like get_info() -> dict or get_der() -> bytes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 23:12:17 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Jul 2013 21:12:17 +0000 Subject: [issue18369] X509 cert class for ssl module In-Reply-To: <1373058621.53.0.0873159772734.issue18369@psf.upfronthosting.co.za> Message-ID: <1373058729.2613.0.camel@fsol> Antoine Pitrou added the comment: > I have slightly different plans. But first, do you agree that the _ssl > C extension and all its methods are consider an internal API? How > about the _ssl module's method returns X509 objects and the Python > module calls methods on the X509 object like get_info() -> dict or > get_der() -> bytes? Sounds fine, yes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 23:52:46 2013 From: report at bugs.python.org (Madison May) Date: Fri, 05 Jul 2013 21:52:46 +0000 Subject: [issue18351] Incorrect variable name in importlib._bootstrap._get_sourcefile In-Reply-To: <1372857072.23.0.433996899216.issue18351@psf.upfronthosting.co.za> Message-ID: <1373061166.56.0.861377783196.issue18351@psf.upfronthosting.co.za> Madison May added the comment: Here's a preliminary attempt at a patch and a small set of test cases for _get_sourcefile. I fixed one more spelling error in _get_sourcefile (bytcode -> bytecode) and tweaked a bit of logic. Instead of: extension.lower()[-3:-1] != '.py' I think we needed extension.lower()[-3:-1] != 'py' You must have been having a rough day, Brett =). Anyhow, when you get a chance, take a look at this first attempt and let me know what you'd do differently. Thanks, Madison ---------- Added file: http://bugs.python.org/file30786/Issue18351_Python3-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:07:15 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 22:07:15 +0000 Subject: [issue18371] Should be able to specify SSL version for smtplib In-Reply-To: <1373057729.16.0.874642993886.issue18371@psf.upfronthosting.co.za> Message-ID: <1373062035.85.0.570458306116.issue18371@psf.upfronthosting.co.za> Christian Heimes added the comment: As this counts as a new feature it can't be implemented in Python 2.7. Only fixes are applied to 2.7. You have to roll your own subclass that overwrites starttls() or _get_socket(). I'm sorry for the inconvenience. Starting with Python 3.3 the methods support SSLContext object as argument. http://docs.python.org/3/library/smtplib.html#smtplib.SMTP.starttls ---------- nosy: +christian.heimes, pitrou resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:13:17 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 22:13:17 +0000 Subject: [issue8931] '#' has no affect with 'c' type In-Reply-To: <1275865635.78.0.716511257083.issue8931@psf.upfronthosting.co.za> Message-ID: <1373062397.69.0.0450215614518.issue8931@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm moving the patch to Python 3.4. 2.7 to 3.3 are out of scope as the change might break software. ---------- nosy: +christian.heimes stage: -> patch review versions: +Python 3.4 -Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:23:13 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 22:23:13 +0000 Subject: [issue14748] spwd.getspall() is returning LDAP (non local) users too In-Reply-To: <1336464116.12.0.238019715557.issue14748@psf.upfronthosting.co.za> Message-ID: <1373062993.97.0.977731284077.issue14748@psf.upfronthosting.co.za> Christian Heimes added the comment: Dave has explained the problem very well. I like to add one thing. The module just returns what your operation system's getspent() API returns. http://linux.die.net/man/3/getspnam Please ask your vendor for more details, too. ---------- nosy: +christian.heimes resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:29:33 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 22:29:33 +0000 Subject: [issue6642] returning after forking a child thread doesn't call Py_Finalize In-Reply-To: <1249410110.52.0.861898541816.issue6642@psf.upfronthosting.co.za> Message-ID: <1373063373.98.0.65657213587.issue6642@psf.upfronthosting.co.za> Christian Heimes added the comment: Python 3.x is affected, too. ---------- nosy: +christian.heimes versions: +Python 2.7, Python 3.3, Python 3.4 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:30:10 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 22:30:10 +0000 Subject: [issue6642] returning after forking a child thread doesn't call Py_Finalize In-Reply-To: <1249410110.52.0.861898541816.issue6642@psf.upfronthosting.co.za> Message-ID: <1373063410.74.0.0226920600076.issue6642@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- components: +Interpreter Core stage: -> patch review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:34:06 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 22:34:06 +0000 Subject: [issue9175] ctypes doesn't build on hp-ux In-Reply-To: <1278407736.6.0.642117116261.issue9175@psf.upfronthosting.co.za> Message-ID: <1373063646.74.0.472674618092.issue9175@psf.upfronthosting.co.za> Christian Heimes added the comment: Is this issue still relevant? ---------- nosy: +christian.heimes status: open -> languishing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:53:10 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 22:53:10 +0000 Subject: [issue18372] _Pickler_New() doesn't call PyObject_GC_Track(self) Message-ID: <1373064790.68.0.920175606727.issue18372@psf.upfronthosting.co.za> New submission from Christian Heimes: In _Pickler_New() PicklerObject is allocated with self = PyObject_GC_New(PicklerObject, &Pickler_Type); but PyObject_GC_Track(self) is never called, same for _Unpickler_New(). I think it's a bug. ---------- components: Extension Modules messages: 192369 nosy: christian.heimes priority: normal severity: normal stage: needs patch status: open title: _Pickler_New() doesn't call PyObject_GC_Track(self) type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:56:37 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Fri, 05 Jul 2013 22:56:37 +0000 Subject: [issue6642] returning after forking a child thread doesn't call Py_Finalize In-Reply-To: <1249410110.52.0.861898541816.issue6642@psf.upfronthosting.co.za> Message-ID: <1373064997.29.0.128183604884.issue6642@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Shouldn't the child process be terminating using os._exit()? ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:57:36 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 22:57:36 +0000 Subject: [issue6128] Consequences of using Py_TPFLAGS_HAVE_GC are incompletely explained In-Reply-To: <1243457336.14.0.579311647458.issue6128@psf.upfronthosting.co.za> Message-ID: <1373065056.05.0.604459919469.issue6128@psf.upfronthosting.co.za> Christian Heimes added the comment: Python's extension modules aren't consistent. Some places deallocate the object with PyObject_Del(), other places are using PyObject_GC_Del() or simple Py_DECREF(). ---------- nosy: +christian.heimes priority: normal -> low stage: -> needs patch type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:58:44 2013 From: report at bugs.python.org (Daniel Holth) Date: Fri, 05 Jul 2013 22:58:44 +0000 Subject: [issue18373] implement sys.get/setbyteswarningflag() Message-ID: <1373065124.82.0.249288626652.issue18373@psf.upfronthosting.co.za> New submission from Daniel Holth: This patch lets the user get/set the byteswarningflag() to control whether warnings are emitted at runtime (pursuant to the configuration of the warnings module, of course). The idea is that a user who is concerned with interacting with bytes correctly would use a context manager to set str(bytes) to raise exceptions during a critical serialization. TODO the hypothetical context manager would also have to push/pop the warnings state to work correctly. Maybe str(bytes) can raise a regular exception if byteswarningflag() is high enough? TODO don't know if this plays nicely when there are no threads ---------- files: byteswarningflag.patch keywords: patch messages: 192372 nosy: dholth priority: normal severity: normal status: open title: implement sys.get/setbyteswarningflag() versions: Python 3.4 Added file: http://bugs.python.org/file30787/byteswarningflag.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 01:01:28 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 23:01:28 +0000 Subject: [issue10179] os.stat fails on mapped network drive In-Reply-To: <1287845524.9.0.573963701431.issue10179@psf.upfronthosting.co.za> Message-ID: <1373065288.74.0.942134437152.issue10179@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 01:02:39 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 23:02:39 +0000 Subject: [issue9679] unicode DNS names in urllib, urlopen In-Reply-To: <1282721968.42.0.723881796109.issue9679@psf.upfronthosting.co.za> Message-ID: <1373065359.85.0.169822014865.issue9679@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 01:12:36 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 23:12:36 +0000 Subject: [issue11366] xml.etree.ElementTree.Element: docs should mention immediate subelement In-Reply-To: <1299029422.8.0.159025283655.issue11366@psf.upfronthosting.co.za> Message-ID: <1373065956.16.0.0506478786175.issue11366@psf.upfronthosting.co.za> Christian Heimes added the comment: The introduction [1] to etree explains it: Element.findall() finds only elements with a tag which are direct children of the current element. IMHO it's also the obvious outcome for anybody familiar with XML and XPath. [1] http://docs.python.org/3/library/xml.etree.elementtree.html#finding-interesting-elements ---------- nosy: +christian.heimes resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 01:17:06 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 23:17:06 +0000 Subject: [issue1703592] have a way to ignore nonexisting locales in locale.setlocale Message-ID: <1373066226.19.0.12632887615.issue1703592@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- versions: +Python 3.4 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 01:21:10 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 23:21:10 +0000 Subject: [issue17221] Resort Misc/NEWS In-Reply-To: <1361135741.75.0.253129131493.issue17221@psf.upfronthosting.co.za> Message-ID: <1373066470.96.0.749116878268.issue17221@psf.upfronthosting.co.za> Christian Heimes added the comment: I think this issue can be closed. :) ---------- nosy: +christian.heimes resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 01:23:35 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 23:23:35 +0000 Subject: [issue12807] Optimization/refactoring for {bytearray, bytes, unicode}.strip() In-Reply-To: <1313981941.49.0.99491814096.issue12807@psf.upfronthosting.co.za> Message-ID: <1373066615.83.0.809870641284.issue12807@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 01:25:52 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 23:25:52 +0000 Subject: [issue17628] str==str: compare the first character before calling memcmp() In-Reply-To: <1365024552.84.0.0461498193244.issue17628@psf.upfronthosting.co.za> Message-ID: <1373066752.47.0.125590242746.issue17628@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 01:28:41 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 23:28:41 +0000 Subject: [issue13651] Improve redirection in urllib In-Reply-To: <1324577379.51.0.5468672041.issue13651@psf.upfronthosting.co.za> Message-ID: <1373066921.36.0.232288272802.issue13651@psf.upfronthosting.co.za> Christian Heimes added the comment: New features have to go into 3.4 ---------- nosy: +christian.heimes versions: -Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 01:30:25 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 23:30:25 +0000 Subject: [issue18281] tarfile defines stat constants In-Reply-To: <1371912078.43.0.227039082522.issue18281@psf.upfronthosting.co.za> Message-ID: <1373067025.25.0.147093587808.issue18281@psf.upfronthosting.co.za> Christian Heimes added the comment: OK, your proposal is more appealing. Any last words before the constants are gone for good? ---------- assignee: -> christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 01:32:46 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 23:32:46 +0000 Subject: [issue11757] test_subprocess.test_communicate_timeout_large_ouput failure on select(): negative timeout? In-Reply-To: <1301869705.52.0.173979620005.issue11757@psf.upfronthosting.co.za> Message-ID: <1373067166.42.0.26821271691.issue11757@psf.upfronthosting.co.za> Christian Heimes added the comment: Is there anything left to do here? ---------- nosy: +christian.heimes resolution: -> fixed stage: needs patch -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 01:34:31 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 23:34:31 +0000 Subject: [issue1298813] sysmodule.c: realpath() is unsafe Message-ID: <1373067271.4.0.955110525954.issue1298813@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 01:58:34 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2013 23:58:34 +0000 Subject: [issue10080] Py_Initialize crashes when stdout has been redirected with freopen In-Reply-To: <1286943075.1.0.984332542932.issue10080@psf.upfronthosting.co.za> Message-ID: <1373068714.06.0.437914295055.issue10080@psf.upfronthosting.co.za> Christian Heimes added the comment: I can't reproduce the issue with Python 3.2 and dup2 on Linux. $ gcc -o py_main py_main_dup2.c -I/usr/include/python3.2mu -lpython3.2mu -lm -pthread -ldl -lutil $ ./py_main log.txt contains 'foo' and the debug message, too. Is this still an issue for you? ---------- nosy: +christian.heimes resolution: -> works for me status: open -> languishing versions: +Python 3.3, Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:30:06 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Jul 2013 00:30:06 +0000 Subject: [issue11309] #include in Objects/unicodetype_db.h and Objects/unicodectype.c In-Reply-To: <1298559104.85.0.0545098544646.issue11309@psf.upfronthosting.co.za> Message-ID: <1373070606.38.0.805378997098.issue11309@psf.upfronthosting.co.za> Christian Heimes added the comment: Python 2.7 fails even with --enable-unicode=ucs4: $ ./configure --with-wctype-functions --enable-unicode=ucs4 $ make ... In file included from Objects/unicodectype.c:34:0: Objects/unicodetype_db.h: In function '_PyUnicodeUCS4_IsWhitespace': Objects/unicodetype_db.h:3277:5: warning: implicit declaration of function 'iswspace' [-Wimplicit-function-declaration] Objects/unicodectype.c: In function '_PyUnicodeUCS4_IsLowercase': Objects/unicodectype.c:192:5: warning: implicit declaration of function 'iswlower' [-Wimplicit-function-declaration] Objects/unicodectype.c: In function '_PyUnicodeUCS4_IsUppercase': Objects/unicodectype.c:197:5: warning: implicit declaration of function 'iswupper' [-Wimplicit-function-declaration] Objects/unicodectype.c: In function '_PyUnicodeUCS4_ToLowercase': Objects/unicodectype.c:202:5: warning: implicit declaration of function 'towlower' [-Wimplicit-function-declaration] Objects/unicodectype.c:202:12: warning: incompatible implicit declaration of built-in function 'towlower' [enabled by default] Objects/unicodectype.c: In function '_PyUnicodeUCS4_ToUppercase': Objects/unicodectype.c:207:5: warning: implicit declaration of function 'towupper' [-Wimplicit-function-declaration] Objects/unicodectype.c:207:12: warning: incompatible implicit declaration of built-in function 'towupper' [enabled by default] Objects/unicodectype.c: In function '_PyUnicodeUCS4_IsAlpha': Objects/unicodectype.c:212:5: warning: implicit declaration of function 'iswalpha' [-Wimplicit-function-declaration] I have attached a patch that checks for wctype.h and includes it for WANT_WCTYPE_FUNCTIONS. ---------- keywords: +patch nosy: +christian.heimes stage: -> patch review Added file: http://bugs.python.org/file30788/11309_wctype.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:30:51 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Jul 2013 00:30:51 +0000 Subject: [issue9660] PEP 383: socket module doesn't handle undecodable protocol or service names In-Reply-To: <1282501562.64.0.000983913636939.issue9660@psf.upfronthosting.co.za> Message-ID: <1373070651.79.0.330722954693.issue9660@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes versions: +Python 3.3, Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:34:55 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Jul 2013 00:34:55 +0000 Subject: [issue10760] tarfile doesn't handle sysfs well In-Reply-To: <1293037554.87.0.808780630488.issue10760@psf.upfronthosting.co.za> Message-ID: <1373070895.87.0.0524835980533.issue10760@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:36:07 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Jul 2013 00:36:07 +0000 Subject: [issue6284] C/API PyErr_AsUnicode() In-Reply-To: <1244999019.35.0.083174578591.issue6284@psf.upfronthosting.co.za> Message-ID: <1373070967.61.0.854370462683.issue6284@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- components: +Interpreter Core -None versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:36:42 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Jul 2013 00:36:42 +0000 Subject: [issue17792] Unhelpful UnboundLocalError due to del'ing of exception target In-Reply-To: <1366329322.51.0.489771554551.issue17792@psf.upfronthosting.co.za> Message-ID: <1373071002.07.0.29556422377.issue17792@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:41:25 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Jul 2013 00:41:25 +0000 Subject: [issue15197] test_gettext failure on Win64 buildbot In-Reply-To: <1340746759.25.0.721381261355.issue15197@psf.upfronthosting.co.za> Message-ID: <1373071285.33.0.546887761348.issue15197@psf.upfronthosting.co.za> Christian Heimes added the comment: Looks fine now. I haven't seen that error in a while. Thanks! ---------- nosy: +christian.heimes resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:42:00 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Jul 2013 00:42:00 +0000 Subject: [issue3591] elementtree tests do not include bytes handling In-Reply-To: <1219078669.04.0.473516144349.issue3591@psf.upfronthosting.co.za> Message-ID: <1373071320.47.0.43316785415.issue3591@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- versions: +Python 3.4 -Python 3.0, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:49:40 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Jul 2013 00:49:40 +0000 Subject: [issue6671] webbrowser doesn't respect xfce default browser In-Reply-To: <1249814125.92.0.530552321419.issue6671@psf.upfronthosting.co.za> Message-ID: <1373071780.72.0.960157415577.issue6671@psf.upfronthosting.co.za> Christian Heimes added the comment: I have a box with Ubuntu 12.04 and XFCE4: declare -x XDG_CURRENT_DESKTOP="XFCE" declare -x DESKTOP_SESSION="xubuntu" ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 05:47:32 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Jul 2013 03:47:32 +0000 Subject: [issue6671] webbrowser doesn't respect xfce default browser In-Reply-To: <1249814125.92.0.530552321419.issue6671@psf.upfronthosting.co.za> Message-ID: <1373082452.72.0.488022148731.issue6671@psf.upfronthosting.co.za> ?ric Araujo added the comment: I don?t understand what your message is saying, Christian. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 06:15:44 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 06 Jul 2013 04:15:44 +0000 Subject: [issue18373] implement sys.get/setbyteswarningflag() In-Reply-To: <1373065124.82.0.249288626652.issue18373@psf.upfronthosting.co.za> Message-ID: <1373084144.36.0.640373284092.issue18373@psf.upfronthosting.co.za> R. David Murray added the comment: Why wouldn't you just enable bytes warning and fix all the code to work correctly? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 08:47:17 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Jul 2013 06:47:17 +0000 Subject: [issue3591] elementtree tests do not include bytes handling In-Reply-To: <1219078669.04.0.473516144349.issue3591@psf.upfronthosting.co.za> Message-ID: <1373093237.65.0.653984778835.issue3591@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +eli.bendersky, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 09:59:29 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 07:59:29 +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: <1373097569.95.0.0057736217202.issue14455@psf.upfronthosting.co.za> Changes by Ronald Oussoren : Removed file: http://bugs.python.org/file30526/plistlib_generate_testdata.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 10:00:10 2013 From: report at bugs.python.org (Senko Rasic) Date: Sat, 06 Jul 2013 08:00:10 +0000 Subject: [issue18336] codecs: Link to readline module (history) instead of fd.readline() In-Reply-To: <1372663191.71.0.440770388569.issue18336@psf.upfronthosting.co.za> Message-ID: <1373097609.99.0.210076800275.issue18336@psf.upfronthosting.co.za> Senko Rasic added the comment: Here's a patch just removing the reference. Although potentially referencing io.IOBase.readline instead would be more correct, IMHO it'd be just more confusing to users reading the docs. ---------- keywords: +patch nosy: +senko Added file: http://bugs.python.org/file30789/codecs-readline-docstring-fix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 10:00:47 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 08:00:47 +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: <1373097647.09.0.322297745059.issue14455@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Updated test-data generator: it now encodes the data using base64, to make it easier to generate a file with limited line lengths. ---------- Added file: http://bugs.python.org/file30790/plistlib_generate_testdata.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 10:05:12 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 08:05:12 +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: <1373097912.79.0.300239997335.issue14455@psf.upfronthosting.co.za> Ronald Oussoren added the comment: v8 of the patch contains 1 change from v7: the test data is encoded in base64. This was primarily done to ensure that the file has usable line lengths. A nice side effect is that it is now harder than ever to manually change the test data, as the comment mentions there is a script for generating that data. As always I'd appreciate feedback on this patch, especially on deprecating the current public API and introducing a new (PEP8 compliant) one. ---------- Added file: http://bugs.python.org/file30791/plistlib_generate_testdata.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 10:25:18 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Jul 2013 08:25:18 +0000 Subject: [issue17860] subprocess docs lack info how to use output result In-Reply-To: <1367159799.26.0.456231833917.issue17860@psf.upfronthosting.co.za> Message-ID: <3bnQwF66ZZz7LjW@mail.python.org> Roundup Robot added the comment: New changeset a2c2ffa1a41c by Ronald Oussoren in branch '3.3': Issue #17860: explicitly mention that std* streams are opened in binary mode by default. http://hg.python.org/cpython/rev/a2c2ffa1a41c New changeset ae8b054155c1 by Ronald Oussoren in branch 'default': (3.3->default) Issue #17860: explicitly mention that std* streams are opened in binary mode by default. http://hg.python.org/cpython/rev/ae8b054155c1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 10:26:55 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 08:26:55 +0000 Subject: [issue17860] subprocess docs lack info how to use output result In-Reply-To: <1367159799.26.0.456231833917.issue17860@psf.upfronthosting.co.za> Message-ID: <1373099215.33.0.139010830401.issue17860@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The documentation for 3.3 and default now explicitly mentions that the std* streams are opened as binary streams when universal_newlines is false. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 10:36:18 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 06 Jul 2013 08:36:18 +0000 Subject: [issue6642] returning after forking a child thread doesn't call Py_Finalize In-Reply-To: <1249410110.52.0.861898541816.issue6642@psf.upfronthosting.co.za> Message-ID: <1373099778.06.0.191537403783.issue6642@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 10:39:00 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 08:39:00 +0000 Subject: [issue18049] Re-enable threading test on OSX In-Reply-To: <1369405666.05.0.54874731136.issue18049@psf.upfronthosting.co.za> Message-ID: <1373099940.57.0.364541071074.issue18049@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I intend to apply this patch to default (and only that branch) after running the testsuite and with a small change: the stack size will be 0x1000000 (double it current value) to sync it with the stack size for the main thread, which was recently set to that value in the default branch. ---------- keywords: +needs review, patch versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 10:49:33 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 08:49:33 +0000 Subject: [issue9175] ctypes doesn't build on hp-ux In-Reply-To: <1278407736.6.0.642117116261.issue9175@psf.upfronthosting.co.za> Message-ID: <1373100573.47.0.404290361789.issue9175@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Good question, the libffi copy included with cpython has recently changed. There are HP-UX buildbots, but they have build problems. I'll try to test on an HP-UX system I've access to. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 10:50:56 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 08:50:56 +0000 Subject: [issue8410] Fix emulated lock to be 'fair' In-Reply-To: <1271361646.51.0.206027864382.issue8410@psf.upfronthosting.co.za> Message-ID: <1373100656.94.0.165665330847.issue8410@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- assignee: ronaldoussoren -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 10:51:49 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 08:51:49 +0000 Subject: [issue5262] PythonLauncher considered harmfull In-Reply-To: <1234638505.38.0.029039550018.issue5262@psf.upfronthosting.co.za> Message-ID: <1373100709.56.0.831580041028.issue5262@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 11:07:42 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 09:07:42 +0000 Subject: [issue9175] ctypes doesn't build on hp-ux In-Reply-To: <1278407736.6.0.642117116261.issue9175@psf.upfronthosting.co.za> Message-ID: <1373101662.79.0.756428792721.issue9175@psf.upfronthosting.co.za> Ronald Oussoren added the comment: So much for testing, the machine I'm trying to test on is fairly old and doesn't have an up to date compiler. That compiler crashes when trying to build the 2.7.5 release :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 11:27:41 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 09:27:41 +0000 Subject: [issue10666] OS X installer variants have confusing readline differences In-Reply-To: <1291931066.91.0.86480513545.issue10666@psf.upfronthosting.co.za> Message-ID: <1373102861.82.0.554341896454.issue10666@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Download link for the latest version: http://opensource.apple.com/tarballs/libedit/libedit-31.tar.gz The archive only includes an Xcode based build system, the makefile based system was removed some time ago. It might be better to use instead (which is a distribution of netbsd libedit with a configure script) I've attached a patch (relative to the tip of the 3.3 branch for now) that teaches build-installer to use a static build of the trysoee distribution of libedit. The patch is completely untested at the moment, I will be able to build a 10.6/intel installer tonight and testing with the PPC build will have to wait until I get back from EP. A problem with using libedit unconditionally: we will likely get complaints from users when changing this in a bugfix release, it would be better to only apply this patch to the default branch. ---------- Added file: http://bugs.python.org/file30792/issue-10666.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 11:30:29 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 09:30:29 +0000 Subject: [issue18289] python.org Interactive interpreter linked with libedit can segfault on future OS X In-Reply-To: <1372046917.43.0.988841016926.issue18289@psf.upfronthosting.co.za> Message-ID: <1373103029.65.0.313819948812.issue18289@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I propose to close this issue because this is likely a bug in a beta version of OSX and that's not something we'll try to work around in the python sources. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 11:35:02 2013 From: report at bugs.python.org (Aivar Annamaa) Date: Sat, 06 Jul 2013 09:35:02 +0000 Subject: [issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s Message-ID: <1373103302.65.0.774257874247.issue18374@psf.upfronthosting.co.za> New submission from Aivar Annamaa: When parsing following program: 1+2-3 ast.parse gives col_offset=3 to outermost BinOp (as shown by the attached test script). Correct col_offset would be 0 for both BinOp-s ---------- components: Interpreter Core files: binop_bug.py messages: 192394 nosy: Aivar.Annamaa priority: normal severity: normal status: open title: ast.parse gives wrong position (col_offset) for some BinOp-s versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file30793/binop_bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 11:44:32 2013 From: report at bugs.python.org (Aivar Annamaa) Date: Sat, 06 Jul 2013 09:44:32 +0000 Subject: [issue18370] ast.parse produces wrong lineno and col_offset for triple-quoted strings In-Reply-To: <1373055845.95.0.233623279769.issue18370@psf.upfronthosting.co.za> Message-ID: <1373103872.56.0.439215395732.issue18370@psf.upfronthosting.co.za> Aivar Annamaa added the comment: Seems this issue is a duplicate of http://bugs.python.org/issue16806 ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 11:47:58 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 09:47:58 +0000 Subject: [issue18136] Put local build paths before system build paths in configure.ac and Makefile.pre.in In-Reply-To: <1370382090.88.0.902200330561.issue18136@psf.upfronthosting.co.za> Message-ID: <1373104078.46.0.307571248677.issue18136@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'm not sure what's going on here, the build already seems to behave correctly. What I've done: * Create a python installation in /opt/python2.7 (configure --prefix=/opt/python2.7; make; make install) * Now build and the tip of the default branch: (./configure --prefix=/tmp/cp34 CPPFLAGS="-I/opt/python2.7/include" LDFLAGS="-L/opt/python2.7/lib" CFLAGS="-Wno-unused-value -Wno-empty-body -Qunused-arguments" CC=clang; make; make test) Tests passed correctly. I'm now rerunning the build with '-I/opt/python2.7/include/python2.7' to ensure that the '#include "Python.h"' could find 2.7 header on the compiler search path. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 11:58:32 2013 From: report at bugs.python.org (=?utf-8?q?Tomasz_Ma=C4=87kowiak?=) Date: Sat, 06 Jul 2013 09:58:32 +0000 Subject: [issue18342] Use the repr of a module name for ModuleNotFoundError in ceval.c In-Reply-To: <1372696430.42.0.571776913898.issue18342@psf.upfronthosting.co.za> Message-ID: <1373104712.58.0.902167272362.issue18342@psf.upfronthosting.co.za> Tomasz Ma?kowiak added the comment: Attaching a test case and a patch for formatting the module name with PyObject_Repr() not PyObject_Str(). ---------- keywords: +patch nosy: +kurazu Added file: http://bugs.python.org/file30794/bug18342.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 12:00:46 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 10:00:46 +0000 Subject: [issue18136] Put local build paths before system build paths in configure.ac and Makefile.pre.in In-Reply-To: <1370382090.88.0.902200330561.issue18136@psf.upfronthosting.co.za> Message-ID: <1373104846.31.0.879521219745.issue18136@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Also the compiler invocations looks fine: for the main build: ... clang -c -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Wno-unused-value -Wno-empty-body -Qunused-arguments -I. -IInclude -I../Include -I/opt/python2.7/include/python2.7 -DPy_BUILD_CORE -o Python/_warnings.o ../Python/_warnings.c ... And for an extension: clang -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Wno-unused-value -Wno-empty-body -Qunused-arguments -DHAVE_EXPAT_CONFIG_H=1 -DUSE_PYEXPAT_CAPI -I/Users/ronald/Projects/python/rw/default/Modules/expat -I../Include -I. -IInclude -I/opt/python2.7/include/python2.7 -I/usr/local/include -I/Users/ronald/Projects/python/rw/default/Include -I/Users/ronald/Projects/python/rw/default/build2 -c /Users/ronald/Projects/python/rw/default/Modules/_elementtree.c -o build/temp.macosx-10.8-x86_64-3.4/Users/ronald/Projects/python/rw/default/Modules/_elementtree.o (Both should be a single line, not sure of that survives copy&paste) Both with -I/opt/python2.7/include and -I/opt/python2.7/include/python2.7 the build works correctly, and test_build_ext passes without problems. I have no idea why this failed on Brett's machine :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 12:05:45 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 10:05:45 +0000 Subject: [issue17557] test_getgroups of test_posix can fail on OS X 10.8 if more than 16 groups In-Reply-To: <1364378141.47.0.183536890409.issue17557@psf.upfronthosting.co.za> Message-ID: <1373105145.9.0.927799870658.issue17557@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Have you heard anything from Apple? If you have a radar number I could try to ping someone at Apple. I'd be in favor of working around this issue in posixmodule.c if they don't respond or if they won't fix the issue in 10.8 (and I wouldn't be surprised if they won't). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 12:08:12 2013 From: report at bugs.python.org (Senko Rasic) Date: Sat, 06 Jul 2013 10:08:12 +0000 Subject: [issue13359] urllib2 doesn't escape spaces in http requests In-Reply-To: <1320610427.07.0.982938376676.issue13359@psf.upfronthosting.co.za> Message-ID: <1373105292.78.0.518055708608.issue13359@psf.upfronthosting.co.za> Senko Rasic added the comment: I vote for the parse method converting the spaces (and only the spaces) explicitly, for the following reasons: * the spaces must be encoded for the server to accept them * no user-encoded url will ever have spaces in them * space quoting is idempotent: quote(quote(' ')) == quote(' ') * if the user did get an exception from Request in case of invalid url containing the spaces, the only thing he or she can do is to quote the url string Here's a patch implementing this. The change allows for any whitespace character in the selector part of the url (and in particular, '\n'), not only ' '. ---------- nosy: +senko Added file: http://bugs.python.org/file30795/urllib-request-space-encode.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 12:09:46 2013 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 06 Jul 2013 10:09:46 +0000 Subject: [issue18375] python -m test --randseed 1234 does not randomize tests Message-ID: <1373105386.95.0.445511556966.issue18375@psf.upfronthosting.co.za> New submission from Florent Xicluna: I noticed a minor issue with regrtest. IMHO it should assume --randomize when you pass --randseed. ---------- assignee: flox components: Tests messages: 192401 nosy: flox priority: normal severity: normal stage: needs patch status: open title: python -m test --randseed 1234 does not randomize tests type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 12:11:01 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Jul 2013 10:11:01 +0000 Subject: [issue6671] webbrowser doesn't respect xfce default browser In-Reply-To: <1249814125.92.0.530552321419.issue6671@psf.upfronthosting.co.za> Message-ID: <1373105461.95.0.585507394542.issue6671@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm sorry for the confusion. My Xubuntu test box sets different environment variables than your system with xfce. It sets os.environ.get("DESKTOP_SESSION") == "xubuntu" and os.environ.get("XDG_CURRENT_DESKTOP") == "XFCE". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 12:20:34 2013 From: report at bugs.python.org (=?utf-8?q?Tomasz_Ma=C4=87kowiak?=) Date: Sat, 06 Jul 2013 10:20:34 +0000 Subject: [issue18342] Use the repr of a module name for ModuleNotFoundError in ceval.c In-Reply-To: <1372696430.42.0.571776913898.issue18342@psf.upfronthosting.co.za> Message-ID: <1373106034.7.0.892716453097.issue18342@psf.upfronthosting.co.za> Tomasz Ma?kowiak added the comment: Attaching a modified patch with assertRaisesRegexp used. ---------- Added file: http://bugs.python.org/file30796/bug18342_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 12:22:07 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 10:22:07 +0000 Subject: [issue12990] launcher can't work on path including tradition chinese char In-Reply-To: <1316174067.93.0.0828890653583.issue12990@psf.upfronthosting.co.za> Message-ID: <1373106127.51.0.552640081768.issue12990@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This bug is ancient by now, but not fixed. I've reproduced the issue with a recent release of Python and the problem is an encoding exception in Objective-C: 2013-07-06 12:17:20.511 Python Launcher[43030:f0b] *** Terminating app due to uncaught exception 'NSCharacterConversionException', reason: 'Conversion to encoding 30 failed for string "cd '/Users/ronald/X/..."' That is because the Python Launcher tries to convert the string to ASCII, and that obviously doesn't work when the path contains Chinese characters. Fixing this should be easy enough, I expect to have a patch later today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 12:22:22 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 10:22:22 +0000 Subject: [issue12990] launcher can't work on path including tradition chinese char In-Reply-To: <1316174067.93.0.0828890653583.issue12990@psf.upfronthosting.co.za> Message-ID: <1373106142.3.0.543265850702.issue12990@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 12:24:24 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 06 Jul 2013 10:24:24 +0000 Subject: [issue18308] checkRecvmsgAddress wrong in test_socket.py (AIX failures) In-Reply-To: <1372904022.17.0.0545127815287.issue18308@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > I think the safest solution is not to compare scope_id when comparing > addresses. Agreed. However, it might be simpler to special-case the IPv6 addresses comparison by overriding it in the IPv6 sendmsg base test. Could you try the patch attached? ---------- Added file: http://bugs.python.org/file30797/test_socket_scope_id.diff _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r 6a0437adafbd Lib/test/test_socket.py --- a/Lib/test/test_socket.py Fri Jun 28 19:25:45 2013 +0200 +++ b/Lib/test/test_socket.py Sat Jul 06 12:18:10 2013 +0200 @@ -3312,7 +3312,11 @@ class SendrecvmsgUDP6TestBase(SendrecvmsgDgramFlagsBase, SendrecvmsgConnectionlessBase, ThreadedSocketTestMixin, UDP6TestBase): - pass + + def checkRecvmsgAddress(self, addr1, addr2): + # Called to compare the received address with the address of + # the peer, ignoring scope ID + self.assertEqual(addr1[:-1], addr2[:-1]) @requireAttrs(socket.socket, "sendmsg") @unittest.skipUnless(support.IPV6_ENABLED, 'IPv6 required for this test.') From report at bugs.python.org Sat Jul 6 12:28:12 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Jul 2013 10:28:12 +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: <3bnTf407jXz7Lk0@mail.python.org> Roundup Robot added the comment: New changeset 5bd3f9ed357e by Florent Xicluna in branch '3.3': Issue #18375: Assume --randomize when --randseed is used for running the testsuite. http://hg.python.org/cpython/rev/5bd3f9ed357e New changeset 7be081fa8db1 by Florent Xicluna in branch 'default': Issue #18375: merge with 3.3 http://hg.python.org/cpython/rev/7be081fa8db1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 12:30:24 2013 From: report at bugs.python.org (Ed Campbell) Date: Sat, 06 Jul 2013 10:30:24 +0000 Subject: [issue16000] test_curses should use unittest In-Reply-To: <1348263086.74.0.172285441847.issue16000@psf.upfronthosting.co.za> Message-ID: <1373106624.52.0.305328941821.issue16000@psf.upfronthosting.co.za> Ed Campbell added the comment: I think this is a real improvement. Thanks. I have a few comments: I suspect you know this, but the rendering problem occurs because of the call to curses.endwin() in tearDown(). I experimented with delaying this until teadDownClass() but this led to even more undesirable side effects with the tests running in parallel. Your print() call seems like a simple workaround. There is only a single test case so I don't see the advantage of using a setUpModule function over setUpClass. Is there one? I'd put the code in setUpClass (or possibly put the curses.setupterm() call in setUp and have neither setUpModule or setUpClass). If and when further test cases are added I'd consider factoring out common code into a setUpModule. I'd also consider putting the skip test if not sys.__stdout__.isatty() that's in your current setUpModule as a decorator with the other @unittest.skipIf class decorators. Is there a reason you singled this one out to go in setUpModule? You have a typo on line 30: 'unkwown' should be 'unknown' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 12:42:17 2013 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 06 Jul 2013 10:42:17 +0000 Subject: [issue18376] show the effective count of process when running the testsuite Message-ID: <1373107337.89.0.95411987573.issue18376@psf.upfronthosting.co.za> New submission from Florent Xicluna: It would be useful to display the number of processes used to run the test suite. (some buildbots have multiple -j on the command line, and it is unclear which one is effective) Proposal (on the third line): == CPython 3.4.0a0 (default:6d278f426417, Jul 6 2013, 10:20:02) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] == Darwin-10.8.0-x86_64-i386-64bit little-endian == /Volumes/DATA/pydev/cpython/build/test_python_56822 (1 process) Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=1, verbose=0, bytes_warning=2, quiet=0, hash_randomization=1) Using random seed 9023960 [ 1/375] test_epoll [ 2/375] test_tokenize ... == CPython 3.4.0a0 (default:6d278f426417, Jul 6 2013, 10:20:02) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] == Darwin-10.8.0-x86_64-i386-64bit little-endian == /Volumes/DATA/pydev/cpython/build/test_python_56826 (4 processes) Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=1, verbose=0, bytes_warning=2, quiet=0, hash_randomization=1) Using random seed 9023960 [ 1/375] test_epoll [ 2/375] test_tokenize ... ---------- components: Tests messages: 192408 nosy: flox priority: normal severity: normal stage: needs patch status: open title: show the effective count of process when running the testsuite type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 12:44:20 2013 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 06 Jul 2013 10:44:20 +0000 Subject: [issue18376] show the effective count of process when running the testsuite In-Reply-To: <1373107337.89.0.95411987573.issue18376@psf.upfronthosting.co.za> Message-ID: <1373107460.29.0.38595513828.issue18376@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- keywords: +patch Added file: http://bugs.python.org/file30798/issue18376_regrtest_count_processes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 12:44:34 2013 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 06 Jul 2013 10:44:34 +0000 Subject: [issue18376] show the effective count of process when running the testsuite In-Reply-To: <1373107337.89.0.95411987573.issue18376@psf.upfronthosting.co.za> Message-ID: <1373107474.3.0.783064806784.issue18376@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 12:46:02 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 06 Jul 2013 10:46:02 +0000 Subject: [issue18289] python.org Interactive interpreter linked with libedit can segfault on future OS X In-Reply-To: <1372046917.43.0.988841016926.issue18289@psf.upfronthosting.co.za> Message-ID: <1373107562.7.0.94109036633.issue18289@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Ok, closing it. Should the issue resurface in the final release of the system, please submit a new bug report (possibly linking to it here). ---------- nosy: +loewis resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 13:05:16 2013 From: report at bugs.python.org (Adam Collard) Date: Sat, 06 Jul 2013 11:05:16 +0000 Subject: [issue12681] unittest expectedFailure could take a message argument like skip does In-Reply-To: <1312285316.59.0.648531105022.issue12681@psf.upfronthosting.co.za> Message-ID: <1373108716.4.0.509512445484.issue12681@psf.upfronthosting.co.za> Adam Collard added the comment: I've got a patch for this, but I'm a bit worried about the impact on the documented API. I've tried to do the best I could to minimize it through use of keyword-arguments but I'm a bit unsure about the change (and the docs too!) I hope this is useful to someone! ---------- Added file: http://bugs.python.org/file30799/new-unittest _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 13:17:29 2013 From: report at bugs.python.org (=?utf-8?q?Tomasz_Ma=C4=87kowiak?=) Date: Sat, 06 Jul 2013 11:17:29 +0000 Subject: [issue6671] webbrowser doesn't respect xfce default browser In-Reply-To: <1249814125.92.0.530552321419.issue6671@psf.upfronthosting.co.za> Message-ID: <1373109449.55.0.306461392932.issue6671@psf.upfronthosting.co.za> Tomasz Ma?kowiak added the comment: My Xubuntu 13.04 has the same variables: 'XDG_CURRENT_DESKTOP': 'XFCE' 'DESKTOP_SESSION': 'xubuntu' as well as 'GDMSESSION': 'xubuntu' ---------- nosy: +kurazu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 13:20:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Jul 2013 11:20:27 +0000 Subject: [issue12990] launcher can't work on path including tradition chinese char In-Reply-To: <1316174067.93.0.0828890653583.issue12990@psf.upfronthosting.co.za> Message-ID: <3bnVpL2Jr2z7Lmr@mail.python.org> Roundup Robot added the comment: New changeset 7ec9255d4189 by Ronald Oussoren in branch '2.7': Issue #12990: The "Python Launcher" on OSX could not launch python scripts that have paths that include wide characters. http://hg.python.org/cpython/rev/7ec9255d4189 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 13:26:11 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Jul 2013 11:26:11 +0000 Subject: [issue12990] launcher can't work on path including tradition chinese char In-Reply-To: <1316174067.93.0.0828890653583.issue12990@psf.upfronthosting.co.za> Message-ID: <3bnVwz0jKlz7LkW@mail.python.org> Roundup Robot added the comment: New changeset 27eb350d5056 by Ronald Oussoren in branch '3.3': Issue #12990: The "Python Launcher" on OSX could not launch python scripts that have paths that include wide characters. http://hg.python.org/cpython/rev/27eb350d5056 New changeset b6ebc726d5fe by Ronald Oussoren in branch 'default': (3.3->default) Issue #12990: The "Python Launcher" on OSX could not launch python scripts that have paths that include wide characters. http://hg.python.org/cpython/rev/b6ebc726d5fe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 13:27:18 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 11:27:18 +0000 Subject: [issue12990] launcher can't work on path including tradition chinese char In-Reply-To: <1316174067.93.0.0828890653583.issue12990@psf.upfronthosting.co.za> Message-ID: <1373110038.37.0.699631766989.issue12990@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've commit a fix for this problem in the branches for 2.7, 3.3 and the upcoming 3.4 release. This means the problem will be fixed in the next releases from those branches. ---------- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 13:28:38 2013 From: report at bugs.python.org (Adam Collard) Date: Sat, 06 Jul 2013 11:28:38 +0000 Subject: [issue9495] argparse unittest tracebacks are confusing if an error is raised when not expected In-Reply-To: <1280852518.56.0.709280463518.issue9495@psf.upfronthosting.co.za> Message-ID: <1373110118.53.0.450185736027.issue9495@psf.upfronthosting.co.za> Adam Collard added the comment: Use raise from None to avoid additional exception context ---------- Added file: http://bugs.python.org/file30800/argparse-raise-from-None _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 13:36:01 2013 From: report at bugs.python.org (Valentina Mukhamedzhanova) Date: Sat, 06 Jul 2013 11:36:01 +0000 Subject: [issue11957] re.sub confusion between count and flags args In-Reply-To: <1304101630.86.0.175815070517.issue11957@psf.upfronthosting.co.za> Message-ID: <1373110561.89.0.132192723254.issue11957@psf.upfronthosting.co.za> Valentina Mukhamedzhanova added the comment: Please see my patch, I have changed flags to be instances of IntEnum and added a check to re.sub, re.subn and re.split. The patch contains some tests. This solution also allowed me to discover several bugs in the standard library, and I am going to create tickets for them shortly. ---------- nosy: +umi Added file: http://bugs.python.org/file30801/patch_11957 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 13:45:03 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 11:45:03 +0000 Subject: [issue18377] Python Launcher code cleanup Message-ID: <1373111103.05.0.405737364522.issue18377@psf.upfronthosting.co.za> New submission from Ronald Oussoren: While working on a Python Launcher issue (#12990) I noticed some compiler warnings for Python Launcher. The attached patch removes those warnings, and cleans up some indentation issues. Ned: do you have an opinion on applying this to the 3.3 and 2.7 branches? I'd prefer to backport to keep the code base the same (especially because there are no functional changes) ---------- assignee: ronaldoussoren files: cleanup-pythonlauncher-full.txt keywords: patch messages: 192417 nosy: ned.deily, ronaldoussoren priority: normal severity: normal stage: commit review status: open title: Python Launcher code cleanup type: compile error versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30802/cleanup-pythonlauncher-full.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 13:47:20 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 11:47:20 +0000 Subject: [issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables In-Reply-To: <1292740109.65.0.867895032728.issue10735@psf.upfronthosting.co.za> Message-ID: <1373111240.6.0.377842227011.issue10735@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- versions: +Python 3.3, Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 13:49:48 2013 From: report at bugs.python.org (Adam Collard) Date: Sat, 06 Jul 2013 11:49:48 +0000 Subject: [issue12645] test.support. import_fresh_module - incorrect doc In-Reply-To: <1311789815.76.0.639942891335.issue12645@psf.upfronthosting.co.za> Message-ID: <1373111388.66.0.232401587959.issue12645@psf.upfronthosting.co.za> Adam Collard added the comment: The typo is no longer present, but the docs were still wrong. ---------- nosy: +adam-collard Added file: http://bugs.python.org/file30803/issue-12645-test-docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 13:49:56 2013 From: report at bugs.python.org (Elena Oat) Date: Sat, 06 Jul 2013 11:49:56 +0000 Subject: [issue16937] -u (unbuffered I/O) command line option documentation mismatch for sys.stdin In-Reply-To: <1357928522.67.0.838908652159.issue16937@psf.upfronthosting.co.za> Message-ID: <1373111396.39.0.393197662062.issue16937@psf.upfronthosting.co.za> Changes by Elena Oat : ---------- keywords: +patch Added file: http://bugs.python.org/file30804/issue16937.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 13:50:55 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 06 Jul 2013 11:50:55 +0000 Subject: [issue18342] Use the repr of a module name for ModuleNotFoundError in ceval.c In-Reply-To: <1373106034.7.0.892716453097.issue18342@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: The patch looks good to me. Just a minor nit: you should add ^ to the beginning of the regex. 2013/7/6 Tomasz Ma?kowiak : > > Tomasz Ma?kowiak added the comment: > > Attaching a modified patch with assertRaisesRegexp used. > > ---------- > Added file: http://bugs.python.org/file30796/bug18342_2.patch > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 14:03:03 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 12:03:03 +0000 Subject: [issue10910] pyport.h FreeBSD/Mac OS X "fix" causes errors in C++ compilation In-Reply-To: <1295040100.28.0.0907494738582.issue10910@psf.upfronthosting.co.za> Message-ID: <1373112183.48.0.410603368649.issue10910@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The bytes_methods.h issue is not present in the default branch, but is still present in the 2.7 branch. I'm not sure why those defines are there, I'm adding Gregory P. Smith to the nosy list because he added the defines and might remember why they were added and if it would be save to remove them (from bytes_methods.h). That is defines like this: #undef islower #define islower(c) undefined_islower(c) I don't know what to do about the defines in pyport.h, one workaround is disable that entire block for C++ compiler, as in the attached patches (the later one is the same as the first one, but adds a comment that explains why the code is disabled for C++) ---------- nosy: +gregory.p.smith versions: +Python 3.4 Added file: http://bugs.python.org/file30805/issue10910-workaround.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 14:04:08 2013 From: report at bugs.python.org (=?utf-8?q?Tomasz_Ma=C4=87kowiak?=) Date: Sat, 06 Jul 2013 12:04:08 +0000 Subject: [issue18342] Use the repr of a module name for ModuleNotFoundError in ceval.c In-Reply-To: <1372696430.42.0.571776913898.issue18342@psf.upfronthosting.co.za> Message-ID: <1373112248.9.0.110280120036.issue18342@psf.upfronthosting.co.za> Tomasz Ma?kowiak added the comment: Attached a corrected patch with regexps modified. ---------- Added file: http://bugs.python.org/file30806/bug18342_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 14:17:09 2013 From: report at bugs.python.org (Adam Collard) Date: Sat, 06 Jul 2013 12:17:09 +0000 Subject: [issue17349] wsgiref.simple_server.demo_app is not PEP-3333 compatible In-Reply-To: <1362400053.87.0.0342035983925.issue17349@psf.upfronthosting.co.za> Message-ID: <1373113029.24.0.62707874589.issue17349@psf.upfronthosting.co.za> Changes by Adam Collard : ---------- nosy: +adam-collard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 14:19:03 2013 From: report at bugs.python.org (Dmitry Jemerov) Date: Sat, 06 Jul 2013 12:19:03 +0000 Subject: [issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English Message-ID: <1373113143.69.0.513997485887.issue18378@psf.upfronthosting.co.za> New submission from Dmitry Jemerov: On Mac OS X 10.8 with the default language set to English (System Preferences | Language and Text), the default terminal application sets the LC_CTYPE environment variable to "UTF-8". If you run Python from the terminal and try to use locale.getdefaultlocate(), you get the following error: > python Python 2.7.2 (default, Oct 11 2012, 20:14:37) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import locale >>> locale.getdefaultlocale() Traceback (most recent call last): File "", line 1, in File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 496, in getdefaultlocale return _parse_localename(localename) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 428, in _parse_localename raise ValueError, 'unknown locale: %s' % localename ValueError: unknown locale: UTF-8 (The stacktrace is from Python 2.7 but Python 3.3 suffers from the same problem.) There are numerous workarounds for this problem (turning off the "Set locale environment variables on startup" option in the terminal settings, or adding "export LC_CTYPE=en_US.UTF8" to .bash_profile, selecting a language other than English in the Language & Text settings), but these require additional configuration from the user's side. I think that the more useful behavior is for Python to handle this behavior of the system and not crash, even though it doesn't strictly comply to the POSIX standard. The attached patch (against current Python 3.4 master branch) is one possible fix. ---------- components: Library (Lib) files: getdefaultlocale.patch keywords: patch messages: 192422 nosy: Dmitry.Jemerov priority: normal severity: normal status: open title: locale.getdefaultlocale() fails on Mac OS X with default language set to English versions: Python 2.7, Python 3.4 Added file: http://bugs.python.org/file30807/getdefaultlocale.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 14:22:19 2013 From: report at bugs.python.org (Senko Rasic) Date: Sat, 06 Jul 2013 12:22:19 +0000 Subject: [issue1052827] filelist.findall should not fail on dangling symlinks Message-ID: <1373113339.0.0.0830438708095.issue1052827@psf.upfronthosting.co.za> Senko Rasic added the comment: Here are two patches: * test against py3k test_sdist.py (should crash without a fix) * a proposed fix The proposed fix not only changes lstat, but also changes other relevant paths to actually include dangling symlinks in the filelists. I've split them into two in case the proposed fix is rejected but test is still useful. ---------- keywords: +patch nosy: +senko Added file: http://bugs.python.org/file30808/distutils-symlink-test.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 14:22:53 2013 From: report at bugs.python.org (Senko Rasic) Date: Sat, 06 Jul 2013 12:22:53 +0000 Subject: [issue1052827] filelist.findall should not fail on dangling symlinks Message-ID: <1373113373.61.0.24882050586.issue1052827@psf.upfronthosting.co.za> Senko Rasic added the comment: The second patch (proposed fix). ---------- Added file: http://bugs.python.org/file30809/distutils-symlink-fix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 14:25:54 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 12:25:54 +0000 Subject: [issue14354] Crash in _ctypes_alloc_callback In-Reply-To: <1332017744.32.0.532482393485.issue14354@psf.upfronthosting.co.za> Message-ID: <1373113554.28.0.384954245894.issue14354@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The example uses unions, which libffi doesn't really support (see for example ). There is an issue in the python tracker about union support in ctypes: #16575. FWIW. I can still reproduce the issue with x86_64 on OSX with both the 2.7 and default branches, while i386 does not crash. I intend to close this as a duplicate of #16575 as that better explains the underlying problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 14:30:20 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Jul 2013 12:30:20 +0000 Subject: [issue18379] SSLSocket.getpeercert(): OCSP and CRL DP URIs Message-ID: <1373113820.69.0.993582296308.issue18379@psf.upfronthosting.co.za> New submission from Christian Heimes: The patch implements OCSP and CRL distribution point access for getpeercert(). I'll add tests and doc updates later. Output for https://info.pca.dfn.de/ {'OCSP': ('http://ocsp.pca.dfn.de/OCSP-Server/OCSP',), 'crlDistributionPoints': ('http://cdp1.pca.dfn.de/global-services-ca/pub/crl/cacrl.crl', 'http://cdp2.pca.dfn.de/global-services-ca/pub/crl/cacrl.crl'), 'issuer': ((('countryName', 'DE'),), (('organizationName', 'DFN-Verein'),), (('organizationalUnitName', 'DFN-PKI'),), (('commonName', 'DFN-Verein CA Services'),)), 'notAfter': 'Oct 18 09:07:09 2014 GMT', 'notBefore': 'Oct 19 09:07:09 2009 GMT', 'serialNumber': '0EFBA9CC', 'subject': ((('countryName', 'DE'),), (('organizationName', 'DFN-Verein'),), (('organizationalUnitName', 'DFN-PKI'),), (('commonName', 'info.pca.dfn.de'),)), 'version': 3} ---------- components: Extension Modules files: ssl_ocsp_crldp.patch keywords: patch messages: 192426 nosy: christian.heimes, pitrou priority: normal severity: normal stage: patch review status: open title: SSLSocket.getpeercert(): OCSP and CRL DP URIs type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file30810/ssl_ocsp_crldp.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 14:30:36 2013 From: report at bugs.python.org (Daniel Holth) Date: Sat, 06 Jul 2013 12:30:36 +0000 Subject: [issue18373] implement sys.get/setbyteswarningflag() In-Reply-To: <1373084144.36.0.640373284092.issue18373@psf.upfronthosting.co.za> Message-ID: <1373113834.9093.140661252531729.397133E0@webmail.messagingengine.com> Daniel Holth added the comment: You would just enable this during your serialization code, and if (perhaps someone is calling your library and passing it the wrong type) they would be guarded against this common error. On Sat, Jul 6, 2013, at 12:15 AM, R. David Murray wrote: > > R. David Murray added the comment: > > Why wouldn't you just enable bytes warning and fix all the code to work > correctly? > > ---------- > nosy: +r.david.murray > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 14:32:48 2013 From: report at bugs.python.org (Valentina Mukhamedzhanova) Date: Sat, 06 Jul 2013 12:32:48 +0000 Subject: [issue18380] email/quoprimime.py doesn't use re.sub correctly Message-ID: <1373113968.45.0.531032610205.issue18380@psf.upfronthosting.co.za> New submission from Valentina Mukhamedzhanova: header_decode function in the standard library email/quoprimime.py module calls re.sub with a positional argument for flags in the wrong position. My patch fixes it to use a keyword argument. ---------- components: Library (Lib), Regular Expressions, email files: patch_quoprimime messages: 192428 nosy: barry, ezio.melotti, mrabarnett, r.david.murray, umi priority: normal severity: normal status: open title: email/quoprimime.py doesn't use re.sub correctly type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30811/patch_quoprimime _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 14:33:41 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 12:33:41 +0000 Subject: [issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English In-Reply-To: <1373113143.69.0.513997485887.issue18378@psf.upfronthosting.co.za> Message-ID: <1373114021.26.0.982736930545.issue18378@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Strange, I have LANG=en_US.UTF-8 in my environment and no LC_CTYPE. A clean test account does have the same behavior as you are seeing. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 14:37:19 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 06 Jul 2013 12:37:19 +0000 Subject: [issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English In-Reply-To: <1373113143.69.0.513997485887.issue18378@psf.upfronthosting.co.za> Message-ID: <1373114239.74.0.0600175778536.issue18378@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 14:37:30 2013 From: report at bugs.python.org (Valentina Mukhamedzhanova) Date: Sat, 06 Jul 2013 12:37:30 +0000 Subject: [issue11957] re.sub confusion between count and flags args In-Reply-To: <1304101630.86.0.175815070517.issue11957@psf.upfronthosting.co.za> Message-ID: <1373114250.29.0.887328476325.issue11957@psf.upfronthosting.co.za> Changes by Valentina Mukhamedzhanova : Removed file: http://bugs.python.org/file30801/patch_11957 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 14:37:39 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 06 Jul 2013 12:37:39 +0000 Subject: [issue18381] unittest warnings counter Message-ID: <1373114259.86.0.274298241842.issue18381@psf.upfronthosting.co.za> New submission from Giampaolo Rodola': ...as per my original proposal on python-ideas: http://mail.python.org/pipermail/python-ideas/2013-June/021450.html Patch is in attachment. ---------- components: Library (Lib) files: unittest.patch keywords: needs review, patch messages: 192430 nosy: ezio.melotti, giampaolo.rodola, michael.foord priority: normal severity: normal status: open title: unittest warnings counter versions: Python 3.4 Added file: http://bugs.python.org/file30812/unittest.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 14:37:46 2013 From: report at bugs.python.org (Valentina Mukhamedzhanova) Date: Sat, 06 Jul 2013 12:37:46 +0000 Subject: [issue11957] re.sub confusion between count and flags args In-Reply-To: <1304101630.86.0.175815070517.issue11957@psf.upfronthosting.co.za> Message-ID: <1373114266.63.0.420953129457.issue11957@psf.upfronthosting.co.za> Changes by Valentina Mukhamedzhanova : Added file: http://bugs.python.org/file30813/patch_11957 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 14:45:37 2013 From: report at bugs.python.org (Walter Prins) Date: Sat, 06 Jul 2013 12:45:37 +0000 Subject: [issue18382] multiprocessing's overlapped PipeConnection issues on Windows 8 Message-ID: <1373114737.55.0.0779572840335.issue18382@psf.upfronthosting.co.za> New submission from Walter Prins: It appears that Windows 8 (Version 6.2.9200 x64) has introduced changes in behaviour that causes the multiprocessing module's use of overlapped PipeConnection to fail (Python 3.4 32bit and release 3.3.2 32bit). This issue previously existed (see issue #12328 point 1) and was fixed but the fixes for #12328 do not appear to work on Windows 8. Specifically the test test_multiprocessing._TestPoll.test_empty_string fails with message: FAIL: test_empty_string (Lib.test.test_multiprocessing.WithProcessesTestPoll) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Users\Walter\Documents\src\cpython\Lib\test\test_multiprocessing.py", line 2416, in test_empty_string self.assertEqual(a.poll(), True) AssertionError: False != True Additionally, there appears to be no buildbot for Windows 8 currently, would it be possible to have one set up? ---------- components: Extension Modules messages: 192431 nosy: wprins priority: normal severity: normal status: open title: multiprocessing's overlapped PipeConnection issues on Windows 8 type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 14:46:07 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 06 Jul 2013 12:46:07 +0000 Subject: [issue18308] checkRecvmsgAddress wrong in test_socket.py (AIX failures) In-Reply-To: Message-ID: STINNER Victor added the comment: "However, it might be simpler to special-case the IPv6 addresses comparison by overriding it in the IPv6 sendmsg base test." Yes, this is why I proposed another approach. (But David convinced me that it is not the right approach.) Victor ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 14:49:45 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 12:49:45 +0000 Subject: [issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English In-Reply-To: <1373113143.69.0.513997485887.issue18378@psf.upfronthosting.co.za> Message-ID: <1373114985.35.0.260691344536.issue18378@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The UTF-8 value seems suspect to me, but is actually supported by the system, changing it to a nonsense value results in failure in the C function setlocale. As for the patch: I'd add this workaround only to the OSX platform (that is, test for sys.platform == 'darwin' before checking for UTF-8 as a value). ---------- keywords: +needs review stage: -> patch review type: -> behavior versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 14:49:55 2013 From: report at bugs.python.org (Alex Henderson) Date: Sat, 06 Jul 2013 12:49:55 +0000 Subject: [issue17840] base64_codec uses assert for runtime validity checks In-Reply-To: <1366875650.57.0.151905786577.issue17840@psf.upfronthosting.co.za> Message-ID: <1373114995.12.0.835956678236.issue17840@psf.upfronthosting.co.za> Alex Henderson added the comment: I see that there is identical usage of "assert errors=='strict'" in a number of similar encodings modules: base64_codec.py bz2_codec.py hex_codec.py quopri_codec.py uu_codec.py zlib_codec.py The error handling mode is irrelevant for all these codecs, so the attached patch addresses them all (choosing to ignore the error mode and documenting this). ---------- keywords: +patch nosy: +alex.henderson Added file: http://bugs.python.org/file30814/issue17840.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 15:01:01 2013 From: report at bugs.python.org (Adam Collard) Date: Sat, 06 Jul 2013 13:01:01 +0000 Subject: [issue17349] wsgiref.simple_server.demo_app is not PEP-3333 compatible In-Reply-To: <1362400053.87.0.0342035983925.issue17349@psf.upfronthosting.co.za> Message-ID: <1373115661.43.0.519910577221.issue17349@psf.upfronthosting.co.za> Adam Collard added the comment: Since this bug depends on a __future__ import I was advised to put the test in a separate file. ---------- Added file: http://bugs.python.org/file30815/issue-17349-wsgiref _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 15:05:48 2013 From: report at bugs.python.org (Adam Collard) Date: Sat, 06 Jul 2013 13:05:48 +0000 Subject: [issue15370] test_runpy should include namespace package tests In-Reply-To: <1342448771.76.0.81603722524.issue15370@psf.upfronthosting.co.za> Message-ID: <1373115948.52.0.195763877037.issue15370@psf.upfronthosting.co.za> Changes by Adam Collard : ---------- nosy: +adam-collard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 15:09:25 2013 From: report at bugs.python.org (Mateusz Lenik) Date: Sat, 06 Jul 2013 13:09:25 +0000 Subject: [issue17557] test_getgroups of test_posix can fail on OS X 10.8 if more than 16 groups In-Reply-To: <1364378141.47.0.183536890409.issue17557@psf.upfronthosting.co.za> Message-ID: <1373116165.96.0.0269358958783.issue17557@psf.upfronthosting.co.za> Mateusz Lenik added the comment: I attached a patch implementing a workaround for getgroups(2) call. When compiled for OS X it first calls getgroups with 0 as the first argument to get number of groups and then in subsequent call the code fetches the gids. This patch applies cleanly on 2.7 and 3.x branches. ---------- keywords: +patch nosy: +mlen Added file: http://bugs.python.org/file30816/getgroups_osx.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 15:13:25 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 13:13:25 +0000 Subject: [issue15594] test_copyfile_named_pipe() fails on Mac OS X Snow Leopard: OSError: [Errno 22] Invalid argument In-Reply-To: <1344457655.9.0.373688420399.issue15594@psf.upfronthosting.co.za> Message-ID: <1373116405.26.0.875343387396.issue15594@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Is this still an issue? I won't be able to look into this until I get home from EP, I didn't bring my disk with virtual machines to the conference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 15:13:46 2013 From: report at bugs.python.org (Senko Rasic) Date: Sat, 06 Jul 2013 13:13:46 +0000 Subject: [issue979407] urllib2 digest auth totally broken Message-ID: <1373116426.73.0.198438686628.issue979407@psf.upfronthosting.co.za> Senko Rasic added the comment: Checked with 3.4.0 alpha, works fine. Apart from the tests mentioned, I used the following script to check digest auth: from urllib import request url = 'http://httpbin.org/digest-auth/auth/user/passwd' req = request.Request(url) password_manager = request.HTTPPasswordMgrWithDefaultRealm() password_manager.add_password(None, url, 'user', 'passwd') auth_manager = request.HTTPDigestAuthHandler(password_manager) opener = request.build_opener(auth_manager) request.install_opener(opener) handler = request.urlopen(req) assert handler.getcode() == 200 ---------- nosy: +senko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 15:19:09 2013 From: report at bugs.python.org (Michael Hart) Date: Sat, 06 Jul 2013 13:19:09 +0000 Subject: [issue7982] extend captured_output to simulate different stdout.encoding In-Reply-To: <1266844157.92.0.671833558035.issue7982@psf.upfronthosting.co.za> Message-ID: <1373116749.45.0.962473970386.issue7982@psf.upfronthosting.co.za> Changes by Michael Hart : ---------- nosy: +mike_hart _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 15:25:38 2013 From: report at bugs.python.org (Senko Rasic) Date: Sat, 06 Jul 2013 13:25:38 +0000 Subject: [issue17324] SimpleHTTPServer serves files even if the URL has a trailing slash In-Reply-To: <1362128046.23.0.253565985522.issue17324@psf.upfronthosting.co.za> Message-ID: <1373117138.17.0.591054734432.issue17324@psf.upfronthosting.co.za> Senko Rasic added the comment: The attached test (issue-17324-test-1) reproduces the issue for me on 3.4.0alpha. ---------- nosy: +senko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 15:27:22 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 13:27:22 +0000 Subject: [issue13829] exception error in _scproxy.so In-Reply-To: <1326998522.6.0.790472668429.issue13829@psf.upfronthosting.co.za> Message-ID: <1373117242.4.0.132038847876.issue13829@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Sigh... The crash is a subprocess started with fork is not entirely unexpected, although I had hoped that the current version of _scproxy would be safe enough. A number of Apple frameworks detect that a process called fork after they initialized and then explictly crash (basicly a call to abort()). In this case it appears to just not work correctly. I'm not sure how to fix this, other than spawning a small helper program to query the proxy settings. That could get prohibitively expensive when fetching a lot of URLs though (and an RPC system might run into the a similar problem after calling fork...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 15:36:14 2013 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 06 Jul 2013 13:36:14 +0000 Subject: [issue18383] test_warnings modifies warnings.filters when running with "-W default" Message-ID: <1373117774.47.0.846306714059.issue18383@psf.upfronthosting.co.za> New submission from Florent Xicluna: Running the test suite with -Wd, we got the warning: [247/375] test_warnings Warning -- warnings.filters was modified by test_warnings This is how to reproduce: ./python -Wd import warnings from test import support saved = warnings.filters.copy() c_warnings = support.import_fresh_module('warnings', fresh=['_warnings']) saved == warnings.filters # --> False ---------- components: Tests messages: 192441 nosy: flox priority: low severity: normal stage: needs patch status: open title: test_warnings modifies warnings.filters when running with "-W default" type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 15:51:13 2013 From: report at bugs.python.org (Valentina Mukhamedzhanova) Date: Sat, 06 Jul 2013 13:51:13 +0000 Subject: [issue11957] re.sub confusion between count and flags args In-Reply-To: <1304101630.86.0.175815070517.issue11957@psf.upfronthosting.co.za> Message-ID: <1373118673.86.0.151160963174.issue11957@psf.upfronthosting.co.za> Changes by Valentina Mukhamedzhanova : Removed file: http://bugs.python.org/file30813/patch_11957 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 15:56:53 2013 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 06 Jul 2013 13:56:53 +0000 Subject: [issue18383] test_warnings modifies warnings.filters when running with "-W default" In-Reply-To: <1373117774.47.0.846306714059.issue18383@psf.upfronthosting.co.za> Message-ID: <1373119013.09.0.814482152492.issue18383@psf.upfronthosting.co.za> Florent Xicluna added the comment: Much simpler: $ ./python -Wd import warnings import sys saved = warnings.filters.copy() del sys.modules['warnings'] import warnings assert warnings.filters != saved assert warnings.filters.pop(0) = warnings.filters[0] assert warnings.filters == saved Explanation: the "default" filter is duplicated on each reload of the warnings module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 16:17:51 2013 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 06 Jul 2013 14:17:51 +0000 Subject: [issue18383] test_warnings modifies warnings.filters when running with "-W default" In-Reply-To: <1373117774.47.0.846306714059.issue18383@psf.upfronthosting.co.za> Message-ID: <1373120271.4.0.931727249335.issue18383@psf.upfronthosting.co.za> Florent Xicluna added the comment: This patch fixes the issue. ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file30817/issue18383_test_warnings_filters.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 16:19:15 2013 From: report at bugs.python.org (Michael Twomey) Date: Sat, 06 Jul 2013 14:19:15 +0000 Subject: [issue10984] argparse add_mutually_exclusive_group should accept existing arguments to register conflicts In-Reply-To: <1295737320.83.0.942830837874.issue10984@psf.upfronthosting.co.za> Message-ID: <1373120355.35.0.388998017101.issue10984@psf.upfronthosting.co.za> Michael Twomey added the comment: I've picked up on this as part of the EP 2013 sprints. I've attached a patch which implements the behaviour described in the comments. It doesn't break any existing functionality but the help generated by argparse is definitely not quite right. ---------- keywords: +patch nosy: +micktwomey Added file: http://bugs.python.org/file30818/args_in_multiple_mutually_exclusive_groups.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 16:24:35 2013 From: report at bugs.python.org (Dmitry Jemerov) Date: Sat, 06 Jul 2013 14:24:35 +0000 Subject: [issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English In-Reply-To: <1373113143.69.0.513997485887.issue18378@psf.upfronthosting.co.za> Message-ID: <1373120675.36.0.472327733244.issue18378@psf.upfronthosting.co.za> Dmitry Jemerov added the comment: Judging from the results of Googling for the error message, I'm far from the only one seeing this problem. What exactly would be the benefit of adding the code to check for the platform? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 16:28:06 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 14:28:06 +0000 Subject: [issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English In-Reply-To: <1373113143.69.0.513997485887.issue18378@psf.upfronthosting.co.za> Message-ID: <1373120886.23.0.0862682966003.issue18378@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The test for darwin is needed because other platforms don't support "UTF-8" as a valid LC_CTYPE name, on a recent linux box: >>> locale.setlocale(locale.LC_CTYPE, "UTF-8") Traceback (most recent call last): File "", line 1, in File "/opt/python2.7/lib/python2.7/locale.py", line 539, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting (And just calling setlocale to check if the value is valid is not an option because that changes process-global state) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 16:34:15 2013 From: report at bugs.python.org (Dmitry Jemerov) Date: Sat, 06 Jul 2013 14:34:15 +0000 Subject: [issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English In-Reply-To: <1373113143.69.0.513997485887.issue18378@psf.upfronthosting.co.za> Message-ID: <1373121255.92.0.20184557534.issue18378@psf.upfronthosting.co.za> Dmitry Jemerov added the comment: Why exactly does this matter? UTF-8 not being a valid LC_CTYPE value simply means that no one running Linux will ever have LC_CTYPE set to UTF-8, and the branch will never be hit. OTOH, adding the check will make the code harder to test and simply larger (no code is always better than any non-zero amount of code). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:02:46 2013 From: report at bugs.python.org (Valentina Mukhamedzhanova) Date: Sat, 06 Jul 2013 15:02:46 +0000 Subject: [issue18380] email/quoprimime.py doesn't use re.sub correctly In-Reply-To: <1373113968.45.0.531032610205.issue18380@psf.upfronthosting.co.za> Message-ID: <1373122966.72.0.917646664608.issue18380@psf.upfronthosting.co.za> Valentina Mukhamedzhanova added the comment: I have updated the patch with a testcase. ---------- Added file: http://bugs.python.org/file30819/patch_18380 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:02:59 2013 From: report at bugs.python.org (Valentina Mukhamedzhanova) Date: Sat, 06 Jul 2013 15:02:59 +0000 Subject: [issue18380] email/quoprimime.py doesn't use re.sub correctly In-Reply-To: <1373113968.45.0.531032610205.issue18380@psf.upfronthosting.co.za> Message-ID: <1373122979.17.0.185022884895.issue18380@psf.upfronthosting.co.za> Changes by Valentina Mukhamedzhanova : Removed file: http://bugs.python.org/file30811/patch_quoprimime _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:08:43 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 06 Jul 2013 15:08:43 +0000 Subject: [issue10910] pyport.h FreeBSD/Mac OS X "fix" causes errors in C++ compilation In-Reply-To: <1295040100.28.0.0907494738582.issue10910@psf.upfronthosting.co.za> Message-ID: <1373123323.18.0.456384748938.issue10910@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I was merely refactoring for PEP3137, the original version of all that code prior to 2.7 was in Objects/stringobject.c and long predates me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:11:24 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 15:11:24 +0000 Subject: [issue10910] pyport.h FreeBSD/Mac OS X "fix" causes errors in C++ compilation In-Reply-To: <1295040100.28.0.0907494738582.issue10910@psf.upfronthosting.co.za> Message-ID: <1373123484.01.0.472081246542.issue10910@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've some more digging to do then, although I expect that nobody knows anymore why the #define's are there. It should be safe to remove them by now, and they are not present in the default branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:17:59 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Jul 2013 15:17:59 +0000 Subject: [issue18380] email/quoprimime.py doesn't use re.sub correctly In-Reply-To: <1373113968.45.0.531032610205.issue18380@psf.upfronthosting.co.za> Message-ID: <3bnc4N28mZzPsF@mail.python.org> Roundup Robot added the comment: New changeset c8fd1351c840 by Ezio Melotti in branch '3.3': #18380: pass regex flags to the right argument. Patch by Valentina Mukhamedzhanova. http://hg.python.org/cpython/rev/c8fd1351c840 New changeset 6e23ce14c3c6 by Ezio Melotti in branch 'default': #18380: merge with 3.3. http://hg.python.org/cpython/rev/6e23ce14c3c6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:18:11 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 15:18:11 +0000 Subject: [issue11445] python.exe on OS X shared-llbrary build erroneously linked to MacPorts python library In-Reply-To: <19830.44206.997189.286834@montanaro.dyndns.org> Message-ID: <1373123891.91.0.223024156725.issue11445@psf.upfronthosting.co.za> Changes by Ronald Oussoren : Removed file: http://bugs.python.org/file21243/issue-11445.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:19:26 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 06 Jul 2013 15:19:26 +0000 Subject: [issue18380] email/quoprimime.py doesn't use re.sub correctly In-Reply-To: <1373113968.45.0.531032610205.issue18380@psf.upfronthosting.co.za> Message-ID: <1373123966.12.0.73436023868.issue18380@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:25:14 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 15:25:14 +0000 Subject: [issue11445] python.exe on OS X shared-llbrary build erroneously linked to MacPorts python library In-Reply-To: <19830.44206.997189.286834@montanaro.dyndns.org> Message-ID: <1373124314.71.0.615332721625.issue11445@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've attached an updated patch (against the 2.7 branch, the same idea should work for 3.3 and default). This does two things: 1) Explicity add '-Wl,-search_paths_first' to LDFLAGS on Mac OS X. This ensures that the linker behaves like other platforms: in every directory on the search path look for both shared and static libraries, the default (upto xcode 4) was to first walk the entire path looking for dylibs, then walk the path again looking for static libraries. 2) Change the order of arguments when linking $(BUILDPYTHON), the -L flags in $(LDFLAGS) were first added before the "-L." flag, and are now after that flag. This ensures that the correct python library will be found, even if there is a libpython in one of the directories on the search path that's added by $(LDFLAGS). This should work fine on OSX (obviously) and Linux, but I'm not 100% that moving $(LDFLAGS) will work with the vendor compilers on commercial unix systems. (Adding 3.3 and 3.4 to the versions because those should also be affected by this issue) ---------- keywords: -patch versions: +Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30820/issue-11445-linkflags.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:40:24 2013 From: report at bugs.python.org (=?utf-8?q?Tomasz_Ma=C4=87kowiak?=) Date: Sat, 06 Jul 2013 15:40:24 +0000 Subject: [issue16223] untokenize returns a string if no encoding token is recognized In-Reply-To: <1350193751.15.0.784217855065.issue16223@psf.upfronthosting.co.za> Message-ID: <1373125224.33.0.51813085596.issue16223@psf.upfronthosting.co.za> Tomasz Ma?kowiak added the comment: untokenize has also some other problems, especially when it is using compat - it will skip first significant token, if ENCODING token is not present in input. For example for input like this (code simplified): >>> tokens = tokenize(b"1 + 2") >>> untokenize(tokens[1:]) '+2 ' It also doesn't adhere to another documentation item: "The iterable must return sequences with at least two elements. [...] Any additional sequence elements are ignored." In current implementation sequences can be either 2 or 5 elements long, and in the 5-elements long variant the last 3 elements are not ignored, but used to construct source code with original whitespace. I'm trying to prepare a patch for those issues. ---------- nosy: +kurazu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:44:02 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Sat, 06 Jul 2013 15:44:02 +0000 Subject: [issue18382] multiprocessing's overlapped PipeConnection issues on Windows 8 In-Reply-To: <1373114737.55.0.0779572840335.issue18382@psf.upfronthosting.co.za> Message-ID: <1373125442.16.0.731109325689.issue18382@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Does that test always fail? ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:47:09 2013 From: report at bugs.python.org (Valentina Mukhamedzhanova) Date: Sat, 06 Jul 2013 15:47:09 +0000 Subject: [issue11957] re.sub confusion between count and flags args In-Reply-To: <1304101630.86.0.175815070517.issue11957@psf.upfronthosting.co.za> Message-ID: <1373125629.53.0.986999088607.issue11957@psf.upfronthosting.co.za> Changes by Valentina Mukhamedzhanova : Added file: http://bugs.python.org/file30821/patch_11957 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:04:18 2013 From: report at bugs.python.org (Senko Rasic) Date: Sat, 06 Jul 2013 16:04:18 +0000 Subject: [issue6386] importing yields unexpected results when initial script is a symbolic link In-Reply-To: <1246356344.6.0.218965497612.issue6386@psf.upfronthosting.co.za> Message-ID: <1373126658.63.0.80236480811.issue6386@psf.upfronthosting.co.za> Senko Rasic added the comment: Patch for modifying the modules part of tutorial with the changes suggested by jamadagni (reworded slightly so the note is outside the itemized list). ---------- keywords: +patch nosy: +senko Added file: http://bugs.python.org/file30822/tutorial-symlink-syspath-note.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:07:53 2013 From: report at bugs.python.org (Balthazar Rouberol) Date: Sat, 06 Jul 2013 16:07:53 +0000 Subject: [issue18384] Add devhelp build instructions to the documentation makefile Message-ID: <1373126872.99.0.196855788769.issue18384@psf.upfronthosting.co.za> New submission from Balthazar Rouberol: The documentation makefile is missing support for Devhelp. The supplied patch fixes this for the Python 3 branch. It also edits the ouput of the sphinx build to change the name of the devhelp project. This is needed to be able to have both versions of documentation (py2 & py3) displayed in Devhelp. This is useful if developers need to access documentation for both versions, such as both maintaining a Python2 project and starting a new project in Python3. This has been patched in some distributions downstream, but would be nice to have patched upstream. See: https://bugs.launchpad.net/ubuntu/+source/devhelp/+bug/787039 ---------- assignee: docs at python components: Documentation files: devhelp-build-py3.patch keywords: patch messages: 192457 nosy: brouberol, docs at python priority: normal severity: normal status: open title: Add devhelp build instructions to the documentation makefile type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file30823/devhelp-build-py3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:08:46 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 06 Jul 2013 16:08:46 +0000 Subject: [issue18384] Add devhelp build instructions to the documentation makefile In-Reply-To: <1373126872.99.0.196855788769.issue18384@psf.upfronthosting.co.za> Message-ID: <1373126926.07.0.778231280919.issue18384@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +georg.brandl stage: -> patch review versions: +Python 3.4 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:10:39 2013 From: report at bugs.python.org (Balthazar Rouberol) Date: Sat, 06 Jul 2013 16:10:39 +0000 Subject: [issue18384] Add devhelp build instructions to the documentation makefile In-Reply-To: <1373126872.99.0.196855788769.issue18384@psf.upfronthosting.co.za> Message-ID: <1373127039.2.0.243879722074.issue18384@psf.upfronthosting.co.za> Changes by Balthazar Rouberol : Removed file: http://bugs.python.org/file30823/devhelp-build-py3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:11:17 2013 From: report at bugs.python.org (Balthazar Rouberol) Date: Sat, 06 Jul 2013 16:11:17 +0000 Subject: [issue18384] Add devhelp build instructions to the documentation makefile In-Reply-To: <1373126872.99.0.196855788769.issue18384@psf.upfronthosting.co.za> Message-ID: <1373127077.77.0.392542668655.issue18384@psf.upfronthosting.co.za> Changes by Balthazar Rouberol : Added file: http://bugs.python.org/file30824/devhelp-build-py3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:12:52 2013 From: report at bugs.python.org (Balthazar Rouberol) Date: Sat, 06 Jul 2013 16:12:52 +0000 Subject: [issue18384] Add devhelp build instructions to the documentation makefile (Python3) In-Reply-To: <1373126872.99.0.196855788769.issue18384@psf.upfronthosting.co.za> Message-ID: <1373127172.28.0.700186860979.issue18384@psf.upfronthosting.co.za> Changes by Balthazar Rouberol : ---------- title: Add devhelp build instructions to the documentation makefile -> Add devhelp build instructions to the documentation makefile (Python3) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:14:41 2013 From: report at bugs.python.org (Balthazar Rouberol) Date: Sat, 06 Jul 2013 16:14:41 +0000 Subject: [issue18385] Add devhelp build instructions to the documentation makefile (Python2) Message-ID: <1373127281.72.0.44183394667.issue18385@psf.upfronthosting.co.za> New submission from Balthazar Rouberol: The documentation makefile is missing support for Devhelp. The supplied patch fixes this for the Python 2 branch. ---------- assignee: docs at python components: Documentation files: devhelp-build-py2.patch keywords: patch messages: 192458 nosy: brouberol, docs at python priority: normal severity: normal status: open title: Add devhelp build instructions to the documentation makefile (Python2) type: enhancement versions: Python 2.7 Added file: http://bugs.python.org/file30825/devhelp-build-py2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:17:24 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 16:17:24 +0000 Subject: [issue15661] OS X installer packages should be signed for OS X 10.8 Gatekeeper feature In-Reply-To: <1345013707.82.0.343684011424.issue15661@psf.upfronthosting.co.za> Message-ID: <1373127444.55.0.783587897398.issue15661@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Creating flat packages should be easy enough, I'm hoping to experiment with them during the sprints at EP (but we're already at the end of the first day). At first I feared that creating installers in the new format would require using GUI tool, but it seems that the creating can be scripted using command line tools (like pkgbuild). According to flat packages were introduced in OSX 10.5, which would mean we could only move the "intel" installer to that format. It would IMHO be worthwhile to do that for all new stable releases (2.7.x, 3.3.x and 3.4.x), while at the same time further reducing the visibility of the 32-bit installers (as those should only be used by users that just cannot use the newer installers). As to the question of actually signing the installer: we ask the PSF about acquiring a developer account once we have something that can actually be signed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:23:19 2013 From: report at bugs.python.org (Balthazar Rouberol) Date: Sat, 06 Jul 2013 16:23:19 +0000 Subject: [issue18384] Add devhelp build instructions to the documentation makefile In-Reply-To: <1373126872.99.0.196855788769.issue18384@psf.upfronthosting.co.za> Message-ID: <1373127799.96.0.94396508957.issue18384@psf.upfronthosting.co.za> Changes by Balthazar Rouberol : ---------- title: Add devhelp build instructions to the documentation makefile (Python3) -> Add devhelp build instructions to the documentation makefile versions: +Python 2.7 Added file: http://bugs.python.org/file30826/devhelp-build-py2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:23:29 2013 From: report at bugs.python.org (Dmitry Jemerov) Date: Sat, 06 Jul 2013 16:23:29 +0000 Subject: [issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English In-Reply-To: <1373113143.69.0.513997485887.issue18378@psf.upfronthosting.co.za> Message-ID: <1373127809.2.0.0170862451143.issue18378@psf.upfronthosting.co.za> Dmitry Jemerov added the comment: A related issue (with a patch that touches the same locale parsing code) is http://bugs.python.org/issue5815 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:23:29 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 06 Jul 2013 16:23:29 +0000 Subject: [issue18385] Add devhelp build instructions to the documentation makefile (Python2) In-Reply-To: <1373127281.72.0.44183394667.issue18385@psf.upfronthosting.co.za> Message-ID: <1373127809.61.0.893344806131.issue18385@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Add devhelp build instructions to the documentation makefile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:24:14 2013 From: report at bugs.python.org (Dmitry Jemerov) Date: Sat, 06 Jul 2013 16:24:14 +0000 Subject: [issue5815] locale.getdefaultlocale() missing corner case In-Reply-To: <1240424446.58.0.284100987299.issue5815@psf.upfronthosting.co.za> Message-ID: <1373127854.12.0.362804135002.issue5815@psf.upfronthosting.co.za> Dmitry Jemerov added the comment: A related issue (a case which isn't taken into account by Serhiy's patch) is http://bugs.python.org/issue18378 ---------- nosy: +Dmitry.Jemerov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:34:34 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Jul 2013 16:34:34 +0000 Subject: [issue15661] OS X installer packages should be signed for OS X 10.8 Gatekeeper feature In-Reply-To: <1345013707.82.0.343684011424.issue15661@psf.upfronthosting.co.za> Message-ID: <1373128474.28.0.520571565871.issue15661@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I just created a very crude package with the "new" tools. $ pkgbuild --analyze --root /tmp/_py/_root pkgbuild.plist ... $ pkgbuild --root /tmp/_py/_root --identifier org.python.python34 --component-plist pkgbuild.plist pythoninstall.pkg pkgbuild: Reading components from pkgbuild.plist pkgbuild: Adding component at Library/Frameworks/Python.framework/Versions/3.4 pkgbuild: Adding component at Applications/Python 3.4/IDLE.app pkgbuild: Adding component at Applications/Python 3.4/Python Launcher.app pkgbuild: Adding component at Library/Frameworks/Python.framework/Versions/3.4/Resources/Python.app pkgbuild: Wrote package to pythoninstall.pkg That package can then be opened using installer.app, but isn't usable as it. !) There are no pre/post scripts 2) User cannot select components 3) There is no README, License, custom logo, ... 4) I'm pretty sure this doesn't install the documentation It might be possible to add all missing features using pkgbuild and productbuild, but I'm not sure about that. ---------- Added file: http://bugs.python.org/file30827/pkgbuild.plist _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:41:26 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 06 Jul 2013 16:41:26 +0000 Subject: [issue18231] What's new in Python should explain what's new in UCD In-Reply-To: <1371406253.35.0.589040711268.issue18231@psf.upfronthosting.co.za> Message-ID: <1373128886.4.0.355186714778.issue18231@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: It is not easy to figure out the consequences (if any) of UCD change for python grammar from unicode standard release notes. I went through this exercise for a few releases and I thought it would be useful to share in release notes. Since there does not seem to be interest, I am closing this issue. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:42:26 2013 From: report at bugs.python.org (Elena Oat) Date: Sat, 06 Jul 2013 16:42:26 +0000 Subject: [issue14853] test_file.py depends on sys.stdin being unseekable In-Reply-To: <1337367006.89.0.99847274779.issue14853@psf.upfronthosting.co.za> Message-ID: <1373128946.01.0.573000904015.issue14853@psf.upfronthosting.co.za> Elena Oat added the comment: testStdin test is useless, it expects that stdin is always unseekable, but since sys.stdin could be any file, i.e. it can be seekable. The patch removes the test. ---------- keywords: +patch nosy: +Elena.Oat, pitrou Added file: http://bugs.python.org/file30828/14853.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:51:40 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 06 Jul 2013 16:51:40 +0000 Subject: [issue14853] test_file.py depends on sys.stdin being unseekable In-Reply-To: <1337367006.89.0.99847274779.issue14853@psf.upfronthosting.co.za> Message-ID: <1373129500.74.0.381118123324.issue14853@psf.upfronthosting.co.za> Ezio Melotti added the comment: FTR Python 3 raises "io.UnsupportedOperation: underlying stream is not seekable" on unseekable files and "ValueError: negative seek position -1" on seekable ones, whereas Python 2 raises "IOError: [Errno 29] Illegal seek" on unseekable files and doesn't raise anything for seekable ones. ---------- components: +Tests nosy: +ezio.melotti stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:51:43 2013 From: report at bugs.python.org (Brett Cannon) Date: Sat, 06 Jul 2013 16:51:43 +0000 Subject: [issue18370] ast.parse produces wrong lineno and col_offset for triple-quoted strings In-Reply-To: <1373055845.95.0.233623279769.issue18370@psf.upfronthosting.co.za> Message-ID: <1373129503.19.0.436289014382.issue18370@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- superseder: -> col_offset is -1 and lineno is wrong for multiline string expressions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:56:12 2013 From: report at bugs.python.org (=?utf-8?q?Dra=C5=BEen_Lu=C4=8Danin?=) Date: Sat, 06 Jul 2013 16:56:12 +0000 Subject: [issue18156] Add an 'attr' attribute to AttributeError In-Reply-To: <1370619110.26.0.980030189702.issue18156@psf.upfronthosting.co.za> Message-ID: <1373129772.14.0.632616905803.issue18156@psf.upfronthosting.co.za> Dra?en Lu?anin added the comment: I've been working on this at the EuroPython sprint today and it seems the change requires editing >20 files that call PyExc_AttributeError. This means it would be quite a big and dangerous change, so for now I just attach the optional argument addition - without it actually being used by the rest of the codebase. What is your oppinion on it? ---------- keywords: +patch nosy: +ag6502, kermit666 Added file: http://bugs.python.org/file30829/attributeerror-attr.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 19:05:22 2013 From: report at bugs.python.org (David Edelsohn) Date: Sat, 06 Jul 2013 17:05:22 +0000 Subject: [issue18308] checkRecvmsgAddress wrong in test_socket.py (AIX failures) In-Reply-To: <1372261030.27.0.471709034157.issue18308@psf.upfronthosting.co.za> Message-ID: <1373130322.35.0.991170452469.issue18308@psf.upfronthosting.co.za> David Edelsohn added the comment: The patch in msg192405 works and fixes that error on AIX. That is exactly what I had in mind, but I incorrectly had been looking higher up the class hierarchy to override the method. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 19:08:18 2013 From: report at bugs.python.org (Andrea Griffini) Date: Sat, 06 Jul 2013 17:08:18 +0000 Subject: [issue18156] Add an 'attr' attribute to AttributeError In-Reply-To: <1370619110.26.0.980030189702.issue18156@psf.upfronthosting.co.za> Message-ID: <1373130498.39.0.884522982275.issue18156@psf.upfronthosting.co.za> Andrea Griffini added the comment: Even porting to the new wonderful 'attr' field is not going to make the code correct... (the exception could be bubbling up from code down ten frames about a different unrelated attribute that happens to have the same name in a different object). BTW cpython has a lot of those "except AttributeError" fragments coded in C with PyErr_ExceptionMatches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 19:20:12 2013 From: report at bugs.python.org (James Lu) Date: Sat, 06 Jul 2013 17:20:12 +0000 Subject: [issue18386] Better random number generator Message-ID: <1373131212.93.0.315136368245.issue18386@psf.upfronthosting.co.za> New submission from James Lu: http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index.html#dSFMT You might want to use a better algorithm ---------- components: Library (Lib) files: dSFMT-src-2.2.1.zip messages: 192469 nosy: James.Lu priority: normal severity: normal status: open title: Better random number generator versions: Python 3.3 Added file: http://bugs.python.org/file30830/dSFMT-src-2.2.1.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 19:21:27 2013 From: report at bugs.python.org (James Lu) Date: Sat, 06 Jul 2013 17:21:27 +0000 Subject: [issue18386] Better random number generator In-Reply-To: <1373131212.93.0.315136368245.issue18386@psf.upfronthosting.co.za> Message-ID: <1373131287.73.0.0849493980722.issue18386@psf.upfronthosting.co.za> Changes by James Lu : ---------- nosy: -James.Lu type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 19:22:44 2013 From: report at bugs.python.org (Brett Cannon) Date: Sat, 06 Jul 2013 17:22:44 +0000 Subject: [issue18156] Add an 'attr' attribute to AttributeError In-Reply-To: <1370619110.26.0.980030189702.issue18156@psf.upfronthosting.co.za> Message-ID: <1373131364.98.0.0896627070693.issue18156@psf.upfronthosting.co.za> Brett Cannon added the comment: Dra?en: didn't do a deep review, but a cursory look suggests the patch is fine. As for having to change a ton of files to start using the attribute, that's part of the effect of changing something as basic as an exception. If you would rather break it up into separate patches that's fine. But I would caution you from doing more than this patch as I have gotten some push back from other core devs on my proposed new attributes on exceptions so I don't want you spending your time on something that might get sunk (although if you are enjoying it then go for it since if it gets accepted this work will be needed). Also please sign the contributor agreement form (http://python.org/psf/contrib/contrib-form/) so that we can actually use your code. Andrea: While the attribute might coincidentally name an attribute that is the same as some other attribute which is not the actual trigger, the traceback on the exception provides the proper context to know what attribute in what code did the actual triggering. The point is that the exception can be considered better than nothing and is still an improvement over not having the information at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 19:28:15 2013 From: report at bugs.python.org (Ron Adam) Date: Sat, 06 Jul 2013 17:28:15 +0000 Subject: [issue18387] Add 'symbols' link to html menu bar. Message-ID: <1373131695.63.0.960870867634.issue18387@psf.upfronthosting.co.za> New submission from Ron Adam: This patch adds a 'symbols' link after the 'topics' and 'keywords' links in the html browser menu bar. help('symbols') worked, but there was no way to get to it in the html browser. This also adds unquote_plus() to the url handler to unquote the html input form fields. This is needed to allow entering the symbols. ---------- components: Library (Lib) files: pdoc_symbols.diff keywords: patch messages: 192471 nosy: ron_adam priority: normal severity: normal status: open title: Add 'symbols' link to html menu bar. versions: Python 3.4 Added file: http://bugs.python.org/file30831/pdoc_symbols.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 19:29:20 2013 From: report at bugs.python.org (Brett Cannon) Date: Sat, 06 Jul 2013 17:29:20 +0000 Subject: [issue18351] Incorrect variable name in importlib._bootstrap._get_sourcefile In-Reply-To: <1372857072.23.0.433996899216.issue18351@psf.upfronthosting.co.za> Message-ID: <1373131760.17.0.604361674133.issue18351@psf.upfronthosting.co.za> Brett Cannon added the comment: When I wrote that code I was struggling to untangle the C code and it was driving me up the wall because it was code unique to the C API and was just ever so slightly different. Anyway, the patch looks great! When I have time I will commit it to 3.3 and 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 19:29:22 2013 From: report at bugs.python.org (Ron Adam) Date: Sat, 06 Jul 2013 17:29:22 +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: <1373131762.49.0.102772630746.issue18387@psf.upfronthosting.co.za> Changes by Ron Adam : ---------- title: Add 'symbols' link to html menu bar. -> Add 'symbols' link to pydoc's html menu bar. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 19:30:29 2013 From: report at bugs.python.org (Brett Cannon) Date: Sat, 06 Jul 2013 17:30:29 +0000 Subject: [issue18351] Incorrect variable name in importlib._bootstrap._get_sourcefile In-Reply-To: <1372857072.23.0.433996899216.issue18351@psf.upfronthosting.co.za> Message-ID: <1373131829.49.0.749076163274.issue18351@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- stage: test needed -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 19:31:40 2013 From: report at bugs.python.org (Brett Cannon) Date: Sat, 06 Jul 2013 17:31:40 +0000 Subject: [issue18136] Put local build paths before system build paths in configure.ac and Makefile.pre.in In-Reply-To: <1370382090.88.0.902200330561.issue18136@psf.upfronthosting.co.za> Message-ID: <1373131900.86.0.381948220089.issue18136@psf.upfronthosting.co.za> Brett Cannon added the comment: I'm closing to close this then if Ronald can't reproduce as I have changed computers now and so my setup has shifted. Hopefully I was just a random case. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 19:34:33 2013 From: report at bugs.python.org (Dale Smith) Date: Sat, 06 Jul 2013 17:34:33 +0000 Subject: [issue18360] Won't install. Keeps telling me DLL is missing. In-Reply-To: <1373053156.11.0.656306326156.issue18360@psf.upfronthosting.co.za> Message-ID: <51D85529.1000001@eavillage.com> Dale Smith added the comment: I do see install and it tries to install. When I click "run" and go to the install menu, I select for "All users" and next and the generic "a dll is missing" message pops up. I'll explore this more. I do not have problems installing anything else. Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 19:36:31 2013 From: report at bugs.python.org (Brett Cannon) Date: Sat, 06 Jul 2013 17:36:31 +0000 Subject: [issue18342] Use the repr of a module name for ModuleNotFoundError in ceval.c In-Reply-To: <1372696430.42.0.571776913898.issue18342@psf.upfronthosting.co.za> Message-ID: <1373132191.95.0.0462985648536.issue18342@psf.upfronthosting.co.za> Brett Cannon added the comment: Tomasz, can you sign the contributor agreement (http://python.org/psf/contrib/contrib-form/) so we can commit your code? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 19:42:11 2013 From: report at bugs.python.org (Brett Cannon) Date: Sat, 06 Jul 2013 17:42:11 +0000 Subject: [issue6386] importing yields unexpected results when initial script is a symbolic link In-Reply-To: <1246356344.6.0.218965497612.issue6386@psf.upfronthosting.co.za> Message-ID: <1373132531.77.0.697539270573.issue6386@psf.upfronthosting.co.za> Brett Cannon added the comment: Senko, could you sign the contributor agreement (http://python.org/psf/contrib/contrib-form/) so we can use your patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 19:42:41 2013 From: report at bugs.python.org (Brett Cannon) Date: Sat, 06 Jul 2013 17:42:41 +0000 Subject: [issue18388] Link to the contributor agreement from devinabox Message-ID: <1373132561.94.0.680861467418.issue18388@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: brett.cannon keywords: easy nosy: brett.cannon priority: low severity: normal status: open title: Link to the contributor agreement from devinabox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 19:54:29 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Jul 2013 17:54:29 +0000 Subject: [issue7982] extend captured_output to simulate different stdout.encoding In-Reply-To: <1266844157.92.0.671833558035.issue7982@psf.upfronthosting.co.za> Message-ID: <1373133269.87.0.177028563749.issue7982@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 20:11:28 2013 From: report at bugs.python.org (Dale Smith) Date: Sat, 06 Jul 2013 18:11:28 +0000 Subject: [issue18360] Won't install. Keeps telling me DLL is missing. In-Reply-To: <1373053156.11.0.656306326156.issue18360@psf.upfronthosting.co.za> Message-ID: <51D85DCD.7080102@eavillage.com> Dale Smith added the comment: I tried everything that is available to "repair" my Windows 7 installer (unregistered/restarted the service etc). Everything installs fine except this installer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 20:29:18 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2013 18:29:18 +0000 Subject: [issue18360] Won't install. Keeps telling me DLL is missing. In-Reply-To: <1372950084.82.0.921928840895.issue18360@psf.upfronthosting.co.za> Message-ID: <1373135358.9.0.467282619909.issue18360@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thank you for the snips. Have you installed other applications that use a .msi installer (many do not). Have you tried another Python installer? For instance, change .5 to .3 in your link. Are you using a 64-bit installer on 32-bit Windows? It seems not as the link you gave *is* to the (default) 32-bit version. I searched the 2.7 repository for "dll is missing". No hits. So if you quoted accurately, that too-generic text is not coming from Python. Martin, any ideas on this install problem? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 20:34:03 2013 From: report at bugs.python.org (Martin Gergov) Date: Sat, 06 Jul 2013 18:34:03 +0000 Subject: [issue18095] unable to invoke socket.connect with AF_UNSPEC In-Reply-To: <1369836444.73.0.072481574082.issue18095@psf.upfronthosting.co.za> Message-ID: <1373135643.18.0.21145931822.issue18095@psf.upfronthosting.co.za> Martin Gergov added the comment: --- a/Modules/socketmodule.c Tue Jul 02 09:07:53 2013 -0400 +++ b/Modules/socketmodule.c Sat Jul 06 21:08:40 2013 +0300 @@ -3673,6 +3673,15 @@ { int how; int res; + struct sockaddr_in sin; + if (s->sock_type == SOCK_DGRAM){ + memset((char *)&sin, 0, sizeof(sin)); + sin.sin_family = AF_UNSPEC; + Py_BEGIN_ALLOW_THREADS + res = connect(s->sock_fd, (struct sockaddr *)&sin, sizeof(sin)); + Py_END_ALLOW_THREADS + return Py_None; + } how = _PyLong_AsInt(arg); if (how == -1 && PyErr_Occurred()) The shutdown method seems a suitable candidate, but a disconnect() method(which is semantically more correct) could be introduced. ---------- nosy: +marto1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 20:42:10 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 06 Jul 2013 18:42:10 +0000 Subject: [issue18095] unable to invoke socket.connect with AF_UNSPEC In-Reply-To: <1369836444.73.0.072481574082.issue18095@psf.upfronthosting.co.za> Message-ID: <1373136130.11.0.334918810048.issue18095@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 20:44:12 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 06 Jul 2013 18:44:12 +0000 Subject: [issue18329] for line in socket.makefile() speed degradation In-Reply-To: <1372541158.63.0.507892499267.issue18329@psf.upfronthosting.co.za> Message-ID: <1373136252.92.0.519027862194.issue18329@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 20:44:22 2013 From: report at bugs.python.org (Dale Smith) Date: Sat, 06 Jul 2013 18:44:22 +0000 Subject: [issue18360] Won't install. Keeps telling me DLL is missing. In-Reply-To: <1373135358.9.0.467282619909.issue18360@psf.upfronthosting.co.za> Message-ID: <51D86586.6030205@eavillage.com> Dale Smith added the comment: I do not know when but there is a version that seems to be installed. It's in my programs folder. I opened the python shell and it says it is Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32 It still does not explain the dll error message. I do assume its windows (of course). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 20:48:28 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Jul 2013 18:48:28 +0000 Subject: [issue18364] Remove _not_found hack from importlib In-Reply-To: <1372978476.87.0.491893318984.issue18364@psf.upfronthosting.co.za> Message-ID: <3bnhlH6fYXz7Ljk@mail.python.org> Roundup Robot added the comment: New changeset 0d590683c8d1 by Brett Cannon in branch 'default': Issue #18364: Stop using the ImportError._not_found hack. http://hg.python.org/cpython/rev/0d590683c8d1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 20:48:45 2013 From: report at bugs.python.org (Brett Cannon) Date: Sat, 06 Jul 2013 18:48:45 +0000 Subject: [issue18364] Remove _not_found hack from importlib In-Reply-To: <1372978476.87.0.491893318984.issue18364@psf.upfronthosting.co.za> Message-ID: <1373136525.37.0.170329607105.issue18364@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 20:53:03 2013 From: report at bugs.python.org (Ed Campbell) Date: Sat, 06 Jul 2013 18:53:03 +0000 Subject: [issue11445] python.exe on OS X shared-llbrary build erroneously linked to MacPorts python library In-Reply-To: <19830.44206.997189.286834@montanaro.dyndns.org> Message-ID: <1373136783.12.0.832686829888.issue11445@psf.upfronthosting.co.za> Changes by Ed Campbell : ---------- nosy: +esc24 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 21:31:01 2013 From: report at bugs.python.org (Madison May) Date: Sat, 06 Jul 2013 19:31:01 +0000 Subject: [issue18351] Incorrect variable name in importlib._bootstrap._get_sourcefile In-Reply-To: <1372857072.23.0.433996899216.issue18351@psf.upfronthosting.co.za> Message-ID: <1373139061.58.0.44868716513.issue18351@psf.upfronthosting.co.za> Madison May added the comment: I can imagine that would be incredibly frustrating -- it would drive me up the wall as well. Anyhow, glad to hear things looked good. I really appreciate your help guiding me through this one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 21:36:47 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 06 Jul 2013 19:36:47 +0000 Subject: [issue18360] Won't install. Keeps telling me DLL is missing. In-Reply-To: <1372950084.82.0.921928840895.issue18360@psf.upfronthosting.co.za> Message-ID: <1373139407.72.0.18344923512.issue18360@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Please open a cmd.exe shell, change to the directory containing the MSI file, and run msiexec /i python-2.7.5.msi /l*v python.log Then attach the resulting python.log file. If it is too large, compress it to a zip file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 22:14:32 2013 From: report at bugs.python.org (Jonathan Eldridge) Date: Sat, 06 Jul 2013 20:14:32 +0000 Subject: [issue18389] os.path.relpath gives incorrect results if start parameters is not a directory Message-ID: <1373141672.93.0.461698296017.issue18389@psf.upfronthosting.co.za> New submission from Jonathan Eldridge: With the following directory structure: computer$ ls foo/ computer$ ls foo/ bar/ foo_file.txt computer$ ls foo/bar/ bar_file.txt Running: os.path.relpath('foo/bar/bar_file.txt', 'foo/foo_file.txt') Returns: '../bar/bar_file.txt' But should return: 'bar/bar_file.txt' ---------- components: Library (Lib) messages: 192484 nosy: jveldridge priority: normal severity: normal status: open title: os.path.relpath gives incorrect results if start parameters is not a directory versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 22:17:03 2013 From: report at bugs.python.org (=?utf-8?q?Tomasz_Ma=C4=87kowiak?=) Date: Sat, 06 Jul 2013 20:17:03 +0000 Subject: [issue18342] Use the repr of a module name for ModuleNotFoundError in ceval.c In-Reply-To: <1372696430.42.0.571776913898.issue18342@psf.upfronthosting.co.za> Message-ID: <1373141823.74.0.000234600815775.issue18342@psf.upfronthosting.co.za> Tomasz Ma?kowiak added the comment: Signed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 22:18:25 2013 From: report at bugs.python.org (Jonathan Eldridge) Date: Sat, 06 Jul 2013 20:18:25 +0000 Subject: [issue18389] os.path.relpath gives incorrect results if start parameters is not a directory In-Reply-To: <1373141672.93.0.461698296017.issue18389@psf.upfronthosting.co.za> Message-ID: <1373141905.57.0.479204622408.issue18389@psf.upfronthosting.co.za> Changes by Jonathan Eldridge : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 23:30:20 2013 From: report at bugs.python.org (V.E.O) Date: Sat, 06 Jul 2013 21:30:20 +0000 Subject: [issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program In-Reply-To: <1366373912.56.0.138468709297.issue17797@psf.upfronthosting.co.za> Message-ID: <1373146220.75.0.943267046322.issue17797@psf.upfronthosting.co.za> V.E.O added the comment: Tested on MSVCRT110.DLL (11.0.51106.1 released in 2012/11/05). Previous one 11.0.50727.1 released in 2012/07/26 does not have this problem. This problem better be fixed in Python for MS does not have clear document. ---------- nosy: +V.E.O _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 23:41:02 2013 From: report at bugs.python.org (Walter Prins) Date: Sat, 06 Jul 2013 21:41:02 +0000 Subject: [issue18382] multiprocessing's overlapped PipeConnection issues on Windows 8 In-Reply-To: <1373125442.16.0.731109325689.issue18382@psf.upfronthosting.co.za> Message-ID: Walter Prins added the comment: On 6 July 2013 16:44, Richard Oudkerk wrote: > > Richard Oudkerk added the comment: > > Does that test always fail? Yes it does. I should've probably added in the original report that the following test (test_strings) also fail, possibly/probably due to the same issue. If you'd like me to post more details please ask. Walter > > ---------- > nosy: +sbt > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From nad at acm.org Sat Jul 6 21:48:06 2013 From: nad at acm.org (Ned Deily) Date: Sat, 06 Jul 2013 12:48:06 -0700 Subject: [issue15661] OS X installer packages should be signed for OS X 10.8 Gatekeeper feature References: <1345013707.82.0.343684011424.issue15661@psf.upfronthosting.co.za> <1373128474.28.0.520571565871.issue15661@psf.upfronthosting.co.za> Message-ID: > That package can then be opened using installer.app, but isn't usable as it. > > !) There are no pre/post scripts > > 2) User cannot select components > > 3) There is no README, License, custom logo, ... > > 4) I'm pretty sure this doesn't install the documentation > > It might be possible to add all missing features using pkgbuild and > productbuild, but I'm not sure about that. It is possible to support all of those features. I have a semi-working prototype which I need to finish. One process issue is that (I believe) one can only create signable flat packages on newer systems (10.6+) although the package can be used on 10.5. So either we don't change the 32-bit installer for 3.3+ (which is 10.5 deployment target) only, or we go through an extra step to build it on 10.5 and then sign it on 10.6+, or we build and sign it on 10.6+. The 2.7 32-bit installer uses a 10.3 deployment target and changing that would be a de facto ABI change for its users and suppliers of binary extension modules. So, for 2.7, we could (1) continue to supply the old format installer, supporting installations on 10.3+; (2) continue to build as 10.3 deployment target but switch to the new installer format, thereby no longer providing a binary installer for 10.3 and 10.4 systems (users could still build it themselves); (3) add a 10.5+ installer for 2.7.x (like the ones for 3.3+). We could drop (1) and move to (2) and (3) for a release or two of 2.7.x and then consider dropping (2), assuming there is not a lot of negative feedback. It would be nice to not have to worry about 10.4- compatibility. -- Ned Deily, nad at acm.org From report at bugs.python.org Sat Jul 6 22:50:57 2013 From: report at bugs.python.org (Dale Smith) Date: Sat, 06 Jul 2013 20:50:57 +0000 Subject: [issue18360] Won't install. Keeps telling me DLL is missing. In-Reply-To: <1373139407.72.0.18344923512.issue18360@psf.upfronthosting.co.za> Message-ID: <51D8832D.2060402@eavillage.com> Dale Smith added the comment: python log attached. Thank you. ---------- Added file: http://bugs.python.org/file30832/python.log _______________________________________ Python tracker _______________________________________ -------------- next part -------------- === Verbose logging started: 7/6/2013 16:25:27 Build type: SHIP UNICODE 5.00.7601.00 Calling process: C:\windows\system32\msiexec.exe === MSI (c) (38:84) [16:25:27:896]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg MSI (c) (38:84) [16:25:27:896]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg MSI (c) (38:14) [16:25:27:920]: Resetting cached policy values MSI (c) (38:14) [16:25:27:920]: Machine policy value 'Debug' is 0 MSI (c) (38:14) [16:25:27:920]: ******* RunEngine: ******* Product: python-2.7.5.msi ******* Action: ******* CommandLine: ********** MSI (c) (38:14) [16:25:27:956]: Machine policy value 'DisableUserInstalls' is 0 MSI (c) (38:14) [16:25:27:991]: SOFTWARE RESTRICTION POLICY: Verifying package --> 'C:\Users\astar\Downloads\python-2.7.5.msi' against software restriction policy MSI (c) (38:14) [16:25:28:010]: SOFTWARE RESTRICTION POLICY: C:\Users\astar\Downloads\python-2.7.5.msi has a digital signature MSI (c) (38:14) [16:25:28:816]: SOFTWARE RESTRICTION POLICY: C:\Users\astar\Downloads\python-2.7.5.msi is permitted to run at the 'unrestricted' authorization level. MSI (c) (38:14) [16:25:28:886]: Cloaking enabled. MSI (c) (38:14) [16:25:28:886]: Attempting to enable all disabled privileges before calling Install on Server MSI (c) (38:14) [16:25:28:891]: End dialog not enabled MSI (c) (38:14) [16:25:28:891]: Original package ==> C:\Users\astar\Downloads\python-2.7.5.msi MSI (c) (38:14) [16:25:28:892]: Package we're running from ==> C:\Users\astar\Downloads\python-2.7.5.msi MSI (c) (38:14) [16:25:28:898]: APPCOMPAT: Compatibility mode property overrides found. MSI (c) (38:14) [16:25:28:917]: APPCOMPAT: looking for appcompat database entry with ProductCode '{DBDD570E-0952-475F-9453-AB88F3DD5659}'. MSI (c) (38:14) [16:25:28:918]: APPCOMPAT: no matching ProductCode found in database. MSI (c) (38:14) [16:25:29:101]: MSCOREE not loaded loading copy from system32 MSI (c) (38:14) [16:25:29:109]: Machine policy value 'TransformsSecure' is 0 MSI (c) (38:14) [16:25:29:109]: User policy value 'TransformsAtSource' is 0 MSI (c) (38:14) [16:25:29:112]: Machine policy value 'DisablePatch' is 0 MSI (c) (38:14) [16:25:29:112]: Machine policy value 'AllowLockdownPatch' is 0 MSI (c) (38:14) [16:25:29:113]: Machine policy value 'DisableMsi' is 0 MSI (c) (38:14) [16:25:29:113]: Machine policy value 'AlwaysInstallElevated' is 0 MSI (c) (38:14) [16:25:29:113]: User policy value 'AlwaysInstallElevated' is 0 MSI (c) (38:14) [16:25:29:113]: Running product '{DBDD570E-0952-475F-9453-AB88F3DD5659}' with user privileges: It's not assigned. MSI (c) (38:14) [16:25:29:113]: Machine policy value 'DisableLUAPatching' is 0 MSI (c) (38:14) [16:25:29:113]: Machine policy value 'DisableFlyWeightPatching' is 0 MSI (c) (38:14) [16:25:29:114]: APPCOMPAT: looking for appcompat database entry with ProductCode '{DBDD570E-0952-475F-9453-AB88F3DD5659}'. MSI (c) (38:14) [16:25:29:114]: APPCOMPAT: no matching ProductCode found in database. MSI (c) (38:14) [16:25:29:115]: Transforms are not secure. MSI (c) (38:14) [16:25:29:115]: PROPERTY CHANGE: Adding MsiLogFileLocation property. Its value is 'C:\Users\astar\Downloads\python.log'. MSI (c) (38:14) [16:25:29:115]: Command Line: CURRENTDIRECTORY=C:\Users\astar\Downloads CLIENTUILEVEL=0 CLIENTPROCESSID=7480 MSI (c) (38:14) [16:25:29:115]: PROPERTY CHANGE: Adding PackageCode property. Its value is '{1F02E208-A1CC-4F09-8822-A047C860DFD6}'. MSI (c) (38:14) [16:25:29:116]: Product Code passed to Engine.Initialize: '' MSI (c) (38:14) [16:25:29:116]: Product Code from property table before transforms: '{DBDD570E-0952-475F-9453-AB88F3DD5659}' MSI (c) (38:14) [16:25:29:116]: Product Code from property table after transforms: '{DBDD570E-0952-475F-9453-AB88F3DD5659}' MSI (c) (38:14) [16:25:29:116]: Product not registered: beginning first-time install MSI (c) (38:14) [16:25:29:116]: PROPERTY CHANGE: Adding ProductState property. Its value is '-1'. MSI (c) (38:14) [16:25:29:116]: Entering CMsiConfigurationManager::SetLastUsedSource. MSI (c) (38:14) [16:25:29:116]: User policy value 'SearchOrder' is 'nmu' MSI (c) (38:14) [16:25:29:116]: Adding new sources is allowed. MSI (c) (38:14) [16:25:29:116]: PROPERTY CHANGE: Adding PackagecodeChanging property. Its value is '1'. MSI (c) (38:14) [16:25:29:116]: Package name extracted from package path: 'python-2.7.5.msi' MSI (c) (38:14) [16:25:29:117]: Package to be registered: 'python-2.7.5.msi' MSI (c) (38:14) [16:25:29:117]: Note: 1: 2262 2: Error 3: -2147287038 MSI (c) (38:14) [16:25:29:118]: Note: 1: 2262 2: AdminProperties 3: -2147287038 MSI (c) (38:14) [16:25:29:118]: Machine policy value 'AlwaysInstallElevated' is 0 MSI (c) (38:14) [16:25:29:118]: User policy value 'AlwaysInstallElevated' is 0 MSI (c) (38:14) [16:25:29:119]: Running product '{DBDD570E-0952-475F-9453-AB88F3DD5659}' with user privileges: It's not assigned. MSI (c) (38:14) [16:25:29:119]: PROPERTY CHANGE: Adding CURRENTDIRECTORY property. Its value is 'C:\Users\astar\Downloads'. MSI (c) (38:14) [16:25:29:119]: PROPERTY CHANGE: Adding CLIENTUILEVEL property. Its value is '0'. MSI (c) (38:14) [16:25:29:119]: PROPERTY CHANGE: Adding CLIENTPROCESSID property. Its value is '7480'. MSI (c) (38:14) [16:25:29:119]: TRANSFORMS property is now: MSI (c) (38:14) [16:25:29:119]: PROPERTY CHANGE: Adding VersionDatabase property. Its value is '200'. MSI (c) (38:14) [16:25:29:120]: SHELL32::SHGetFolderPath returned: C:\Users\astar\AppData\Roaming MSI (c) (38:14) [16:25:29:121]: SHELL32::SHGetFolderPath returned: C:\Users\astar\Favorites MSI (c) (38:14) [16:25:29:121]: SHELL32::SHGetFolderPath returned: C:\Users\astar\AppData\Roaming\Microsoft\Windows\Network Shortcuts MSI (c) (38:14) [16:25:29:122]: SHELL32::SHGetFolderPath returned: C:\Users\astar\Documents MSI (c) (38:14) [16:25:29:122]: SHELL32::SHGetFolderPath returned: C:\Users\astar\AppData\Roaming\Microsoft\Windows\Printer Shortcuts MSI (c) (38:14) [16:25:29:123]: SHELL32::SHGetFolderPath returned: C:\Users\astar\AppData\Roaming\Microsoft\Windows\Recent MSI (c) (38:14) [16:25:29:123]: SHELL32::SHGetFolderPath returned: C:\Users\astar\AppData\Roaming\Microsoft\Windows\SendTo MSI (c) (38:14) [16:25:29:123]: SHELL32::SHGetFolderPath returned: C:\Users\astar\AppData\Roaming\Microsoft\Windows\Templates MSI (c) (38:14) [16:25:29:124]: SHELL32::SHGetFolderPath returned: C:\ProgramData MSI (c) (38:14) [16:25:29:124]: SHELL32::SHGetFolderPath returned: C:\Users\astar\AppData\Local MSI (c) (38:14) [16:25:29:124]: SHELL32::SHGetFolderPath returned: C:\Users\astar\Pictures MSI (c) (38:14) [16:25:29:125]: SHELL32::SHGetFolderPath returned: C:\Users\astar\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Administrative Tools MSI (c) (38:14) [16:25:29:126]: SHELL32::SHGetFolderPath returned: C:\Users\astar\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup MSI (c) (38:14) [16:25:29:126]: SHELL32::SHGetFolderPath returned: C:\Users\astar\AppData\Roaming\Microsoft\Windows\Start Menu\Programs MSI (c) (38:14) [16:25:29:127]: SHELL32::SHGetFolderPath returned: C:\Users\astar\AppData\Roaming\Microsoft\Windows\Start Menu MSI (c) (38:14) [16:25:29:127]: SHELL32::SHGetFolderPath returned: C:\Users\astar\Desktop MSI (c) (38:14) [16:25:29:128]: SHELL32::SHGetFolderPath returned: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools MSI (c) (38:14) [16:25:29:128]: SHELL32::SHGetFolderPath returned: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup MSI (c) (38:14) [16:25:29:128]: SHELL32::SHGetFolderPath returned: C:\ProgramData\Microsoft\Windows\Start Menu\Programs MSI (c) (38:14) [16:25:29:129]: SHELL32::SHGetFolderPath returned: C:\ProgramData\Microsoft\Windows\Start Menu MSI (c) (38:14) [16:25:29:129]: SHELL32::SHGetFolderPath returned: C:\Users\Public\Desktop MSI (c) (38:14) [16:25:29:130]: SHELL32::SHGetFolderPath returned: C:\windows\Fonts MSI (c) (38:14) [16:25:29:132]: Note: 1: 2898 2: MS Sans Serif 3: MS Sans Serif 4: 0 5: 16 MSI (c) (38:14) [16:25:29:144]: MSI_LUA: Setting AdminUser property to 1 because this is the client or the user has already permitted elevation MSI (c) (38:14) [16:25:29:144]: PROPERTY CHANGE: Adding AdminUser property. Its value is '1'. MSI (c) (38:14) [16:25:29:144]: PROPERTY CHANGE: Adding Privileged property. Its value is '1'. MSI (c) (38:14) [16:25:29:144]: Note: 1: 1402 2: HKEY_CURRENT_USER\Software\Microsoft\MS Setup (ACME)\User Info 3: 2 MSI (c) (38:14) [16:25:29:144]: PROPERTY CHANGE: Adding USERNAME property. Its value is 'astar'. MSI (c) (38:14) [16:25:29:144]: Note: 1: 1402 2: HKEY_CURRENT_USER\Software\Microsoft\MS Setup (ACME)\User Info 3: 2 MSI (c) (38:14) [16:25:29:144]: PROPERTY CHANGE: Adding DATABASE property. Its value is 'C:\Users\astar\Downloads\python-2.7.5.msi'. MSI (c) (38:14) [16:25:29:144]: PROPERTY CHANGE: Adding OriginalDatabase property. Its value is 'C:\Users\astar\Downloads\python-2.7.5.msi'. MSI (c) (38:14) [16:25:29:144]: Machine policy value 'MsiDisableEmbeddedUI' is 0 MSI (c) (38:14) [16:25:29:144]: PROPERTY CHANGE: Adding SourceDir property. Its value is 'C:\Users\astar\Downloads\'. MSI (c) (38:14) [16:25:29:144]: PROPERTY CHANGE: Adding SOURCEDIR property. Its value is 'C:\Users\astar\Downloads\'. MSI (c) (38:84) [16:25:29:161]: PROPERTY CHANGE: Adding VersionHandler property. Its value is '5.00'. === Logging started: 7/6/2013 16:25:29 === MSI (c) (38:14) [16:25:29:168]: Note: 1: 2262 2: PatchPackage 3: -2147287038 MSI (c) (38:14) [16:25:29:168]: Machine policy value 'DisableRollback' is 0 MSI (c) (38:14) [16:25:29:168]: User policy value 'DisableRollback' is 0 MSI (c) (38:14) [16:25:29:168]: PROPERTY CHANGE: Adding UILevel property. Its value is '5'. MSI (c) (38:14) [16:25:29:168]: Note: 1: 2262 2: Font 3: -2147287038 MSI (c) (38:14) [16:25:29:169]: Note: 1: 2262 2: LaunchCondition 3: -2147287038 MSI (c) (38:14) [16:25:29:169]: APPCOMPAT: [DetectVersionLaunchCondition] Launch condition already passes. MSI (c) (38:14) [16:25:29:169]: PROPERTY CHANGE: Adding SHIMFLAGS property. Its value is '512'. MSI (c) (38:14) [16:25:29:169]: PROPERTY CHANGE: Adding ACTION property. Its value is 'INSTALL'. MSI (c) (38:14) [16:25:29:169]: Doing action: INSTALL Action 16:25:29: INSTALL. Action start 16:25:29: INSTALL. MSI (c) (38:14) [16:25:29:169]: UI Sequence table 'InstallUISequence' is present and populated. MSI (c) (38:14) [16:25:29:169]: Running UISequence MSI (c) (38:14) [16:25:29:169]: PROPERTY CHANGE: Adding EXECUTEACTION property. Its value is 'INSTALL'. MSI (c) (38:14) [16:25:29:170]: Doing action: WindowsFolder.21022.08.policy_9_0_Microsoft_VC90_CRT_x86.RTM.52105B6B_A3EF_3A90_882A_947B287C203A Action 16:25:29: WindowsFolder.21022.08.policy_9_0_Microsoft_VC90_CRT_x86.RTM.52105B6B_A3EF_3A90_882A_947B287C203A. Action start 16:25:29: WindowsFolder.21022.08.policy_9_0_Microsoft_VC90_CRT_x86.RTM.52105B6B_A3EF_3A90_882A_947B287C203A. MSI (c) (38:14) [16:25:29:170]: Note: 1: 2235 2: 3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = 'WindowsFolder.21022.08.policy_9_0_Microsoft_VC90_CRT_x86.RTM.52105B6B_A3EF_3A90_882A_947B287C203A' MSI (c) (38:14) [16:25:29:170]: PROPERTY CHANGE: Adding WindowsFolder.21022.08.policy_9_0_Microsoft_VC90_CRT_x86.RTM.52105B6B_A3EF_3A90_882A_947B287C203A property. Its value is 'C:\windows\'. Action ended 16:25:29: WindowsFolder.21022.08.policy_9_0_Microsoft_VC90_CRT_x86.RTM.52105B6B_A3EF_3A90_882A_947B287C203A. Return value 1. MSI (c) (38:14) [16:25:29:170]: Doing action: WindowsFolder.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 Action 16:25:29: WindowsFolder.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54. Action start 16:25:29: WindowsFolder.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54. MSI (c) (38:14) [16:25:29:171]: Note: 1: 2235 2: 3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = 'WindowsFolder.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54' MSI (c) (38:14) [16:25:29:171]: PROPERTY CHANGE: Adding WindowsFolder.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 property. Its value is 'C:\windows\'. Action ended 16:25:29: WindowsFolder.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54. Return value 1. MSI (c) (38:14) [16:25:29:171]: Doing action: SystemFolder.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 Action 16:25:29: SystemFolder.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54. Action start 16:25:29: SystemFolder.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54. MSI (c) (38:14) [16:25:29:171]: Note: 1: 2235 2: 3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = 'SystemFolder.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54' MSI (c) (38:14) [16:25:29:171]: PROPERTY CHANGE: Adding SystemFolder.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 property. Its value is 'C:\windows\SysWOW64\'. Action ended 16:25:29: SystemFolder.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54. Return value 1. MSI (c) (38:14) [16:25:29:171]: Doing action: LaunchConditions Action 16:25:29: LaunchConditions. Evaluating launch conditions Action start 16:25:29: LaunchConditions. MSI (c) (38:14) [16:25:29:172]: Note: 1: 2262 2: LaunchCondition 3: -2147287038 Action ended 16:25:29: LaunchConditions. Return value 1. MSI (c) (38:14) [16:25:29:172]: Skipping action: PrepareDlg (condition is false) MSI (c) (38:14) [16:25:29:172]: Doing action: WhichUsersDlg Action 16:25:29: WhichUsersDlg. Action start 16:25:29: WhichUsersDlg. MSI (c) (38:14) [16:25:29:172]: Note: 1: 2235 2: 3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = 'WhichUsersDlg' MSI (c) (38:84) [16:25:29:175]: Note: 1: 2262 2: Error 3: -2147287038 Info 2898.For VerdanaBold10 textstyle, the system created a 'Verdana' font, in 1 character set, of 16 pixels height. MSI (c) (38:84) [16:25:29:177]: Note: 1: 2262 2: Error 3: -2147287038 Info 2898.For DlgFont8 textstyle, the system created a 'Tahoma' font, in 1 character set, of 14 pixels height. Action 16:25:29: WhichUsersDlg. Dialog created MSI (c) (38:B4) [16:25:29:187]: Note: 1: 2731 2: 0 MSI (c) (38:84) [16:25:30:743]: PROPERTY CHANGE: Adding ALLUSERS property. Its value is '1'. Action ended 16:25:30: WhichUsersDlg. Return value 1. MSI (c) (38:14) [16:25:30:751]: Doing action: FindRelatedProducts Action 16:25:30: FindRelatedProducts. Searching for related applications Action start 16:25:30: FindRelatedProducts. FindRelatedProducts: Found application: {C0C31BCC-56FB-42A7-8766-D29E1BD74C7C} MSI (c) (38:14) [16:25:30:753]: PROPERTY CHANGE: Adding REMOVEOLDVERSION property. Its value is '{C0C31BCC-56FB-42A7-8766-D29E1BD74C7C}'. MSI (c) (38:14) [16:25:30:753]: PROPERTY CHANGE: Adding MIGRATE property. Its value is '{C0C31BCC-56FB-42A7-8766-D29E1BD74C7C}'. Action ended 16:25:30: FindRelatedProducts. Return value 1. MSI (c) (38:14) [16:25:30:753]: Doing action: AppSearch Action 16:25:30: AppSearch. Searching for installed applications Action start 16:25:30: AppSearch. MSI (c) (38:14) [16:25:30:754]: Note: 1: 2262 2: AppSearch 3: -2147287038 Action ended 16:25:30: AppSearch. Return value 1. MSI (c) (38:14) [16:25:30:754]: Doing action: CCPSearch Action 16:25:30: CCPSearch. Searching for qualifying products Action start 16:25:30: CCPSearch. MSI (c) (38:14) [16:25:30:755]: Note: 1: 2262 2: CCPSearch 3: -2147287038 Action ended 16:25:30: CCPSearch. Return value 1. MSI (c) (38:14) [16:25:30:755]: Doing action: RMCCPSearch Action 16:25:30: RMCCPSearch. Searching for qualifying products Action start 16:25:30: RMCCPSearch. MSI (c) (38:14) [16:25:30:756]: Note: 1: 2262 2: CCPSearch 3: -2147287038 Action ended 16:25:30: RMCCPSearch. Return value 0. MSI (c) (38:14) [16:25:30:756]: Doing action: ValidateProductID Action 16:25:30: ValidateProductID. Action start 16:25:30: ValidateProductID. Action ended 16:25:30: ValidateProductID. Return value 1. MSI (c) (38:14) [16:25:30:758]: Doing action: InitialTargetDir Action 16:25:30: InitialTargetDir. Action start 16:25:30: InitialTargetDir. MSI (c) (38:14) [16:25:30:759]: Note: 1: 2235 2: 3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = 'InitialTargetDir' MSI (c) (38:14) [16:25:30:759]: PROPERTY CHANGE: Adding TARGETDIR property. Its value is 'C:\Python27'. Action ended 16:25:30: InitialTargetDir. Return value 1. MSI (c) (38:14) [16:25:30:759]: Doing action: SetDLLDirToSystem32 Action 16:25:30: SetDLLDirToSystem32. Action start 16:25:30: SetDLLDirToSystem32. MSI (c) (38:14) [16:25:30:760]: Note: 1: 2235 2: 3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = 'SetDLLDirToSystem32' MSI (c) (38:14) [16:25:30:760]: PROPERTY CHANGE: Adding DLLDIR property. Its value is 'C:\windows\SysWOW64\'. Action ended 16:25:30: SetDLLDirToSystem32. Return value 1. MSI (c) (38:14) [16:25:30:760]: Skipping action: SetDLLDirToTarget (condition is false) MSI (c) (38:14) [16:25:30:760]: Doing action: CostInitialize Action 16:25:30: CostInitialize. Computing space requirements Action start 16:25:30: CostInitialize. MSI (c) (38:14) [16:25:30:761]: Machine policy value 'MaxPatchCacheSize' is 10 MSI (c) (38:14) [16:25:30:763]: Note: 1: 1336 2: 5 3: Q:\ MSI (c) (38:14) [16:25:30:763]: PROPERTY CHANGE: Adding ROOTDRIVE property. Its value is 'C:\'. MSI (c) (38:14) [16:25:30:765]: PROPERTY CHANGE: Adding CostingComplete property. Its value is '0'. Action ended 16:25:30: CostInitialize. Return value 1. MSI (c) (38:14) [16:25:30:765]: Doing action: FileCost Action 16:25:30: FileCost. Computing space requirements Action start 16:25:30: FileCost. MSI (c) (38:14) [16:25:30:766]: Note: 1: 2262 2: MoveFile 3: -2147287038 MSI (c) (38:14) [16:25:30:766]: Note: 1: 2262 2: DuplicateFile 3: -2147287038 MSI (c) (38:14) [16:25:30:767]: Note: 1: 2262 2: Class 3: -2147287038 MSI (c) (38:14) [16:25:30:767]: Note: 1: 2262 2: Extension 3: -2147287038 MSI (c) (38:14) [16:25:30:767]: Note: 1: 2262 2: TypeLib 3: -2147287038 MSI (c) (38:14) [16:25:30:767]: Note: 1: 2262 2: IniFile 3: -2147287038 MSI (c) (38:14) [16:25:30:767]: Note: 1: 2262 2: ReserveCost 3: -2147287038 Action ended 16:25:30: FileCost. Return value 1. MSI (c) (38:14) [16:25:30:767]: Doing action: IsolateComponents Action 16:25:30: IsolateComponents. Action start 16:25:30: IsolateComponents. MSI (c) (38:14) [16:25:30:768]: Note: 1: 2262 2: BindImage 3: -2147287038 MSI (c) (38:14) [16:25:30:768]: Note: 1: 2262 2: IsolatedComponent 3: -2147287038 MSI (c) (38:14) [16:25:30:768]: Note: 1: 2262 2: Patch 3: -2147287038 Action ended 16:25:30: IsolateComponents. Return value 1. MSI (c) (38:14) [16:25:30:768]: Doing action: CostFinalize Action 16:25:30: CostFinalize. Computing space requirements Action start 16:25:30: CostFinalize. MSI (c) (38:14) [16:25:30:768]: PROPERTY CHANGE: Adding OutOfDiskSpace property. Its value is '0'. MSI (c) (38:14) [16:25:30:768]: PROPERTY CHANGE: Adding OutOfNoRbDiskSpace property. Its value is '0'. MSI (c) (38:14) [16:25:30:768]: PROPERTY CHANGE: Adding PrimaryVolumeSpaceAvailable property. Its value is '0'. MSI (c) (38:14) [16:25:30:768]: PROPERTY CHANGE: Adding PrimaryVolumeSpaceRequired property. Its value is '0'. MSI (c) (38:14) [16:25:30:768]: PROPERTY CHANGE: Adding PrimaryVolumeSpaceRemaining property. Its value is '0'. MSI (c) (38:14) [16:25:30:768]: Note: 1: 2262 2: Patch 3: -2147287038 MSI (c) (38:14) [16:25:30:772]: PROPERTY CHANGE: Modifying TARGETDIR property. Its current value is 'C:\Python27'. Its new value: 'C:\Python27\'. MSI (c) (38:14) [16:25:30:772]: PROPERTY CHANGE: Adding WinSxsDirectory.21022.08.policy_9_0_Microsoft_VC90_CRT_x86.RTM.52105B6B_A3EF_3A90_882A_947B287C203A property. Its value is 'C:\windows\winsxs\'. MSI (c) (38:14) [16:25:30:772]: PROPERTY CHANGE: Adding WinSxsPolicies.21022.08.policy_9_0_Microsoft_VC90_CRT_x86.RTM.52105B6B_A3EF_3A90_882A_947B287C203A property. Its value is 'C:\windows\winsxs\Policies\'. MSI (c) (38:14) [16:25:30:772]: PROPERTY CHANGE: Adding policydir.21022.08.policy_9_0_Microsoft_VC90_CRT_x86.RTM.52105B6B_A3EF_3A90_882A_947B287C203A property. Its value is 'C:\windows\winsxs\Policies\x86_policy.9.0.Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_x-ww_b7353f75\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding payload_ul.21022.08.policy_9_0_Microsoft_VC90_CRT_x86.RTM.52105B6B_A3EF_3A90_882A_947B287C203A property. Its value is 'C:\windows\winsxs\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_60a5df56e60dc5df\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding WinSxsDirectory.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 property. Its value is 'C:\windows\winsxs\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding policydir_ul.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 property. Its value is 'C:\windows\winsxs\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_x-ww_1742743b\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding WinSxsPolicies.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 property. Its value is 'C:\windows\winsxs\Policies\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding policydir.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 property. Its value is 'C:\windows\winsxs\Policies\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_x-ww_1742743b\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding WinSxsManifests.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 property. Its value is 'C:\windows\winsxs\Manifests\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding payload.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 property. Its value is 'C:\windows\winsxs\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding payload_ul.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 property. Its value is 'C:\windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding MenuDir property. Its value is 'C:\Users\astar\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 2.7\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding Doc property. Its value is 'C:\Python27\Doc\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding tcl property. Its value is 'C:\Python27\tcl\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding dde1.3 property. Its value is 'C:\Python27\tcl\dde1.3\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding reg1.2 property. Its value is 'C:\Python27\tcl\reg1.2\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding tcl8 property. Its value is 'C:\Python27\tcl\tcl8\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding _8.2 property. Its value is 'C:\Python27\tcl\tcl8\8.2\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding _8.3 property. Its value is 'C:\Python27\tcl\tcl8\8.3\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding _8.4 property. Its value is 'C:\Python27\tcl\tcl8\8.4\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding platform property. Its value is 'C:\Python27\tcl\tcl8\8.4\platform\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding _8.5 property. Its value is 'C:\Python27\tcl\tcl8\8.5\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding tcl8.5 property. Its value is 'C:\Python27\tcl\tcl8.5\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding encoding property. Its value is 'C:\Python27\tcl\tcl8.5\encoding\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding http1.0 property. Its value is 'C:\Python27\tcl\tcl8.5\http1.0\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding msgs1 property. Its value is 'C:\Python27\tcl\tcl8.5\msgs\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding opt0.4 property. Its value is 'C:\Python27\tcl\tcl8.5\opt0.4\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding tzdata property. Its value is 'C:\Python27\tcl\tcl8.5\tzdata\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding Africa property. Its value is 'C:\Python27\tcl\tcl8.5\tzdata\Africa\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding America property. Its value is 'C:\Python27\tcl\tcl8.5\tzdata\America\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding Argentina property. Its value is 'C:\Python27\tcl\tcl8.5\tzdata\America\Argentina\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding Indiana property. Its value is 'C:\Python27\tcl\tcl8.5\tzdata\America\Indiana\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding Kentucky property. Its value is 'C:\Python27\tcl\tcl8.5\tzdata\America\Kentucky\'. MSI (c) (38:14) [16:25:30:773]: PROPERTY CHANGE: Adding North_Dakota property. Its value is 'C:\Python27\tcl\tcl8.5\tzdata\America\North_Dakota\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding Antarctica property. Its value is 'C:\Python27\tcl\tcl8.5\tzdata\Antarctica\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding Arctic property. Its value is 'C:\Python27\tcl\tcl8.5\tzdata\Arctic\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding Asia property. Its value is 'C:\Python27\tcl\tcl8.5\tzdata\Asia\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding Australia property. Its value is 'C:\Python27\tcl\tcl8.5\tzdata\Australia\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding Brazil property. Its value is 'C:\Python27\tcl\tcl8.5\tzdata\Brazil\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding Atlantic property. Its value is 'C:\Python27\tcl\tcl8.5\tzdata\Atlantic\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding Canada property. Its value is 'C:\Python27\tcl\tcl8.5\tzdata\Canada\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding Chile property. Its value is 'C:\Python27\tcl\tcl8.5\tzdata\Chile\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding Etc property. Its value is 'C:\Python27\tcl\tcl8.5\tzdata\Etc\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding Europe property. Its value is 'C:\Python27\tcl\tcl8.5\tzdata\Europe\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding Indian property. Its value is 'C:\Python27\tcl\tcl8.5\tzdata\Indian\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding Mexico property. Its value is 'C:\Python27\tcl\tcl8.5\tzdata\Mexico\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding SystemV property. Its value is 'C:\Python27\tcl\tcl8.5\tzdata\SystemV\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding Pacific property. Its value is 'C:\Python27\tcl\tcl8.5\tzdata\Pacific\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding US property. Its value is 'C:\Python27\tcl\tcl8.5\tzdata\US\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding tix8.4.3 property. Its value is 'C:\Python27\tcl\tix8.4.3\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding bitmaps1 property. Its value is 'C:\Python27\tcl\tix8.4.3\bitmaps\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding demos1 property. Its value is 'C:\Python27\tcl\tix8.4.3\demos\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding bitmaps property. Its value is 'C:\Python27\tcl\tix8.4.3\demos\bitmaps\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding samples property. Its value is 'C:\Python27\tcl\tix8.4.3\demos\samples\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding pref property. Its value is 'C:\Python27\tcl\tix8.4.3\pref\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding tk8.5 property. Its value is 'C:\Python27\tcl\tk8.5\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding demos property. Its value is 'C:\Python27\tcl\tk8.5\demos\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding images1 property. Its value is 'C:\Python27\tcl\tk8.5\demos\images\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding images property. Its value is 'C:\Python27\tcl\tk8.5\images\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding msgs property. Its value is 'C:\Python27\tcl\tk8.5\msgs\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding ttk property. Its value is 'C:\Python27\tcl\tk8.5\ttk\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding libs property. Its value is 'C:\Python27\libs\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding include property. Its value is 'C:\Python27\include\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding Lib property. Its value is 'C:\Python27\Lib\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding bsddb property. Its value is 'C:\Python27\Lib\bsddb\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding test6 property. Its value is 'C:\Python27\Lib\bsddb\test\'. MSI (c) (38:14) [16:25:30:774]: PROPERTY CHANGE: Adding compiler property. Its value is 'C:\Python27\Lib\compiler\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding ctypes property. Its value is 'C:\Python27\Lib\ctypes\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding macholib property. Its value is 'C:\Python27\Lib\ctypes\macholib\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding test5 property. Its value is 'C:\Python27\Lib\ctypes\test\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding curses property. Its value is 'C:\Python27\Lib\curses\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding distutils property. Its value is 'C:\Python27\Lib\distutils\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding command property. Its value is 'C:\Python27\Lib\distutils\command\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding tests2 property. Its value is 'C:\Python27\Lib\distutils\tests\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding email property. Its value is 'C:\Python27\Lib\email\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding mime property. Its value is 'C:\Python27\Lib\email\mime\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding test4 property. Its value is 'C:\Python27\Lib\email\test\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding data2 property. Its value is 'C:\Python27\Lib\email\test\data\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding encodings property. Its value is 'C:\Python27\Lib\encodings\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding hotshot property. Its value is 'C:\Python27\Lib\hotshot\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding idlelib property. Its value is 'C:\Python27\Lib\idlelib\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding Icons property. Its value is 'C:\Python27\Lib\idlelib\Icons\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding importlib property. Its value is 'C:\Python27\Lib\importlib\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding json property. Its value is 'C:\Python27\Lib\json\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding tests1 property. Its value is 'C:\Python27\Lib\json\tests\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding lib_tk property. Its value is 'C:\Python27\Lib\lib-tk\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding test3 property. Its value is 'C:\Python27\Lib\lib-tk\test\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding test_tkinter property. Its value is 'C:\Python27\Lib\lib-tk\test\test_tkinter\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding test_ttk property. Its value is 'C:\Python27\Lib\lib-tk\test\test_ttk\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding lib2to3 property. Its value is 'C:\Python27\Lib\lib2to3\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding fixes property. Its value is 'C:\Python27\Lib\lib2to3\fixes\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding pgen2 property. Its value is 'C:\Python27\Lib\lib2to3\pgen2\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding tests property. Its value is 'C:\Python27\Lib\lib2to3\tests\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding data1 property. Its value is 'C:\Python27\Lib\lib2to3\tests\data\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding fixers property. Its value is 'C:\Python27\Lib\lib2to3\tests\data\fixers\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding myfixes property. Its value is 'C:\Python27\Lib\lib2to3\tests\data\fixers\myfixes\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding logging property. Its value is 'C:\Python27\Lib\logging\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding msilib property. Its value is 'C:\Python27\Lib\msilib\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding multiprocessing property. Its value is 'C:\Python27\Lib\multiprocessing\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding dummy property. Its value is 'C:\Python27\Lib\multiprocessing\dummy\'. MSI (c) (38:14) [16:25:30:775]: PROPERTY CHANGE: Adding pydoc_data property. Its value is 'C:\Python27\Lib\pydoc_data\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding site_packages property. Its value is 'C:\Python27\Lib\site-packages\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding sqlite3 property. Its value is 'C:\Python27\Lib\sqlite3\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding test2 property. Its value is 'C:\Python27\Lib\sqlite3\test\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding test1 property. Its value is 'C:\Python27\Lib\test\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding cjkencodings property. Its value is 'C:\Python27\Lib\test\cjkencodings\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding crashers property. Its value is 'C:\Python27\Lib\test\crashers\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding data property. Its value is 'C:\Python27\Lib\test\data\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding decimaltestdata property. Its value is 'C:\Python27\Lib\test\decimaltestdata\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding leakers property. Its value is 'C:\Python27\Lib\test\leakers\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding subprocessdata property. Its value is 'C:\Python27\Lib\test\subprocessdata\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding tracedmodules property. Its value is 'C:\Python27\Lib\test\tracedmodules\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding xmltestdata property. Its value is 'C:\Python27\Lib\test\xmltestdata\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding unittest property. Its value is 'C:\Python27\Lib\unittest\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding test property. Its value is 'C:\Python27\Lib\unittest\test\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding wsgiref property. Its value is 'C:\Python27\Lib\wsgiref\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding xml property. Its value is 'C:\Python27\Lib\xml\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding dom property. Its value is 'C:\Python27\Lib\xml\dom\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding etree property. Its value is 'C:\Python27\Lib\xml\etree\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding parsers property. Its value is 'C:\Python27\Lib\xml\parsers\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding sax property. Its value is 'C:\Python27\Lib\xml\sax\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding DLLs property. Its value is 'C:\Python27\DLLs\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding Tools property. Its value is 'C:\Python27\Tools\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding webchecker property. Its value is 'C:\Python27\Tools\webchecker\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding versioncheck property. Its value is 'C:\Python27\Tools\versioncheck\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding Scripts property. Its value is 'C:\Python27\Tools\Scripts\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding i18n property. Its value is 'C:\Python27\Tools\i18n\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding pynche property. Its value is 'C:\Python27\Tools\pynche\'. MSI (c) (38:14) [16:25:30:776]: PROPERTY CHANGE: Adding X property. Its value is 'C:\Python27\Tools\pynche\X\'. MSI (c) (38:14) [16:25:30:776]: Target path resolution complete. Dumping Directory table... MSI (c) (38:14) [16:25:30:776]: Note: target paths subject to change (via custom actions or browsing) MSI (c) (38:14) [16:25:30:776]: Dir (target): Key: TARGETDIR , Object: C:\Python27\ MSI (c) (38:14) [16:25:30:776]: Dir (target): Key: WindowsFolder , Object: C:\windows\ MSI (c) (38:14) [16:25:30:776]: Dir (target): Key: WindowsFolder.21022.08.policy_9_0_Microsoft_VC90_CRT_x86.RTM.52105B6B_A3EF_3A90_882A_947B287C203A , Object: C:\windows\ MSI (c) (38:14) [16:25:30:776]: Dir (target): Key: WinSxsDirectory.21022.08.policy_9_0_Microsoft_VC90_CRT_x86.RTM.52105B6B_A3EF_3A90_882A_947B287C203A , Object: C:\windows\winsxs\ MSI (c) (38:14) [16:25:30:776]: Dir (target): Key: WinSxsPolicies.21022.08.policy_9_0_Microsoft_VC90_CRT_x86.RTM.52105B6B_A3EF_3A90_882A_947B287C203A , Object: C:\windows\winsxs\Policies\ MSI (c) (38:14) [16:25:30:776]: Dir (target): Key: policydir.21022.08.policy_9_0_Microsoft_VC90_CRT_x86.RTM.52105B6B_A3EF_3A90_882A_947B287C203A , Object: C:\windows\winsxs\Policies\x86_policy.9.0.Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_x-ww_b7353f75\ MSI (c) (38:14) [16:25:30:776]: Dir (target): Key: payload_ul.21022.08.policy_9_0_Microsoft_VC90_CRT_x86.RTM.52105B6B_A3EF_3A90_882A_947B287C203A , Object: C:\windows\winsxs\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_60a5df56e60dc5df\ MSI (c) (38:14) [16:25:30:776]: Dir (target): Key: WindowsFolder.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 , Object: C:\windows\ MSI (c) (38:14) [16:25:30:776]: Dir (target): Key: WinSxsDirectory.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 , Object: C:\windows\winsxs\ MSI (c) (38:14) [16:25:30:776]: Dir (target): Key: policydir_ul.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 , Object: C:\windows\winsxs\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_x-ww_1742743b\ MSI (c) (38:14) [16:25:30:776]: Dir (target): Key: WinSxsPolicies.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 , Object: C:\windows\winsxs\Policies\ MSI (c) (38:14) [16:25:30:776]: Dir (target): Key: policydir.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 , Object: C:\windows\winsxs\Policies\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_x-ww_1742743b\ MSI (c) (38:14) [16:25:30:776]: Dir (target): Key: WinSxsManifests.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 , Object: C:\windows\winsxs\Manifests\ MSI (c) (38:14) [16:25:30:776]: Dir (target): Key: payload.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 , Object: C:\windows\winsxs\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375\ MSI (c) (38:14) [16:25:30:776]: Dir (target): Key: payload_ul.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 , Object: C:\windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\ MSI (c) (38:14) [16:25:30:776]: Dir (target): Key: SystemFolder.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 , Object: C:\windows\SysWOW64\ MSI (c) (38:14) [16:25:30:776]: Dir (target): Key: ProgramMenuFolder , Object: C:\Users\astar\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\ MSI (c) (38:14) [16:25:30:776]: Dir (target): Key: MenuDir , Object: C:\Users\astar\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 2.7\ MSI (c) (38:14) [16:25:30:776]: Dir (target): Key: Doc , Object: C:\Python27\Doc\ MSI (c) (38:14) [16:25:30:776]: Dir (target): Key: tcl , Object: C:\Python27\tcl\ MSI (c) (38:14) [16:25:30:776]: Dir (target): Key: dde1.3 , Object: C:\Python27\tcl\dde1.3\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: reg1.2 , Object: C:\Python27\tcl\reg1.2\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: tcl8 , Object: C:\Python27\tcl\tcl8\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: _8.2 , Object: C:\Python27\tcl\tcl8\8.2\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: _8.3 , Object: C:\Python27\tcl\tcl8\8.3\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: _8.4 , Object: C:\Python27\tcl\tcl8\8.4\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: platform , Object: C:\Python27\tcl\tcl8\8.4\platform\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: _8.5 , Object: C:\Python27\tcl\tcl8\8.5\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: tcl8.5 , Object: C:\Python27\tcl\tcl8.5\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: encoding , Object: C:\Python27\tcl\tcl8.5\encoding\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: http1.0 , Object: C:\Python27\tcl\tcl8.5\http1.0\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: msgs1 , Object: C:\Python27\tcl\tcl8.5\msgs\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: opt0.4 , Object: C:\Python27\tcl\tcl8.5\opt0.4\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: tzdata , Object: C:\Python27\tcl\tcl8.5\tzdata\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: Africa , Object: C:\Python27\tcl\tcl8.5\tzdata\Africa\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: America , Object: C:\Python27\tcl\tcl8.5\tzdata\America\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: Argentina , Object: C:\Python27\tcl\tcl8.5\tzdata\America\Argentina\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: Indiana , Object: C:\Python27\tcl\tcl8.5\tzdata\America\Indiana\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: Kentucky , Object: C:\Python27\tcl\tcl8.5\tzdata\America\Kentucky\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: North_Dakota , Object: C:\Python27\tcl\tcl8.5\tzdata\America\North_Dakota\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: Antarctica , Object: C:\Python27\tcl\tcl8.5\tzdata\Antarctica\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: Arctic , Object: C:\Python27\tcl\tcl8.5\tzdata\Arctic\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: Asia , Object: C:\Python27\tcl\tcl8.5\tzdata\Asia\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: Australia , Object: C:\Python27\tcl\tcl8.5\tzdata\Australia\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: Brazil , Object: C:\Python27\tcl\tcl8.5\tzdata\Brazil\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: Atlantic , Object: C:\Python27\tcl\tcl8.5\tzdata\Atlantic\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: Canada , Object: C:\Python27\tcl\tcl8.5\tzdata\Canada\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: Chile , Object: C:\Python27\tcl\tcl8.5\tzdata\Chile\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: Etc , Object: C:\Python27\tcl\tcl8.5\tzdata\Etc\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: Europe , Object: C:\Python27\tcl\tcl8.5\tzdata\Europe\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: Indian , Object: C:\Python27\tcl\tcl8.5\tzdata\Indian\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: Mexico , Object: C:\Python27\tcl\tcl8.5\tzdata\Mexico\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: SystemV , Object: C:\Python27\tcl\tcl8.5\tzdata\SystemV\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: Pacific , Object: C:\Python27\tcl\tcl8.5\tzdata\Pacific\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: US , Object: C:\Python27\tcl\tcl8.5\tzdata\US\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: tix8.4.3 , Object: C:\Python27\tcl\tix8.4.3\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: bitmaps1 , Object: C:\Python27\tcl\tix8.4.3\bitmaps\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: demos1 , Object: C:\Python27\tcl\tix8.4.3\demos\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: bitmaps , Object: C:\Python27\tcl\tix8.4.3\demos\bitmaps\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: samples , Object: C:\Python27\tcl\tix8.4.3\demos\samples\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: pref , Object: C:\Python27\tcl\tix8.4.3\pref\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: tk8.5 , Object: C:\Python27\tcl\tk8.5\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: demos , Object: C:\Python27\tcl\tk8.5\demos\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: images1 , Object: C:\Python27\tcl\tk8.5\demos\images\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: images , Object: C:\Python27\tcl\tk8.5\images\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: msgs , Object: C:\Python27\tcl\tk8.5\msgs\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: ttk , Object: C:\Python27\tcl\tk8.5\ttk\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: libs , Object: C:\Python27\libs\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: include , Object: C:\Python27\include\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: Lib , Object: C:\Python27\Lib\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: bsddb , Object: C:\Python27\Lib\bsddb\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: test6 , Object: C:\Python27\Lib\bsddb\test\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: compiler , Object: C:\Python27\Lib\compiler\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: ctypes , Object: C:\Python27\Lib\ctypes\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: macholib , Object: C:\Python27\Lib\ctypes\macholib\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: test5 , Object: C:\Python27\Lib\ctypes\test\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: curses , Object: C:\Python27\Lib\curses\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: distutils , Object: C:\Python27\Lib\distutils\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: command , Object: C:\Python27\Lib\distutils\command\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: tests2 , Object: C:\Python27\Lib\distutils\tests\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: email , Object: C:\Python27\Lib\email\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: mime , Object: C:\Python27\Lib\email\mime\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: test4 , Object: C:\Python27\Lib\email\test\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: data2 , Object: C:\Python27\Lib\email\test\data\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: encodings , Object: C:\Python27\Lib\encodings\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: hotshot , Object: C:\Python27\Lib\hotshot\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: idlelib , Object: C:\Python27\Lib\idlelib\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: Icons , Object: C:\Python27\Lib\idlelib\Icons\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: importlib , Object: C:\Python27\Lib\importlib\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: json , Object: C:\Python27\Lib\json\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: tests1 , Object: C:\Python27\Lib\json\tests\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: lib_tk , Object: C:\Python27\Lib\lib-tk\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: test3 , Object: C:\Python27\Lib\lib-tk\test\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: test_tkinter , Object: C:\Python27\Lib\lib-tk\test\test_tkinter\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: test_ttk , Object: C:\Python27\Lib\lib-tk\test\test_ttk\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: lib2to3 , Object: C:\Python27\Lib\lib2to3\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: fixes , Object: C:\Python27\Lib\lib2to3\fixes\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: pgen2 , Object: C:\Python27\Lib\lib2to3\pgen2\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: tests , Object: C:\Python27\Lib\lib2to3\tests\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: data1 , Object: C:\Python27\Lib\lib2to3\tests\data\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: fixers , Object: C:\Python27\Lib\lib2to3\tests\data\fixers\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: myfixes , Object: C:\Python27\Lib\lib2to3\tests\data\fixers\myfixes\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: logging , Object: C:\Python27\Lib\logging\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: msilib , Object: C:\Python27\Lib\msilib\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: multiprocessing , Object: C:\Python27\Lib\multiprocessing\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: dummy , Object: C:\Python27\Lib\multiprocessing\dummy\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: pydoc_data , Object: C:\Python27\Lib\pydoc_data\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: site_packages , Object: C:\Python27\Lib\site-packages\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: sqlite3 , Object: C:\Python27\Lib\sqlite3\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: test2 , Object: C:\Python27\Lib\sqlite3\test\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: test1 , Object: C:\Python27\Lib\test\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: cjkencodings , Object: C:\Python27\Lib\test\cjkencodings\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: crashers , Object: C:\Python27\Lib\test\crashers\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: data , Object: C:\Python27\Lib\test\data\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: decimaltestdata , Object: C:\Python27\Lib\test\decimaltestdata\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: leakers , Object: C:\Python27\Lib\test\leakers\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: subprocessdata , Object: C:\Python27\Lib\test\subprocessdata\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: tracedmodules , Object: C:\Python27\Lib\test\tracedmodules\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: xmltestdata , Object: C:\Python27\Lib\test\xmltestdata\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: unittest , Object: C:\Python27\Lib\unittest\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: test , Object: C:\Python27\Lib\unittest\test\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: wsgiref , Object: C:\Python27\Lib\wsgiref\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: xml , Object: C:\Python27\Lib\xml\ MSI (c) (38:14) [16:25:30:777]: Dir (target): Key: dom , Object: C:\Python27\Lib\xml\dom\ MSI (c) (38:14) [16:25:30:778]: Dir (target): Key: etree , Object: C:\Python27\Lib\xml\etree\ MSI (c) (38:14) [16:25:30:778]: Dir (target): Key: parsers , Object: C:\Python27\Lib\xml\parsers\ MSI (c) (38:14) [16:25:30:778]: Dir (target): Key: sax , Object: C:\Python27\Lib\xml\sax\ MSI (c) (38:14) [16:25:30:778]: Dir (target): Key: DLLs , Object: C:\Python27\DLLs\ MSI (c) (38:14) [16:25:30:778]: Dir (target): Key: DLLDIR , Object: C:\windows\SysWOW64\ MSI (c) (38:14) [16:25:30:778]: Dir (target): Key: Tools , Object: C:\Python27\Tools\ MSI (c) (38:14) [16:25:30:778]: Dir (target): Key: webchecker , Object: C:\Python27\Tools\webchecker\ MSI (c) (38:14) [16:25:30:778]: Dir (target): Key: versioncheck , Object: C:\Python27\Tools\versioncheck\ MSI (c) (38:14) [16:25:30:778]: Dir (target): Key: Scripts , Object: C:\Python27\Tools\Scripts\ MSI (c) (38:14) [16:25:30:778]: Dir (target): Key: i18n , Object: C:\Python27\Tools\i18n\ MSI (c) (38:14) [16:25:30:778]: Dir (target): Key: pynche , Object: C:\Python27\Tools\pynche\ MSI (c) (38:14) [16:25:30:778]: Dir (target): Key: X , Object: C:\Python27\Tools\pynche\X\ MSI (c) (38:14) [16:25:30:778]: PROPERTY CHANGE: Adding INSTALLLEVEL property. Its value is '1'. MSI (c) (38:14) [16:25:30:778]: Note: 1: 2262 2: IsolatedComponent 3: -2147287038 MSI (c) (38:14) [16:25:30:778]: Note: 1: 2262 2: BindImage 3: -2147287038 MSI (c) (38:14) [16:25:30:778]: Note: 1: 2262 2: Patch 3: -2147287038 MSI (c) (38:14) [16:25:30:780]: skipping installation of assembly component: {14F2B62D-DF5F-335F-A517-0991F44CB087} since the assembly already exists MSI (c) (38:14) [16:25:30:780]: Note: 1: 2262 2: IsolatedComponent 3: -2147287038 MSI (c) (38:14) [16:25:30:780]: Note: 1: 2262 2: BindImage 3: -2147287038 MSI (c) (38:14) [16:25:30:780]: Note: 1: 2262 2: Patch 3: -2147287038 MSI (c) (38:14) [16:25:30:780]: Note: 1: 2262 2: IsolatedComponent 3: -2147287038 MSI (c) (38:14) [16:25:30:781]: Note: 1: 2262 2: BindImage 3: -2147287038 MSI (c) (38:14) [16:25:30:781]: Note: 1: 2262 2: Patch 3: -2147287038 MSI (c) (38:14) [16:25:30:781]: Note: 1: 2262 2: IsolatedComponent 3: -2147287038 MSI (c) (38:14) [16:25:30:781]: Note: 1: 2262 2: BindImage 3: -2147287038 MSI (c) (38:14) [16:25:30:781]: Note: 1: 2262 2: Patch 3: -2147287038 MSI (c) (38:14) [16:25:30:782]: skipping installation of assembly component: {B708EB72-AA82-3EB7-8BB0-D845BA35C93D} since the assembly already exists Action ended 16:25:30: CostFinalize. Return value 1. MSI (c) (38:14) [16:25:30:851]: Doing action: MigrateFeatureStates Action 16:25:30: MigrateFeatureStates. Migrating feature states from related applications Action start 16:25:30: MigrateFeatureStates. MSI (c) (38:14) [16:25:30:851]: Migrating feature settings from product(s) '{C0C31BCC-56FB-42A7-8766-D29E1BD74C7C}' MSI (c) (38:14) [16:25:30:852]: MigrateFeatureStates: based on existing product, setting feature 'SharedCRT' to 'Local' state. MSI (c) (38:14) [16:25:30:853]: skipping installation of assembly component: {B708EB72-AA82-3EB7-8BB0-D845BA35C93D} since the assembly already exists MSI (c) (38:14) [16:25:30:853]: Note: 1: 2262 2: IsolatedComponent 3: -2147287038 MSI (c) (38:14) [16:25:30:853]: Note: 1: 2262 2: BindImage 3: -2147287038 MSI (c) (38:14) [16:25:30:853]: Note: 1: 2262 2: Patch 3: -2147287038 MSI (c) (38:14) [16:25:30:853]: Note: 1: 2262 2: IsolatedComponent 3: -2147287038 MSI (c) (38:14) [16:25:30:853]: Note: 1: 2262 2: BindImage 3: -2147287038 MSI (c) (38:14) [16:25:30:853]: Note: 1: 2262 2: Patch 3: -2147287038 MSI (c) (38:14) [16:25:30:853]: Note: 1: 2262 2: IsolatedComponent 3: -2147287038 MSI (c) (38:14) [16:25:30:853]: Note: 1: 2262 2: BindImage 3: -2147287038 MSI (c) (38:14) [16:25:30:853]: Note: 1: 2262 2: Patch 3: -2147287038 MSI (c) (38:14) [16:25:30:854]: skipping installation of assembly component: {14F2B62D-DF5F-335F-A517-0991F44CB087} since the assembly already exists MSI (c) (38:14) [16:25:30:854]: Note: 1: 2262 2: IsolatedComponent 3: -2147287038 MSI (c) (38:14) [16:25:30:854]: Note: 1: 2262 2: BindImage 3: -2147287038 MSI (c) (38:14) [16:25:30:854]: Note: 1: 2262 2: Patch 3: -2147287038 MSI (c) (38:14) [16:25:30:856]: MigrateFeatureStates: based on existing product, setting feature 'DefaultFeature' to 'Local' state. MSI (c) (38:14) [16:25:30:864]: MigrateFeatureStates: based on existing product, setting feature 'Testsuite' to 'Local' state. MSI (c) (38:14) [16:25:30:865]: MigrateFeatureStates: based on existing product, setting feature 'Tools' to 'Local' state. MSI (c) (38:14) [16:25:30:867]: MigrateFeatureStates: based on existing product, setting feature 'Documentation' to 'Local' state. MSI (c) (38:14) [16:25:30:869]: MigrateFeatureStates: based on existing product, setting feature 'TclTk' to 'Local' state. MSI (c) (38:14) [16:25:30:872]: MigrateFeatureStates: based on existing product, setting feature 'Extensions' to 'Local' state. Action ended 16:25:30: MigrateFeatureStates. Return value 1. MSI (c) (38:14) [16:25:30:873]: Doing action: SelectDirectoryDlg Action 16:25:30: SelectDirectoryDlg. Action start 16:25:30: SelectDirectoryDlg. MSI (c) (38:14) [16:25:30:873]: Note: 1: 2235 2: 3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = 'SelectDirectoryDlg' MSI (c) (38:84) [16:25:30:878]: Note: 1: 2262 2: Error 3: -2147287038 Info 2898.For VerdanaRed9 textstyle, the system created a 'Verdana' font, in 1 character set, of 14 pixels height. MSI (c) (38:84) [16:25:30:881]: Note: 1: 2262 2: Error 3: -2147287038 Info 2898.For DlgFont8__UL textstyle, the system created a 'Tahoma' font, in 0 character set, of 14 pixels height. Action 16:25:30: SelectDirectoryDlg. Dialog created MSI (c) (38:CC) [16:25:30:942]: Note: 1: 2262 2: DuplicateFile 3: -2147287038 MSI (c) (38:CC) [16:25:30:943]: Note: 1: 2262 2: ReserveCost 3: -2147287038 MSI (c) (38:84) [16:25:34:648]: Doing action: CheckDir Action 16:25:34: CheckDir. Action start 16:25:34: CheckDir. MSI (c) (38:84) [16:25:34:648]: Note: 1: 2235 2: 3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = 'CheckDir' MSI (c) (38:A8) [16:25:34:650]: Invoking remote custom action. DLL: C:\Users\astar\AppData\Local\Temp\MSIA812.tmp, Entrypoint: _CheckDir at 4 MSI (c) (38:40) [16:25:34:653]: Cloaking enabled. MSI (c) (38:40) [16:25:34:653]: Attempting to enable all disabled privileges before calling Install on Server MSI (c) (38:40) [16:25:34:653]: Connected to service for CA interface. MSI (c) (38:84) [16:25:34:864]: Note: 1: 1723 2: CheckDir 3: _CheckDir at 4 4: C:\Users\astar\AppData\Local\Temp\MSIA812.tmp MSI (c) (38:84) [16:25:34:864]: Note: 1: 2262 2: Error 3: -2147287038 Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action CheckDir, entry: _CheckDir at 4, library: C:\Users\astar\AppData\Local\Temp\MSIA812.tmp MSI (c) (38:84) [16:25:36:477]: Note: 1: 2262 2: Error 3: -2147287038 MSI (c) (38:84) [16:25:36:477]: Product: Python 2.7.5 -- Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action CheckDir, entry: _CheckDir at 4, library: C:\Users\astar\AppData\Local\Temp\MSIA812.tmp Action ended 16:25:36: CheckDir. Return value 3. MSI (c) (38:84) [16:25:36:487]: Note: 1: 2262 2: Error 3: -2147287038 DEBUG: Error 2896: Executing action CheckDir failed. The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2896. The arguments are: CheckDir, , Action ended 16:25:36: SelectDirectoryDlg. Return value 3. MSI (c) (38:14) [16:25:36:487]: Doing action: FatalError Action 16:25:36: FatalError. Action start 16:25:36: FatalError. MSI (c) (38:14) [16:25:36:487]: Note: 1: 2235 2: 3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = 'FatalError' Action 16:25:36: FatalError. Dialog created Action ended 16:25:37: FatalError. Return value 2. Action ended 16:25:37: INSTALL. Return value 3. MSI (c) (38:14) [16:25:37:477]: Destroying RemoteAPI object. MSI (c) (38:40) [16:25:37:477]: Custom Action Manager thread ending. Property(C): X = C:\Python27\Tools\pynche\X\ Property(C): UpgradeCode = {65E6DE48-A358-434D-AA4F-4AF72DB4718F} Property(C): ProductName = Python 2.7.5 Property(C): ProductCode = {DBDD570E-0952-475F-9453-AB88F3DD5659} Property(C): ProductVersion = 2.7.5150 Property(C): Manufacturer = Python Software Foundation Property(C): ProductLanguage = 1033 Property(C): VersionNT = 601 Property(C): WhichUsers = ALL Property(C): ProductLine = Python27 Property(C): TARGETDIR = C:\Python27\ Property(C): Tools = C:\Python27\Tools\ Property(C): DefaultUIFont = DlgFont8 Property(C): ErrorDialog = ErrorDlg Property(C): Progress1 = Install Property(C): Progress2 = installs Property(C): MaintenanceForm_Action = Repair Property(C): DLLDIR = C:\windows\SysWOW64\ Property(C): SourceDir = C:\Users\astar\Downloads\ Property(C): DLLs = C:\Python27\DLLs\ Property(C): Lib = C:\Python27\Lib\ Property(C): xml = C:\Python27\Lib\xml\ Property(C): sax = C:\Python27\Lib\xml\sax\ Property(C): parsers = C:\Python27\Lib\xml\parsers\ Property(C): etree = C:\Python27\Lib\xml\etree\ Property(C): dom = C:\Python27\Lib\xml\dom\ Property(C): wsgiref = C:\Python27\Lib\wsgiref\ Property(C): unittest = C:\Python27\Lib\unittest\ Property(C): test = C:\Python27\Lib\unittest\test\ Property(C): test1 = C:\Python27\Lib\test\ Property(C): xmltestdata = C:\Python27\Lib\test\xmltestdata\ Property(C): tracedmodules = C:\Python27\Lib\test\tracedmodules\ Property(C): subprocessdata = C:\Python27\Lib\test\subprocessdata\ Property(C): leakers = C:\Python27\Lib\test\leakers\ Property(C): decimaltestdata = C:\Python27\Lib\test\decimaltestdata\ Property(C): data = C:\Python27\Lib\test\data\ Property(C): crashers = C:\Python27\Lib\test\crashers\ Property(C): cjkencodings = C:\Python27\Lib\test\cjkencodings\ Property(C): sqlite3 = C:\Python27\Lib\sqlite3\ Property(C): test2 = C:\Python27\Lib\sqlite3\test\ Property(C): site_packages = C:\Python27\Lib\site-packages\ Property(C): pydoc_data = C:\Python27\Lib\pydoc_data\ Property(C): multiprocessing = C:\Python27\Lib\multiprocessing\ Property(C): dummy = C:\Python27\Lib\multiprocessing\dummy\ Property(C): msilib = C:\Python27\Lib\msilib\ Property(C): logging = C:\Python27\Lib\logging\ Property(C): lib2to3 = C:\Python27\Lib\lib2to3\ Property(C): tests = C:\Python27\Lib\lib2to3\tests\ Property(C): data1 = C:\Python27\Lib\lib2to3\tests\data\ Property(C): fixers = C:\Python27\Lib\lib2to3\tests\data\fixers\ Property(C): myfixes = C:\Python27\Lib\lib2to3\tests\data\fixers\myfixes\ Property(C): pgen2 = C:\Python27\Lib\lib2to3\pgen2\ Property(C): fixes = C:\Python27\Lib\lib2to3\fixes\ Property(C): lib_tk = C:\Python27\Lib\lib-tk\ Property(C): test3 = C:\Python27\Lib\lib-tk\test\ Property(C): test_ttk = C:\Python27\Lib\lib-tk\test\test_ttk\ Property(C): test_tkinter = C:\Python27\Lib\lib-tk\test\test_tkinter\ Property(C): json = C:\Python27\Lib\json\ Property(C): tests1 = C:\Python27\Lib\json\tests\ Property(C): importlib = C:\Python27\Lib\importlib\ Property(C): idlelib = C:\Python27\Lib\idlelib\ Property(C): Icons = C:\Python27\Lib\idlelib\Icons\ Property(C): hotshot = C:\Python27\Lib\hotshot\ Property(C): encodings = C:\Python27\Lib\encodings\ Property(C): email = C:\Python27\Lib\email\ Property(C): test4 = C:\Python27\Lib\email\test\ Property(C): data2 = C:\Python27\Lib\email\test\data\ Property(C): mime = C:\Python27\Lib\email\mime\ Property(C): distutils = C:\Python27\Lib\distutils\ Property(C): tests2 = C:\Python27\Lib\distutils\tests\ Property(C): command = C:\Python27\Lib\distutils\command\ Property(C): curses = C:\Python27\Lib\curses\ Property(C): ctypes = C:\Python27\Lib\ctypes\ Property(C): test5 = C:\Python27\Lib\ctypes\test\ Property(C): macholib = C:\Python27\Lib\ctypes\macholib\ Property(C): compiler = C:\Python27\Lib\compiler\ Property(C): bsddb = C:\Python27\Lib\bsddb\ Property(C): test6 = C:\Python27\Lib\bsddb\test\ Property(C): include = C:\Python27\include\ Property(C): libs = C:\Python27\libs\ Property(C): tcl = C:\Python27\tcl\ Property(C): tk8.5 = C:\Python27\tcl\tk8.5\ Property(C): ttk = C:\Python27\tcl\tk8.5\ttk\ Property(C): msgs = C:\Python27\tcl\tk8.5\msgs\ Property(C): images = C:\Python27\tcl\tk8.5\images\ Property(C): demos = C:\Python27\tcl\tk8.5\demos\ Property(C): images1 = C:\Python27\tcl\tk8.5\demos\images\ Property(C): tix8.4.3 = C:\Python27\tcl\tix8.4.3\ Property(C): pref = C:\Python27\tcl\tix8.4.3\pref\ Property(C): demos1 = C:\Python27\tcl\tix8.4.3\demos\ Property(C): samples = C:\Python27\tcl\tix8.4.3\demos\samples\ Property(C): bitmaps = C:\Python27\tcl\tix8.4.3\demos\bitmaps\ Property(C): bitmaps1 = C:\Python27\tcl\tix8.4.3\bitmaps\ Property(C): tcl8.5 = C:\Python27\tcl\tcl8.5\ Property(C): tzdata = C:\Python27\tcl\tcl8.5\tzdata\ Property(C): US = C:\Python27\tcl\tcl8.5\tzdata\US\ Property(C): Pacific = C:\Python27\tcl\tcl8.5\tzdata\Pacific\ Property(C): SystemV = C:\Python27\tcl\tcl8.5\tzdata\SystemV\ Property(C): Mexico = C:\Python27\tcl\tcl8.5\tzdata\Mexico\ Property(C): Indian = C:\Python27\tcl\tcl8.5\tzdata\Indian\ Property(C): Europe = C:\Python27\tcl\tcl8.5\tzdata\Europe\ Property(C): Etc = C:\Python27\tcl\tcl8.5\tzdata\Etc\ Property(C): Chile = C:\Python27\tcl\tcl8.5\tzdata\Chile\ Property(C): Canada = C:\Python27\tcl\tcl8.5\tzdata\Canada\ Property(C): Atlantic = C:\Python27\tcl\tcl8.5\tzdata\Atlantic\ Property(C): Brazil = C:\Python27\tcl\tcl8.5\tzdata\Brazil\ Property(C): Australia = C:\Python27\tcl\tcl8.5\tzdata\Australia\ Property(C): Asia = C:\Python27\tcl\tcl8.5\tzdata\Asia\ Property(C): Arctic = C:\Python27\tcl\tcl8.5\tzdata\Arctic\ Property(C): Antarctica = C:\Python27\tcl\tcl8.5\tzdata\Antarctica\ Property(C): America = C:\Python27\tcl\tcl8.5\tzdata\America\ Property(C): North_Dakota = C:\Python27\tcl\tcl8.5\tzdata\America\North_Dakota\ Property(C): Kentucky = C:\Python27\tcl\tcl8.5\tzdata\America\Kentucky\ Property(C): Indiana = C:\Python27\tcl\tcl8.5\tzdata\America\Indiana\ Property(C): Argentina = C:\Python27\tcl\tcl8.5\tzdata\America\Argentina\ Property(C): Africa = C:\Python27\tcl\tcl8.5\tzdata\Africa\ Property(C): opt0.4 = C:\Python27\tcl\tcl8.5\opt0.4\ Property(C): msgs1 = C:\Python27\tcl\tcl8.5\msgs\ Property(C): http1.0 = C:\Python27\tcl\tcl8.5\http1.0\ Property(C): encoding = C:\Python27\tcl\tcl8.5\encoding\ Property(C): tcl8 = C:\Python27\tcl\tcl8\ Property(C): _8.5 = C:\Python27\tcl\tcl8\8.5\ Property(C): _8.4 = C:\Python27\tcl\tcl8\8.4\ Property(C): platform = C:\Python27\tcl\tcl8\8.4\platform\ Property(C): _8.3 = C:\Python27\tcl\tcl8\8.3\ Property(C): _8.2 = C:\Python27\tcl\tcl8\8.2\ Property(C): reg1.2 = C:\Python27\tcl\reg1.2\ Property(C): dde1.3 = C:\Python27\tcl\dde1.3\ Property(C): i18n = C:\Python27\Tools\i18n\ Property(C): pynche = C:\Python27\Tools\pynche\ Property(C): Scripts = C:\Python27\Tools\Scripts\ Property(C): versioncheck = C:\Python27\Tools\versioncheck\ Property(C): webchecker = C:\Python27\Tools\webchecker\ Property(C): Doc = C:\Python27\Doc\ Property(C): ProgramMenuFolder = C:\Users\astar\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\ Property(C): MenuDir = C:\Users\astar\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 2.7\ Property(C): REMOVEOLDVERSION = {C0C31BCC-56FB-42A7-8766-D29E1BD74C7C} Property(C): SecureCustomProperties = REMOVEOLDSNAPSHOT;REMOVEOLDVERSION;TARGETDIR;DLLDIR Property(C): WindowsFolder.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 = C:\windows\ Property(C): SystemFolder.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 = C:\windows\SysWOW64\ Property(C): WinSxsDirectory.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 = C:\windows\winsxs\ Property(C): payload_ul.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 = C:\windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\ Property(C): payload.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 = C:\windows\winsxs\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375\ Property(C): WinSxsManifests.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 = C:\windows\winsxs\Manifests\ Property(C): WinSxsPolicies.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 = C:\windows\winsxs\Policies\ Property(C): policydir.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 = C:\windows\winsxs\Policies\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_x-ww_1742743b\ Property(C): policydir_ul.21022.08.Microsoft_VC90_CRT_x86.RTM.0138F525_6C8A_333F_A105_14AE030B9A54 = C:\windows\winsxs\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_x-ww_1742743b\ Property(C): Dummy_Microsoft_VC90_CRT_x86.0138F525_6C8A_333F_A105_14AE030B9A54 = 1 Property(C): WinSxsDirectory.21022.08.policy_9_0_Microsoft_VC90_CRT_x86.RTM.52105B6B_A3EF_3A90_882A_947B287C203A = C:\windows\winsxs\ Property(C): payload_ul.21022.08.policy_9_0_Microsoft_VC90_CRT_x86.RTM.52105B6B_A3EF_3A90_882A_947B287C203A = C:\windows\winsxs\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_60a5df56e60dc5df\ Property(C): WinSxsPolicies.21022.08.policy_9_0_Microsoft_VC90_CRT_x86.RTM.52105B6B_A3EF_3A90_882A_947B287C203A = C:\windows\winsxs\Policies\ Property(C): policydir.21022.08.policy_9_0_Microsoft_VC90_CRT_x86.RTM.52105B6B_A3EF_3A90_882A_947B287C203A = C:\windows\winsxs\Policies\x86_policy.9.0.Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_x-ww_b7353f75\ Property(C): WindowsFolder.21022.08.policy_9_0_Microsoft_VC90_CRT_x86.RTM.52105B6B_A3EF_3A90_882A_947B287C203A = C:\windows\ Property(C): Dummy_policy_9_0_Microsoft_VC90_CRT_x86.52105B6B_A3EF_3A90_882A_947B287C203A = 1 Property(C): MsiLogFileLocation = C:\Users\astar\Downloads\python.log Property(C): PackageCode = {1F02E208-A1CC-4F09-8822-A047C860DFD6} Property(C): ProductState = -1 Property(C): PackagecodeChanging = 1 Property(C): CURRENTDIRECTORY = C:\Users\astar\Downloads Property(C): CLIENTUILEVEL = 0 Property(C): CLIENTPROCESSID = 7480 Property(C): VersionDatabase = 200 Property(C): VersionMsi = 5.00 Property(C): VersionNT64 = 601 Property(C): WindowsBuild = 7601 Property(C): ServicePackLevel = 1 Property(C): ServicePackLevelMinor = 0 Property(C): MsiNTProductType = 1 Property(C): MsiNTSuitePersonal = 1 Property(C): WindowsFolder = C:\windows\ Property(C): WindowsVolume = C:\ Property(C): System64Folder = C:\windows\system32\ Property(C): SystemFolder = C:\windows\SysWOW64\ Property(C): RemoteAdminTS = 1 Property(C): TempFolder = C:\Users\astar\AppData\Local\Temp\ Property(C): ProgramFilesFolder = C:\Program Files (x86)\ Property(C): CommonFilesFolder = C:\Program Files (x86)\Common Files\ Property(C): ProgramFiles64Folder = C:\Program Files\ Property(C): CommonFiles64Folder = C:\Program Files\Common Files\ Property(C): AppDataFolder = C:\Users\astar\AppData\Roaming\ Property(C): FavoritesFolder = C:\Users\astar\Favorites\ Property(C): NetHoodFolder = C:\Users\astar\AppData\Roaming\Microsoft\Windows\Network Shortcuts\ Property(C): PersonalFolder = C:\Users\astar\Documents\ Property(C): PrintHoodFolder = C:\Users\astar\AppData\Roaming\Microsoft\Windows\Printer Shortcuts\ Property(C): RecentFolder = C:\Users\astar\AppData\Roaming\Microsoft\Windows\Recent\ Property(C): SendToFolder = C:\Users\astar\AppData\Roaming\Microsoft\Windows\SendTo\ Property(C): TemplateFolder = C:\Users\astar\AppData\Roaming\Microsoft\Windows\Templates\ Property(C): CommonAppDataFolder = C:\ProgramData\ Property(C): LocalAppDataFolder = C:\Users\astar\AppData\Local\ Property(C): MyPicturesFolder = C:\Users\astar\Pictures\ Property(C): AdminToolsFolder = C:\Users\astar\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Administrative Tools\ Property(C): StartupFolder = C:\Users\astar\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\ Property(C): StartMenuFolder = C:\Users\astar\AppData\Roaming\Microsoft\Windows\Start Menu\ Property(C): DesktopFolder = C:\Users\astar\Desktop\ Property(C): FontsFolder = C:\windows\Fonts\ Property(C): GPTSupport = 1 Property(C): OLEAdvtSupport = 1 Property(C): ShellAdvtSupport = 1 Property(C): MsiAMD64 = 18 Property(C): Msix64 = 18 Property(C): Intel = 18 Property(C): PhysicalMemory = 5606 Property(C): VirtualMemory = 8687 Property(C): LogonUser = astar Property(C): UserSID = S-1-5-21-109520152-3717651594-2048065331-1001 Property(C): UserLanguageID = 1033 Property(C): ComputerName = ASTAR-PC Property(C): SystemLanguageID = 1033 Property(C): ScreenX = 1280 Property(C): ScreenY = 768 Property(C): CaptionHeight = 22 Property(C): BorderTop = 1 Property(C): BorderSide = 1 Property(C): TextHeight = 16 Property(C): TextInternalLeading = 3 Property(C): ColorBits = 32 Property(C): TTCSupport = 1 Property(C): Time = 16:25:37 Property(C): Date = 7/6/2013 Property(C): MsiNetAssemblySupport = 4.0.30319.17929 Property(C): MsiWin32AssemblySupport = 6.1.7601.17514 Property(C): RedirectedDllSupport = 2 Property(C): AdminUser = 1 Property(C): Privileged = 1 Property(C): USERNAME = astar Property(C): DATABASE = C:\Users\astar\Downloads\python-2.7.5.msi Property(C): OriginalDatabase = C:\Users\astar\Downloads\python-2.7.5.msi Property(C): SOURCEDIR = C:\Users\astar\Downloads\ Property(C): VersionHandler = 5.00 Property(C): UILevel = 5 Property(C): SHIMFLAGS = 512 Property(C): ACTION = INSTALL Property(C): EXECUTEACTION = INSTALL Property(C): ROOTDRIVE = C:\ Property(C): MIGRATE = {C0C31BCC-56FB-42A7-8766-D29E1BD74C7C} Property(C): ALLUSERS = 1 Property(C): CostingComplete = 0 Property(C): OutOfDiskSpace = 0 Property(C): OutOfNoRbDiskSpace = 0 Property(C): PrimaryVolumeSpaceAvailable = 0 Property(C): PrimaryVolumeSpaceRequired = 0 Property(C): PrimaryVolumeSpaceRemaining = 0 Property(C): INSTALLLEVEL = 1 === Logging stopped: 7/6/2013 16:25:37 === MSI (c) (38:14) [16:25:37:567]: Windows Installer installed the product. Product Name: Python 2.7.5. Product Version: 2.7.5150. Product Language: 1033. Manufacturer: Python Software Foundation. Installation success or error status: 1603. MSI (c) (38:14) [16:25:37:567]: Grabbed execution mutex. MSI (c) (38:14) [16:25:37:567]: Cleaning up uninstalled install packages, if any exist MSI (c) (38:14) [16:25:37:577]: MainEngineThread is returning 1603 === Verbose logging stopped: 7/6/2013 16:25:37 === From report at bugs.python.org Sat Jul 6 23:55:16 2013 From: report at bugs.python.org (Madison May) Date: Sat, 06 Jul 2013 21:55:16 +0000 Subject: [issue18389] os.path.relpath gives incorrect results if start parameters is not a directory In-Reply-To: <1373141672.93.0.461698296017.issue18389@psf.upfronthosting.co.za> Message-ID: <1373147716.27.0.52227984431.issue18389@psf.upfronthosting.co.za> Madison May added the comment: So the problem arises because a path to a file (not a path to a directory) is passed as an argument to start. So the way I see it, we could go one of several directions: 1) We could check for the presence of an extension in the start argument, and truncate start_path to start_path[:-1] if an extension is found. This wouldn't deal with the case where a path to a file without an extension is passed to relpath(), but it would deal with the large majority of cases. I'm in favor of this option. 2) We could add a warning to the docs and let users know that paths to files shouldn't be passed as the 'start' argument to relpath() -- only paths to directories are valid. You could perhaps even raise an error when a path to a file with an extension is passed as the 'start' argument. I've attached a patch for posixpath.py and ntpath.py with the first option in mind. The patch also contains an test case for this behavior. ---------- nosy: +madison.may _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 00:05:12 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Jul 2013 22:05:12 +0000 Subject: [issue18351] Incorrect variable name in importlib._bootstrap._get_sourcefile In-Reply-To: <1372857072.23.0.433996899216.issue18351@psf.upfronthosting.co.za> Message-ID: <3bnn6H6TdjzSbk@mail.python.org> Roundup Robot added the comment: New changeset b8028f74bac4 by Brett Cannon in branch '3.3': Issue #18351: Fix various issues with http://hg.python.org/cpython/rev/b8028f74bac4 New changeset e80634ad5a0e by Brett Cannon in branch 'default': merge for issue #18351. http://hg.python.org/cpython/rev/e80634ad5a0e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 00:06:10 2013 From: report at bugs.python.org (Madison May) Date: Sat, 06 Jul 2013 22:06:10 +0000 Subject: [issue18389] os.path.relpath gives incorrect results if start parameters is not a directory In-Reply-To: <1373141672.93.0.461698296017.issue18389@psf.upfronthosting.co.za> Message-ID: <1373148370.22.0.843397976386.issue18389@psf.upfronthosting.co.za> Madison May added the comment: Whoops -- I forgot to actually upload the patch. Here it is. ---------- keywords: +patch Added file: http://bugs.python.org/file30833/relpath.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 00:07:16 2013 From: report at bugs.python.org (Jonathan Eldridge) Date: Sat, 06 Jul 2013 22:07:16 +0000 Subject: [issue18389] os.path.relpath gives incorrect results if start parameters is not a directory In-Reply-To: <1373141672.93.0.461698296017.issue18389@psf.upfronthosting.co.za> Message-ID: <1373148436.86.0.316605766664.issue18389@psf.upfronthosting.co.za> Jonathan Eldridge added the comment: Seems like you could also narrow the case where the incorrect behavior occurs for files without an extension by doing a os.path.isfile check as well--that will only return True for cases where the file exists, but then relpath could work correctly for all existing files and all files that have an extension. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 00:15:42 2013 From: report at bugs.python.org (Brett Cannon) Date: Sat, 06 Jul 2013 22:15:42 +0000 Subject: [issue18351] Incorrect variable name in importlib._bootstrap._get_sourcefile In-Reply-To: <1372857072.23.0.433996899216.issue18351@psf.upfronthosting.co.za> Message-ID: <1373148942.84.0.932909621862.issue18351@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks for the patch, Madison! Added you to the ACKS file. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 00:22:01 2013 From: report at bugs.python.org (Brett Cannon) Date: Sat, 06 Jul 2013 22:22:01 +0000 Subject: [issue18390] Better documenting of ``hg revert -r`` when merging with another branch Message-ID: <1373149321.88.0.209488556232.issue18390@psf.upfronthosting.co.za> New submission from Brett Cannon: While the dev FAQ mentions it under null merges (http://docs.python.org/devguide/faq.html#how-do-i-make-a-null-merge), it probably should mention it under the merging section of http://docs.python.org/devguide/committing.html#merging-between-different-branches-within-the-same-major-version. ---------- assignee: brett.cannon components: Devguide keywords: easy messages: 192494 nosy: brett.cannon, ezio.melotti priority: normal severity: normal stage: needs patch status: open title: Better documenting of ``hg revert -r`` when merging with another branch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 00:39:03 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Jul 2013 22:39:03 +0000 Subject: [issue18379] SSLSocket.getpeercert(): OCSP and CRL DP URIs In-Reply-To: <1373113820.69.0.993582296308.issue18379@psf.upfronthosting.co.za> Message-ID: <1373150343.59.0.679854819355.issue18379@psf.upfronthosting.co.za> Christian Heimes added the comment: Updated patch with test, doc updates and a third field. I have added CDP and two AIA URIs: crlDistributionPoints, caIssuers and OCSP ---------- Added file: http://bugs.python.org/file30834/ssl_ocsp_crldp.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 00:39:11 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Jul 2013 22:39:11 +0000 Subject: [issue18379] SSLSocket.getpeercert(): OCSP and CRL DP URIs In-Reply-To: <1373113820.69.0.993582296308.issue18379@psf.upfronthosting.co.za> Message-ID: <1373150351.49.0.575453155892.issue18379@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file30810/ssl_ocsp_crldp.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 00:42:47 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Jul 2013 22:42:47 +0000 Subject: [issue6671] webbrowser doesn't respect xfce default browser In-Reply-To: <1249814125.92.0.530552321419.issue6671@psf.upfronthosting.co.za> Message-ID: <1373150567.74.0.315999026672.issue6671@psf.upfronthosting.co.za> ?ric Araujo added the comment: It?s not surprising to see differences in the environment given the complexity of X startup. I run xfce-session from lightdm, and I don?t have XDG_CURRENT_SESSION set. Still, it?s not too bad to have to check two envvars to determine we are on Xfce. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 00:43:13 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Jul 2013 22:43:13 +0000 Subject: [issue6671] webbrowser doesn't respect xfce default browser In-Reply-To: <1249814125.92.0.530552321419.issue6671@psf.upfronthosting.co.za> Message-ID: <1373150593.26.0.231186505942.issue6671@psf.upfronthosting.co.za> ?ric Araujo added the comment: XDG_CURRENT_DESKTOP* ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 00:54:04 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Jul 2013 22:54:04 +0000 Subject: [issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program In-Reply-To: <1366373912.56.0.138468709297.issue17797@psf.upfronthosting.co.za> Message-ID: <1373151244.7.0.952399315364.issue17797@psf.upfronthosting.co.za> Christian Heimes added the comment: Python 3.2 is in security fix mode. Bug fixes such as this issue don't count as security fix. Are you able to update to Python 3.3? Python 2.7 has a different implementation and uses FILE* instead of file descriptors. ---------- components: +Windows nosy: +christian.heimes resolution: -> out of date status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 00:55:42 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Jul 2013 22:55:42 +0000 Subject: [issue15705] PEP 3121, 384 Refactoring applied to sha256 module In-Reply-To: <1345151339.81.0.44810343177.issue15705@psf.upfronthosting.co.za> Message-ID: <1373151342.3.0.666545552914.issue15705@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 01:11:37 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Jul 2013 23:11:37 +0000 Subject: [issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth) In-Reply-To: <1204223194.19.0.670418970441.issue2202@psf.upfronthosting.co.za> Message-ID: <1373152297.78.0.887797823002.issue2202@psf.upfronthosting.co.za> Christian Heimes added the comment: Python 3.3 has been released a while ago and is in bug fix mode. Personally I'm against this enhancement. It adds a digest auth scheme that is based on a broken and insecure hashing algorithm. ---------- nosy: +christian.heimes resolution: accepted -> type: behavior -> enhancement versions: +Python 3.4 -Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 01:12:05 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Jul 2013 23:12:05 +0000 Subject: [issue15704] PEP 3121, 384 Refactoring applied to sha1 module In-Reply-To: <1345151034.85.0.141930979711.issue15704@psf.upfronthosting.co.za> Message-ID: <1373152325.43.0.325955159767.issue15704@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 01:12:13 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Jul 2013 23:12:13 +0000 Subject: [issue15706] PEP 3121, 384 Refactoring applied to sha512 module In-Reply-To: <1345151573.12.0.0841074756342.issue15706@psf.upfronthosting.co.za> Message-ID: <1373152333.96.0.410858261981.issue15706@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 01:33:52 2013 From: report at bugs.python.org (Chris Siebenmann) Date: Sat, 06 Jul 2013 23:33:52 +0000 Subject: [issue18391] socket.fromfd()'s API is difficult or impossible to use correctly in general Message-ID: <1373153632.08.0.45299629619.issue18391@psf.upfronthosting.co.za> New submission from Chris Siebenmann: socket.fromfd() requires you to supply at least the family and type of the file descriptor that you are turning into a Python socket object. However the socket module provides no documented way to determine what these actually are and there are any number of situations where you may get handed file descriptors with an indeterminate type. Nor does providing incorrect family and type values raise an exception from fromfd(), although if you get the wrong values you may get exceptions from calling methods on the returned socket (you can also get garbled and nonsensical results from some methods). (For instance, in Python 3 calling .getsockname() may raise UnicodeDecodeError under some circumstances.) Suggested resolution: socket.fromfd() should always determine the family and type itself and the arguments for them should become optional. If they are supplied and they do not match the determined family and type, fromfd() should probably raise an exception (although that will break some existing code). Less appealing resolution: the socket module should provide officially documented and supported methods for determining the family and type of a (socket) file descriptor. I think that a new module function to do this would be the cleanest approach. ---------- components: Library (Lib) messages: 192500 nosy: cks priority: normal severity: normal status: open title: socket.fromfd()'s API is difficult or impossible to use correctly in general type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 02:01:01 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 00:01:01 +0000 Subject: [issue18391] socket.fromfd()'s API is difficult or impossible to use correctly in general In-Reply-To: <1373153632.08.0.45299629619.issue18391@psf.upfronthosting.co.za> Message-ID: <1373155261.96.0.627057575607.issue18391@psf.upfronthosting.co.za> Christian Heimes added the comment: Unfortunately it's not as easy as you may think. BSD sockets have no portable API to retrieve domain, type and protocol from a file descriptor. getsockopt() may be able to retrieve some or even all values but it's not portable. For example SO_DOMAIN and SO_PROTOCOL requires Linux 2.6.32 or newer. I'm not sure about BSD or Windows. It's also not possible to verify the parameters until you actually do an operation like send(), recv() or accept() on a fd. Wrong parameters may not raise an error after all. For now I suggest that you pass all information to the other process, that is fd, domain, type, proto. They are just integers. ---------- nosy: +christian.heimes type: behavior -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 02:07:08 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 00:07:08 +0000 Subject: [issue18386] Better random number generator In-Reply-To: <1373131212.93.0.315136368245.issue18386@psf.upfronthosting.co.za> Message-ID: <1373155628.44.0.812142573174.issue18386@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file30830/dSFMT-src-2.2.1.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 02:09:11 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 00:09:11 +0000 Subject: [issue18386] Better random number generator In-Reply-To: <1373131212.93.0.315136368245.issue18386@psf.upfronthosting.co.za> Message-ID: <1373155751.33.0.276285410455.issue18386@psf.upfronthosting.co.za> Christian Heimes added the comment: Do you want to provide a patch for Python's random module? PS: Please do not upload files that can easily be downloaded from a 3rd party site. It just fills disk space on our server and doesn't provide a benefit for us. ---------- nosy: +christian.heimes versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 02:09:43 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jul 2013 00:09:43 +0000 Subject: [issue18386] Better random number generator In-Reply-To: <1373131212.93.0.315136368245.issue18386@psf.upfronthosting.co.za> Message-ID: <1373155783.49.0.441810458585.issue18386@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 02:21:26 2013 From: report at bugs.python.org (Madison May) Date: Sun, 07 Jul 2013 00:21:26 +0000 Subject: [issue18389] os.path.relpath gives incorrect results if start parameters is not a directory In-Reply-To: <1373141672.93.0.461698296017.issue18389@psf.upfronthosting.co.za> Message-ID: <1373156486.21.0.568839152053.issue18389@psf.upfronthosting.co.za> Madison May added the comment: That could definitely be beneficial. I've attached a second patch with that suggestion in mind. However, note that test_unittest is failing after adding the isfile(start) check. I think its related to the large amount of mocking that's happening in test_unittest: os.path.isfile has been reassigned in each test case that fails. I haven't managed to wrap my head around it yet, but feel free to test it out for yourself. ---------- Added file: http://bugs.python.org/file30835/relpath_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 02:25:37 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Jul 2013 00:25:37 +0000 Subject: [issue3329] API for setting the memory allocator used by Python In-Reply-To: <1215632933.18.0.0332019532518.issue3329@psf.upfronthosting.co.za> Message-ID: <3bnrDH07kpzRZn@mail.python.org> Roundup Robot added the comment: New changeset ca78c974e938 by Victor Stinner in branch 'default': Issue #3329: Implement the PEP 445 http://hg.python.org/cpython/rev/ca78c974e938 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 02:26:56 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jul 2013 00:26:56 +0000 Subject: [issue18392] Doc: PyObject_Malloc() is not documented Message-ID: <1373156816.39.0.0842066311974.issue18392@psf.upfronthosting.co.za> New submission from STINNER Victor: The implementation of the PEP 445 documents new memory allocator functions. But the old good PyObject_Malloc() is still not documentated!? ---------- assignee: docs at python components: Documentation messages: 192505 nosy: docs at python, haypo priority: normal severity: normal status: open title: Doc: PyObject_Malloc() is not documented versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 02:28:07 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jul 2013 00:28:07 +0000 Subject: [issue3329] API for setting the memory allocator used by Python In-Reply-To: <1215632933.18.0.0332019532518.issue3329@psf.upfronthosting.co.za> Message-ID: <1373156887.34.0.466756506544.issue3329@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, let see if buildbots like the PEP 445 (keep this issue open until we have the result of all 3.4 buildbots). I created the issue #18392 to document PyObject_Malloc(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 02:50:07 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Jul 2013 00:50:07 +0000 Subject: [issue17206] Py_XDECREF() expands its argument multiple times In-Reply-To: <1360858057.09.0.617835061471.issue17206@psf.upfronthosting.co.za> Message-ID: <3bnrmY6MbTz7LjW@mail.python.org> Roundup Robot added the comment: New changeset fcf079dece0d by Victor Stinner in branch 'default': Issue #17206: On Windows, increase the stack size from 2 MB to 4.2 MB to fix http://hg.python.org/cpython/rev/fcf079dece0d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 03:02:25 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sun, 07 Jul 2013 01:02:25 +0000 Subject: [issue18386] Better random number generator In-Reply-To: <1373131212.93.0.315136368245.issue18386@psf.upfronthosting.co.za> Message-ID: <1373158945.71.0.193764072602.issue18386@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 03:03:58 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jul 2013 01:03:58 +0000 Subject: [issue3329] API for setting the memory allocator used by Python In-Reply-To: <1215632933.18.0.0332019532518.issue3329@psf.upfronthosting.co.za> Message-ID: <1373159038.06.0.761178461316.issue3329@psf.upfronthosting.co.za> STINNER Victor added the comment: It looks like the changeset ca78c974e938 broke the "x86 XP-4 3.x" buildbot: buildbot.python.org/all/builders/x86 XP-4 3.x/builds/8795/ Traceback (most recent call last): File "../lib/test/regrtest.py", line 1305, in runtest_inner test_runner() File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_tools.py", line 459, in test_main support.run_unittest(*[obj for obj in globals().values() File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\support.py", line 1600, in run_unittest _run_suite(suite) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\support.py", line 1566, in _run_suite result = runner.run(suite) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\unittest\runner.py", line 175, in run result.printErrors() File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\unittest\runner.py", line 109, in printErrors self.printErrorList('ERROR', self.errors) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\unittest\runner.py", line 117, in printErrorList self.stream.writeln("%s" % err) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\unittest\runner.py", line 25, in writeln self.write(arg) MemoryError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "../lib/test/regrtest.py", line 1615, in main_in_temp_cwd() File "../lib/test/regrtest.py", line 1590, in main_in_temp_cwd main() File "../lib/test/regrtest.py", line 796, in main match_tests=match_tests) File "../lib/test/regrtest.py", line 998, in runtest debug, display_failure=False) File "../lib/test/regrtest.py", line 1330, in runtest_inner msg = traceback.format_exc() File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\traceback.py", line 254, in format_exc return "".join(format_exception(*sys.exc_info(), limit=limit, chain=chain)) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\traceback.py", line 180, in format_exception return list(_format_exception_iter(etype, value, tb, limit, chain)) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\traceback.py", line 152, in _format_exception_iter yield from _format_list_iter(_extract_tb_iter(tb, limit=limit)) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\traceback.py", line 17, in _format_list_iter for filename, lineno, name, line in extracted_list: File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\traceback.py", line 64, in _extract_tb_or_stack_iter line = linecache.getline(filename, lineno, f.f_globals) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\linecache.py", line 15, in getline lines = getlines(filename, module_globals) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\linecache.py", line 41, in getlines return updatecache(filename, module_globals) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\linecache.py", line 127, in updatecache lines = fp.readlines() File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\codecs.py", line 301, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) MemoryError ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 03:06:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Jul 2013 01:06:31 +0000 Subject: [issue3329] API for setting the memory allocator used by Python In-Reply-To: <1215632933.18.0.0332019532518.issue3329@psf.upfronthosting.co.za> Message-ID: <3bns7T6375zSht@mail.python.org> Roundup Robot added the comment: New changeset 51ed51d10e60 by Victor Stinner in branch 'default': Issue #3329: Fix _PyObject_ArenaVirtualFree() http://hg.python.org/cpython/rev/51ed51d10e60 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 05:04:18 2013 From: report at bugs.python.org (Chris Siebenmann) Date: Sun, 07 Jul 2013 03:04:18 +0000 Subject: [issue18391] socket.fromfd()'s API is difficult or impossible to use correctly in general In-Reply-To: <1373153632.08.0.45299629619.issue18391@psf.upfronthosting.co.za> Message-ID: <1373166258.27.0.406083721146.issue18391@psf.upfronthosting.co.za> Chris Siebenmann added the comment: As far as I know, you can recover everything except the protocol portably on Unix (and fromfd() will already handwave the protocol). getsockopt() with SO_TYPE will give you the type. The family can be recovered by calling getsockname() with a plain struct sockaddr and then examining sockaddr.sa_family. As for the other suggestion: When Python is plugging into larger systems or APIs that pass sockets around, it is not possible to modify those APIs to pass the additional information that Python wants (and other environments don't need). As far as I know, no current protocol that passes file descriptors to newly started programs or passes file descriptors over Unix sockets with sendmsg() and SCM_RIGHTS does this. The people responsible for these protocols are not likely to change them to accommodate Python's wants. A Python program (and thus Python programmers) get to deal with the issue themselves if they want Python to participate in these systems and protocols. I do want to be able to write Python programs that can interact in these environments. It is possible to deal with this in C; it is even possible to hack around this in Python today. I believe that it should be officially supported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 05:26:12 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 07 Jul 2013 03:26:12 +0000 Subject: [issue18386] Better random number generator In-Reply-To: <1373131212.93.0.315136368245.issue18386@psf.upfronthosting.co.za> Message-ID: <1373167572.98.0.195755044338.issue18386@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The bar is rather high for changing the current algorithm which is well studied, has a long period, and is reasonably fast. I do not recommend jumping straight into making a patch before we get agreement that we really want another PRNG when the current one is stable, well-studied, performant, and has been working well for its intended purpose. Note, we guarantee that the current method will always be available, so this would be just another option. If we were to add another generator, I prefer that we add one with some completely different characteristics (such as being cryptographically strong). I don't want to take the default generator and periodically switch it out with the "flavor of the month" (people are always coming up with more PRNGs that make various trade-offs between speed, size of stored state, period, etc). ---------- assignee: -> rhettinger nosy: +rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 05:26:17 2013 From: report at bugs.python.org (Todd Rovito) Date: Sun, 07 Jul 2013 03:26:17 +0000 Subject: [issue15661] OS X installer packages should be signed for OS X 10.8 Gatekeeper feature In-Reply-To: <1345013707.82.0.343684011424.issue15661@psf.upfronthosting.co.za> Message-ID: <1373167577.98.0.900570439401.issue15661@psf.upfronthosting.co.za> Changes by Todd Rovito : ---------- nosy: +Todd.Rovito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 06:26:50 2013 From: report at bugs.python.org (Todd Rovito) Date: Sun, 07 Jul 2013 04:26:50 +0000 Subject: [issue13582] IDLE and pythonw.exe stderr problem In-Reply-To: <1323632290.53.0.810720020667.issue13582@psf.upfronthosting.co.za> Message-ID: <1373171210.88.0.430508024294.issue13582@psf.upfronthosting.co.za> Todd Rovito added the comment: Terry, Bottom line I can't seem to get this patch to do anything for me. Before the patch is applied IDLE seems to be handling warnings and exceptions just fine in PyShell on the Mac. I get no crash and the output matches the normal console. Here is a small test program I wrote: import warnings def fxn(): # user warnings are not ignored by default and will cause a dump of information # to standard error. warnings.warn("User warning: Warn on purpose for IDLE", UserWarning) if __name__ == "__main__": fxn() print("the program should not terminate with the warning, but keep on running") a = 10 * 1000 print(a) # exception testing each of these will stop the program # divide by zero b = 10 * (1/0) print(b) # variable not defined c = 4 + spam*3 print(c) # can't convert 'int' object o str implicitly d = '2' + 2 print(d) Then I wanted to make sure I was executing the patched code so I made sure I called idle.pyw (normally I wouldn't do that I would use idle.py). After I called the correct script I changed the code to force std error to ErrorNotify class around line 101: import sys ##if 0: # For testing ## sys.__stderr__ = None ## sys.stderr = None if sys.__stderr__ is None: sys.__stderr__ = ErrorNotify() if sys.stderr is None: sys.stderr = ErrorNotify() if sys.__stdout__ is None: sys.__stdout__ = ErrorNotify(devnull=True) if sys.stdout is None: sys.stdout = ErrorNotify(devnull=True) sys.__stderr__ = ErrorNotify() sys.stderr = ErrorNotify() I would expect after this code runs any message sent to stderr would go through the ErrorNotify class and a widget should appear with the stderr output. Even after this change I can't get the error widget to appear. I have not given up yet but I wanted to provide a status update. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 08:15:24 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Jul 2013 06:15:24 +0000 Subject: [issue17557] test_getgroups of test_posix can fail on OS X 10.8 if more than 16 groups In-Reply-To: <1364378141.47.0.183536890409.issue17557@psf.upfronthosting.co.za> Message-ID: <1373177724.69.0.811681152251.issue17557@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the patch, Mateusz. That basic approach should work on all current releases (although it would be nice if Apple also fixed the problem). I'll test it on the various releases. If you haven't already, please submit a contributor form as described in the developer's guide (http://docs.python.org/devguide/patch.html#licensing). ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 08:53:17 2013 From: report at bugs.python.org (Senko Rasic) Date: Sun, 07 Jul 2013 06:53:17 +0000 Subject: [issue6386] importing yields unexpected results when initial script is a symbolic link In-Reply-To: <1246356344.6.0.218965497612.issue6386@psf.upfronthosting.co.za> Message-ID: <1373179997.47.0.357940178546.issue6386@psf.upfronthosting.co.za> Senko Rasic added the comment: Yep, signed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 09:04:35 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 07 Jul 2013 07:04:35 +0000 Subject: [issue15661] OS X installer packages should be signed for OS X 10.8 Gatekeeper feature In-Reply-To: <1345013707.82.0.343684011424.issue15661@psf.upfronthosting.co.za> Message-ID: <1373180675.45.0.763489098419.issue15661@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Also worthwhile to look into: http://s.sudre.free.fr/Software/Packages/about.html This is a GUI tool for creating packages, with a command-line tool for scripting. At the very least we could use this to check if it is possible to build a flat installer that does what we want. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 09:28:15 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Jul 2013 07:28:15 +0000 Subject: [issue17860] subprocess docs lack info how to use output result In-Reply-To: <1367159799.26.0.456231833917.issue17860@psf.upfronthosting.co.za> Message-ID: <3bp1by5Jw7z7Ljk@mail.python.org> Roundup Robot added the comment: New changeset f4747e1ce2b1 by Ronald Oussoren in branch '3.3': Cleanup of documentation change from #17860 http://hg.python.org/cpython/rev/f4747e1ce2b1 New changeset 83810f67d16b by Ronald Oussoren in branch 'default': (3.3->default) Cleanup of documentation change from #17860 http://hg.python.org/cpython/rev/83810f67d16b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 09:36:11 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Jul 2013 07:36:11 +0000 Subject: [issue18377] Python Launcher code cleanup In-Reply-To: <1373111103.05.0.405737364522.issue18377@psf.upfronthosting.co.za> Message-ID: <1373182571.81.0.25283690749.issue18377@psf.upfronthosting.co.za> Ned Deily added the comment: LGTM. I think it is best to eliminate the warnings everywhere so I'd apply it to all branches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 09:50:22 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Jul 2013 07:50:22 +0000 Subject: [issue18377] Python Launcher code cleanup In-Reply-To: <1373111103.05.0.405737364522.issue18377@psf.upfronthosting.co.za> Message-ID: <3bp25T3rFMzQT2@mail.python.org> Roundup Robot added the comment: New changeset 5d41ebc79738 by Ronald Oussoren in branch '2.7': Issue #18377: Code cleanup in Python Launcher http://hg.python.org/cpython/rev/5d41ebc79738 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 09:54:23 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Jul 2013 07:54:23 +0000 Subject: [issue18377] Python Launcher code cleanup In-Reply-To: <1373111103.05.0.405737364522.issue18377@psf.upfronthosting.co.za> Message-ID: <3bp2B63ZjNzQx6@mail.python.org> Roundup Robot added the comment: New changeset 738cba2bf849 by Ronald Oussoren in branch '3.3': Issue #18377: Code cleanup in Python Launcher http://hg.python.org/cpython/rev/738cba2bf849 New changeset d7a59e6f48df by Ronald Oussoren in branch 'default': (3.3->default) Issue #18377: Code cleanup in Python Launcher http://hg.python.org/cpython/rev/d7a59e6f48df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 09:55:06 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 07 Jul 2013 07:55:06 +0000 Subject: [issue18377] Python Launcher code cleanup In-Reply-To: <1373111103.05.0.405737364522.issue18377@psf.upfronthosting.co.za> Message-ID: <1373183706.24.0.818195479119.issue18377@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 10:05:06 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 07 Jul 2013 08:05:06 +0000 Subject: [issue18231] What's new in Python should explain what's new in UCD In-Reply-To: <1371406253.35.0.589040711268.issue18231@psf.upfronthosting.co.za> Message-ID: <1373184306.37.0.643893774065.issue18231@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: needs patch -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 10:10:03 2013 From: report at bugs.python.org (Ralph Heinkel) Date: Sun, 07 Jul 2013 08:10:03 +0000 Subject: [issue16535] json encoder unable to handle decimal In-Reply-To: <1353624338.46.0.574343718645.issue16535@psf.upfronthosting.co.za> Message-ID: <1373184603.73.0.733765596323.issue16535@psf.upfronthosting.co.za> Ralph Heinkel added the comment: This patch was implemented on Europython 2013 sprint. It's my first addition to Python core ever so please bear with me if it's not perfect. Decimal support is implemented both in the C and Python JSON code. There is one peculiarity to mention about the Decimal addition in function _json.c:encoder_listencode_obj() of my patch: The addition of else if (PyObject_IsInstance(obj, (PyObject*)PyDecimalType)) { PyObject *encoded = encoder_encode_decimal(s, obj); if (encoded == NULL) return -1; return _steal_accumulate(acc, encoded); } was has to be located AFTER lists and dicts are handled in the JSON encoder, otherwise the unittest "test_highly_nested_objects_encoding()" from test_recursion.py fails with a nasty, unrecoverable Python exception. My guess is that this is due additional stack allocation when the stack space is almost used up by the deeply nested recursion code. ---------- hgrepos: +202 keywords: +patch nosy: +ralhei Added file: http://bugs.python.org/file30836/json_decimal.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 10:18:37 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 07 Jul 2013 08:18:37 +0000 Subject: [issue14299] OS X installer build script: permissions not ensured In-Reply-To: <1331695262.49.0.711005270468.issue14299@psf.upfronthosting.co.za> Message-ID: <1373185117.53.0.640683518807.issue14299@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Ned: is this still relevant? On first glance the patch has not been applied yet, but the funtionality may have been added in another form. Also, I don't agree with the removal of group write-permissions. The current permissions allow users with admin privileges to install new packages without hassle, removing the group write permissions will IMHO just lead to tutorials that tell users to use sudo to install and that would be worse than the current situation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 10:21:05 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 07 Jul 2013 08:21:05 +0000 Subject: [issue15553] Segfault in test_6_daemon_threads() of test_threading, on Mac OS X Lion In-Reply-To: <1344041649.82.0.110527224272.issue15553@psf.upfronthosting.co.za> Message-ID: <1373185265.35.0.41323399666.issue15553@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'm closing this issue because I haven't been able to reproduce and the issue doesn't contain enough information to determine the cause of the crash (the buildbot logs are gone by now, and probably wouldn't have contained the required information anyway). ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 10:27:46 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 07 Jul 2013 08:27:46 +0000 Subject: [issue11571] Turtle window pops under the terminal on OSX In-Reply-To: <1300287451.35.0.164099198094.issue11571@psf.upfronthosting.co.za> Message-ID: <1373185666.79.0.141256744682.issue11571@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'm revisiting some old issues, and while I don't mind adding workarounds to the various scripts I do not consider this to be a bug. This is unexpected behavior from the platform, and only affects running scripts from the command-line (bundling the script in an app bundle would result in a window that pops up in front when the app is launched). I'm unassigning the issue because I'm no longer interested in working on this. ---------- assignee: ronaldoussoren -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 10:52:42 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 07 Jul 2013 08:52:42 +0000 Subject: [issue18257] Two copies of python-config In-Reply-To: <1371567872.42.0.116049773773.issue18257@psf.upfronthosting.co.za> Message-ID: <1373187162.0.0.631693528397.issue18257@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This is IMHO a release blocker: the the shell-script version of python-config doesn't work on a major platform (OSX), and (older) commercial unix systems. The easiest workaround is to remove the shell script and keep using the python script. ---------- nosy: +larry priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 10:53:12 2013 From: report at bugs.python.org (Mateusz Lenik) Date: Sun, 07 Jul 2013 08:53:12 +0000 Subject: [issue17557] test_getgroups of test_posix can fail on OS X 10.8 if more than 16 groups In-Reply-To: <1364378141.47.0.183536890409.issue17557@psf.upfronthosting.co.za> Message-ID: <1373187192.84.0.828040346885.issue17557@psf.upfronthosting.co.za> Mateusz Lenik added the comment: I signed it today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 11:11:17 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 07 Jul 2013 09:11:17 +0000 Subject: [issue18393] Gestalt() is deprecated on OSX 10.8, remove support? Message-ID: <1373188277.85.0.140879649909.issue18393@psf.upfronthosting.co.za> New submission from Ronald Oussoren: In OSX 10.8 the Gestalt() funtion in CoreServices is deprecated. This function is used in the _gestalt extension and exported to Python code. The only in-tree user of this (private) extension is the platform module, it uses gestalt as one of the alternatives to get the OSX release; and a fallback at that. A stackoverflow user has done some sleuthing and discovered that the gestalt function uses the same XML file to determine the OSX release as is used by the primary alternative used by the platform module (see ). The gestalt alternative will therefore likely be useful at all (it is only used when the file it reads is not available in the first place). The easiest solution to avoid this deprecated API is therefore to drop the _gestalt extension and remove its use in platform.mac_ver() ---------- assignee: ronaldoussoren components: Macintosh keywords: easy messages: 192526 nosy: ned.deily, ronaldoussoren priority: normal severity: normal stage: test needed status: open title: Gestalt() is deprecated on OSX 10.8, remove support? type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 11:11:36 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Jul 2013 09:11:36 +0000 Subject: [issue18020] html.escape 10x slower than cgi.escape In-Reply-To: <1369038098.34.0.795942514317.issue18020@psf.upfronthosting.co.za> Message-ID: <3bp3vC3dfHzShK@mail.python.org> Roundup Robot added the comment: New changeset db5f2b74e369 by Ezio Melotti in branch 'default': #18020: improve html.escape speed by an order of magnitude. Patch by Matt Bryant. http://hg.python.org/cpython/rev/db5f2b74e369 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 11:12:39 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 07 Jul 2013 09:12:39 +0000 Subject: [issue18020] html.escape 10x slower than cgi.escape In-Reply-To: <1369038098.34.0.795942514317.issue18020@psf.upfronthosting.co.za> Message-ID: <1373188359.82.0.318601775584.issue18020@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report and the patch! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 3.4 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 11:35:10 2013 From: report at bugs.python.org (V.E.O) Date: Sun, 07 Jul 2013 09:35:10 +0000 Subject: [issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program In-Reply-To: <1366373912.56.0.138468709297.issue17797@psf.upfronthosting.co.za> Message-ID: <1373189710.73.0.574121612247.issue17797@psf.upfronthosting.co.za> V.E.O added the comment: Hi Christian, The latest runtime Microsoft provided is buggy. Tried fix the PyVerify_fd with more GetFileType verification. But a lot more problems came for isatty returns true in non-console program. The fix in Python side shall be large. Details is reported to Microsoft, we can only hope they make it right. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 11:50:01 2013 From: report at bugs.python.org (Florent Xicluna) Date: Sun, 07 Jul 2013 09:50:01 +0000 Subject: [issue18394] cgi.FieldStorage triggers ResourceWarning sometimes Message-ID: <1373190601.25.0.575768158618.issue18394@psf.upfronthosting.co.za> New submission from Florent Xicluna: It happens when POSTing a file for example. When running the test suite: ./python.exe -m test test_cgi Or with the script attached: $ ./python test_fieldstorage.py test_fieldstorage.py:28: ResourceWarning: unclosed file <_io.BufferedRandom name=3> check('x' * 1010) # ResourceWarning test_fieldstorage.py:29: ResourceWarning: unclosed file <_io.BufferedRandom name=3> check('x' * (maxline - 1)) # ResourceWarning ---------- components: Library (Lib) files: test_fieldstorage.py messages: 192530 nosy: flox, orsenthil, serhiy.storchaka priority: normal severity: normal status: open title: cgi.FieldStorage triggers ResourceWarning sometimes type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30837/test_fieldstorage.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 12:24:08 2013 From: report at bugs.python.org (=?utf-8?q?Tomasz_Ma=C4=87kowiak?=) Date: Sun, 07 Jul 2013 10:24:08 +0000 Subject: [issue16223] untokenize returns a string if no encoding token is recognized In-Reply-To: <1350193751.15.0.784217855065.issue16223@psf.upfronthosting.co.za> Message-ID: <1373192648.1.0.516772737524.issue16223@psf.upfronthosting.co.za> Tomasz Ma?kowiak added the comment: Attached is a patch for untokenize, it's tests and docs and some minor pep8 improvements. The patch should fix unicode output and some corner cases handling in untokenize. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 12:24:47 2013 From: report at bugs.python.org (=?utf-8?q?Tomasz_Ma=C4=87kowiak?=) Date: Sun, 07 Jul 2013 10:24:47 +0000 Subject: [issue16223] untokenize returns a string if no encoding token is recognized In-Reply-To: <1350193751.15.0.784217855065.issue16223@psf.upfronthosting.co.za> Message-ID: <1373192687.76.0.665587806258.issue16223@psf.upfronthosting.co.za> Changes by Tomasz Ma?kowiak : ---------- keywords: +patch Added file: http://bugs.python.org/file30838/bug16223.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 12:29:43 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 07 Jul 2013 10:29:43 +0000 Subject: [issue16023] IDLE freezes on ^5 or ^6 (Un-)Tabify Region with OS X Cocoa Tk 8.5 In-Reply-To: <1348500115.21.0.649772246938.issue16023@psf.upfronthosting.co.za> Message-ID: <1373192983.22.0.884399802339.issue16023@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Interestingly enough it seems to hang while handling an import error, when I break executation and look at the stack trace I see (amongst others): #5 0x00000001000b11f1 in import_all_from [inlined] () at /Users/ronald/Projects/python/rw/default/Python/ceval.c:4614 4614 PyErr_SetString(PyExc_ImportError, (gdb) l 4609 PyErr_Clear(); 4610 dict = _PyObject_GetAttrId(v, &PyId___dict__); 4611 if (dict == NULL) { 4612 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) 4613 return -1; 4614 PyErr_SetString(PyExc_ImportError, 4615 "from-import-* object has no __dict__ and no __all__"); 4616 return -1; 4617 } 4618 all = PyMapping_Keys(dict); (gdb) This is with an optimized build, the debugger isn't as useful as I'd like and some information seem suspect (such as a frame object with an obviously invalid value for f_code. This is probably a red herring, I haven't been able to reproduce this particular problem with a debug build. In the production build I got a (non-functional) popup for entering some information, in the debug build I don't even get that and the proces hangs in CFRunLoopRunSpecific (called by Tk). And that's due to a call to "tkwait window ..." (aka the "wait_window" method from tkinter.Misc). Debugging is slightly annoying because 'pyo' from the gdb macros works, but the printing a python stack trace does not. The call is eventually traceable to calling simpledialog.askinteger in EditorWindow.tabify_region_event (through _asktabwidth) and is likely a bug where TkCocoa doesn't like callbacks into Tk from an event handler (IIRC we've had those before) A quick hack to test this theorie is to redefine tabify_region_event: def tabify_region_event(self, event): self.after(200, lambda: self._tabify_region_event(event)) def _tabify_region_event(self, event): # original method This doesn't actually help, IDLE still hangs and my theory is likely wrong. The easiest workaround is likely to give up for now and disable the ^5 and ^6 shortcuts (as well as ^3 and ^4 as those don't crash but don't do anything either, while the menu entries do work). Annoyingly other commands in the format menu work just fine (CTRL-T, CMD-], CMD-[) (all of this with the tip of the default branch and a freshly installed copy of ActiveTcl 8.5 on OSX 10.8) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 12:41:33 2013 From: report at bugs.python.org (Larry Hastings) Date: Sun, 07 Jul 2013 10:41:33 +0000 Subject: [issue18257] Two copies of python-config In-Reply-To: <1371567872.42.0.116049773773.issue18257@psf.upfronthosting.co.za> Message-ID: <1373193693.48.0.168072672907.issue18257@psf.upfronthosting.co.za> Larry Hastings added the comment: How about if the shell script detected that it was running on OS X and exited with an error instructing the user to use the Python script instead? I don't agree that this is a release blocker. Most people on OS X use the prebuilt binaries. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 12:46:13 2013 From: report at bugs.python.org (Matthias Klose) Date: Sun, 07 Jul 2013 10:46:13 +0000 Subject: [issue18257] Two copies of python-config In-Reply-To: <1371567872.42.0.116049773773.issue18257@psf.upfronthosting.co.za> Message-ID: <1373193973.57.0.033300631925.issue18257@psf.upfronthosting.co.za> Matthias Klose added the comment: Proposing to remove the shell script as the first step looks wrong. Do you know about a substitute for readlink on an "enterpricy" unix flavor like MacOSX? Using ls -l and interpreting the last argument of the output comes to mind. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 12:47:11 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Jul 2013 10:47:11 +0000 Subject: [issue18013] cgi.FieldStorage does not parse W3C sample In-Reply-To: <1368985509.82.0.0767956747913.issue18013@psf.upfronthosting.co.za> Message-ID: <3bp61V6S7lzSqb@mail.python.org> Roundup Robot added the comment: New changeset 406ce103c170 by Florent Xicluna in branch '3.3': Issue #18013: Fix cgi.FieldStorage to parse the W3C sample form. http://hg.python.org/cpython/rev/406ce103c170 New changeset 2ab2a2bfea49 by Florent Xicluna in branch 'default': Merge #18013: Fix cgi.FieldStorage to parse the W3C sample form. http://hg.python.org/cpython/rev/2ab2a2bfea49 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 12:49:06 2013 From: report at bugs.python.org (Florent Xicluna) Date: Sun, 07 Jul 2013 10:49:06 +0000 Subject: [issue18013] cgi.FieldStorage does not parse W3C sample In-Reply-To: <1368985509.82.0.0767956747913.issue18013@psf.upfronthosting.co.za> Message-ID: <1373194146.5.0.755940331114.issue18013@psf.upfronthosting.co.za> Florent Xicluna added the comment: Fix committed, with tests. ---------- resolution: -> fixed status: open -> closed versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 12:57:14 2013 From: report at bugs.python.org (Valentina Mukhamedzhanova) Date: Sun, 07 Jul 2013 10:57:14 +0000 Subject: [issue17198] dbm.whichdb references unitialized 'ndbm' variable In-Reply-To: <1360725498.06.0.499686664826.issue17198@psf.upfronthosting.co.za> Message-ID: <1373194634.68.0.514324734456.issue17198@psf.upfronthosting.co.za> Valentina Mukhamedzhanova added the comment: I added a testcase to demonstrate the bug and an import of ndbm to dbm.__init__.py to fix the bug. ---------- nosy: +umi Added file: http://bugs.python.org/file30839/patch_17198 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 13:13:32 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 07 Jul 2013 11:13:32 +0000 Subject: [issue18257] Two copies of python-config In-Reply-To: <1371567872.42.0.116049773773.issue18257@psf.upfronthosting.co.za> Message-ID: <1373195612.58.0.0147649659433.issue18257@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Why use a shell script in the first place? The shell script doesn't do everything the python script does (an example of this is that on OSX distutils and sysconfig can tweak the CFLAGS and LDFLAGS as needed based on the curent OSX version and the installed compiler, which is needed to be able to build extensions out of the box on all supported OSX releases) and doesn't work everywhere because it uses non-standard shell commands. I'll provide a patch that ensures that the python version gets used on OSX, that will reduce the number of issues we get about this. Larry: python-config is shipped in the binary installers, and as it currently is doesn't work. That's a problem because some software uses python-config to get the compiler options needed to use this python (for embedding, building extensions using a makefile, ...). I don't use python-config myself, but do try to keep the OSX version as closely as possible a normal unix install (another example of this: in a framework install, such as the binary installers, we ship a "libpython.a" at the expected location that is a symlink to the real *shared* library. That symlink isn't need for Python itself, but was added because some popular Linux software (can't remember which package) assumed that the library would be there). Anyway, I'll push a patch for this when I'm home. I'm slowly closing down my involvement with the EP sprints and will then head to the airport. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 13:15:08 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 07 Jul 2013 11:15:08 +0000 Subject: [issue18386] Better random number generator In-Reply-To: <1373131212.93.0.315136368245.issue18386@psf.upfronthosting.co.za> Message-ID: <1373195708.89.0.724842884418.issue18386@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > If we were to add another generator, I prefer that we add one with > some completely different characteristics (such as being > cryptographically strong). I don't want to take the default generator > and periodically switch it out with the "flavor of the month" (people > are always coming up with more PRNGs that make various trade-offs > between speed, size of stored state, period, etc). Agreed with Raymond. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 13:16:07 2013 From: report at bugs.python.org (=?utf-8?q?Tomasz_Ma=C4=87kowiak?=) Date: Sun, 07 Jul 2013 11:16:07 +0000 Subject: [issue18342] Use the repr of a module name for ModuleNotFoundError in ceval.c In-Reply-To: <1372696430.42.0.571776913898.issue18342@psf.upfronthosting.co.za> Message-ID: <1373195767.85.0.684232847073.issue18342@psf.upfronthosting.co.za> Tomasz Ma?kowiak added the comment: Attached patch with renamed test methods (as per Brett's review). ---------- Added file: http://bugs.python.org/file30840/bug18342_4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 13:16:15 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Jul 2013 11:16:15 +0000 Subject: [issue17198] dbm.whichdb references unitialized 'ndbm' variable In-Reply-To: <1360725498.06.0.499686664826.issue17198@psf.upfronthosting.co.za> Message-ID: <3bp6g25gk1z7Ljp@mail.python.org> Roundup Robot added the comment: New changeset 65fce1dad331 by Ezio Melotti in branch '3.3': #17198: Fix a NameError in the dbm module. Patch by Valentina Mukhamedzhanova. http://hg.python.org/cpython/rev/65fce1dad331 New changeset e91e9b9ba180 by Ezio Melotti in branch 'default': #17198: merge with 3.3. http://hg.python.org/cpython/rev/e91e9b9ba180 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 13:16:54 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 07 Jul 2013 11:16:54 +0000 Subject: [issue17198] dbm.whichdb references unitialized 'ndbm' variable In-Reply-To: <1360725498.06.0.499686664826.issue17198@psf.upfronthosting.co.za> Message-ID: <1373195814.55.0.623206756821.issue17198@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 13:19:17 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 07 Jul 2013 11:19:17 +0000 Subject: [issue5262] PythonLauncher considered harmfull In-Reply-To: <1234638505.38.0.029039550018.issue5262@psf.upfronthosting.co.za> Message-ID: <1373195957.22.0.0617860118131.issue5262@psf.upfronthosting.co.za> Changes by Ronald Oussoren : Removed file: http://bugs.python.org/file18266/smime.p7s _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 13:21:34 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 07 Jul 2013 11:21:34 +0000 Subject: [issue5262] PythonLauncher considered harmfull In-Reply-To: <1234638505.38.0.029039550018.issue5262@psf.upfronthosting.co.za> Message-ID: <1373196094.89.0.686103601197.issue5262@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- priority: normal -> low versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 13:24:44 2013 From: report at bugs.python.org (=?utf-8?q?Tomasz_Ma=C4=87kowiak?=) Date: Sun, 07 Jul 2013 11:24:44 +0000 Subject: [issue16223] untokenize returns a string if no encoding token is recognized In-Reply-To: <1350193751.15.0.784217855065.issue16223@psf.upfronthosting.co.za> Message-ID: <1373196284.65.0.985310576604.issue16223@psf.upfronthosting.co.za> Tomasz Ma?kowiak added the comment: Attached corrected ('^' and '$' for regexp in tests) patch. ---------- Added file: http://bugs.python.org/file30841/bug16223_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 13:24:49 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 07 Jul 2013 11:24:49 +0000 Subject: [issue18257] Two copies of python-config In-Reply-To: <1371567872.42.0.116049773773.issue18257@psf.upfronthosting.co.za> Message-ID: <1373196289.16.0.620377165287.issue18257@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 13:30:15 2013 From: report at bugs.python.org (Matthias Klose) Date: Sun, 07 Jul 2013 11:30:15 +0000 Subject: [issue18257] Two copies of python-config In-Reply-To: <1371567872.42.0.116049773773.issue18257@psf.upfronthosting.co.za> Message-ID: <1373196615.95.0.907224682121.issue18257@psf.upfronthosting.co.za> Matthias Klose added the comment: > Why use a shell script in the first place? you can't run python for a cross build, unless you "tweak" the interpreter. you can do that with a shell script only. As suggested in the original issue/patch, I did propose to remove the python implementation, so a fix for the shell script seems to be the better approach. Tweaking the CFLAGS in the shell script should be possible too. Maybe you could describe what exactly needs tweaking, as I cannot find this in the python implementation either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 13:32:56 2013 From: report at bugs.python.org (Matthias Klose) Date: Sun, 07 Jul 2013 11:32:56 +0000 Subject: [issue18257] Two copies of python-config In-Reply-To: <1371567872.42.0.116049773773.issue18257@psf.upfronthosting.co.za> Message-ID: <1373196776.93.0.138220179878.issue18257@psf.upfronthosting.co.za> Matthias Klose added the comment: > Furthermore the entire readlink command is not present in HP-UX The use of readlink is guarded, the use of readlink -f apparently not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 13:35:51 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 07 Jul 2013 11:35:51 +0000 Subject: [issue18257] Two copies of python-config In-Reply-To: <1371567872.42.0.116049773773.issue18257@psf.upfronthosting.co.za> Message-ID: <1373196951.53.0.0716590212034.issue18257@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This should do the trick, the shell script version is replaced by the python version when building on OSX. And yes, the use of readlink is guarded but that doesn't help because you then use a command-line flag that isn't supported on OSX: $ readlink -h . readlink: illegal option -- h usage: readlink [-n] [file ...] ---------- Added file: http://bugs.python.org/file30842/issue-18257.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 13:37:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Jul 2013 11:37:31 +0000 Subject: [issue18106] There are unused variables in Lib/test/test_collections.py In-Reply-To: <1369988012.39.0.245549184475.issue18106@psf.upfronthosting.co.za> Message-ID: <3bp77Z5Khzz7LjS@mail.python.org> Roundup Robot added the comment: New changeset a5010de76eda by Ezio Melotti in branch 'default': #18106: refactor tests to use subtests and proper assert methods. Patch by Vajrasky Kok. http://hg.python.org/cpython/rev/a5010de76eda ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 13:38:15 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 07 Jul 2013 11:38:15 +0000 Subject: [issue18106] There are unused variables in Lib/test/test_collections.py In-Reply-To: <1369988012.39.0.245549184475.issue18106@psf.upfronthosting.co.za> Message-ID: <1373197095.97.0.323969563675.issue18106@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 13:40:22 2013 From: report at bugs.python.org (Matthias Klose) Date: Sun, 07 Jul 2013 11:40:22 +0000 Subject: [issue18257] Two copies of python-config In-Reply-To: <1371567872.42.0.116049773773.issue18257@psf.upfronthosting.co.za> Message-ID: <1373197222.41.0.598917804814.issue18257@psf.upfronthosting.co.za> Matthias Klose added the comment: the proposed patch won't work once the python implementation is removed. Is -f supported on MacOSX? There seems to be a typo on your side trying -h, which isn't supported on Linux either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 13:47:11 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 07 Jul 2013 11:47:11 +0000 Subject: [issue18257] Two copies of python-config In-Reply-To: <1371567872.42.0.116049773773.issue18257@psf.upfronthosting.co.za> Message-ID: <1373197631.79.0.204391119669.issue18257@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Sorry about the confusion, "-f" isn't supported either that's why I noticed there is a problem. $ readlink -f . readlink: illegal option -- f usage: readlink [-n] [file ...] Again, why is does does have to be a shell script anyway? I really don't like the propect of having to reimplement the logic in _osx_support in shell code... I've written loads of large, portable shell scripts in the past (when portable meant supporting a dozen or so different unix flavors), and that's not really an experience worth repeating :-/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 15:09:15 2013 From: report at bugs.python.org (Matthias Klose) Date: Sun, 07 Jul 2013 13:09:15 +0000 Subject: [issue18257] Two copies of python-config In-Reply-To: <1371567872.42.0.116049773773.issue18257@psf.upfronthosting.co.za> Message-ID: <1373202555.97.0.000994946415774.issue18257@psf.upfronthosting.co.za> Matthias Klose added the comment: > Again, why is does does have to be a shell script anyway? please see above. I explained it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 15:09:25 2013 From: report at bugs.python.org (Ron Adam) Date: Sun, 07 Jul 2013 13:09:25 +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: <1373202565.77.0.674945146578.issue18387@psf.upfronthosting.co.za> Changes by Ron Adam : Removed file: http://bugs.python.org/file30831/pdoc_symbols.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 15:10:53 2013 From: report at bugs.python.org (Ron Adam) Date: Sun, 07 Jul 2013 13:10:53 +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: <1373202653.26.0.14911524107.issue18387@psf.upfronthosting.co.za> Ron Adam added the comment: New slightly improved patch. Combined the topic index's, topics, keywords, and the new symbols case, into a single html_topicsindex(title) function. ---------- Added file: http://bugs.python.org/file30843/pdoc_symbols.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 15:12:59 2013 From: report at bugs.python.org (Matthias Klose) Date: Sun, 07 Jul 2013 13:12:59 +0000 Subject: [issue18257] Two copies of python-config In-Reply-To: <1371567872.42.0.116049773773.issue18257@psf.upfronthosting.co.za> Message-ID: <1373202779.16.0.193346157779.issue18257@psf.upfronthosting.co.za> Matthias Klose added the comment: and see issue16235 (as mentioned in NEWS) for the complete discussion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 15:15:36 2013 From: report at bugs.python.org (Andrea Griffini) Date: Sun, 07 Jul 2013 13:15:36 +0000 Subject: [issue16547] IDLE raises an exception in tkinter after fresh file's text has been rendered In-Reply-To: <1353785000.68.0.88975991365.issue16547@psf.upfronthosting.co.za> Message-ID: <1373202936.59.0.962460212994.issue16547@psf.upfronthosting.co.za> Andrea Griffini added the comment: The error cannot be reproduced on 2.7, 3.3 or 3.4 because the problem has been fixed with 1e5e497ee33b (issue 17614) ---------- nosy: +ag6502 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 15:34:34 2013 From: report at bugs.python.org (=?utf-8?q?Dra=C5=BEen_Lu=C4=8Danin?=) Date: Sun, 07 Jul 2013 13:34:34 +0000 Subject: [issue18156] Add an 'attr' attribute to AttributeError In-Reply-To: <1370619110.26.0.980030189702.issue18156@psf.upfronthosting.co.za> Message-ID: <1373204074.06.0.047700786065.issue18156@psf.upfronthosting.co.za> Dra?en Lu?anin added the comment: OK, thanks for the feedback. I signed the CLA. I'll then wait with the remaining work, until a final decision has been made. We have a rough idea of how it could be implemented if it comes to this - adding a wrapper function in Python/errors.c: PyErr_SetAttributeError(PyObject *attr, const char *format, ...) that would replace all the PyErr_SetObject, PyErr_SetString and PyErr_Format calls (in around 50 files), create the kwargs object, format the message (if provided) and call PyErr_SetObject or PyErr_SetFormat. I put the last patch as a commit in the attr bookmark on BitBucket (took me quite some time to figure out that's the alternative to git branches), so that subsequent changes go more easily. ---------- hgrepos: +203 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 15:37:06 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 07 Jul 2013 13:37:06 +0000 Subject: [issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k] In-Reply-To: <1311287495.04.0.0852522537211.issue12606@psf.upfronthosting.co.za> Message-ID: <1373204226.51.0.617728064996.issue12606@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 15:48:52 2013 From: report at bugs.python.org (Senko Rasic) Date: Sun, 07 Jul 2013 13:48:52 +0000 Subject: [issue9177] ssl.read/write on closed socket raises AttributeError In-Reply-To: <1278409980.47.0.00506027612669.issue9177@psf.upfronthosting.co.za> Message-ID: <1373204932.26.0.405119011575.issue9177@psf.upfronthosting.co.za> Senko Rasic added the comment: Here's a patch that adds checks and ValueError raises to SSLSocket.read and SSLSocket.write. My first attempt was to add the check to _checkClosed to mirror the IOBase._checkClosed, but in SSLSocket its semantics are different (the idea is for the subclass to add custom checks if needed), and it's called from a lot of places that do gracefully handle closed sockets. So I opted to add it manually to only the read and write methods (which allowed for more specific error messages). ---------- keywords: +patch nosy: +senko Added file: http://bugs.python.org/file30844/ssl-socket-readwrite-after-close.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 16:00:36 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jul 2013 14:00:36 +0000 Subject: [issue18395] Make _Py_char2wchar() and _Py_wchar2char() public Message-ID: <1373205636.55.0.562779126658.issue18395@psf.upfronthosting.co.za> New submission from STINNER Victor: The Python C API has two very useful functions: _Py_char2wchar() and _Py_wchar2char(). They must be used to handle correctly undecodable byte sequences. _Py_char2wchar() and _Py_wchar2char() use the surrogateescape error handler (PEP 383). _Py_char2wchar() forces also the ASCII encoding on FreeBSD and Solaris when the LC_CTYPE locale is C. Py_Main() expects an array of wide character strings (wchar_t*) for the command line argument, whereas main() gets an array or byte strings (char*). _Py_char2wchar() must be used to be able to call Py_Main(). I propose the following names: wchar_t* Py_DecodeLocale(const char* arg, size_t *size); char* Py_EncodeLocale(const wchar_t *text, size_t *error_pos); See Python/fileutils.c for more information about these functions. Python 3.3 has already higher level functions (calling _Py_char2_wchar() and _Py_wchar2char()): PyObject* PyUnicode_DecodeLocale(const char *str, const char *errors); PyObject* PyUnicode_EncodeLocale(PyObject *unicode, const char *errors); But these functions cannot be used before Python is initialized. ---------- messages: 192557 nosy: haypo priority: normal severity: normal status: open title: Make _Py_char2wchar() and _Py_wchar2char() public versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 16:08:55 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 07 Jul 2013 14:08:55 +0000 Subject: [issue18395] Make _Py_char2wchar() and _Py_wchar2char() public In-Reply-To: <1373205636.55.0.562779126658.issue18395@psf.upfronthosting.co.za> Message-ID: <1373206135.82.0.214182924096.issue18395@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 16:14:39 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 07 Jul 2013 14:14:39 +0000 Subject: [issue18394] cgi.FieldStorage triggers ResourceWarning sometimes In-Reply-To: <1373190601.25.0.575768158618.issue18394@psf.upfronthosting.co.za> Message-ID: <1373206479.87.0.560732071262.issue18394@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 16:23:14 2013 From: report at bugs.python.org (Alex Henderson) Date: Sun, 07 Jul 2013 14:23:14 +0000 Subject: [issue17372] provide pretty printer for xml.etree.ElementTree In-Reply-To: <1362640725.41.0.836381435016.issue17372@psf.upfronthosting.co.za> Message-ID: <1373206994.89.0.82581289096.issue17372@psf.upfronthosting.co.za> Alex Henderson added the comment: I have attached a proposed patch. This makes some design decisions which I would like someone to review: a) To incorporate pretty-printing into the main write() method rather than adding a separate toprettyxml() method. Disadvantages: greater complexity of _serialize_xml(). Advantages: Reduced duplication of code, easy to add other pretty-printing (eg HTML) in the same way. b) Existing whitespace on the ends of existing text is mutated. Disadvantages: existing whitespace content may get changed. Advantages: Greater readability (which is the whole point), idempotence of pretty-printing. c) Not to add a trailing newline. I am undecided as to whether this is a bad idea or a good one, but am documenting it to ensure it gets visibility. Of these, I think b) is the only potentially controversial one, and notably its behaviour differs from minidom's toprettyxml. I think it's the right thing to do though; and for the cases where whitespace is important, perhaps we can respect the xml:space attribute when pretty-printing? http://www.w3.org/TR/xml/#sec-white-space If these design choices are deemed suitable I'm happy to update the patch to support pretty-printing HTML also. ---------- keywords: +patch nosy: +alex.henderson Added file: http://bugs.python.org/file30845/issue17372.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 16:26:03 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Jul 2013 14:26:03 +0000 Subject: [issue18203] Replace direct calls to malloc() with PyMem_Malloc() or PyMem_RawMalloc() In-Reply-To: <1371120759.62.0.420345272246.issue18203@psf.upfronthosting.co.za> Message-ID: <3bpBt23FZbzRCK@mail.python.org> Roundup Robot added the comment: New changeset 213d6d7f5979 by Victor Stinner in branch 'default': Issue #18203: Fix Py_Finalize(): destroy the GIL after the last call to http://hg.python.org/cpython/rev/213d6d7f5979 New changeset 18bb92b0c458 by Victor Stinner in branch 'default': Issue #18203: Replace malloc() with PyMem_RawMalloc() at Python initialization http://hg.python.org/cpython/rev/18bb92b0c458 New changeset 41ef797e6639 by Victor Stinner in branch 'default': Issue #18203: Replace malloc() with PyMem_Malloc() in Python modules http://hg.python.org/cpython/rev/41ef797e6639 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 16:29:33 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 07 Jul 2013 14:29:33 +0000 Subject: [issue18257] Two copies of python-config In-Reply-To: <1371567872.42.0.116049773773.issue18257@psf.upfronthosting.co.za> Message-ID: <1373207373.96.0.148515522187.issue18257@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Matthias: sorry, I completely missed the message where you explained why the script is now a shell script. The customization is performed by _osx_xsupport.customize_config_vars. What this is used for: * We ship binaries build with a specific compiler configuration (IIRC Xcode 3 on OSX 10.5 for the 32-bit installers) * That configuration does not work on all supported platforms: - OSX 10.3 (which is more less supported on a "we'll try to fix if you scream basis") does not support "-arch" flags or "-isysroot" at all. - On OSX 10.4 you must use an SDK to build fat binaries (such as for the 32-bit binary installers). - Xcode 4, which must be used on more recent systems (at least 10.7 and 10.7, possibly 10.6 as well), is different. A particular worry is that the "gcc" command for Xcode 4 is a gcc frontend for the LLVM system and that miscompiles parts of Python 3.3. Therefore we use clang instead of gcc when detecting that compiler. In future versions of Xcode there will likely not be a gcc compiler at all. - We cannot use the same SDK on all platforms, because Xcode ships with a limited number of SDK (basicly just the SDK for the current and previous releases). We therefore automaticly select the most appropriate SDK at runtime. (Different SDKs isn't as problematic as it sounds, you can build with the OSX 10.8 SDK and deploy to OSX 10.4; except for PPC you must use Xcode 3 for PPC support because Xcode 4 does not contain a compiler that does that). - OSX 10.9 (currently in beta) also contains changes that affect compiler support. I won't comment on those changes right now because I haven't fully investigated them yet, and because 10.9 is in a closed SDK. I may have missed some details because I haven't looked at the code while writing this, but this should at least explain why I was upset with a change to a shell script. The customization can be written as shell scripts, but it is more code to maintain in an inelegant scripting system. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 16:31:02 2013 From: report at bugs.python.org (Alex Henderson) Date: Sun, 07 Jul 2013 14:31:02 +0000 Subject: [issue17840] base64_codec uses assert for runtime validity checks In-Reply-To: <1366875650.57.0.151905786577.issue17840@psf.upfronthosting.co.za> Message-ID: <1373207462.93.0.211915910904.issue17840@psf.upfronthosting.co.za> Alex Henderson added the comment: Having discussed this with Ezio, I think the better option might be to raise ValueError instead - if someone is expecting to be able to silently recover from errors they won't be able to, and should find out about this sooner rather than later. I'll upload an updated patch shortly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 16:35:32 2013 From: report at bugs.python.org (Alex Henderson) Date: Sun, 07 Jul 2013 14:35:32 +0000 Subject: [issue17372] provide pretty printer for xml.etree.ElementTree In-Reply-To: <1362640725.41.0.836381435016.issue17372@psf.upfronthosting.co.za> Message-ID: <1373207732.56.0.145650385045.issue17372@psf.upfronthosting.co.za> Alex Henderson added the comment: One other design decision - currently it doesn't deal with the indentation of comments or processing instructions: it leaves them unindented. Should they be indented the same as other tags? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 16:36:07 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Jul 2013 14:36:07 +0000 Subject: [issue18203] Replace direct calls to malloc() with PyMem_Malloc() or PyMem_RawMalloc() In-Reply-To: <1371120759.62.0.420345272246.issue18203@psf.upfronthosting.co.za> Message-ID: <3bpC5f3x2PzQ1R@mail.python.org> Roundup Robot added the comment: New changeset fc01f9497da7 by Victor Stinner in branch 'default': Issue #18203: Fix decode_ascii_surrogateescape(), use PyMem_RawMalloc() as _Py_char2wchar() http://hg.python.org/cpython/rev/fc01f9497da7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 16:38:40 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jul 2013 14:38:40 +0000 Subject: [issue979407] urllib2 digest auth totally broken Message-ID: <1373207920.29.0.331480254071.issue979407@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 16:40:51 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 14:40:51 +0000 Subject: [issue979407] urllib2 digest auth totally broken Message-ID: <1373208051.42.0.187430967961.issue979407@psf.upfronthosting.co.za> Christian Heimes added the comment: The bug has been fixed a while ago. Python 2.7 as well as Python 3.x have tests to verify digest auth. Farewell Aaron... ---------- nosy: +christian.heimes resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 16:42:45 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 07 Jul 2013 14:42:45 +0000 Subject: [issue5262] PythonLauncher considered harmfull In-Reply-To: <1234638505.38.0.029039550018.issue5262@psf.upfronthosting.co.za> Message-ID: <1373208165.76.0.6740744998.issue5262@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I thinking about closing this issue, but need to do some more research before doing so. In particular, I need to check the behavior of double clicking on python files on Windows and the main Linux desktops. IIRC double clicking a .py file on Windows will execute that file, it might be useful to stay consistent with that and not disallow making Python Launcher the default action. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 16:42:50 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jul 2013 14:42:50 +0000 Subject: [issue18396] test_signal.test_issue9324() fails on buildbot AMD64 Windows7 SP1 3.x Message-ID: <1373208170.43.0.508048091983.issue18396@psf.upfronthosting.co.za> New submission from STINNER Victor: ERROR: test_issue9324 (test.test_signal.WindowsSignalTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_signal.py", line 213, in test_issue9324 signal.signal(sig, signal.signal(sig, handler)) TypeError: signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a callable object Related issue: #9324 (closed 3 years ago). ---------- components: Windows messages: 192566 nosy: haypo priority: normal severity: normal status: open title: test_signal.test_issue9324() fails on buildbot AMD64 Windows7 SP1 3.x versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 16:50:19 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 14:50:19 +0000 Subject: [issue7686] redundant open modes 'rbb', 'wbb', 'abb' no longer work on Windows In-Reply-To: <1263342536.73.0.0502696558207.issue7686@psf.upfronthosting.co.za> Message-ID: <1373208619.81.0.907429918193.issue7686@psf.upfronthosting.co.za> Christian Heimes added the comment: For Python 2.7 we can no longer do anything about it. Any chance might break 3rd party software. Python 3.x and Python 2.7's io module don't allow redundant information. I suggest that you follow Ezio's advice and check for redundancy in your application. ---------- nosy: +christian.heimes resolution: -> wont fix stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 16:50:40 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Jul 2013 14:50:40 +0000 Subject: [issue18227] Use Python memory allocators in external libraries like zlib or OpenSSL In-Reply-To: <1371338869.58.0.00725626403199.issue18227@psf.upfronthosting.co.za> Message-ID: <3bpCQS0RjHzS1v@mail.python.org> Roundup Robot added the comment: New changeset a876d9d2e4fc by Victor Stinner in branch 'default': Issue #18227: Use PyMem_RawAlloc() in bz2, lzma and zlib modules http://hg.python.org/cpython/rev/a876d9d2e4fc ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 16:51:26 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 14:51:26 +0000 Subject: [issue8786] Add support for IEEE 754 contexts to decimal module. In-Reply-To: <1274524113.24.0.215320207255.issue8786@psf.upfronthosting.co.za> Message-ID: <1373208686.48.0.138884847412.issue8786@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 16:51:58 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 14:51:58 +0000 Subject: [issue2281] Enhanced cPython profiler with high-resolution timer In-Reply-To: <1205359008.42.0.436050296007.issue2281@psf.upfronthosting.co.za> Message-ID: <1373208718.21.0.64054102441.issue2281@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 16:52:04 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 14:52:04 +0000 Subject: [issue2281] Enhanced cPython profiler with high-resolution timer In-Reply-To: <1205359008.42.0.436050296007.issue2281@psf.upfronthosting.co.za> Message-ID: <1373208724.89.0.541434922071.issue2281@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 16:52:07 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 14:52:07 +0000 Subject: [issue2281] Enhanced cPython profiler with high-resolution timer In-Reply-To: <1205359008.42.0.436050296007.issue2281@psf.upfronthosting.co.za> Message-ID: <1373208727.88.0.636774467896.issue2281@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 16:52:15 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 14:52:15 +0000 Subject: [issue2281] Enhanced cPython profiler with high-resolution timer In-Reply-To: <1205359008.42.0.436050296007.issue2281@psf.upfronthosting.co.za> Message-ID: <1373208735.0.0.49834544526.issue2281@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 16:57:22 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 14:57:22 +0000 Subject: [issue17234] python-2.7.3-r3: crash in visit_decref() In-Reply-To: <1361266544.85.0.580763984436.issue17234@psf.upfronthosting.co.za> Message-ID: <1373209042.67.0.489236494535.issue17234@psf.upfronthosting.co.za> Christian Heimes added the comment: Are you using any 3rd party components with C extension modules? That kind of error is often caused by an extension with erroneous reference counting. ---------- nosy: +christian.heimes status: open -> languishing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 17:01:08 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 15:01:08 +0000 Subject: [issue17873] _ctypes/libffi missing bits for aarch64 support In-Reply-To: <1367276723.56.0.050997158172.issue17873@psf.upfronthosting.co.za> Message-ID: <1373209268.77.0.649542370181.issue17873@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes, ronaldoussoren stage: -> patch review versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 17:02:47 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 15:02:47 +0000 Subject: [issue9119] Python download page needs to mention crypto code in Windows installer In-Reply-To: <1277836658.93.0.259031299275.issue9119@psf.upfronthosting.co.za> Message-ID: <1373209367.9.0.323087359256.issue9119@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 17:25:49 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jul 2013 15:25:49 +0000 Subject: [issue3329] API for setting the memory allocator used by Python In-Reply-To: <1215632933.18.0.0332019532518.issue3329@psf.upfronthosting.co.za> Message-ID: <1373210749.13.0.312227799402.issue3329@psf.upfronthosting.co.za> STINNER Victor added the comment: Buildbots are happy, changeset 51ed51d10e60 fixed the memory leak on Windows XP. Let's close this issue, 5 years after its creation! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 17:26:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Jul 2013 15:26:31 +0000 Subject: [issue18227] Use Python memory allocators in external libraries like zlib or OpenSSL In-Reply-To: <1371338869.58.0.00725626403199.issue18227@psf.upfronthosting.co.za> Message-ID: <3bpDCq04lPzQNc@mail.python.org> Roundup Robot added the comment: New changeset 12f26c356611 by Victor Stinner in branch 'default': Issue #18227: "Free" function of bz2, lzma and zlib modules has no return value (void) http://hg.python.org/cpython/rev/12f26c356611 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 17:26:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Jul 2013 15:26:32 +0000 Subject: [issue18203] Replace direct calls to malloc() with PyMem_Malloc() or PyMem_RawMalloc() In-Reply-To: <1371120759.62.0.420345272246.issue18203@psf.upfronthosting.co.za> Message-ID: <3bpDCq5bjRzRkl@mail.python.org> Roundup Robot added the comment: New changeset 638d43665356 by Victor Stinner in branch 'default': Issue #18203: Replace malloc() with PyMem_Malloc() in _ssl for the password http://hg.python.org/cpython/rev/638d43665356 New changeset 9af1905f20af by Victor Stinner in branch 'default': Issue #18203: Replace malloc() with PyMem_RawMalloc() to allocate thread locks http://hg.python.org/cpython/rev/9af1905f20af New changeset fb7d346b45fa by Victor Stinner in branch 'default': Issue #18203: Replace malloc() with PyMem_Malloc() to allocate arena objects http://hg.python.org/cpython/rev/fb7d346b45fa New changeset 10db0c67fc72 by Victor Stinner in branch 'default': Issue #18203: Replace malloc() with PyMem_Malloc() in _PySequence_BytesToCharpArray() http://hg.python.org/cpython/rev/10db0c67fc72 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 17:35:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Jul 2013 15:35:19 +0000 Subject: [issue18227] Use Python memory allocators in external libraries like zlib or OpenSSL In-Reply-To: <1371338869.58.0.00725626403199.issue18227@psf.upfronthosting.co.za> Message-ID: <3bpDPy73PPzR4L@mail.python.org> Roundup Robot added the comment: New changeset 7f17c67b5bf6 by Christian Heimes in branch 'default': Issue #18227: pyexpat now uses a static XML_Memory_Handling_Suite. cElementTree uses the same approach since at least Python 2.6 http://hg.python.org/cpython/rev/7f17c67b5bf6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 17:35:24 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Jul 2013 15:35:24 +0000 Subject: [issue17372] provide pretty printer for xml.etree.ElementTree In-Reply-To: <1362640725.41.0.836381435016.issue17372@psf.upfronthosting.co.za> Message-ID: <1373211324.8.0.259611252773.issue17372@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 18:07:20 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 16:07:20 +0000 Subject: [issue15035] array.array of UCS2 values In-Reply-To: <1339147370.98.0.5823346157.issue15035@psf.upfronthosting.co.za> Message-ID: <1373213240.29.0.681761930156.issue15035@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 18:08:15 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 16:08:15 +0000 Subject: [issue15028] PySys_SetArgv escapes quotes in argv[] In-Reply-To: <1339089234.78.0.185097327197.issue15028@psf.upfronthosting.co.za> Message-ID: <1373213295.62.0.125381910699.issue15028@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes status: open -> languishing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 18:11:40 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 16:11:40 +0000 Subject: [issue6818] remove/delete method for zipfile/tarfile objects In-Reply-To: <1251866532.69.0.504306670253.issue6818@psf.upfronthosting.co.za> Message-ID: <1373213500.87.0.746202106822.issue6818@psf.upfronthosting.co.za> Christian Heimes added the comment: Yuval has submitted a CLA. I'm moving the proposal to 3.4 as 3.3 is in feature freeze mode. ---------- nosy: +christian.heimes stage: -> patch review versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 18:13:01 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 16:13:01 +0000 Subject: [issue2459] speedup for / while / if with better bytecode In-Reply-To: <1206224909.42.0.227263347483.issue2459@psf.upfronthosting.co.za> Message-ID: <1373213581.1.0.817688293481.issue2459@psf.upfronthosting.co.za> Christian Heimes added the comment: Is this enhancement still relevant? ---------- nosy: +christian.heimes status: open -> languishing versions: +Python 3.3, Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 18:14:57 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 16:14:57 +0000 Subject: [issue9939] Add a pipe type (FIFO) to the io module In-Reply-To: <1285341562.44.0.992846065146.issue9939@psf.upfronthosting.co.za> Message-ID: <1373213697.91.0.801363943101.issue9939@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 18:26:29 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 16:26:29 +0000 Subject: [issue6739] IDLE window won't start or show up after assgining new key in options v2.5.2 and 3.1.1 In-Reply-To: <1250757080.7.0.965993936336.issue6739@psf.upfronthosting.co.za> Message-ID: <1373214389.68.0.611915310163.issue6739@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- stage: -> patch review versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 18:47:13 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 16:47:13 +0000 Subject: [issue10898] posixmodule.c redefines FSTAT In-Reply-To: <1294857148.96.0.548396285489.issue10898@psf.upfronthosting.co.za> Message-ID: <1373215633.88.0.764041473072.issue10898@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes versions: +Python 3.3, Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 19:36:13 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sun, 07 Jul 2013 17:36:13 +0000 Subject: [issue3329] API for setting the memory allocator used by Python In-Reply-To: <1215632933.18.0.0332019532518.issue3329@psf.upfronthosting.co.za> Message-ID: <1373218573.43.0.483202996352.issue3329@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Well done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 20:30:01 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 18:30:01 +0000 Subject: [issue949667] setblocking() method on file objects Message-ID: <1373221801.45.0.963356375343.issue949667@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 20:31:16 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 18:31:16 +0000 Subject: [issue14268] _move_file is broken because of a bad mock In-Reply-To: <1331588015.42.0.677494046367.issue14268@psf.upfronthosting.co.za> Message-ID: <1373221876.68.0.77811218439.issue14268@psf.upfronthosting.co.za> Christian Heimes added the comment: I assume the commit has fixed the problem, hasn't it? ---------- nosy: +christian.heimes resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 20:31:55 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 18:31:55 +0000 Subject: [issue12957] mmap.resize changes memory address of mmap'd region In-Reply-To: <1315686259.57.0.0304440203891.issue12957@psf.upfronthosting.co.za> Message-ID: <1373221915.86.0.805706795823.issue12957@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- stage: -> needs patch versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 20:33:24 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 18:33:24 +0000 Subject: [issue16595] Add resource.prlimit In-Reply-To: <1354446881.9.0.288115855459.issue16595@psf.upfronthosting.co.za> Message-ID: <1373222004.85.0.719021648116.issue16595@psf.upfronthosting.co.za> Christian Heimes added the comment: Does anybody want to review the code before I commit it? ---------- nosy: +haypo, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 20:37:31 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 18:37:31 +0000 Subject: [issue896330] pyconfig.h is not placed in --includedir Message-ID: <1373222251.33.0.832293189061.issue896330@psf.upfronthosting.co.za> Christian Heimes added the comment: I found the reason for the issue. pyconfig.h is installed to CONFINCLUDEPY. The other header files are copied to INCLUDEPY INCLUDEDIR= @includedir@ CONFINCLUDEDIR= $(exec_prefix)/include INCLUDEPY= $(INCLUDEDIR)/python$(LDVERSION) CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(LDVERSION) @for i in $(srcdir)/Include/*.h; \ do \ echo $(INSTALL_DATA) $$i $(INCLUDEPY); \ $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \ done $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h ---------- stage: -> needs patch versions: +Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 20:47:45 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jul 2013 18:47:45 +0000 Subject: [issue949667] setblocking() method on file objects Message-ID: <1373222865.02.0.363566765843.issue949667@psf.upfronthosting.co.za> STINNER Victor added the comment: See the PEP 466 which proposes to add a new os.set_blocking() function on UNIX, and blocking parameter to socket constructor. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 20:55:36 2013 From: report at bugs.python.org (Nicholas Riley) Date: Sun, 07 Jul 2013 18:55:36 +0000 Subject: [issue14299] OS X installer build script: permissions not ensured In-Reply-To: <1331695262.49.0.711005270468.issue14299@psf.upfronthosting.co.za> Message-ID: <1373223336.46.0.867105317209.issue14299@psf.upfronthosting.co.za> Nicholas Riley added the comment: I don't have time to check it, but it's easy enough to test - set your umask to 077 and try building an installer, see if the files get the correct permissions when installed. I would hope tutorials would tell users to install the packages somewhere else, but you're probably right - sudo is the path of least resistance and is even less secure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 21:02:24 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 19:02:24 +0000 Subject: [issue18028] Warnings with -fstrict-aliasing In-Reply-To: <1369125142.14.0.432992440388.issue18028@psf.upfronthosting.co.za> Message-ID: <1373223744.56.0.177088026737.issue18028@psf.upfronthosting.co.za> Christian Heimes added the comment: The warning is caused by the X86_64 code for timestamps: #define READ_TIMESTAMP(val) \ __asm__ __volatile__("rdtsc" : \ "=a" (((int*)&(val))[0]), "=d" (((int*)&(val))[1])); The patch fixes the issue with two temp vars. ---------- keywords: +patch nosy: +christian.heimes priority: normal -> low stage: -> patch review type: -> compile error versions: +Python 3.4 Added file: http://bugs.python.org/file30846/tsc_strict_aliasing.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 21:18:09 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Jul 2013 19:18:09 +0000 Subject: [issue6739] IDLE window won't start or show up after assgining new key in options v2.5.2 and 3.1.1 In-Reply-To: <1250757080.7.0.965993936336.issue6739@psf.upfronthosting.co.za> Message-ID: <1373224689.97.0.565662678401.issue6739@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +roger.serwy, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 21:41:45 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 07 Jul 2013 19:41:45 +0000 Subject: [issue14299] OS X installer build script: permissions not ensured In-Reply-To: <1331695262.49.0.711005270468.issue14299@psf.upfronthosting.co.za> Message-ID: <1373226105.72.0.5277257465.issue14299@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Right. And I'm even more sensitive as usual about that after reading webpage that appearently popular with newbies and explains that you install Python by first removing /System/Library/Frameworks/Python.framework. I still can't understand that the author of that page thought that this would be a good idea (not linking to it to avoid giving it more prominence). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 21:58:24 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Jul 2013 19:58:24 +0000 Subject: [issue14299] OS X installer build script: permissions not ensured In-Reply-To: <1331695262.49.0.711005270468.issue14299@psf.upfronthosting.co.za> Message-ID: <1373227104.52.0.103606005187.issue14299@psf.upfronthosting.co.za> Ned Deily added the comment: Removing the group write permissions on the framework directory would be a significant change in the user interface so I agree that change should not be made until and if we have something better for user installation. The rest of the patch is still valid in the sense that nothing has changed in build-installer.py to ensure permissions (when not using /usr/bin/install). This hasn't been a problem with building python.org installers because of the environment used to build them. The patch is now out-of-date, though, due to subsequent changes to build-installer.py. I'll look at refreshing and applying that part of it in conjunction with other updates in the pipeline. ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 22:02:54 2013 From: report at bugs.python.org (Friedrich Spee von Langenfeld) Date: Sun, 07 Jul 2013 20:02:54 +0000 Subject: [issue18397] Python with MinGW Message-ID: <1373227373.99.0.371478249642.issue18397@psf.upfronthosting.co.za> New submission from Friedrich Spee von Langenfeld: I think, there are some users which are going to compile Python, but disagree with the restriction of Visual Studio (use only with account after 90 days). Should we provide makefiles to compile Python with MinGW (this could be easily done with the "Export" function of Visual Studio, see http://oldwiki.mingw.org/index.php/ConvertVisualStudioWorkspace for Details)? Or should we provide a CMakeList.txt to give the user the ability to make his own makefiles? ---------- components: Build messages: 192585 nosy: Friedrich.Spee.von.Langenfeld priority: normal severity: normal status: open title: Python with MinGW _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 22:03:38 2013 From: report at bugs.python.org (Yavor) Date: Sun, 07 Jul 2013 20:03:38 +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: <1373227418.83.0.201253506105.issue17759@psf.upfronthosting.co.za> Yavor added the comment: I have the same problem. Reproduced via custom app and what's failing is: getaddrinfo("some.invalid.address.here", NULL, &hints, &result); And it's failing quickly. But the returned error is system error 110 (Connection timed out). * A virtual machine inside same host - with Centos 6.3: getaddrinfo returns -2 (invalid host address). This seems to be the behaviour expected by Python. * VM with Ubuntu 13.04 (vanilla live CD) - again 110 (Connection timed out). Since vanilla live CD is affected: I suppose it's not supposed to be something specific to my OS config. ---------- nosy: +javornikolov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 22:21:31 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Jul 2013 20:21:31 +0000 Subject: [issue18398] Debug Python build fails on OS X with current clang: Fatal Python error: bad ID: Allocated using API 'm', verified using API 'r' Message-ID: <1373228491.66.0.661773601913.issue18398@psf.upfronthosting.co.za> New submission from Ned Deily: ... /usr/bin/clang -Wl,-stack_size,1000000 -framework CoreFoundation -o python Modules/python.o libpython3.4dm.a -ldl -framework CoreFoundation ./python -E -S -m sysconfig --generate-posix-vars Debug memory block at address p=0x7f9fba414160: API 'm' 948 bytes originally requested The 7 pad bytes at p-7 are FORBIDDENBYTE, as expected. The 8 pad bytes at tail=0x7f9fba414514 are FORBIDDENBYTE, as expected. The block was made by call #5440 to debug malloc/realloc. Data at p: 2f 00 00 00 55 00 00 00 ... 73 00 00 00 00 00 00 00 Fatal Python error: bad ID: Allocated using API 'm', verified using API 'r' Current thread 0x00007fff74872180: make: *** [pybuilddir.txt] Abort trap: 6 ---------- components: Build messages: 192587 nosy: haypo, ned.deily priority: critical severity: normal status: open title: Debug Python build fails on OS X with current clang: Fatal Python error: bad ID: Allocated using API 'm', verified using API 'r' versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 22:48:28 2013 From: report at bugs.python.org (Anton Tyurin) Date: Sun, 07 Jul 2013 20:48:28 +0000 Subject: [issue18100] socket.sendall() cannot send buffers of 2GB or more In-Reply-To: <1369918582.13.0.605373457603.issue18100@psf.upfronthosting.co.za> Message-ID: <1373230108.59.0.228355777403.issue18100@psf.upfronthosting.co.za> Anton Tyurin added the comment: The same error in the use of socket.send(). Is it possible to use size_t for len instead of int? According to http://www.python.org/dev/peps/pep-0353/ Py_ssize_t on x86 is typedef for int, and size_t has the same size. On x64 sizeof size_t is 8bit, that covers the limits of reasonable use. ---------- keywords: +patch nosy: +noxiouz Added file: http://bugs.python.org/file30847/send_and_sendall_issue18100.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 22:49:22 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Jul 2013 20:49:22 +0000 Subject: [issue18398] Debug Python build fails on OS X: Fatal Python error: bad ID: Allocated using API 'm', verified using API 'r' In-Reply-To: <1373228491.66.0.661773601913.issue18398@psf.upfronthosting.co.za> Message-ID: <1373230162.13.0.556493871199.issue18398@psf.upfronthosting.co.za> Ned Deily added the comment: Further testing shows that the problem is not limited to OS X 10.8 or clang: a similar debug build attempt fails on OS X 10.6 with Apple gcc-4.2. ./configure --with-pydebug CC=gcc-4.2 MACOSX_DEPLOYMENT_TARGET=10.6 make gcc-4.2 -Wl,-stack_size,1000000 -framework CoreFoundation -o python.exe Modules/python.o libpython3.4dm.a -ldl -framework CoreFoundation ./python.exe -E -S -m sysconfig --generate-posix-vars Debug memory block at address p=0x100515a40: API 'm' 232 bytes originally requested The 7 pad bytes at p-7 are FORBIDDENBYTE, as expected. The 8 pad bytes at tail=0x100515b28 are FORBIDDENBYTE, as expected. The block was made by call #5440 to debug malloc/realloc. Data at p: 2f 00 00 00 75 00 00 00 ... 6e 00 00 00 00 00 00 00 Fatal Python error: bad ID: Allocated using API 'm', verified using API 'r' Current thread 0x00007fff70f4bcc0: make: *** [pybuilddir.txt] Abort trap ---------- title: Debug Python build fails on OS X with current clang: Fatal Python error: bad ID: Allocated using API 'm', verified using API 'r' -> Debug Python build fails on OS X: Fatal Python error: bad ID: Allocated using API 'm', verified using API 'r' _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 22:54:33 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Jul 2013 20:54:33 +0000 Subject: [issue18398] Debug Python build fails on OS X: Fatal Python error: bad ID: Allocated using API 'm', verified using API 'r' In-Reply-To: <1373228491.66.0.661773601913.issue18398@psf.upfronthosting.co.za> Message-ID: <1373230473.11.0.243706132087.issue18398@psf.upfronthosting.co.za> Ned Deily added the comment: Here's the traceback in gdb from the 10.6 case above: (gdb) where #0 0x00007fff891ba0b6 in __kill () #1 0x00007fff8925a9f6 in abort () #2 0x00000001001cd4fd in Py_FatalError (msg=Could not find the frame base for "Py_FatalError". ) at Python/pythonrun.c:2380 #3 0x000000010008ee41 in _PyMem_DebugCheckAddress (api=114 'r', p=0x100514bb0) at Objects/obmalloc.c:1857 #4 0x000000010008e9e5 in _PyMem_DebugFree (ctx=0x1002f6640, p=0x100514bb0) at Objects/obmalloc.c:1743 #5 0x000000010008cf72 in PyMem_RawFree (ptr=0x100514bb0) at Objects/obmalloc.c:270 #6 0x00000001001f3324 in calculate_path () at ./Modules/getpath.c:557 #7 0x00000001001f3cce in Py_GetProgramFullPath () at ./Modules/getpath.c:867 #8 0x00000001001dabc0 in _PySys_Init () at ./Python/sysmodule.c:1619 #9 0x00000001001c727e in _Py_InitializeEx_Private (install_sigs=1, install_importlib=1) at Python/pythonrun.c:352 #10 0x00000001001c7555 in Py_InitializeEx (install_sigs=1) at Python/pythonrun.c:419 #11 0x00000001001c7565 in Py_Initialize () at Python/pythonrun.c:425 #12 0x00000001001f5698 in Py_Main (argc=1, argv=0x1005060e0) at Modules/main.c:673 #13 0x0000000100001090 in main (argc=1, argv=0x7fff5bfffbe0) at ./Modules/python.c:63 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 22:58:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Jul 2013 20:58:06 +0000 Subject: [issue18203] Replace direct calls to malloc() with PyMem_Malloc() or PyMem_RawMalloc() In-Reply-To: <1371120759.62.0.420345272246.issue18203@psf.upfronthosting.co.za> Message-ID: <3bpMZP0ZFtzMwG@mail.python.org> Roundup Robot added the comment: New changeset 31a635303e55 by Victor Stinner in branch 'default': Issue #18203: Fix _Py_DecodeUTF8_surrogateescape(), use PyMem_RawMalloc() as _Py_char2wchar() http://hg.python.org/cpython/rev/31a635303e55 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 23:02:03 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jul 2013 21:02:03 +0000 Subject: [issue18398] Debug Python build fails on OS X: Fatal Python error: bad ID: Allocated using API 'm', verified using API 'r' In-Reply-To: <1373228491.66.0.661773601913.issue18398@psf.upfronthosting.co.za> Message-ID: <1373230923.56.0.347047314319.issue18398@psf.upfronthosting.co.za> STINNER Victor added the comment: I patched PyMem_RawMalloc(), but I forgot _Py_DecodeUTF8_surrogateescape() which is specific to OSX. The following changeset fixed this issue: Ok, I missed this function specific to OSX: changeset: 84501:31a635303e55 tag: tip user: Victor Stinner date: Sun Jul 07 22:57:45 2013 +0200 files: Objects/unicodeobject.c description: Issue #18203: Fix _Py_DecodeUTF8_surrogateescape(), use PyMem_RawMalloc() as _Py_char2wchar() ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 23:05:16 2013 From: report at bugs.python.org (Anton Tyurin) Date: Sun, 07 Jul 2013 21:05:16 +0000 Subject: [issue18100] socket.sendall() cannot send buffers of 2GB or more In-Reply-To: <1369918582.13.0.605373457603.issue18100@psf.upfronthosting.co.za> Message-ID: <1373231116.4.0.0315054224686.issue18100@psf.upfronthosting.co.za> Anton Tyurin added the comment: typo fix 8bite -> 8 bytes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 23:06:00 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jul 2013 21:06:00 +0000 Subject: [issue18100] socket.sendall() cannot send buffers of 2GB or more In-Reply-To: <1369918582.13.0.605373457603.issue18100@psf.upfronthosting.co.za> Message-ID: <1373231160.35.0.667196075628.issue18100@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 23:10:19 2013 From: report at bugs.python.org (Yavor) Date: Sun, 07 Jul 2013 21:10:19 +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: <1373231419.31.0.312224920196.issue17759@psf.upfronthosting.co.za> Yavor added the comment: * Up-to-date Arch Linux: -2 - Name or service not known * Fedora Live CD: -2 - Name or service not known These are in general with more recent libraries/packages than Ubuntu 13.04. All evidences suggest that there is something abnormal with this Ubuntu release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 23:10:37 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 21:10:37 +0000 Subject: [issue18397] Python with MinGW In-Reply-To: <1373227373.99.0.371478249642.issue18397@psf.upfronthosting.co.za> Message-ID: <1373231437.83.0.206682514544.issue18397@psf.upfronthosting.co.za> Christian Heimes added the comment: The bug tracker isn't the best place to discuss such matters. Please open a discussion on the python-ideas mailing list if you are interested in improving the situation. Hint: New Windows developers are always welcome. We don't have that many... :) ---------- components: +Windows nosy: +christian.heimes type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 23:29:50 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jul 2013 21:29:50 +0000 Subject: [issue11908] Weird `slice.stop or sys.maxint` In-Reply-To: <1303493846.17.0.214651551769.issue11908@psf.upfronthosting.co.za> Message-ID: <1373232590.63.0.493206908437.issue11908@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 23:32:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Jul 2013 21:32:57 +0000 Subject: [issue18203] Replace direct calls to malloc() with PyMem_Malloc() or PyMem_RawMalloc() In-Reply-To: <1371120759.62.0.420345272246.issue18203@psf.upfronthosting.co.za> Message-ID: <3bpNLc6pcfzPrk@mail.python.org> Roundup Robot added the comment: New changeset 65f2c92ed079 by Victor Stinner in branch 'default': Issue #18203: Add _PyMem_RawStrdup() and _PyMem_Strdup() http://hg.python.org/cpython/rev/65f2c92ed079 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 23:33:47 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Jul 2013 21:33:47 +0000 Subject: [issue18203] Replace direct calls to malloc() with PyMem_Malloc() or PyMem_RawMalloc() In-Reply-To: <1371120759.62.0.420345272246.issue18203@psf.upfronthosting.co.za> Message-ID: <1373232827.41.0.914727981012.issue18203@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, with the last changeset, I consider the issue has fixed. There is no more direct call to malloc() in the Python source code. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 23:57:09 2013 From: report at bugs.python.org (Yavor) Date: Sun, 07 Jul 2013 21:57:09 +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: <1373234229.74.0.88670426183.issue17759@psf.upfronthosting.co.za> Yavor added the comment: Reported the issue to Ubuntu: https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1198744 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 00:10:01 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 07 Jul 2013 22:10:01 +0000 Subject: [issue18397] Python with MinGW In-Reply-To: <1373227373.99.0.371478249642.issue18397@psf.upfronthosting.co.za> Message-ID: <1373235001.28.0.354670364785.issue18397@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The best way would be if the standard Unix configure succeeded under MingW/msys. Did you actually try whether that worked? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 00:43:05 2013 From: report at bugs.python.org (Mateusz Lenik) Date: Sun, 07 Jul 2013 22:43:05 +0000 Subject: [issue17128] OS X system openssl deprecated - installer should build local libssl In-Reply-To: <1360002680.77.0.851671416179.issue17128@psf.upfronthosting.co.za> Message-ID: <1373236985.04.0.658440390179.issue17128@psf.upfronthosting.co.za> Mateusz Lenik added the comment: I managed to build Python with OpenSSL 1.0.1e on Mac OS 10.8.4 using build-installer.py script during Europython sprint. I'll attach patches in few days, as I'll try to clean the code a bit. Currently the build works only for intel. Here is an example output: test-osx ~ ? uname -a Darwin test-osx.local 12.4.0 Darwin Kernel Version 12.4.0: Wed May 1 17:57:12 PDT 2013; root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64 test-osx ~ ? arch -i386 python3 Python 3.4.0a0 (default, Jul 7 2013, 17:12:34) [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 sys >>> sys.maxsize 2147483647 >>> import ssl >>> ssl.OPENSSL_VERSION 'OpenSSL 1.0.1e 11 Feb 2013' >>> ^D test-osx ~ ? arch -x86_64 python3 Python 3.4.0a0 (default, Jul 7 2013, 17:12:35) [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 sys >>> sys.maxsize 9223372036854775807 >>> import ssl >>> ssl.OPENSSL_VERSION 'OpenSSL 1.0.1e 11 Feb 2013' >>> ^D test-osx ~ ? ---------- nosy: +mlen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 01:35:55 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 23:35:55 +0000 Subject: [issue13655] Python SSL stack doesn't have a default CA Store In-Reply-To: <1324635534.55.0.434420251569.issue13655@psf.upfronthosting.co.za> Message-ID: <1373240155.89.0.67198978521.issue13655@psf.upfronthosting.co.za> Christian Heimes added the comment: I think we can improve the situation with shipping our own CA certs. Almost every operating system or distribution comes with a set of CA certs. I lots of Linux distributions and most BSD systems. All except FreeBSD install CA certs by default. A fresh FreeBSD systems doesn't have certs but ``pkg_add -r ca-root-nss`` fixes that. At least some versions of SuSE don't have a cafile but rather a capath directory. On Windows #17134 and #16487 are going to allow us to use Windows' cert store through crypt32.dll. Here is a full list: cert_paths = [ # Debian, Ubuntu, Arch, SuSE # NetBSD (security/mozilla-rootcerts) "/etc/ssl/certs/", # Debian, Ubuntu, Arch: maintained by update-ca-certificates "/etc/ssl/certs/ca-certificates.crt", # Red Hat 5+, Fedora, Centos "/etc/pki/tls/certs/ca-bundle.crt", # Red Hat 4 "/usr/share/ssl/certs/ca-bundle.crt", # FreeBSD (security/ca-root-nss package) "/usr/local/share/certs/ca-root-nss.crt", # FreeBSD (deprecated security/ca-root package, removed 2008) "/usr/local/share/certs/ca-root.crt", # FreeBSD (optional symlink) # OpenBSD "/etc/ssl/cert.pem", # Mac OS X "/System/Library/OpenSSL/certs/cert.pem", ] I'd like to add the list to our ssl.py and add an API to check and load certs from that files, directories and other places (Windows). ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 01:45:03 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Jul 2013 23:45:03 +0000 Subject: [issue17128] OS X system openssl deprecated - installer should build local libssl In-Reply-To: <1360002680.77.0.851671416179.issue17128@psf.upfronthosting.co.za> Message-ID: <1373240703.86.0.0893197294939.issue17128@psf.upfronthosting.co.za> Christian Heimes added the comment: Can you please run the unit test to see if it actually works? arch -i386 python -m test -unetwork test_ssl That commands runs the unit test suite and tries to connect to a couple of HTTPS servers, too. By the way do you know how well supported and up to date /System/Library/OpenSSL/certs/cert.pem is? The file suppose to contain all CA certs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 02:02:39 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 00:02:39 +0000 Subject: [issue3266] Python-2.5.2/Modules/mmapmodule.c:915: error: `O_RDWR' undeclared In-Reply-To: <1215044054.48.0.722645405249.issue3266@psf.upfronthosting.co.za> Message-ID: <1373241759.76.0.132364517429.issue3266@psf.upfronthosting.co.za> Christian Heimes added the comment: Compilation works on Solaris 10 and 11 for quite some time. Please reopen the bug report if you still have issues. ---------- nosy: +christian.heimes resolution: -> fixed status: open -> closed type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 02:18:08 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Jul 2013 00:18:08 +0000 Subject: [issue17128] OS X system openssl deprecated - installer should build local libssl In-Reply-To: <1360002680.77.0.851671416179.issue17128@psf.upfronthosting.co.za> Message-ID: <1373242688.13.0.323513296042.issue17128@psf.upfronthosting.co.za> Ned Deily added the comment: Chrys, /System/Library/OpenSSL/certs/cert.pem is empty on current OS X systems. As mentioned above, cert management is handled through Apple APIs. See http://developer.apple.com/library/ios/#DOCUMENTATION/Security/Conceptual/CertKeyTrustProgGuide/01introduction/introduction.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 03:13:02 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 08 Jul 2013 01:13:02 +0000 Subject: [issue17545] os.listdir and os.path.join inconsistent on empty path In-Reply-To: <1364228813.43.0.916487849633.issue17545@psf.upfronthosting.co.za> Message-ID: <1373245982.79.0.933630068564.issue17545@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> ncoghlan nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 03:17:08 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 08 Jul 2013 01:17:08 +0000 Subject: [issue17545] os.listdir and os.path.join inconsistent on empty path In-Reply-To: <1364228813.43.0.916487849633.issue17545@psf.upfronthosting.co.za> Message-ID: <1373246228.06.0.00521771911976.issue17545@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: ncoghlan -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 03:37:54 2013 From: report at bugs.python.org (Matthew Byrne) Date: Mon, 08 Jul 2013 01:37:54 +0000 Subject: [issue18338] python --version should send output to STDOUT In-Reply-To: <1372676487.3.0.302989276182.issue18338@psf.upfronthosting.co.za> Message-ID: <1373247474.23.0.81716568254.issue18338@psf.upfronthosting.co.za> Matthew Byrne added the comment: Simply replced printout from stderr to stdout. ---------- nosy: +Matthew.Byrne Added file: http://bugs.python.org/file30848/issue18338.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 03:43:44 2013 From: report at bugs.python.org (Andrew Rowe) Date: Mon, 08 Jul 2013 01:43:44 +0000 Subject: [issue18399] Fix grammar in comment in python.c Message-ID: <1373247824.08.0.574543056464.issue18399@psf.upfronthosting.co.za> New submission from Andrew Rowe: diff -r 65f2c92ed079 Modules/python.c --- a/Modules/python.c Sun Jul 07 23:30:24 2013 +0200 +++ b/Modules/python.c Mon Jul 08 10:46:30 2013 +1000 @@ -19,7 +19,7 @@ main(int argc, char **argv) { wchar_t **argv_copy; - /* We need a second copies, as Python might modify the first one. */ + /* We need a second copy, as Python might modify the first one. */ wchar_t **argv_copy2; int i, res; char *oldloc; ---------- components: Interpreter Core files: patch1.txt messages: 192606 nosy: Andrew.Rowe priority: normal severity: normal status: open title: Fix grammar in comment in python.c versions: Python 3.4 Added file: http://bugs.python.org/file30849/patch1.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 05:11:37 2013 From: report at bugs.python.org (Dale Smith) Date: Mon, 08 Jul 2013 03:11:37 +0000 Subject: [issue18360] Won't install. Keeps telling me DLL is missing. In-Reply-To: <51D8832D.2060402@eavillage.com> Message-ID: <51DA2DE6.4040602@eavillage.com> Dale Smith added the comment: Has anyone figured out what is causing this failure from my windows 7? Thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 05:14:43 2013 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 08 Jul 2013 03:14:43 +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: <1373253283.63.0.989072183618.issue15792@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Adding Victor Stinner as he has been quite active in fixing Windows 64-bit issues. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 05:37:27 2013 From: report at bugs.python.org (Indra Talip) Date: Mon, 08 Jul 2013 03:37:27 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <1373254647.56.0.838747682829.issue15494@psf.upfronthosting.co.za> Indra Talip added the comment: as per Nick's direction the attached patch moves test/support.py to test/support/__init__.py and includes small fixes for some of the tests that break as a consequence. ---------- keywords: +patch nosy: +italip Added file: http://bugs.python.org/file30850/move_test_support.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 06:55:55 2013 From: report at bugs.python.org (Phil Webster) Date: Mon, 08 Jul 2013 04:55:55 +0000 Subject: [issue18365] Idle: mock Text class and test thereof In-Reply-To: <1373006946.99.0.696971871982.issue18365@psf.upfronthosting.co.za> Message-ID: <1373259355.0.0.184301309515.issue18365@psf.upfronthosting.co.za> Phil Webster added the comment: Added Text class to mock_tk.py and GUI/non-GUI tests in test_text.py. Running the IDLE tests produced no errors for me. ---------- keywords: +patch Added file: http://bugs.python.org/file30851/mock_text.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 06:56:03 2013 From: report at bugs.python.org (Phil Webster) Date: Mon, 08 Jul 2013 04:56:03 +0000 Subject: [issue18279] IDLE Unit test for RstripExtension.py In-Reply-To: <1371854273.68.0.541594598967.issue18279@psf.upfronthosting.co.za> Message-ID: <1373259363.24.0.48979970018.issue18279@psf.upfronthosting.co.za> Phil Webster added the comment: This patch contains mock_idle.py and the rstrip test using the mock text widget from #18365. Terry- For some reason, the Text widget always contains a '\n' as the last character even when there is nothing visible. Doing a text.get('1.0','end') always has a '\n' at the end from what I can tell. I'm not sure about the filename changing, is it worth creating a new issue for? ---------- Added file: http://bugs.python.org/file30852/test_rstrip3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 06:56:10 2013 From: report at bugs.python.org (Phil Webster) Date: Mon, 08 Jul 2013 04:56:10 +0000 Subject: [issue18226] IDLE Unit test for FormatParagrah.py In-Reply-To: <1371335636.99.0.534048602964.issue18226@psf.upfronthosting.co.za> Message-ID: <1373259369.99.0.384582240883.issue18226@psf.upfronthosting.co.za> Phil Webster added the comment: I made slight modifications to Todd's initial patch to test the mock Text widget from #18365. Thank you for the helpful feedback Terry! ---------- Added file: http://bugs.python.org/file30853/18226IDLEUnitTestFormatParagraph2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 07:04:38 2013 From: report at bugs.python.org (David Sackett) Date: Mon, 08 Jul 2013 05:04:38 +0000 Subject: [issue18400] Minor increase to Pickle test coverage Message-ID: <1373259878.07.0.171161881505.issue18400@psf.upfronthosting.co.za> New submission from David Sackett: Tests to provide unit test coverage of _Pickler.__init__ protocol version checks. ---------- components: Tests files: mywork.patch keywords: patch messages: 192613 nosy: davidsackett priority: normal severity: normal status: open title: Minor increase to Pickle test coverage versions: Python 3.4 Added file: http://bugs.python.org/file30854/mywork.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 07:35:46 2013 From: report at bugs.python.org (Stephen Tonkin) Date: Mon, 08 Jul 2013 05:35:46 +0000 Subject: [issue18401] Tests for pdb import ~/.pdbrc Message-ID: <1373261746.39.0.598108958249.issue18401@psf.upfronthosting.co.za> New submission from Stephen Tonkin: After a clean check out and a successful build of Python 3.4, doctests were failing when running test_pdb. Specifically, doctests were failing because they were getting a "*** NameError: name 'execfile' is not defined" when running. It turns out that my ~/.pdbrc file contained a call to execfile(). While removing this line from my ~/.pdbrc file remedied the issue for me, test_pdb probably shouldn't be reading from global configuration when testing the pdb module. ---------- assignee: ronaldoussoren components: Macintosh, Tests messages: 192614 nosy: ncoghlan, ronaldoussoren, sptonkin priority: normal severity: normal status: open title: Tests for pdb import ~/.pdbrc type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 07:37:53 2013 From: report at bugs.python.org (Michael Dorman) Date: Mon, 08 Jul 2013 05:37:53 +0000 Subject: [issue18402] Finding perl64 Message-ID: <1373261873.64.0.61453379281.issue18402@psf.upfronthosting.co.za> New submission from Michael Dorman: Perl64 installs into C:\perl64\bin Can we include this path in the search list? ---------- components: Build files: build_ssl_with_perl64.patch keywords: patch messages: 192615 nosy: brian.curtin, mjdorma priority: normal severity: normal status: open title: Finding perl64 type: compile error versions: Python 3.4 Added file: http://bugs.python.org/file30855/build_ssl_with_perl64.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 07:52:48 2013 From: report at bugs.python.org (Michael Dorman) Date: Mon, 08 Jul 2013 05:52:48 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <1373262768.75.0.276065934643.issue15494@psf.upfronthosting.co.za> Michael Dorman added the comment: move_test_support.patch didn't break tests under Windows x64 ---------- nosy: +mjdorma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 08:06:33 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 08 Jul 2013 06:06:33 +0000 Subject: [issue18401] Tests for pdb import ~/.pdbrc In-Reply-To: <1373261746.39.0.598108958249.issue18401@psf.upfronthosting.co.za> Message-ID: <1373263593.48.0.85305044983.issue18401@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- assignee: ronaldoussoren -> components: -Macintosh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 08:15:25 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 08 Jul 2013 06:15:25 +0000 Subject: [issue17128] OS X system openssl deprecated - installer should build local libssl In-Reply-To: <1360002680.77.0.851671416179.issue17128@psf.upfronthosting.co.za> Message-ID: <1373264125.74.0.00869298608224.issue17128@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The file not even empty, it doesn't even exist in default installations. As Ned mentioned the CA roots on OSX are stored in a system database (the keychain). The situation is more or less the same as on Windows: their either needs to be code that queries the system keychain to get the CA roots, or we need to use some other CA list (like the mozilla one). I'd prefer the former because that's easier for the end user (add the company-wide CA cert to the system database to configure it system wide instead of hunting down where every app stores it CA list). One glitch: a lot of Apple API's above the Unix layer are unsafe when used in a process started with os.fork (without calling execv), I don't know yet if the keychain APIs are also affected by this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 08:35:22 2013 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 08 Jul 2013 06:35:22 +0000 Subject: [issue18396] test_signal.test_issue9324() fails on buildbot AMD64 Windows7 SP1 3.x In-Reply-To: <1373208170.43.0.508048091983.issue18396@psf.upfronthosting.co.za> Message-ID: <1373265322.0.0.580982944843.issue18396@psf.upfronthosting.co.za> Jeremy Kloth added the comment: This error is reproducible by simply passing '-j' to regrtest on any Windows build so it is not Win64-specific. It seems that when run in a subprocess, certain signals have C handlers that cause the return value of getsignal() to return None which, of course, is not a valid handler for signal(). The C-level handlers seem to be coming from faulthandler so I am unsure if it is wise to replace those signal handlers within the test. Attached is a patch which only resets signal handlers for those without a C-level handler. ---------- keywords: +patch nosy: +jkloth Added file: http://bugs.python.org/file30856/issue18396.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 08:38:29 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 08 Jul 2013 06:38:29 +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: <1373265509.55.0.982313362892.issue10042@psf.upfronthosting.co.za> Nick Coghlan added the comment: Raymond, one of the devs here at the PyCon AU sprints has been looking into providing an updated patch for this. Do you mind if I reassign the issue to myself to review their patch (once it is uploaded)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 08:39:54 2013 From: report at bugs.python.org (Ben Finney) Date: Mon, 08 Jul 2013 06:39:54 +0000 Subject: [issue12645] test.support. import_fresh_module - incorrect doc In-Reply-To: <1311789815.76.0.639942891335.issue12645@psf.upfronthosting.co.za> Message-ID: <1373265594.63.0.689293055688.issue12645@psf.upfronthosting.co.za> Ben Finney added the comment: I'm reading the existing `test.support.import_fresh_module` docstring, and have re-formatted it for PEP 257 compliance and for reading clarity. ---------- keywords: +patch nosy: +bignose Added file: http://bugs.python.org/file30857/issue12645.reformat_docstring.9d22bc60bd4f.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 08:42:54 2013 From: report at bugs.python.org (Ben Finney) Date: Mon, 08 Jul 2013 06:42:54 +0000 Subject: [issue12645] test.support. import_fresh_module - incorrect doc In-Reply-To: <1311789815.76.0.639942891335.issue12645@psf.upfronthosting.co.za> Message-ID: <1373265774.57.0.599232668188.issue12645@psf.upfronthosting.co.za> Ben Finney added the comment: > import_fresh_module raises an ImportError if *name* can't be imported, or returns None if the fresh module is not found. The implementation doesn't seem to raise ImportError when a module import fails. Instead, from what I can tell, it captures any ImportError and returns None. So should the documentation (user docs and docstring) reflect this? Or have I mis-read the implementation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 08:49:17 2013 From: report at bugs.python.org (Indra Talip) Date: Mon, 08 Jul 2013 06:49:17 +0000 Subject: [issue15415] Add temp_dir() and change_cwd() to test.support In-Reply-To: <1342905198.6.0.0438176504742.issue15415@psf.upfronthosting.co.za> Message-ID: <1373266157.74.0.0941587297184.issue15415@psf.upfronthosting.co.za> Indra Talip added the comment: cleaning up patch so that it will apply cleanly after applying patch from issue15494 ---------- nosy: +italip Added file: http://bugs.python.org/file30858/issue-15415-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 08:56:38 2013 From: report at bugs.python.org (Stephen Tonkin) Date: Mon, 08 Jul 2013 06:56:38 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <1373266598.19.0.428844807623.issue15494@psf.upfronthosting.co.za> Stephen Tonkin added the comment: Likewise, move_test_support.patch did not break things under OS X 10.8. ---------- nosy: +sptonkin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 08:56:51 2013 From: report at bugs.python.org (Katie Miller) Date: Mon, 08 Jul 2013 06:56:51 +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: <1373266611.34.0.622310222196.issue10042@psf.upfronthosting.co.za> Katie Miller added the comment: Attaching patch with Nick Coghlan's suggested code from msg140493 and associated tests. The tests extend the single test case that had already been added for earlier changes based on this bug. The tests check that a TypeError is raised, rather than a stack overflow occurring, when two instances of classes decorated with total_ordering that return NotImplemented, are compared, with each of the four comparison operators. For each operator, a test is included that would cause the recursion error if not for the code patch, as well as one where this error does not occur as there is no recursion. Patch tested against the default branch. ---------- keywords: +patch nosy: +codemiller Added file: http://bugs.python.org/file30859/10042.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 09:17:25 2013 From: report at bugs.python.org (Grant) Date: Mon, 08 Jul 2013 07:17:25 +0000 Subject: [issue17827] Document codecs.encode and codecs.decode In-Reply-To: <1366811140.15.0.0983174574305.issue17827@psf.upfronthosting.co.za> Message-ID: <1373267845.04.0.425234710425.issue17827@psf.upfronthosting.co.za> Grant added the comment: codecs module and 'whats new' doc patch for 3.4 ---------- keywords: +patch nosy: +Grant versions: -Python 2.7, Python 3.3 Added file: http://bugs.python.org/file30860/17827.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 09:30:36 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 08 Jul 2013 07:30:36 +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: <1373268636.33.0.933024003679.issue10042@psf.upfronthosting.co.za> Nick Coghlan added the comment: As part of this, I finally reviewed Jim's proposed alternate implementations for the helper functions. Katie's patch used my version while I figured out the differences in behaviour :) The key difference between them relates to the following different approaches to handling unknown types in __eq__: @functools.total_ordering class TotallyOrderedEqualsReturnsFalse: def __init__(self, value): self._value = value def __eq__(self, other): return isinstance(other, Weird) and self._value == other._value def __lt__(self, other): if not isinstance(other, Weird): return NotImplemented return self._value < other._value @functools.total_ordering class TotallyOrderedEqualsReturnsNotImplemented: def __init__(self, value): self._value = value def __eq__(self, other): if not isinstance(other, Weird): return NotImplemented return self._value == other._value def __lt__(self, other): if not isinstance(other, Weird): return NotImplemented return self._value < other._value Formally, the version which returns False directly is incorrect - it should be returning NotImplemented, and letting Python take of converting two results of NotImplemented to an equality comparison result of False. In practice, lots of types are written that way, so we need to preserve the current behaviour of not checking the equality operations if the ordered comparison isn't implemented, or we will inadvertently end up making "<=" or ">=" return an answer instead of raising TypeError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 09:44:42 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 08 Jul 2013 07:44:42 +0000 Subject: [issue18393] Gestalt() is deprecated on OSX 10.8, remove support? In-Reply-To: <1373188277.85.0.140879649909.issue18393@psf.upfronthosting.co.za> Message-ID: <1373269482.15.0.610907130486.issue18393@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The attached patch removes the use of the Gestalt API. The removed code is effectively dead, I yet have to find a machine were platform._mac_ver_xml does not work and the gestalt based code only gets used when the XML variant does not work. ---------- keywords: +needs review, patch stage: test needed -> patch review Added file: http://bugs.python.org/file30861/issue-18393.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 10:15:23 2013 From: report at bugs.python.org (Dylan Radcliffe) Date: Mon, 08 Jul 2013 08:15:23 +0000 Subject: [issue18073] pickle.Unpickler may read too many bytes, causing hangs with blocking input stream In-Reply-To: <1369677881.19.0.98233808248.issue18073@psf.upfronthosting.co.za> Message-ID: <1373271323.14.0.33009572018.issue18073@psf.upfronthosting.co.za> Dylan Radcliffe added the comment: What I see in gdb is that that read is occurring due to the unpickling thread reading peeking ahead in the stream due to buffered io being used. #0 0x00007ffff7bcbcbd in read () from /lib/x86_64-linux-gnu/libpthread.so.0 #1 0x000000000061f521 in fileio_readinto (self=0x7ffff6491528, args=0x7ffff66dc190) at ./Modules/_io/fileio.c:541 #2 0x00000000004b96f0 in PyCFunction_Call (func=0x7ffff601d598, arg=0x7ffff66dc190, kw=0x0) at Objects/methodobject.c:90 #3 0x000000000045a0c2 in PyObject_Call (func=0x7ffff601d598, arg=0x7ffff66dc190, kw=0x0) at Objects/abstract.c:2105 #4 0x000000000045ad3e in PyObject_CallMethodObjArgs (callable=0x7ffff601d598, name=0x7ffff7f3ccf0) at Objects/abstract.c:2341 #5 0x0000000000626e65 in _bufferedreader_raw_read (self=0x7ffff6777e58, start=0xa89210 ".\002X\367\017", len=4096) at ./Modules/_io/bufferedio.c:1438 #6 0x00000000006270ed in _bufferedreader_fill_buffer (self=0x7ffff6777e59) at ./Modules/_io/bufferedio.c:1470 #7 0x0000000000628474 in _bufferedreader_peek_unlocked (self=0x7ffff6777e58) at ./Modules/_io/bufferedio.c:1714 #8 0x0000000000624b1d in buffered_peek (self=0x7ffff6777e58, args=0x7ffff66d4948) at ./Modules/_io/bufferedio.c:880 As a possible workaround if you disable buffering when opening your pipe for input it seems to prevent the problem (though I am not sure about performance implications). 22c22 < load = Unpickler(os.fdopen(r, 'rb')).load --- > load = Unpickler(os.fdopen(r, 'rb', 0)).load ---------- nosy: +dylanr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 10:24:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Jul 2013 08:24:28 +0000 Subject: [issue18073] pickle.Unpickler may read too many bytes, causing hangs with blocking input stream In-Reply-To: <1369677881.19.0.98233808248.issue18073@psf.upfronthosting.co.za> Message-ID: <1373271868.72.0.478469538758.issue18073@psf.upfronthosting.co.za> Antoine Pitrou added the comment: For the record, this is one of the things that the framing proposal in pickle protocol 4 (pep 3154 - http://www.python.org/dev/peps/pep-3154/#framing) is able to address. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 10:45:40 2013 From: report at bugs.python.org (Mateusz Loskot) Date: Mon, 08 Jul 2013 08:45:40 +0000 Subject: [issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program In-Reply-To: <1366373912.56.0.138468709297.issue17797@psf.upfronthosting.co.za> Message-ID: <1373273140.89.0.35814361505.issue17797@psf.upfronthosting.co.za> Mateusz Loskot added the comment: This is still an issue in VS 2012 Version 11.0.60610.01 Update 3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 10:50:22 2013 From: report at bugs.python.org (Michelle Arzul) Date: Mon, 08 Jul 2013 08:50:22 +0000 Subject: [issue18356] help(numpy) causes segfault on exit In-Reply-To: <1372924520.77.0.111539946992.issue18356@psf.upfronthosting.co.za> Message-ID: <1373273422.31.0.774989935684.issue18356@psf.upfronthosting.co.za> Michelle Arzul added the comment: This is what I get from gdb: marzul at Leeward:~$ gdb --args python test.py GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /usr/bin/python2.7...(no debugging symbols found)...done. (gdb) run Starting program: /usr/bin/python2.7 test.py [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1". Program received signal SIGPIPE, Broken pipe. 0xb7fdd424 in __kernel_vsyscall () (gdb) cont Continuing. Program received signal SIGPIPE, Broken pipe. 0xb7fdd424 in __kernel_vsyscall () (gdb) cont Continuing. Program received signal SIGSEGV, Segmentation fault. 0xb7e518fc in ?? () from /lib/i386-linux-gnu/libc.so.6 (gdb) cont Continuing. Program terminated with signal SIGSEGV, Segmentation fault. The program no longer exists. (gdb) run Starting program: /usr/bin/python2.7 test.py [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1". Program received signal SIGPIPE, Broken pipe. 0xb7fdd424 in __kernel_vsyscall () (gdb) cont Continuing. Program received signal SIGPIPE, Broken pipe. 0xb7fdd424 in __kernel_vsyscall () (gdb) cont Continuing. Program received signal SIGSEGV, Segmentation fault. 0xb7e518fc in ?? () from /lib/i386-linux-gnu/libc.so.6 (gdb) where #0 0xb7e518fc in ?? () from /lib/i386-linux-gnu/libc.so.6 #1 0xb7e45e7c in _IO_default_xsputn () from /lib/i386-linux-gnu/libc.so.6 #2 0xb7e443a1 in _IO_file_xsputn () from /lib/i386-linux-gnu/libc.so.6 #3 0xb7e39025 in fwrite () from /lib/i386-linux-gnu/libc.so.6 #4 0x080ac05b in ?? () #5 0x080b6bde in PyEval_EvalFrameEx () #6 0x080b71c0 in PyEval_EvalFrameEx () #7 0x0811f939 in PyEval_EvalCodeEx () #8 0x080b80d4 in PyEval_EvalFrameEx () #9 0x080b71c0 in PyEval_EvalFrameEx () #10 0x0811f939 in PyEval_EvalCodeEx () #11 0x080b7265 in PyEval_EvalFrameEx () #12 0x080b71c0 in PyEval_EvalFrameEx () #13 0x0811f939 in PyEval_EvalCodeEx () #14 0x081203ee in ?? () #15 0x080e11f9 in ?? () #16 0x080e3daf in PyObject_Call () #17 0x08129483 in ?? () #18 0x080b8a3e in PyEval_EvalFrameEx () #19 0x0811f939 in PyEval_EvalCodeEx () #20 0x0812029e in ?? () #21 0x080e11f9 in ?? () #22 0x080e3daf in PyObject_Call () ---Type to continue, or q to quit--- #23 0x0816dd88 in ?? () #24 0x080b7615 in PyEval_EvalFrameEx () #25 0x0811f939 in PyEval_EvalCodeEx () #26 0x081836c7 in PyEval_EvalCode () #27 0x08183b7d in ?? () #28 0x080a6032 in PyRun_FileExFlags () #29 0x080a65f8 in PyRun_SimpleFileExFlags () #30 0x080a74af in Py_Main () #31 0x080a7581 in main () (gdb) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 12:36:52 2013 From: report at bugs.python.org (Xue Fuqiao) Date: Mon, 08 Jul 2013 10:36:52 +0000 Subject: [issue18403] Minor bug in The Python Tutorial Message-ID: <1373279812.84.0.20851379601.issue18403@psf.upfronthosting.co.za> New submission from Xue Fuqiao: In http://docs.python.org/3.3/tutorial/introduction.html#strings: In addition to indexing, slicing is also supported. While indexing is used to obtain individual characters, slicing allows you to obtain substring: >>> word[0:2] # characters from position 0 (included) to 2 (excluded) 'Py' >>> word[2:5] # characters from position 2 (included) to 4 (excluded) 'tho' I think the second comment should be "from position 2 to 5", not "to 4". I'm a Python newbie, sorry if it's not a bug. ---------- assignee: docs at python components: Documentation messages: 192632 nosy: docs at python, xfq priority: normal severity: normal status: open title: Minor bug in The Python Tutorial versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 13:36:38 2013 From: report at bugs.python.org (Matthias Klose) Date: Mon, 08 Jul 2013 11:36:38 +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: <1373283398.97.0.928301054691.issue17759@psf.upfronthosting.co.za> Matthias Klose added the comment: > ... that there is something abnormal with this Ubuntu release. no, it is not. This has nothing to do with Ubuntu, but is an upstream change introduced with glibc-2.17. So you will see it on every system which is based on the glibc version. see https://bugs.launchpad.net/bugs/1154599 for the complete discussion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 13:48:49 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 11:48:49 +0000 Subject: [issue17128] OS X system openssl deprecated - installer should build local libssl In-Reply-To: <1360002680.77.0.851671416179.issue17128@psf.upfronthosting.co.za> Message-ID: <1373284129.58.0.205811312398.issue17128@psf.upfronthosting.co.za> Christian Heimes added the comment: How about we include certsync [1] as an external program then? It's not as elegant as an internal API but it's not going to cause trouble with forking servers. The first time a root CA cert is require, some new code in Python's SSL module runs certsync and grabs the list of PEM encoded certs from its stdout. The output is cached in a module variable and loaded with the new features from #16487 and #18138. How does that sound to you? [1] https://svn.macports.org/repository/macports/trunk/dports/security/certsync/files/certsync.m ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 13:52:10 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 08 Jul 2013 11:52:10 +0000 Subject: [issue18393] Gestalt() is deprecated on OSX 10.8, remove support? In-Reply-To: <1373188277.85.0.140879649909.issue18393@psf.upfronthosting.co.za> Message-ID: <51DAA7E8.3060403@egenix.com> Marc-Andre Lemburg added the comment: On 07.07.2013 11:11, Ronald Oussoren wrote: > The easiest solution to avoid this deprecated API is therefore to drop the _gestalt extension and remove its use in platform.mac_ver() I think it should only be removed in case we no longer support Mac OS X platforms that still have it. Otherwise, please simply follow our standard procedure for deprecating public functions. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 13:54:39 2013 From: report at bugs.python.org (Mateusz Lenik) Date: Mon, 08 Jul 2013 11:54:39 +0000 Subject: [issue17128] OS X system openssl deprecated - installer should build local libssl In-Reply-To: <1360002680.77.0.851671416179.issue17128@psf.upfronthosting.co.za> Message-ID: <1373284479.29.0.792729030862.issue17128@psf.upfronthosting.co.za> Mateusz Lenik added the comment: The other way to solve problem with CA certs may be this script[1] that can be used to generate pem files from mozilla CA cert bundle[2] during compilation or installation. [1]: http://curl.haxx.se/docs/caextract.html [2]: http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 13:55:14 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 08 Jul 2013 11:55:14 +0000 Subject: [issue18393] Gestalt() is deprecated on OSX 10.8, remove support? In-Reply-To: <1373188277.85.0.140879649909.issue18393@psf.upfronthosting.co.za> Message-ID: <1373284514.3.0.0903153421911.issue18393@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Do we follow the deprecation procedure for private functions as well? The patch removes a private and undocumented extension, and removes a private function that uses that extension. There is no change in the public API. Also, as I mentioned before the removed code is effectively dead because it will never be called on systems that aren't totally broken. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 13:55:50 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 08 Jul 2013 11:55:50 +0000 Subject: [issue17840] base64_codec uses assert for runtime validity checks In-Reply-To: <1373207462.93.0.211915910904.issue17840@psf.upfronthosting.co.za> Message-ID: <51DAA8C4.9070800@egenix.com> Marc-Andre Lemburg added the comment: On 07.07.2013 16:31, Alex Henderson wrote: > Having discussed this with Ezio, I think the better option might be to raise ValueError instead - if someone is expecting to be able to silently recover from errors they won't be able to, and should find out about this sooner rather than later. > I'll upload an updated patch shortly. +1 ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 13:56:42 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Jul 2013 11:56:42 +0000 Subject: [issue13655] Python SSL stack doesn't have a default CA Store In-Reply-To: <1373240155.89.0.67198978521.issue13655@psf.upfronthosting.co.za> Message-ID: <187543472.150551967.1373284595430.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > I think we can improve the situation with shipping our own CA certs. > Almost every operating system or distribution comes with a set of CA > certs. Why would we ship our own CA certs if every OS comes with CA certs? > I lots of Linux distributions and most BSD systems. All except > FreeBSD install CA certs by default. A fresh FreeBSD systems doesn't > have certs but ``pkg_add -r ca-root-nss`` fixes that. Kudos to FreeBSD. Anyway, isn't SSLContext.set_default_verify_paths() enough already? > Here is a full list: [snip full list] I don't think it's a good idea to maintain a list of hard-coded paths in Python: it's not manageable, and it will always become outdated. If there was a widely-respected standard (e.g. in FHS or LSB), things would be a lot better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 13:58:31 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 08 Jul 2013 11:58:31 +0000 Subject: [issue15661] OS X installer packages should be signed for OS X 10.8 Gatekeeper feature In-Reply-To: <1373127444.55.0.783587897398.issue15661@psf.upfronthosting.co.za> Message-ID: <51DAA964.9090303@egenix.com> Marc-Andre Lemburg added the comment: On 06.07.2013 18:17, Ronald Oussoren wrote: > As to the question of actually signing the installer: we ask the PSF about acquiring a developer account once we have something that can actually be signed. Please write to psf at python.org with an explanation of how this can be done. We'd also need to know who will be in charge of the signing (probably the core dev doing the respective release). ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 14:03:53 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 08 Jul 2013 12:03:53 +0000 Subject: [issue18393] Gestalt() is deprecated on OSX 10.8, remove support? In-Reply-To: <1373284514.3.0.0903153421911.issue18393@psf.upfronthosting.co.za> Message-ID: <51DAAAA7.6000404@egenix.com> Marc-Andre Lemburg added the comment: On 08.07.2013 13:55, Ronald Oussoren wrote: > > Do we follow the deprecation procedure for private functions as well? > > The patch removes a private and undocumented extension, and removes a private function that uses that extension. There is no change in the public API. > > Also, as I mentioned before the removed code is effectively dead because it will never be called on systems that aren't totally broken. Oh, I was under the impression that the API is public. I just did a grep: the _gestalt module is not documented and neither is the gestalt function, so I guess we can speed up the deprecation procedure or even drop it right away in 3.4 :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 14:08:33 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 08 Jul 2013 12:08:33 +0000 Subject: [issue18393] Gestalt() is deprecated on OSX 10.8, remove support? In-Reply-To: <1373188277.85.0.140879649909.issue18393@psf.upfronthosting.co.za> Message-ID: <1373285313.87.0.00502981656807.issue18393@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I had hoped to just drop it in 3.4. To remove: * extension _gestalt * function platform._mac_ver_gestalt * function platform._mac_ver_lookup (only used by ^^^) * function platform._bcd2str (likewise) To change: * function platform.mac_ver: remove call to _mac_ver_gestalt ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 14:10:28 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 12:10:28 +0000 Subject: [issue17128] OS X system openssl deprecated - installer should build local libssl In-Reply-To: <1360002680.77.0.851671416179.issue17128@psf.upfronthosting.co.za> Message-ID: <1373285428.25.0.703087738135.issue17128@psf.upfronthosting.co.za> Christian Heimes added the comment: Mateusz, we would like to avoid that path and use the operating system's root CAs list when the OS provides one. It gives better user experience and the OS' root CA list gets updates through the OS. ---------- _______________________________________ Python tracker _______________________________________ From mal at egenix.com Mon Jul 8 13:52:08 2013 From: mal at egenix.com (M.-A. Lemburg) Date: Mon, 08 Jul 2013 13:52:08 +0200 Subject: [issue18393] Gestalt() is deprecated on OSX 10.8, remove support? In-Reply-To: <1373188277.85.0.140879649909.issue18393@psf.upfronthosting.co.za> References: <1373188277.85.0.140879649909.issue18393@psf.upfronthosting.co.za> Message-ID: <51DAA7E8.3060403@egenix.com> On 07.07.2013 11:11, Ronald Oussoren wrote: > The easiest solution to avoid this deprecated API is therefore to drop the _gestalt extension and remove its use in platform.mac_ver() I think it should only be removed in case we no longer support Mac OS X platforms that still have it. Otherwise, please simply follow our standard procedure for deprecating public functions. -- Marc-Andre Lemburg eGenix.com From mal at egenix.com Mon Jul 8 13:55:48 2013 From: mal at egenix.com (M.-A. Lemburg) Date: Mon, 08 Jul 2013 13:55:48 +0200 Subject: [issue17840] base64_codec uses assert for runtime validity checks In-Reply-To: <1373207462.93.0.211915910904.issue17840@psf.upfronthosting.co.za> References: <1373207462.93.0.211915910904.issue17840@psf.upfronthosting.co.za> Message-ID: <51DAA8C4.9070800@egenix.com> On 07.07.2013 16:31, Alex Henderson wrote: > Having discussed this with Ezio, I think the better option might be to raise ValueError instead - if someone is expecting to be able to silently recover from errors they won't be able to, and should find out about this sooner rather than later. > I'll upload an updated patch shortly. +1 -- Marc-Andre Lemburg eGenix.com From report at bugs.python.org Mon Jul 8 14:22:02 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 12:22:02 +0000 Subject: [issue8813] SSLContext doesn't support loading a CRL In-Reply-To: <1274735830.03.0.714974872377.issue8813@psf.upfronthosting.co.za> Message-ID: <1373286122.83.0.743367738931.issue8813@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- components: +Extension Modules nosy: +christian.heimes versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 14:26:40 2013 From: report at bugs.python.org (Madison May) Date: Mon, 08 Jul 2013 12:26:40 +0000 Subject: [issue18403] Minor bug in The Python Tutorial In-Reply-To: <1373279812.84.0.20851379601.issue18403@psf.upfronthosting.co.za> Message-ID: <1373286400.27.0.514461531511.issue18403@psf.upfronthosting.co.za> Madison May added the comment: Nope, definitely an error! Good catch, Xue. ---------- nosy: +madison.may _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 14:36:32 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 08 Jul 2013 12:36:32 +0000 Subject: [issue18393] Gestalt() is deprecated on OSX 10.8, remove support? In-Reply-To: <1373285313.87.0.00502981656807.issue18393@psf.upfronthosting.co.za> Message-ID: <51DAB24B.3060805@egenix.com> Marc-Andre Lemburg added the comment: On 08.07.2013 14:08, Ronald Oussoren wrote: > > Ronald Oussoren added the comment: > > I had hoped to just drop it in 3.4. > > To remove: > > * extension _gestalt > > * function platform._mac_ver_gestalt > > * function platform._mac_ver_lookup (only used by ^^^) > > * function platform._bcd2str (likewise) > > To change: > > * function platform.mac_ver: remove call to _mac_ver_gestalt Fine with me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 14:47:35 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 12:47:35 +0000 Subject: [issue18402] Finding perl64 In-Reply-To: <1373261873.64.0.61453379281.issue18402@psf.upfronthosting.co.za> Message-ID: <1373287655.62.0.476973020941.issue18402@psf.upfronthosting.co.za> Christian Heimes added the comment: I don't mind to add perl64 to the search path. ---------- components: +Windows nosy: +christian.heimes stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 14:57:13 2013 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Mon, 08 Jul 2013 12:57:13 +0000 Subject: [issue18404] Memory leak in gdbmmodule Message-ID: <1373288233.43.0.746729936071.issue18404@psf.upfronthosting.co.za> New submission from Bohuslav "Slavek" Kabrda: Function dbm_length from Modules/_gdbmmodule.c seems to be leaking memory. A simple reproducer: import dbm d = dbm.open('spam', 'c') d['x'] = '1' print(len(d)) The interesting part of valgrind output with --leak-check=full: ==3312== 1 bytes in 1 blocks are definitely lost in loss record 1 of 3,622 ==3312== at 0x4A06409: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==3312== by 0x3A31A0349D: get_next_key (gdbmseq.c:72) ==3312== by 0x3A31A03595: gdbm_nextkey (gdbmseq.c:126) ==3312== by 0xDD74192: dbm_length (_gdbmmodule.c:104) ==3312== by 0x3A2473F50B: builtin_len (bltinmodule.c:1293) ==3312== by 0x3A247510D1: PyEval_EvalFrameEx (ceval.c:4080) ==3312== by 0x3A24753758: PyEval_EvalCodeEx (ceval.c:3462) ==3312== by 0x3A2475390A: PyEval_EvalCode (ceval.c:791) ==3312== by 0x3A24773893: run_mod (pythonrun.c:1989) ==3312== by 0x3A24775EE7: PyRun_FileExFlags (pythonrun.c:1945) ==3312== by 0x3A24777000: PyRun_SimpleFileExFlags (pythonrun.c:1455) ==3312== by 0x3A2478F72B: Py_Main (main.c:306) It seems that the problem is in the loop here [1] - specifically, the last okey.dptr seems not to be freed (the loop is terminated when key.dptr is NULL, but okey.dptr is still pointing to something). I'm attaching a supersimple patch that should fix this (unless I'm totally wrong about everything...) [1] http://hg.python.org/cpython/file/65f2c92ed079/Modules/_gdbmmodule.c#l102 ---------- components: Extension Modules files: gdbm-len-leak-fix.patch keywords: patch messages: 192647 nosy: bkabrda priority: normal severity: normal status: open title: Memory leak in gdbmmodule versions: Python 3.3 Added file: http://bugs.python.org/file30862/gdbm-len-leak-fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 15:10:14 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 13:10:14 +0000 Subject: [issue12272] Python 2.7.1 version conflict for package "Tcl" on Windows 7 In-Reply-To: <1307394575.29.0.810712086892.issue12272@psf.upfronthosting.co.za> Message-ID: <1373289014.68.0.0970969362134.issue12272@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm closing this ticket because the op hasn't responded in two years and nobody has reported the issue ever since. ---------- nosy: +christian.heimes resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 15:11:59 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 13:11:59 +0000 Subject: [issue10071] Should not release GIL while running RegEnumValue In-Reply-To: <1286884651.82.0.158483399845.issue10071@psf.upfronthosting.co.za> Message-ID: <1373289119.88.0.0702936089118.issue10071@psf.upfronthosting.co.za> Christian Heimes added the comment: LGTM I suggest that you add a comment with a link to this issue. People may wonder why some places don't release the GIL. ---------- nosy: +christian.heimes versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 15:28:04 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Jul 2013 13:28:04 +0000 Subject: [issue14268] _move_file is broken because of a bad mock In-Reply-To: <1331588015.42.0.677494046367.issue14268@psf.upfronthosting.co.za> Message-ID: <1373290084.51.0.893214546551.issue14268@psf.upfronthosting.co.za> ?ric Araujo added the comment: Yes, this was probably kept open for packaging forward-port, which is now moot. Note that many others distutils2 issues are kept open because they can be relevant for the distlib fork or other packaging libs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 15:38:09 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 08 Jul 2013 13:38:09 +0000 Subject: [issue18367] See if a venv setup can be used for devinabox for coverage In-Reply-To: <1373051739.1.0.739747420449.issue18367@psf.upfronthosting.co.za> Message-ID: <1373290689.79.0.73556912751.issue18367@psf.upfronthosting.co.za> Brett Cannon added the comment: So first thing is that you can't relocate a venv. The --upgrade option is only for when you upgrade a Python installation in-place (e.g. go from 3.3 to 3.4 but otherwise all other details stay the same). The --clear option empties out the directories so nothing will stick around. IOW without adding a --move option to pyvenv, a venv is not worth leaving around in the box. It is probably reasonable, though, to provide a script or integrate into full_coverage.py to set up the venv and such. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 15:50:57 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 08 Jul 2013 13:50:57 +0000 Subject: [issue13655] Python SSL stack doesn't have a default CA Store In-Reply-To: <187543472.150551967.1373284595430.JavaMail.root@zimbra10-e2.priv.proxad.net> Message-ID: <20130708095052.5beb0b22@anarchist> Barry A. Warsaw added the comment: On Jul 08, 2013, at 11:56 AM, Antoine Pitrou wrote: >I don't think it's a good idea to maintain a list of hard-coded >paths in Python: it's not manageable, and it will always become >outdated. If there was a widely-respected standard (e.g. in FHS or >LSB), things would be a lot better. I agree. I don't think we should be shipping certs, but if we do, then it must be possible and easy for e.g. Linux distros to override. Linux distros are already managing certs through their normal and security updates, so it's a burden to also have to do so for Python. I think this analogous to shipping other types of external databases, e.g. timezones, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 16:13:31 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 14:13:31 +0000 Subject: [issue7573] Position independent include of Python.h In-Reply-To: <1261653981.05.0.861950270955.issue7573@psf.upfronthosting.co.za> Message-ID: <1373292811.19.0.479158636608.issue7573@psf.upfronthosting.co.za> Christian Heimes added the comment: Yes, I'm closing it. The issue has been addressed in our documentation. ---------- nosy: +christian.heimes resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 16:15:12 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 14:15:12 +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: <1373292912.37.0.326430625205.issue15792@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- components: +Windows nosy: +christian.heimes type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 16:38:51 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 14:38:51 +0000 Subject: [issue9814] subprocess isn't friendly to other Python implementations with different GCs In-Reply-To: <1284073114.59.0.931577015567.issue9814@psf.upfronthosting.co.za> Message-ID: <1373294331.1.0.733360622895.issue9814@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 16:40:25 2013 From: report at bugs.python.org (Jim Jewett) Date: Mon, 08 Jul 2013 14:40:25 +0000 Subject: [issue10042] functools.total_ordering fails to handle NotImplemented correctly In-Reply-To: <1373268636.33.0.933024003679.issue10042@psf.upfronthosting.co.za> Message-ID: Jim Jewett added the comment: On Mon, Jul 8, 2013 at 3:30 AM, Nick Coghlan wrote: > The key difference between them relates to the following different approaches to handling unknown types in __eq__: > @functools.total_ordering > class TotallyOrderedEqualsReturnsFalse: ... > def __eq__(self, other): > return isinstance(other, Weird) and self._value == other._value > @functools.total_ordering > class TotallyOrderedEqualsReturnsNotImplemented: ... > def __eq__(self, other): > if not isinstance(other, Weird): return NotImplemented > return self._value == other._value > Formally, the version which returns False directly is incorrect - it should be returning NotImplemented, and letting Python take of converting two results of NotImplemented to an equality comparison result of False. I had not considered this. I'm not sure exactly where to improve the docs, but I think it would be helpful to use a docstring (or at least comments) on the test cases, so that at least someone looking at the exact test cases will understand the subtlety. > In practice, lots of types are written that way, so we need to preserve the current behaviour of not checking the equality operations if the ordered comparison isn't implemented, or we will inadvertently end up making "<=" or ">=" return an answer instead of raising TypeError. I had viewed that as a feature; for types where only some values will have a useful answer, I had thought it better to still return that answer for the values that do have one. I freely acknowledge that others may disagree, and if you say the issue was already settled, then that also matters. -jJ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 16:40:41 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Jul 2013 14:40:41 +0000 Subject: [issue18360] Won't install. Keeps telling me DLL is missing. In-Reply-To: <1372950084.82.0.921928840895.issue18360@psf.upfronthosting.co.za> Message-ID: <1373294441.49.0.741872072046.issue18360@psf.upfronthosting.co.za> Terry J. Reedy added the comment: You will have to wait until Martin can respond, but the log says failure occurred with C:\Users\astar\AppData\Local\Temp\MSIA812.tmp entry: _CheckDir at 4 Description from web: Driver Install Frameworks for Applications library module This appears to part of the unpacked download. Have you redownloaded? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 16:54:51 2013 From: report at bugs.python.org (Dale Smith) Date: Mon, 08 Jul 2013 14:54:51 +0000 Subject: [issue18360] Won't install. Keeps telling me DLL is missing. In-Reply-To: <1373294441.49.0.741872072046.issue18360@psf.upfronthosting.co.za> Message-ID: <51DAD2B8.8040509@eavillage.com> Dale Smith added the comment: I have redownloaded. Still getting the same message. Thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 17:05:28 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 15:05:28 +0000 Subject: [issue5060] gcc profile guided optimization In-Reply-To: <1232914718.3.0.0101941779254.issue5060@psf.upfronthosting.co.za> Message-ID: <1373295928.62.0.173277329436.issue5060@psf.upfronthosting.co.za> Christian Heimes added the comment: run_profile_task has been fixed a while ago and works with --enabled-shared. ---------- nosy: +christian.heimes resolution: -> works for me stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 17:18:12 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 15:18:12 +0000 Subject: [issue4885] mmap enhancement request In-Reply-To: <1231445893.72.0.162990779773.issue4885@psf.upfronthosting.co.za> Message-ID: <1373296692.66.0.782923699473.issue4885@psf.upfronthosting.co.za> Christian Heimes added the comment: 1) and 2) have been fixed in Python 3.x. mmap supports writable memory views and slice assignment from any object that supports the buffer protocol. 3) is still an issue as mmap objects are not weakref-able yet. It should be easy to add __weakref__ to mmap objects. ---------- components: +Extension Modules -Library (Lib) nosy: +christian.heimes priority: normal -> low stage: test needed -> needs patch versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 17:20:37 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 15:20:37 +0000 Subject: [issue4885] mmap enhancement request In-Reply-To: <1231445893.72.0.162990779773.issue4885@psf.upfronthosting.co.za> Message-ID: <1373296837.15.0.195974993638.issue4885@psf.upfronthosting.co.za> Christian Heimes added the comment: It's a trivial task for any Python developer with some C experience. ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 17:23:45 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 15:23:45 +0000 Subject: [issue4708] os.pipe should return inheritable descriptors (Windows) In-Reply-To: <1229825725.05.0.791696937909.issue4708@psf.upfronthosting.co.za> Message-ID: <1373297025.56.0.667309369291.issue4708@psf.upfronthosting.co.za> Christian Heimes added the comment: Victor, this fits nicely with your recent PEP. ---------- nosy: +christian.heimes, haypo versions: +Python 3.4 -Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 17:25:13 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 15:25:13 +0000 Subject: [issue1208730] expat binding for XML_ParserReset Message-ID: <1373297113.58.0.237612106485.issue1208730@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- assignee: -> christian.heimes nosy: +christian.heimes stage: test needed -> patch review versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 17:32:48 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 15:32:48 +0000 Subject: [issue3093] Namespace pollution from multiprocessing In-Reply-To: <1213300660.18.0.995213086332.issue3093@psf.upfronthosting.co.za> Message-ID: <1373297568.94.0.545751059312.issue3093@psf.upfronthosting.co.za> Christian Heimes added the comment: Python 3.4 no longer exports symbols without a Py or _Py prefix: $ nm -p build/lib.linux-x86_64-3.4-pydebug/_multiprocessing.cpython-34dm.so | sed -n "/ [TDB] /s/.* //p" | sort __bss_start _edata _end _fini _init PyInit__multiprocessing _PyMp_SemLockType _PyMp_SetError Python 3.3 still does but I don't like to modify the ABI in a patch release. $ nm -p build/lib.linux-x86_64-3.3-pydebug/_multiprocessing.cpython-33dm.so | sed -n "/ [TDB] /s/.* //p" | sort __bss_start BufferTooShort _edata _end _fini _init mp_SetError ProcessError PyInit__multiprocessing SemLockType ---------- nosy: +christian.heimes resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 17:40:30 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 15:40:30 +0000 Subject: [issue9838] Inadequate C-API to Python 3 I/O objects In-Reply-To: <1284297827.04.0.573858766917.issue9838@psf.upfronthosting.co.za> Message-ID: <1373298030.56.0.963680627669.issue9838@psf.upfronthosting.co.za> Christian Heimes added the comment: I agree with Antoine. If you are still interested to improve the situation then please start a discussion on the python-ideas mailing list. ---------- nosy: +christian.heimes resolution: -> postponed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 17:53:44 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Jul 2013 15:53:44 +0000 Subject: [issue18403] Minor bug in The Python Tutorial In-Reply-To: <1373279812.84.0.20851379601.issue18403@psf.upfronthosting.co.za> Message-ID: <3bprml45LkzPCN@mail.python.org> Roundup Robot added the comment: New changeset 6f16fa5223cc by Ezio Melotti in branch '3.3': #18403: fix an off-by-one typo noticed by Xue Fuqiao. http://hg.python.org/cpython/rev/6f16fa5223cc New changeset d41adb657bd4 by Ezio Melotti in branch 'default': #18403: merge with 3.3. http://hg.python.org/cpython/rev/d41adb657bd4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 17:54:37 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 08 Jul 2013 15:54:37 +0000 Subject: [issue18403] Minor bug in The Python Tutorial In-Reply-To: <1373279812.84.0.20851379601.issue18403@psf.upfronthosting.co.za> Message-ID: <1373298877.86.0.809086038416.issue18403@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 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 17:56:14 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 08 Jul 2013 15:56:14 +0000 Subject: [issue14097] Improve the "introduction" page of the tutorial In-Reply-To: <1329975473.84.0.795852636525.issue14097@psf.upfronthosting.co.za> Message-ID: <1373298974.28.0.401830210513.issue14097@psf.upfronthosting.co.za> Ezio Melotti added the comment: This still needs to be backported to 2.7. There's also a typo reported in #18403 that should be fixed before the backport. ---------- assignee: docs at python -> ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 18:13:51 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 16:13:51 +0000 Subject: [issue1038591] Python 2.3+ socket._fileobject handles EAGAIN with data loss Message-ID: <1373300031.32.0.883920248073.issue1038591@psf.upfronthosting.co.za> Christian Heimes added the comment: Shall we close this ticket then? ---------- nosy: +christian.heimes status: open -> languishing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 18:40:39 2013 From: report at bugs.python.org (Glyph Lefkowitz) Date: Mon, 08 Jul 2013 16:40:39 +0000 Subject: [issue18391] socket.fromfd()'s API is difficult or impossible to use correctly in general In-Reply-To: <1373153632.08.0.45299629619.issue18391@psf.upfronthosting.co.za> Message-ID: <1373301639.47.0.260514057266.issue18391@psf.upfronthosting.co.za> Glyph Lefkowitz added the comment: It would be nice for this to be fixed in a 2.7.x release too, if possible, since the workaround involves a ton of extra system calls and there's no other way to construct a socket object directly. ---------- nosy: +glyph versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 18:43:15 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 16:43:15 +0000 Subject: [issue8176] Interpreter crash with "double free or corruption" message In-Reply-To: <1268995268.42.0.577572952388.issue8176@psf.upfronthosting.co.za> Message-ID: <1373301795.34.0.411039324972.issue8176@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm closing the bug because it hasn't seen any activity in the past 2.5 years. ---------- nosy: +christian.heimes status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 18:45:49 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 16:45:49 +0000 Subject: [issue10664] xml.sax.expatreader should support namespace prefixes In-Reply-To: <1291929062.2.0.554979073686.issue10664@psf.upfronthosting.co.za> Message-ID: <1373301949.05.0.308265660449.issue10664@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 18:52:22 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 08 Jul 2013 16:52:22 +0000 Subject: [issue17324] SimpleHTTPServer serves files even if the URL has a trailing slash In-Reply-To: <1362128046.23.0.253565985522.issue17324@psf.upfronthosting.co.za> Message-ID: <1373302342.2.0.299175996774.issue17324@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Attached the fix and the unit test for this problem. ---------- nosy: +vajrasky Added file: http://bugs.python.org/file30863/patch_for_fixing_the_server_serving_the_url_with_trailing_slash.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 18:58:34 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 16:58:34 +0000 Subject: [issue12097] python.exe crashes if it is unable to find its .dll In-Reply-To: <1305659527.57.0.173805273526.issue12097@psf.upfronthosting.co.za> Message-ID: <1373302714.91.0.687545127635.issue12097@psf.upfronthosting.co.za> Christian Heimes added the comment: 'We' don't show any error message. Windows does it on its own because the pythonXX.dll is a dependency for the executable. If python.exe can't find the DLL then it's also likely that the DLL is unable to find Python's stdlib. Python requires the stdlib to run, too. There isn't much we can do about that. ---------- nosy: +christian.heimes resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 19:03:33 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 17:03:33 +0000 Subject: [issue12984] XML NamedNodeMap ( attribName in NamedNodeMap fails ) In-Reply-To: <1316041908.49.0.966708119681.issue12984@psf.upfronthosting.co.za> Message-ID: <1373303013.36.0.859081559188.issue12984@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks for your report. The issue has been address in Python 3.x. NamedNodeMap properly implements __contains__(). Python 2.7 is in feature freeze mode which means we can't backport the function. ---------- nosy: +christian.heimes resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 19:04:34 2013 From: report at bugs.python.org (=?utf-8?q?Bj=C3=B6rn_Sandberg_Lynch?=) Date: Mon, 08 Jul 2013 17:04:34 +0000 Subject: [issue17911] Extracting tracebacks does too much work In-Reply-To: <1367789486.16.0.484658151136.issue17911@psf.upfronthosting.co.za> Message-ID: <1373303074.41.0.663784733906.issue17911@psf.upfronthosting.co.za> Bj?rn Sandberg Lynch added the comment: I've been looking into this as an easy piece to bite off. If I understand Guido correctly, he'd like to defer or suppress the linecache call when getting the tb summary. The problem with deferring is that you need to access f_globals for the loader to work correctly when the module source is a non-file import source. If we keep a reference to f_globals for each line in the traceback, we can defer this to later (ideally we'd just keep the __loader__ value, but that would require changing the linecache interface as well). My inclination would be to have another keyword argument to _extract_tb_or_stack_iter (terse=False or verbose=True - either style works). In terse mode, no source lines would be available, and the formatted output would be the same as if the source wasn't available at all. This would work, although the traceback module is structured so that I'd need to pass it through quite a few wrapped iterator calls. I'm not sure how free a hand I have when it comes to refactoring the internal implementation. I'm not fond of the extractor callbacks - I'd prefer a generator-based approach on the lines of: def _tb_iter(tb, limit): i = 0 while tb is not None: if limit is not None and limit < i: break yield tb.tb_frame, tb.tb_lineno tb = tb.tb_next i += 1 def _extract_frame_iter(frames, terse=False): ... for frame, lineno in frames: ... ---------- nosy: +adaptivelogic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 19:07:31 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 17:07:31 +0000 Subject: [issue12999] _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED usage on Solaris In-Reply-To: <1316244012.97.0.109004277803.issue12999@psf.upfronthosting.co.za> Message-ID: <1373303251.8.0.12067079605.issue12999@psf.upfronthosting.co.za> Christian Heimes added the comment: I think the cause of the bug has been addressed because tests on Solaris are passing. ---------- nosy: +christian.heimes resolution: -> fixed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 19:11:08 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 17:11:08 +0000 Subject: [issue13418] Embedded Python memory leak In-Reply-To: <1321491453.86.0.929770076277.issue13418@psf.upfronthosting.co.za> Message-ID: <1373303468.46.0.36597635961.issue13418@psf.upfronthosting.co.za> Christian Heimes added the comment: Martin, can we close this issue or do you want to keep it around? ---------- nosy: +christian.heimes resolution: -> wont fix status: open -> languishing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 19:14:43 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 17:14:43 +0000 Subject: [issue13611] Integrate ElementC14N module into xml.etree package In-Reply-To: <1324023461.04.0.625039310668.issue13611@psf.upfronthosting.co.za> Message-ID: <1373303683.8.0.896786538811.issue13611@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes, effbot versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 19:17:15 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 17:17:15 +0000 Subject: [issue13788] os.closerange optimization In-Reply-To: <1326601765.34.0.310008166629.issue13788@psf.upfronthosting.co.za> Message-ID: <1373303835.13.0.470490435604.issue13788@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes stage: committed/rejected -> versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 19:18:07 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 17:18:07 +0000 Subject: [issue13942] ssl.wrap_socket does not work on socket.socketpair()'s In-Reply-To: <1328362701.19.0.854143759056.issue13942@psf.upfronthosting.co.za> Message-ID: <1373303887.35.0.928688742198.issue13942@psf.upfronthosting.co.za> Christian Heimes added the comment: Agreed ---------- nosy: +christian.heimes status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 19:19:21 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 17:19:21 +0000 Subject: [issue13856] xmlrpc / httplib changes to allow for certificate verification In-Reply-To: <1327446175.17.0.819972733751.issue13856@psf.upfronthosting.co.za> Message-ID: <1373303961.55.0.49072852529.issue13856@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 19:26:10 2013 From: report at bugs.python.org (Mark Young) Date: Mon, 08 Jul 2013 17:26:10 +0000 Subject: [issue5124] IDLE - pasting text doesn't delete selection In-Reply-To: <1233514334.85.0.801099495729.issue5124@psf.upfronthosting.co.za> Message-ID: <1373304370.59.0.40546291132.issue5124@psf.upfronthosting.co.za> Mark Young added the comment: +1 at least providing the option. This behavior is obnoxious and weird (no other program on linux that I know of does this (not to say no such program exists)). If I didn't want the original gone, I wouldn't have highlighted it. ---------- nosy: +Mark.Young _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 19:29:06 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 17:29:06 +0000 Subject: [issue14139] test_ftplib: segfault In-Reply-To: <1330341244.46.0.956938686476.issue14139@psf.upfronthosting.co.za> Message-ID: <1373304546.26.0.3304465604.issue14139@psf.upfronthosting.co.za> Christian Heimes added the comment: It doesn't crash anymore for me. The link doesn't work anymore, too. ---------- nosy: +christian.heimes resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 19:31:47 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 17:31:47 +0000 Subject: [issue14620] Fatal Python error: Cannot recover from stack overflow. In-Reply-To: <1334825499.76.0.44489005416.issue14620@psf.upfronthosting.co.za> Message-ID: <1373304707.34.0.0947526498723.issue14620@psf.upfronthosting.co.za> Christian Heimes added the comment: The link doesn't work anymore and I'm unable to reproduce the issue. Please reopen the issue if you still get a stack overflow. Don't forget to attach your script, too. ---------- nosy: +christian.heimes resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 19:32:16 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 17:32:16 +0000 Subject: [issue11012] Add log1p(), exp1m(), gamma(), and lgamma() to cmath In-Reply-To: <1295997901.71.0.113497713942.issue11012@psf.upfronthosting.co.za> Message-ID: <1373304736.44.0.607332104177.issue11012@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- priority: normal -> low versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 19:35:26 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 08 Jul 2013 17:35:26 +0000 Subject: [issue7457] Adding a read_pkg_file to DistributionMetadata In-Reply-To: <1260261174.05.0.469810624752.issue7457@psf.upfronthosting.co.za> Message-ID: <1373304926.09.0.36228739548.issue7457@psf.upfronthosting.co.za> Jason R. Coombs added the comment: I recently discovered this method is missing from Python 3. I started porting a project which depends on it (a tool that uploads an already-packaged package to a cheeseshop), but found the method missing on Python 3. According to the changelog, this commit landed in 2.7 and 3.2, but when I search the Mercurial repo for #7457, it seems it only landed in 2.7 (25aede62fc17). Perhaps the change was lost in the migration to Mercurial? Since this behavior was not intentionally removed from Python 3 and has no suitable replacement (afaik), the functionality should be restored in 3.2+, as it is a regression from 2.7. ---------- nosy: +jason.coombs status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 19:35:43 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 17:35:43 +0000 Subject: [issue14518] Add bcrypt $2a$ to crypt.py In-Reply-To: <1333741347.69.0.597224923936.issue14518@psf.upfronthosting.co.za> Message-ID: <1373304943.05.0.37506358791.issue14518@psf.upfronthosting.co.za> Christian Heimes added the comment: I'll have a look ---------- assignee: -> christian.heimes nosy: +christian.heimes versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 19:41:43 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 08 Jul 2013 17:41:43 +0000 Subject: [issue7457] Adding a read_pkg_file to DistributionMetadata In-Reply-To: <1260261174.05.0.469810624752.issue7457@psf.upfronthosting.co.za> Message-ID: <1373305303.5.0.231248246898.issue7457@psf.upfronthosting.co.za> Jason R. Coombs added the comment: On second thought, the hyperlink for r76706 resolves to d9b4f6ea3e39, which is in the default branch since 2009, so apparently the code was present, so I'll continue to trace why it went away. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 19:48:52 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 08 Jul 2013 17:48:52 +0000 Subject: [issue7457] Adding a read_pkg_file to DistributionMetadata In-Reply-To: <1260261174.05.0.469810624752.issue7457@psf.upfronthosting.co.za> Message-ID: <1373305732.4.0.0213683804348.issue7457@psf.upfronthosting.co.za> Jason R. Coombs added the comment: I see now, the code was removed in 29a3eda89995. But the associated comment indicates distutils is feature-frozen and that subsequent work should be done in distutils2, which of course is now a defunct effort. Given that information, what's the proper solution for a project that requires the ability to read distribution metadata (preferably one that supports Python 3.2)? ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 19:57:20 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 17:57:20 +0000 Subject: [issue18405] crypt.mksalt() result has unnecessarily low entropy Message-ID: <1373306240.23.0.797149936972.issue18405@psf.upfronthosting.co.za> New submission from Christian Heimes: crypt.mksalt() creates a salt with a lower entropy than possible. It uses random.SystemRandom().sample() to generate a salt string from the set of 64 chars (string.ascii_letters + string.digits + './'). SystemRandom() uses a CPRNG (good) but sample() returns n UNIQUE members of the set (very bad). sample() reduces the set possible chars by one for each salt char. Suggested fix: salt = base64.b64encode(os.urandom(salt_chars * 3 // 4), b"./").decode("ascii") ---------- assignee: christian.heimes components: Library (Lib) messages: 192683 nosy: christian.heimes, gregory.p.smith priority: critical severity: normal stage: patch review status: open title: crypt.mksalt() result has unnecessarily low entropy type: security versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 20:25:45 2013 From: report at bugs.python.org (David P. Kendal) Date: Mon, 08 Jul 2013 18:25:45 +0000 Subject: [issue18406] unicodedata.itergraphemes / str.itergraphemes / str.graphemes Message-ID: <1373307945.33.0.806287270916.issue18406@psf.upfronthosting.co.za> New submission from David P. Kendal: On python-ideas I proposed the addition of a way to iterate over the graphemes of a string, either as part of the unicodedata library or as a method on the built-in str type. I provided a sample implementation, but "MRAB" pointed out that my definition of a grapheme is slightly wrong; it's a little more complex than just "character followed by combiners". M.-A. Lenburg asked me to open this issue. ---------- messages: 192684 nosy: dpk priority: normal severity: normal status: open title: unicodedata.itergraphemes / str.itergraphemes / str.graphemes type: enhancement versions: Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 20:32:32 2013 From: report at bugs.python.org (Chris Rebert) Date: Mon, 08 Jul 2013 18:32:32 +0000 Subject: [issue18406] unicodedata.itergraphemes / str.itergraphemes / str.graphemes In-Reply-To: <1373307945.33.0.806287270916.issue18406@psf.upfronthosting.co.za> Message-ID: <1373308352.06.0.0247378701612.issue18406@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 20:34:13 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 08 Jul 2013 18:34:13 +0000 Subject: [issue18406] unicodedata.itergraphemes / str.itergraphemes / str.graphemes In-Reply-To: <1373307945.33.0.806287270916.issue18406@psf.upfronthosting.co.za> Message-ID: <1373308453.41.0.932657173351.issue18406@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +benjamin.peterson, ezio.melotti, loewis stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 21:05:59 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Jul 2013 19:05:59 +0000 Subject: [issue7457] Adding a read_pkg_file to DistributionMetadata In-Reply-To: <1260261174.05.0.469810624752.issue7457@psf.upfronthosting.co.za> Message-ID: <1373310359.35.0.449361814274.issue7457@psf.upfronthosting.co.za> Ned Deily added the comment: There have been a number of issues that have come up over the past few years due to Python 3.2+'s distutils being a subset of Python 2.7's as a result of the revert (29a3eda89995). Since circumstances have changed since the decision was made to do the revert and distutils isn't going away immediately, I think the best thing at this point would be for someone to make a comprehensive forward port patch of the current distutils in 2.7 to default for review with the goal of having a common base, feature- and bug-wise, for 3.4. That isn't going to solve the problem for those who need to support 3.2, of course, but knowing exactly what the differences are at this point might suggest some practical solutions, as I expect the differences among 3.2, 3.3, and default (3.4) at this point are fewer than the differences between any of them and 2.7. A first step would be to open an issue. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 21:09:35 2013 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 08 Jul 2013 19:09:35 +0000 Subject: [issue18407] Fix compiler warnings in pythoncore for Win64 Message-ID: <1373310575.24.0.067873985204.issue18407@psf.upfronthosting.co.za> New submission from Jeremy Kloth: The attached patch fixes compiler warnings for the pythoncore project when building on 64-bit Windows. Fixes for built-in modules are not included, however. ---------- files: issue18407.diff keywords: patch messages: 192686 nosy: brian.curtin, christian.heimes, haypo, jeremy.kloth, jkloth, loewis, tim.golden priority: normal severity: normal status: open title: Fix compiler warnings in pythoncore for Win64 Added file: http://bugs.python.org/file30864/issue18407.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 21:10:24 2013 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 08 Jul 2013 19:10:24 +0000 Subject: [issue18407] Fix compiler warnings in pythoncore for Win64 In-Reply-To: <1373310575.24.0.067873985204.issue18407@psf.upfronthosting.co.za> Message-ID: <1373310624.42.0.44348291281.issue18407@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- components: +Build, Windows type: -> compile error versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 21:20:41 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jul 2013 19:20:41 +0000 Subject: [issue18407] Fix compiler warnings in pythoncore for Win64 In-Reply-To: <1373310575.24.0.067873985204.issue18407@psf.upfronthosting.co.za> Message-ID: <1373311241.4.0.402558912461.issue18407@psf.upfronthosting.co.za> STINNER Victor added the comment: - /USECL:MS_OPTERON /GS- %(AdditionalOptions) + false Please don't change too much things in the same patch. The issue #15792 is a better place for such change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 21:23:30 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jul 2013 19:23:30 +0000 Subject: [issue18407] Fix compiler warnings in pythoncore for Win64 In-Reply-To: <1373310575.24.0.067873985204.issue18407@psf.upfronthosting.co.za> Message-ID: <1373311410.1.0.807240571263.issue18407@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue duplicates the isuse #9566, but your patch is interesting. I created other more specific issues like #18295 and #18294. - return lb - ll->ll_label; + return Py_SAFE_DOWNCAST(lb - ll->ll_label, Py_intptr_t, int); I don't think that such change is correct, IMO the right fix is to change the result type to Py_intptr_t. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 21:46:23 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Jul 2013 19:46:23 +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: <1373312783.7.0.898702520466.issue14455@psf.upfronthosting.co.za> Ned Deily added the comment: Ronald, I think v8 of the patch is missing (and plistlib_generate_testdata.py was uploaded twice). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 22:07:58 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Jul 2013 20:07:58 +0000 Subject: [issue17911] Extracting tracebacks does too much work In-Reply-To: <1367789486.16.0.484658151136.issue17911@psf.upfronthosting.co.za> Message-ID: <1373314078.12.0.807927130868.issue17911@psf.upfronthosting.co.za> Guido van Rossum added the comment: In terms of how much freedom you have about changing the internal, I'd check how long ago they were changed. "Internal" APIs that have been stable for many versions tend to have illicit external uses -- but internal APIs that were introduced recently (e.g. in 3.2) are usually safe to use -- nobody is going to make too much of a stink if you break their code. As for saving f_globals, if you're going to save an extra pointer anyways, why not just save the frame pointer? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 22:10:43 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jul 2013 20:10:43 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc Message-ID: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> New submission from STINNER Victor: I created a first toy based on the PEP 445 to test of Python handles MemoryError: in short, Python handles them badly... Home page of the project: https://pypi.python.org/pypi/pyfailmalloc I will use this issue to track crashes found by this tool. ---------- messages: 192691 nosy: haypo priority: normal severity: normal status: open title: Fixes crashes found by pyfailmalloc type: crash versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 22:20:41 2013 From: report at bugs.python.org (Steve Dower) Date: Mon, 08 Jul 2013 20:20:41 +0000 Subject: [issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express In-Reply-To: <1260858478.84.0.495655867168.issue7511@psf.upfronthosting.co.za> Message-ID: <1373314841.33.0.0131881381757.issue7511@psf.upfronthosting.co.za> Steve Dower added the comment: I must have missed something when I merged files to create the diffs. In any case, you'll still require VC9 or VC10 to be able to build something compatible with a CPython release (though maybe that doesn't matter for Cython? I don't know). When I get a chance I'll fix up the changes and then ping Python-Dev about getting a review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 22:36:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Jul 2013 20:36:31 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3bpz322qXzzMwG@mail.python.org> Roundup Robot added the comment: New changeset 111c2a070f28 by Victor Stinner in branch 'default': Issue #18408: PyObject_GC_NewVar() now raises SystemError exception if nitems http://hg.python.org/cpython/rev/111c2a070f28 New changeset ba766323b53a by Victor Stinner in branch 'default': Issue #18408: Fix PyDict_New() to handle correctly new_keys_object() failure http://hg.python.org/cpython/rev/ba766323b53a New changeset 68887e177dd4 by Victor Stinner in branch 'default': Issue #18408: Fix list.pop() to handle list_resize() failure (MemoryError). http://hg.python.org/cpython/rev/68887e177dd4 New changeset 697d722d97f9 by Victor Stinner in branch 'default': Issue #18408: Fix marshal reader for Unicode strings: handle http://hg.python.org/cpython/rev/697d722d97f9 New changeset de1473f4503b by Victor Stinner in branch 'default': Issue #18408: Fix PyType_Ready() and type.__bases__ setter to handle http://hg.python.org/cpython/rev/de1473f4503b New changeset f4311870e329 by Victor Stinner in branch 'default': Issue #18408: Fix call_function() of ceval.c to handle PyTuple_New() failure http://hg.python.org/cpython/rev/f4311870e329 New changeset df8b40593a08 by Victor Stinner in branch 'default': Issue #18408: Fix _PyUnicodeWriter_Finish(): clear writer->buffer, http://hg.python.org/cpython/rev/df8b40593a08 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 22:50:08 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jul 2013 20:50:08 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1373316608.73.0.616032953079.issue18408@psf.upfronthosting.co.za> STINNER Victor added the comment: "I created a first toy based on the PEP 445 to test of Python handles MemoryError: in short, Python handles them badly..." Ooops: to test *how* Python handles.. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 22:54:03 2013 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 08 Jul 2013 20:54:03 +0000 Subject: [issue18407] Fix compiler warnings in pythoncore for Win64 In-Reply-To: <1373311241.4.0.402558912461.issue18407@psf.upfronthosting.co.za> Message-ID: Jeremy Kloth added the comment: Yeah, sorry. This made it in by mistake. It was in the tree just to eliminate warning noise. On Mon, Jul 8, 2013 at 1:20 PM, STINNER Victor wrote: > > STINNER Victor added the comment: > > - /USECL:MS_OPTERON /GS- %(AdditionalOptions) > + false > > Please don't change too much things in the same patch. The issue #15792 is a better place for such change. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 22:57:26 2013 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 08 Jul 2013 20:57:26 +0000 Subject: [issue18407] Fix compiler warnings in pythoncore for Win64 In-Reply-To: <1373311410.1.0.807240571263.issue18407@psf.upfronthosting.co.za> Message-ID: Jeremy Kloth added the comment: The change in grammar.c:addlabel() is correct. The return value is an index into the ll->ll_label array, thus an int. The code could be rewritten to avoid the pointer addition by saving the value of ll->ll_nlabels before it is incremented and return that instead, On Mon, Jul 8, 2013 at 1:23 PM, STINNER Victor wrote: > > STINNER Victor added the comment: > > This issue duplicates the isuse #9566, but your patch is interesting. I created other more specific issues like #18295 and #18294. > > - return lb - ll->ll_label; > + return Py_SAFE_DOWNCAST(lb - ll->ll_label, Py_intptr_t, int); > > I don't think that such change is correct, IMO the right fix is to change the result type to Py_intptr_t. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 22:59:22 2013 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 08 Jul 2013 20:59:22 +0000 Subject: [issue18407] Fix compiler warnings in pythoncore for Win64 In-Reply-To: <1373310575.24.0.067873985204.issue18407@psf.upfronthosting.co.za> Message-ID: <1373317162.39.0.049537312572.issue18407@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Ugh, sorry for the bad quoting (silly GMail). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 23:03:05 2013 From: report at bugs.python.org (Anton Tyurin) Date: Mon, 08 Jul 2013 21:03:05 +0000 Subject: [issue18100] socket.sendall() cannot send buffers of 2GB or more In-Reply-To: <1369918582.13.0.605373457603.issue18100@psf.upfronthosting.co.za> Message-ID: <1373317385.25.0.717549954885.issue18100@psf.upfronthosting.co.za> Anton Tyurin added the comment: This issue is similar like http://bugs.python.org/issue9566. It seems reasonable to apply a similar fix. But why not use the types described in the signature functions in . In particular use for len size_t, and for n - ssize_t? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 00:24:21 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Jul 2013 22:24:21 +0000 Subject: [issue18100] socket.sendall() cannot send buffers of 2GB or more In-Reply-To: <1369918582.13.0.605373457603.issue18100@psf.upfronthosting.co.za> Message-ID: <1373322261.58.0.692574266138.issue18100@psf.upfronthosting.co.za> Christian Heimes added the comment: Does it affect Python 3, too? ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 00:27:30 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Jul 2013 22:27:30 +0000 Subject: [issue18365] Idle: mock Text class and test thereof In-Reply-To: <1373006946.99.0.696971871982.issue18365@psf.upfronthosting.co.za> Message-ID: <1373322450.57.0.891831983276.issue18365@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Great start! Some revisions: * Create root directly (and just once); add root.destroy, which added several warnings. * Create Text directly; test should not require Editors. This removed warnings. I suspect that EditorWindow.py does other things that are not properly undone. In any case, tests should only create needed objects. * Worked on docstrings; polished _decode. * Revised .insert to handle '' and 'a....z\n' and added corresponding tests. * Consistently used 'end' instead of 'end' here and 'END' there. * Added test_no_delete and edited mock delete to pass. * Finished compare methods and added tests. * Deleted non-tk .setDate/.getData, which only slightly abbreviate the real .get and .insert methods. I notice that Phil already changed the FormatParagraph test to not use them. Here is the result. I think it is about ready to commit after sleeping on it and a final review. ---------- stage: test needed -> commit review Added file: http://bugs.python.org/file30865/mock_text2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 00:53:46 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Jul 2013 22:53:46 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3bq25Q1jCxz7Ljh@mail.python.org> Roundup Robot added the comment: New changeset ba79f6a86300 by Victor Stinner in branch 'default': Issue #18408: Fix ConvParam() of the ctypes module to handle paramfunc failure http://hg.python.org/cpython/rev/ba79f6a86300 New changeset 2ef2edfd1a4c by Victor Stinner in branch 'default': Issue #18408: Fix zlib.compressobj() to handle PyThread_allocate_lock() failure http://hg.python.org/cpython/rev/2ef2edfd1a4c New changeset a45407fa4a5b by Victor Stinner in branch 'default': Issue #18408: Fix PyCode_Optimize(): raise a MemoryError on memory allocation http://hg.python.org/cpython/rev/a45407fa4a5b New changeset ed0c9d77e179 by Victor Stinner in branch 'default': Issue #18408: Fix usage of _PyBytes_Resize() http://hg.python.org/cpython/rev/ed0c9d77e179 New changeset d605c6b8095c by Victor Stinner in branch 'default': Issue #18408: _PyUnicodeWriter_Finish() now clears its buffer attribute in all http://hg.python.org/cpython/rev/d605c6b8095c New changeset 549d8d3297f2 by Victor Stinner in branch 'default': Issue #18408: Fix _PyMem_DebugRealloc() http://hg.python.org/cpython/rev/549d8d3297f2 New changeset c91e7f707562 by Victor Stinner in branch 'default': Issue #18408: Fix select.select() to handle PyList_New() failure (MemoryError) http://hg.python.org/cpython/rev/c91e7f707562 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 01:42:36 2013 From: report at bugs.python.org (Eric Snow) Date: Mon, 08 Jul 2013 23:42:36 +0000 Subject: [issue18364] Remove _not_found hack from importlib In-Reply-To: <1372978476.87.0.491893318984.issue18364@psf.upfronthosting.co.za> Message-ID: <1373326956.42.0.879928252289.issue18364@psf.upfronthosting.co.za> Eric Snow added the comment: That'll work. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 01:59:54 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jul 2013 23:59:54 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1373327994.73.0.360171733848.issue18408@psf.upfronthosting.co.za> STINNER Victor added the comment: use_failmalloc.patch: Patch to use pyfailmalloc on the Python test suite. Command to run test suite: "gdb -args ./python -m test -F". ---------- keywords: +patch Added file: http://bugs.python.org/file30866/use_failmalloc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 02:00:28 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2013 00:00:28 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1373328028.55.0.724409415389.issue18408@psf.upfronthosting.co.za> STINNER Victor added the comment: call_exc_trace.patch: Fix for the call_exc_trace() function when the traceback is not set. ---------- Added file: http://bugs.python.org/file30867/call_exc_trace.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 02:01:12 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2013 00:01:12 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1373328072.09.0.278933708034.issue18408@psf.upfronthosting.co.za> STINNER Victor added the comment: type_slot_tp_str.patch: Fix for the __str__ slot of types (slot_tp_str() in typeobject.c). ---------- Added file: http://bugs.python.org/file30868/type_slot_tp_str.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 02:03:51 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2013 00:03:51 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1373328230.99.0.0664944039747.issue18408@psf.upfronthosting.co.za> STINNER Victor added the comment: misc_fixes.patch: Misc bugfixes related to MemoryError, this patch should be read carefully. The changes in unicodeobject.c may be written differently. I wrote them to fix a failing assertion ("assert(data != NULL);") in _PyUnicode_CheckConsistency(), called when the creation of a new string failed. ---------- Added file: http://bugs.python.org/file30869/misc_fixes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 02:14:38 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 09 Jul 2013 00:14:38 +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: <1373328878.44.0.452860238447.issue10042@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'm actually not sure which of us is correct - Katie and I will be looking into it further today to compare the existing implementation, my proposal and yours to see if there's a clear winner in terms of consistent. It may be that we end up choosing the version that pushes towards more correct behaviour, since types incorrectly returning True or False from comparisons (instead of NotImplemented) is actually a pretty common bug preventing the creation of unrelated types that interoperate cleanly with an existing type. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 03:15:16 2013 From: report at bugs.python.org (Indra Talip) Date: Tue, 09 Jul 2013 01:15:16 +0000 Subject: [issue15403] Refactor package creation support code into a common location In-Reply-To: <1342782793.3.0.140383152387.issue15403@psf.upfronthosting.co.za> Message-ID: <1373332516.41.0.674113641969.issue15403@psf.upfronthosting.co.za> Indra Talip added the comment: updated patch to apply on top of patch from issue15494 ---------- nosy: +italip Added file: http://bugs.python.org/file30870/issue-15403-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 03:16:05 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Jul 2013 01:16:05 +0000 Subject: [issue4708] os.pipe should return inheritable descriptors (Windows) In-Reply-To: <1229825725.05.0.791696937909.issue4708@psf.upfronthosting.co.za> Message-ID: <1373332565.42.0.298983722798.issue4708@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 03:33:55 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 09 Jul 2013 01:33:55 +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: <1373333635.45.0.713751824008.issue10042@psf.upfronthosting.co.za> Nick Coghlan added the comment: OK, I had misunderstood the way Jim's code works (it still coerces a "False" result for __eq__ into NotImplemented if the ordered comparison returns NotImplemented). However, I spent some more time tinkering with it today (see https://bitbucket.org/ncoghlan/misc/src/856bd105e5e43cb96ebaa2d250c3c801da571953/tinkering/comparisons.py?at=default ) which shows that my version (which ignores __eq__ entirely if the ordered comparison returns NotImplemented) is consistent with the current behaviour, while accepting a "True" return from __eq__ in that case (as Jim's version does) may result in some existing TypeError results becoming "True" comparison results instead. Since this is such an incredibly niche edge case (the ordered comparison has to return NotImplemented while __eq__ returns True), I remaining consistent with the existing behaviour is the most important consideration. We'll add a test case to ensure this remains consistent, though. The other code clarification changes look reasonable though - Katie plans to incorporate several of those. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 04:22:50 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 09 Jul 2013 02:22:50 +0000 Subject: [issue17840] base64_codec uses assert for runtime validity checks In-Reply-To: <1366875650.57.0.151905786577.issue17840@psf.upfronthosting.co.za> Message-ID: <1373336570.46.0.302980744788.issue17840@psf.upfronthosting.co.za> Nick Coghlan added the comment: ValueError works for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 04:33:51 2013 From: report at bugs.python.org (Phil Webster) Date: Tue, 09 Jul 2013 02:33:51 +0000 Subject: [issue18409] IDLE Improvements: Unit test for AutoComplete.py Message-ID: <1373337231.6.0.320085332655.issue18409@psf.upfronthosting.co.za> New submission from Phil Webster: I've started writing this test which depends on #18365. ---------- components: IDLE messages: 192711 nosy: JayKrish, Todd.Rovito, philwebster, terry.reedy priority: normal severity: normal status: open title: IDLE Improvements: Unit test for AutoComplete.py type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 04:37:11 2013 From: report at bugs.python.org (Katie Miller) Date: Tue, 09 Jul 2013 02:37:11 +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: <1373337431.24.0.70157547997.issue10042@psf.upfronthosting.co.za> Katie Miller added the comment: Attached is a new patch, which includes Nick's logic from msg140493, some of the code readability changes Jim suggested in msg151989 (but not the behavioural changes), and associated tests. On Nick's advice, I have also replaced the dunder equals calls with the standard comparators (==/!=), given not all classes will necessarily have both NE and EQ, and made the comparison the last action in each method, for consistency. Test cases have been added to check a TypeError is raised, rather than True being returned, when GE/LE is called on two objects that are equal but have a comparator that returns NotImplemented. ---------- Added file: http://bugs.python.org/file30871/10042_new_total_ordering_with_tests.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 05:00:07 2013 From: report at bugs.python.org (Phil Webster) Date: Tue, 09 Jul 2013 03:00:07 +0000 Subject: [issue18410] IDLE Improvements: Unit test for SearchDialog.py Message-ID: <1373338807.5.0.870375456877.issue18410@psf.upfronthosting.co.za> New submission from Phil Webster: Continuing the IDLE unittest framework from #15392. Depends on #18365. ---------- components: IDLE messages: 192713 nosy: JayKrish, Todd.Rovito, philwebster, terry.reedy priority: normal severity: normal status: open title: IDLE Improvements: Unit test for SearchDialog.py type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 05:02:39 2013 From: report at bugs.python.org (paul j3) Date: Tue, 09 Jul 2013 03:02:39 +0000 Subject: [issue16468] argparse only supports iterable choices In-Reply-To: <1352867539.71.0.970228461518.issue16468@psf.upfronthosting.co.za> Message-ID: <1373338959.43.0.804729773577.issue16468@psf.upfronthosting.co.za> paul j3 added the comment: This patch generally deals with the choices option, and specifically the problems with formatting long lists, or objects that have __contains__ but not __iter__. But it also incorporates issues 9849 (better add_argument testing) and 9625 (choices with *). It may be too broad for this issue, but the changes all relate to 'choices'. As noted by other posters, there are 3 places where choices is formatted with a comprehension. I have refactored these into one _format_choices function. _format_choices() is a utility function that formats the choices by iteration, and failing that using repr(). It raises an error if choices does not even have a __contains__. It also has a summarize option ({1,2,3,...,19,20}). I did not make this an action method because it only uses the choices object. _metavar_formatter() - calls _format_choices for Usage with the default compact form. Its use of metavar gives the user full control of the choices display. _expand_help() - calls _format_choices with the looser format. This form is used only if the user puts '%(choices)s' in the help string. This is not documented, and only appears a few times in the test file. Again the user has ultimate control over the contents. _check_value() - calls _format_choices with a 'summarize=15' option. Normally this error message appears with the usage message. So it does not need to use the metavar. The MetavarTypeHelpFormatter subclass is an example of how formats can be customized without changing normal behavior. Such a subclass could even be used to set custom parameters, or modify any of the above methods. -------------------- other changes: formatter _format_actions_usage() - I tweaked the regex that trims excess notation from mutually exclusive groups. This removed '()' from other parts of the usage line, for example a metavar like 'range(20)'. Issue 18349. formatter _format_args() - I included issue 9849 changes which improve testing for nargs, and array metavars. This calls the _metavar_formatter. Thus any errors in formatting choices pass back through this. Issue 9849 also changes container add_argument() to call the parser _check_argument(). This in turn calls _format_args() to test action options like nargs, metavars, and now choices. If there are problems it raises an ArgumentError. parser _get_values() - issue 9625 changes this to correctly handle choices when nargs='*'. parser _check_value() - I rewrote this to give better errors if there are problems with __contains__. If choices is a string (e.g. 'abc') it converts it to a list, so __contains__ is more consistent. For example, 'bc' in 'abc' is True, but 'bc' in ['a','b','c'] is False (issue 16977) ---------------------- test_argparse change examples with string choices to lists class TestAddArgumentMetavar change EXPECTED_MESSAGE and EXPECTED_ERROR to reflect issue 9849 changes class TestMetavarWithParen tests 'range(n)' choices makes sure () in the metavar are preserved tests that metavar is used in Usage as given tests summarized list of choices in the error message tests the %(choices)s help line case class TestNonIterableChoices tests a choices container that has __contains__ but not __iter__ tests that repr() is used as needed class TestBareChoices tests a class without even __contains__ tests for an add_argument error class TestStringChoices tests the expansion of 'abc' to ['a','b','c'] ---------- Added file: http://bugs.python.org/file30872/choice2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 05:06:38 2013 From: report at bugs.python.org (paul j3) Date: Tue, 09 Jul 2013 03:06:38 +0000 Subject: [issue16977] argparse: mismatch between choices parsing and usage/error message In-Reply-To: <1358303407.58.0.0453921356618.issue16977@psf.upfronthosting.co.za> Message-ID: <1373339198.6.0.674388549929.issue16977@psf.upfronthosting.co.za> paul j3 added the comment: I just posted a patch to http://bugs.python.org/issue16468 that deals with this 'bc' in 'abc' issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 05:07:58 2013 From: report at bugs.python.org (paul j3) Date: Tue, 09 Jul 2013 03:07:58 +0000 Subject: [issue9625] argparse: Problem with defaults for variable nargs when using choices In-Reply-To: <1282036744.37.0.964764969496.issue9625@psf.upfronthosting.co.za> Message-ID: <1373339278.35.0.26393613518.issue9625@psf.upfronthosting.co.za> paul j3 added the comment: The patch I just posted to http://bugs.python.org/issue16468 uses this fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 05:08:49 2013 From: report at bugs.python.org (paul j3) Date: Tue, 09 Jul 2013 03:08:49 +0000 Subject: [issue18349] argparse usage should preserve () in metavars such as range(20) In-Reply-To: <1372832211.16.0.544648995095.issue18349@psf.upfronthosting.co.za> Message-ID: <1373339329.39.0.82001524828.issue18349@psf.upfronthosting.co.za> paul j3 added the comment: I just posted a patch to http://bugs.python.org/issue16468 that uses (and tests) this fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 05:13:26 2013 From: report at bugs.python.org (paul j3) Date: Tue, 09 Jul 2013 03:13:26 +0000 Subject: [issue16418] argparse with many choices can generate absurdly long usage message In-Reply-To: <1352157111.52.0.432994430995.issue16418@psf.upfronthosting.co.za> Message-ID: <1373339606.15.0.958633383957.issue16418@psf.upfronthosting.co.za> paul j3 added the comment: In the patch I just posted to http://bugs.python.org/issue16468 I address this long list issue in several ways: In the Usage line, the metavar gives the user an alternative In the expanded help line the user can just omit the '%(choices)s' In _check_value(), I implemented a numpy like summarize format for choice lists longer than 15 '{1,2,3,...,18,19}'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 05:16:25 2013 From: report at bugs.python.org (paul j3) Date: Tue, 09 Jul 2013 03:16:25 +0000 Subject: [issue9849] Argparse needs better error handling for nargs In-Reply-To: <1284420312.86.0.187137843637.issue9849@psf.upfronthosting.co.za> Message-ID: <1373339785.71.0.897350672538.issue9849@psf.upfronthosting.co.za> paul j3 added the comment: I included this patch (with minor changes) in a patch that I just posted to http://bugs.python.org/issue16468. That issue deals with the argument choices option, which can be tested along with nargs and metavars. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 06:10:12 2013 From: report at bugs.python.org (Indra Talip) Date: Tue, 09 Jul 2013 04:10:12 +0000 Subject: [issue4079] new urllib2.Request 'timeout' attribute needs to have a default In-Reply-To: <1223490599.12.0.198174561396.issue4079@psf.upfronthosting.co.za> Message-ID: <1373343012.82.0.527142561365.issue4079@psf.upfronthosting.co.za> Indra Talip added the comment: patch initializes the 'timeout' attribute on urllib2.Request.__init__() ---------- keywords: +patch nosy: +italip versions: +Python 3.4 -Python 2.6 Added file: http://bugs.python.org/file30873/issue-4079-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 07:42:15 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 09 Jul 2013 05:42:15 +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: <1373348535.76.0.859465744745.issue14455@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Actually attach the latest version of the patch. ---------- Added file: http://bugs.python.org/file30874/issue-14455-v8.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 08:32:31 2013 From: report at bugs.python.org (guo tie) Date: Tue, 09 Jul 2013 06:32:31 +0000 Subject: [issue18411] signal.SIGINT in windows cause process exit directly. Message-ID: <1373351551.46.0.691420854499.issue18411@psf.upfronthosting.co.za> New submission from guo tie: I wrote those test python code as following: import signal import time import os def handler(signum, frame): print "do whatever, like call thread.interrupt_main()" return signal.signal(signal.SIGINT, handler) while 1: try: time.sleep(10) except: os.kill(int(os.getpid()), signal.SIGINT) pass when i excute this test code on windows, the process print "do whatever, like call thread.interrupt_main()", then exit; on linux, it works correctly. why on windows it not work? ---------- components: Windows messages: 192722 nosy: guo.tie priority: normal severity: normal status: open title: signal.SIGINT in windows cause process exit directly. type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 09:00:30 2013 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Tue, 09 Jul 2013 07:00:30 +0000 Subject: [issue18404] Memory leak in gdbmmodule In-Reply-To: <1373288233.43.0.746729936071.issue18404@psf.upfronthosting.co.za> Message-ID: <1373353230.93.0.665686072361.issue18404@psf.upfronthosting.co.za> Bohuslav "Slavek" Kabrda added the comment: I just tried rebuilding with my patch and running test suite + I did some manual testing and everything seems to work fine - and the memory leak is not there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 09:42:49 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 09 Jul 2013 07:42:49 +0000 Subject: [issue18406] unicodedata.itergraphemes / str.itergraphemes / str.graphemes In-Reply-To: <1373307945.33.0.806287270916.issue18406@psf.upfronthosting.co.za> Message-ID: <1373355769.11.0.222017620468.issue18406@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: It may be useful to also add the start position of the grapheme to the iterator output. Related to this, please also see this pre-PEP I once wrote for a Unicode indexing module: http://mail.python.org/pipermail/python-dev/2001-July/015938.html ---------- components: +Unicode nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 10:08:46 2013 From: report at bugs.python.org (Friedrich Spee von Langenfeld) Date: Tue, 09 Jul 2013 08:08:46 +0000 Subject: [issue18397] Python with MinGW In-Reply-To: <1373227373.99.0.371478249642.issue18397@psf.upfronthosting.co.za> Message-ID: <1373357326.32.0.207157774679.issue18397@psf.upfronthosting.co.za> Friedrich Spee von Langenfeld added the comment: @ Christian Heimes Thank you for your hint. Martin v. L?wis made an interesting commend, if his way succeed, it would be worth considering to make a paragraph in the devguide how to build Python with MinGW. The way Forward depends on the results. @ Martin v. L?wis I've tried the Unix configure under MinGW. It failed. I've written it in the appended file with: $ cd C:/MinGW/python_mercurial $ ./configure >& configure_test.txt ---------- components: -Build, Windows Added file: http://bugs.python.org/file30875/configure_test.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 10:19:51 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Jul 2013 08:19:51 +0000 Subject: [issue18397] Python with MinGW In-Reply-To: <1373227373.99.0.371478249642.issue18397@psf.upfronthosting.co.za> Message-ID: <1373357991.05.0.651099303407.issue18397@psf.upfronthosting.co.za> Christian Heimes added the comment: Please install awk and try again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 10:20:31 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Jul 2013 08:20:31 +0000 Subject: [issue18404] Memory leak in gdbmmodule In-Reply-To: <1373288233.43.0.746729936071.issue18404@psf.upfronthosting.co.za> Message-ID: <1373358031.71.0.103796828869.issue18404@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +haypo stage: -> patch review type: -> resource usage versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 10:27:14 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Jul 2013 08:27:14 +0000 Subject: [issue14518] Add bcrypt $2a$ to crypt.py In-Reply-To: <1333741347.69.0.597224923936.issue14518@psf.upfronthosting.co.za> Message-ID: <1373358434.88.0.855802291063.issue14518@psf.upfronthosting.co.za> Christian Heimes added the comment: I can't find any system that supports $2a$. My Ubuntu box returns a string of 13 chars (plain crypt) and the BSD box returns just ":". ---------- assignee: christian.heimes -> priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 10:32:07 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Jul 2013 08:32:07 +0000 Subject: [issue17911] Extracting tracebacks does too much work In-Reply-To: <1367789486.16.0.484658151136.issue17911@psf.upfronthosting.co.za> Message-ID: <1373358727.13.0.495624647958.issue17911@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > If we keep a reference to f_globals for each line in the traceback, we > can defer this to later (ideally we'd just keep the __loader__ value, > but that would require changing the linecache interface as well). Or you could add a *new* linecache interface. Keeping __loader__ sounds much less hackish than keeping f_globals to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 10:37:42 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Jul 2013 08:37:42 +0000 Subject: [issue2528] Change os.access to check ACLs under Windows In-Reply-To: <1207059558.9.0.891835325783.issue2528@psf.upfronthosting.co.za> Message-ID: <1373359062.55.0.998532676952.issue2528@psf.upfronthosting.co.za> Christian Heimes added the comment: Do you want to provide an updated patch for 3.4? ---------- nosy: +christian.heimes status: open -> languishing versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 10:43:10 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 09 Jul 2013 08:43:10 +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: <1373359390.35.0.444533401527.issue10042@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Nick, let me know when you think it is ready and I'll review the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 10:49:26 2013 From: report at bugs.python.org (Friedrich Spee von Langenfeld) Date: Tue, 09 Jul 2013 08:49:26 +0000 Subject: [issue18397] Python with MinGW In-Reply-To: <1373227373.99.0.371478249642.issue18397@psf.upfronthosting.co.za> Message-ID: <1373359766.57.0.224845641963.issue18397@psf.upfronthosting.co.za> Friedrich Spee von Langenfeld added the comment: I've installed the MSYS gawk Utility and configure succeeded (thank you!), but now make failed. Should I upload the entire log file or ony the error messages? ---------- Added file: http://bugs.python.org/file30876/make_test.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 11:18:22 2013 From: report at bugs.python.org (Anton Tyurin) Date: Tue, 09 Jul 2013 09:18:22 +0000 Subject: [issue18100] socket.sendall() cannot send buffers of 2GB or more In-Reply-To: <1369918582.13.0.605373457603.issue18100@psf.upfronthosting.co.za> Message-ID: <1373361502.18.0.588398111939.issue18100@psf.upfronthosting.co.za> Anton Tyurin added the comment: There seems to be no, because there's this bug is already fixed in Python 3, according to http://hg.python.org/cpython/file/c1a400501db6/Modules/socketmodule.c#l3290. But the use of Py_ssize_t (len and n) hides the potential type conversion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 11:40:09 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 09 Jul 2013 09:40:09 +0000 Subject: [issue4708] os.pipe should return inheritable descriptors (Windows) In-Reply-To: <1229825725.05.0.791696937909.issue4708@psf.upfronthosting.co.za> Message-ID: <1373362809.51.0.147627912832.issue4708@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > - would improve POSIX compatibility, it mimics what os.pipe() > does on those OS I disagree. On Windows fds can only be inherited if you start processes using the spanwn*() family of functions. If you start them using CreateProcess() then the underlying *handles* are inherited, but the *fds* are not. In Python 2, os.spawn*() used spawn*(), so making os.pipe() return inheritable fds would have made some sense. But in Python 3 os.spawn*() is implemented using subprocess/CreateProcess so fds will NOT be inherited (even if the wrapped handles are). Note that subprocess *does* know how to redirect the standard streams to fds returned by os.pipe(). So for Python 3 I don't think there is any point in changing things. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 11:44:05 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2013 09:44:05 +0000 Subject: [issue18100] socket.sendall() cannot send buffers of 2GB or more In-Reply-To: <1369918582.13.0.605373457603.issue18100@psf.upfronthosting.co.za> Message-ID: <1373363045.79.0.904155829483.issue18100@psf.upfronthosting.co.za> STINNER Victor added the comment: > But the use of Py_ssize_t (len and n) hides the potential type conversion. Which type conversion? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 11:50:43 2013 From: report at bugs.python.org (Anton Tyurin) Date: Tue, 09 Jul 2013 09:50:43 +0000 Subject: [issue18100] socket.sendall() cannot send buffers of 2GB or more In-Reply-To: <1369918582.13.0.605373457603.issue18100@psf.upfronthosting.co.za> Message-ID: <1373363443.04.0.931850369676.issue18100@psf.upfronthosting.co.za> Anton Tyurin added the comment: I could be wrong, but: ssize_t send(int socket, const void *buffer, size_t length, int flags); so length is size_t, but Py_ssize_t is ssize_t (signed to unsigned). PS. sorry for my bad English ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 12:04:52 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 09 Jul 2013 10:04:52 +0000 Subject: [issue4708] os.pipe should return inheritable descriptors (Windows) In-Reply-To: <1229825725.05.0.791696937909.issue4708@psf.upfronthosting.co.za> Message-ID: <1373364292.36.0.514601577558.issue4708@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Oops. I confused os.popen() with os.spawn*(). os.spawnv() IS still implemented using spawnv() in Python 3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 12:45:13 2013 From: report at bugs.python.org (Xue Fuqiao) Date: Tue, 09 Jul 2013 10:45:13 +0000 Subject: [issue18412] Minor problem in PEP 8 Message-ID: <1373366713.85.0.45952908225.issue18412@psf.upfronthosting.co.za> New submission from Xue Fuqiao: PEP 8 says: ----------------------------------------------------------------------- |The closing brace/bracket/parenthesis on multi-line constructs may |either line up under the last item of the list, as in: | |my_list = [ | 1, 2, 3, | 4, 5, 6, | ] |result = some_function_that_takes_arguments( | 'a', 'b', 'c', | 'd', 'e', 'f', | ) ----------------------------------------------------------------------- I think the code isn't consistent with the description. See: http://article.gmane.org/gmane.comp.python.general/737558 ---------- messages: 192737 nosy: xfq priority: normal severity: normal status: open title: Minor problem in PEP 8 type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 12:53:29 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 09 Jul 2013 10:53:29 +0000 Subject: [issue13788] os.closerange optimization In-Reply-To: <1326601765.34.0.310008166629.issue13788@psf.upfronthosting.co.za> Message-ID: <1373367209.74.0.716761222678.issue13788@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Two small technical comments: 1) I'd add a configure or compile-time check to determine if the procfs interface might be available. I don't like probing for features that you know are not available. 2) MacOSX has simular functionality using /dev/fd instead of /proc/${PID}/fd (and other BSD systems might have this as well) ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 13:31:00 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Jul 2013 11:31:00 +0000 Subject: [issue13788] os.closerange optimization In-Reply-To: <1326601765.34.0.310008166629.issue13788@psf.upfronthosting.co.za> Message-ID: <1373369460.33.0.363639251888.issue13788@psf.upfronthosting.co.za> Christian Heimes added the comment: In case someone is wondering if the approach really reduces the amount of syscalls: yes, it does. readdir() doesn't do a syscall for each entry. On Linux it uses the internal syscall getdents() to fill a buffer of directory entry structs. http://man7.org/linux/man-pages/man2/getdents.2.html On my system os.listdir() does four syscalls: $ strace python -c "import os; os.listdir('/home/heimes')" openat(AT_FDCWD, "/home/heimes", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3 getdents(3, /* 381 entries */, 32768) = 12880 getdents(3, /* 0 entries */, 32768) = 0 close(3) On Linux you can also use /proc/self/fd instead of /proc/YOURPID/fd. Other operating systems have different APIs to get a list of open FDs. AFAK /dev/fd is static on FreeBSD and Mac OS X: FreeBSD: http://www.manualpages.de/FreeBSD/FreeBSD-7.4-RELEASE/man3/kinfo_getfile.3.html Darwin / Mac OS X: proc_pidinfo() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 13:36:50 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Jul 2013 11:36:50 +0000 Subject: [issue2554] test_ioctl failed Python 2.6a2 Solaris 10 SUN C In-Reply-To: <1207339545.74.0.114757625359.issue2554@psf.upfronthosting.co.za> Message-ID: <1373369810.38.0.0044074865827.issue2554@psf.upfronthosting.co.za> Christian Heimes added the comment: It looks like the bug is gone. The ioctl test is passing on Solaris 10 and 11 with Sun's CC. http://buildbot.python.org/all/builders/SPARC%20Solaris%2010%20%28cc%2C%2032b%29%20%5BSB%5D%202.7/builds/336 ---------- nosy: +christian.heimes resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 13:37:13 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Jul 2013 11:37:13 +0000 Subject: [issue18412] Minor problem in PEP 8 In-Reply-To: <1373366713.85.0.45952908225.issue18412@psf.upfronthosting.co.za> Message-ID: <1373369833.7.0.288590713178.issue18412@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- assignee: -> docs at python nosy: +docs at python priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 13:39:36 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Jul 2013 11:39:36 +0000 Subject: [issue12115] some tests need to be skipped on threadless systems In-Reply-To: <1305810469.1.0.258347676504.issue12115@psf.upfronthosting.co.za> Message-ID: <1373369976.5.0.11858351769.issue12115@psf.upfronthosting.co.za> Christian Heimes added the comment: I assume that you have fixed it two years ago. Right? ---------- nosy: +christian.heimes resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 13:40:25 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Jul 2013 11:40:25 +0000 Subject: [issue10482] subprocess and deadlock avoidance In-Reply-To: <1290320162.59.0.372707956205.issue10482@psf.upfronthosting.co.za> Message-ID: <1373370025.69.0.905917848174.issue10482@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- stage: -> needs patch versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 14:19:36 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Jul 2013 12:19:36 +0000 Subject: [issue1193610] Expat Parser to supply document locator in incremental parse Message-ID: <1373372376.64.0.940966404401.issue1193610@psf.upfronthosting.co.za> Christian Heimes added the comment: Does anybody want to work on a patch? ---------- assignee: loewis -> nosy: +christian.heimes priority: normal -> low stage: -> needs patch status: open -> languishing versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 14:27:42 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Jul 2013 12:27:42 +0000 Subject: [issue1445781] install fails on hard link Message-ID: <1373372862.92.0.157939807658.issue1445781@psf.upfronthosting.co.za> Christian Heimes added the comment: Our Makefile still uses a hard link in two place: libpython$(LDVERSION).so python$(LDVERSION)$(EXE) python$(VERSION)$(EXE)) ---------- nosy: +christian.heimes stage: test needed -> needs patch versions: +Python 3.3, Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 14:42:45 2013 From: report at bugs.python.org (=?utf-8?b?0JDRgNGC0LXQvCDQnNC10LbQtdC90LjQvQ==?=) Date: Tue, 09 Jul 2013 12:42:45 +0000 Subject: [issue18413] logging.error('asdf', extra={'msg':123}) raise KeyError exception Message-ID: <1373373765.43.0.0479978783535.issue18413@psf.upfronthosting.co.za> New submission from ????? ???????: Hello. I noticed strange behavior of logging module, when debugging my code: $ python Python 2.7.3 (default, Aug 1 2012, 05:14:39) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import logging >>> logging.error('asdf') ERROR:root:asdf >>> logging.error('asdf', extra={'msg':123}) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.7/logging/__init__.py", line 1575, in error root.error(msg, *args, **kwargs) File "/usr/lib/python2.7/logging/__init__.py", line 1166, in error self._log(ERROR, msg, args, **kwargs) File "/usr/lib/python2.7/logging/__init__.py", line 1257, in _log record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info, func, extra) File "/usr/lib/python2.7/logging/__init__.py", line 1235, in makeRecord raise KeyError("Attempt to overwrite %r in LogRecord" % key) KeyError: "Attempt to overwrite 'msg' in LogRecord" Originally code was extra=locals() and 'msg' was local variable, but it doesn't matter. ---------- messages: 192744 nosy: amezhenin priority: normal severity: normal status: open title: logging.error('asdf', extra={'msg':123}) raise KeyError exception _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 14:43:30 2013 From: report at bugs.python.org (=?utf-8?b?0JDRgNGC0LXQvCDQnNC10LbQtdC90LjQvQ==?=) Date: Tue, 09 Jul 2013 12:43:30 +0000 Subject: [issue18413] logging.error('asdf', extra={'msg':123}) raise KeyError exception In-Reply-To: <1373373765.43.0.0479978783535.issue18413@psf.upfronthosting.co.za> Message-ID: <1373373810.25.0.463807298023.issue18413@psf.upfronthosting.co.za> Changes by ????? ??????? : ---------- components: +Library (Lib) type: -> behavior versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 15:03:48 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 09 Jul 2013 13:03:48 +0000 Subject: [issue10042] functools.total_ordering fails to handle NotImplemented correctly In-Reply-To: <1373359390.35.0.444533401527.issue10042@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: I think I spotted a logic bug in _not_op_and_not_eq (it uses "or" instead of "and" in the final line) , so I suspect we still have a missing test case in the latest patch. (My fault - I should have suggested using coverage.py to ensure all the branches were covered by the chosen test cases). The general structure of the proposed update is complete though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 15:04:20 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Jul 2013 13:04:20 +0000 Subject: [issue18413] logging.error('asdf', extra={'msg':123}) raise KeyError exception In-Reply-To: <1373373765.43.0.0479978783535.issue18413@psf.upfronthosting.co.za> Message-ID: <1373375060.03.0.963365144925.issue18413@psf.upfronthosting.co.za> Christian Heimes added the comment: The issue is covered by the docs: http://docs.python.org/2.7/library/logging.html#logging.Logger.debug > The keys in the dictionary passed in extra should not clash with the keys used by the logging system. You can't use a couple of reserved keys like 'msg' in the extra args. Perhaps you can find a simple workaround for your issue? ---------- nosy: +christian.heimes resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 15:07:04 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Jul 2013 13:07:04 +0000 Subject: [issue4079] new urllib2.Request 'timeout' attribute needs to have a default In-Reply-To: <1223490599.12.0.198174561396.issue4079@psf.upfronthosting.co.za> Message-ID: <1373375224.6.0.410053690571.issue4079@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- stage: test needed -> patch review status: languishing -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 15:11:25 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Jul 2013 13:11:25 +0000 Subject: [issue18414] random.choices(seq, k) Message-ID: <1373375485.67.0.76143166278.issue18414@psf.upfronthosting.co.za> New submission from Christian Heimes: The random module has no method to obvious way to select k elements from a sequence without enforcing unique values in the result set. It's a rather useful feature for salts, randomly generated passwords and other applications. See #18405 The patch implements random.choices(seq, k) -> list ---------- components: Library (Lib) files: random_choices.patch keywords: patch messages: 192747 nosy: christian.heimes, mark.dickinson, rhettinger priority: normal severity: normal stage: patch review status: open title: random.choices(seq, k) type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file30877/random_choices.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 15:21:46 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 09 Jul 2013 13:21:46 +0000 Subject: [issue12645] test.support. import_fresh_module - incorrect doc In-Reply-To: <1311789815.76.0.639942891335.issue12645@psf.upfronthosting.co.za> Message-ID: <1373376106.63.0.0334533337915.issue12645@psf.upfronthosting.co.za> Eli Bendersky added the comment: _save_and_remove module can also raise ImportError ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 15:24:23 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 09 Jul 2013 13:24:23 +0000 Subject: [issue12645] test.support. import_fresh_module - incorrect doc In-Reply-To: <1311789815.76.0.639942891335.issue12645@psf.upfronthosting.co.za> Message-ID: <1373376263.93.0.756220938895.issue12645@psf.upfronthosting.co.za> Eli Bendersky added the comment: A single patch for both the ReST doc and docstring would be helpful. Except formatting, their contents can be the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 15:27:51 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 09 Jul 2013 13:27:51 +0000 Subject: [issue18412] Minor problem in PEP 8 In-Reply-To: <1373366713.85.0.45952908225.issue18412@psf.upfronthosting.co.za> Message-ID: <1373376471.96.0.906304253397.issue18412@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I clarified the wording. ---------- nosy: +barry resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 15:54:40 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Jul 2013 13:54:40 +0000 Subject: [issue18382] multiprocessing's overlapped PipeConnection issues on Windows 8 In-Reply-To: <1373114737.55.0.0779572840335.issue18382@psf.upfronthosting.co.za> Message-ID: <1373378080.02.0.728362783646.issue18382@psf.upfronthosting.co.za> R. David Murray added the comment: All the buildbots are volunteer hosted and run, so we need someone to volunteer to run a Windows 8 buildbot. That said, I'm not sure if we are formally supporting Windows 8 yet or not. Actually, given the lack of a buildbot, I suppose the answer is "not" :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 16:00:06 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Jul 2013 14:00:06 +0000 Subject: [issue18384] Add devhelp build instructions to the documentation makefile In-Reply-To: <1373126872.99.0.196855788769.issue18384@psf.upfronthosting.co.za> Message-ID: <1373378406.52.0.78003187724.issue18384@psf.upfronthosting.co.za> R. David Murray added the comment: I'm not sure that this belongs in core, but I'll certainly defer to Georg on that :). If it does go in, the help string should explain what 'devhelp' does, since it isn't obvious from the name (for a non-GNOME user...I had to google it). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 16:12:51 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Jul 2013 14:12:51 +0000 Subject: [issue18389] os.path.relpath gives incorrect results if start parameters is not a directory In-Reply-To: <1373141672.93.0.461698296017.issue18389@psf.upfronthosting.co.za> Message-ID: <1373379171.33.0.770969743668.issue18389@psf.upfronthosting.co.za> R. David Murray added the comment: I understand your concern, but the API is that 'start' is a directory. The function does not interrogate the file system, and should not do so. It is purely a path computation, and as such the current behavior is correct. ---------- nosy: +r.david.murray resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 16:21:13 2013 From: report at bugs.python.org (Jonathan Eldridge) Date: Tue, 09 Jul 2013 14:21:13 +0000 Subject: [issue18389] os.path.relpath gives incorrect results if start parameters is not a directory In-Reply-To: <1373141672.93.0.461698296017.issue18389@psf.upfronthosting.co.za> Message-ID: <1373379673.27.0.320981984575.issue18389@psf.upfronthosting.co.za> Jonathan Eldridge added the comment: At the very least, the documentation should be updated to explain this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 16:29:05 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Jul 2013 14:29:05 +0000 Subject: [issue18397] Python with MinGW In-Reply-To: <1373227373.99.0.371478249642.issue18397@psf.upfronthosting.co.za> Message-ID: <1373380145.38.0.288780106834.issue18397@psf.upfronthosting.co.za> R. David Murray added the comment: I believe there are open (and some closed) issues in this tracker related to mingw support, though many of them are for support for compiling extensions using mingw, which is actually a harder problem. They will probably provide clues if nothing else. What we probably lack is a core developer with the time and desire to review and commit the patches. If I remember correctly someone started trying to sort the proposals into small enough patches to make review practical. With another pair of eyes doing review, testing, and sorting, the chances of making progress would be increased. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 17:12:35 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 09 Jul 2013 15:12:35 +0000 Subject: [issue17778] Fix test discovery for test_multiprocessing.py In-Reply-To: <1366218082.59.0.595129290582.issue17778@psf.upfronthosting.co.za> Message-ID: <1373382755.63.0.8962317588.issue17778@psf.upfronthosting.co.za> Zachary Ware added the comment: Since there's been another test added since the last version of this patch, here's a new patch again. I'll also be attaching a patch to 3.3, which includes backports of the 4 changesets mentioned in my last message, as well as the changes for this issue. ---------- Added file: http://bugs.python.org/file30878/test_multiprocessing_discovery.v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 17:13:04 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 09 Jul 2013 15:13:04 +0000 Subject: [issue13418] Embedded Python memory leak In-Reply-To: <1321491453.86.0.929770076277.issue13418@psf.upfronthosting.co.za> Message-ID: <1373382784.04.0.58855192861.issue13418@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Ok, closing it. ---------- status: languishing -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 17:13:07 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 09 Jul 2013 15:13:07 +0000 Subject: [issue17778] Fix test discovery for test_multiprocessing.py In-Reply-To: <1366218082.59.0.595129290582.issue17778@psf.upfronthosting.co.za> Message-ID: <1373382787.78.0.394958655446.issue17778@psf.upfronthosting.co.za> Changes by Zachary Ware : Added file: http://bugs.python.org/file30879/test_multiprocessing_discovery.v3-3.3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 17:25:17 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Jul 2013 15:25:17 +0000 Subject: [issue12641] Remove -mno-cygwin from distutils In-Reply-To: <1311699751.35.0.569127767575.issue12641@psf.upfronthosting.co.za> Message-ID: <1373383517.61.0.431527406195.issue12641@psf.upfronthosting.co.za> Christian Heimes added the comment: The is_cygwingcc() function can be simplified a lot with subprocess.check_output(). ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 17:27:30 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 09 Jul 2013 15:27:30 +0000 Subject: [issue18397] Python with MinGW In-Reply-To: <1373227373.99.0.371478249642.issue18397@psf.upfronthosting.co.za> Message-ID: <1373383650.39.0.0361874856315.issue18397@psf.upfronthosting.co.za> Martin v. L?wis added the comment: @David: I don't think any of the other open issues actually addresses building Python with mingw (but I may misremember). @Friedrich: This is only going to be productive if you are willing to look into the issues yourself, and propose changes. If I had time to look into this issue (which I don't), it would be much easier for me to reproduce and fix the problem, than to wait for you to report the next problem. Be prepared that this task may take several days (or even weeks) of work. If you merely keep reporting the problems you find, expect people to lose interest quickly. As for the specific problem (make_test.txt): MS_WINDOWS needs to get defined somehow (I think), and then EALREADY etc ought to come from winsock2.h (see exceptions.c around line 2360). Try replacing the generated pyconfig.h with PC/pyconfig.h to see whether that gets you further. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 18:03:57 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 09 Jul 2013 16:03:57 +0000 Subject: [issue13788] os.closerange optimization In-Reply-To: <1326601765.34.0.310008166629.issue13788@psf.upfronthosting.co.za> Message-ID: <1373385837.71.0.394267504714.issue13788@psf.upfronthosting.co.za> Gregory P. Smith added the comment: _posixsubprocess already uses the Linux getdent64 syscall when available (though for different reasons: readdir is not safe in that context). http://hg.python.org/cpython/file/3f3cbfd52f94/Modules/_posixsubprocess.c#l227 Probing for procfs at configure time could be problematic. It is a virtual filesystem. It is entirely possible for a system to choose not to mount it. It might be reasonable to assume that it "might be present" only if the system had it mounted at compile time but a configure flag to override that might be desirable for some systems (not the Linux systems I usually deal with). If we're going through all of these hoops for closerange: I'd love to see an API exposed in the os module to return a list of open fd's. It is an abstraction nobody should have to write for themselves. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 18:15:20 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Jul 2013 16:15:20 +0000 Subject: [issue18389] document that os.path.relpath does not interrogate the file system In-Reply-To: <1373141672.93.0.461698296017.issue18389@psf.upfronthosting.co.za> Message-ID: <1373386520.19.0.667351390426.issue18389@psf.upfronthosting.co.za> R. David Murray added the comment: That's a good point. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python resolution: rejected -> stage: committed/rejected -> needs patch status: closed -> open title: os.path.relpath gives incorrect results if start parameters is not a directory -> document that os.path.relpath does not interrogate the file system versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 18:19:52 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Jul 2013 16:19:52 +0000 Subject: [issue18397] Python with MinGW In-Reply-To: <1373227373.99.0.371478249642.issue18397@psf.upfronthosting.co.za> Message-ID: <1373386792.37.0.480020700342.issue18397@psf.upfronthosting.co.za> R. David Murray added the comment: @Martin: you are probably correct, though I think there was at least one closed issue that did deal with mingw/msys build. As I recall it wasn't coherent enough to produce useful patches, but may have some clues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 18:31:14 2013 From: report at bugs.python.org (Oscar Benjamin) Date: Tue, 09 Jul 2013 16:31:14 +0000 Subject: [issue12641] Remove -mno-cygwin from distutils In-Reply-To: <1373383517.61.0.431527406195.issue12641@psf.upfronthosting.co.za> Message-ID: Oscar Benjamin added the comment: On 9 July 2013 16:25, Christian Heimes wrote: > > The is_cygwingcc() function can be simplified a lot with subprocess.check_output(). My initial thought was to do that but then I based it on _find_exe_version which for whatever reason uses Popen directly [1]. I'm happy to make that change and retest the patches although I can't do it right now. Can someone first accept or reject the general idea of the patches though? I'm happy to answer any questions about them but it takes time to get the diffs right and test against all compilers and Python versions and I don't really want to do it if the patches will just be rejected. Also I may soon lose access to the machine that I used to write and test these patches. If it is desired for me to change and retest them it may not be possible after two weeks or so. [1] http://hg.python.org/cpython/file/3f3cbfd52f94/Lib/distutils/cygwinccompiler.py#l368 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 18:36:29 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 09 Jul 2013 16:36:29 +0000 Subject: [issue12641] Remove -mno-cygwin from distutils In-Reply-To: <1311699751.35.0.569127767575.issue12641@psf.upfronthosting.co.za> Message-ID: <1373387789.81.0.0678220415003.issue12641@psf.upfronthosting.co.za> ?ric Araujo added the comment: Don?t forget that distutils is used during CPython?s build process to compile extension modules: subprocess may not be importable then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 18:39:53 2013 From: report at bugs.python.org (paul j3) Date: Tue, 09 Jul 2013 16:39:53 +0000 Subject: [issue10984] argparse add_mutually_exclusive_group should accept existing arguments to register conflicts In-Reply-To: <1295737320.83.0.942830837874.issue10984@psf.upfronthosting.co.za> Message-ID: <1373387993.63.0.844184036176.issue10984@psf.upfronthosting.co.za> paul j3 added the comment: This approach of simply adding the existing actions to the group's _group_actions works fine, at least when it comes catching the error. It may be difficult to get a useful usage line. In usage, arguments appear in the order in which they were created, optionals first, positionals after. Group notation is added if the subset of the arguments appear in its list in the same order. In the patch .rst, usage: PROG [-h] (--foo | --bar) [--baz] the foo,bar group is marked correctly; the foo,baz group is not contiguous and is omited. In bethard's example neither group will be marked (class TestMutuallyExclusiveGroupWithExistingArguments) But the problem isn't just with adding existing arguments. class TestMutuallyExclusiveOptionalsMixed illustrates this with a case where group and parser arguments overlap. In class TestMutuallyExclusiveOptionalsAndPositionalsMixed, the mix of optionals and positionals makes group marking impossible. If the groups are in order, but overlap, usage can be a confusing mix Groups ab, bc, cd, produce: [-a A | [-b B | [-c C | -d D] But if created in a different order, the usage can be: [-a A | [-b B | -c C] -d D] So there are 2 issues - if groups are not continuous or overlap, what is a meaningful usage? - any choice is likely to require a major reworking of the formatting logic. Since confusing group markings are worse than none, a first step might be to flag a group added via this patch as 'do not mark'. Also add a note to the documentation that user may need to write their own grouping instructions (in usage, description or epilog). ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 18:43:52 2013 From: report at bugs.python.org (Oscar Benjamin) Date: Tue, 09 Jul 2013 16:43:52 +0000 Subject: [issue12641] Remove -mno-cygwin from distutils In-Reply-To: <1373387789.81.0.0678220415003.issue12641@psf.upfronthosting.co.za> Message-ID: Oscar Benjamin added the comment: On 9 July 2013 17:36, ?ric Araujo wrote: > > Don?t forget that distutils is used during CPython?s build process to compile extension modules: subprocess may not be importable then. Subprocess is imported at at the top of the module in 3.x [1]. The whole distutils.cygwinccompiler module is an ImportError if subprocess is not importable. Or did you mean for 2.7 only (where get_versions() uses os.popen)? [1] http://hg.python.org/cpython/file/3f3cbfd52f94/Lib/distutils/cygwinccompiler.py#l51 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 19:17:28 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Jul 2013 17:17:28 +0000 Subject: [issue18308] checkRecvmsgAddress wrong in test_socket.py (AIX failures) In-Reply-To: <1372261030.27.0.471709034157.issue18308@psf.upfronthosting.co.za> Message-ID: <3bqVZv3sYgz7Ljc@mail.python.org> Roundup Robot added the comment: New changeset 330c7aa2922b by Charles-Fran?ois Natali in branch '3.3': Issue #18308: don't take the scope ID into account when comparing IPv6 http://hg.python.org/cpython/rev/330c7aa2922b New changeset b44749cee660 by Charles-Fran?ois Natali in branch 'default': Issue #18308: don't take the scope ID into account when comparing IPv6 http://hg.python.org/cpython/rev/b44749cee660 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 19:19:46 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 09 Jul 2013 17:19:46 +0000 Subject: [issue18308] checkRecvmsgAddress wrong in test_socket.py (AIX failures) In-Reply-To: <1372261030.27.0.471709034157.issue18308@psf.upfronthosting.co.za> Message-ID: <1373390386.37.0.120685729.issue18308@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Fixed, thanks! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 19:25:36 2013 From: report at bugs.python.org (Matthew Barnett) Date: Tue, 09 Jul 2013 17:25:36 +0000 Subject: [issue18406] unicodedata.itergraphemes / str.itergraphemes / str.graphemes In-Reply-To: <1373307945.33.0.806287270916.issue18406@psf.upfronthosting.co.za> Message-ID: <1373390736.33.0.199287811632.issue18406@psf.upfronthosting.co.za> Matthew Barnett added the comment: This is basically what the regex module does, written in Python: def get_grapheme_cluster_break(codepoint): """Gets the "Grapheme Cluster Break" property of a codepoint. The properties defined here: http://www.unicode.org/Public/UNIDATA/auxiliary/GraphemeBreakProperty.txt """ # The return value is one of: # # "Other" # "CR" # "LF" # "Control" # "Extend" # "Prepend" # "Regional_Indicator" # "SpacingMark" # "L" # "V" # "T" # "LV" # "LVT" ... def at_grapheme_boundary(string, index): """Checks whether the codepoint at 'index' is on a grapheme boundary. The rules are defined here: http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries """ # Break at the start and end of the text. if index <= 0 or index >= len(string): return True prop = get_grapheme_cluster_break(string[index]) prop_m1 = get_grapheme_cluster_break(string[index - 1]) # Don't break within CRLF. if prop_m1 == "CR" and prop == "LF": return False # Otherwise break before and after controls (including CR and LF). if prop_m1 in ("Control", "CR", "LF") or prop in ("Control", "CR", "LF"): return True # Don't break Hangul syllable sequences. if prop_m1 == "L" and prop in ("L", "V", "LV", "LVT"): return False if prop_m1 in ("LV", "V") and prop in ("V", "T"): return False if prop_m1 in ("LVT", "T") and prop == "T": return False # Don't break between regional indicator symbols. if (prop_m1 == "REGIONALINDICATOR" and prop == "REGIONALINDICATOR"): return False # Don't break just before Extend characters. if prop == "Extend": return False # Don't break before SpacingMarks, or after Prepend characters. if prop == "SpacingMark": return False if prop_m1 == "Prepend": return False # Otherwise, break everywhere. return True ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 20:15:20 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Tue, 09 Jul 2013 18:15:20 +0000 Subject: [issue17457] Unittest discover fails with namespace packages and builtin modules In-Reply-To: <1363608930.16.0.788491274205.issue17457@psf.upfronthosting.co.za> Message-ID: <1373393720.04.0.713252571792.issue17457@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Hello. Can I do something to move this issue forward? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 21:10:59 2013 From: report at bugs.python.org (Roumen Petrov) Date: Tue, 09 Jul 2013 19:10:59 +0000 Subject: [issue18397] Python with MinGW In-Reply-To: <1373227373.99.0.371478249642.issue18397@psf.upfronthosting.co.za> Message-ID: <1373397059.85.0.96191946092.issue18397@psf.upfronthosting.co.za> Changes by Roumen Petrov : ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 21:32:29 2013 From: report at bugs.python.org (Brett Cannon) Date: Tue, 09 Jul 2013 19:32:29 +0000 Subject: [issue18415] Normalize single/double quote usage in importlib Message-ID: <1373398349.2.0.544906164055.issue18415@psf.upfronthosting.co.za> New submission from Brett Cannon: Importlib has ended up with a mixed use of single and double quotes. Should clean it up to be consistent. ---------- assignee: brett.cannon components: Library (Lib) keywords: easy messages: 192771 nosy: brett.cannon priority: low severity: normal stage: needs patch status: open title: Normalize single/double quote usage in importlib type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 22:01:47 2013 From: report at bugs.python.org (Brett Cannon) Date: Tue, 09 Jul 2013 20:01:47 +0000 Subject: [issue18416] Move to absolute file paths for module.__file__ Message-ID: <1373400107.5.0.285657244525.issue18416@psf.upfronthosting.co.za> New submission from Brett Cannon: $ touch blah.py; ./python -c "import blah; print(blah.__file__)" ./blah.py Should really change that to be an absolute path since the file's location is not accurate if you call os.chdir(). ---------- components: Interpreter Core messages: 192772 nosy: brett.cannon priority: normal severity: normal stage: test needed status: open title: Move to absolute file paths for module.__file__ type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 22:11:09 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 09 Jul 2013 20:11:09 +0000 Subject: [issue18417] urlopen() has a hidden default for its timeout argument Message-ID: <1373400669.07.0.823647394418.issue18417@psf.upfronthosting.co.za> New submission from Barry A. Warsaw: urllib.request.urlopen() takes a `timeout` argument with a default value, but the default value is "hidden" and undocumented. As implemented, the value is socket._GLOBAL_DEFAULT_TIMEOUT, but even this isn't really correct or useful. The problem comes if you are passing a set of arguments to urlopen() and want to pass in a timeout that is the same as default. Because its undocumented, you have to UTSL to figure out what the value is, and then you have to use a non-public attribute of the socket module. It would be better if urlopen() was documented to default `timeout=None` meaning "use the default timeout". The implementation should then use socket.getdefaulttimeout() when timeout=None. The documentation should also be updated. Now if you want to call urlopen() with the default values, it would just be `urlopen(..., timeout=None, ...)` ---------- messages: 192773 nosy: barry priority: normal severity: normal status: open title: urlopen() has a hidden default for its timeout argument versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 22:11:59 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 09 Jul 2013 20:11:59 +0000 Subject: [issue18417] urlopen() has a hidden default for its timeout argument In-Reply-To: <1373400669.07.0.823647394418.issue18417@psf.upfronthosting.co.za> Message-ID: <1373400719.26.0.111085133363.issue18417@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Targeting only 3.4 because, while this should no break any (reasonable ) backward compatibility, it is technically an API change and thus should not get backported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 22:12:20 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 09 Jul 2013 20:12:20 +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: <1373400740.12.0.687673351333.issue18416@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 22:13:17 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2013 20:13:17 +0000 Subject: [issue18415] Normalize single/double quote usage in importlib In-Reply-To: <1373398349.2.0.544906164055.issue18415@psf.upfronthosting.co.za> Message-ID: <1373400797.35.0.605636722938.issue18415@psf.upfronthosting.co.za> STINNER Victor added the comment: Do you mean in .c and .py files, or in error messages? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 22:14:29 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 09 Jul 2013 20:14:29 +0000 Subject: [issue18415] Normalize single/double quote usage in importlib In-Reply-To: <1373398349.2.0.544906164055.issue18415@psf.upfronthosting.co.za> Message-ID: <1373400869.13.0.299362888513.issue18415@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 22:16:54 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2013 20:16:54 +0000 Subject: [issue13788] os.closerange optimization In-Reply-To: <1326601765.34.0.310008166629.issue13788@psf.upfronthosting.co.za> Message-ID: <1373401014.89.0.582401008548.issue13788@psf.upfronthosting.co.za> STINNER Victor added the comment: FreeBSD and other OSes provide closefrom(). Why not exposing this function which is probably implemented as a single syscall? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 22:21:07 2013 From: report at bugs.python.org (Brett Cannon) Date: Tue, 09 Jul 2013 20:21:07 +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: <1373401267.23.0.192783725084.issue18416@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 22:22:37 2013 From: report at bugs.python.org (Brett Cannon) Date: Tue, 09 Jul 2013 20:22:37 +0000 Subject: [issue18415] Normalize single/double quote usage in importlib In-Reply-To: <1373398349.2.0.544906164055.issue18415@psf.upfronthosting.co.za> Message-ID: <1373401357.06.0.808784977064.issue18415@psf.upfronthosting.co.za> Brett Cannon added the comment: String constants in importlib/_bootstrap.py; pylint noticed the discrepancy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 22:52:00 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2013 20:52:00 +0000 Subject: [issue18100] socket.sendall() cannot send buffers of 2GB or more In-Reply-To: <1369918582.13.0.605373457603.issue18100@psf.upfronthosting.co.za> Message-ID: <1373403120.22.0.187923617381.issue18100@psf.upfronthosting.co.za> STINNER Victor added the comment: > ssize_t send(int socket, const void *buffer, size_t length, int flags); Oh, I didn't notice that. I hope that the result always fit in a ssize_t. If it is not the case, it is probably a bug in the kernel. An example of such bug: http://xorl.wordpress.com/2009/04/10/cve-2009-1265-linux-kernel-rosex25netrom-integer-overflows/ On Solaris, read(), send() and probably other functions return EINVAL if input length argument overflows a ssize_t. We may be extra-safe by truncating the length to PY_SSIZE_T_MAX. But I would appreciate a test on Linux and Solaris with such huge values. Which kind of socket should be used to test such buffer? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 23:02:22 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 09 Jul 2013 21:02:22 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1373403742.61.0.829285862154.issue18408@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 23:07:07 2013 From: report at bugs.python.org (Marcus Cobden) Date: Tue, 09 Jul 2013 21:07:07 +0000 Subject: [issue17558] gdb debugging python frames in optimised interpreters In-Reply-To: <1364394738.16.0.265916302461.issue17558@psf.upfronthosting.co.za> Message-ID: <1373404027.24.0.0361338427384.issue17558@psf.upfronthosting.co.za> Marcus Cobden added the comment: Is there anyone who could take a look at this? I'd rather it not bit-rot into oblivion. I know the code quality is rather poor, but I can fix that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 00:05:15 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 09 Jul 2013 22:05:15 +0000 Subject: [issue18414] random.choices(seq, k) In-Reply-To: <1373375485.67.0.76143166278.issue18414@psf.upfronthosting.co.za> Message-ID: <1373407515.3.0.282190283045.issue18414@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 00:13:50 2013 From: report at bugs.python.org (A. Jesse Jiryu Davis) Date: Tue, 09 Jul 2013 22:13:50 +0000 Subject: [issue18418] Thread.isAlive() sometimes True after fork Message-ID: <1373408030.66.0.77258289483.issue18418@psf.upfronthosting.co.za> New submission from A. Jesse Jiryu Davis: In threading.Thread.__bootstrap_inner(), the thread sets self.__started before adding itself to the _active collection. If a different thread forks between these two operations, we're left with a thread that believes it's alive although it isn't. _after_fork() doesn't call __stop() on this thread because the thread isn't in _active. In the attached patch, Thread adds itself to _active before setting self.__started. This way, if it's interrupted by a fork, it may end up stopped without being started, rather than the reverse. In this case isAlive() correctly returns False. One concern about the patch: my new test in test_threading.py only reveals the bug in Python 2.7.5 very occasionally. I don't know how to force the test to fail more frequently. Looking at the threading.py on the 3.3 branch, it appears to have the same bug, but I can't reproduce it there, only on the 2.7 branch. ---------- components: Library (Lib) files: fix_is_alive_and_fork.patch keywords: patch messages: 192780 nosy: emptysquare priority: normal severity: normal status: open title: Thread.isAlive() sometimes True after fork versions: Python 2.7 Added file: http://bugs.python.org/file30880/fix_is_alive_and_fork.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 01:02:29 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Jul 2013 23:02:29 +0000 Subject: [issue18414] random.choices(seq, k) In-Reply-To: <1373375485.67.0.76143166278.issue18414@psf.upfronthosting.co.za> Message-ID: <1373410949.14.0.0649495650674.issue18414@psf.upfronthosting.co.za> Antoine Pitrou added the comment: How about [random.choice(seq) for i in range(k)]? Isn't it obvious enough? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 01:03:08 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Jul 2013 23:03:08 +0000 Subject: [issue18418] Thread.isAlive() sometimes True after fork In-Reply-To: <1373408030.66.0.77258289483.issue18418@psf.upfronthosting.co.za> Message-ID: <1373410988.06.0.370207946179.issue18418@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +gregory.p.smith, sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 01:17:19 2013 From: report at bugs.python.org (Georgiy Treyvus) Date: Tue, 09 Jul 2013 23:17:19 +0000 Subject: [issue18419] For reasons I can't explain Python in some cases says that getstatusoutput is not an attribute of the commands module but it is and should be Message-ID: <1373411839.5.0.624696172952.issue18419@psf.upfronthosting.co.za> New submission from Georgiy Treyvus: Basically in a lot of situations in recent times I've had to make sure a bunch of files are all the same. Now diff is great but it only lets me pass two files. diff3 and sdiff also aren't what I'm looking for. So I decided to write my own little script that does that. I was doing a few crude preliminary tests on an early version of the utility and that's when shit hit the fan. For reasons I can't explain Python 2.7.5 in some circumstances said that getstatusoutput wasn't an attribute of the commands module. The program executed fine though under Python 3.3.2. Anyway here's some shell output which will leave you folks scratching your head as much as I am. I have several times checked the syntax and I just simply don't think I'm doing anything wrong. What are your thoughts? =======SHELL OUTPUT======= [georgiy at PANTHER mess]$ python Python 2.7.5 (default, May 16 2013, 13:44:12) [GCC 4.8.0 20130412 (Red Hat 4.8.0-2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import commands as run >>> run.getstatusoutput >>> [georgiy at PANTHER mess]$ python3 Python 3.3.2 (default, May 20 2013, 12:05:55) [GCC 4.8.0 20130412 (Red Hat 4.8.0-2)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import subprocess as run >>> run.getstatusoutput >>> [georgiy at PANTHER mess]$ cat allthesame.py import sys if sys.version_info==2: import commands as run else: import subprocess as run baseCommand='diff --recursive '+sys.argv[1]+' ' for item in sys.argv[2:]: if run.getstatusoutput(baseCommand+item)[0]!=0: print('not all the same') exit(1) print('all the same') exit(0) [georgiy at PANTHER mess]$ cat a test [georgiy at PANTHER mess]$ cat b test [georgiy at PANTHER mess]$ python allthesame.py a b Traceback (most recent call last): File "allthesame.py", line 8, in if run.getstatusoutput(baseCommand+item)[0]!=0: AttributeError: 'module' object has no attribute 'getstatusoutput' [georgiy at PANTHER mess]$ python3 allthesame.py a b all the same ---------- messages: 192782 nosy: wfatp priority: normal severity: normal status: open title: For reasons I can't explain Python in some cases says that getstatusoutput is not an attribute of the commands module but it is and should be versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 01:19:54 2013 From: report at bugs.python.org (Dun Peal) Date: Tue, 09 Jul 2013 23:19:54 +0000 Subject: [issue18420] os.rename FileNotFound complaining about dst, but it is src which is missing Message-ID: <1373411994.05.0.758918475108.issue18420@psf.upfronthosting.co.za> New submission from Dun Peal: # The following reproduction is running on Ubuntu 13.04, Python 3.3.1: $ ls bar $ python3 -c "import os; os.rename('foo', 'bar')" Traceback (most recent call last): File "", line 1, in FileNotFoundError: [Errno 2] No such file or directory: 'bar' ---------- components: Library (Lib) messages: 192783 nosy: Dun.Peal priority: normal severity: normal status: open title: os.rename FileNotFound complaining about dst, but it is src which is missing versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 01:29:23 2013 From: report at bugs.python.org (Michael Dickens) Date: Tue, 09 Jul 2013 23:29:23 +0000 Subject: [issue18338] python --version should send output to STDOUT In-Reply-To: <1372676487.3.0.302989276182.issue18338@psf.upfronthosting.co.za> Message-ID: <1373412563.41.0.290727516462.issue18338@psf.upfronthosting.co.za> Michael Dickens added the comment: Patch for issue 18338. Changes output for --version and updates unit test accordingly. ---------- nosy: +MTGandP Added file: http://bugs.python.org/file30881/issue18338.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 01:31:10 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 09 Jul 2013 23:31:10 +0000 Subject: [issue18419] For reasons I can't explain Python in some cases says that getstatusoutput is not an attribute of the commands module but it is and should be In-Reply-To: <1373411839.5.0.624696172952.issue18419@psf.upfronthosting.co.za> Message-ID: <1373412670.41.0.477601549756.issue18419@psf.upfronthosting.co.za> Ezio Melotti added the comment: That's because subprocess.getstatusoutput exists only in Python 3, and not Python 2.7. The "if sys.version_info==2:" is also wrong, so subprocess is always selected, resulting in an error when the program is run with Python 2. ---------- components: +Library (Lib) nosy: +ezio.melotti resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 01:57:33 2013 From: report at bugs.python.org (Michael Dickens) Date: Tue, 09 Jul 2013 23:57:33 +0000 Subject: [issue16665] doc for builtin hex() is poor In-Reply-To: <1355257997.08.0.0348964643873.issue16665@psf.upfronthosting.co.za> Message-ID: <1373414253.49.0.114017658558.issue16665@psf.upfronthosting.co.za> Michael Dickens added the comment: I used the wording suggested by rurpy with some changes. I also added a few examples. ---------- keywords: +patch nosy: +MTGandP Added file: http://bugs.python.org/file30882/issue16665.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 03:03:23 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 10 Jul 2013 01:03:23 +0000 Subject: [issue16665] doc for builtin hex() is poor In-Reply-To: <1355257997.08.0.0348964643873.issue16665@psf.upfronthosting.co.za> Message-ID: <1373418203.52.0.398766207712.issue16665@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Personally, I think this is overkill. Can you capture the essence of what you want to say in something short and sweet that gets to the point? We're not looking for a complete spec. You just need to say basically what the function does. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 03:23:25 2013 From: report at bugs.python.org (Georgiy Treyvus) Date: Wed, 10 Jul 2013 01:23:25 +0000 Subject: [issue18419] For reasons I can't explain Python in some cases says that getstatusoutput is not an attribute of the commands module but it is and should be In-Reply-To: <1373411839.5.0.624696172952.issue18419@psf.upfronthosting.co.za> Message-ID: <1373419405.01.0.836433940062.issue18419@psf.upfronthosting.co.za> Georgiy Treyvus added the comment: I realized my mistake too late. It should have been if sys.version_info[0]==2: On the other hand if sys.version_info==2: while syntactically correct wasn't semantically correct. My apologies for wasting your time and for my stupidity. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 03:40:21 2013 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Jul 2013 01:40:21 +0000 Subject: [issue18420] os.rename FileNotFound complaining about dst, but it is src which is missing In-Reply-To: <1373411994.05.0.758918475108.issue18420@psf.upfronthosting.co.za> Message-ID: <1373420421.12.0.0387165504343.issue18420@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the report. This problem is being tracked in Issue16074. ---------- nosy: +ned.deily resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> bad error message in os.rename _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 05:26:06 2013 From: report at bugs.python.org (Roy Ivy III) Date: Wed, 10 Jul 2013 03:26:06 +0000 Subject: [issue12641] Remove -mno-cygwin from distutils In-Reply-To: <1311699751.35.0.569127767575.issue12641@psf.upfronthosting.co.za> Message-ID: <1373426766.06.0.99173226823.issue12641@psf.upfronthosting.co.za> Changes by Roy Ivy III : ---------- nosy: +rivy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 07:47:22 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2013 05:47:22 +0000 Subject: [issue18411] signal.SIGINT in windows cause process exit directly. In-Reply-To: <1373351551.46.0.691420854499.issue18411@psf.upfronthosting.co.za> Message-ID: <1373435242.27.0.538597580662.issue18411@psf.upfronthosting.co.za> R. David Murray added the comment: Windows doesn't support posix signals, sending one just kills the process, as you have observed. See the documentation for the os.kill function. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 07:53:54 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2013 05:53:54 +0000 Subject: [issue18417] urlopen() has a hidden default for its timeout argument In-Reply-To: <1373400669.07.0.823647394418.issue18417@psf.upfronthosting.co.za> Message-ID: <1373435634.94.0.529444790048.issue18417@psf.upfronthosting.co.za> R. David Murray added the comment: Please see issue 14425 and then let us know if this is still valid. It's been a while since I looked at the code and I no longer remember the details, but I seemed confident in my conclusion at the time... :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 08:34:19 2013 From: report at bugs.python.org (Indra Talip) Date: Wed, 10 Jul 2013 06:34:19 +0000 Subject: [issue4079] new urllib2.Request 'timeout' attribute needs to have a default In-Reply-To: <1223490599.12.0.198174561396.issue4079@psf.upfronthosting.co.za> Message-ID: <1373438059.84.0.699864527742.issue4079@psf.upfronthosting.co.za> Changes by Indra Talip : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 09:49:10 2013 From: report at bugs.python.org (Michael Foord) Date: Wed, 10 Jul 2013 07:49:10 +0000 Subject: [issue17457] Unittest discover fails with namespace packages and builtin modules In-Reply-To: <1363608930.16.0.788491274205.issue17457@psf.upfronthosting.co.za> Message-ID: <1373442550.66.0.405215685922.issue17457@psf.upfronthosting.co.za> Michael Foord added the comment: I'd like to review this properly before committing it. I agree it solves a real problem and your new patch looks good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 11:59:06 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 10 Jul 2013 09:59:06 +0000 Subject: [issue6742] Embedding python into shared library crash on AIX In-Reply-To: <1250775122.87.0.638132535261.issue6742@psf.upfronthosting.co.za> Message-ID: <1373450346.43.0.992961159614.issue6742@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- status: open -> languishing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 12:04:57 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 10 Jul 2013 10:04:57 +0000 Subject: [issue15859] PyUnicode_EncodeFSDefault win32 inconsistancy. In-Reply-To: <1346736283.51.0.0156916220677.issue15859@psf.upfronthosting.co.za> Message-ID: <1373450697.53.0.186792300814.issue15859@psf.upfronthosting.co.za> Christian Heimes added the comment: The code has changed considerable since you have created the patch. Is this still an issue for Python 3.3? ---------- nosy: +christian.heimes status: open -> languishing versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 12:14:10 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 10 Jul 2013 10:14:10 +0000 Subject: [issue2123] ctypes pointer not always keeping target alive In-Reply-To: <1203085504.98.0.560350426708.issue2123@psf.upfronthosting.co.za> Message-ID: <1373451250.61.0.541224977739.issue2123@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- status: open -> languishing versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 12:57:01 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 10 Jul 2013 10:57:01 +0000 Subject: [issue18352] collections.Counter with added attributes are not deepcopied properly. In-Reply-To: <1372862605.72.0.11799816843.issue18352@psf.upfronthosting.co.za> Message-ID: <1373453821.36.0.883193750283.issue18352@psf.upfronthosting.co.za> Vajrasky Kok added the comment: The question is whether we should give the freedom to user to add dynamic attribute to Counter object. Is this freedom has any practicality? Why do we want to add dynamic attributes to Counter object? Decimal object does not have this freedom. >>> from decimal import Decimal >>> z = Decimal('1.0') >>> z.foo = 'a' Traceback (most recent call last): File "", line 1, in AttributeError: 'decimal.Decimal' object has no attribute 'foo' Actually I am not really sure about this. Maybe someone knows the answer. ---------- nosy: +vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 13:28:34 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jul 2013 11:28:34 +0000 Subject: [issue15859] PyUnicode_EncodeFSDefault win32 inconsistancy. In-Reply-To: <1346736283.51.0.0156916220677.issue15859@psf.upfronthosting.co.za> Message-ID: <1373455714.37.0.149834941866.issue15859@psf.upfronthosting.co.za> STINNER Victor added the comment: > Is this still an issue for Python 3.3? Yes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 13:45:56 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Jul 2013 11:45:56 +0000 Subject: [issue18421] Refactor call_with_frame() function of pyexpat.c Message-ID: <1373456756.74.0.870039145452.issue18421@psf.upfronthosting.co.za> New submission from STINNER Victor: Modules/pyexpat.c contains a call_with_frame() function which uses many low-level attributes like tstate->c_profilefunc. I don't think that pyexpat.c is the best place for such function, it should be moved to Python/ceval.c. Except the call to XML_StopParser(self->itself, XML_FALSE); on failure, the code doesn't look to be specific to (py)expat. ---------- components: XML messages: 192796 nosy: christian.heimes, fdrake, haypo priority: normal severity: normal status: open title: Refactor call_with_frame() function of pyexpat.c versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 14:04:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Jul 2013 12:04:13 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3bqzb012Vzz7LnW@mail.python.org> Roundup Robot added the comment: New changeset 4f730c045f5f by Victor Stinner in branch 'default': Issue #18408: Fix call_exc_trace(): if the traceback is NULL, use None when http://hg.python.org/cpython/rev/4f730c045f5f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 14:09:04 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 10 Jul 2013 12:09:04 +0000 Subject: [issue18360] Won't install. Keeps telling me DLL is missing. In-Reply-To: <1372950084.82.0.921928840895.issue18360@psf.upfronthosting.co.za> Message-ID: <1373458144.43.0.852165212538.issue18360@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I'm pretty sure the problem is the one reported in http://superuser.com/questions/478631/dll-could-not-be-run-for-msi-installers The solution/work-around is to give full access to Everyone in the Temp folder. Please report whether this works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 14:36:24 2013 From: report at bugs.python.org (andrew cooke) Date: Wed, 10 Jul 2013 12:36:24 +0000 Subject: [issue18422] is_package missing so can't use -m Message-ID: <1373459784.39.0.18734737033.issue18422@psf.upfronthosting.co.za> New submission from andrew cooke: Using python 3.3, if I try to run __main__ I see this error: Traceback (most recent call last): File "/usr/local/lib/python3.3/runpy.py", line 140, in _run_module_as_main mod_name, loader, code, fname = _get_module_details(mod_name) File "/usr/local/lib/python3.3/runpy.py", line 105, in _get_module_details if loader.is_package(mod_name): AttributeError: 'NamespaceLoader' object has no attribute 'is_package' My directory structure is: > tree . . ??? README.md ??? src ??? ??? simplessl ??? ??? ca.py ??? ??? __main__.py ??? ??? req.py ??? ??? utils.py ??? ssl.iml i assume this is related to http://bugs.python.org/issue18058 but don't understand why this is not a bugfix that can be back-ported. this appears to be a bug to me... ---------- components: Installation messages: 192799 nosy: acooke priority: normal severity: normal status: open title: is_package missing so can't use -m versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 14:37:15 2013 From: report at bugs.python.org (Jeremy Kloth) Date: Wed, 10 Jul 2013 12:37:15 +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: <1373459835.37.0.706466604662.issue15792@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Just to note that, as it stands, these wrongly assigned options account for 28 of the 216 warnings (or 13%) currently emitted. This is just one easy step towards a warning-free 64-bit Windows build. It would be nice to get Win64 to be one of the warning-free platforms (see msg63893 of issue1616). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 14:37:47 2013 From: report at bugs.python.org (andrew cooke) Date: Wed, 10 Jul 2013 12:37:47 +0000 Subject: [issue18422] is_package missing so can't use -m In-Reply-To: <1373459784.39.0.18734737033.issue18422@psf.upfronthosting.co.za> Message-ID: <1373459867.98.0.311376099031.issue18422@psf.upfronthosting.co.za> andrew cooke added the comment: can't see how to edit posts, so adding as a comment, this is what triggers the bug: > PYTHONPATH=src python -m simplessl ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 14:41:12 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 10 Jul 2013 12:41:12 +0000 Subject: [issue18422] is_package missing so can't use -m In-Reply-To: <1373459784.39.0.18734737033.issue18422@psf.upfronthosting.co.za> Message-ID: <1373460072.21.0.997957868945.issue18422@psf.upfronthosting.co.za> Christian Heimes added the comment: You can't edit posts. :) I was going to ask how you are running __main__ but you were faster than me. ---------- assignee: -> brett.cannon nosy: +brett.cannon, christian.heimes type: -> behavior versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 14:52:41 2013 From: report at bugs.python.org (Brett Cannon) Date: Wed, 10 Jul 2013 12:52:41 +0000 Subject: [issue18422] is_package missing so can't use -m In-Reply-To: <1373459784.39.0.18734737033.issue18422@psf.upfronthosting.co.za> Message-ID: <1373460761.56.0.788632498019.issue18422@psf.upfronthosting.co.za> Brett Cannon added the comment: The solution from issue #18058 can't be backported because it would expose a new public API on the NamespaceLoader class. It would also introduce new functionality which would differ between Python 3.3.2 and Python 3.3.3 which can't really be classified as a bugfix since it's new functionality that didn't exist previously. You're also not losing any abilities by not having this in Python 3.3. All it means is that the status quo holds compared to Python 3.2 in that normal packages are the only way to execute a package with __main__ defined, while Python 3.4 gains the ability to also support namespace packages. Because of all of these points, I'm closing this issue as rejected (sorry; I know it would be handy to have but I just can't justify it). ---------- components: +Library (Lib) -Installation dependencies: +Define is_package for NamespaceLoader resolution: -> rejected status: open -> closed versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 14:58:32 2013 From: report at bugs.python.org (andrew cooke) Date: Wed, 10 Jul 2013 12:58:32 +0000 Subject: [issue18423] Document limitations on -m Message-ID: <1373461112.24.0.280779659137.issue18423@psf.upfronthosting.co.za> New submission from andrew cooke: Apparently the limited support for -m is standard behaviour - see http://bugs.python.org/issue18422 - but it's not documented at http://docs.python.org/3/using/cmdline.html#cmdoption-m That should say, somewhere, that it only applies to leaf modules and packages. ---------- assignee: docs at python components: Documentation messages: 192804 nosy: acooke, docs at python priority: normal severity: normal status: open title: Document limitations on -m _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 15:11:34 2013 From: report at bugs.python.org (Marco Buttu) Date: Wed, 10 Jul 2013 13:11:34 +0000 Subject: [issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation Message-ID: <1373461894.57.0.746181395812.issue18424@psf.upfronthosting.co.za> New submission from Marco Buttu: The documentaion of sum(): Returns the sum of a sequence of numbers (NOT strings) plus the value of parameter 'start' (which defaults to 0). When the sequence is empty, returns start. A. According to the PEP-8 it should be: "Return the sum...", and "When the sequence is empty, return start.", like the other docs. For instance: >>> print(len.__doc__) len(object) -> integer Return the number of items of a sequence or mapping. B. When the second argument is a tuple or a list, you can add sequences of sequences: >>> sum([['a', 'b', 'c'], [4]], []) ['a', 'b', 'c', 4] >>> sum(((1, 2, 3), (1,)), (1,)) (1, 1, 2, 3, 1) C. sum() takes not just sequences: >>> sum({1: 'one', 2: 'two'}) 3 Maybe it is not a good idea to give a complete description of sum() in the docstring, but perhaps something "good enough". In any case, I think the lack of the PEP-8 recommendation should be fixed. ---------- assignee: docs at python components: Documentation messages: 192805 nosy: docs at python, marco.buttu priority: normal severity: normal status: open title: sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 15:16:42 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 10 Jul 2013 13:16:42 +0000 Subject: [issue18422] is_package missing so can't use -m In-Reply-To: <1373459784.39.0.18734737033.issue18422@psf.upfronthosting.co.za> Message-ID: <1373462202.2.0.436964585327.issue18422@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 15:33:31 2013 From: report at bugs.python.org (Jeremy Kloth) Date: Wed, 10 Jul 2013 13:33:31 +0000 Subject: [issue18407] Fix compiler warnings in pythoncore for Win64 In-Reply-To: <1373310575.24.0.067873985204.issue18407@psf.upfronthosting.co.za> Message-ID: <1373463211.0.0.502555674301.issue18407@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Added new patch that removes the duplicate changes from issue #15792 and comments the lone explicit cast. These changes fix 116 of the 216 warnings (54%!) for Win64. Together with issue #15792 brings the remaining count to 72. I am unsure if splitting the changes further makes much sense as guidance I have received on IRC and as others have noted in various bug reports about "spamming" the tracker with issues per file. With that and MvL's comment in issue #18295, I do not think that it is advisable to separate out changes for that issue. ---------- Added file: http://bugs.python.org/file30883/issue18407-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 15:38:05 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2013 13:38:05 +0000 Subject: [issue18417] urlopen() has a hidden default for its timeout argument In-Reply-To: <1373400669.07.0.823647394418.issue18417@psf.upfronthosting.co.za> Message-ID: <1373463485.28.0.459176903128.issue18417@psf.upfronthosting.co.za> R. David Murray added the comment: See also issue 4079, if you are concerned about timeouts in urllib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 15:51:38 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2013 13:51:38 +0000 Subject: [issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation In-Reply-To: <1373461894.57.0.746181395812.issue18424@psf.upfronthosting.co.za> Message-ID: <1373464298.57.0.246847948522.issue18424@psf.upfronthosting.co.za> R. David Murray added the comment: Perhaps we could add something like "Also works, though possibly inefficiently, on any iterable whose elements support addition". The biggest part of the sphinx docs for this are about what to use instead, and that doesn't really seem appropriate for a docstring. So it may indeed be best to just not mention it in the docstring. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 15:52:11 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2013 13:52:11 +0000 Subject: [issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation In-Reply-To: <1373461894.57.0.746181395812.issue18424@psf.upfronthosting.co.za> Message-ID: <1373464331.4.0.672907079161.issue18424@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- versions: +Python 3.4 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 15:54:36 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 10 Jul 2013 13:54:36 +0000 Subject: [issue18417] urlopen() has a hidden default for its timeout argument In-Reply-To: <1373435634.94.0.529444790048.issue18417@psf.upfronthosting.co.za> Message-ID: <20130710092330.50dfa6d1@anarchist> Barry A. Warsaw added the comment: On Jul 10, 2013, at 05:53 AM, R. David Murray wrote: >Please see issue 14425 and then let us know if this is still valid. It's >been a while since I looked at the code and I no longer remember the details, >but I seemed confident in my conclusion at the time... :) I'm not sure I completely understand the arguments in #14425 and #2451 which it refers to. I could be wrong, but it seems to me that these are arguing against using socket.getdefaulttimeout() in favor of the magic non-public attribute that's currently being used. While I don't like that particular aspect, it's not the real point of *this* bug. Even if socket._GLOBAL_DEFAULT_TIMEOUT is the effective default for `timeout`, I still think using that as the default value for the keyword argument is wrong, both for usability of this API and for the documentation of it. I don't see why `timeout=None` wouldn't be acceptable, but let's assume it isn't. A documented, public sentinel would be acceptable and it could either be defined as: DEFAULT_TIMEOUT = object() or DEFAULT_TIMEOUT = socket._GLOBAL_DEFAULT_TIMEOUT With the latter, the function's signature would then change to: def urlopen(url, data=None, timeout=DEFAULT_TIMEOUT, ...) and nothing functional would change. The documentation update would be much more helpful too. If it weren't for the new module attribute, it could probably even be backported. Then users of this module could do something like this: from urllib.request import DEFAULT_TIMEOUT, urlopen def my_open(url, timeout=None): my_timeout = DEFAULT_TIMEOUT if timeout is None else timeout return urlopen(url, timeout=my_timeout) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 15:57:15 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 10 Jul 2013 13:57:15 +0000 Subject: [issue18402] Finding perl64 In-Reply-To: <1373261873.64.0.61453379281.issue18402@psf.upfronthosting.co.za> Message-ID: <1373464635.53.0.0161692041711.issue18402@psf.upfronthosting.co.za> Martin v. L?wis added the comment: OTOH, perl is not a prerequisite in the first place for building Python with OpenSSL. Why do you think you need it? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 16:04:42 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 10 Jul 2013 14:04:42 +0000 Subject: [issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation In-Reply-To: <1373461894.57.0.746181395812.issue18424@psf.upfronthosting.co.za> Message-ID: <1373465082.73.0.180468151718.issue18424@psf.upfronthosting.co.za> Ronald Oussoren added the comment: There's an annoyingly long discussion about sum() on python-ideas. IMHO the documentation should mention, as it does now, that sum is intended to be used with a sequence of numbers even it does work with most objects that support the + operator (such as by implementing __add__). In particular, using sum with a sequence of lists or tuples is extremely inefficient. The fact that sum({1:'a', 2: 'b'}) works is a side effect of the how python works with sequences and IMHO doesn't have to be documented in every function that accepts a sequence as an argument. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 16:16:15 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2013 14:16:15 +0000 Subject: [issue18417] urlopen() has a hidden default for its timeout argument In-Reply-To: <1373400669.07.0.823647394418.issue18417@psf.upfronthosting.co.za> Message-ID: <1373465775.57.0.658097155032.issue18417@psf.upfronthosting.co.za> R. David Murray added the comment: OK, I reviewed the issue enough to remember: If socket.setdefaulttimeout is never called, then the default timeout is None (no timeout). Since socket.setdefaulttimeout is deprecated, the global default should always be None. Therefore, if you want to use the "default" timeout in a new application, you could pass None as the value for timeout...but of course that probably doesn't do what you want. What you *really* want to do is pass the default timeout value being used by your application, whatever that is, managed however your application/library manages it. If you are writing a library that for some reason wants to retain backward compatibility with setdefaulttimeout (and I think you probably shouldn't be), you could call getdefaulttimeout to get the current default value. Since urlopen is creating a new socket object, this should have the correct semantics. Mind, I don't claim that there can't be a better solution, I'm just trying to explain the current state of affairs as I understand it. However, aside from the ugliness of the current signature for urlopen, at the moment it seems reasonable to me :) That said, this argument is premised firmly on setdefaulttimeout being deprecated, and there is currently no indication of that in its documentation that I can see. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 16:17:31 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2013 14:17:31 +0000 Subject: [issue18417] urlopen() has a hidden default for its timeout argument In-Reply-To: <1373400669.07.0.823647394418.issue18417@psf.upfronthosting.co.za> Message-ID: <1373465851.13.0.849748002574.issue18417@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +facundobatista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 16:28:35 2013 From: report at bugs.python.org (Olivier Gagnon) Date: Wed, 10 Jul 2013 14:28:35 +0000 Subject: [issue18352] collections.Counter with added attributes are not deepcopied properly. In-Reply-To: <1372862605.72.0.11799816843.issue18352@psf.upfronthosting.co.za> Message-ID: <1373466515.3.0.121712462561.issue18352@psf.upfronthosting.co.za> Olivier Gagnon added the comment: The dictionary and the set do not give the freedom to add dynamic attributes to them. I agree that the Counter should have the same behaviour. However, this will raise the same bug when we inherit from a Counter object. >>> class mylist(list): pass ... >>> l = mylist() >>> l.foo = "bar" >>> c = copy.deepcopy(l) >>> print(c.foo) # prints bar >>> class myCounter(Counter): pass ... >>> original = myCounter() >>> original.foo = "bar" >>> c = copy.deepcopy(original) >>> c.foo Traceback (most recent call last): File "", line 1, in AttributeError: 'myCounter' object has no attribute 'foo' The reduction function should still copy every dynamic attribute of the object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 16:29:22 2013 From: report at bugs.python.org (Brett Cannon) Date: Wed, 10 Jul 2013 14:29:22 +0000 Subject: [issue18423] Document limitations on -m In-Reply-To: <1373461112.24.0.280779659137.issue18423@psf.upfronthosting.co.za> Message-ID: <1373466562.09.0.854472969625.issue18423@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- keywords: +easy stage: -> needs patch versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 16:44:41 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2013 14:44:41 +0000 Subject: [issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation In-Reply-To: <1373461894.57.0.746181395812.issue18424@psf.upfronthosting.co.za> Message-ID: <1373467481.24.0.747104617924.issue18424@psf.upfronthosting.co.za> R. David Murray added the comment: OK, so your vote is to leave the doc string alone (except for the PEP8 changes), right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 16:50:08 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 10 Jul 2013 14:50:08 +0000 Subject: [issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation In-Reply-To: <1373461894.57.0.746181395812.issue18424@psf.upfronthosting.co.za> Message-ID: <1373467808.62.0.217684828752.issue18424@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Yes, the docstring isn't meant to be exhaustive documentation. The manual is more exhaustive and, as you noted, already contains links to alternatives. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 17:13:37 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 10 Jul 2013 15:13:37 +0000 Subject: [issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation In-Reply-To: <1373461894.57.0.746181395812.issue18424@psf.upfronthosting.co.za> Message-ID: <1373469217.51.0.594992673902.issue18424@psf.upfronthosting.co.za> Ezio Melotti added the comment: Currently sum() is intended to work with numbers, explicitly forbids strings (as noted in the docstring), but also works with other types (even though it's inefficient). If we want to document this, a possible wording might be: Returns the sum of a sequence of numbers plus the value of parameter 'start' (which defaults to 0). When the sequence is empty, returns start. Using sum() with a sequence of strings is not allowed, and might be inefficient with sequences of other types. We should also consider that the implementation/behavior might change in future, but we can always update the docstring again. +1 on the PEP 8 changes. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 17:17:15 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 10 Jul 2013 15:17:15 +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: <1373469435.18.0.115114582788.issue18416@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Isn't this because the first entry of sys.path is '' when python is started without a script? All other paths on sys.path are already absolute paths (tested with a relative path in $PYTHONPATH). If that's correct, just adding os.getcwd() instead of '' as the first entry of sys.path would fix this issue, and would also make sure that imports of modules next to the script keep working when the script uses os.chdir. The disadvantage is that some users might depend on the current behavior :-( ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 17:21:31 2013 From: report at bugs.python.org (Marco Buttu) Date: Wed, 10 Jul 2013 15:21:31 +0000 Subject: [issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation In-Reply-To: <1373461894.57.0.746181395812.issue18424@psf.upfronthosting.co.za> Message-ID: <1373469691.51.0.592655347063.issue18424@psf.upfronthosting.co.za> Marco Buttu added the comment: By reading the Ronald's comment, I realized it is better to keep it simple, so I agree with him. The "extremely inefficient" reason seems to be less important (Python 3.3): $ python -m timeit -s "a=['a']*10000; b=['b']*10000; a+b" 100000000 loops, best of 3: 0.00831 usec per loop $ python -m timeit -s "a=['a']*10000; b=['b']*10000; sum([a, b], [])" 100000000 loops, best of 3: 0.0087 usec per loop ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 17:33:08 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 10 Jul 2013 15:33:08 +0000 Subject: [issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation In-Reply-To: <1373461894.57.0.746181395812.issue18424@psf.upfronthosting.co.za> Message-ID: <1373470388.55.0.429274407892.issue18424@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Appending a sequence of lists with sum is inefficient because it (currently) does a lot of copying, and that gets noticable when you sum a larger number of lists Note how using sum for add 200 lists is more than twice as long as adding 100 lists: ronald at gondolin[0]$ python -m timeit -s "lists=[['a']*100 for i in range(100)]" "sum(lists, [])" 100 loops, best of 3: 2.04 msec per loop ronald at gondolin[0]$ python -m timeit -s "lists=[['a']*100 for i in range(200)]" "sum(lists, [])" 100 loops, best of 3: 9.2 msec per loop Also note how using itertools.chain is both a lot faster and behaves better: ronald at gondolin[0]$ python -m timeit -s "import itertools; lists=[['a']*100 for i in range(100)]" "list(itertools.chain.from_iterable(lists))" 10000 loops, best of 3: 165 usec per loop ronald at gondolin[0]$ python -m timeit -s "import itertools; lists=[['a']*100 for i in range(100)]" "list(itertools.chain.from_iterable(lists))" 10000 loops, best of 3: 155 usec per loop (I used python2.7 for this, the same behavior can be seem with python 3). See also #18305, which proposed a small change to how sum works which would fix the performance problems for summing a sequence of lists (before going too far and proposing to add special-case tuples and string) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 17:45:25 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 10 Jul 2013 15:45:25 +0000 Subject: [issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English In-Reply-To: <1373113143.69.0.513997485887.issue18378@psf.upfronthosting.co.za> Message-ID: <1373471125.44.0.0972808977795.issue18378@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Why do you need the "getdefaultlocale" function in the first place? I'd advise against using it, precisely because it can trigger problems like this one. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 17:47:54 2013 From: report at bugs.python.org (Dmitry Jemerov) Date: Wed, 10 Jul 2013 15:47:54 +0000 Subject: [issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English In-Reply-To: <1373113143.69.0.513997485887.issue18378@psf.upfronthosting.co.za> Message-ID: <1373471274.09.0.926846948479.issue18378@psf.upfronthosting.co.za> Dmitry Jemerov added the comment: I personally don't, but the function is used by Sphinx, which is what I was trying to get to work when I ran into this problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 17:56:37 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2013 15:56:37 +0000 Subject: [issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English In-Reply-To: <1373113143.69.0.513997485887.issue18378@psf.upfronthosting.co.za> Message-ID: <1373471797.68.0.290281286251.issue18378@psf.upfronthosting.co.za> R. David Murray added the comment: Regardless of the resolution here, the use of getdefaultlocale could be reported as a bug on the sphinx tacker. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 17:58:19 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 10 Jul 2013 15:58:19 +0000 Subject: [issue18324] set_payload does not handle binary payloads correctly In-Reply-To: <1372446982.29.0.852040030503.issue18324@psf.upfronthosting.co.za> Message-ID: <1373471899.44.0.187311041121.issue18324@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Here is the preliminary patch for email module to pass the test. ---------- nosy: +vajrasky Added file: http://bugs.python.org/file30884/set_payload_handles_binary_correctly.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 17:59:20 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Jul 2013 15:59:20 +0000 Subject: [issue18399] Fix grammar in comment in python.c In-Reply-To: <1373247824.08.0.574543056464.issue18399@psf.upfronthosting.co.za> Message-ID: <3br4pH5SR7z7LlJ@mail.python.org> Roundup Robot added the comment: New changeset c02656962b9c by R David Murray in branch '3.3': #18399: fix comment typo. http://hg.python.org/cpython/rev/c02656962b9c New changeset b583fd54c8d6 by R David Murray in branch 'default': Merge: #18399: fix comment typo. http://hg.python.org/cpython/rev/b583fd54c8d6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 18:00:15 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2013 16:00:15 +0000 Subject: [issue18399] Fix grammar in comment in python.c In-Reply-To: <1373247824.08.0.574543056464.issue18399@psf.upfronthosting.co.za> Message-ID: <1373472015.86.0.250531351915.issue18399@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Andrew. ---------- nosy: +r.david.murray resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 18:07:05 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2013 16:07:05 +0000 Subject: [issue18324] set_payload does not handle binary payloads correctly In-Reply-To: <1372446982.29.0.852040030503.issue18324@psf.upfronthosting.co.za> Message-ID: <1373472425.73.0.794889324975.issue18324@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, but the patch is incorrect. The model consistently stores its data as surrogateescaped strings, and this assumption is baked in to other parts of the code. So the correct fix is to do the surrogateescape encoding at the time the payload is set. It might in fact be better to store a binary payload as binary, but making that kind of change to the model requires much more extensive review and testing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 18:15:34 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 10 Jul 2013 16:15:34 +0000 Subject: [issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English In-Reply-To: <1373113143.69.0.513997485887.issue18378@psf.upfronthosting.co.za> Message-ID: <1373472934.85.0.65140537284.issue18378@psf.upfronthosting.co.za> Martin v. L?wis added the comment: FWIW, I couldn't find any use of getdefaultlocale in any of the hg revisions (using hg grep) in https://bitbucket.org/birkenfeld/sphinx/ Instead, it's (probably) docutils, which has this code: locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1] # locale.getpreferredencoding([do_setlocale=True|False]) # has side-effects | might return a wrong guess. # (cf. Update 1 in http://stackoverflow.com/questions/4082645/using-python-2-xs-locale-module-to-format-numbers-and-currency) I find that quite unfortunate, since locale.getpreferredencoding() would have don the right thing (IMO). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 18:31:16 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 10 Jul 2013 16:31:16 +0000 Subject: [issue18324] set_payload does not handle binary payloads correctly In-Reply-To: <1372446982.29.0.852040030503.issue18324@psf.upfronthosting.co.za> Message-ID: <1373473876.53.0.610065611266.issue18324@psf.upfronthosting.co.za> Vajrasky Kok added the comment: I see. Thanks for the explanation. I'll do this patch if nobody is interested. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 18:42:01 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2013 16:42:01 +0000 Subject: [issue18324] set_payload does not handle binary payloads correctly In-Reply-To: <1372446982.29.0.852040030503.issue18324@psf.upfronthosting.co.za> Message-ID: <1373474521.15.0.399010274548.issue18324@psf.upfronthosting.co.za> R. David Murray added the comment: If you want to work on it that would be great. Note that one of the things that is needed is a bunch more tests of setting various *kinds* of binary payload, including ones containing non-ascii data, and making sure the right thing happens when the payload is later fetched/serialized. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 20:47:47 2013 From: report at bugs.python.org (Brett Cannon) Date: Wed, 10 Jul 2013 18:47:47 +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: <1373482067.19.0.85135155571.issue18416@psf.upfronthosting.co.za> Brett Cannon added the comment: That's exactly why it currently happens. What I would do is change importlib to just associate '' with os.getcwd() in FileFinder. That locks down where the module was found to an absolute path while still allowing '' to function as the cwd and be dynamically calculated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 21:09:54 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 Jul 2013 19:09:54 +0000 Subject: [issue12733] Request for grapheme support in Python re lib In-Reply-To: <1313092793.79.0.645060327577.issue12733@psf.upfronthosting.co.za> Message-ID: <1373483394.61.0.341817842502.issue12733@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 21:10:17 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 Jul 2013 19:10:17 +0000 Subject: [issue12734] Request for property support in Python re lib In-Reply-To: <1313093654.08.0.307115391635.issue12734@psf.upfronthosting.co.za> Message-ID: <1373483417.36.0.0965299651849.issue12734@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 21:10:35 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 Jul 2013 19:10:35 +0000 Subject: [issue12735] request full Unicode collation support in std python library In-Reply-To: <1313093897.54.0.111250936422.issue12735@psf.upfronthosting.co.za> Message-ID: <1373483435.95.0.665660475361.issue12735@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 21:11:02 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 Jul 2013 19:11:02 +0000 Subject: [issue12731] python lib re uses obsolete sense of \w in full violation of UTS#18 RL1.2a In-Reply-To: <1313090311.62.0.0473644856742.issue12731@psf.upfronthosting.co.za> Message-ID: <1373483462.54.0.320215872549.issue12731@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 21:12:44 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 Jul 2013 19:12:44 +0000 Subject: [issue12728] Python re lib fails case insensitive matches on Unicode data In-Reply-To: <1313088501.39.0.822875623158.issue12728@psf.upfronthosting.co.za> Message-ID: <1373483564.37.0.925848519305.issue12728@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 22:23:47 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Jul 2013 20:23:47 +0000 Subject: [issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation In-Reply-To: <1373461894.57.0.746181395812.issue18424@psf.upfronthosting.co.za> Message-ID: <3brBgQ2cF8z7Ljk@mail.python.org> Roundup Robot added the comment: New changeset 4b3b87719e2c by R David Murray in branch '3.3': #18424: PEP8ify the tense of the sum docstring. http://hg.python.org/cpython/rev/4b3b87719e2c New changeset 38b42ffdf86b by R David Murray in branch 'default': Merge: #18424: PEP8ify the tense of the sum docstring. http://hg.python.org/cpython/rev/38b42ffdf86b New changeset c5f5b5e89a94 by R David Murray in branch '2.7': #18424: PEP8ify the tense of the sum docstring. http://hg.python.org/cpython/rev/c5f5b5e89a94 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 22:24:50 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2013 20:24:50 +0000 Subject: [issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation In-Reply-To: <1373461894.57.0.746181395812.issue18424@psf.upfronthosting.co.za> Message-ID: <1373487890.34.0.996063703265.issue18424@psf.upfronthosting.co.za> R. David Murray added the comment: Ok, pep8 changes committed. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 22:26:45 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2013 20:26:45 +0000 Subject: [issue4079] new urllib2.Request 'timeout' attribute needs to have a default In-Reply-To: <1223490599.12.0.198174561396.issue4079@psf.upfronthosting.co.za> Message-ID: <1373488005.51.0.616274688321.issue4079@psf.upfronthosting.co.za> R. David Murray added the comment: Now we need a test :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 22:32:55 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2013 20:32:55 +0000 Subject: [issue12681] unittest expectedFailure could take a message argument like skip does In-Reply-To: <1312285316.59.0.648531105022.issue12681@psf.upfronthosting.co.za> Message-ID: <1373488375.34.0.19219924437.issue12681@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Adam. I'm afraid it may be a while before Michael (or anyone else) gets a chance to review it and think about the issue some more. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 22:41:58 2013 From: report at bugs.python.org (Walter Prins) Date: Wed, 10 Jul 2013 20:41:58 +0000 Subject: [issue18382] multiprocessing's overlapped PipeConnection issues on Windows 8 In-Reply-To: <1373378080.02.0.728362783646.issue18382@psf.upfronthosting.co.za> Message-ID: Walter Prins added the comment: What's the process for volunteering a buildbot? Email python-dev? I *might* volunteer to set one up... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 23:10:44 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Jul 2013 21:10:44 +0000 Subject: [issue18116] getpass.unix_getpass() always fallback to sys.stdin In-Reply-To: <1370130607.39.0.486408621645.issue18116@psf.upfronthosting.co.za> Message-ID: <3brCjZ5yxHz7Ljg@mail.python.org> Roundup Robot added the comment: New changeset 70f55dc9d43f by R David Murray in branch 'default': #18116: getpass no longer always falls back to stdin. http://hg.python.org/cpython/rev/70f55dc9d43f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 23:13:57 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2013 21:13:57 +0000 Subject: [issue18116] getpass.unix_getpass() always fallback to sys.stdin In-Reply-To: <1370130607.39.0.486408621645.issue18116@psf.upfronthosting.co.za> Message-ID: <1373490837.91.0.709112027743.issue18116@psf.upfronthosting.co.za> R. David Murray added the comment: I played around with this for a bit, but I couldn't come up with any test improvements, or any way to test the bug that is being fixed. So I just committed it as is. Thanks, Serhiy. And thanks Vajrasky for giving it a try and figuring out some of the stuff that *doesn't* work as a fix :) I decided to only commit this to 3.4. I don't think the risk of an unexpected behavior change in a maintenance release is worth the relatively small benefit that this fix provides. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 23:32:05 2013 From: report at bugs.python.org (Dale Smith) Date: Wed, 10 Jul 2013 21:32:05 +0000 Subject: [issue18360] Won't install. Keeps telling me DLL is missing. In-Reply-To: <1373458144.43.0.852165212538.issue18360@psf.upfronthosting.co.za> Message-ID: <51DDD2D1.5040302@eavillage.com> Dale Smith added the comment: I got it! None of these alone actually worked. But it lead me to get it to work. I did several solutions at once. The three in combination that worked were getting this: http://www.howtogeek.com/howto/windows-vista/add-take-ownership-to-explorer-right-click-menu-in-vista then I disabled my antivirus and User Account Control in windows 7. I'll bet it was just disabling the UAC that did it though. I will find out later. I need to get back to class now that I have what I need. Thank you so much. If you do need more info or help, please feel free to ask! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 23:55:54 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 10 Jul 2013 21:55:54 +0000 Subject: [issue18305] [patch] Fast sum() for non-numbers In-Reply-To: <1372228439.5.0.789865081817.issue18305@psf.upfronthosting.co.za> Message-ID: <1373493354.67.0.942319942196.issue18305@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 00:00:03 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2013 22:00:03 +0000 Subject: [issue18382] multiprocessing's overlapped PipeConnection issues on Windows 8 In-Reply-To: <1373114737.55.0.0779572840335.issue18382@psf.upfronthosting.co.za> Message-ID: <1373493603.5.0.350073827017.issue18382@psf.upfronthosting.co.za> R. David Murray added the comment: What information there is is here: http://wiki.python.org/moin/BuildBot. Antoine Pitrou is the current buildbot "master" and will issue you a password once you are set up, if you decide to do this. You can also talk to us on the #python-dev irc channel. Windows buildbots are the trickiest to get set up and running consistently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 00:03:58 2013 From: report at bugs.python.org (R. Jayakrishnan) Date: Wed, 10 Jul 2013 22:03:58 +0000 Subject: [issue18425] IDLE Unit test for IdleHistory.py Message-ID: <1373493838.59.0.876568806243.issue18425@psf.upfronthosting.co.za> New submission from R. Jayakrishnan: Continuing the IDLE unittest framework #15392, unit test for IdleHistory.py. This test depends on mockText and uses the patch by Terry at issue #18365. Because the mockText is still about to commit, first patch http://bugs.python.org/file30865/mock_text2.diff and then use test_idlehistory.patch to run test_idlehistory. Once the mock Text get committed I will improve the patch according to. ---------- components: IDLE files: test_idlehistory.patch keywords: patch messages: 192840 nosy: JayKrish, terry.reedy priority: normal severity: normal status: open title: IDLE Unit test for IdleHistory.py type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30885/test_idlehistory.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 00:35:31 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 10 Jul 2013 22:35:31 +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: <1373495731.06.0.897739294056.issue18416@psf.upfronthosting.co.za> Nick Coghlan added the comment: Brett's plan sounds good to me. We should also check we make sure __main__.__file__ is always absolute. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 00:43:01 2013 From: report at bugs.python.org (Jim Jewett) Date: Wed, 10 Jul 2013 22:43:01 +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: <1373496181.96.0.479344441855.issue10042@psf.upfronthosting.co.za> Jim Jewett added the comment: > Since this is such an incredibly niche edge case > (the ordered comparison has to return NotImplemented > while __eq__ returns True), *and* the types are explicitly supposed to ordered, based on what is being tested > I remaining consistent with the existing behaviour > is the most important consideration. Agreed, once I consider that additional caveat. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 01:05:45 2013 From: report at bugs.python.org (andrew cooke) Date: Wed, 10 Jul 2013 23:05:45 +0000 Subject: [issue18422] is_package missing so can't use -m In-Reply-To: <1373459784.39.0.18734737033.issue18422@psf.upfronthosting.co.za> Message-ID: <1373497545.84.0.133403609408.issue18422@psf.upfronthosting.co.za> andrew cooke added the comment: in case anyone else ends up here through google... the problem described here is not related to the linked issue. it was just a missing `__init__.py` in the module (plus sucky error messages). the following works fine: . ??? README.md ??? src ??? ??? simplessl ??? ??? ca.py ??? ??? __init__.py ??? ??? __main__.py ??? ??? req.py ??? ??? utils.py ??? ssl.iml ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 01:06:29 2013 From: report at bugs.python.org (Phil Webster) Date: Wed, 10 Jul 2013 23:06:29 +0000 Subject: [issue18425] IDLE Unit test for IdleHistory.py In-Reply-To: <1373493838.59.0.876568806243.issue18425@psf.upfronthosting.co.za> Message-ID: <1373497589.34.0.213988980042.issue18425@psf.upfronthosting.co.za> Changes by Phil Webster : ---------- nosy: +philwebster _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 01:47:43 2013 From: report at bugs.python.org (Todd Rovito) Date: Wed, 10 Jul 2013 23:47:43 +0000 Subject: [issue18425] IDLE Unit test for IdleHistory.py In-Reply-To: <1373493838.59.0.876568806243.issue18425@psf.upfronthosting.co.za> Message-ID: <1373500063.35.0.388298182434.issue18425@psf.upfronthosting.co.za> Changes by Todd Rovito : ---------- nosy: +Todd.Rovito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 02:24:15 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 11 Jul 2013 00:24:15 +0000 Subject: [issue18360] Won't install. Keeps telling me DLL is missing. In-Reply-To: <1372950084.82.0.921928840895.issue18360@psf.upfronthosting.co.za> Message-ID: <1373502255.9.0.00489381682722.issue18360@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 04:58:50 2013 From: report at bugs.python.org (R. Jayakrishnan) Date: Thu, 11 Jul 2013 02:58:50 +0000 Subject: [issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default. In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1373511530.25.0.668964404231.issue17535@psf.upfronthosting.co.za> Changes by R. Jayakrishnan : ---------- nosy: +JayKrish _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 05:00:14 2013 From: report at bugs.python.org (R. Jayakrishnan) Date: Thu, 11 Jul 2013 03:00:14 +0000 Subject: [issue18365] Idle: mock Text class and test thereof In-Reply-To: <1373006946.99.0.696971871982.issue18365@psf.upfronthosting.co.za> Message-ID: <1373511614.18.0.748634009318.issue18365@psf.upfronthosting.co.za> Changes by R. Jayakrishnan : ---------- nosy: +JayKrish _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 08:33:09 2013 From: report at bugs.python.org (paul j3) Date: Thu, 11 Jul 2013 06:33:09 +0000 Subject: [issue10984] argparse add_mutually_exclusive_group should accept existing arguments to register conflicts In-Reply-To: <1295737320.83.0.942830837874.issue10984@psf.upfronthosting.co.za> Message-ID: <1373524389.8.0.949879031983.issue10984@psf.upfronthosting.co.za> paul j3 added the comment: One usage option is to make a subclass of HelpFormatter (the accepted way of customizing a formatter), and write a function that formats each group independently. For the example case, the resulting format might be: usage: PROG [-h] [-b] [-a | -c] [-a | -d] -h and -b are not part of any group. These are followed by the two groups. -a is repeated because it appears in both groups. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 08:36:51 2013 From: report at bugs.python.org (Ivan Johansen) Date: Thu, 11 Jul 2013 06:36:51 +0000 Subject: [issue18426] Crash when extension does not use PyModule_Create() Message-ID: <1373524611.25.0.726657058884.issue18426@psf.upfronthosting.co.za> New submission from Ivan Johansen: In Python/importdl.c around line 99 in the function _PyImport_LoadDynamicModule() you can find the code: def = PyModule_GetDef(m); def->m_base.m_init = p; If the module m, which is returned from a newly imported extension, is not created by PyModule_Create() but in some other way then PyModule_GetDef(m) will return NULL. The next line will then dereference a NULL pointer and crash. I suggest a check for this is added: def = PyModule_GetDef(m); if(def != NULL) def->m_base.m_init = p; ---------- messages: 192845 nosy: Padowan priority: normal severity: normal status: open title: Crash when extension does not use PyModule_Create() type: crash versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 09:10:21 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Jul 2013 07:10:21 +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: <1373526621.5.0.131030246532.issue10042@psf.upfronthosting.co.za> Raymond Hettinger added the comment: After more thought, I'm changing this to Py3.4 only. For prior versions, I'm content to document that there is no support for NotImplemented, and if that is needed, then people should write-out all six rich comparisons without using the total ordering decorator. I don't think it is a good idea to introduce the new behaviors into otherwise stable point releases. This patch is somewhat complex and has potential for bugs, unexpected behaviors, misunderstandings, and intra-version compatability issues (like the problems that occurred when True and False were added in a point release many years ago). ---------- versions: +Python 3.4 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 09:21:28 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Jul 2013 07:21:28 +0000 Subject: [issue18414] random.choices(seq, k) In-Reply-To: <1373375485.67.0.76143166278.issue18414@psf.upfronthosting.co.za> Message-ID: <1373527288.89.0.0328408828377.issue18414@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I concur with Antoine. A list comprehension is the standard, obvious idiom for making a list from repeated function calls. Putting sampling without replacement in its own method makes the operation more opaque than a plain list comprehension (which doesn't need documentation to be clear about how many calls are made, what the output type is, its relationship to random.choice, whether k can be larger than the population, etc). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 09:24:27 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Jul 2013 07:24:27 +0000 Subject: [issue11908] Weird `slice.stop or sys.maxint` In-Reply-To: <1303493846.17.0.214651551769.issue11908@psf.upfronthosting.co.za> Message-ID: <1373527467.67.0.292550329767.issue11908@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Closing for the reasons lists above. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 09:24:49 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Jul 2013 07:24:49 +0000 Subject: [issue18386] Better random number generator In-Reply-To: <1373131212.93.0.315136368245.issue18386@psf.upfronthosting.co.za> Message-ID: <1373527489.17.0.971194536925.issue18386@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 09:29:11 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Jul 2013 07:29:11 +0000 Subject: [issue1820] Enhance Object/structseq.c to match namedtuple and tuple api In-Reply-To: <1200284428.58.0.762384814897.issue1820@psf.upfronthosting.co.za> Message-ID: <1373527751.1.0.421336581791.issue1820@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Unassigning until another patch arrives that moves this forward. The basic idea is well established: Get the structseq API to match the named tuple API as much as possible. ---------- assignee: rhettinger -> components: +Extension Modules -Interpreter Core priority: normal -> low stage: -> needs patch versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 09:52:21 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Jul 2013 07:52:21 +0000 Subject: [issue11945] Adopt and document consistent semantics for handling NaN values in containers In-Reply-To: <1303962145.0.0.00759154980454.issue11945@psf.upfronthosting.co.za> Message-ID: <1373529141.66.0.145414641669.issue11945@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I think this should be closed. AFAICT it is of interest to a very tiny subset of the human species and as near as I can tell that subset doesn't include people in the numeric and statistics community (the ones who actually use NaNs as placeholders for missing values). So much code (and human reasoning) assumes that identity-implies-equality, that is would be easier to document the exception to expectation than to try to find every place in every module where the assumption is present (implicitly or explicitly). Instead, it would be better to document that distinct float('NaN') objects are never equal to one another and that identical float('NaN') objects may or may not compare equal in various implementation dependent circumstances. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:53:43 2013 From: report at bugs.python.org (=?utf-8?b?U8OpYmFzdGllbiBTYWJsw6k=?=) Date: Thu, 11 Jul 2013 08:53:43 +0000 Subject: [issue6742] Embedding python into shared library crash on AIX In-Reply-To: <1250775122.87.0.638132535261.issue6742@psf.upfronthosting.co.za> Message-ID: <1373532823.26.0.136736918158.issue6742@psf.upfronthosting.co.za> S?bastien Sabl? added the comment: This issue has been fixed as part of issue 941346 and should be closed in my opinion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 11:24:12 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Jul 2013 09:24:12 +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: <3brWzw0Wsbz7Llp@mail.python.org> Roundup Robot added the comment: New changeset 4343dfaca8e2 by Christian Heimes in branch '3.3': Issue #18426: Fix NULL pointer dereference in C extension import when http://hg.python.org/cpython/rev/4343dfaca8e2 New changeset 9fb3656b178a by Christian Heimes in branch 'default': Issue #18426: Fix NULL pointer dereference in C extension import when http://hg.python.org/cpython/rev/9fb3656b178a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 11:26:18 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 11 Jul 2013 09:26:18 +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: <1373534778.83.0.122228946008.issue18426@psf.upfronthosting.co.za> Christian Heimes added the comment: I used a slightly different patch: if (def == NULL) goto error; ---------- nosy: +christian.heimes resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: -Python 3.1, Python 3.2, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 11:32:33 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 11 Jul 2013 09:32:33 +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: <1373535153.0.0.840256567927.issue18426@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I'm not sure the fix is correct: PyModule_GetDef() can return NULL without setting an error, for example when the init function returns a regular Python module. I'm OK to require the init function to return a module created with PyModule_Create(), and fail when it's not the case. But an exception should be set. (and a unit test would help...) ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 11:32:45 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 11 Jul 2013 09:32:45 +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: <1373535165.7.0.938332152499.issue18426@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 11:40:39 2013 From: report at bugs.python.org (Tobias Marschall) Date: Thu, 11 Jul 2013 09:40:39 +0000 Subject: [issue18427] str.replace causes segfault for long strings Message-ID: <1373535639.26.0.108709359025.issue18427@psf.upfronthosting.co.za> New submission from Tobias Marschall: Running the following two lines of code causes a segfault: s = 'A' * 3142044943 t = s.replace('\n','') My setup: Python 2.7.5 (default, Jul 11 2013, 11:17:50) [GCC 4.6.3] on linux2 Linux 3.2.0-45-generic #70-Ubuntu SMP Wed May 29 20:12:06 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux I could reproduce this behavior on Python 2.6.8 and 2.5.6. Please let me know if I can provide additional information. ---------- components: Interpreter Core messages: 192855 nosy: tobiasmarschall priority: normal severity: normal status: open title: str.replace causes segfault for long strings type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 11:57:06 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 11 Jul 2013 09:57:06 +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: <1373536626.74.0.462276976204.issue18426@psf.upfronthosting.co.za> Christian Heimes added the comment: In theory you are right. m->md_def could be NULL, too. But in practice it's only going to happen when you have a faulty C extension. The code tries to load a dynamic module (ELF shared library, Windows DLL, ...) with _PyImport_GetDynLoadFunc() a couple of lines before PyModule_GetDef(). Any invalid file is rejected: >>> imp.load_dynamic("os", "Lib/os.py") Traceback (most recent call last): File "", line 1, in ImportError: Lib/os.py: invalid ELF header But an extra check doesn't hurt. How do you like this? def = PyModule_GetDef(m); if (def == NULL) { if (!PyErr_Occured()) { /* m->md_def == NULL */ PyErr_BadArgument(); } goto error; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 11:57:43 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 11 Jul 2013 09:57:43 +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: <1373536663.06.0.915734854385.issue18426@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- assignee: -> christian.heimes resolution: fixed -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 12:06:09 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Jul 2013 10:06:09 +0000 Subject: [issue18427] str.replace causes segfault for long strings In-Reply-To: <1373535639.26.0.108709359025.issue18427@psf.upfronthosting.co.za> Message-ID: <1373537169.9.0.383194994354.issue18427@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 12:14:27 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 11 Jul 2013 10:14:27 +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: <1373537667.03.0.237555037181.issue18426@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I was thinking of a message similar to the one above. The eventual exception set by PyModule_GetDef(m) is less explicit. if (def == NULL) { PyErr_Format(PyExc_SystemError, "initialization of %s did not return an extension module", shortname); goto error; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 12:20:30 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 11 Jul 2013 10:20:30 +0000 Subject: [issue18427] str.replace causes segfault for long strings In-Reply-To: <1373535639.26.0.108709359025.issue18427@psf.upfronthosting.co.za> Message-ID: <1373538030.66.0.308859278926.issue18427@psf.upfronthosting.co.za> Christian Heimes added the comment: #0 memchr () at ../sysdeps/x86_64/memchr.S:155 #1 0x0000000000467ca4 in countchar (maxcount=, c=10 '\n', target_len=-1152922353, target=0x7fff3b196034 'A' ...) at Objects/stringobject.c:2341 #2 replace_delete_single_character (maxcount=, from_c=10 '\n', self=0x7fff3b196010) at Objects/stringobject.c:2427 #3 replace (maxcount=, to_len=, to_s=, from_len=1, from_s=, self=0x7fff3b196010) at Objects/stringobject.c:2780 #4 string_replace (self=0x7fff3b196010, args=) at Objects/stringobject.c:2854 target_len=-1152922353 looks fishy. I think countchar()'s target_len argument has a wrong argument type. It should be Py_ssize_t instead of int. -countchar(const char *target, int target_len, char c, Py_ssize_t maxcount) +countchar(const char *target, Py_ssize_t target_len, char c, Py_ssize_t maxcount) ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 12:21:24 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 11 Jul 2013 10:21:24 +0000 Subject: [issue18427] str.replace causes segfault for long strings In-Reply-To: <1373535639.26.0.108709359025.issue18427@psf.upfronthosting.co.za> Message-ID: <1373538083.99.0.0404637059884.issue18427@psf.upfronthosting.co.za> Christian Heimes added the comment: PS: The test case no longer segfaults with Py_ssize_t. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 12:23:14 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 11 Jul 2013 10:23:14 +0000 Subject: [issue18414] random.choices(seq, k) In-Reply-To: <1373375485.67.0.76143166278.issue18414@psf.upfronthosting.co.za> Message-ID: <1373538194.17.0.668899255093.issue18414@psf.upfronthosting.co.za> Christian Heimes added the comment: You have convinced me. It's not worth yet another API method. ---------- resolution: -> rejected stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 12:39:30 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 11 Jul 2013 10:39:30 +0000 Subject: [issue18427] str.replace causes segfault for long strings In-Reply-To: <1373535639.26.0.108709359025.issue18427@psf.upfronthosting.co.za> Message-ID: <1373539170.66.0.693809780881.issue18427@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I agree: target_len should have type Py_ssize_t. It's probably worthwhile to check other functions as well. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 12:45:39 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 11 Jul 2013 10:45:39 +0000 Subject: [issue18427] str.replace causes segfault for long strings In-Reply-To: <1373535639.26.0.108709359025.issue18427@psf.upfronthosting.co.za> Message-ID: <1373539539.96.0.364155863838.issue18427@psf.upfronthosting.co.za> Ronald Oussoren added the comment: There is also this one in string_print: fwrite(data, 1, (int)size, fp); "size" is a Py_ssize_t variable with the length of the string, and is casted to int which looses information. The exected argument to fwrite is size_t... These two appear to be the only suspect uses of 'int' in stringobject.h. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 12:50:11 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 11 Jul 2013 10:50:11 +0000 Subject: [issue18427] str.replace causes segfault for long strings In-Reply-To: <1373535639.26.0.108709359025.issue18427@psf.upfronthosting.co.za> Message-ID: <1373539811.14.0.07228492292.issue18427@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The attached patch should fix both issues (but doesn't contain a test, not sure if its worthwhile to add a testcase that uses more than 4 GByte of memory) FWIW: the corresponding code in Objects/bytesobject.c in the 3.3 and default branches is already correct. ---------- keywords: +needs review, patch stage: -> patch review Added file: http://bugs.python.org/file30886/issue-18427-py27.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:03:47 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Jul 2013 11:03:47 +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: <3brZBp39FwzR9k@mail.python.org> Roundup Robot added the comment: New changeset fce581643cb6 by Christian Heimes in branch '3.3': Issue #18426: improve exception message. Courtesy of Amaury http://hg.python.org/cpython/rev/fce581643cb6 New changeset 7a50d3c0aa61 by Christian Heimes in branch 'default': Issue #18426: improve exception message. Courtesy of Amaury http://hg.python.org/cpython/rev/7a50d3c0aa61 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:05:31 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 11 Jul 2013 11:05:31 +0000 Subject: [issue18427] str.replace causes segfault for long strings In-Reply-To: <1373535639.26.0.108709359025.issue18427@psf.upfronthosting.co.za> Message-ID: <1373540731.8.0.441481516312.issue18427@psf.upfronthosting.co.za> Christian Heimes added the comment: LGTM! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:16:52 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 11 Jul 2013 11:16:52 +0000 Subject: [issue18427] str.replace causes segfault for long strings In-Reply-To: <1373535639.26.0.108709359025.issue18427@psf.upfronthosting.co.za> Message-ID: <1373541412.49.0.251965151405.issue18427@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Great. I'll apply after running the full testsuite, and after rebooting my machine as it doesn't really like using that much additional memory and pushed some applications to disk :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:35:28 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Jul 2013 11:35:28 +0000 Subject: [issue18427] str.replace causes segfault for long strings In-Reply-To: <1373535639.26.0.108709359025.issue18427@psf.upfronthosting.co.za> Message-ID: <3brZvM6ks3z7Lk3@mail.python.org> Roundup Robot added the comment: New changeset 2921f6c2009e by Ronald Oussoren in branch '2.7': Issue #18427: str.replace could crash the interpreter with huge strings. http://hg.python.org/cpython/rev/2921f6c2009e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:35:53 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 11 Jul 2013 11:35:53 +0000 Subject: [issue18427] str.replace causes segfault for long strings In-Reply-To: <1373535639.26.0.108709359025.issue18427@psf.upfronthosting.co.za> Message-ID: <1373542553.73.0.668590783195.issue18427@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:53:10 2013 From: report at bugs.python.org (Mike) Date: Thu, 11 Jul 2013 11:53:10 +0000 Subject: [issue18428] IDLE startup error Message-ID: <1373543590.93.0.69905828801.issue18428@psf.upfronthosting.co.za> New submission from Mike: Python used to run smoothly on my macbook, but since I opened the debugger yesterday, the IDLE window cannot be opened anymore. It shows an error message "IDLE's subprocess didn't make connection". I tried to uninstall everything and download it again from the website, but the problem is unsolved. I am using the latest OS X Mountain Lion, and installed Python 3.3.2 and the latest Tcl/Tk. Please advice me how to fix the problem. ---------- components: IDLE messages: 192868 nosy: mwei11 priority: normal severity: normal status: open title: IDLE startup error type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 14:15:25 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 11 Jul 2013 12:15:25 +0000 Subject: [issue10042] functools.total_ordering fails to handle NotImplemented correctly In-Reply-To: <1373526621.5.0.131030246532.issue10042@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Agreed. I had actually assumed this would be 3.4 only, otherwise I wouldn't have suggested using the new subtest feature in the test case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 14:43:28 2013 From: report at bugs.python.org (Ivan Johansen) Date: Thu, 11 Jul 2013 12:43:28 +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: <1373546608.63.0.933983813723.issue18426@psf.upfronthosting.co.za> Ivan Johansen added the comment: If possible it would be nice if any module could be returned from a C extension. Specifically I was trying to subclass module (PyModule_Type) and use that. But an error message is better than a crash. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 15:15:47 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Jul 2013 13:15:47 +0000 Subject: [issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default. In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1373548547.89.0.676389266466.issue17535@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 15:24:34 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 11 Jul 2013 13:24:34 +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: <1373549074.13.0.00515337662591.issue18426@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Returning another kind of module can be dangerous here, because extension modules are handled specially (see _PyImport_FixupExtensionObject), and it's not obvious what this does to normal modules. But I agree that _imp.load_dynamic() could be extended to plain modules. A bit like class/type unification. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 16:30:09 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Jul 2013 14:30:09 +0000 Subject: [issue18352] collections.Counter with added attributes are not deepcopied properly. In-Reply-To: <1372862605.72.0.11799816843.issue18352@psf.upfronthosting.co.za> Message-ID: <1373553009.54.0.19496355912.issue18352@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is an updated patch. It includes a fix for OrderedDict.copy(). Counter's copy() and __reduce__() are simplified. Added tests for OrderedDict which checks that OrderedDict copying and pickling preserves dynamic attributes. ---------- Added file: http://bugs.python.org/file30887/counter_copy_attrs_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 16:39:23 2013 From: report at bugs.python.org (Oscar Benjamin) Date: Thu, 11 Jul 2013 14:39:23 +0000 Subject: [issue18305] [patch] Fast sum() for non-numbers In-Reply-To: <1372228439.5.0.789865081817.issue18305@psf.upfronthosting.co.za> Message-ID: <1373553563.92.0.903845847464.issue18305@psf.upfronthosting.co.za> Oscar Benjamin added the comment: This "optimisation" is a semantic change. It breaks backward compatibility in cases where a = a + b and a += b do not result in the name a having the same value. In particular this breaks backward compatibility for numpy users. Numpy arrays treat += differently from + in the sense that a += b coerces b to the same dtype as a and then adds in place whereas a + b uses Python style type promotion. This behaviour is by design and it is useful. It is also entirely appropriate (unlike e.g. summing lists) that someone would use sum() to add numpy arrays. An example where + and += give different results: >>> from numpy import array >>> a1 = array([1, 2, 3], dtype=int) >>> a1 array([1, 2, 3]) >>> a2 = array([.5, .5, .5], dtype=float) >>> a2 array([ 0.5, 0.5, 0.5]) >>> a1 + a2 array([ 1.5, 2.5, 3.5]) >>> a1 += a2 >>> a1 array([1, 2, 3]) ---------- nosy: +oscarbenjamin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 17:21:56 2013 From: report at bugs.python.org (Ethan Furman) Date: Thu, 11 Jul 2013 15:21:56 +0000 Subject: [issue18305] [patch] Fast sum() for non-numbers In-Reply-To: <1372228439.5.0.789865081817.issue18305@psf.upfronthosting.co.za> Message-ID: <1373556116.73.0.0787234495794.issue18305@psf.upfronthosting.co.za> Ethan Furman added the comment: So making this a speed-up for generic objects using __iadd__ is out. The only question remaining is: is it worth special casing a few specific objects (list, tuple, str) to optimise performance? The str question has already been answered: it's special cased to raise an error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 17:33:26 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Jul 2013 15:33:26 +0000 Subject: [issue18336] codecs: Link to readline module (history) instead of fd.readline() In-Reply-To: <1372663191.71.0.440770388569.issue18336@psf.upfronthosting.co.za> Message-ID: <3brh9x6S8Jz7LjY@mail.python.org> Roundup Robot added the comment: New changeset 7e186bb1642c by Serhiy Storchaka in branch '2.7': Issue #18336. Fix a link to StreamReader's read() method. http://hg.python.org/cpython/rev/7e186bb1642c New changeset 8dd67c20cab7 by Serhiy Storchaka in branch '3.3': Issue #18336. Fix a link to StreamReader's read() method. http://hg.python.org/cpython/rev/8dd67c20cab7 New changeset a53ac166fa58 by Serhiy Storchaka in branch 'default': Issue #18336. Fix a link to StreamReader's read() method. http://hg.python.org/cpython/rev/a53ac166fa58 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 17:34:56 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Jul 2013 15:34:56 +0000 Subject: [issue18336] codecs: Link to readline module (history) instead of fd.readline() In-Reply-To: <1372663191.71.0.440770388569.issue18336@psf.upfronthosting.co.za> Message-ID: <1373556896.91.0.520615025323.issue18336@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Actually it should be a link to the read() method. ---------- resolution: -> fixed stage: needs patch -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 18:21:47 2013 From: report at bugs.python.org (Oscar Benjamin) Date: Thu, 11 Jul 2013 16:21:47 +0000 Subject: [issue12641] Remove -mno-cygwin from distutils In-Reply-To: <1373426766.11.0.102218077723.issue12641@psf.upfronthosting.co.za> Message-ID: Oscar Benjamin added the comment: I'm attaching three new patches following on from Eric and Christian's suggestions: check_mno_cywin_py27_1.patch (for Python 2.7) check_mno_cywin_py3_1.patch (for Python 3.2 and 3.3) check_mno_cywin_py34_1.patch (for Python 3.4) The py27 patch now uses os.popen to avoid importing subprocess as suggested by Eric. The other two patches are changed to use check_output as suggested by Christian (subprocess is already imported in 3.x). I've retested the patches using the same setup as before and the results are unchanged for all gcc and Python versions tested. ---------- Added file: http://bugs.python.org/file30888/check_mno_cywin_py34_1.patch Added file: http://bugs.python.org/file30889/check_mno_cywin_py3_1.patch Added file: http://bugs.python.org/file30890/check_mno_cywin_py27_1.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r 7aab60b70f90 Lib/distutils/cygwinccompiler.py --- a/Lib/distutils/cygwinccompiler.py Sun Jun 23 15:47:03 2013 -0700 +++ b/Lib/distutils/cygwinccompiler.py Thu Jul 11 16:59:27 2013 +0100 @@ -48,13 +48,14 @@ import os import sys import copy -from subprocess import Popen, PIPE +from subprocess import Popen, PIPE, check_output import re from distutils.ccompiler import gen_preprocess_options, gen_lib_options from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file -from distutils.errors import DistutilsExecError, CompileError, UnknownFileError +from distutils.errors import (DistutilsExecError, CCompilerError, + CompileError, UnknownFileError) from distutils import log from distutils.version import LooseVersion from distutils.spawn import find_executable @@ -294,11 +295,15 @@ else: entry_point = '' - self.set_executables(compiler='gcc -mno-cygwin -O -Wall', - compiler_so='gcc -mno-cygwin -mdll -O -Wall', - compiler_cxx='g++ -mno-cygwin -O -Wall', - linker_exe='gcc -mno-cygwin', - linker_so='%s -mno-cygwin %s %s' + if is_cygwingcc(): + raise CCompilerError( + 'Cygwin gcc cannot be used with --compiler=mingw32') + + self.set_executables(compiler='gcc -O -Wall', + compiler_so='gcc -mdll -O -Wall', + compiler_cxx='g++ -O -Wall', + linker_exe='gcc', + linker_so='%s %s %s' % (self.linker_dll, shared_option, entry_point)) # Maybe we should also append -mthreads, but then the finished @@ -393,3 +398,8 @@ """ commands = ['gcc -dumpversion', 'ld -v', 'dllwrap --version'] return tuple([_find_exe_version(cmd) for cmd in commands]) + +def is_cygwingcc(): + '''Try to determine if the gcc that would be used is from cygwin.''' + out_string = check_output(['gcc', '-dumpmachine']) + return out_string.strip().endswith(b'cygwin') -------------- next part -------------- diff -r 0762f2419494 Lib/distutils/cygwinccompiler.py --- a/Lib/distutils/cygwinccompiler.py Sun Jun 23 23:51:44 2013 +0200 +++ b/Lib/distutils/cygwinccompiler.py Thu Jul 11 17:05:05 2013 +0100 @@ -48,7 +48,7 @@ import os import sys import copy -from subprocess import Popen, PIPE +from subprocess import Popen, PIPE, check_output import re from distutils.ccompiler import gen_preprocess_options, gen_lib_options @@ -294,13 +294,18 @@ else: entry_point = '' - self.set_executables(compiler='gcc -mno-cygwin -O -Wall', - compiler_so='gcc -mno-cygwin -mdll -O -Wall', - compiler_cxx='g++ -mno-cygwin -O -Wall', - linker_exe='gcc -mno-cygwin', - linker_so='%s -mno-cygwin %s %s' - % (self.linker_dll, shared_option, - entry_point)) + if self.gcc_version < '4' or is_cygwingcc(): + no_cygwin = ' -mno-cygwin' + else: + no_cygwin = '' + + self.set_executables(compiler='gcc%s -O -Wall' % no_cygwin, + compiler_so='gcc%s -mdll -O -Wall' % no_cygwin, + compiler_cxx='g++%s -O -Wall' % no_cygwin, + linker_exe='gcc%s' % no_cygwin, + linker_so='%s%s %s %s' + % (self.linker_dll, no_cygwin, + shared_option, entry_point)) # Maybe we should also append -mthreads, but then the finished # dlls need another dll (mingwm10.dll see Mingw32 docs) # (-mthreads: Support thread-safe exception handling on `Mingw32') @@ -393,3 +398,8 @@ """ commands = ['gcc -dumpversion', 'ld -v', 'dllwrap --version'] return tuple([_find_exe_version(cmd) for cmd in commands]) + +def is_cygwingcc(): + '''Try to determine if the gcc that would be used is from cygwin.''' + out_string = check_output(['gcc', '-dumpmachine']) + return out_string.strip().endswith(b'cygwin') -------------- next part -------------- diff -r a7db9f505e88 Lib/distutils/cygwinccompiler.py --- a/Lib/distutils/cygwinccompiler.py Sun Jun 23 16:12:32 2013 -0400 +++ b/Lib/distutils/cygwinccompiler.py Thu Jul 11 17:15:05 2013 +0100 @@ -319,13 +319,18 @@ else: entry_point = '' - self.set_executables(compiler='gcc -mno-cygwin -O -Wall', - compiler_so='gcc -mno-cygwin -mdll -O -Wall', - compiler_cxx='g++ -mno-cygwin -O -Wall', - linker_exe='gcc -mno-cygwin', - linker_so='%s -mno-cygwin %s %s' - % (self.linker_dll, shared_option, - entry_point)) + if self.gcc_version < '4' or is_cygwingcc(): + no_cygwin = ' -mno-cygwin' + else: + no_cygwin = '' + + self.set_executables(compiler='gcc%s -O -Wall' % no_cygwin, + compiler_so='gcc%s -mdll -O -Wall' % no_cygwin, + compiler_cxx='g++%s -O -Wall' % no_cygwin, + linker_exe='gcc%s' % no_cygwin, + linker_so='%s%s %s %s' + % (self.linker_dll, no_cygwin, + shared_option, entry_point)) # Maybe we should also append -mthreads, but then the finished # dlls need another dll (mingwm10.dll see Mingw32 docs) # (-mthreads: Support thread-safe exception handling on `Mingw32') @@ -447,3 +452,10 @@ else: dllwrap_version = None return (gcc_version, ld_version, dllwrap_version) + +def is_cygwingcc(): + '''Try to determine if the gcc that would be used is from cygwin.''' + out_string = os.popen('gcc -dumpmachine').read() + # out_string is the target triplet cpu-vendor-os + # Cygwin's gcc sets the os to 'cygwin' + return out_string.strip().endswith('cygwin') From report at bugs.python.org Thu Jul 11 18:21:54 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Jul 2013 16:21:54 +0000 Subject: [issue5308] cannot marshal objects with more than 2**31 elements In-Reply-To: <1234997106.01.0.558053875674.issue5308@psf.upfronthosting.co.za> Message-ID: <3brjFs5dVLz7LlZ@mail.python.org> Roundup Robot added the comment: New changeset 1cf2c42af815 by Serhiy Storchaka in branch '2.7': Fix reference leaks introduced by the patch for issue #5308. http://hg.python.org/cpython/rev/1cf2c42af815 New changeset 8b99f2224c3a by Serhiy Storchaka in branch '3.3': Fix reference leaks introduced by the patch for issue #5308. http://hg.python.org/cpython/rev/8b99f2224c3a New changeset 19ed630d8d75 by Serhiy Storchaka in branch 'default': Fix reference leaks introduced by the patch for issue #5308. http://hg.python.org/cpython/rev/19ed630d8d75 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 18:23:08 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Jul 2013 16:23:08 +0000 Subject: [issue5308] cannot marshal objects with more than 2**31 elements In-Reply-To: <1234997106.01.0.558053875674.issue5308@psf.upfronthosting.co.za> Message-ID: <1373559788.89.0.940048036288.issue5308@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: needs patch -> commit review status: open -> pending versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 18:30:10 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Jul 2013 16:30:10 +0000 Subject: [issue17987] test.support.captured_stderr, captured_stdin not documented In-Reply-To: <1368653423.88.0.898801742943.issue17987@psf.upfronthosting.co.za> Message-ID: <3brjRP0Jh5z7Lk9@mail.python.org> Roundup Robot added the comment: New changeset af2416c2e27c by R David Murray in branch '3.3': #17987: properly document support.captured_xxx. http://hg.python.org/cpython/rev/af2416c2e27c New changeset d0f7f1996001 by R David Murray in branch 'default': Merge #17987: properly document support.captured_xxx. http://hg.python.org/cpython/rev/d0f7f1996001 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 18:30:52 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Jul 2013 16:30:52 +0000 Subject: [issue17987] test.support.captured_stderr, captured_stdin not documented In-Reply-To: <1368653423.88.0.898801742943.issue17987@psf.upfronthosting.co.za> Message-ID: <1373560252.68.0.725649349108.issue17987@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Dmi. ---------- nosy: +r.david.murray resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 19:01:56 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Jul 2013 17:01:56 +0000 Subject: [issue18338] python --version should send output to STDOUT In-Reply-To: <1372676487.3.0.302989276182.issue18338@psf.upfronthosting.co.za> Message-ID: <3brk841Np6zSgK@mail.python.org> Roundup Robot added the comment: New changeset e6384b8b2325 by Serhiy Storchaka in branch 'default': Issue #18338: `python --version` now prints version string to stdout, and http://hg.python.org/cpython/rev/e6384b8b2325 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 19:03:27 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Jul 2013 17:03:27 +0000 Subject: [issue18338] python --version should send output to STDOUT In-Reply-To: <1372676487.3.0.302989276182.issue18338@psf.upfronthosting.co.za> Message-ID: <1373562207.86.0.260813688223.issue18338@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 Thu Jul 11 19:38:37 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Jul 2013 17:38:37 +0000 Subject: [issue18101] Tk.split() doesn't work with nested Unicode strings In-Reply-To: <1369922361.42.0.622055843561.issue18101@psf.upfronthosting.co.za> Message-ID: <3brkyN67vNzSwQ@mail.python.org> Roundup Robot added the comment: New changeset f53cdd4e2689 by Serhiy Storchaka in branch '2.7': Issue #18101: Tcl.split() now process Unicode strings nested in a tuple as it http://hg.python.org/cpython/rev/f53cdd4e2689 New changeset 9486c07929a1 by Serhiy Storchaka in branch '3.3': Issue #18101: Tcl.split() now process strings nested in a tuple as it http://hg.python.org/cpython/rev/9486c07929a1 New changeset 16c48d553ddb by Serhiy Storchaka in branch 'default': Issue #18101: Tcl.split() now process strings nested in a tuple as it http://hg.python.org/cpython/rev/16c48d553ddb ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 19:54:57 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Jul 2013 17:54:57 +0000 Subject: [issue18101] Tk.split() doesn't work with nested Unicode strings In-Reply-To: <1369922361.42.0.622055843561.issue18101@psf.upfronthosting.co.za> Message-ID: <1373565297.14.0.101187055055.issue18101@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 Jul 11 19:56:12 2013 From: report at bugs.python.org (Todd Rovito) Date: Thu, 11 Jul 2013 17:56:12 +0000 Subject: [issue18429] IDLE: Format Paragraph doesn't function with comment blocks Message-ID: <1373565372.76.0.397397850212.issue18429@psf.upfronthosting.co.za> New submission from Todd Rovito: While working on a test case for Format Paragraph (http://bugs.python.org/issue18226) I noted that format paragraph doesn't work with comment blocks when a comment block is selected. The fix is very simple by changing one line: if first and last: data = text.get(first, last) comment_header = get_comment_header(data) else: The comment_header line was changed from comment_header = ''. This forces the format paragraph extension to always do "just a normal text format". Attached is a patch but I would like to explore the bug in more detail and make sure all cases are covered. ---------- messages: 192883 nosy: Todd.Rovito priority: normal severity: normal status: open title: IDLE: Format Paragraph doesn't function with comment blocks type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 19:59:07 2013 From: report at bugs.python.org (Todd Rovito) Date: Thu, 11 Jul 2013 17:59:07 +0000 Subject: [issue18429] IDLE: Format Paragraph doesn't function with comment blocks In-Reply-To: <1373565372.76.0.397397850212.issue18429@psf.upfronthosting.co.za> Message-ID: <1373565547.66.0.97529122641.issue18429@psf.upfronthosting.co.za> Changes by Todd Rovito : ---------- keywords: +patch nosy: +JayKrish, philwebster, roger.serwy, terry.reedy Added file: http://bugs.python.org/file30891/18429FormatParagraphFor3.4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 20:03:41 2013 From: report at bugs.python.org (Madison May) Date: Thu, 11 Jul 2013 18:03:41 +0000 Subject: [issue18389] document that os.path.relpath does not interrogate the file system In-Reply-To: <1373141672.93.0.461698296017.issue18389@psf.upfronthosting.co.za> Message-ID: <1373565821.25.0.694486104194.issue18389@psf.upfronthosting.co.za> Madison May added the comment: Patch for 3.4 added. I tried to keep things short and sweet. ---------- Added file: http://bugs.python.org/file30892/Issue18389_3-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 21:01:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Jul 2013 19:01:30 +0000 Subject: [issue18085] Verifying refcounts.dat In-Reply-To: <1369768958.38.0.697954786488.issue18085@psf.upfronthosting.co.za> Message-ID: <3brmp159XQzRnB@mail.python.org> Roundup Robot added the comment: New changeset ffe24e3e7a2a by Serhiy Storchaka in branch '3.3': Issue #18085: Add missed const modifier for some entries in refcounts.dat. http://hg.python.org/cpython/rev/ffe24e3e7a2a New changeset 6587fd3d89ae by Serhiy Storchaka in branch 'default': Issue #18085: Add missed const modifier for some entries in refcounts.dat. http://hg.python.org/cpython/rev/6587fd3d89ae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 21:08:32 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Jul 2013 19:08:32 +0000 Subject: [issue17944] Refactor test_zipfile In-Reply-To: <1368093470.65.0.477520947191.issue17944@psf.upfronthosting.co.za> Message-ID: <1373569712.06.0.996509938069.issue17944@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If there are no objections I'm going to commit the patch soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 21:16:43 2013 From: report at bugs.python.org (Madison May) Date: Thu, 11 Jul 2013 19:16:43 +0000 Subject: [issue18415] Normalize single/double quote usage in importlib In-Reply-To: <1373398349.2.0.544906164055.issue18415@psf.upfronthosting.co.za> Message-ID: <1373570203.63.0.719693099197.issue18415@psf.upfronthosting.co.za> Madison May added the comment: Patch using all single quotes for string literals, except for 3 cases of double quoted strings that contain single quotes (I thought it was probably preferable to escaping the single quotes). ---------- keywords: +patch nosy: +madison.may Added file: http://bugs.python.org/file30893/all_single_quotes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 21:17:32 2013 From: report at bugs.python.org (Madison May) Date: Thu, 11 Jul 2013 19:17:32 +0000 Subject: [issue18415] Normalize single/double quote usage in importlib In-Reply-To: <1373398349.2.0.544906164055.issue18415@psf.upfronthosting.co.za> Message-ID: <1373570252.07.0.505878067052.issue18415@psf.upfronthosting.co.za> Madison May added the comment: Patch using all double quotes. Take your pick :) ---------- Added file: http://bugs.python.org/file30894/all_double_quotes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 21:31:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Jul 2013 19:31:13 +0000 Subject: [issue17872] Crash in marshal.load() with bad reader In-Reply-To: <1367270952.48.0.351702678796.issue17872@psf.upfronthosting.co.za> Message-ID: <3brnSK1jhfzSwQ@mail.python.org> Roundup Robot added the comment: New changeset fc7bab8a8618 by Serhiy Storchaka in branch '3.3': Issue #17872: Fix a segfault in marshal.load() when input stream returns http://hg.python.org/cpython/rev/fc7bab8a8618 New changeset 5fa793ae36cc by Serhiy Storchaka in branch 'default': Issue #17872: Fix a segfault in marshal.load() when input stream returns http://hg.python.org/cpython/rev/5fa793ae36cc ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 21:34:01 2013 From: report at bugs.python.org (Nick Bargnesi) Date: Thu, 11 Jul 2013 19:34:01 +0000 Subject: [issue18430] gzip, bz2, lzma: peek advances file position of existing file object Message-ID: <1373571241.88.0.314815867736.issue18430@psf.upfronthosting.co.za> New submission from Nick Bargnesi: Using existing file objects as arguments to the open functions in the gzip, bz2, and lzma libraries can cause the underlying fileobj position to get changed - and not quite in ways one would expect. Calling peek against the returned file objects -- gzip.GzipFile, bz2.BZ2File, and lzma.LZMAFile will in one scenario advance the position of the supplied file object: >>> import bz2 >>> fileobj = open('test.bz2', mode='rb') >>> bzfile = bz2.open(fileobj) >>> >>> # file positions at 0 >>> assert fileobj.tell() == 0, bzfile.tell() == 0 >>> >>> bzfile.peek() b'Test file.\n' >>> fileobj.tell() 52 If after the initial peek, we rewind the underlying fileobj and peek again, the behavior changes: >>> fileobj.seek(0) 0 >>> bzfile.peek() b'Test file.\n' >>> fileobj.tell() 0 The second scenario serves to complicate things a bit with the change in behavior. I would be less surprised if the module documentation simply stated the affect on file position of the file object being used. Though it would be beautiful if the underlying file object didn't change at all. The latter seems possible since the three modules know whether the file object is seekable. The gzip and lzma modules exhibit similar behavior - gzip for example: >>> import gzip >>> fileobj = open('test.gz', mode='rb') >>> gzfile = gzip.open(fileobj) >>> >>> # file positions at 0 >>> assert fileobj.tell() == 0 and gzfile.tell() == 0 >>> >>> gzfile.peek(1) b'Test file.\n' >>> fileobj.tell() 36 >>> >>> # rewind, and do it again >>> fileobj.seek(0) >>> >>> gzfile.peek(1) b'Test file.\n' >>> fileobj.tell() 0 ---------- components: Library (Lib) messages: 192890 nosy: nbargnesi priority: normal severity: normal status: open title: gzip, bz2, lzma: peek advances file position of existing file object type: enhancement versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 21:38:52 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 11 Jul 2013 19:38:52 +0000 Subject: [issue18415] Normalize single/double quote usage in importlib In-Reply-To: <1373398349.2.0.544906164055.issue18415@psf.upfronthosting.co.za> Message-ID: <1373571532.48.0.094030370199.issue18415@psf.upfronthosting.co.za> Brett Cannon added the comment: I prefer single quotes (easier to type =) and yes, using double quotes instead of escaping is preferred. When I have a chance I will take a look at the patch. ---------- stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 21:39:33 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Jul 2013 19:39:33 +0000 Subject: [issue17872] Crash in marshal.load() with bad reader In-Reply-To: <1367270952.48.0.351702678796.issue17872@psf.upfronthosting.co.za> Message-ID: <1373571573.13.0.195247038193.issue17872@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> commit review status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 21:47:24 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Jul 2013 19:47:24 +0000 Subject: [issue18427] str.replace causes segfault for long strings In-Reply-To: <1373535639.26.0.108709359025.issue18427@psf.upfronthosting.co.za> Message-ID: <1373572044.75.0.192810189887.issue18427@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think NEWS entry for this issue should be in the "Core and Builtins" section. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 21:54:11 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Jul 2013 19:54:11 +0000 Subject: [issue18430] gzip, bz2, lzma: peek advances file position of existing file object In-Reply-To: <1373571241.88.0.314815867736.issue18430@psf.upfronthosting.co.za> Message-ID: <1373572451.91.0.201232988689.issue18430@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I guess this issue can't be fixed. ---------- nosy: +nadeem.vawda, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 21:59:04 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Jul 2013 19:59:04 +0000 Subject: [issue18044] Email headers do not properly decode to unicode. In-Reply-To: <1369310256.22.0.862828757307.issue18044@psf.upfronthosting.co.za> Message-ID: <3brp4R3Jr9z7Ljj@mail.python.org> Roundup Robot added the comment: New changeset 4acb822f4c43 by R David Murray in branch '3.3': #18044: Fix parsing of encoded words of the form =?utf8?q?=XX...?= http://hg.python.org/cpython/rev/4acb822f4c43 New changeset 32c6cfffbddd by R David Murray in branch 'default': Merge: #18044: Fix parsing of encoded words of the form =?utf8?q?=XX...?= http://hg.python.org/cpython/rev/32c6cfffbddd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 22:06:03 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Jul 2013 20:06:03 +0000 Subject: [issue18044] Email headers do not properly decode to unicode. In-Reply-To: <1369310256.22.0.862828757307.issue18044@psf.upfronthosting.co.za> Message-ID: <1373573163.53.0.347259075375.issue18044@psf.upfronthosting.co.za> R. David Murray added the comment: This is actually two separate bugs, both a bit embarrassing. The first one (that I just fixed) is that when parsing an encoded word I was only checking for decimal digits after an '=' (instead of the correct hex digits) when trying to do robust detection of encoded word limits. The second (the address one) is due to the fact that somewhere between stopping my full time work on the email project and actually committing the code, I lost track of the fact that I never implemented encoded word parsing for anything other than unstructured headers. The infrastructure is there, I just need to write tests and hook it up. I'm going to open a separate issue for that. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 22:09:52 2013 From: report at bugs.python.org (Madison May) Date: Thu, 11 Jul 2013 20:09:52 +0000 Subject: [issue18430] gzip, bz2, lzma: peek advances file position of existing file object In-Reply-To: <1373571241.88.0.314815867736.issue18430@psf.upfronthosting.co.za> Message-ID: <1373573392.84.0.960471411479.issue18430@psf.upfronthosting.co.za> Madison May added the comment: Why would something like the following work? #At the beginning of peek() #keep track of prior offset position = self.fileobj.tell() #immediately before return statement #restore previous fileobj offset self.fileobj.seek(position) ---------- nosy: +madison.may _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 22:10:18 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Jul 2013 20:10:18 +0000 Subject: [issue18431] Encoded words in structured headers are not decoded by the new parser. Message-ID: <1373573418.36.0.0145558554695.issue18431@psf.upfronthosting.co.za> New submission from R. David Murray: The subject says it all, but here is an example (from issue 18044): >>> msg = message_from_string('To: =?utf-8?q?Eric?= \n\n', policy=default) >>> msg['To'] '=?utf-8?q?Eric?= ' ---------- components: email messages: 192897 nosy: Tim.Rawlinson, barry, r.david.murray priority: normal severity: normal stage: needs patch status: open title: Encoded words in structured headers are not decoded by the new parser. type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 22:10:34 2013 From: report at bugs.python.org (Madison May) Date: Thu, 11 Jul 2013 20:10:34 +0000 Subject: [issue18430] gzip, bz2, lzma: peek advances file position of existing file object In-Reply-To: <1373571241.88.0.314815867736.issue18430@psf.upfronthosting.co.za> Message-ID: <1373573434.0.0.641622806188.issue18430@psf.upfronthosting.co.za> Madison May added the comment: *wouldn't ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 22:11:20 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Jul 2013 20:11:20 +0000 Subject: [issue18044] Email headers do not properly decode to unicode. In-Reply-To: <1369310256.22.0.862828757307.issue18044@psf.upfronthosting.co.za> Message-ID: <1373573480.88.0.110408449593.issue18044@psf.upfronthosting.co.za> R. David Murray added the comment: The issue for the second bug is issue 18431. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 22:26:36 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Jul 2013 20:26:36 +0000 Subject: [issue18430] gzip, bz2, lzma: peek advances file position of existing file object In-Reply-To: <1373571241.88.0.314815867736.issue18430@psf.upfronthosting.co.za> Message-ID: <1373574396.15.0.698916616133.issue18430@psf.upfronthosting.co.za> R. David Murray added the comment: Regardless of whether or not it *can* be fixed, I personally would not expect the file position to be either unchanged or predictable. The file object is being passed to something that is going to read and/or write from it, after all. If the calling application needs the file to be in a particular seek position, it should save it and reset it, I think. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 22:29:21 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 11 Jul 2013 20:29:21 +0000 Subject: [issue17944] Refactor test_zipfile In-Reply-To: <1368093470.65.0.477520947191.issue17944@psf.upfronthosting.co.za> Message-ID: <1373574561.07.0.811938325248.issue17944@psf.upfronthosting.co.za> Zachary Ware added the comment: No complaints here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 22:46:46 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Jul 2013 20:46:46 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3brq7T35QdzRJm@mail.python.org> Roundup Robot added the comment: New changeset 01a46dc00fc8 by Victor Stinner in branch 'default': Issue #18408: slot_tp_str() must not fallback on slot_tp_repr() on error http://hg.python.org/cpython/rev/01a46dc00fc8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 22:48:41 2013 From: report at bugs.python.org (Dmi Baranov) Date: Thu, 11 Jul 2013 20:48:41 +0000 Subject: [issue17987] test.support.captured_stderr, captured_stdin not documented In-Reply-To: <1368653423.88.0.898801742943.issue17987@psf.upfronthosting.co.za> Message-ID: <1373575721.44.0.266537540732.issue17987@psf.upfronthosting.co.za> Dmi Baranov added the comment: Yeah, my first patch applied :) thanks, David ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 22:57:43 2013 From: report at bugs.python.org (Nick Bargnesi) Date: Thu, 11 Jul 2013 20:57:43 +0000 Subject: [issue18430] gzip, bz2, lzma: peek advances file position of existing file object In-Reply-To: <1373571241.88.0.314815867736.issue18430@psf.upfronthosting.co.za> Message-ID: <1373576263.29.0.652242591408.issue18430@psf.upfronthosting.co.za> Nick Bargnesi added the comment: In that the underlying file position is not deterministic when used like this, I'm inclined to agree. Though faced with documentation stating it does not "advance the file position", it certainly is less than explicit about it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 23:02:33 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 11 Jul 2013 21:02:33 +0000 Subject: [issue18428] IDLE startup error In-Reply-To: <1373543590.93.0.69905828801.issue18428@psf.upfronthosting.co.za> Message-ID: <1373576553.85.0.25372624428.issue18428@psf.upfronthosting.co.za> Ned Deily added the comment: To help see what the problem is open a Terminal shell window and type: cd $HOME ls -l .idlerc/* cat .idlerc/* Then try typing: /usr/local/bin/idle3.3 If that fails, try: /usr/local/bin/idle3.3 -n For all of the above, please update this issue with a copy and paste of the resulting outputs. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 23:03:55 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Jul 2013 21:03:55 +0000 Subject: [issue18430] gzip, bz2, lzma: peek advances file position of existing file object In-Reply-To: <1373571241.88.0.314815867736.issue18430@psf.upfronthosting.co.za> Message-ID: <1373576635.94.0.35528422242.issue18430@psf.upfronthosting.co.za> R. David Murray added the comment: Hmm, yes. Perhaps it should say "does not advance the read position"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 23:12:03 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 11 Jul 2013 21:12:03 +0000 Subject: [issue15968] Incorporate Tcl/Tk/Tix into the Windows build process In-Reply-To: <1347996983.92.0.069726969781.issue15968@psf.upfronthosting.co.za> Message-ID: <1373577123.96.0.965104666733.issue15968@psf.upfronthosting.co.za> Zachary Ware added the comment: I'm not sure that moving the tcltk output dir into PCbuild is the right way to go about making different versions of Tcl/Tk available to different Python versions. For one, because it's not true if you're working out of a single checkout for multiple versions. I think I'd rather see 'tcltk'/'tcltk64' stay where they are, but grow extensions to denote different builds--'tcltk-Win32-py34' and 'tcltk-x64-py35', for example. Also, PCbuild/rt.bat needs to be updated if tcltk[64] is changed. I can't comment much on buildlib.py as I haven't had the time to learn everything I'd need to to understand it all, but it seems to work well doing what it is meant to do. However, it does seem like substantial overkill for what the comment at the top says it is for :P Barring the issues I've raised so far, I really like the general idea and direction of the patch. I really hope this can make it to inclusion before too long. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 23:12:08 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Jul 2013 21:12:08 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3brqhl6C0yz7Ljf@mail.python.org> Roundup Robot added the comment: New changeset 39eb1ce5f377 by Victor Stinner in branch 'default': Issue #18408: ste_new() initialize all attributes before handling error http://hg.python.org/cpython/rev/39eb1ce5f377 New changeset aaa6e8b8a5c9 by Victor Stinner in branch 'default': Issue #18408: Fix compiler_import() to handle PyUnicode_Substring() failure properly http://hg.python.org/cpython/rev/aaa6e8b8a5c9 New changeset ff93930a53c0 by Victor Stinner in branch 'default': Issue #18408: parsetok() must not write into stderr on memory allocation error http://hg.python.org/cpython/rev/ff93930a53c0 New changeset 1a1869baec4c by Victor Stinner in branch 'default': Issue #18408: Fix _Pickler_New() and _Unpickler_New(): initialize all http://hg.python.org/cpython/rev/1a1869baec4c New changeset e11121b9bd09 by Victor Stinner in branch 'default': Issue #18408: _elementtree.c now handles create_extra() failure http://hg.python.org/cpython/rev/e11121b9bd09 New changeset 0877e17fa25e by Victor Stinner in branch 'default': Issue #18408: Different fixes in _elementtree.c to handle correctly MemoryError http://hg.python.org/cpython/rev/0877e17fa25e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 23:15:37 2013 From: report at bugs.python.org (=?utf-8?q?Bj=C3=B6rn_Sandberg_Lynch?=) Date: Thu, 11 Jul 2013 21:15:37 +0000 Subject: [issue17911] Extracting tracebacks does too much work In-Reply-To: <1367789486.16.0.484658151136.issue17911@psf.upfronthosting.co.za> Message-ID: <1373577337.77.0.796541765888.issue17911@psf.upfronthosting.co.za> Bj?rn Sandberg Lynch added the comment: After thinking about it, I decided to defer instead of suppress line fetching. Suppressing would still give a traceback later, but not the same as the original. extract_exception is where the meat is. There's a slight quirk in how context works - if cause is set to something else than the actual exception, context still gets set even though it won't be printed. This is to enable later analysis. However, if you explicitly 'raise Exception from None' neither of them will be set - the formatting code would have issues otherwise. I'm not too happy about the code duplication between the format_exception method and the formatting that works on exceptions directly, but there are plenty of tests to ensure that the output is identical. Feel free to dispute my naming choices. I'm admittedly influenced by twisted. ---------- keywords: +patch Added file: http://bugs.python.org/file30895/traceback.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 23:20:13 2013 From: report at bugs.python.org (Nick Bargnesi) Date: Thu, 11 Jul 2013 21:20:13 +0000 Subject: [issue18430] gzip, bz2, lzma: peek advances file position of existing file object In-Reply-To: <1373571241.88.0.314815867736.issue18430@psf.upfronthosting.co.za> Message-ID: <1373577613.91.0.860587832381.issue18430@psf.upfronthosting.co.za> Nick Bargnesi added the comment: That's an improvement. Using wording similar to the constructor's: Calling a GzipFile object?s peek() method does not advance its position, but the fileobj may be affected. The caller may wish to save the fileobj position prior to calling peek() and resetting it upon return. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 23:31:43 2013 From: report at bugs.python.org (Madison May) Date: Thu, 11 Jul 2013 21:31:43 +0000 Subject: [issue18430] gzip, bz2, lzma: peek advances file position of existing file object In-Reply-To: <1373571241.88.0.314815867736.issue18430@psf.upfronthosting.co.za> Message-ID: <1373578303.22.0.274155401388.issue18430@psf.upfronthosting.co.za> Madison May added the comment: Sounds good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 23:34:23 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 11 Jul 2013 21:34:23 +0000 Subject: [issue18365] Idle: mock Text class and test thereof In-Reply-To: <1373006946.99.0.696971871982.issue18365@psf.upfronthosting.co.za> Message-ID: <1373578463.38.0.311075290331.issue18365@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Upon further review and tests, I notice that ._decode * is a partial implementation of Text.index, * so it should be renamed index and tested against Text.index, * and it currently returns the wrong values for 'end' and high out-of-bounds indexes. Tests with 'end' only pass now because the tested methods ignore the buggy decode for 'end' and special-case it instead. When I added tests with out of bounds indexes, they failed. I am working now on fixing all this. Spaces are supposed to follow arg-separating commas in function calls. The initial patch lacked them and I have added them. I need them because they make code easier for *me* to read and review, which is an example of why PEP-8 requires them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 23:47:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Jul 2013 21:47:01 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3brrT11Cn2zRq4@mail.python.org> Roundup Robot added the comment: New changeset 51eddca9dd6f by Victor Stinner in branch 'default': Issue #18408: parsetok() must not write into stderr on memory allocation error http://hg.python.org/cpython/rev/51eddca9dd6f New changeset 5e50f1a0c985 by Victor Stinner in branch 'default': Issue #18408: In debug mode, PyCFunction_Call() now checks if an exception was http://hg.python.org/cpython/rev/5e50f1a0c985 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 23:59:49 2013 From: report at bugs.python.org (Nick Bargnesi) Date: Thu, 11 Jul 2013 21:59:49 +0000 Subject: [issue18430] gzip, bz2, lzma: peek advances file position of existing file object In-Reply-To: <1373571241.88.0.314815867736.issue18430@psf.upfronthosting.co.za> Message-ID: <1373579989.82.0.588135384581.issue18430@psf.upfronthosting.co.za> Nick Bargnesi added the comment: Proposed documentation change to gzip, bz2, and lzma modules, in patch form. ---------- keywords: +patch Added file: http://bugs.python.org/file30896/issue18430.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 00:27:20 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 11 Jul 2013 22:27:20 +0000 Subject: [issue18365] Idle: mock Text class and test thereof In-Reply-To: <1373006946.99.0.696971871982.issue18365@psf.upfronthosting.co.za> Message-ID: <1373581640.76.0.747602111059.issue18365@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Whoops, I got that partly wrong in that index returns a 'r.c' string after doing what _decode is supposed to do, which is to decode the input according to the current text. The mock index should just return '%s.%s' % _decode(position). There is still the point that index and _decode now give different coordinates for 'end' and that _decode should be tested by testing mock index, which wraps it, against tk index. Since tk.Text args can be passed by name, the mock methods should use the same parameter names. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 00:42:06 2013 From: report at bugs.python.org (Phil Webster) Date: Thu, 11 Jul 2013 22:42:06 +0000 Subject: [issue18365] Idle: mock Text class and test thereof In-Reply-To: <1373006946.99.0.696971871982.issue18365@psf.upfronthosting.co.za> Message-ID: <1373582526.19.0.399379331316.issue18365@psf.upfronthosting.co.za> Phil Webster added the comment: Thanks Terry, I will start PEP8-checking my code before I submit (as well as testing more thoroughly). I was thinking the same thing about the logic behind _decode and index functions needing to be combined. How would you recommend adding functionality to the decode function to handle expressions like "1.2 +5 chars" or "1.0 lineend-5c"? AutoComplete.py (#18409) uses this kind of index, so it will be needed soon. I'm thinking that splitting off the base index then parsing the remaining modifier expressions is the way to go. I was also thinking that a _checkIndex method would be good to have especially when using the +/-line and +/-char expressions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 00:59:04 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Jul 2013 22:59:04 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3brt471NQtz7Lk4@mail.python.org> Roundup Robot added the comment: New changeset 4975bcd67aa7 by Victor Stinner in branch 'default': Issue #18408: normalizestring() now raises MemoryError on memory allocation failure http://hg.python.org/cpython/rev/4975bcd67aa7 New changeset 1eac89af9acf by Victor Stinner in branch 'default': Issue #18408: Oh, I was wrong: Pickler_New() must call Py_DECREF() to destroy http://hg.python.org/cpython/rev/1eac89af9acf New changeset d9446c2a2fd4 by Victor Stinner in branch 'default': Issue #18408: ceval.c: in debug mode, convert the PyErr_Occurred() check on http://hg.python.org/cpython/rev/d9446c2a2fd4 New changeset 2f7c4df5cc46 by Victor Stinner in branch 'default': Issue #18408: errors.c: in debug mode, calling PyErr_BadInternalCall() now http://hg.python.org/cpython/rev/2f7c4df5cc46 New changeset affb87b1d7ec by Victor Stinner in branch 'default': Issue #18408: pmerge() help of mro_implementation() now raises MemoryError on http://hg.python.org/cpython/rev/affb87b1d7ec New changeset f85fcbbbe8de by Victor Stinner in branch 'default': Issue #18408: _PyMemoTable_ResizeTable() now restores the old table if http://hg.python.org/cpython/rev/f85fcbbbe8de New changeset bb5da6e795a1 by Victor Stinner in branch 'default': Issue #18408: _pickle.c: Add missing PyErr_NoMemory() on memory allocation failures http://hg.python.org/cpython/rev/bb5da6e795a1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 01:42:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Jul 2013 23:42:52 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3brv2h0gqWzRBr@mail.python.org> Roundup Robot added the comment: New changeset 89c6495d1ff2 by Victor Stinner in branch 'default': Issue #18408: Fix parser.sequence2st() and parser.tuple2st(): raise MemoryError http://hg.python.org/cpython/rev/89c6495d1ff2 New changeset c80a9705803a by Victor Stinner in branch 'default': Issue #18408: parser module: fix error handling in node2tuple() http://hg.python.org/cpython/rev/c80a9705803a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 01:45:16 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 11 Jul 2013 23:45:16 +0000 Subject: [issue6926] socket module missing IPPROTO_IPV6, IPPROTO_IPV4 In-Reply-To: <1253143086.64.0.131724035197.issue6926@psf.upfronthosting.co.za> Message-ID: <1373586316.37.0.345219389263.issue6926@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 01:57:52 2013 From: report at bugs.python.org (Sergey) Date: Thu, 11 Jul 2013 23:57:52 +0000 Subject: [issue18305] [patch] Fast sum() for non-numbers In-Reply-To: <1372228439.5.0.789865081817.issue18305@psf.upfronthosting.co.za> Message-ID: <1373587072.69.0.906266066667.issue18305@psf.upfronthosting.co.za> Sergey added the comment: Steven D'Aprano noticed that there's an obscure case of: >>> class A(list): ... def __add__(self, other): ... return A(super(A,self).__add__(other)) ... def __radd__(self, other): ... return A(other) + self ... Where: >>> type( [1] + A([2]) ) Is different from: >>> type( [1].__add__(A([2])) ) To keep such an undefined behavior unchanged I updated the fastsum-special-tuplesandlists.patch to have a more strict type check. In case somebody would like to test it, the patch is attached. It should work for both Python 2.7 and Python 3.3, and should introduce no behavior change. ---------- Added file: http://bugs.python.org/file30897/fastsum-special-tuplesandlists.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 02:07:50 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Jul 2013 00:07:50 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3brvbV0JZpzSlp@mail.python.org> Roundup Robot added the comment: New changeset 60b1d7967ef8 by Victor Stinner in branch 'default': Issue #18408: Fix create_extra() of _elementtree.c, raise MemoryError on memory http://hg.python.org/cpython/rev/60b1d7967ef8 New changeset 1e0afd558ba3 by Victor Stinner in branch 'default': Issue #18408: Fix constructors of _elementtree.c http://hg.python.org/cpython/rev/1e0afd558ba3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 07:11:15 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Jul 2013 05:11:15 +0000 Subject: [issue18365] Idle: mock Text class and test thereof In-Reply-To: <1373006946.99.0.696971871982.issue18365@psf.upfronthosting.co.za> Message-ID: <1373605875.74.0.696221580599.issue18365@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The real problem with 'end' and 'big.m' is that there are three proper decodings, depending on the method asking. I think this patch mostly solves the problems mentioned before. All tests, including many new ones, pass. ---------- Added file: http://bugs.python.org/file30898/mock_text5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 08:13:47 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jul 2013 06:13:47 +0000 Subject: [issue18352] collections.Counter with added attributes are not deepcopied properly. In-Reply-To: <1372862605.72.0.11799816843.issue18352@psf.upfronthosting.co.za> Message-ID: <1373609627.89.0.183052041718.issue18352@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 08:23:18 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jul 2013 06:23:18 +0000 Subject: [issue18352] collections.Counter with added attributes are not deepcopied properly. In-Reply-To: <1372862605.72.0.11799816843.issue18352@psf.upfronthosting.co.za> Message-ID: <1373610198.35.0.124316677343.issue18352@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I don't want the current behavior to change. The copy() method does not guarantee that it will copy added attributes. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 08:30:34 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jul 2013 06:30:34 +0000 Subject: [issue13871] namedtuple does not normalize field names when checking for duplicates In-Reply-To: <1327556862.47.0.690638642414.issue13871@psf.upfronthosting.co.za> Message-ID: <1373610634.31.0.855139634216.issue13871@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Closing this for the reasons listed above. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 08:31:16 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jul 2013 06:31:16 +0000 Subject: [issue13004] pprint: add option to truncate sequences In-Reply-To: <1316367673.59.0.101028933355.issue13004@psf.upfronthosting.co.za> Message-ID: <1373610676.51.0.795140367849.issue13004@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 08:31:40 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jul 2013 06:31:40 +0000 Subject: [issue7434] general pprint rewrite In-Reply-To: <1259944363.21.0.149882342014.issue7434@psf.upfronthosting.co.za> Message-ID: <1373610700.97.0.418040002287.issue7434@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 08:33:29 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jul 2013 06:33:29 +0000 Subject: [issue13396] new method random.getrandbytes() In-Reply-To: <1321202621.61.0.74333018382.issue13396@psf.upfronthosting.co.za> Message-ID: <1373610809.84.0.857373323533.issue13396@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Closing for the reasons listed above. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 08:34:38 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jul 2013 06:34:38 +0000 Subject: [issue12916] Add inspect.splitdoc In-Reply-To: <1315326747.38.0.43030903994.issue12916@psf.upfronthosting.co.za> Message-ID: <1373610878.09.0.465455386018.issue12916@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Unassigning. I don't recall what I intended to do to further this along. ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 08:37:12 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jul 2013 06:37:12 +0000 Subject: [issue12740] Add struct.Struct.nmemb In-Reply-To: <1313148807.6.0.39228067291.issue12740@psf.upfronthosting.co.za> Message-ID: <1373611032.94.0.0562215366805.issue12740@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: rhettinger -> versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 08:38:21 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Jul 2013 06:38:21 +0000 Subject: [issue18365] Idle: mock Text class and test thereof In-Reply-To: <1373006946.99.0.696971871982.issue18365@psf.upfronthosting.co.za> Message-ID: <1373611101.16.0.0596620773822.issue18365@psf.upfronthosting.co.za> Terry J. Reedy added the comment: A little more polishing and the tests pass again. I think I am done with the implemented methods. Before I commit, I want to review the set of 'pass' functions. It seems a bit haphazard. I think display changing methods like .see are fine.I am not sure about including internal operation methods like .mark_set (until actually needed). ---------- Added file: http://bugs.python.org/file30899/mock_text6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 08:40:17 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 12 Jul 2013 06:40:17 +0000 Subject: [issue18415] Normalize single/double quote usage in importlib In-Reply-To: <1373398349.2.0.544906164055.issue18415@psf.upfronthosting.co.za> Message-ID: <1373611217.74.0.775175803905.issue18415@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 08:48:27 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jul 2013 06:48:27 +0000 Subject: [issue12165] Nonlocal does not include global; clarify doc In-Reply-To: <1306216657.18.0.255448168009.issue12165@psf.upfronthosting.co.za> Message-ID: <1373611707.88.0.175216522832.issue12165@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: rhettinger -> versions: +Python 3.4 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 09:31:21 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jul 2013 07:31:21 +0000 Subject: [issue18432] sched modules queue property should return a list, not an iterator Message-ID: <1373614281.57.0.554958596911.issue18432@psf.upfronthosting.co.za> New submission from Raymond Hettinger: In Python 2, the queue attribute was a list and it is still documented that way in Python 3: http://docs.python.org/3/library/sched.html#sched.scheduler.queue This appears to be a mistake made during the 2-to-3 conversion. ---------- components: Library (Lib) files: sched.diff keywords: patch messages: 192927 nosy: rhettinger priority: normal severity: normal stage: patch review status: open title: sched modules queue property should return a list, not an iterator type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30900/sched.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 09:34:20 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jul 2013 07:34:20 +0000 Subject: [issue11012] Add log1p(), exp1m(), gamma(), and lgamma() to cmath In-Reply-To: <1295997901.71.0.113497713942.issue11012@psf.upfronthosting.co.za> Message-ID: <1373614460.59.0.581067816422.issue11012@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Closed due to lack of interest. ---------- resolution: -> postponed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 09:35:54 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jul 2013 07:35:54 +0000 Subject: [issue11822] Improve disassembly to show embedded code objects In-Reply-To: <1302467152.39.0.854888976189.issue11822@psf.upfronthosting.co.za> Message-ID: <1373614554.44.0.695774697942.issue11822@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- stage: -> needs patch versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 09:37:14 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jul 2013 07:37:14 +0000 Subject: [issue17172] Add turtledemo to IDLE menu In-Reply-To: <1360441966.18.0.528447885335.issue17172@psf.upfronthosting.co.za> Message-ID: <1373614634.63.0.426539223054.issue17172@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Ezio, would you like to take it from here? ---------- assignee: -> ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 09:39:52 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jul 2013 07:39:52 +0000 Subject: [issue17642] IDLE add font resizing hot keys In-Reply-To: <1365228385.87.0.236246362772.issue17642@psf.upfronthosting.co.za> Message-ID: <1373614792.56.0.107144491462.issue17642@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> roger.serwy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 09:43:39 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jul 2013 07:43:39 +0000 Subject: [issue13404] Add support for system.methodSignature() to XMLRPC Server In-Reply-To: <1321292022.85.0.26720578121.issue13404@psf.upfronthosting.co.za> Message-ID: <1373615019.28.0.361626519569.issue13404@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 09:44:40 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jul 2013 07:44:40 +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: <1373615080.5.0.516465402729.issue11698@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 09:49:14 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Jul 2013 07:49:14 +0000 Subject: [issue18365] Idle: mock Text class and test thereof In-Reply-To: <1373006946.99.0.696971871982.issue18365@psf.upfronthosting.co.za> Message-ID: <1373615354.24.0.830538835124.issue18365@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I want to commit this patch more or less as is so we can move forward with the tests that do not need anything more. We can then elaborate mock Text as needed and desired. Looking at http://effbot.org/tkinterbook/text.htm, for instance, I see that 'lineend' is an expression modifier in that same category as +/- chars/lines. So _decode should not really handle it until it handles such modifiers more generally. As near as I could tell from experiment, 'm.n lineend' is the same as 'm.end', so the former is never needed and could be changed to the latter in Idle code. As far as you know, correct? The use for 'lineend' would seem to be after other modifiers, as in '1.0 +100c lineend', where the line whose end we go to is likely not line 1. Remember that for advanced Text use, we have the option of using tk.Text for a test, at least at first. The gain would be not having to reproduce baroque behavior*. The cost would be making the test a gui test and running on fewer buildbots. I felt that the basic mock done so far would be worth the time because a) it would be useful for many tests and b) I would learn the Text widget and how to experiment with it to determine its under-documented behavior. *For instance, having optional spaces within modifiers as well as using them to separate modifiers. Do you know if there is a coherent index grammar anywhere? Or is it only defined by the Text.index C code? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 09:54:25 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Jul 2013 07:54:25 +0000 Subject: [issue18352] collections.Counter with added attributes are not deepcopied properly. In-Reply-To: <1372862605.72.0.11799816843.issue18352@psf.upfronthosting.co.za> Message-ID: <1373615665.47.0.478236352072.issue18352@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What about pickling? OrderedDict.__reduce__() saves added attributes, but Counter.__reduce__() does not. One of them should be changed for consistency. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 10:00:31 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Jul 2013 08:00:31 +0000 Subject: [issue18432] sched modules queue property should return a list, not an iterator In-Reply-To: <1373614281.57.0.554958596911.issue18432@psf.upfronthosting.co.za> Message-ID: <1373616031.5.0.516323134048.issue18432@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Perhaps it will be better document it as an iterator? In any case we can call list() to get a list. ---------- nosy: +giampaolo.rodola, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 10:22:36 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 12 Jul 2013 08:22:36 +0000 Subject: [issue18418] Thread.isAlive() sometimes True after fork In-Reply-To: <1373408030.66.0.77258289483.issue18418@psf.upfronthosting.co.za> Message-ID: <1373617356.73.0.101512642975.issue18418@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: This is just a special-case of the more general problem of forking() in a multi-threaded program (see #16500 and #6721). Since fork() can occur at any time, even though your data structures are protected by locks, they can end up in an inconsistent state in the child process. There's nothing we can do about it, and it affects *every code that's not atomic*. For example, even though your patch fixes this specific issue, you can still end up with the thread both in _active and _limbo at the same time (which shouldn't be a problem since both are cleared after fork(), but still). OTOH, the patch is simple and safe, so it might be interesting (another maybe better approach would be to also iterate over _limbo in _after_fork()). As for the reproduction in 3.3, you're probably having trouble to reproduce it because of the GIL change. You might want to play with sys.setswitchinterval(). ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 12:33:36 2013 From: report at bugs.python.org (Phil Webster) Date: Fri, 12 Jul 2013 10:33:36 +0000 Subject: [issue18365] Idle: mock Text class and test thereof In-Reply-To: <1373006946.99.0.696971871982.issue18365@psf.upfronthosting.co.za> Message-ID: <1373625216.94.0.0242585327203.issue18365@psf.upfronthosting.co.za> Phil Webster added the comment: Using tk.Text for more involved tests sounds good (at least as a start). The pass functions were used to get the FormatParagraph test (#18226) working. I've been using the same effbot.org site as a reference and haven't found anything more detailed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 14:28:04 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2013 12:28:04 +0000 Subject: [issue18415] Normalize single/double quote usage in importlib In-Reply-To: <1373398349.2.0.544906164055.issue18415@psf.upfronthosting.co.za> Message-ID: <1373632084.98.0.432240567011.issue18415@psf.upfronthosting.co.za> Brett Cannon added the comment: Why the stage change? I set it to commit review on purpose as I already did a cursory check and it was fine. I have only have one more paranoid check before do the commit myself. I purposely didn't set patch review as I didn't want anyone wasting their time doing one as I'm going to do the one more and that's enough for committal. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 14:29:28 2013 From: report at bugs.python.org (Olivier Gagnon) Date: Fri, 12 Jul 2013 12:29:28 +0000 Subject: [issue18352] collections.Counter with added attributes are not deepcopied properly. In-Reply-To: <1372862605.72.0.11799816843.issue18352@psf.upfronthosting.co.za> Message-ID: <1373632168.22.0.554052834365.issue18352@psf.upfronthosting.co.za> Olivier Gagnon added the comment: I can understand that the current behaviour can be correct in regard with the added attributes of the object. However, should I open a new issue for the following inheritance behaviour which the reduce function affects also. class myCounter(Counter): def __init__(self, bar, *args): self.foo = bar super().__init__(*args) class myDict(dict): def __init__(self, bar, *args): self.foo = bar super().__init__(*args) c = myCounter("bar") l = myDict("bar") print(c.foo) # prints bar print(l.foo) # prints bar cc = copy.copy(c) ll = copy.copy(l) print(cc.foo) # prints {} print(ll.foo) # prints bar ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 14:31:27 2013 From: report at bugs.python.org (Anton Tyurin) Date: Fri, 12 Jul 2013 12:31:27 +0000 Subject: [issue18100] socket.sendall() cannot send buffers of 2GB or more In-Reply-To: <1369918582.13.0.605373457603.issue18100@psf.upfronthosting.co.za> Message-ID: <1373632287.96.0.410764244391.issue18100@psf.upfronthosting.co.za> Anton Tyurin added the comment: According to man send: only sendmsg() if input length argument overflows a ssize_t on OS X. But truncating extradata in sendall() without exception is bad idea, because sendall() never returns count of successfully sent bytes. So we'll never know about incomplete data transmition. Is it good idea to test such buffer on Unix socket, for example? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 15:02:08 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2013 13:02:08 +0000 Subject: [issue18433] Clarify venv docs about which methods check for pre-existing paths Message-ID: <1373634128.21.0.571216700722.issue18433@psf.upfronthosting.co.za> New submission from Brett Cannon: E.g. setup_python and create_directories both check that the paths they will create pre-exist, but the docs don't mention this. ---------- assignee: docs at python components: Documentation messages: 192938 nosy: brett.cannon, carljm, docs at python priority: normal severity: normal status: open title: Clarify venv docs about which methods check for pre-existing paths versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 15:03:54 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2013 13:03:54 +0000 Subject: [issue18434] Update venv example to use setuptools Message-ID: <1373634234.22.0.916403882512.issue18434@psf.upfronthosting.co.za> New submission from Brett Cannon: Now that Distribute is just a shell for setuptools 0.8, the example in the venv docs for installing pip and setuptools in a venv should be updated to use setuptools (in case anyone uses that code as a script themselves). ---------- assignee: docs at python components: Documentation messages: 192939 nosy: brett.cannon, carljm, docs at python priority: normal severity: normal status: open title: Update venv example to use setuptools versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 15:56:05 2013 From: report at bugs.python.org (Aaron Meurer) Date: Fri, 12 Jul 2013 13:56:05 +0000 Subject: [issue13340] list.index does not accept None as start or stop In-Reply-To: <1320398584.03.0.145013152611.issue13340@psf.upfronthosting.co.za> Message-ID: <1373637365.17.0.253066123543.issue13340@psf.upfronthosting.co.za> Changes by Aaron Meurer : ---------- nosy: +Aaron.Meurer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 16:38:04 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2013 14:38:04 +0000 Subject: [issue18362] Make build_cpython.py from dev-in-a-box work outside of a box In-Reply-To: <1372967156.42.0.772403047151.issue18362@psf.upfronthosting.co.za> Message-ID: <1373639884.03.0.647829641852.issue18362@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 16:49:18 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2013 14:49:18 +0000 Subject: [issue18362] Make build_cpython.py from dev-in-a-box work outside of a box In-Reply-To: <1372967156.42.0.772403047151.issue18362@psf.upfronthosting.co.za> Message-ID: <1373640558.7.0.208560278201.issue18362@psf.upfronthosting.co.za> Brett Cannon added the comment: changeset fe1c35cbc9a0 ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 16:51:18 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2013 14:51:18 +0000 Subject: [issue18361] Move dev-in-a-box to os.cpu_count() Message-ID: <1373640678.73.0.29227214356.issue18361@psf.upfronthosting.co.za> New submission from Brett Cannon: changeset 3446dee09265 ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 16:51:37 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2013 14:51:37 +0000 Subject: [issue18342] Use the repr of a module name for ImportError in ceval.c In-Reply-To: <1372696430.42.0.571776913898.issue18342@psf.upfronthosting.co.za> Message-ID: <1373640697.44.0.0443808170763.issue18342@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- title: Use the repr of a module name for ModuleNotFoundError in ceval.c -> Use the repr of a module name for ImportError in ceval.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 16:53:59 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2013 14:53:59 +0000 Subject: [issue18363] Change use of acronym tag in devinabox index.html to abbr In-Reply-To: <1372967383.82.0.0641112883991.issue18363@psf.upfronthosting.co.za> Message-ID: <1373640839.33.0.824248532898.issue18363@psf.upfronthosting.co.za> Brett Cannon added the comment: changeset fae104051a63 ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 17:04:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Jul 2013 15:04:32 +0000 Subject: [issue18415] Normalize single/double quote usage in importlib In-Reply-To: <1373398349.2.0.544906164055.issue18415@psf.upfronthosting.co.za> Message-ID: <3bsHV72pJfz7LkK@mail.python.org> Roundup Robot added the comment: New changeset 33d379c2bb79 by Brett Cannon in branch 'default': Issue #18415: Normalize what type of quotes are used with string http://hg.python.org/cpython/rev/33d379c2bb79 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 17:05:31 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2013 15:05:31 +0000 Subject: [issue18415] Normalize single/double quote usage in importlib In-Reply-To: <1373398349.2.0.544906164055.issue18415@psf.upfronthosting.co.za> Message-ID: <1373641531.19.0.00901279824031.issue18415@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks for the path, Madison! I also cleaned up the instances using double quotes since it was because I was faking the use of a string's repr instead of explicitly using {!r}. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 17:08:45 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2013 15:08:45 +0000 Subject: [issue18388] Link to the contributor agreement from devinabox Message-ID: <1373641725.72.0.173805879951.issue18388@psf.upfronthosting.co.za> New submission from Brett Cannon: changeset 28294583a9c9 ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 17:13:52 2013 From: report at bugs.python.org (=?utf-8?q?Bj=C3=B6rn_Sandberg_Lynch?=) Date: Fri, 12 Jul 2013 15:13:52 +0000 Subject: [issue17911] Extracting tracebacks does too much work In-Reply-To: <1367789486.16.0.484658151136.issue17911@psf.upfronthosting.co.za> Message-ID: <1373642032.91.0.0808325860422.issue17911@psf.upfronthosting.co.za> Changes by Bj?rn Sandberg Lynch : Added file: http://bugs.python.org/file30901/traceback2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 17:22:36 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Jul 2013 15:22:36 +0000 Subject: [issue18342] Use the repr of a module name for ImportError in ceval.c In-Reply-To: <1372696430.42.0.571776913898.issue18342@psf.upfronthosting.co.za> Message-ID: <3bsHtz2xtXz7Lkm@mail.python.org> Roundup Robot added the comment: New changeset c3f9292c8efe by Brett Cannon in branch 'default': Issue #18342: Use the repr of a module name for ``from ... import http://hg.python.org/cpython/rev/c3f9292c8efe ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 17:23:24 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2013 15:23:24 +0000 Subject: [issue18342] Use the repr of a module name for ImportError in ceval.c In-Reply-To: <1372696430.42.0.571776913898.issue18342@psf.upfronthosting.co.za> Message-ID: <1373642604.81.0.291489141371.issue18342@psf.upfronthosting.co.za> Brett Cannon added the comment: Patch is in (only moved the tests to a different class) and added Tomasz to the ACKS file. Thanks for the patch! ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 17:30:40 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Jul 2013 15:30:40 +0000 Subject: [issue17845] Clarify successful build message In-Reply-To: <1366911874.8.0.692153365711.issue17845@psf.upfronthosting.co.za> Message-ID: <3bsJ4J2SWyz7LkK@mail.python.org> Roundup Robot added the comment: New changeset e13ff9fdfaf9 by Brett Cannon in branch 'default': Issue #17845: Clarify the message setup.py prints upon successfully http://hg.python.org/cpython/rev/e13ff9fdfaf9 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 17:31:05 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2013 15:31:05 +0000 Subject: [issue17845] Clarify successful build message In-Reply-To: <1366911874.8.0.692153365711.issue17845@psf.upfronthosting.co.za> Message-ID: <1373643065.47.0.500378158837.issue17845@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 17:51:45 2013 From: report at bugs.python.org (Madison May) Date: Fri, 12 Jul 2013 15:51:45 +0000 Subject: [issue18415] Normalize single/double quote usage in importlib In-Reply-To: <1373398349.2.0.544906164055.issue18415@psf.upfronthosting.co.za> Message-ID: <1373644305.43.0.803663240559.issue18415@psf.upfronthosting.co.za> Madison May added the comment: No problem, Brett. Glad to hear you could get rid of those few last pesky double quotes. I'm partial to the single quotes as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 17:53:40 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Jul 2013 15:53:40 +0000 Subject: [issue18390] Better documenting of ``hg revert -r`` when merging with another branch In-Reply-To: <1373149321.88.0.209488556232.issue18390@psf.upfronthosting.co.za> Message-ID: <3bsJZq5lGvz7LlR@mail.python.org> Roundup Robot added the comment: New changeset 15249b189347 by Brett Cannon in branch 'default': Issue #18390: Add a little comment on how to do a proper file http://hg.python.org/devguide/rev/15249b189347 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 17:54:10 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2013 15:54:10 +0000 Subject: [issue18390] Better documenting of ``hg revert -r`` when merging with another branch In-Reply-To: <1373149321.88.0.209488556232.issue18390@psf.upfronthosting.co.za> Message-ID: <1373644450.29.0.391816671441.issue18390@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 18:02:07 2013 From: report at bugs.python.org (Alex Henderson) Date: Fri, 12 Jul 2013 16:02:07 +0000 Subject: [issue17840] base64_codec uses assert for runtime validity checks In-Reply-To: <1366875650.57.0.151905786577.issue17840@psf.upfronthosting.co.za> Message-ID: <1373644927.7.0.12062641809.issue17840@psf.upfronthosting.co.za> Alex Henderson added the comment: OK, now raises ValueError on passing anything other than 'strict'. Note that for the incremental classes I've put checking in __init__ so that ValueError is raised when non-'strict' values are passed to the constructor, not when the incremental encode/decode methods are subsequently called. ---------- Added file: http://bugs.python.org/file30902/issue17840.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 18:44:30 2013 From: report at bugs.python.org (Chris Rebert) Date: Fri, 12 Jul 2013 16:44:30 +0000 Subject: [issue18369] X509 cert class for ssl module In-Reply-To: <1373055037.38.0.259814019718.issue18369@psf.upfronthosting.co.za> Message-ID: <1373647470.49.0.686985165792.issue18369@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 19:28:34 2013 From: report at bugs.python.org (Mike) Date: Fri, 12 Jul 2013 17:28:34 +0000 Subject: [issue18428] IDLE startup error In-Reply-To: <1373543590.93.0.69905828801.issue18428@psf.upfronthosting.co.za> Message-ID: <1373650114.93.0.0760028897055.issue18428@psf.upfronthosting.co.za> Mike added the comment: Thanks Ned, I have solved the issue by deleting all my previous py files on my computer. But I couldn't figure out what really triggered this error, as those files did not create any problems before. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 19:55:08 2013 From: report at bugs.python.org (Corey Brune) Date: Fri, 12 Jul 2013 17:55:08 +0000 Subject: [issue18353] PyUnicode_WRITE_CHAR macro definition missing In-Reply-To: <1372873387.67.0.379053408423.issue18353@psf.upfronthosting.co.za> Message-ID: <1373651708.71.0.617961147691.issue18353@psf.upfronthosting.co.za> Corey Brune added the comment: Hello all, I removed the reference to PyUnicode_WRITE_CHAR macro in unicode.rst. Thanks, Corey ---------- keywords: +patch nosy: +cbrune Added file: http://bugs.python.org/file30903/unicode.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 20:18:24 2013 From: report at bugs.python.org (paul j3) Date: Fri, 12 Jul 2013 18:18:24 +0000 Subject: [issue10984] argparse add_mutually_exclusive_group should accept existing arguments to register conflicts In-Reply-To: <1295737320.83.0.942830837874.issue10984@psf.upfronthosting.co.za> Message-ID: <1373653104.11.0.981900311177.issue10984@psf.upfronthosting.co.za> paul j3 added the comment: While playing with some examples, I found that exclusive group formatting has another failure case. If the usage line is long enough to wrap, optionals and positionals are formatted separately, with positionals appearing on a separate line(s). That means that if a group includes a positional, it will not be marked. So (shortening lines for convenience sake), instead of: usage: [-h] ... (-a | -b | x) we get usage: [-h] ... [-a] [-b] x This is true even if arguments are added to the group in the normal way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 20:33:14 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2013 18:33:14 +0000 Subject: [issue18435] Move venv from a custom Context class to types.SimpleNamespace Message-ID: <1373653994.06.0.195210973118.issue18435@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- components: Library (Lib) nosy: brett.cannon, carljm, eric.snow priority: normal severity: normal stage: needs patch status: open title: Move venv from a custom Context class to types.SimpleNamespace versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 20:34:46 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2013 18:34:46 +0000 Subject: [issue18435] Move venv from a custom Context class to types.SimpleNamespace Message-ID: <1373654086.04.0.908147083699.issue18435@psf.upfronthosting.co.za> New submission from Brett Cannon: The venv module has a Context class purely to hold attributes of data. This happens to be exactly what types.SimpleNamespace was created for, so it should probably replace Context. Luckily the class is not documented (nor what gets set on it for that matter) so swapping it out should be safe. ---------- keywords: +easy priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 20:35:45 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2013 18:35:45 +0000 Subject: [issue18435] Move venv from a custom Context class to types.SimpleNamespace In-Reply-To: <1373654086.04.0.908147083699.issue18435@psf.upfronthosting.co.za> Message-ID: <1373654145.49.0.976064205962.issue18435@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 20:35:54 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2013 18:35:54 +0000 Subject: [issue18434] Update venv example to use setuptools In-Reply-To: <1373634234.22.0.916403882512.issue18434@psf.upfronthosting.co.za> Message-ID: <1373654154.75.0.920911720313.issue18434@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 20:36:03 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2013 18:36:03 +0000 Subject: [issue18433] Clarify venv docs about which methods check for pre-existing paths In-Reply-To: <1373634128.21.0.571216700722.issue18433@psf.upfronthosting.co.za> Message-ID: <1373654163.67.0.462532656832.issue18433@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 20:44:56 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Jul 2013 18:44:56 +0000 Subject: [issue18368] PyOS_StdioReadline() leaks memory when realloc() fails In-Reply-To: <1373054563.49.0.685653845765.issue18368@psf.upfronthosting.co.za> Message-ID: <1373654696.96.0.13355001758.issue18368@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 20:45:54 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Jul 2013 18:45:54 +0000 Subject: [issue18372] _Pickler_New() doesn't call PyObject_GC_Track(self) In-Reply-To: <1373064790.68.0.920175606727.issue18372@psf.upfronthosting.co.za> Message-ID: <1373654754.69.0.467131535707.issue18372@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 20:47:28 2013 From: report at bugs.python.org (Sergey) Date: Fri, 12 Jul 2013 18:47:28 +0000 Subject: [issue18305] [patch] Fast sum() for non-numbers In-Reply-To: <1372228439.5.0.789865081817.issue18305@psf.upfronthosting.co.za> Message-ID: <1373654848.12.0.916477300337.issue18305@psf.upfronthosting.co.za> Sergey added the comment: > This "optimisation" is a semantic change. It breaks backward > compatibility in cases where a = a + b and a += b do not result > in the name a having the same value. In particular this breaks > backward compatibility for numpy users. I didn't knew that. Then I guess original fastsum.patch can't be used. Since this is not the first time when someone suggests to use __add__+__iadd__ in sum, I suggest to extend existing warning with your example so that future developers would not be tempted to follow the same approach. Patch fastsum-iadd_warning.patch attached and can be applied to 2.7.5, 3.3.2 and hg-tip. Apart from this patch there're still 3 options remaining (special case in sum() for some types; general interface for sequence-like types; individual optimisation for individual types), that are to be discussed yet. Example patch of special case for lists and tuples attached. ---------- Added file: http://bugs.python.org/file30904/fastsum-iadd_warning.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 21:01:09 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Jul 2013 19:01:09 +0000 Subject: [issue18373] implement sys.get/setbyteswarningflag() In-Reply-To: <1373065124.82.0.249288626652.issue18373@psf.upfronthosting.co.za> Message-ID: <1373655669.96.0.0567116035277.issue18373@psf.upfronthosting.co.za> STINNER Victor added the comment: When I added os.environb, I had issues with the ByteWarning, in os.get_exec_path() if I remember correctly. I had to play with warmings.catch_warning(). A thread variable would simplify the code. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 21:02:29 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 12 Jul 2013 19:02:29 +0000 Subject: [issue18428] IDLE startup error In-Reply-To: <1373543590.93.0.69905828801.issue18428@psf.upfronthosting.co.za> Message-ID: <1373655749.92.0.68405407677.issue18428@psf.upfronthosting.co.za> Ned Deily added the comment: If deleting .py files solved the problem, you probably had created a .py file with the same name as a Python standard library module. If that file is in your Documents folder (if you are using /Applications/Python3.3/IDLE.app) or your current working directory (if you use /usr/local/bin/idle3.3), that directory is inserted first on Python's search path for modules and the files there will be found before the normal standard library version. For example, if you create a dummy text file named socket.py in Documents and then double-click on IDLE.app, you should see the same message that the subprocess didn't make a connection because the dummy socket.py shadows the standard library socket module. In any case, I'm glad that the problem is resolved for you. ---------- resolution: -> works for me stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 21:10:56 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Jul 2013 19:10:56 +0000 Subject: [issue18368] PyOS_StdioReadline() leaks memory when realloc() fails In-Reply-To: <1373054563.49.0.685653845765.issue18368@psf.upfronthosting.co.za> Message-ID: <1373656256.36.0.127079986222.issue18368@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: A similar issue: #14909. ---------- nosy: +kristjan.jonsson, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 21:41:17 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Jul 2013 19:41:17 +0000 Subject: [issue18373] implement sys.get/setbyteswarningflag() In-Reply-To: <1373065124.82.0.249288626652.issue18373@psf.upfronthosting.co.za> Message-ID: <1373658077.1.0.771307804739.issue18373@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Read only access to bytes warning flag already implemented as sys.flags.bytes_warning. How new functions are related to it? And I concur with David. Why not just run your program with -b or -bb? Besides the testing purpose. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 21:42:56 2013 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 12 Jul 2013 19:42:56 +0000 Subject: [issue18433] Clarify venv docs about which methods check for pre-existing paths In-Reply-To: <1373634128.21.0.571216700722.issue18433@psf.upfronthosting.co.za> Message-ID: <1373658176.32.0.34657632581.issue18433@psf.upfronthosting.co.za> Vinay Sajip added the comment: I noticed that create_directories is now ensure_directories in the code, but the docs don't reflect this. I've posted changes, do they cover your concerns or have I missed something? ---------- assignee: docs at python -> vinay.sajip keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file30905/changes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 21:58:28 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Jul 2013 19:58:28 +0000 Subject: [issue18434] Update venv example to use setuptools In-Reply-To: <1373634234.22.0.916403882512.issue18434@psf.upfronthosting.co.za> Message-ID: <3bsQ1H4bxjzPX7@mail.python.org> Roundup Robot added the comment: New changeset 1641a03dbe7b by Vinay Sajip in branch '3.3': Issue #18434: Updated example script in venv docs to use setuptools rather than Distribute. http://hg.python.org/cpython/rev/1641a03dbe7b New changeset 24a55f04a571 by Vinay Sajip in branch 'default': Closes #18434: Merged documentation update from 3.3. http://hg.python.org/cpython/rev/24a55f04a571 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 22:05:18 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Jul 2013 20:05:18 +0000 Subject: [issue18431] Encoded words in structured headers are not decoded by the new parser. In-Reply-To: <1373573418.36.0.0145558554695.issue18431@psf.upfronthosting.co.za> Message-ID: <3bsQ994xkYz7Ljc@mail.python.org> Roundup Robot added the comment: New changeset 1f3c57ac07ed by R David Murray in branch '3.3': #18431: Decode encoded words in atoms in new email parser. http://hg.python.org/cpython/rev/1f3c57ac07ed New changeset 0c161b360ffe by R David Murray in branch 'default': Merge: #18431: Decode encoded words in atoms in new email parser. http://hg.python.org/cpython/rev/0c161b360ffe ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 22:06:18 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 12 Jul 2013 20:06:18 +0000 Subject: [issue18431] Encoded words in structured headers are not decoded by the new parser. In-Reply-To: <1373573418.36.0.0145558554695.issue18431@psf.upfronthosting.co.za> Message-ID: <1373659578.48.0.652408890421.issue18431@psf.upfronthosting.co.za> R. David Murray added the comment: Fixed. Thanks for the report, Tim. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 22:12:00 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2013 20:12:00 +0000 Subject: [issue18433] Clarify venv docs about which methods check for pre-existing paths In-Reply-To: <1373658176.32.0.34657632581.issue18433@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: LGTM On Fri, Jul 12, 2013 at 3:42 PM, Vinay Sajip wrote: > > Vinay Sajip added the comment: > > I noticed that create_directories is now ensure_directories in the code, > but the docs don't reflect this. I've posted changes, do they cover your > concerns or have I missed something? > > ---------- > assignee: docs at python -> vinay.sajip > keywords: +patch > stage: -> patch review > Added file: http://bugs.python.org/file30905/changes.diff > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 22:17:40 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2013 20:17:40 +0000 Subject: [issue18366] Look into using setuptools 0.8 with devinabox In-Reply-To: <1373050545.72.0.913004970997.issue18366@psf.upfronthosting.co.za> Message-ID: <1373660260.04.0.67024518657.issue18366@psf.upfronthosting.co.za> Brett Cannon added the comment: So this actually works out very nicely. The basic steps are: 1. Download ez_setup.py for setuptools 2. Create a venv 3. Install coverage.py (build actually works as expected which was a pleasant surprise) 4. Run coverage.py with PYTHONPATH set to fullcoverage as if coverage.py was installed 5. Generate coverage report as normal 6. Delete the venv (since coverage/tracer.so will not be built for the user's binary and they will be on a different platform which means the venv won't be linked properly, etc.) 7. Wipe out the built files in the coverage.py checkout (or just blow out the clone and re-clone) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 22:20:12 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Jul 2013 20:20:12 +0000 Subject: [issue18435] Move venv from a custom Context class to types.SimpleNamespace In-Reply-To: <1373654086.04.0.908147083699.issue18435@psf.upfronthosting.co.za> Message-ID: <3bsQVM3wmpz7Lkw@mail.python.org> Roundup Robot added the comment: New changeset fc340fcd43d2 by Vinay Sajip in branch '3.3': Issue #18435: Replaced simple attribute container class Context with types.SimpleNamespace. http://hg.python.org/cpython/rev/fc340fcd43d2 New changeset 113bfefbe5c5 by Vinay Sajip in branch 'default': Closes #18435: Merged fix from 3.3. http://hg.python.org/cpython/rev/113bfefbe5c5 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 22:24:16 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 12 Jul 2013 20:24:16 +0000 Subject: [issue18368] PyOS_StdioReadline() leaks memory when realloc() fails In-Reply-To: <1373054563.49.0.685653845765.issue18368@psf.upfronthosting.co.za> Message-ID: <1373660656.53.0.714181243621.issue18368@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Is it sufficient to check incr > INT_MAX to guard against overflow? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 22:46:16 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Jul 2013 20:46:16 +0000 Subject: [issue18434] Update venv example to use setuptools In-Reply-To: <1373634234.22.0.916403882512.issue18434@psf.upfronthosting.co.za> Message-ID: <3bsR4S21hRz7Ljl@mail.python.org> Roundup Robot added the comment: New changeset f8c3d05994e4 by Vinay Sajip in branch '3.3': Issue #18434: Updated example script to tidy up resources. http://hg.python.org/cpython/rev/f8c3d05994e4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 22:46:46 2013 From: report at bugs.python.org (Zachary Ware) Date: Fri, 12 Jul 2013 20:46:46 +0000 Subject: [issue18436] Add mapping of symbol to function to operator module Message-ID: <1373662006.12.0.760343850871.issue18436@psf.upfronthosting.co.za> New submission from Zachary Ware: In a thread on python-ideas[1], Nick mentioned the idea of ``operator.by_symbol['+=']`` which would be an alternative method of getting the operator.iadd function. The idea struck my fancy, so I implemented it (regardless of the very real possibility of being rejected anyway, judging by the current split vote in the thread :)). I also implemented Brett's suggestion of supporting '.attribute' and '[item]' as well. Here's the (still a bit rough) patch. [1] http://mail.python.org/pipermail/python-ideas/2013-July/022078.html ---------- components: Library (Lib) files: operator-symbol-map.diff keywords: patch messages: 192970 nosy: barry, belopolsky, brett.cannon, ncoghlan, serhiy.storchaka, zach.ware priority: normal severity: normal status: open title: Add mapping of symbol to function to operator module type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file30906/operator-symbol-map.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 22:54:22 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Jul 2013 20:54:22 +0000 Subject: [issue18433] Clarify venv docs about which methods check for pre-existing paths In-Reply-To: <1373634128.21.0.571216700722.issue18433@psf.upfronthosting.co.za> Message-ID: <3bsRFn5q5pz7Ljv@mail.python.org> Roundup Robot added the comment: New changeset 0ca31c07e85e by Vinay Sajip in branch '3.3': Issue #18433: Clarified venv documentation. http://hg.python.org/cpython/rev/0ca31c07e85e New changeset d292635314c9 by Vinay Sajip in branch 'default': Closes #18433: Merged documentation update from 3.3. http://hg.python.org/cpython/rev/d292635314c9 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 23:36:15 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 12 Jul 2013 21:36:15 +0000 Subject: [issue18430] gzip, bz2, lzma: peek advances file position of existing file object In-Reply-To: <1373571241.88.0.314815867736.issue18430@psf.upfronthosting.co.za> Message-ID: <1373664975.69.0.746815023231.issue18430@psf.upfronthosting.co.za> R. David Murray added the comment: I don't think the comment about save and restore of the file position adds enough value to be worth the possible confusion ("do I only need to save and restore around peek? Why?") I think the sentence should read, ex, "Calling a :class:`LZMAFile` object's :meth:`peek` method does not advance its access position, but the access position of the underlying :term:`file object` may be affected." Note that I have no objection to making the two sync up, if it is in fact possible. But if Serhiy says it can't be, I expect he's right. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 23:41:27 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Jul 2013 21:41:27 +0000 Subject: [issue18436] Add mapping of symbol to function to operator module In-Reply-To: <1373662006.12.0.760343850871.issue18436@psf.upfronthosting.co.za> Message-ID: <1373665287.86.0.858438326454.issue18436@psf.upfronthosting.co.za> ?ric Araujo added the comment: Added some comments on Rietveld. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 23:56:10 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 12 Jul 2013 21:56:10 +0000 Subject: [issue18112] PEP 442 implementation In-Reply-To: <1371320764.63.0.0772595125462.issue18112@psf.upfronthosting.co.za> Message-ID: <1373666170.34.0.997882236453.issue18112@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Added file: http://bugs.python.org/file30907/f5ddbd98c2bf.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 23:59:10 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 12 Jul 2013 21:59:10 +0000 Subject: [issue18112] PEP 442 implementation In-Reply-To: <1371320764.63.0.0772595125462.issue18112@psf.upfronthosting.co.za> Message-ID: <1373666350.01.0.333670572568.issue18112@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Updated patch (again). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 00:18:38 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Jul 2013 22:18:38 +0000 Subject: [issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s In-Reply-To: <1373103302.65.0.774257874247.issue18374@psf.upfronthosting.co.za> Message-ID: <1373667518.24.0.532331969526.issue18374@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 00:21:55 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Jul 2013 22:21:55 +0000 Subject: [issue18389] document that os.path.relpath does not interrogate the file system In-Reply-To: <1373141672.93.0.461698296017.issue18389@psf.upfronthosting.co.za> Message-ID: <3bsTBp0lmnzS77@mail.python.org> Roundup Robot added the comment: New changeset 70837970c5d8 by R David Murray in branch '3.3': #18389: Clarify that relpath does not access the file system. http://hg.python.org/cpython/rev/70837970c5d8 New changeset 7de05609e390 by R David Murray in branch 'default': #18389: Clarify that relpath does not access the file system. http://hg.python.org/cpython/rev/7de05609e390 New changeset 1345d8dbcb19 by R David Murray in branch '2.7': #18389: Clarify that relpath does not access the file system. http://hg.python.org/cpython/rev/1345d8dbcb19 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 00:22:37 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Jul 2013 22:22:37 +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: <1373667757.13.0.5738702777.issue18375@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I know that there is no proper regrtest doc to update, but is there a docstring somewhere in the manual? Or should this be closed? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 00:23:06 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 12 Jul 2013 22:23:06 +0000 Subject: [issue18389] document that os.path.relpath does not interrogate the file system In-Reply-To: <1373141672.93.0.461698296017.issue18389@psf.upfronthosting.co.za> Message-ID: <1373667786.29.0.527078163547.issue18389@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Madison. I tweaked the wording slightly, but the essence is the same :). ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 00:23:46 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Jul 2013 22:23:46 +0000 Subject: [issue18376] show the effective count of process when running the testsuite In-Reply-To: <1373107337.89.0.95411987573.issue18376@psf.upfronthosting.co.za> Message-ID: <1373667826.62.0.0551225995624.issue18376@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 00:25:04 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Jul 2013 22:25:04 +0000 Subject: [issue18430] gzip, bz2, lzma: peek advances file position of existing file object In-Reply-To: <1373571241.88.0.314815867736.issue18430@psf.upfronthosting.co.za> Message-ID: <1373667904.76.0.828660871661.issue18430@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: A file can be non-seekable (pipe, socket) and we can't "unread" unused data back. We can't implement GzipFile.peek() in terms of underlied file's peek() because peek() doesn't guaranteed return more than one byte, but it should return at least one byte if the file is not ended. We can't detect the end of compressed data without reading some data past the end of compressed data. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 00:26:23 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Jul 2013 22:26:23 +0000 Subject: [issue18383] test_warnings modifies warnings.filters when running with "-W default" In-Reply-To: <1373117774.47.0.846306714059.issue18383@psf.upfronthosting.co.za> Message-ID: <1373667983.49.0.548106749172.issue18383@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 00:28:23 2013 From: report at bugs.python.org (Madison May) Date: Fri, 12 Jul 2013 22:28:23 +0000 Subject: [issue18389] document that os.path.relpath does not interrogate the file system In-Reply-To: <1373141672.93.0.461698296017.issue18389@psf.upfronthosting.co.za> Message-ID: <1373668103.41.0.626645346673.issue18389@psf.upfronthosting.co.za> Madison May added the comment: Thanks, David. I like your changes -- sounds a lot cleaner and more explicit. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 01:28:42 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 12 Jul 2013 23:28:42 +0000 Subject: [issue18112] PEP 442 implementation In-Reply-To: <1371320764.63.0.0772595125462.issue18112@psf.upfronthosting.co.za> Message-ID: <1373671722.16.0.648681819795.issue18112@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Sorry for taking forever. I got half-way through version 1, but now I suppose I'm terribly behind the latest and greatest. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 02:19:12 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Jul 2013 00:19:12 +0000 Subject: [issue18365] Idle: mock Text class and test thereof In-Reply-To: <1373006946.99.0.696971871982.issue18365@psf.upfronthosting.co.za> Message-ID: <3bsWp12T28z7Ljl@mail.python.org> Roundup Robot added the comment: New changeset 5ac2ec0a34a5 by Terry Jan Reedy in branch '2.7': Issue #18365: Add mock Text class and test thereof versus tk.Text. http://hg.python.org/cpython/rev/5ac2ec0a34a5 New changeset 8f13fb4c5826 by Terry Jan Reedy in branch '3.3': Issue #18365: Add mock Text class and test thereof versus tk.Text. http://hg.python.org/cpython/rev/8f13fb4c5826 New changeset 5611d3a954f8 by Terry Jan Reedy in branch '3.3': Issue #18365: normalize whitespace http://hg.python.org/cpython/rev/5611d3a954f8 New changeset 86cc1983a94d by Terry Jan Reedy in branch '2.7': Issue #18365: normalize whitespace http://hg.python.org/cpython/rev/86cc1983a94d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 02:20:21 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jul 2013 00:20:21 +0000 Subject: [issue18365] Idle: mock Text class and test thereof In-Reply-To: <1373006946.99.0.696971871982.issue18365@psf.upfronthosting.co.za> Message-ID: <1373674821.52.0.985735885389.issue18365@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I documented and left most of the 'pass' methods. The bind method is inherited from Misc class and is not specifically a Text method, but I will leave it here for now. These def undo_block_start(self, *args): pass def undo_block_stop(self, *args): pass are not Text methods, so I removed them. We can discuss what you intended as part of the FormatParagraph issue. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 02:49:13 2013 From: report at bugs.python.org (Joshua Landau) Date: Sat, 13 Jul 2013 00:49:13 +0000 Subject: [issue2292] Missing *-unpacking generalizations In-Reply-To: <1205595680.3.0.859525264867.issue2292@psf.upfronthosting.co.za> Message-ID: <1373676553.12.0.392241627538.issue2292@psf.upfronthosting.co.za> Joshua Landau added the comment: http://www.python.org/dev/peps/pep-0448/ is out; see what you think. See http://mail.python.org/pipermail/python-ideas/2013-July/021872.html for all the juicy discussion so far. ---------- nosy: +Joshua.Landau _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 02:54:19 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jul 2013 00:54:19 +0000 Subject: [issue18429] IDLE: Format Paragraph doesn't function with comment blocks In-Reply-To: <1373565372.76.0.397397850212.issue18429@psf.upfronthosting.co.za> Message-ID: <1373676859.19.0.422393941344.issue18429@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I expect to find things like this while writing tests. A small fix can be part of the test file commit, like I did with configSectionNameDialog and its test. In any case, where is the test that fails without the patch and passes with it? It should be part of this patch, whether it is included with the test patch or kept separate. ---------- stage: -> test needed versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 02:58:34 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jul 2013 00:58:34 +0000 Subject: [issue18410] IDLE Improvements: Unit test for SearchDialog.py In-Reply-To: <1373338807.5.0.870375456877.issue18410@psf.upfronthosting.co.za> Message-ID: <1373677114.39.0.397642436323.issue18410@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 03:01:47 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Jul 2013 01:01:47 +0000 Subject: [issue18432] sched modules queue property should return a list, not an iterator In-Reply-To: <1373614281.57.0.554958596911.issue18432@psf.upfronthosting.co.za> Message-ID: <1373677307.13.0.0909419375685.issue18432@psf.upfronthosting.co.za> Raymond Hettinger added the comment: It's pretty weird to use a property for an iterator. It we really wanted iteration, the appropriate method would be __iter__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 03:10:22 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jul 2013 01:10:22 +0000 Subject: [issue18409] IDLE Improvements: Unit test for AutoComplete.py In-Reply-To: <1373337231.6.0.320085332655.issue18409@psf.upfronthosting.co.za> Message-ID: <1373677822.82.0.758522387726.issue18409@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 03:44:28 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Jul 2013 01:44:28 +0000 Subject: [issue18365] Idle: mock Text class and test thereof In-Reply-To: <1373006946.99.0.696971871982.issue18365@psf.upfronthosting.co.za> Message-ID: <1373679868.81.0.299199710215.issue18365@psf.upfronthosting.co.za> R. David Murray added the comment: Looks like this is causing buildbot failures: http://buildbot.python.org/all/builders/x86%20RHEL%206%203.x/builds/2330/steps/test/logs/stdio http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%203.x/builds/6094/steps/test/logs/stdio ---------- nosy: +r.david.murray stage: commit review -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 04:15:33 2013 From: report at bugs.python.org (Nick Bargnesi) Date: Sat, 13 Jul 2013 02:15:33 +0000 Subject: [issue18430] gzip, bz2, lzma: peek advances file position of existing file object In-Reply-To: <1373571241.88.0.314815867736.issue18430@psf.upfronthosting.co.za> Message-ID: <1373681733.63.0.144906347089.issue18430@psf.upfronthosting.co.za> Nick Bargnesi added the comment: I'd suggest sticking with "file position" instead of switching to "access position". E.g., the complete lzma wording would be: Return buffered data without advancing the file position. At least one byte of data will be returned, unless EOF has been reached. The exact number of bytes returned is unspecified (the *size* argument is ignored). Although calling a :class:`LZMAFile` object's :meth:`peek` method does not advance its file position, the file position of the underlying :term:`file object` may be affected. The point about mentioning "save and restore" notwithstanding, *any* documentation about the effect on position change is a step in the right direction. If the file position not changing is the better scenario, having the side effect documented is at least good. We can save people's time by being explicit about the side effect _and_ maintain code readability. Imagine hunting for a bug manifesting itself as a change in file position only to find out a peek() call was the cause. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 04:42:24 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Jul 2013 02:42:24 +0000 Subject: [issue18430] gzip, bz2, lzma: peek advances file position of existing file object In-Reply-To: <1373571241.88.0.314815867736.issue18430@psf.upfronthosting.co.za> Message-ID: <1373683344.48.0.919593662389.issue18430@psf.upfronthosting.co.za> R. David Murray added the comment: I chose 'access position' because that's the terminology used in the 'seek' man page. 'file position' sounds odd to me, but since that is the term already used it does make sense to be consistent. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python stage: -> needs patch versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 04:52:12 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 13 Jul 2013 02:52:12 +0000 Subject: [issue18437] Typo in comment inside class Charset about output_charset Message-ID: <1373683932.23.0.900604303434.issue18437@psf.upfronthosting.co.za> New submission from Vajrasky Kok: Python 3.4, line 197: output_charset: Some character sets must be converted before the can be It is supposed to be: output_charset: Some character sets must be converted before they can be ---------- assignee: docs at python components: Documentation files: fix_typo_charset.txt messages: 192990 nosy: docs at python, r.david.murray, vajrasky priority: normal severity: normal status: open title: Typo in comment inside class Charset about output_charset versions: Python 3.4 Added file: http://bugs.python.org/file30908/fix_typo_charset.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 04:57:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Jul 2013 02:57:25 +0000 Subject: [issue18437] Typo in comment inside class Charset about output_charset In-Reply-To: <1373683932.23.0.900604303434.issue18437@psf.upfronthosting.co.za> Message-ID: <3bsbJj1xjXz7Ljl@mail.python.org> Roundup Robot added the comment: New changeset f91e6d0eb0f7 by R David Murray in branch '3.3': #18437: fix comment typo. http://hg.python.org/cpython/rev/f91e6d0eb0f7 New changeset da7d97ca1ef6 by R David Murray in branch 'default': Merge: #18437: fix comment typo. http://hg.python.org/cpython/rev/da7d97ca1ef6 New changeset 868010ed641c by R David Murray in branch '2.7': #18437: fix comment typo. http://hg.python.org/cpython/rev/868010ed641c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 04:58:02 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Jul 2013 02:58:02 +0000 Subject: [issue18437] Typo in comment inside class Charset about output_charset In-Reply-To: <1373683932.23.0.900604303434.issue18437@psf.upfronthosting.co.za> Message-ID: <1373684282.48.0.86532074591.issue18437@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks. Fixed. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 05:30:54 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jul 2013 03:30:54 +0000 Subject: [issue18279] IDLE Unit test for RstripExtension.py In-Reply-To: <1371854273.68.0.541594598967.issue18279@psf.upfronthosting.co.za> Message-ID: <1373686254.4.0.247304680492.issue18279@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Phil (and everyone else): PLEASE submit patches with 4 space indents and no tabs and no trailing spaces. Even if the code below runs in the CPython interpreter, self.undo = mockUndoDelegator() <8 spaces> <4 spaces> def get_selection_indices(self): <4 spaces> first = self.text.index('1.0') <4 spaces, 1 tab > class mockUndoDelegator: def undo_block_start(*args): <1 tab> pass <2 tabs> the CPython repository whitespace pre-commit will say this: remote: - file Lib/idlelib/idle_test/test_text.py is not whitespace-normalized in 979905090779 remote: * Run Tools/scripts/reindent.py on .py files or Tools/scripts /reindent-rst.py on .rst files listed above remote: * and commit that change before pushing to this repo. remote: transaction abort! remote: rollback completed as happened with the mock_tk/test_text patch. I already fixed this file, but next time... About no trailing whitespace: that is not an option when committing, so I will change the string literal to use explicit \n and implicit catenation, as in 'ab \n' 'cd\n' == 'ab \ncd\n'. This will make the trailing ws visible anyway. The way to not get the tk=added \n is to use 'insert' rather than 'end', as inself.text.get('1.0','insert'). 'Insert' is the end of user input, before the guard. Will commit patch soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 05:41:51 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 13 Jul 2013 03:41:51 +0000 Subject: [issue18438] Obsolete url in comment inside decimal module Message-ID: <1373686911.48.0.750703855786.issue18438@psf.upfronthosting.co.za> New submission from Vajrasky Kok: Python 3.4, file Lib/decimal.py, line 24: www.cs.berkeley.edu/~ejr/projects/754/private/drafts/854-1987/dir.html If you go to the website, you'll encounter this error: The server has encountered a problem because the resource was not found. I could not find the replacement. The only thing that I could find is the paid material found here: http://ieeexplore.ieee.org/xpl/mostRecentIssue.jsp?punumber=2502 That's not good. ---------- assignee: docs at python components: Documentation messages: 192994 nosy: docs at python, rhettinger, vajrasky priority: normal severity: normal status: open title: Obsolete url in comment inside decimal module versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:02:46 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Jul 2013 04:02:46 +0000 Subject: [issue18365] Idle: mock Text class and test thereof In-Reply-To: <1373006946.99.0.696971871982.issue18365@psf.upfronthosting.co.za> Message-ID: <3bscm52yV8z7Ljc@mail.python.org> Roundup Robot added the comment: New changeset 008d83c4efaf by Terry Jan Reedy in branch '2.7': Issue #18365: 2.7 corrections so tests run http://hg.python.org/cpython/rev/008d83c4efaf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:23:27 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Jul 2013 04:23:27 +0000 Subject: [issue18352] collections.Counter with added attributes are not deepcopied properly. In-Reply-To: <1372862605.72.0.11799816843.issue18352@psf.upfronthosting.co.za> Message-ID: <1373689407.76.0.860661821273.issue18352@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Do you guys have any actual motivating use cases or real code that won't work because of the present design? Consistency arguments are somewhat weak and don't necessarily warrant an API change. AFAICT, there is no use for counters going out of their way to save attributes. Like many classes and types in Python, a subclasser is responsible for adding extra behavior if needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:48:05 2013 From: report at bugs.python.org (Todd Rovito) Date: Sat, 13 Jul 2013 04:48:05 +0000 Subject: [issue18429] IDLE: Format Paragraph doesn't function with comment blocks In-Reply-To: <1373565372.76.0.397397850212.issue18429@psf.upfronthosting.co.za> Message-ID: <1373690885.5.0.817556560488.issue18429@psf.upfronthosting.co.za> Todd Rovito added the comment: Terry, I was suffering from the classic chicken and egg problem so I was not sure if the test case in http://bugs.python.org/issue18226 should include the small code change. I will work with Phil Webster to get this small change added to issue 18226 along with test cases. Thanks! ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:52:37 2013 From: report at bugs.python.org (Todd Rovito) Date: Sat, 13 Jul 2013 04:52:37 +0000 Subject: [issue18279] IDLE Unit test for RstripExtension.py In-Reply-To: <1371854273.68.0.541594598967.issue18279@psf.upfronthosting.co.za> Message-ID: <1373691157.7.0.954258713201.issue18279@psf.upfronthosting.co.za> Todd Rovito added the comment: As a suggestion I always use the command "make patchcheck" (before making the patch) which catches the white space and tab problem plus it fixes other things. Here is more information on patch check in the developer's guide. http://docs.python.org/devguide/committing.html#patch-checklist ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 07:04:42 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jul 2013 05:04:42 +0000 Subject: [issue18365] Idle: mock Text class and test thereof In-Reply-To: <1373006946.99.0.696971871982.issue18365@psf.upfronthosting.co.za> Message-ID: <1373691882.0.0.387175410111.issue18365@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Well, that is annoying. I expected 2.7 failures due to mistakes already corrected, but not with 3.x, and these look to be the latter. ====================================================================== ERROR: setUpClass (idlelib.idle_test.test_text.TkTextTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/idlelib/idle_test/test_text.py", line 219, in setUpClass cls.root = Tk() File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/tkinter/__init__.py", line 1789, in __init__ self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: no display name and no $DISPLAY environment variable I do not get this on my system, and I just retried with F:\Python\dev\py34\PCbuild>python_d -m test -v -ugui test_idle and that works. I did get a test_idle failure running all tests and a crash with test_marshal in test_bad_reader (test.test_marshal.BugsTestCase) so I am rerunning with -v. This claims the problem is _tkinter.TclError: Can't find a usable init.tcl in the following directories: This is followed by a list of non-existent directories that omits the one what it actually is and where it is routinely found and it obviously was on the previous run with only test_idle run. What puzzles me is that both buildbots skipped test_tk and test_ttk_guionly, which suggests that they do not have -ugui, (Nick, one of these is yours) which means they should not have ever called tkinter. On my machine, requires('gui') works to stop the tkinter test case from running when I omit -ugui. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 07:28:07 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jul 2013 05:28:07 +0000 Subject: [issue18279] IDLE Unit test for RstripExtension.py In-Reply-To: <1371854273.68.0.541594598967.issue18279@psf.upfronthosting.co.za> Message-ID: <1373693287.78.0.500272192738.issue18279@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am aware of patchcheck, but the problem for me is that 'make patchcheck' does not work on Windows; the doc is wrong on the awkward to type Windows alternative; and it is usually useless anyway. But I agree that anyone who does not use a editor configured to automatically converts tabs to 4 spaces, as are both Idle and Notepad++ here, should run reindent.py. When I learn how to write extensions, maybe I will work on one to run or imitate patchcheck, and offer to open Acks and News for editing if not in the changeset. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 07:41:14 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jul 2013 05:41:14 +0000 Subject: [issue16079] list duplicate test names with patchcheck In-Reply-To: <1348827338.06.0.659343787847.issue16079@psf.upfronthosting.co.za> Message-ID: <1373694074.63.0.712918597169.issue16079@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 08:10:19 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jul 2013 06:10:19 +0000 Subject: [issue18439] Patchcheck for ACKS, NEWS does not work on Windows. Message-ID: <1373695819.6.0.661777672646.issue18439@psf.upfronthosting.co.za> New submission from Terry J. Reedy: My current list of changed_files() (command from the code) % hg status --added --modified --no-status Lib\idlelib\RstripExtension.py Misc\ACKS Misc\NEWS Lib\idlelib\idle_test\mock_idle.py Lib\idlelib\idle_test\test_rstrip.py but F:\Python\dev\py33>pcbuild\python_d tools/scripts/patchcheck.py ... Misc/ACKS updated ... NO Misc/NEWS updated ... NO The problem is that 'Misc/ACKs' is not in the list, even though 'Misc\ACKS' is ;-(. One possible fix is to conditionally change '\' to '/' in the file list, or maybe just in special_files, as that seems to be the only category affected. Another is to change line 156 (3.3) from special_files = {'Misc/ACKS', 'Misc/NEWS'} & set(file_paths) to special_files = {'Misc/ACKS', 'Misc/NEWS', 'Misc\ACKS', Misc\NEWS'} & set(file_paths). A third is to check for both versions in credit_given() (125) and reported_news() (131). I don't know if there is an issue with Macs or not. ---------- components: Demos and Tools, Windows messages: 193001 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: Patchcheck for ACKS, NEWS does not work on Windows. type: behavior versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 08:13:05 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jul 2013 06:13:05 +0000 Subject: [issue18279] IDLE Unit test for RstripExtension.py In-Reply-To: <1371854273.68.0.541594598967.issue18279@psf.upfronthosting.co.za> Message-ID: <1373695985.81.0.123206539862.issue18279@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Trying it out, I rediscovered that patchcheck has a Windows bug. This time I reported it ;-) #18439. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 08:35:33 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Jul 2013 06:35:33 +0000 Subject: [issue18279] IDLE Unit test for RstripExtension.py In-Reply-To: <1371854273.68.0.541594598967.issue18279@psf.upfronthosting.co.za> Message-ID: <3bsh8P1D05z7Ll0@mail.python.org> Roundup Robot added the comment: New changeset ec71fcdcfeac by Terry Jan Reedy in branch '2.7': Issue #18279: Add tests for idlelib/RstripExtension.py. Original patch by http://hg.python.org/cpython/rev/ec71fcdcfeac New changeset 22ce68d98345 by Terry Jan Reedy in branch '3.3': Issue #18279: Add tests for idlelib/RstripExtension.py. Original patch by http://hg.python.org/cpython/rev/22ce68d98345 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 08:40:25 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jul 2013 06:40:25 +0000 Subject: [issue18279] IDLE Unit test for RstripExtension.py In-Reply-To: <1371854273.68.0.541594598967.issue18279@psf.upfronthosting.co.za> Message-ID: <1373697625.73.0.655943063052.issue18279@psf.upfronthosting.co.za> Terry J. Reedy added the comment: A simple change to RstripExtension.py fixed the marking of unchanged files as changed. I also removed a useless extra iteration. Having a test makes it possible to do things like this without breaking what already worked. ---------- dependencies: -Idle: mock Text class and test thereof resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 08:42:29 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jul 2013 06:42:29 +0000 Subject: [issue18279] IDLE Unit test for RstripExtension.py In-Reply-To: <1371854273.68.0.541594598967.issue18279@psf.upfronthosting.co.za> Message-ID: <1373697749.46.0.430526031303.issue18279@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I had to remove the dependency to close this, since the test_text issue #18365 was reopened. ---------- stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:07:04 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Jul 2013 08:07:04 +0000 Subject: [issue18365] Idle: mock Text class and test thereof In-Reply-To: <1373006946.99.0.696971871982.issue18365@psf.upfronthosting.co.za> Message-ID: <3bsk9z4HgTz7Lkk@mail.python.org> Roundup Robot added the comment: New changeset bc3a34e47923 by Terry Jan Reedy in branch '3.3': Issue #18365: convert buildbot errors to skips. http://hg.python.org/cpython/rev/bc3a34e47923 New changeset ba4c826848d5 by Terry Jan Reedy in branch '2.7': Issue #18365: convert buildbot errors to skips. http://hg.python.org/cpython/rev/ba4c826848d5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:07:54 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jul 2013 08:07:54 +0000 Subject: [issue18365] Idle: mock Text class and test thereof In-Reply-To: <1373006946.99.0.696971871982.issue18365@psf.upfronthosting.co.za> Message-ID: <1373702874.12.0.898439315243.issue18365@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Looking through the 11 stable 3.x buildbots (1 still running), I see 3 outcomes. 1. Windows: test seemed to run, test_idle listed in 'altered environment'. 2. Some *nix: test gave no error, test_idle lit in 'tests skipped'. I presume this means that at least one thing was skipped, not the entire idle suite. 3. Other *nix: no test failed, but the one test case setup gave the tclerror. This also includes the 'murray' machine. Yours, David? _tkinter.create just calls Tkapp_New with the same args and the message comes from tcl/tk. I do not know if 'display name' is the same as the 'screenName' parameter or not. The doc string just says "Return a new Toplevel widget on screen SCREENNAME." Is this something to do with X11? If so, why isn't $DISPLAY set? Passing screenName='fake' has no effect on my Win7 machine. I think the following patch should quiet things for now, even if not the best patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 11:23:11 2013 From: report at bugs.python.org (Berker Peksag) Date: Sat, 13 Jul 2013 09:23:11 +0000 Subject: [issue12916] Add inspect.splitdoc In-Reply-To: <1315326747.38.0.43030903994.issue12916@psf.upfronthosting.co.za> Message-ID: <1373707391.94.0.69987046024.issue12916@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag stage: -> needs patch versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 12:11:23 2013 From: report at bugs.python.org (arsalan) Date: Sat, 13 Jul 2013 10:11:23 +0000 Subject: [issue4534] problem with str.join - should work with list input, error says requires 'str' object In-Reply-To: <1228422862.72.0.643354735344.issue4534@psf.upfronthosting.co.za> Message-ID: <1373710283.85.0.347916027539.issue4534@psf.upfronthosting.co.za> arsalan added the comment: it is really a good help ---------- nosy: +bkyasi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 12:52:37 2013 From: report at bugs.python.org (Olivier Gagnon) Date: Sat, 13 Jul 2013 10:52:37 +0000 Subject: [issue18352] collections.Counter with added attributes are not deepcopied properly. In-Reply-To: <1372862605.72.0.11799816843.issue18352@psf.upfronthosting.co.za> Message-ID: <1373712757.62.0.258510071031.issue18352@psf.upfronthosting.co.za> Olivier Gagnon added the comment: Yes I do have code that break because of this behaviour. I'm doing evolutionary algorithm using a framework called DEAP. This framework creates a type called individual at the runtime by subclassing a container and adding it a fitness attribute. Those individual are copied as not to modify every indivual when we work on a single one. AFAIK the only container that can't be used right now is the counter because the fitness is not copied. I'm sure I can come up with a hack to have this behaviour, but it does clash with other standard container type and there is no mention anywhere that the Counter should be different than every other container type in the python standard library. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 15:43:51 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Jul 2013 13:43:51 +0000 Subject: [issue18365] Idle: mock Text class and test thereof In-Reply-To: <1373006946.99.0.696971871982.issue18365@psf.upfronthosting.co.za> Message-ID: <1373723031.89.0.76644810198.issue18365@psf.upfronthosting.co.za> R. David Murray added the comment: Yeah, DISPLAY is how unix finds the X11 display. I don't remember how the tkguionly tests deal with that being missing, but since the tests are run "headless" there is indeed no DISPLAY for the tests to talk to. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 15:48:28 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Jul 2013 13:48:28 +0000 Subject: [issue18365] Idle: mock Text class and test thereof In-Reply-To: <1373006946.99.0.696971871982.issue18365@psf.upfronthosting.co.za> Message-ID: <1373723308.38.0.918063045261.issue18365@psf.upfronthosting.co.za> R. David Murray added the comment: Looks like ttk_guionly gets skipped on my buildbot because of the following code at the top of test_ttk_guionly: try: ttk.Button() except TclError as msg: # assuming ttk is not available raise unittest.SkipTest("ttk not available: %s" % msg) So your skip fix may actually be the best solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 15:51:00 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Jul 2013 13:51:00 +0000 Subject: [issue18439] Patchcheck for ACKS, NEWS does not work on Windows. In-Reply-To: <1373695819.6.0.661777672646.issue18439@psf.upfronthosting.co.za> Message-ID: <1373723460.33.0.433166440421.issue18439@psf.upfronthosting.co.za> R. David Murray added the comment: Using os.path.join to create the filenames should also work, I would think. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 20:34:45 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 13 Jul 2013 18:34:45 +0000 Subject: [issue18440] hash() and __hash__() do not document their size constraints Message-ID: <1373740485.69.0.943591579445.issue18440@psf.upfronthosting.co.za> New submission from Barry A. Warsaw: If you have a custom object that implements __hash__() and it returns a value wider than Py_ssize_t, built-in hash() on the object will truncate information. This is because hash() takes the value returned by obj.__hash__() and coerces it through PyLong_FromSsize_t(). This can cause object hashes to have different values on 64bit and 32bit machines, e.g. on 64bit Linux where Py_ssize_t is 8 bytes wide vs. 32bit Linux where it is 4 bytes wide. This may be perfectly reasonable from an implementation point of (ref: issue9778) but it is surprising since it is not documented. This size constraint on object hashes should be documented. from ctypes import * class Foo: def __hash__(self): return 0x1332a6000000000 print(hash(Foo()), sizeof(c_ssize_t)) ---64bit Ubuntu 13.10--- $ python3.3 hashex.py 86459409655398400 8 ---32bit Ubuntu 13.10--- $ python3 hashex.py 40260800 4 ---------- assignee: docs at python components: Documentation messages: 193014 nosy: barry, docs at python priority: normal severity: normal status: open title: hash() and __hash__() do not document their size constraints type: behavior versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 00:34:07 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jul 2013 22:34:07 +0000 Subject: [issue18441] Idle: Make test.support.requires('gui') skip when it should. Message-ID: <1373754847.55.0.0641648695763.issue18441@psf.upfronthosting.co.za> New submission from Terry J. Reedy: This is a continuation of #18365, where it was discovered after the first set of pushes that test.support.requires('gui') is currently insufficient (on non-Windows systems) for skipping gui tests on buildbots when they should be skipped, because the attempt to create a Tk root widget will raise TclError when there is no display available. This bug appears to arise from the confluence of two bugs: 1. It appears that on some buildbots, support.use_resources contains 'gui' when it should not. The could be either from -ugui or -uall without '.-gui' or ???. 2. test.support.requires starts with if resource == 'gui' and not _is_gui_available(): On windows, _is_gui_available() uses ctypes to determine that there really is a graphics screen (or something like that). On other systems, it just returns True, even when it should return False. The problem was fixed for #18365 by wrapping the tkinter.Tk call with try:...except: TclErrror: raise SkipTest. Rather than put something like that workaround in every idle_test/test_xxx file, I would like to do the test once in test/test_idle and if it does not work, remove 'gui' from use_resources so requires('gui') will work properly. See patch. test/test_ttkguionly does not use requires() (and therefore does not do the special Windows check). It first tries to import _tkinter, as does test_idle. It then calls tkinter.test.support.check_tk_availability. That either does a 'darwin'-ctypes check similar to the one for Windows in _is_gui_available or it tries to create a tk widget and looks for a TclError. test_ttkguionly then repeats the widget creation test. This checking is ok for one file, but not for gui tests sprinkled throughout idle's test_xxx files. Perhaps requires('gui') not being dependable is why there is a separate test_ttkguionly file *and* a custom discovery function, tkinter.test.runtests.get_tests, to get only gui tests. test/test_tk does the same except that is does not repeat the widget creation test. Both add 'gui' to use_resources when the file is run as main, though in a more convoluted manner than in test_idle. I am sure that removing 'gui' in test_idle cannot hurt since test_tk/ttk_gui-only skip anyway on a similar TclError. There is no test_turtle.py. The check should really be done in regrtest, but I am not familiar with its code or the policy on patching it. Then tkinter tests could also dispense with their extra checks and more easily be converted to use unittest discovery. But that is not my concern here. ---------- assignee: terry.reedy files: delete_gui.diff keywords: patch messages: 193015 nosy: r.david.murray, terry.reedy priority: high severity: normal stage: commit review status: open title: Idle: Make test.support.requires('gui') skip when it should. type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30909/delete_gui.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 00:37:23 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jul 2013 22:37:23 +0000 Subject: [issue18365] Idle: mock Text class and test thereof In-Reply-To: <1373006946.99.0.696971871982.issue18365@psf.upfronthosting.co.za> Message-ID: <1373755043.74.0.54270450572.issue18365@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The change worked, so this issue can be closed. I opened a new issue, #18441, for dealing with the problem in test_idle by moving the TclError check there, so it does not arise in other idle_test/test_*.py files. ---------- stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 01:22:37 2013 From: report at bugs.python.org (paul j3) Date: Sat, 13 Jul 2013 23:22:37 +0000 Subject: [issue11874] argparse assertion failure with brackets in metavars In-Reply-To: <1303201252.58.0.236363581255.issue11874@psf.upfronthosting.co.za> Message-ID: <1373757757.53.0.910590170854.issue11874@psf.upfronthosting.co.za> Changes by paul j3 : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 03:49:04 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 14 Jul 2013 01:49:04 +0000 Subject: [issue18441] Idle: Make test.support.requires('gui') skip when it should. In-Reply-To: <1373754847.55.0.0641648695763.issue18441@psf.upfronthosting.co.za> Message-ID: <1373766544.79.0.66015974183.issue18441@psf.upfronthosting.co.za> Ned Deily added the comment: See Issue8716 for the history of check_tk_availability(). At the time, the Tk tests were the only ones trying to create real Tk objects (and thus causing crashes on some buildbot configurations). With the addition of IDLE tests that call Tk, it probably makes sense to refactor check_tk_availability() into the common test test_support/support helper module so it can be used globally. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:17:10 2013 From: report at bugs.python.org (=?utf-8?q?F=C3=A9vry_Thibault?=) Date: Sun, 14 Jul 2013 02:17:10 +0000 Subject: [issue18442] Typo in developers.rst line 27 Message-ID: <1373768230.84.0.132672962181.issue18442@psf.upfronthosting.co.za> New submission from F?vry Thibault: 'prush' -> 'push' ---------- components: Devguide messages: 193018 nosy: ezio.melotti, iwontbecreative priority: normal severity: normal status: open title: Typo in developers.rst line 27 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:27:11 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Jul 2013 02:27:11 +0000 Subject: [issue18442] Typo in developers.rst line 27 In-Reply-To: <1373768230.84.0.132672962181.issue18442@psf.upfronthosting.co.za> Message-ID: <3btBbM0WXQz7Llp@mail.python.org> Roundup Robot added the comment: New changeset 291c17c3d83f by Ned Deily in branch 'default': Closes Issue #18442: fix typo (noticed by F?vry Thibault). http://hg.python.org/devguide/rev/291c17c3d83f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:28:09 2013 From: report at bugs.python.org (=?utf-8?q?F=C3=A9vry_Thibault?=) Date: Sun, 14 Jul 2013 02:28:09 +0000 Subject: [issue9893] Removing the Misc/Vim/ files In-Reply-To: <1284827686.39.0.471855984875.issue9893@psf.upfronthosting.co.za> Message-ID: <1373768889.72.0.953067525111.issue9893@psf.upfronthosting.co.za> F?vry Thibault added the comment: The files weres indeed removed but Misc/Readme was not updated accordingly. The last line needs to be removed. ---------- nosy: +iwontbecreative _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:28:10 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 14 Jul 2013 02:28:10 +0000 Subject: [issue18442] Typo in developers.rst line 27 In-Reply-To: <1373768230.84.0.132672962181.issue18442@psf.upfronthosting.co.za> Message-ID: <1373768890.76.0.952525450887.issue18442@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 05:37:45 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 14 Jul 2013 03:37:45 +0000 Subject: [issue11874] argparse assertion failure with brackets in metavars In-Reply-To: <1303201252.58.0.236363581255.issue11874@psf.upfronthosting.co.za> Message-ID: <1373773065.66.0.72711996926.issue11874@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Attached the unit test. Here is the simpler script to product the bug: ------------------------ import argparse parser = argparse.ArgumentParser(prog='PROG') parser.add_argument ('--a', metavar='a'*76) parser.add_argument ('--b', metavar="[innerpart]outerpart") parser.add_argument ('c', metavar='c'*76) parser.add_argument ('d', metavar="[innerpart2]outerpart2") args = parser.parse_args() ------------------------ python thefile.py --help ---------- nosy: +vajrasky Added file: http://bugs.python.org/file30910/unit_test_for_inner_bracket_metavar.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 05:43:48 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 14 Jul 2013 03:43:48 +0000 Subject: [issue11874] argparse assertion failure with brackets in metavars In-Reply-To: <1303201252.58.0.236363581255.issue11874@psf.upfronthosting.co.za> Message-ID: <1373773428.83.0.253463257787.issue11874@psf.upfronthosting.co.za> Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file30910/unit_test_for_inner_bracket_metavar.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 05:44:13 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 14 Jul 2013 03:44:13 +0000 Subject: [issue11874] argparse assertion failure with brackets in metavars In-Reply-To: <1303201252.58.0.236363581255.issue11874@psf.upfronthosting.co.za> Message-ID: <1373773453.37.0.654417557731.issue11874@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Sorry, got typo in last unit test. ---------- Added file: http://bugs.python.org/file30911/unit_test_for_inner_bracket_metavar.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 06:03:45 2013 From: report at bugs.python.org (Todd Rovito) Date: Sun, 14 Jul 2013 04:03:45 +0000 Subject: [issue17721] Help button on preference window doesn't work In-Reply-To: <1365876479.31.0.960204905759.issue17721@psf.upfronthosting.co.za> Message-ID: <1373774625.97.0.739934457204.issue17721@psf.upfronthosting.co.za> Todd Rovito added the comment: This patch LGTM as well. I think it should be committed ASAP because the button clearly doesn't work as it is programmed now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 06:16:06 2013 From: report at bugs.python.org (=?utf-8?q?F=C3=A9vry_Thibault?=) Date: Sun, 14 Jul 2013 04:16:06 +0000 Subject: [issue18443] Misc/Readme still documents TextMate Message-ID: <1373775366.01.0.177392157148.issue18443@psf.upfronthosting.co.za> New submission from F?vry Thibault: changeset: 80448:901002834a68 user: Brett Cannon date: Thu Nov 15 16:12:19 2012 -0500 summary: Remove the TextMate bundle. -> Misc/Readme has not been updated accordingly. The line documenting TextMate should be removed. (Likewise, since it's the same kind of topic, I would like to bring attention to http://bugs.python.org/issue9893#msg193020 ) [Sorry, I did not know which component was appropriate to report against] ---------- messages: 193024 nosy: iwontbecreative priority: normal severity: normal status: open title: Misc/Readme still documents TextMate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 06:44:10 2013 From: report at bugs.python.org (Todd Rovito) Date: Sun, 14 Jul 2013 04:44:10 +0000 Subject: [issue18444] IDLE: Mac OS X pressing ctrl-A in Python shell moved cursor before the prompt, which then makes the keyboard unresponsive. Message-ID: <1373777050.16.0.963661085579.issue18444@psf.upfronthosting.co.za> New submission from Todd Rovito: covers point 1.1) "Pressing the Home key moves the cursor before the >>> prompt, which then makes the keyboard unresponsive." This issues was fixed on Windows XP and Linux here http://bugs.python.org/issue3851 On Mac OS X the "home" key is control-A or function left arrow both have the same effect of moving the cursor left of prompt, which them makes the keyboard unresponsive. I tested this with Python 3.4 and Python 2.7 on Mac OS X 10.8.4. ---------- components: IDLE messages: 193025 nosy: Todd.Rovito, roger.serwy, terry.reedy priority: normal severity: normal status: open title: IDLE: Mac OS X pressing ctrl-A in Python shell moved cursor before the prompt, which then makes the keyboard unresponsive. versions: Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 06:45:10 2013 From: report at bugs.python.org (Todd Rovito) Date: Sun, 14 Jul 2013 04:45:10 +0000 Subject: [issue13504] Meta-issue for "Invent with Python" IDLE feedback In-Reply-To: <1322613083.36.0.200533745275.issue13504@psf.upfronthosting.co.za> Message-ID: <1373777110.44.0.402400744177.issue13504@psf.upfronthosting.co.za> Todd Rovito added the comment: 1.1) "Pressing the Home key moves the cursor before the >>> prompt, which then makes the keyboard unresponsive." This issue is still broken on Mac OS X. http://bugs.python.org/issue18444 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 07:49:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Jul 2013 05:49:25 +0000 Subject: [issue18432] sched modules queue property should return a list, not an iterator In-Reply-To: <1373614281.57.0.554958596911.issue18432@psf.upfronthosting.co.za> Message-ID: <3btH4h5xLKz7Lmh@mail.python.org> Roundup Robot added the comment: New changeset 359002d4370d by Raymond Hettinger in branch '3.3': Issue #18432: Fix unintended API change in the sched module http://hg.python.org/cpython/rev/359002d4370d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 07:49:59 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 14 Jul 2013 05:49:59 +0000 Subject: [issue18432] sched modules queue property should return a list, not an iterator In-Reply-To: <1373614281.57.0.554958596911.issue18432@psf.upfronthosting.co.za> Message-ID: <1373780999.59.0.49961144053.issue18432@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 08:17:00 2013 From: report at bugs.python.org (=?utf-8?q?F=C3=A9vry_Thibault?=) Date: Sun, 14 Jul 2013 06:17:00 +0000 Subject: [issue18445] Tools/Script/Readme is outdated Message-ID: <1373782620.19.0.347266346086.issue18445@psf.upfronthosting.co.za> New submission from F?vry Thibault: Several issues : - abitype.py, analyze_dxp.py, get-remote-certificate.py, import_diagnostics.py, parse_html5_entities.py are not documented. - README mentions redemo.py which was moved to Tools/Demo. - README says all python scripts are executables, but some need chmod +x - The script list in readme would benefit from being sorted in alphabetical order ---------- messages: 193028 nosy: iwontbecreative priority: normal severity: normal status: open title: Tools/Script/Readme is outdated _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 08:50:42 2013 From: report at bugs.python.org (=?utf-8?q?F=C3=A9vry_Thibault?=) Date: Sun, 14 Jul 2013 06:50:42 +0000 Subject: [issue18446] Dead link in documenting.rst Message-ID: <1373784642.89.0.500058513809.issue18446@psf.upfronthosting.co.za> New submission from F?vry Thibault: The following link is dead : Apple Publications Style Guide: http://developer.apple.com/mac/library/documentation/UserExperience/Conceptual/APStyleGuide/APSG_2009.pdf and redirects to another page. ---------- components: Devguide messages: 193029 nosy: ezio.melotti, iwontbecreative priority: normal severity: normal status: open title: Dead link in documenting.rst _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 08:50:45 2013 From: report at bugs.python.org (R. Jayakrishnan) Date: Sun, 14 Jul 2013 06:50:45 +0000 Subject: [issue18425] IDLE Unit test for IdleHistory.py In-Reply-To: <1373493838.59.0.876568806243.issue18425@psf.upfronthosting.co.za> Message-ID: <1373784645.92.0.956244200075.issue18425@psf.upfronthosting.co.za> R. Jayakrishnan added the comment: Now we have the mockText, So I updated my test for Idlehistory. The submitted patch2 contains tests for two methods in Idlehistory (history_store and History_do). I hope the tests for history_store are done. But the history_do method tests fails. I explored a bit on the failure trace, History_do method is called by PyShell.py before it calls, pyShell does self.text.mark_set("iomark", "insert") and passes the Text to IdleHistory. Now Idlehistory uses 'iomark' as an index. Mock Text's _decode only handles specific input indexes (as it mentions), that means this 'iomark' index failed to all the logic of _decode method and finally crosses line, char = index.split('.') line which eventually raises a ValueError: need more than 1 value to unpack. One option is to create an issue to futher develop mock Text and implement mark_set also the _decode and so on, or Is it sounds like making stuffs more complex?, so we may decide the implemented tests are adequate enough for now. ---------- Added file: http://bugs.python.org/file30912/test_idlehistory1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 09:00:29 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 14 Jul 2013 07:00:29 +0000 Subject: [issue18446] Dead link in documenting.rst In-Reply-To: <1373784642.89.0.500058513809.issue18446@psf.upfronthosting.co.za> Message-ID: <1373785229.22.0.295964481326.issue18446@psf.upfronthosting.co.za> Ezio Melotti added the comment: This has been reported in #18021. ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 09:12:10 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Jul 2013 07:12:10 +0000 Subject: [issue18021] Update broken link to Apple Publication Style Guide In-Reply-To: <1369055538.2.0.556134337366.issue18021@psf.upfronthosting.co.za> Message-ID: <3btJwB17Btz7Lp7@mail.python.org> Roundup Robot added the comment: New changeset dcb9ec098781 by Ezio Melotti in branch 'default': #18021: remove broken link to the Apple Style Guide. Patch by Madison May. http://hg.python.org/devguide/rev/dcb9ec098781 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 09:19:15 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 14 Jul 2013 07:19:15 +0000 Subject: [issue18021] Update broken link to Apple Publication Style Guide In-Reply-To: <1369055538.2.0.556134337366.issue18021@psf.upfronthosting.co.za> Message-ID: <1373786355.0.0.110422735529.issue18021@psf.upfronthosting.co.za> Ezio Melotti added the comment: Since this was keep getting reported (see e.g. #18446) I now removed the link. If you think an updated link to the Apple Style Guide should be included instead please reopen, but from a quick look at it it's hard to tell what parts are relevant to our docs. Thanks Madison for the patch(es). ---------- assignee: -> ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 09:23:45 2013 From: report at bugs.python.org (Arnon Yaari) Date: Sun, 14 Jul 2013 07:23:45 +0000 Subject: [issue9951] introduce bytes.hex method In-Reply-To: <1285457928.18.0.422778723123.issue9951@psf.upfronthosting.co.za> Message-ID: <1373786625.62.0.337694383927.issue9951@psf.upfronthosting.co.za> Arnon Yaari added the comment: Hi, is there any chance to get this merged? This ticket has been open for almost 3 years... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 09:28:42 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 14 Jul 2013 07:28:42 +0000 Subject: [issue18444] IDLE: Mac OS X pressing ctrl-A in Python shell moved cursor before the prompt, which then makes the keyboard unresponsive. In-Reply-To: <1373777050.16.0.963661085579.issue18444@psf.upfronthosting.co.za> Message-ID: <1373786922.39.0.377206108521.issue18444@psf.upfronthosting.co.za> Ned Deily added the comment: The reason for the observed behavior is that the built-in "IDLE Classic OSX" keyset, which is the default for OS X framework installs, has a different keybinding for "beginning-of-line". See Lib/idlelib/config-key.def [IDLE Classic OSX] ... beginning-of-line = I'm not sure why the decision was made to use this binding originally. Unfortunately, on current OS X systems (with US keyboards at least) Control-Left is preemptively defined as the default system Mission Contol keyboard shortcut to "Move left a space" (e.g a desktop) so, by default, Tk (and, hence, IDLE) never sees it. This can be seen by going to System Preferences -> Keyboard -> Keyboard Shortcuts -> Mission Control. You can temporarily disable or change "Move left a space" and verify that then Control-L does perform as expected. You can also verify that changing the IDLE keyset to "IDLE Classic Windows" redefines "beginning-of-line" to Control-A and Home. There are a number of other problematic (non-functional) key bindings in the "IDLE Classic OSX" keyset depending on a number of factors: which Tk variant is in use (Cocoa Tk, Carbon Tk, X11 Tk), System Preferences keyboard shortcuts, possibly which keyboard and which system input method are in use. For more info on some of the hard-to-fathom Tk differences see: http://wiki.tcl.tk/28331 After spending some time trying to understand how this all works or doesn't across the various Tk's, I am coming to the conclusion that we need to define a new set of default key bindings for OS X, one that generally avoids as much as possible the use of Command key and Option key accelerators, as these tend to be especially problematic either in Tk or with system conflicts, and, instead, use Fn keys for non-trivial accelerators. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 09:30:36 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 14 Jul 2013 07:30:36 +0000 Subject: [issue18444] IDLE: Mac OS X pressing ctrl-A in Python shell moved cursor before the prompt, which then makes the keyboard unresponsive. In-Reply-To: <1373777050.16.0.963661085579.issue18444@psf.upfronthosting.co.za> Message-ID: <1373787036.15.0.30128331531.issue18444@psf.upfronthosting.co.za> Ned Deily added the comment: er, Lib/idlelib/config-keys.def ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 10:04:20 2013 From: report at bugs.python.org (Torim) Date: Sun, 14 Jul 2013 08:04:20 +0000 Subject: [issue18447] Pydoc crashes on large contents Message-ID: <1373789060.19.0.670360908323.issue18447@psf.upfronthosting.co.za> New submission from Torim: If invoking pydoc either from a system shell or as a help() method in an interactive Python interpreter, it crashes with SIGSEGV signal at exit. It crashes only with larger documentation contents, smaller do work as expected. Example with numpy module docs: 1. launch Python interactive interpreter with `python' 2. type `import numpy' 3. type `help(numpy)' # large help, displayed by PAGER environment variable or `more' if missing 4. press `q' to quit the help 5. SIGSEGV "Segmentation fault" received, python interpreter crashes Note: if you move in a documentation at the end (last line), you can then escape (quit) anywhere without a crash ---------- components: Library (Lib) messages: 193037 nosy: torim priority: normal severity: normal status: open title: Pydoc crashes on large contents type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 10:26:36 2013 From: report at bugs.python.org (=?utf-8?q?F=C3=A9vry_Thibault?=) Date: Sun, 14 Jul 2013 08:26:36 +0000 Subject: [issue18448] Tools/demo/eiffel.py fails to run tests. Message-ID: <1373790396.51.0.890728705996.issue18448@psf.upfronthosting.co.za> New submission from F?vry Thibault: Using trunk. .Tools/demo/eiffel.py -v testEiffelMetaClass1 (__main__.Tests) ... FAIL testEiffelMetaClass2 (__main__.Tests) ... FAIL ====================================================================== FAIL: testEiffelMetaClass1 (__main__.Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "./eiffel.py", line 102, in testEiffelMetaClass1 self._test(EiffelMetaClass1) File "./eiffel.py", line 137, in _test self.assertRaises(AssertionError, t.m2, 0) AssertionError: AssertionError not raised by m2 ====================================================================== FAIL: testEiffelMetaClass2 (__main__.Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "./eiffel.py", line 105, in testEiffelMetaClass2 self._test(EiffelMetaClass2) File "./eiffel.py", line 137, in _test self.assertRaises(AssertionError, t.m2, 0) AssertionError: AssertionError not raised by m2 ---------------------------------------------------------------------- Ran 2 tests in 0.001s FAILED (failures=2) ---------- components: Demos and Tools messages: 193038 nosy: iwontbecreative priority: normal severity: normal status: open title: Tools/demo/eiffel.py fails to run tests. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 10:29:19 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 14 Jul 2013 08:29:19 +0000 Subject: [issue18447] Pydoc crashes on large contents In-Reply-To: <1373789060.19.0.670360908323.issue18447@psf.upfronthosting.co.za> Message-ID: <1373790559.92.0.0504534081464.issue18447@psf.upfronthosting.co.za> Ned Deily added the comment: What platform and what versions of python and numpy are you using? I'm not able to reproduce a crash. But there is another report (Issue18356) about such a crash using Ubuntu 13.04. If that's what you are using, we will mark this as a duplicate. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 10:42:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Jul 2013 08:42:40 +0000 Subject: [issue18432] sched modules queue property should return a list, not an iterator In-Reply-To: <1373614281.57.0.554958596911.issue18432@psf.upfronthosting.co.za> Message-ID: <1373791360.37.0.776775557521.issue18432@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for explanation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 10:50:41 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Jul 2013 08:50:41 +0000 Subject: [issue9951] introduce bytes.hex method In-Reply-To: <1285457928.18.0.422778723123.issue9951@psf.upfronthosting.co.za> Message-ID: <1373791841.5.0.619389361326.issue9951@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There are several ways to do this: base64.b16encode, binascii.a2b_hex, hex(int.from_bytes(...)), etc. Why you need yet one? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 10:53:11 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Jul 2013 08:53:11 +0000 Subject: [issue18448] Tools/demo/eiffel.py fails to run tests. In-Reply-To: <1373790396.51.0.890728705996.issue18448@psf.upfronthosting.co.za> Message-ID: <1373791991.52.0.479719098135.issue18448@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: +easy nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 11:42:30 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 14 Jul 2013 09:42:30 +0000 Subject: [issue11874] argparse assertion failure with brackets in metavars In-Reply-To: <1303201252.58.0.236363581255.issue11874@psf.upfronthosting.co.za> Message-ID: <1373794950.43.0.797514465414.issue11874@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Tidied up the unit test. Mixed with arguments without metavar. ---------- Added file: http://bugs.python.org/file30913/unit_test_argparse.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 11:48:08 2013 From: report at bugs.python.org (Torim) Date: Sun, 14 Jul 2013 09:48:08 +0000 Subject: [issue18447] Pydoc crashes on large contents In-Reply-To: <1373789060.19.0.670360908323.issue18447@psf.upfronthosting.co.za> Message-ID: <1373795288.23.0.965502081905.issue18447@psf.upfronthosting.co.za> Torim added the comment: Python 2.7.5 numpy 1.7.1 platform: Linux x86_64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 11:57:49 2013 From: report at bugs.python.org (Torim) Date: Sun, 14 Jul 2013 09:57:49 +0000 Subject: [issue18447] Pydoc crashes on large contents In-Reply-To: <1373789060.19.0.670360908323.issue18447@psf.upfronthosting.co.za> Message-ID: <1373795869.29.0.819031767306.issue18447@psf.upfronthosting.co.za> Torim added the comment: I'd agree, it looks like a duplicate of Issue18356 . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 12:05:17 2013 From: report at bugs.python.org (=?utf-8?q?F=C3=A9vry_Thibault?=) Date: Sun, 14 Jul 2013 10:05:17 +0000 Subject: [issue18449] Demo 'ss1.py' crash in python3 Message-ID: <1373796317.72.0.604365443273.issue18449@psf.upfronthosting.co.za> New submission from F?vry Thibault: Run the demo. Click one of the columns or the rows. It does not select the colum/row accordingly and outputs an error log to command line. ---------- components: Demos and Tools files: python_3_change.patch keywords: patch messages: 193045 nosy: iwontbecreative priority: normal severity: normal status: open title: Demo 'ss1.py' crash in python3 type: crash Added file: http://bugs.python.org/file30914/python_3_change.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 12:58:15 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 14 Jul 2013 10:58:15 +0000 Subject: [issue11874] argparse assertion failure with brackets in metavars In-Reply-To: <1303201252.58.0.236363581255.issue11874@psf.upfronthosting.co.za> Message-ID: <1373799495.31.0.681944666545.issue11874@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Attached the preliminary fix and the unit test for this ticket. ---------- Added file: http://bugs.python.org/file30915/fix_and_unit_test_for_argparse_inner_bracket_bug.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 14:35:59 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Jul 2013 12:35:59 +0000 Subject: [issue18336] codecs: Link to readline module (history) instead of fd.readline() In-Reply-To: <1372663191.71.0.440770388569.issue18336@psf.upfronthosting.co.za> Message-ID: <1373805359.97.0.894184883274.issue18336@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 14:37:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Jul 2013 12:37:58 +0000 Subject: [issue16741] `int()`, `float()`, etc think python strings are null-terminated In-Reply-To: <1356046641.74.0.314140910069.issue16741@psf.upfronthosting.co.za> Message-ID: <1373805478.52.0.583689715904.issue16741@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch for 2.7. ---------- Added file: http://bugs.python.org/file30916/int_from_str-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 14:38:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Jul 2013 12:38:58 +0000 Subject: [issue17872] Crash in marshal.load() with bad reader In-Reply-To: <1367270952.48.0.351702678796.issue17872@psf.upfronthosting.co.za> Message-ID: <1373805538.7.0.80896013365.issue17872@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: commit review -> committed/rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 14:39:32 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Jul 2013 12:39:32 +0000 Subject: [issue5308] cannot marshal objects with more than 2**31 elements In-Reply-To: <1234997106.01.0.558053875674.issue5308@psf.upfronthosting.co.za> Message-ID: <1373805572.33.0.816605371632.issue5308@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: commit review -> committed/rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 14:56:11 2013 From: report at bugs.python.org (Sergey) Date: Sun, 14 Jul 2013 12:56:11 +0000 Subject: [issue18305] [patch] Fast sum() for non-numbers In-Reply-To: <1372228439.5.0.789865081817.issue18305@psf.upfronthosting.co.za> Message-ID: <1373806571.55.0.461102105081.issue18305@psf.upfronthosting.co.za> Sergey added the comment: Attached fasttuple.py is a Proof-of-Concept implementation of tuple, that reuses same data storage when possible. Its possible usage looks similar to built-in tuples: from fasttuple import ft a = ft([1,2]) b = a + ft([3,4]) c = b + ft([5,6]) d = b + ft([7,8]) d += ft([9]) d = ft([0]) + d + ft([0]) print(a, b, c, d) An interesting side-effect of this implementation is a faster __add__ operator: Python 2.7.5: Adding 100000 of fasttuples took 0.23242688179 seconds Adding 100000 of built-in tuples took 25.2749021053 seconds Python 3.3.2: Adding 100000 of fasttuples took 0.2883174419403076 seconds Adding 100000 of built-in tuples took 25.487935066223145 seconds (see test() function in fasttuple.py) This is just a proof of concept, it can be improved in different ways. Similar optimization can be applied to lists. ---------- Added file: http://bugs.python.org/file30917/fasttuple.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 15:03:17 2013 From: report at bugs.python.org (=?utf-8?q?F=C3=A9vry_Thibault?=) Date: Sun, 14 Jul 2013 13:03:17 +0000 Subject: [issue18445] Tools/Script/Readme is outdated In-Reply-To: <1373782620.19.0.347266346086.issue18445@psf.upfronthosting.co.za> Message-ID: <1373806997.55.0.154403068019.issue18445@psf.upfronthosting.co.za> Changes by F?vry Thibault : ---------- components: +Demos and Tools type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 15:29:26 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Jul 2013 13:29:26 +0000 Subject: [issue18445] Tools/Script/Readme is outdated In-Reply-To: <1373782620.19.0.347266346086.issue18445@psf.upfronthosting.co.za> Message-ID: <1373808566.13.0.999904139252.issue18445@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 15:33:59 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Jul 2013 13:33:59 +0000 Subject: [issue18305] [patch] Fast sum() for non-numbers In-Reply-To: <1372228439.5.0.789865081817.issue18305@psf.upfronthosting.co.za> Message-ID: <1373808839.68.0.953219920785.issue18305@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I guess such implementation of tuple will increase memory usage and creation time which are critical important for tuples. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 15:50:58 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Jul 2013 13:50:58 +0000 Subject: [issue9893] Removing the Misc/Vim/ files In-Reply-To: <1284827686.39.0.471855984875.issue9893@psf.upfronthosting.co.za> Message-ID: <3btTmK4k1mz7Lmc@mail.python.org> Roundup Robot added the comment: New changeset afd17a514117 by Brett Cannon in branch 'default': Issue #9893: remove an outdated mention of the Vim-related files. http://hg.python.org/cpython/rev/afd17a514117 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 15:52:18 2013 From: report at bugs.python.org (Brett Cannon) Date: Sun, 14 Jul 2013 13:52:18 +0000 Subject: [issue9893] Removing the Misc/Vim/ files In-Reply-To: <1284827686.39.0.471855984875.issue9893@psf.upfronthosting.co.za> Message-ID: <1373809938.72.0.960302265001.issue9893@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks for the info, F?vry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 16:49:11 2013 From: report at bugs.python.org (Sergey) Date: Sun, 14 Jul 2013 14:49:11 +0000 Subject: [issue18305] [patch] Fast sum() for non-numbers In-Reply-To: <1372228439.5.0.789865081817.issue18305@psf.upfronthosting.co.za> Message-ID: <1373813351.62.0.267771053139.issue18305@psf.upfronthosting.co.za> Sergey added the comment: > I guess such implementation of tuple will increase memory usage > and creation time which are critical important for tuples. On the contrary, it will reduce memory usage and creation time compared to regular tuples, because in cases like: c = a + b you do not have to spend time and memory for allocating and copying elements of "a". The only case when it could use more memory is if you explicitly delete "c" after that operation. But this can be solved too, internal storage can be resized to a smaller value when its tail elements are not used any more. This idea can be improved in many ways. For example it's possible to implement __add__ in C so that it would require no additional memory at all. But it is just a proof of concept, and I was trying to keep it simple, so the idea was easier to understand. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 17:01:33 2013 From: report at bugs.python.org (=?utf-8?q?F=C3=A9vry_Thibault?=) Date: Sun, 14 Jul 2013 15:01:33 +0000 Subject: [issue18450] Typos in developers.rst Message-ID: <1373814093.51.0.30447893809.issue18450@psf.upfronthosting.co.za> New submission from F?vry Thibault: 'Mathemathics' -> 'Mathematics' 'Recommandation' (I also love French :) ) -> 'Recommendation' ---------- components: Devguide files: typos.patch keywords: patch messages: 193053 nosy: ezio.melotti, iwontbecreative priority: normal severity: normal status: open title: Typos in developers.rst type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file30918/typos.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 17:09:18 2013 From: report at bugs.python.org (Brett Cannon) Date: Sun, 14 Jul 2013 15:09:18 +0000 Subject: [issue18366] Look into using setuptools 0.8 with devinabox In-Reply-To: <1373050545.72.0.913004970997.issue18366@psf.upfronthosting.co.za> Message-ID: <1373814558.61.0.590229987645.issue18366@psf.upfronthosting.co.za> Brett Cannon added the comment: Setuptools 0.8 will work fine. See issue #18367 for its planned use. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 17:15:05 2013 From: report at bugs.python.org (Brett Cannon) Date: Sun, 14 Jul 2013 15:15:05 +0000 Subject: [issue18367] See if a venv setup can be used for devinabox for coverage In-Reply-To: <1373051739.1.0.739747420449.issue18367@psf.upfronthosting.co.za> Message-ID: <1373814905.01.0.348849083125.issue18367@psf.upfronthosting.co.za> Brett Cannon added the comment: I think getting set up for coverage.py is going to change to: 1. Download the latest setuptools 2. Download the latest coverage -- full_coverage.py build -- 3. Create a venv 4. Extract setuptools and coverage into a src/ directory in the venv 5. Install setuptools in the venv 6. Install coverage in the venv -- full_coverage.py run -- 7. Run coverage -- full_coverage.py html -- 8. Create coverage report *outside of venv* -- 9. Delete venv *but leave the setuptools and coverage tarballs for users* This removes the need for the coverage clone and a lot of the crazy tweaking required to execute Python for fullcoverage; this setup will only require setting PYTHONPATH to src/coverage/fullcoverage (or something like that) in the venv. ---------- assignee: -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 17:19:29 2013 From: report at bugs.python.org (Brett Cannon) Date: Sun, 14 Jul 2013 15:19:29 +0000 Subject: [issue18451] Omit test files in devinabox coverage run Message-ID: <1373815169.93.0.694766443004.issue18451@psf.upfronthosting.co.za> New submission from Brett Cannon: Devinabox's full_coverage.py run should omit test files. Probably need to put the path in quotes for proper escaping (same for report). ---------- assignee: brett.cannon keywords: easy messages: 193056 nosy: brett.cannon priority: normal severity: normal stage: needs patch status: open title: Omit test files in devinabox coverage run type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 17:43:07 2013 From: report at bugs.python.org (=?utf-8?q?F=C3=A9vry_Thibault?=) Date: Sun, 14 Jul 2013 15:43:07 +0000 Subject: [issue18452] Typo in Doc/howto/argparse.rst Message-ID: <1373816587.08.0.142397091694.issue18452@psf.upfronthosting.co.za> New submission from F?vry Thibault: 'occurences' -> 'occurrences' ---------- assignee: docs at python components: Documentation messages: 193057 nosy: docs at python, iwontbecreative priority: normal severity: normal status: open title: Typo in Doc/howto/argparse.rst type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 17:48:13 2013 From: report at bugs.python.org (Ron Adam) Date: Sun, 14 Jul 2013 15:48:13 +0000 Subject: [issue18436] Add mapping of symbol to function to operator module In-Reply-To: <1373662006.12.0.760343850871.issue18436@psf.upfronthosting.co.za> Message-ID: <1373816893.25.0.651639877196.issue18436@psf.upfronthosting.co.za> Ron Adam added the comment: Regarding opertor.get_op: Look at help("symbols") output for consistancy. There may be items in one that can be included in the other. The operator.get_op addition would be useful for improving help on the symbol information for help/pydoc. Currently it seems overly general for symbols. Also patch, http://bugs.python.org/issue18387, which adds help("symbols") output to pydocs web browser interface. It could use a review. ---------- nosy: +ron_adam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 17:58:59 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 14 Jul 2013 15:58:59 +0000 Subject: [issue18453] There are unused variables inside DateTimeTestCase class in test_xmlrpc.py Message-ID: <1373817539.24.0.0142880431752.issue18453@psf.upfronthosting.co.za> New submission from Vajrasky Kok: Attached the menial fix to unit test in test_xmlrpc.py. ---------- components: Tests files: fix_DateTimeTestCase.txt messages: 193059 nosy: vajrasky priority: normal severity: normal status: open title: There are unused variables inside DateTimeTestCase class in test_xmlrpc.py versions: Python 3.4 Added file: http://bugs.python.org/file30919/fix_DateTimeTestCase.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 18:23:20 2013 From: report at bugs.python.org (=?utf-8?q?F=C3=A9vry_Thibault?=) Date: Sun, 14 Jul 2013 16:23:20 +0000 Subject: [issue18452] Typo in Doc/howto/argparse.rst In-Reply-To: <1373816587.08.0.142397091694.issue18452@psf.upfronthosting.co.za> Message-ID: <1373819000.65.0.119000204388.issue18452@psf.upfronthosting.co.za> F?vry Thibault added the comment: This one typo should also be fixed on other files namely : - Doc/library/stdtypes.rst - Doc/library/configparser.rst ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 18:33:02 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 14 Jul 2013 16:33:02 +0000 Subject: [issue18453] There are unused variables inside DateTimeTestCase class in test_xmlrpc.py In-Reply-To: <1373817539.24.0.0142880431752.issue18453@psf.upfronthosting.co.za> Message-ID: <1373819582.58.0.336114827267.issue18453@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Okay, instead of using computer timer, I use mock object instead. ---------- Added file: http://bugs.python.org/file30920/fix_DateTimeTestCase_using_mock_object.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 19:24:48 2013 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Sun, 14 Jul 2013 17:24:48 +0000 Subject: [issue18454] distutils crashes when uploading to PyPI having only the username (no pw) defined Message-ID: <1373822688.67.0.938925989206.issue18454@psf.upfronthosting.co.za> New submission from Jan-Philip Gehrcke: When updating an existing project on PyPI via distutils using the upload command, I observe erroneous behavior regarding the credentials when I do not want to store my password in clear text in the pypirc file: (1) When running python setup.py sdist upload without having the pypirc file in place, I get the error Upload failed (401): You must be identified to edit package information (2) When running the same command as above with the pypirc file in place but without having the 'password' option in the 'pypi' section defined, I get a TypeError exception. In both cases and at least in the second case I expect to be prompted for my credentials. This is what the 2.7.5 docs are saying about the contents of the pypirc file (http://docs.python.org/2.7/distutils/packageindex.html#the-pypirc-file): "password, that will be used to authenticate. If omitted the user will be prompt to type it when needed." I have seen http://bugs.python.org/issue5187 saying "distutils is feature frozen" but the current situation is buggy. Either there is a documentation mistake (it clearly says that the user is prompted for the password) or there is an error in the code (*, see below), or both. * Regarding the TypeError mentioned above: In distutils/command/upload.py, finalize_options(), the configuration dictionary is retrieved from _read_pypirc() (distutils/config.py). There, the value for the password key in the config dictionary is set to None if not defined in the pypirc configuration file. The password value is not modified/updated in finalize_options() if self.distribution.password is not set. I think the latter is only set when the 'register' command is used. Hence, when the user for example simply runs python setup.py sdist upload and did not set the password in the pypirc file, the password value stays None. Nevertheless, in distutils/command/upload.py, upload_file(), password is treated as string: auth = "Basic " + standard_b64encode(self.username + ":" + self.password) This obviously leads to TypeError: cannot concatenate 'str' and 'NoneType' objects I would be happy to work on a patch if we agree on what the proper behavior should be. Me, as a user of PyPI, would vote for being prompted in both cases outlined above. I do not like to store my PyPI password in clear text in the file system. And after specifying how distutils should behave in case (2) I think we all agree that distutils/tests/test_upload.py should provide a test for this case. An example configuration file with username but without password is already defined via PYPIRC_NOPASSWORD. Currently, this config is only tested within an edge-case in test_saved_password() with dist.password = 'xxx', simulating the simultaneous usage of 'register' with 'upload' if I understood correctly. Register probably is used less frequently than upload alone. Looking forward to your input, Jan-Philip ---------- assignee: eric.araujo components: Distutils messages: 193062 nosy: eric.araujo, jason.coombs, jgehrcke, loewis, tarek, techtonik priority: normal severity: normal status: open title: distutils crashes when uploading to PyPI having only the username (no pw) defined type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 19:47:34 2013 From: report at bugs.python.org (Zachary Ware) Date: Sun, 14 Jul 2013 17:47:34 +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: <1373824054.46.0.889591277066.issue18387@psf.upfronthosting.co.za> Zachary Ware added the comment: Just from a bit of testing without looking at the patch very much, there are a couple of things that need to be fixed. First, the + and += links don't work, tested on Firefox and Konqueror on Linux. Second, there are a couple of symbols which should have been removed from the listing back in the 3.0 days: <> and `. I like the idea, though. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 21:16:26 2013 From: report at bugs.python.org (=?utf-8?q?F=C3=A9vry_Thibault?=) Date: Sun, 14 Jul 2013 19:16:26 +0000 Subject: [issue18449] Demo 'ss1.py' crash in python3 In-Reply-To: <1373796317.72.0.604365443273.issue18449@psf.upfronthosting.co.za> Message-ID: <1373829386.8.0.866563714722.issue18449@psf.upfronthosting.co.za> F?vry Thibault added the comment: Depending on what's the policy (is this documented somewhere ? Should we try to enhance them or not ?) for demo files, I might add the possibility to change the default number of line/columns. Needing some guidance here. ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 21:17:54 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 14 Jul 2013 19:17:54 +0000 Subject: [issue18447] Pydoc crashes on large contents In-Reply-To: <1373789060.19.0.670360908323.issue18447@psf.upfronthosting.co.za> Message-ID: <1373829474.89.0.413632097922.issue18447@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> help(numpy) causes segfault on exit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 21:25:29 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Jul 2013 19:25:29 +0000 Subject: [issue18450] Typos in developers.rst In-Reply-To: <1373814093.51.0.30447893809.issue18450@psf.upfronthosting.co.za> Message-ID: <3btdBJ6bWQz7LkF@mail.python.org> Roundup Robot added the comment: New changeset 26a3ff53a7da by Ned Deily in branch 'default': Closes #18450: fix more typos (noticed by F?vry Thibault). http://hg.python.org/devguide/rev/26a3ff53a7da ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 21:46:03 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Jul 2013 19:46:03 +0000 Subject: [issue18452] Typo in Doc/howto/argparse.rst In-Reply-To: <1373816587.08.0.142397091694.issue18452@psf.upfronthosting.co.za> Message-ID: <3btdf30v2tz7Ljm@mail.python.org> Roundup Robot added the comment: New changeset 8c935717fc8e by Ned Deily in branch '2.7': Issue #18452: fix several "occurrence" typos (reported by F?vry Thibault). http://hg.python.org/cpython/rev/8c935717fc8e New changeset 1a93c624551f by Ned Deily in branch '3.3': Issue #18452: fix several "occurrence" typos (reported by F?vry Thibault). http://hg.python.org/cpython/rev/1a93c624551f New changeset db9fe49069ed by Ned Deily in branch 'default': Closes #18452: fix several "occurrence" typos (reported by F?vry Thibault). http://hg.python.org/cpython/rev/db9fe49069ed ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 21:47:57 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 14 Jul 2013 19:47:57 +0000 Subject: [issue18452] Typo in Doc/howto/argparse.rst In-Reply-To: <1373816587.08.0.142397091694.issue18452@psf.upfronthosting.co.za> Message-ID: <1373831277.4.0.50884007248.issue18452@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- type: enhancement -> versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 21:51:29 2013 From: report at bugs.python.org (Todd Rovito) Date: Sun, 14 Jul 2013 19:51:29 +0000 Subject: [issue18444] IDLE: Mac OS X pressing ctrl-A in Python shell moved cursor before the prompt, which then makes the keyboard unresponsive. In-Reply-To: <1373777050.16.0.963661085579.issue18444@psf.upfronthosting.co.za> Message-ID: <1373831489.66.0.737538866836.issue18444@psf.upfronthosting.co.za> Todd Rovito added the comment: Ned, Thanks for such a thorough comment this saved me lots of time now I don't have to dig so deeply into the problem. "After spending some time trying to understand how this all works or doesn't across the various Tk's, I am coming to the conclusion that we need to define a new set of default key bindings for OS X, one that generally avoids as much as possible the use of Command key and Option key accelerators, as these tend to be especially problematic either in Tk or with system conflicts, and, instead, use Fn keys for non-trivial accelerators." I like your purposed solution so I will look into trying to creat a new key binding for OS X. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 23:41:41 2013 From: report at bugs.python.org (paul j3) Date: Sun, 14 Jul 2013 21:41:41 +0000 Subject: [issue11874] argparse assertion failure with brackets in metavars In-Reply-To: <1303201252.58.0.236363581255.issue11874@psf.upfronthosting.co.za> Message-ID: <1373838100.99.0.938643913287.issue11874@psf.upfronthosting.co.za> paul j3 added the comment: If the arg_parts are passed through the same cleanup as the 'text' (and empty strings removed), then text = ' '.join(arg_parts) In that case there would be no need to return both (text, arg_parts). Parenthesis in the metavar could also create the problem addressed in this thread, except as noted in http://bugs.python.org/issue18349 that 'text' cleanup removes them. nargs='*' or '+' or integer is another way in which [] could be introduced into the metavar. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 01:24:20 2013 From: report at bugs.python.org (Michael Ballantyne) Date: Sun, 14 Jul 2013 23:24:20 +0000 Subject: [issue18455] Multiprocessing connection SocketClient retries connection on socket Message-ID: <1373844260.31.0.599002604646.issue18455@psf.upfronthosting.co.za> New submission from Michael Ballantyne: from multiprocessing/connection.py: while 1: try: s.connect(address) except socket.error, e: if e.args[0] != errno.ECONNREFUSED or _check_timeout(t): debug('failed to connect to address %s', address) raise time.sleep(0.01) else: break else: raise According to the POSIX spec http://pubs.opengroup.org/onlinepubs/9699919799/ "If connect() fails, the state of the socket is unspecified. Conforming applications should close the file descriptor and create a new socket before attempting to reconnect." On Mac OS X and other BSDs (but not Linux), attempting to connect() again throws EINVAL. As a result, the multiprocessing.connection.Client does not successfully retry, and instead throws socket.error: [Errno 22] Invalid argument after the first refused connection. I found that error message pretty confusing, and didn't realize that it effectively meant the connection was refused. The change for issue #13215 removes the retry behavior entirely, so this bug does not appear in 3.3 and up. ---------- assignee: ronaldoussoren components: Library (Lib), Macintosh messages: 193069 nosy: Michael.Ballantyne, ronaldoussoren priority: normal severity: normal status: open title: Multiprocessing connection SocketClient retries connection on socket type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 01:39:36 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 14 Jul 2013 23:39:36 +0000 Subject: [issue18455] Multiprocessing connection SocketClient retries connection on socket In-Reply-To: <1373844260.31.0.599002604646.issue18455@psf.upfronthosting.co.za> Message-ID: <1373845176.33.0.0756028396253.issue18455@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 04:11:12 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 15 Jul 2013 02:11:12 +0000 Subject: [issue18456] Documentation for PyDict_Update is incorrect Message-ID: <1373854272.6.0.0142348360978.issue18456@psf.upfronthosting.co.za> New submission from Nick Coghlan: The docs from PyDict_Update (http://docs.python.org/3/c-api/dict.html#PyDict_Update) claim it is equivalent to the Python level dict.update (http://docs.python.org/3/library/stdtypes#dict.update) This isn't accurate - unlike dict.update, PyDict_Update doesn't fall back to the iterating over a sequence of key value pairs if the second argument has no "keys" attribute. ---------- assignee: docs at python components: Documentation messages: 193070 nosy: docs at python, ncoghlan priority: normal severity: normal stage: needs patch status: open title: Documentation for PyDict_Update is incorrect type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 05:51:42 2013 From: report at bugs.python.org (paul j3) Date: Mon, 15 Jul 2013 03:51:42 +0000 Subject: [issue10984] argparse add_mutually_exclusive_group should accept existing arguments to register conflicts In-Reply-To: <1295737320.83.0.942830837874.issue10984@psf.upfronthosting.co.za> Message-ID: <1373860302.88.0.85618712545.issue10984@psf.upfronthosting.co.za> paul j3 added the comment: This patch adds a MultiGroupHelpFormatter that formats groups even if they share actions or the actions are not in the same order as in the parse._actions list. It sorts the groups so positional actions, if any appear in the correct order. A long test case generates this help: usage: PROG [-h] [-a A | -c C] [-a A | -d D] [-a A | -b B] [-b B | -d D] [-d D | x] foo [-b B | y] positional arguments: x x help foo foo help y y help optional arguments: -h, --help show this help message and exit -a A a help -b B b help -c C c help -d D d help In the 2nd usage line, the 2 groups, and action foo, are shown in the order in which x, foo, y were defined (and hence will be parsed), even though the groups were not defined in that order. The default formatter could not format these groups, generating '[-h] [-a A] [-b B] ... x foo y' instead. I have included the latest patch from http://bugs.python.org/issue11874. This splits the usage line generated by _format_actions_usage into parts that are groups or independent actions. The goal there is to correctly split long usage lines into multiple lines. Here it makes it easier to format groups and actions in new order. If existing actions are added to new group as in the original patch for this issue, that group gets a no_usage = True attribute. The default formatter then will not attempt to format this group. The MultiGroupHelpFormatter ignores this attribute. This patch needs better documentation. Test cases also need refinement, improving the names, and eliminating redundancies. Some of the new tests are copies of existing ones, but using the new formatter. ---------- Added file: http://bugs.python.org/file30921/multigroup_1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 05:58:39 2013 From: report at bugs.python.org (paul j3) Date: Mon, 15 Jul 2013 03:58:39 +0000 Subject: [issue11874] argparse assertion failure with brackets in metavars In-Reply-To: <1303201252.58.0.236363581255.issue11874@psf.upfronthosting.co.za> Message-ID: <1373860719.14.0.681699472704.issue11874@psf.upfronthosting.co.za> paul j3 added the comment: I just filed a patch with http://bugs.python.org/issue10984 (argparse add_mutually_exclusive_group should accept existing arguments to register conflicts) that includes the latest patch from this issue. I tweaked it so _format_actions_usage only returns arg_parts. The block of _re. statements (# clean up separators for mutually exclusive groups) are in a nested function so it can be applied to each of the parts. In that issue I wrote a custom formatter that handles groups even if they share actions, or the action order does not match definition order. For that it is easier to work with the arg_parts as generated here rather than the whole usage line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 06:35:15 2013 From: report at bugs.python.org (Ron Adam) Date: Mon, 15 Jul 2013 04:35:15 +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: <1373862915.24.0.572810635466.issue18387@psf.upfronthosting.co.za> Ron Adam added the comment: Thanks for catching that. I had used unquote_plus instead of unquote. That is needed for multi-field form data, pydoc doens't need it. Removed the back tick from the pydoc symbols list. The topic link for that symbol was already removed. I also attempted to make the escape() usage a bit better by using the escape function from the html package in more places. It does just a bit better job of escaping. I wasn't aware help() would take a "symbols" argument when I added the "keywords" and "topics" pages to the html server. I've been meaning to get this in for a while. ---------- Added file: http://bugs.python.org/file30922/pdoc_symbols.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 06:36:12 2013 From: report at bugs.python.org (Ron Adam) Date: Mon, 15 Jul 2013 04:36:12 +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: <1373862972.21.0.726984315446.issue18387@psf.upfronthosting.co.za> Changes by Ron Adam : Removed file: http://bugs.python.org/file30843/pdoc_symbols.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 06:36:43 2013 From: report at bugs.python.org (Ron Adam) Date: Mon, 15 Jul 2013 04:36:43 +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: <1373863003.4.0.250220744163.issue18387@psf.upfronthosting.co.za> Ron Adam added the comment: Updated the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 07:38:44 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 15 Jul 2013 05:38:44 +0000 Subject: [issue17583] IDLE HOWTO In-Reply-To: <1364685156.29.0.769214841654.issue17583@psf.upfronthosting.co.za> Message-ID: <1373866724.88.0.513503683815.issue17583@psf.upfronthosting.co.za> Terry J. Reedy added the comment: (If someone else wants to take this before I get to it, feel free. But there seems to be enough support to add something eventually.) It seems that Rietveld is able to ignore the binaries, but in the future, lets separate the text and images. If nothing else, the images should stay the same while the text gets updated patches. Looking at http://docs.python.org/3/howto/index.html, I think the title should begin with Idle or IDLE, but if the latter, not include HOWTO as one SHOUT is enough. I think it should be in its alphabetical position after Functional Programming. I have no idea why argparse and ipaddress are out of order. I think there should be a section on using the shell before using the editor. >From a command line (at least on Windows, when not in the directory containing idle.py) 'python -m idlelib' is the easiest way to start. Within a Python program, 'import idlelib.idle' starts it. I plan to add a new section to the docs for this, but it might be worth repeating. I will look more closely at the text another time. ---------- assignee: docs at python -> terry.reedy nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 08:59:03 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 15 Jul 2013 06:59:03 +0000 Subject: [issue18455] Multiprocessing connection SocketClient retries connection on socket In-Reply-To: <1373844260.31.0.599002604646.issue18455@psf.upfronthosting.co.za> Message-ID: <1373871543.92.0.969999795624.issue18455@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- assignee: ronaldoussoren -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 09:15:24 2013 From: report at bugs.python.org (Katie Miller) Date: Mon, 15 Jul 2013 07:15:24 +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: <1373872524.69.0.682054565343.issue10042@psf.upfronthosting.co.za> Katie Miller added the comment: Nick is correct; a logic bug was introduced during refactoring, which is fixed in the attached patch. The tests introduced with my original patch cover cases where an operation is not implemented, so it would be inappropriate to add a test case there that would have caught the aforementioned error. Instead I have added some extra cases to the existing total_ordering tests; these now fail when encountering this (now fixed) logic error. ---------- Added file: http://bugs.python.org/file30923/10042_revised.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 09:15:36 2013 From: report at bugs.python.org (paul j3) Date: Mon, 15 Jul 2013 07:15:36 +0000 Subject: [issue18349] argparse usage should preserve () in metavars such as range(20) In-Reply-To: <1372832211.16.0.544648995095.issue18349@psf.upfronthosting.co.za> Message-ID: <1373872536.22.0.211692717309.issue18349@psf.upfronthosting.co.za> paul j3 added the comment: This issue should also preserve a metavar like: '(one)two', i.e. '(' at the start. In http://bugs.python.org/issue10984 these _re replacements are applied to individual action strings as well as the whole usage line. So if () are to be removed from '[-h] (-y)', they should also be removed from '(-y)'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 09:30:26 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 15 Jul 2013 07:30:26 +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: <1373873426.0.0.643567092415.issue10042@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thanks Katie - Raymond, the patch is ready for review now If you're happy with it, then the only other things it should need prior to commit are NEWS and ACKS entries (I think it's too esoteric a fix to mention in What's New). ---------- stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 09:51:57 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 15 Jul 2013 07:51:57 +0000 Subject: [issue18444] IDLE: Mac OS X pressing ctrl-A in Python shell moved cursor before the prompt, which then makes the keyboard unresponsive. In-Reply-To: <1373777050.16.0.963661085579.issue18444@psf.upfronthosting.co.za> Message-ID: <1373874717.41.0.279881984535.issue18444@psf.upfronthosting.co.za> Ronald Oussoren added the comment: IIRC the key bindings that are currently used on OSX basicly are partially based on the key bindings on "classic macos", and partially on using the CMD key instead of the ALT key. It would be nice to have a clean set of key bindings for OSX that's based on the default key bindings for text widgets in Cocoa[1], with "logical" additions for IDLE-specific functionality. It would also be nice if the key bindings for the various platforms could be kept in sync [2], that makes it easier to switch between platforms and is easier for educators. BTW. I don't think it using function keys for key bindings is necessarily a good idea on OSX. I'm pretty sure that the default keyboard settings on OSX require two key presses to use a function key on OSX laptops (the "fn" key and the actual function key) because the keys are used for their hardware control role without the "fn" key (that is, "fn" + "f8" is F8, while just "f8" is "play/pauze"). A number of function keys also have system-wide shortcuts (such as "show desktop"), I'm not sure if those shortcuts are still enabled by default on new installs. [1] More or less documented here: , the file "/System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict" is a (binary) plist that contains the default keybinding. [2] With the obvious differences, such as using the CMD key on OSX and ALT on Windows. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 09:57:56 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Jul 2013 07:57:56 +0000 Subject: [issue18436] Add mapping of symbol to function to operator module In-Reply-To: <1373662006.12.0.760343850871.issue18436@psf.upfronthosting.co.za> Message-ID: <1373875076.78.0.633702035306.issue18436@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What is a purpose of this feature? Why you need it? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:11:00 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Jul 2013 08:11:00 +0000 Subject: [issue18305] [patch] Fast sum() for non-numbers In-Reply-To: <1372228439.5.0.789865081817.issue18305@psf.upfronthosting.co.za> Message-ID: <1373875860.44.0.153582623203.issue18305@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > On the contrary, it will reduce memory usage and creation time compared to regular tuples, because in cases like: > c = a + b > you do not have to spend time and memory for allocating and copying elements of "a". This is not a common case. A common case is creating short tuples and keeping a lot of tuples in memory. > The only case when it could use more memory is if you explicitly delete "c" after that operation. But this can be solved too, internal storage can be resized to a smaller value when its tail elements are not used any more. No. For fast += you need keep not only a size of tuple, but also a size of of allocated memory. It's a cause of sys.getsizeof([1, 2]) > sys.getsizeof((1, 2)). For fast + you need even more complicated internal structure. Tuples should be compact and fast. You shouldn't optimize a rare case at the cost of regression in common usage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:12:06 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Jul 2013 08:12:06 +0000 Subject: [issue18305] [patch] Fast sum() for non-numbers In-Reply-To: <1372228439.5.0.789865081817.issue18305@psf.upfronthosting.co.za> Message-ID: <1373875926.11.0.601275166187.issue18305@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 11:15:59 2013 From: report at bugs.python.org (Torim) Date: Mon, 15 Jul 2013 09:15:59 +0000 Subject: [issue18356] help(numpy) causes segfault on exit In-Reply-To: <1372924520.77.0.111539946992.issue18356@psf.upfronthosting.co.za> Message-ID: <1373879759.74.0.8878283099.issue18356@psf.upfronthosting.co.za> Torim added the comment: I would add even the linked solution from StackOverflow.com does not work reliably for me. Try to get at the end of numpy document - text vanishes and possibly lose chars displaying in terminal. Need to reset it. Modified pydoc's pipepager method this way: def pipepager(text, cmd): """Page through text by feeding it to another program.""" #pipe = os.popen(cmd, 'w') import subprocess pipep = subprocess.Popen(cmd, stdin=subprocess.PIPE, shell=True) try: #pipe.write(text) #pipe.close() pipep.communicate(text) except IOError: pass # Ignore broken pipes caused by quitting the pager program. Works for me so far, although the exact cause of issue with the stock/default pydoc is still not known. ---------- components: +Library (Lib) nosy: +torim _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 11:40:03 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Jul 2013 09:40:03 +0000 Subject: [issue18449] Demo 'ss1.py' crash in python3 In-Reply-To: <1373796317.72.0.604365443273.issue18449@psf.upfronthosting.co.za> Message-ID: <3bv08L1BY9z7LjP@mail.python.org> Roundup Robot added the comment: New changeset a7b5e9ca8eee by Serhiy Storchaka in branch '3.3': Issue #18449: Make Tools/demo/ss1.py work again on Python 3. Patch by http://hg.python.org/cpython/rev/a7b5e9ca8eee New changeset 34333dab3ac4 by Serhiy Storchaka in branch 'default': Issue #18449: Make Tools/demo/ss1.py work again on Python 3. Patch by http://hg.python.org/cpython/rev/34333dab3ac4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 11:40:59 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Jul 2013 09:40:59 +0000 Subject: [issue18449] Demo 'ss1.py' crash in python3 In-Reply-To: <1373796317.72.0.604365443273.issue18449@psf.upfronthosting.co.za> Message-ID: <1373881259.34.0.434141832321.issue18449@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your report and patch. ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 12:05:03 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 15 Jul 2013 10:05:03 +0000 Subject: [issue17202] Add .bat line to .hgeol In-Reply-To: <1360824086.93.0.558513852083.issue17202@psf.upfronthosting.co.za> Message-ID: <1373882703.05.0.146438250977.issue17202@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Zachary: What Windows version do you use? Glen Linderman claims that at least Windows 7 should work fine with cmd files containing only LF, and suggested that this may also be the case on Windows XP. Are you using a non-standard command interpreter by any chance? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 13:13:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Jul 2013 11:13:30 +0000 Subject: [issue17482] functools.update_wrapper mishandles __wrapped__ In-Reply-To: <1363714542.8.0.838364934538.issue17482@psf.upfronthosting.co.za> Message-ID: <3bv2D96bVqz7Lmr@mail.python.org> Roundup Robot added the comment: New changeset 13b8fd71db46 by Nick Coghlan in branch 'default': Close issue 17482: don't overwrite __wrapped__ http://hg.python.org/cpython/rev/13b8fd71db46 ---------- nosy: +python-dev resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 13:19:16 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 15 Jul 2013 11:19:16 +0000 Subject: [issue17482] functools.update_wrapper mishandles __wrapped__ In-Reply-To: <1363714542.8.0.838364934538.issue17482@psf.upfronthosting.co.za> Message-ID: <1373887156.69.0.423679070487.issue17482@psf.upfronthosting.co.za> Nick Coghlan added the comment: I decided I can live with the risk of this biting someone in 3.3 - the combination of using multiple levels of wrapping *and* using __wrapped__ for more than merely introspection seems remote enough to make being conservative with the behavioural change the better course. ---------- versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 14:01:25 2013 From: report at bugs.python.org (=?utf-8?q?F=C3=A9vry_Thibault?=) Date: Mon, 15 Jul 2013 12:01:25 +0000 Subject: [issue18443] Misc/Readme still documents TextMate In-Reply-To: <1373775366.01.0.177392157148.issue18443@psf.upfronthosting.co.za> Message-ID: <1373889685.82.0.22832810313.issue18443@psf.upfronthosting.co.za> F?vry Thibault added the comment: The issue with Vim files has been fixed but not this one. Adding a patch in case it is faster for anyone, as well as properly triaging the bug report. This also fixes the list to put in back in alphabetical order. ---------- assignee: -> docs at python components: +Documentation keywords: +patch nosy: +docs at python, eric.araujo, ezio.melotti, georg.brandl type: -> enhancement versions: +Python 3.4 Added file: http://bugs.python.org/file30924/readme.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 14:07:21 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Jul 2013 12:07:21 +0000 Subject: [issue18457] Fix and cleanup the ss1.py demo Message-ID: <1373890041.01.0.998276597574.issue18457@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here is a patch which fixes some bugs in Tools/demo/ss1.py: * Saving formulas containing & and < symbols. * Saving complex numbers. Also it a little cleanups the code: * Using xml.sax.saxutils.escape instead of html.escape. * Using the with statement for file I/O. * Removed out-of-dated and redundant code. On Python 2 the ss1.py demo is totally broken due to using out-of-dated rexec module. ---------- assignee: serhiy.storchaka components: Demos and Tools files: demo_ss1.patch keywords: patch messages: 193089 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Fix and cleanup the ss1.py demo type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30925/demo_ss1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 14:24:20 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 15 Jul 2013 12:24:20 +0000 Subject: [issue18458] libedit history offset workaround Message-ID: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> New submission from Ronald Oussoren: Modules/readline.c contains a workaround for a bug in the readline emulation of libedit: that emulation uses a different starting offset for the history than the real readline. In more recent versions of libedit (such as the one you can now download from ) the bug has been fixed and the workaround causes problems. The attached patch dynamicly detects if the workaround is necessary. NOTE: Actually using the trysoee.dk libedit requires a patch to setup.py, that version of libedit does not install libreadline.dylib, only libedit.dylib. ---------- assignee: ronaldoussoren files: dynamic_editline_workaround_detection.txt messages: 193090 nosy: ned.deily, ronaldoussoren priority: normal severity: normal status: open title: libedit history offset workaround versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30926/dynamic_editline_workaround_detection.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 14:27:21 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 15 Jul 2013 12:27:21 +0000 Subject: [issue18458] libedit history offset workaround In-Reply-To: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> Message-ID: <1373891241.22.0.200007954107.issue18458@psf.upfronthosting.co.za> Ronald Oussoren added the comment: (set as "crash" because the current workaround causes a crash with recent versions of libedit) ---------- keywords: +needs review, patch stage: -> patch review type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 14:37:00 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 15 Jul 2013 12:37:00 +0000 Subject: [issue18459] readline: libedit support on non-apple platforms Message-ID: <1373891820.19.0.984276620623.issue18459@psf.upfronthosting.co.za> New submission from Ronald Oussoren: Modules/readline.c contains some code that improves interop with the readline emulation in libedit. That interop code is currently guarded by '#ifdef __APPLE__' preprocessor tests. This should be replaced by '#if HAVE_LIBEDIT' to make it possible to use the same interop code on other platforms with libedit (such as BSD systems). A patch should have two parts: 1) Detect in either configure or setup.py if libedit's readline emulation will/should be used. 2) Change the __APPLE__ guards by HAVE_LIBEDIT guards. ---------- messages: 193092 nosy: ronaldoussoren priority: normal severity: normal stage: needs patch status: open title: readline: libedit support on non-apple platforms type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 14:38:35 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 15 Jul 2013 12:38:35 +0000 Subject: [issue13631] readline fails to parse some forms of .editrc under editline (libedit) emulation on Mac OS X In-Reply-To: <1324267597.43.0.334578978638.issue13631@psf.upfronthosting.co.za> Message-ID: <1373891915.09.0.77919557793.issue13631@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I can confirm the problem and that the patch fixes the issue. I'll try to commit a fix later this week. ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 14:39:33 2013 From: report at bugs.python.org (=?utf-8?q?F=C3=A9vry_Thibault?=) Date: Mon, 15 Jul 2013 12:39:33 +0000 Subject: [issue18457] Fix and cleanup the ss1.py demo In-Reply-To: <1373890041.01.0.998276597574.issue18457@psf.upfronthosting.co.za> Message-ID: <1373891973.71.0.0341294554205.issue18457@psf.upfronthosting.co.za> F?vry Thibault added the comment: These are some nice improvements, but there is still a crash if you type =1000**5000 . ---------- nosy: +iwontbecreative _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 14:55:32 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 15 Jul 2013 12:55:32 +0000 Subject: [issue13266] Add inspect.unwrap(f) to easily unravel "__wrapped__" chains In-Reply-To: <1319611391.89.0.610441716125.issue13266@psf.upfronthosting.co.za> Message-ID: <1373892932.19.0.713383579944.issue13266@psf.upfronthosting.co.za> Nick Coghlan added the comment: Added a version that allows the iteration to be terminated early if certain criteria are met, which is needed for a robust implementation of inspect.signature. However, I'm thinking the callback based approach in this version isn't especially Pythonic, so I'm thinking it may be better to change the API to a generator function. That way the iterator can still take care of the wrapper loop detection, without needing the clumsy predicate API for early termination. Instead, you would just use an ordinary search loop, and if you wanted the innermost function unconditionally you could do something like: for f in functools.unwrap(original): pass # f is now the innermost function ---------- Added file: http://bugs.python.org/file30927/issue13266_inspect_unwrap_4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 15:07:11 2013 From: report at bugs.python.org (=?utf-8?q?F=C3=A9vry_Thibault?=) Date: Mon, 15 Jul 2013 13:07:11 +0000 Subject: [issue18460] .chm documentation files advertised in download.html but not there. Message-ID: <1373893631.43.0.158733965695.issue18460@psf.upfronthosting.co.za> New submission from F?vry Thibault: Just like it happenned with 2.7.3, the .chm help files are not present in the download pages. The download page (e.g : http://docs.python.org/3/download.html) advertises the presence of .chm files but they are not there. I am unsure whether or not these files are still built, but as this as happend for all 3.* versions and there is no previous bug report, it might be worth looking at simply removing support for these files. ---------- assignee: docs at python components: Documentation messages: 193096 nosy: docs at python, iwontbecreative priority: normal severity: normal status: open title: .chm documentation files advertised in download.html but not there. type: enhancement versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 15:38:20 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Jul 2013 13:38:20 +0000 Subject: [issue18461] X Error in tkinter Message-ID: <1373895500.91.0.409503402666.issue18461@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: When run Tools/demo/ss1.py under Linux and enter the formula "='0'*0x1000", the application will crash with the following message: X Error of failed request: BadAlloc (insufficient resources for operation) Major opcode of failed request: 53 (X_CreatePixmap) Serial number of failed request: 1025 Current serial number in output stream: 1100 Any multiplier between 0x1000 and 0x1fff crashes. With multipliers >= 0x2000 only the number of zeros over 0x2000 is displayed. Multiplier between 0x3000 and 0x3fff crashes again. Hint: The width of '0' in the used font is 8 pixels. 0x2000 * 8 = 2**16. If the width of cell is a 16-bit signed integer, it is negative for the number of zeros between 0x1000 and 0x1fff and wrapped after 0x2000 zeros. It may be a bug either in Tkinter, in Tk, or in X Window. ---------- components: Tkinter messages: 193097 nosy: gpolo, serhiy.storchaka priority: normal severity: normal status: open title: X Error in tkinter type: crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 15:39:31 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Jul 2013 13:39:31 +0000 Subject: [issue18457] Fix and cleanup the ss1.py demo In-Reply-To: <1373890041.01.0.998276597574.issue18457@psf.upfronthosting.co.za> Message-ID: <1373895571.05.0.925123816964.issue18457@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for report. This is a separated issue #18461. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 15:43:40 2013 From: report at bugs.python.org (=?utf-8?q?F=C3=A9vry_Thibault?=) Date: Mon, 15 Jul 2013 13:43:40 +0000 Subject: [issue18461] X Error in tkinter In-Reply-To: <1373895500.91.0.409503402666.issue18461@psf.upfronthosting.co.za> Message-ID: <1373895820.6.0.263636100404.issue18461@psf.upfronthosting.co.za> Changes by F?vry Thibault : ---------- nosy: +iwontbecreative _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 15:46:08 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Jul 2013 13:46:08 +0000 Subject: [issue17202] Add .bat line to .hgeol In-Reply-To: <1360824086.93.0.558513852083.issue17202@psf.upfronthosting.co.za> Message-ID: <1373895968.87.0.209158355188.issue17202@psf.upfronthosting.co.za> Zachary Ware added the comment: I'm on 32 bit Windows 7 Pro, SP1, and have also reproduced the issue on 64 bit Windows 7 Home Premium, SP1. I use the standard Command Prompt (cmd.exe) on both. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 15:49:26 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 15 Jul 2013 13:49:26 +0000 Subject: [issue18181] super vs. someclass.__getattribute__ In-Reply-To: <1370870153.93.0.646087371852.issue18181@psf.upfronthosting.co.za> Message-ID: <1373896166.89.0.477746730744.issue18181@psf.upfronthosting.co.za> Ronald Oussoren added the comment: There now is a PEP for this issue: . The current version of the PEP describes a different API than documented by the attached proposal and the prove of concept code. I'm working on an updated implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 15:50:07 2013 From: report at bugs.python.org (=?utf-8?q?F=C3=A9vry_Thibault?=) Date: Mon, 15 Jul 2013 13:50:07 +0000 Subject: [issue18462] Download > Other documentation page contains a link to a french poker site Message-ID: <1373896207.45.0.720927599345.issue18462@psf.upfronthosting.co.za> New submission from F?vry Thibault: The python for PSP (http://python-psp.net/trac) now redirects to python-psp.net which is a poker site. ---------- assignee: docs at python components: Documentation messages: 193101 nosy: docs at python, iwontbecreative priority: normal severity: normal status: open title: Download > Other documentation page contains a link to a french poker site type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 15:58:48 2013 From: report at bugs.python.org (=?utf-8?q?F=C3=A9vry_Thibault?=) Date: Mon, 15 Jul 2013 13:58:48 +0000 Subject: [issue18463] Download > Other documentation page outdated/dead links Message-ID: <1373896728.41.0.823494848316.issue18463@psf.upfronthosting.co.za> New submission from F?vry Thibault: See issue 18462 and The link to the series-60 nokia page directs to an empty page : http://www.developer.nokia.com/Community/Wiki/Nokia_Open_Source/ with comments in history : 09:15, 24 April 2013 hamishwillee (Talk | contribs) deleted page Nokia Open Source/ (Stop creating htis page or you will be banned.) 04:20, 12 March 2013 hamishwillee (Talk | contribs) deleted page Nokia Open Source/ (There is no point to this topic. No content) 05:37, 4 March 2013 hamishwillee (Talk | contribs) deleted page Nokia Open Source/ (Appears to have been created by accident) - The download are leak for python for VMS is dead : http://www.pi-net.dyndns.org/anonymous/kits/ ---------- assignee: docs at python components: Documentation messages: 193102 nosy: docs at python, iwontbecreative priority: normal severity: normal status: open title: Download > Other documentation page outdated/dead links type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 16:12:11 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 15 Jul 2013 14:12:11 +0000 Subject: [issue12944] Accept arbitrary files for packaging's upload command In-Reply-To: <1315549969.41.0.856641810932.issue12944@psf.upfronthosting.co.za> Message-ID: <1373897531.43.0.564741335224.issue12944@psf.upfronthosting.co.za> ?ric Araujo added the comment: With the lift of the feature freeze decided at PyCon 2013, this feature request could be done for 3.4. ---------- components: +Distutils -Distutils2 versions: +Python 3.4 -3rd party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 16:17:39 2013 From: report at bugs.python.org (A. Jesse Jiryu Davis) Date: Mon, 15 Jul 2013 14:17:39 +0000 Subject: [issue18418] Thread.isAlive() sometimes True after fork In-Reply-To: <1373408030.66.0.77258289483.issue18418@psf.upfronthosting.co.za> Message-ID: <1373897859.22.0.036528219667.issue18418@psf.upfronthosting.co.za> A. Jesse Jiryu Davis added the comment: Charles-Fran?ois, I agree that many guarantees are impossible to enforce in a multithreaded application that calls fork(). But the threading module does try to guarantee, after a fork, that isAlive() is False for all threads but one. I claim that it can more reliably provide this guarantee with my patch applied. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 16:28:44 2013 From: report at bugs.python.org (James Bennet) Date: Mon, 15 Jul 2013 14:28:44 +0000 Subject: [issue11122] bdist_rpm should use rpmbuild, not rpm In-Reply-To: <1296854362.61.0.538085175842.issue11122@psf.upfronthosting.co.za> Message-ID: <1373898524.47.0.0982281397279.issue11122@psf.upfronthosting.co.za> James Bennet added the comment: I have observed this bug under CentOS 5.9 using the version of python-setuptools from the official CentOS repository. -ba is not a valid option for that version of RPM. I am able to get further by installing the rpm-build package. ---------- nosy: +James.Bennet _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 16:30:45 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Jul 2013 14:30:45 +0000 Subject: [issue18436] Add mapping of symbol to function to operator module In-Reply-To: <1373662006.12.0.760343850871.issue18436@psf.upfronthosting.co.za> Message-ID: <1373898645.58.0.882239381936.issue18436@psf.upfronthosting.co.za> Zachary Ware added the comment: The purpose is to make usage of the operator module more readable, particularly for some of the more exotic operators. For instance, I find ``operator.get_op(">>=")`` to be a lot more obvious about what's going to happen than ``operator.irshift``. Also, I think it is helpful to have available a listing of all the operators that Python supports. If we're going to have such a listing, why not make it a mapping of op to function? And once we have such a mapping, it would be nice to have a nice interface to it. Having this available would make it easy to implement the kind of function that Nick mentioned in the python-ideas thread, that takes an operator string instead of only a function. I will admit that the need is not great, and obviously this isn't something that someone who needs it couldn't do themselves. But I think the convenience of it makes it at least worth consideration. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 16:37:02 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 15 Jul 2013 14:37:02 +0000 Subject: [issue18436] Add mapping of symbol to function to operator module In-Reply-To: <1373662006.12.0.760343850871.issue18436@psf.upfronthosting.co.za> Message-ID: <1373899022.32.0.188458778898.issue18436@psf.upfronthosting.co.za> Nick Coghlan added the comment: I liked Ron's suggestion of using it to improve the output of help() (by getting access to the docstrings of the operator functions, and then enhancing those to be a bit more informative) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 16:41:51 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Jul 2013 14:41:51 +0000 Subject: [issue18461] X Error in tkinter In-Reply-To: <1373895500.91.0.409503402666.issue18461@psf.upfronthosting.co.za> Message-ID: <1373899311.14.0.649779844686.issue18461@psf.upfronthosting.co.za> Zachary Ware added the comment: I've done a small amount of testing on Windows (both with the issue18457 patch applied and without), and there is no such crash there. Output isn't what is expected (the cell is lengthened, but nothing is shown), but no crash. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 16:53:00 2013 From: report at bugs.python.org (Aaron Meurer) Date: Mon, 15 Jul 2013 14:53:00 +0000 Subject: [issue12944] Accept arbitrary files for packaging's upload command In-Reply-To: <1315549969.41.0.856641810932.issue12944@psf.upfronthosting.co.za> Message-ID: <1373899980.02.0.503623925493.issue12944@psf.upfronthosting.co.za> Changes by Aaron Meurer : ---------- nosy: +Aaron.Meurer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 16:56:16 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 15 Jul 2013 14:56:16 +0000 Subject: [issue18181] super vs. someclass.__getattribute__ In-Reply-To: <1370870153.93.0.646087371852.issue18181@psf.upfronthosting.co.za> Message-ID: <1373900176.96.0.595724997847.issue18181@psf.upfronthosting.co.za> Ronald Oussoren added the comment: issue18181-locallookup-only-super.txt implements the current version of PEP 447, but only for the super object. In this version of the patch normal attribute lookup (object.__getattribute__ and PyObject_GenericGetAttr) are not yet affected. Another open issue: the documentation for the super object itself does not yet mention __locallookup__; it probably should but I don't know yet how to cleanly add it there. ---------- Added file: http://bugs.python.org/file30928/issue18181-locallookup-only-super.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 17:11:29 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Jul 2013 15:11:29 +0000 Subject: [issue18344] _bufferedreader_read_all() may leak reference to data In-Reply-To: <1372720264.13.0.315058042183.issue18344@psf.upfronthosting.co.za> Message-ID: <3bv7Vn07lmz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 9ce863993a38 by Richard Oudkerk in branch '3.3': Issue #18344: Fix potential ref-leaks in _bufferedreader_read_all(). http://hg.python.org/cpython/rev/9ce863993a38 New changeset 9b041f44cb63 by Richard Oudkerk in branch 'default': Issue #18344: Fix potential ref-leaks in _bufferedreader_read_all(). http://hg.python.org/cpython/rev/9b041f44cb63 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 17:30:39 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 15 Jul 2013 15:30:39 +0000 Subject: [issue18464] Typo in the name of function in test__encoded_words.py Message-ID: <1373902239.54.0.238971281643.issue18464@psf.upfronthosting.co.za> New submission from Vajrasky Kok: There is a typo in the name of function in test__encoded_words.py. Python 3.4, Lib/test/test_email/test__encoded_words.py, line 78: def test_q_escpaed_bytes_preserved(self): It is supposed to be (I guess): def test_q_escaped_bytes_preserved(self): ---------- components: Tests messages: 193111 nosy: r.david.murray, vajrasky priority: normal severity: normal status: open title: Typo in the name of function in test__encoded_words.py versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 17:45:27 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 15 Jul 2013 15:45:27 +0000 Subject: [issue11874] argparse assertion failure with brackets in metavars In-Reply-To: <1303201252.58.0.236363581255.issue11874@psf.upfronthosting.co.za> Message-ID: <1373903127.08.0.863390237164.issue11874@psf.upfronthosting.co.za> Vajrasky Kok added the comment: paul j3, thanks for reviewing my patch and giving me credit in your patch for another ticket. Yeah, as you could see, the reason I return arg_parts and text is because the text still needs to undergo the cleanup process. You solved it by putting cleaning up in inner function. I am thinking whether it is best to do "assert ' '.join(opt_parts) == opt_usage" inside _format_actions_usage helper function. In that way, we can avoid returning the text. We can return only the arg_parts. Anyway, my patch still got some unused variables, notably part_regexp and inner. My bad. Let me check the code more deeply. See whether I can architect my patch in a better way. Maybe we can avoid building separate list inside _format_actions_usage. Beside of that, this bug is not introduced solely by bracket character. It needs another non-space character on the right side of it. This line is fine: parser.add_argument ('--b', metavar="[innerpart] outerpart") This line will fail the assertion: parser.add_argument ('--b', metavar="[innerpart]outerpart") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 18:00:18 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 15 Jul 2013 16:00:18 +0000 Subject: [issue18465] There are unused variables and unused import in Lib/test/test_minidom.py Message-ID: <1373904018.67.0.333776446798.issue18465@psf.upfronthosting.co.za> New submission from Vajrasky Kok: The unit test file imports verbose from test.support, but it never used it. The child2 variable inside testRemoveAttributeNode is not used. The doc variable inside testHasChildNodes is not used. Attached the menial fix for this unit test. ---------- components: Tests files: fix_for_unused_variables_and_unused_import_in_test_minidom.txt messages: 193113 nosy: vajrasky priority: normal severity: normal status: open title: There are unused variables and unused import in Lib/test/test_minidom.py versions: Python 3.4 Added file: http://bugs.python.org/file30929/fix_for_unused_variables_and_unused_import_in_test_minidom.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 18:10:40 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Jul 2013 16:10:40 +0000 Subject: [issue18464] Typo in the name of function in test__encoded_words.py In-Reply-To: <1373902239.54.0.238971281643.issue18464@psf.upfronthosting.co.za> Message-ID: <3bv8q3638gz7LlG@mail.python.org> Roundup Robot added the comment: New changeset 6a6ca7c49c2a by R David Murray in branch '3.3': Closes #18464: fix typo in test name. http://hg.python.org/cpython/rev/6a6ca7c49c2a New changeset 47a659bc11c4 by R David Murray in branch 'default': Merge: Closes #18464: fix typo in test name. http://hg.python.org/cpython/rev/47a659bc11c4 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 18:14:05 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Jul 2013 16:14:05 +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: <1373904845.49.0.581615137804.issue18387@psf.upfronthosting.co.za> Zachary Ware added the comment: Aside from '<>' still being present, the patch looks good to me. There are a couple of issues with content, but those are separate from this issue. (For instance, '~', '>>', and '<<' direct to the BITWISE page, which doesn't mention any of them at all.) ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 18:32:23 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Jul 2013 16:32:23 +0000 Subject: [issue18393] Gestalt() is deprecated on OSX 10.8, remove support? In-Reply-To: <1373188277.85.0.140879649909.issue18393@psf.upfronthosting.co.za> Message-ID: <3bv9J62xCBz7Lmd@mail.python.org> Roundup Robot added the comment: New changeset ccbaf6762b54 by Ronald Oussoren in branch 'default': Issue #18393: Remove use of deprecated API on OSX http://hg.python.org/cpython/rev/ccbaf6762b54 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 18:35:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Jul 2013 16:35:57 +0000 Subject: [issue18427] str.replace causes segfault for long strings In-Reply-To: <1373535639.26.0.108709359025.issue18427@psf.upfronthosting.co.za> Message-ID: <3bv9ND6KT5z7Ljj@mail.python.org> Roundup Robot added the comment: New changeset 06d9f106c57e by Ronald Oussoren in branch '2.7': Move entry from #18427 to the right section in the NEWS file http://hg.python.org/cpython/rev/06d9f106c57e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 18:36:36 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 15 Jul 2013 16:36:36 +0000 Subject: [issue18427] str.replace causes segfault for long strings In-Reply-To: <1373535639.26.0.108709359025.issue18427@psf.upfronthosting.co.za> Message-ID: <1373906196.01.0.387612202881.issue18427@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Serhiy: you're right. I've moved the message to the correct section. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 18:38:00 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 15 Jul 2013 16:38:00 +0000 Subject: [issue18393] Gestalt() is deprecated on OSX 10.8, remove support? In-Reply-To: <1373188277.85.0.140879649909.issue18393@psf.upfronthosting.co.za> Message-ID: <1373906280.19.0.710310216973.issue18393@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I won't backport to 3.3 or 2.7, it is highly unlikely that the API will actually be removed anytime soon. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 19:16:01 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 15 Jul 2013 17:16:01 +0000 Subject: [issue18344] _bufferedreader_read_all() may leak reference to data In-Reply-To: <1372720264.13.0.315058042183.issue18344@psf.upfronthosting.co.za> Message-ID: <1373908561.66.0.694131043021.issue18344@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 19:32:51 2013 From: report at bugs.python.org (=?utf-8?q?F=C3=A9vry_Thibault?=) Date: Mon, 15 Jul 2013 17:32:51 +0000 Subject: [issue18466] Spelling mistakes in various code comments. Message-ID: <1373909571.44.0.949892598858.issue18466@psf.upfronthosting.co.za> New submission from F?vry Thibault: The attached patch fixes spelling mistakes found on various comments, mainly in /Lib/. I choose not to correct things like 'everytime' since the main goal was to improve readability and not turn useful technical comments into English litterature. I hope this is fine. [These were found using a script, if anyone wants I could post it somewhere after I polish it]. ---------- files: spelling.patch keywords: patch messages: 193120 nosy: iwontbecreative priority: normal severity: normal status: open title: Spelling mistakes in various code comments. type: enhancement Added file: http://bugs.python.org/file30930/spelling.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 19:39:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Jul 2013 17:39:06 +0000 Subject: [issue18455] Multiprocessing connection SocketClient retries connection on socket In-Reply-To: <1373844260.31.0.599002604646.issue18455@psf.upfronthosting.co.za> Message-ID: <3bvBn53lp1z7Lmy@mail.python.org> Roundup Robot added the comment: New changeset 542a317d4351 by Richard Oudkerk in branch '2.7': Issue #18455: multiprocessing should not retry connect() with same socket. http://hg.python.org/cpython/rev/542a317d4351 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 19:51:09 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 15 Jul 2013 17:51:09 +0000 Subject: [issue18344] _bufferedreader_read_all() may leak reference to data In-Reply-To: <1372720264.13.0.315058042183.issue18344@psf.upfronthosting.co.za> Message-ID: <1373910669.36.0.814991877111.issue18344@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- resolution: -> fixed stage: needs patch -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 20:29:20 2013 From: report at bugs.python.org (Ron Adam) Date: Mon, 15 Jul 2013 18:29:20 +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: <1373912960.17.0.0479625103063.issue18387@psf.upfronthosting.co.za> Changes by Ron Adam : Removed file: http://bugs.python.org/file30922/pdoc_symbols.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 20:30:55 2013 From: report at bugs.python.org (Ron Adam) Date: Mon, 15 Jul 2013 18:30:55 +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: <1373913055.79.0.453466672493.issue18387@psf.upfronthosting.co.za> Ron Adam added the comment: Patch update: "<>" removed from pydoc symbols table. ---------- Added file: http://bugs.python.org/file30931/pdoc_symbols.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 20:33:17 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Jul 2013 18:33:17 +0000 Subject: [issue18460] .chm documentation files advertised in download.html but not there. In-Reply-To: <1373893631.43.0.158733965695.issue18460@psf.upfronthosting.co.za> Message-ID: <1373913197.44.0.71185521488.issue18460@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +georg.brandl, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 20:34:32 2013 From: report at bugs.python.org (Ron Adam) Date: Mon, 15 Jul 2013 18:34:32 +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: <1373913272.51.0.172982338653.issue18387@psf.upfronthosting.co.za> Ron Adam added the comment: I agree the specific content for each symbol are separate issues. Those are probably best addressed individually or a few at a time when they are closely related. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 20:37:18 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 15 Jul 2013 18:37:18 +0000 Subject: [issue18440] hash() and __hash__() do not document their size constraints In-Reply-To: <1373740485.69.0.943591579445.issue18440@psf.upfronthosting.co.za> Message-ID: <1373913438.1.0.407941347791.issue18440@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 21:15:57 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 15 Jul 2013 19:15:57 +0000 Subject: [issue18418] Thread.isAlive() sometimes True after fork In-Reply-To: <1373408030.66.0.77258289483.issue18418@psf.upfronthosting.co.za> Message-ID: <1373915757.43.0.66332938347.issue18418@psf.upfronthosting.co.za> Gregory P. Smith added the comment: This patch makes sense to me. I've gone over the code and I cannot spot any adverse effects. I was wondering in particular if anything would be surprised to find a non-started thread in _active within the short window where that will be true but nothing appears to care about that. You should add a comment to the code mentioning this issue and why the .set() is done after the _active insertion. After that, I'd say commit it. If you want a consistent reproducible test case for this I believe you will need to replace the Thread object's __started with a test wrapper who's set() method blocks waiting for for the fork to have happened before doing the actual set(). That is a bit tricky and may not be worth it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 21:22:36 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Jul 2013 19:22:36 +0000 Subject: [issue18440] hash() and __hash__() do not document their size constraints In-Reply-To: <1373740485.69.0.943591579445.issue18440@psf.upfronthosting.co.za> Message-ID: <3bvF4W2FMWzPns@mail.python.org> Roundup Robot added the comment: New changeset 8fe13940b033 by Barry Warsaw in branch '3.3': - Issue #18440: Clarify that `hash()` can truncate the value returned from an http://hg.python.org/cpython/rev/8fe13940b033 New changeset f01f0c9cbcc8 by Barry Warsaw in branch 'default': - Issue #18440: Clarify that `hash()` can truncate the value returned from an http://hg.python.org/cpython/rev/f01f0c9cbcc8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 21:23:28 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 15 Jul 2013 19:23:28 +0000 Subject: [issue18440] hash() and __hash__() do not document their size constraints In-Reply-To: <1373740485.69.0.943591579445.issue18440@psf.upfronthosting.co.za> Message-ID: <1373916208.02.0.965094167742.issue18440@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 21:34:43 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 15 Jul 2013 19:34:43 +0000 Subject: [issue18455] Multiprocessing connection SocketClient retries connection on socket In-Reply-To: <1373844260.31.0.599002604646.issue18455@psf.upfronthosting.co.za> Message-ID: <1373916883.23.0.670990928856.issue18455@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Thanks for the report. This should be fixed now in 2.7. (3.1 and 3.2 only get security fixes.) ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 22:30:57 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 15 Jul 2013 20:30:57 +0000 Subject: [issue18418] Thread.isAlive() sometimes True after fork In-Reply-To: <1373915757.43.0.66332938347.issue18418@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > If you want a consistent reproducible test case for this I believe you will need to replace the Thread object's __started with a test wrapper who's set() method blocks waiting for for the fork to have happened before doing the actual set(). That is a bit tricky and may not be worth it. Actually, setting sys.setswitchinterval(1e-6) makes it fairly easy to reproduce. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 22:57:48 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Jul 2013 20:57:48 +0000 Subject: [issue18444] IDLE: Mac OS X pressing ctrl-A in Python shell moved cursor before the prompt, which then makes the keyboard unresponsive. In-Reply-To: <1373777050.16.0.963661085579.issue18444@psf.upfronthosting.co.za> Message-ID: <1373921868.79.0.759196545965.issue18444@psf.upfronthosting.co.za> Ned Deily added the comment: I think that those two requirements, i.e. (1) a set of key bindings compatible with standard Cocoa text key bindings and (2) a set of key bindings kept in sync across all IDLE platforms, would be desirable but probably unattainable. A good next step would be for someone to make a table of the IDLE key bindings across the various keysets and platforms. That would make it easier to make informed design decisions. The "Classic Unix" keyset is quite different, with emacs-like multiple key strokes (like Ctrl-X Ctrl-N for New Window). I wonder how widely it is used. For OS X, we have the aforementioned conflicts with system accelerators and with the Cocoa Tk we have already had to disable some common accelerators (like Cmd-M for Open Module..) because of conflicts with Cocoa Tk's builtin accelerators and the as-yet-unresolved Ctrl-5 and Ctrl-6 crashes (Issue16023). The X11 situation is a mess with Option and Command being reversed and, yes, there are still users of Python with X11 Tk on OS X (for one, MacPorts provides it as the default option). Perhaps the best solution for it is a separate OS X X11 keyset. Re function keys: I created a new user account on a current OS X 10.8 (with a US keyboard on a MacBook Pro). It seems that function keys are enabled by default. This is controlled by a checkbox setting in the Keyboard panel of System Preferences. With the box checked (the default), you have to press the fn modifier key to enable the hardware control functions. Inspecting the default set of Keyboard Shortcuts in the panel, the only F(n) keys defined are F11, F12, Cmd-F5, Opt-Cmd-F5, and Ctrl-F1 through Ctrl-F7. This conforms to the current OS X Human Interface Guidelines, Appendix A Keyboard Shortcuts, with the addition that the entire range F8 through F12 are marked as Apple reserved. (Interestingly, the guidelines do not note that Ctrl-Left and Ctrl-Right are now used by Mission Control by default.) That said, it would be great if IDLE could more closely follow the OS X Human Interface Guidelines, including the accessibility guidelines for Universal Access. Of course, IDLE is very much dependent on Tk in these matters. So trying to improve things will require a fair amount of research and experimentation with the Apple docs, Tk code, and IDLE itself. It would be a good project for someone interested in practical User Experience design. Additional references: https://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AppleHIGuidelines/KeyboardShortcuts/KeyboardShortcuts.html https://developer.apple.com/library/mac/#documentation/Accessibility/Conceptual/AccessibilityMacOSX/OSXAXIntro/OSXAXintro.html http://www.hcs.harvard.edu/~jrus/Site/System%20Bindings.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 23:44:15 2013 From: report at bugs.python.org (Ben Wolfson) Date: Mon, 15 Jul 2013 21:44:15 +0000 Subject: [issue12014] str.format parses replacement field incorrectly In-Reply-To: <1304646359.82.0.599761597998.issue12014@psf.upfronthosting.co.za> Message-ID: <1373924655.65.0.300593441874.issue12014@psf.upfronthosting.co.za> Ben Wolfson added the comment: Ping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 00:06:07 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jul 2013 22:06:07 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1373925967.22.0.710848867845.issue18408@psf.upfronthosting.co.za> STINNER Victor added the comment: listpop.patch: list_ass_slice() now handles listresize() failure when items are deleted. ---------- Added file: http://bugs.python.org/file30932/listpop.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 00:08:16 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jul 2013 22:08:16 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1373926096.7.0.0575776077634.issue18408@psf.upfronthosting.co.za> STINNER Victor added the comment: frame_fasttolocals.patch: Add a new PyFrame_FastToLocalsWithError() function, same than PyFrame_FastToLocals(), except that errors are reported. This function is not atomic: if an error occurs in the middle of map_to_dict(), the frame can enter an inconsistent state. Is it worse than not reporting the failure? ---------- Added file: http://bugs.python.org/file30933/frame_fasttolocals.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 00:12:45 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Jul 2013 22:12:45 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3bvJrs0lrQz7Lkx@mail.python.org> Roundup Robot added the comment: New changeset 735e3c43e61c by Victor Stinner in branch 'default': Issue #18408: Fix pyexpat.ParserCreate() http://hg.python.org/cpython/rev/735e3c43e61c New changeset 27f8ccce687d by Victor Stinner in branch 'default': Issue #18408: Fix CJK decoders, raise MemoryError on memory allocation failure http://hg.python.org/cpython/rev/27f8ccce687d New changeset 82b2ee140994 by Victor Stinner in branch 'default': Issue #18408: PyObject_Call() now fails with an assertion error in debug mode http://hg.python.org/cpython/rev/82b2ee140994 New changeset ef0dbe00760e by Victor Stinner in branch 'default': Issue #18408: Don't check unicode consistency in _PyUnicode_HAS_UTF8_MEMORY() http://hg.python.org/cpython/rev/ef0dbe00760e New changeset c676fc74d779 by Victor Stinner in branch 'default': Issue #18408: type_new() and PyType_FromSpecWithBases() now raise MemoryError http://hg.python.org/cpython/rev/c676fc74d779 New changeset 9244e79c6e14 by Victor Stinner in branch 'default': Issue #18408: random_seed() now raises a MemoryError on memory allocation http://hg.python.org/cpython/rev/9244e79c6e14 New changeset 71a572a516f9 by Victor Stinner in branch 'default': Issue #18408: Fix PyEval_EvalFrameEx() for MemoryError http://hg.python.org/cpython/rev/71a572a516f9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 00:22:11 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Jul 2013 22:22:11 +0000 Subject: [issue18462] Download > Other documentation page contains a link to a french poker site In-Reply-To: <1373896207.45.0.720927599345.issue18462@psf.upfronthosting.co.za> Message-ID: <1373926931.01.0.010433222605.issue18462@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the report. Since there doesn't seem to be an obvious replacement web page, I've removed the reference to this port. ---------- nosy: +ned.deily resolution: -> fixed stage: -> committed/rejected status: open -> closed type: enhancement -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 00:25:57 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Jul 2013 22:25:57 +0000 Subject: [issue18463] Download > Other documentation page outdated/dead links In-Reply-To: <1373896728.41.0.823494848316.issue18463@psf.upfronthosting.co.za> Message-ID: <1373927157.83.0.774841228772.issue18463@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the report. The S60 section now links to a Wikipedia page which gives a better overview and to the Sourceforge download link for the original project. I've removed the dead link to the other VMS project. ---------- nosy: +ned.deily resolution: -> fixed stage: -> committed/rejected status: open -> closed type: enhancement -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 00:33:10 2013 From: report at bugs.python.org (=?utf-8?b?TWF0xJtqIFTDvcSN?=) Date: Mon, 15 Jul 2013 22:33:10 +0000 Subject: [issue18467] argparse - problematic 'default' behavior Message-ID: <1373927590.26.0.302211166373.issue18467@psf.upfronthosting.co.za> New submission from Mat?j T??: I have an issue with passing default values to arguments. Basically, I would like to have a 'choices' argument (indicating something using capital letters) and perform custom action (adding boolean values to the args namespace). See the bottom of this post for rationale. According to the documentation ( http://docs.python.org/2.7/library/argparse.html#default ), ... If the default value is a string, the parser parses the value as if it were a command-line argument. ... If this was true, I could implement a custom action. However, even if the default value is a string (as the documentation suggests), the action is bypassed. My goal is simple - I want to allow short choice-type argument (such as something.py --algorithm Q, the help would say --algorithhm Q|S, Q is quick, S is slow). Since the implementation shouldn't know about the mean one is communicating with the user, I would like to have the 'args' namespace either like (type='Q', quick=True, slow=False) or (type='quick') without giving up usage of the 'choices' pattern. If I change my mind and add a 'type' function that would expand capital letters abbreviations to full names, I will be OK with default values. However, if I pass the argument on the command-line, the type() call is performed first and the query whether the result is in the choices list fails. I consider the current behavior as a bug, IMO the action shouldn't be bypassed if the "default" is string. ---------- components: Library (Lib) messages: 193135 nosy: matej.tyc priority: normal severity: normal status: open title: argparse - problematic 'default' behavior type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 01:37:12 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 15 Jul 2013 23:37:12 +0000 Subject: [issue18468] re.group() should never return a bytearray Message-ID: <1373931432.85.0.594082146564.issue18468@psf.upfronthosting.co.za> New submission from Guido van Rossum: I discovered that the Python 3 version of the re module's Match object behaves subtly different from the Python 2 version when the target string (i.e. the haystack, not the needle) is a buffer object. In Python 2, the type of the return value of group() is always either a Unicode string or an 8-bit string, and the type is determined by looking at the target string -- if the target is unicode, group() returns a unicode string, otherwise, group() returns an 8-bit string. In particular, if the target is a buffer object, group() returns an 8-bit string. I think this is the appropriate behavior: otherwise using regular expression matching to extract a small substring from a large target string would unnecessarily keep the large target string alive as long as the substring is alive. But in Python 3, the behavior of group() has changed so that its return type always matches that of the target string. I think this is bad -- apart from the lifetime concern, it means that if your target happens to be a bytearray, the return value isn't even hashable! Proper behavior should be that .group() returned a bytes object if the input was binary data and a str object if the input was unicode data (str) regardless of specific types containing the input target data. Probably not much, if anything, would be depending on getting a bytearray out of that. Fix this in 3.4? 3.3 and earlier users are stuck with an extra bytes() call and data copy in these cases. [Further discussion at http://mail.python.org/pipermail/python-dev/2013-July/127332.html] ---------- components: Library (Lib) messages: 193136 nosy: gvanrossum priority: normal severity: normal stage: needs patch status: open title: re.group() should never return a bytearray type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 01:51:03 2013 From: report at bugs.python.org (A. Jesse Jiryu Davis) Date: Mon, 15 Jul 2013 23:51:03 +0000 Subject: [issue18418] Thread.isAlive() sometimes True after fork In-Reply-To: <1373408030.66.0.77258289483.issue18418@psf.upfronthosting.co.za> Message-ID: <1373932263.39.0.620918492471.issue18418@psf.upfronthosting.co.za> A. Jesse Jiryu Davis added the comment: Patch #2: * Add comment before .set() as requested. * setcheckinterval(0) and try 20 times to repro the bug, inspired by test_enumerate_after_join. This reliably repros in 2.7.5. ---------- Added file: http://bugs.python.org/file30934/fix_is_alive_and_fork_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 02:02:12 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Jul 2013 00:02:12 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3bvMH76gy1z7LjN@mail.python.org> Roundup Robot added the comment: New changeset 2e42c0a39321 by Victor Stinner in branch 'default': Issue #18408: Fix _Py_DisplaySourceLine() http://hg.python.org/cpython/rev/2e42c0a39321 New changeset 92a9ccb2a521 by Victor Stinner in branch 'default': Issue #18408: add more assertions on PyErr_Occurred() in ceval.c to detect bugs http://hg.python.org/cpython/rev/92a9ccb2a521 New changeset 9213313b1a6f by Victor Stinner in branch 'default': Issue #18408: Fix show_warning(), clear also the exception raised by http://hg.python.org/cpython/rev/9213313b1a6f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 02:05:05 2013 From: report at bugs.python.org (A. Jesse Jiryu Davis) Date: Tue, 16 Jul 2013 00:05:05 +0000 Subject: [issue18418] Thread.isAlive() sometimes True after fork In-Reply-To: <1373408030.66.0.77258289483.issue18418@psf.upfronthosting.co.za> Message-ID: <1373933105.47.0.843006259272.issue18418@psf.upfronthosting.co.za> Changes by A. Jesse Jiryu Davis : Added file: http://bugs.python.org/file30935/fix_is_alive_and_fork_python_33.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 02:32:30 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2013 00:32:30 +0000 Subject: [issue18469] PyStructSequence does not handle exceptions correctly Message-ID: <1373934750.38.0.634861561736.issue18469@psf.upfronthosting.co.za> New submission from STINNER Victor: Using pyfailmalloc (*) (see issue #18408), I found bugs in the PyStructSequence API. The following macros in Objects/structseq.c does not check for exceptions: #define VISIBLE_SIZE(op) Py_SIZE(op) #define VISIBLE_SIZE_TP(tp) PyLong_AsLong( \ PyDict_GetItemString((tp)->tp_dict, visible_length_key)) #define REAL_SIZE_TP(tp) PyLong_AsLong( \ PyDict_GetItemString((tp)->tp_dict, real_length_key)) #define REAL_SIZE(op) REAL_SIZE_TP(Py_TYPE(op)) #define UNNAMED_FIELDS_TP(tp) PyLong_AsLong( \ PyDict_GetItemString((tp)->tp_dict, unnamed_fields_key)) #define UNNAMED_FIELDS(op) UNNAMED_FIELDS_TP(Py_TYPE(op)) Exceptions in PyDict_GetItemString() and PyLong_AsLong() are "unlikely" (the request key always exist, except in a newly developed module, which is not the case here), but become very likely using pyfailmalloc: PyDict_GetItemString() allocates a temporary string, and the memory allocation can fail. In my opinion, the PyStructSequence structure should store the number of visible, real and unnamed fields. The problem is that it would require a design of the structure: data cannot be added between tuple items and the tuple header. PyStructSequence is currently defined as: typedef PyTupleObject PyStructSequence; Another option is to detect and handle correctly exceptions where these macros are used. But how should we handle exceptions in structseq_dealloc() ??? static void structseq_dealloc(PyStructSequence *obj) { Py_ssize_t i, size; size = REAL_SIZE(obj); for (i = 0; i < size; ++i) { Py_XDECREF(obj->ob_item[i]); } PyObject_GC_Del(obj); } By the way, structseq_dealloc() might restore the original size ("Py_SIZE(obj) = REAL_SIZE(obj);") before calling the tuple destructor (even if tupledealloc() only keeps real tuple in its free list). (*) https://pypi.python.org/pypi/pyfailmalloc ---------- messages: 193139 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: PyStructSequence does not handle exceptions correctly versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 02:33:08 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2013 00:33:08 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1373934788.06.0.510254845898.issue18408@psf.upfronthosting.co.za> STINNER Victor added the comment: I created the issue #18469: "PyStructSequence does not handle exceptions correctly". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 03:24:44 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2013 01:24:44 +0000 Subject: [issue18469] PyStructSequence does not handle exceptions correctly In-Reply-To: <1373934750.38.0.634861561736.issue18469@psf.upfronthosting.co.za> Message-ID: <1373937884.85.0.855578075081.issue18469@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue is common in test_datetime and test_import tests using failmalloc, especially if _PyErr_BadInternalCall() fails immedialy with an assertion error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 03:28:50 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2013 01:28:50 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1373938130.0.0.375474726946.issue18408@psf.upfronthosting.co.za> STINNER Victor added the comment: import_init() calls Py_FatalError() at any error. This is not kind for Py_NewInterpreter() which calls import_init(): Py_NewInterpreter() exits Python with a fatal error, instead of returning NULL, on import_init() failure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 03:32:23 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2013 01:32:23 +0000 Subject: [issue18470] tokenizer.c does not handle new_string() failure Message-ID: <1373938343.57.0.731932507548.issue18470@psf.upfronthosting.co.za> New submission from STINNER Victor: Callers of the new_string() function do not check if the function succeed or not. Python does crash if the function failed, for example in get_coding_spec(): char* r = new_string(begin, t - begin); char* q = get_normal_name(r); Using pytracemalloc tool, it's easy to tricker this issue (ex: using test_future or test_parser): see issue #18408. ---------- messages: 193143 nosy: haypo priority: normal severity: normal status: open title: tokenizer.c does not handle new_string() failure versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 03:32:37 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2013 01:32:37 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1373938357.02.0.58447711672.issue18408@psf.upfronthosting.co.za> STINNER Victor added the comment: New issue #18470: "tokenizer.c does not handle new_string() failure". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 03:36:05 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2013 01:36:05 +0000 Subject: [issue18470] tokenizer.c does not handle new_string() failure In-Reply-To: <1373938343.57.0.731932507548.issue18470@psf.upfronthosting.co.za> Message-ID: <1373938565.6.0.0739733039642.issue18470@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 03:52:16 2013 From: report at bugs.python.org (=?utf-8?q?Fran=C3=A7ois_Pinard?=) Date: Tue, 16 Jul 2013 01:52:16 +0000 Subject: [issue18471] Typo in heapq documentation Message-ID: <1373939536.64.0.4181851186.issue18471@psf.upfronthosting.co.za> New submission from Fran?ois Pinard: Within http://docs.python.org/3/library/heapq.html#theory, a sentence begins with "When an event schedule" while it should be spelled "When an event schedules". The same may be observed in Python 2 documentation. ---------- assignee: docs at python components: Documentation messages: 193145 nosy: docs at python, icule priority: normal severity: normal status: open title: Typo in heapq documentation versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 04:07:55 2013 From: report at bugs.python.org (Sergey) Date: Tue, 16 Jul 2013 02:07:55 +0000 Subject: [issue18305] [patch] Fast sum() for non-numbers In-Reply-To: <1372228439.5.0.789865081817.issue18305@psf.upfronthosting.co.za> Message-ID: <1373940475.28.0.245690364485.issue18305@psf.upfronthosting.co.za> Sergey added the comment: > This is not a common case. A common case is creating short tuples and keeping a lot of tuples in memory. > For fast += you need keep not only a size of tuple, but also a size of allocated memory. It's a cause of sys.getsizeof([1, 2]) > sys.getsizeof((1, 2)). Agree. But is it worth worrying about? How much RAM could be taken by it? E.g. python test uses ~30000 tuples in peak. So if we add e.g. 32 bytes to tuple then python test would use 106MB of RAM instead of 105MB. 1%? ;) > You shouldn't optimize a rare case at the cost of regression in common usage. This could optimize many cases, like instant tuple copy, or instant conversions of lists to tuples and back, if this idea is extended to lists. It may also work for strings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 04:09:55 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Jul 2013 02:09:55 +0000 Subject: [issue18471] Typo in heapq documentation In-Reply-To: <1373939536.64.0.4181851186.issue18471@psf.upfronthosting.co.za> Message-ID: <3bvQ6V0H6mz7Ljt@mail.python.org> Roundup Robot added the comment: New changeset 236e6b995300 by Ned Deily in branch '2.7': Issue #18471: Fix typo in heapq documentation (reported by Fran?ois Pinard). http://hg.python.org/cpython/rev/236e6b995300 New changeset e22dd5fda5a8 by Ned Deily in branch '3.3': Issue #18471: Fix typo in heapq documentation (reported by Fran?ois Pinard). http://hg.python.org/cpython/rev/e22dd5fda5a8 New changeset 8a078bf3cf14 by Ned Deily in branch 'default': Closes #18471: Fix typo in heapq documentation (reported by Fran?ois Pinard). http://hg.python.org/cpython/rev/8a078bf3cf14 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 04:10:44 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 16 Jul 2013 02:10:44 +0000 Subject: [issue18471] Typo in heapq documentation In-Reply-To: <1373939536.64.0.4181851186.issue18471@psf.upfronthosting.co.za> Message-ID: <1373940644.8.0.78287516236.issue18471@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the report. ---------- nosy: +ned.deily versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 04:11:21 2013 From: report at bugs.python.org (Todd Rovito) Date: Tue, 16 Jul 2013 02:11:21 +0000 Subject: [issue18441] Idle: Make test.support.requires('gui') skip when it should. In-Reply-To: <1373754847.55.0.0641648695763.issue18441@psf.upfronthosting.co.za> Message-ID: <1373940681.86.0.19078989745.issue18441@psf.upfronthosting.co.za> Changes by Todd Rovito : ---------- nosy: +Todd.Rovito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 04:11:46 2013 From: report at bugs.python.org (Todd Rovito) Date: Tue, 16 Jul 2013 02:11:46 +0000 Subject: [issue18441] Idle: Make test.support.requires('gui') skip when it should. In-Reply-To: <1373754847.55.0.0641648695763.issue18441@psf.upfronthosting.co.za> Message-ID: <1373940706.56.0.752895469059.issue18441@psf.upfronthosting.co.za> Changes by Todd Rovito : ---------- nosy: +philwebster _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 04:12:05 2013 From: report at bugs.python.org (Todd Rovito) Date: Tue, 16 Jul 2013 02:12:05 +0000 Subject: [issue18441] Idle: Make test.support.requires('gui') skip when it should. In-Reply-To: <1373754847.55.0.0641648695763.issue18441@psf.upfronthosting.co.za> Message-ID: <1373940725.35.0.399999021447.issue18441@psf.upfronthosting.co.za> Changes by Todd Rovito : ---------- nosy: +JayKrish _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 04:17:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Jul 2013 02:17:27 +0000 Subject: [issue18470] tokenizer.c does not handle new_string() failure In-Reply-To: <1373938343.57.0.731932507548.issue18470@psf.upfronthosting.co.za> Message-ID: <3bvQHC0vmcz7Llx@mail.python.org> Roundup Robot added the comment: New changeset c3a510b22218 by Benjamin Peterson in branch '3.3': check the return value of new_string() (closes #18470) http://hg.python.org/cpython/rev/c3a510b22218 New changeset 8889c9b5dd3a by Benjamin Peterson in branch '3.3': merge 3.3 (#18470) http://hg.python.org/cpython/rev/8889c9b5dd3a ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 04:41:48 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2013 02:41:48 +0000 Subject: [issue18470] tokenizer.c does not handle new_string() failure In-Reply-To: <1373938343.57.0.731932507548.issue18470@psf.upfronthosting.co.za> Message-ID: <1373942508.3.0.286841315941.issue18470@psf.upfronthosting.co.za> STINNER Victor added the comment: The fix has not been merged into default. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 04:44:23 2013 From: report at bugs.python.org (=?utf-8?q?F=C3=A9vry_Thibault?=) Date: Tue, 16 Jul 2013 02:44:23 +0000 Subject: [issue18448] Tools/demo/eiffel.py fails to run tests. In-Reply-To: <1373790396.51.0.890728705996.issue18448@psf.upfronthosting.co.za> Message-ID: <1373942663.08.0.0868659004738.issue18448@psf.upfronthosting.co.za> F?vry Thibault added the comment: Interessting update : The test does *not* fail all the time. It succeeds about 1/3 times on my computer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 05:47:54 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Jul 2013 03:47:54 +0000 Subject: [issue18470] tokenizer.c does not handle new_string() failure In-Reply-To: <1373938343.57.0.731932507548.issue18470@psf.upfronthosting.co.za> Message-ID: <3bvSHY43gSz7LjT@mail.python.org> Roundup Robot added the comment: New changeset 2650127ce034 by Benjamin Peterson in branch 'default': merge 3.3 (closes #18470) http://hg.python.org/cpython/rev/2650127ce034 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 07:40:45 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Jul 2013 05:40:45 +0000 Subject: [issue18425] IDLE Unit test for IdleHistory.py In-Reply-To: <1373493838.59.0.876568806243.issue18425@psf.upfronthosting.co.za> Message-ID: <1373953245.23.0.990794064621.issue18425@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As I said on one of the other issues, which I hope you read, we have the option of gui tests when mocking becomes too complicated. So at least for now, put the test that requires marks in a separate test case with requires('gui') in setUPClass. The problem with a full implementation of marks is that they change position when text is inserted or deleted before their position. Also, some mark functions are easier if they are stored in a dict, while one function and the movement operations are easier if they are stored in a sorted list. A partial implementation that allowed only 1 or 2 marks would be easier that a full implementation allowing any number. Mock marks that do not move (and don't need to because of no inserts or deletes between definition and use) would also be easy. So I want to see how marks need to be used for testing before doing anything. Even when a mock is used, we can temporarily use the tk version to verify that the mock is working right. I did that in the patch for #18279. See the commented out code in http://hg.python.org/cpython/rev/22ce68d98345. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 07:53:39 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Jul 2013 05:53:39 +0000 Subject: [issue18444] IDLE: Mac OS X pressing ctrl-A in Python shell moved cursor before the prompt, which then makes the keyboard unresponsive. In-Reply-To: <1373777050.16.0.963661085579.issue18444@psf.upfronthosting.co.za> Message-ID: <1373954019.62.0.720954520951.issue18444@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > BTW. I don't think it using function keys for key bindings is > necessarily a good idea on OSX. I'm pretty sure that the default > keyboard settings on OSX require two key presses to use a function > key on OSX laptops On Mac laptops, there is separate "fn" key that enables the function keys. Users press "fn" and "F5" to run a script from IDLE. I teach Python classes to Mac users and they are are no problems at all with the function keys. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 08:04:23 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 16 Jul 2013 06:04:23 +0000 Subject: [issue18444] IDLE: Mac OS X pressing ctrl-A in Python shell moved cursor before the prompt, which then makes the keyboard unresponsive. In-Reply-To: <1373777050.16.0.963661085579.issue18444@psf.upfronthosting.co.za> Message-ID: <1373954663.91.0.454138025556.issue18444@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Raymond: good to hear that using fn+F5 is not a problem for new users ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 08:32:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Jul 2013 06:32:31 +0000 Subject: [issue18393] Gestalt() is deprecated on OSX 10.8, remove support? In-Reply-To: <1373188277.85.0.140879649909.issue18393@psf.upfronthosting.co.za> Message-ID: <3bvWxW0CzMz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 7272ef213b7c by Ronald Oussoren in branch 'default': Also remove a (broken) leaker test for the code removed in issue #18393. http://hg.python.org/cpython/rev/7272ef213b7c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 09:46:00 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 16 Jul 2013 07:46:00 +0000 Subject: [issue9033] cmd module tab misbehavior In-Reply-To: <1276960216.2.0.17858038653.issue9033@psf.upfronthosting.co.za> Message-ID: <1373960760.88.0.675228670873.issue9033@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I no longer particularly like my patch, although something needs to be done. The easiest way forward is likely a (private) helper function in the readline module that can translate simple readline configuration strings to something that libedit understands and use that in the stdlib where readline bindings are replaced (but of course not for reading ~/.inputrc). Comparing the libedit and readline configuration languages makes is clear that it is not possible to fully translate a readline configuration in a libedit one, but basic conifguration like setting up key-bindings should be easy enough. ---------- versions: +Python 3.3, Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 12:04:57 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2013 10:04:57 +0000 Subject: [issue18211] -Werror=statement-after-declaration problem In-Reply-To: <1371210635.81.0.102822533543.issue18211@psf.upfronthosting.co.za> Message-ID: <1373969097.43.0.39023638506.issue18211@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 12:07:09 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2013 10:07:09 +0000 Subject: [issue18211] -Werror=statement-after-declaration problem In-Reply-To: <1371210635.81.0.102822533543.issue18211@psf.upfronthosting.co.za> Message-ID: <1373969229.95.0.678150885935.issue18211@psf.upfronthosting.co.za> STINNER Victor added the comment: By the way, I don't think that Python should pass the optimization level (-O0 or -O3) to extensions, except for builtin extensions (of the stdlib). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 13:18:48 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 16 Jul 2013 11:18:48 +0000 Subject: [issue18472] PEP 8 updates - internal interfaces and import * Message-ID: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> New submission from Nick Coghlan: A home for a couple of proposed PEP 8 updates (as per the thread starting at http://mail.python.org/pipermail/python-dev/2013-July/127284.html) ---------- messages: 193159 nosy: ncoghlan priority: normal severity: normal status: open title: PEP 8 updates - internal interfaces and import * type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 13:22:47 2013 From: report at bugs.python.org (Mikhail Korobov) Date: Tue, 16 Jul 2013 11:22:47 +0000 Subject: [issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING Message-ID: <1373973767.04.0.0542870445433.issue18473@psf.upfronthosting.co.za> New submission from Mikhail Korobov: I think REVERSE_IMPORT_MAPPING is wrong (see http://hg.python.org/cpython/file/7272ef213b7c/Lib/_compat_pickle.py#l80 ). It relies on dictionary items order and maps 'collections' module to either UserString or UserList. This makes it impossible to unpickle collections module classes pickled by Python 3.x when using Python 2.x. >>> import collections >>> dct = collections.defaultdict() >>> pickle.dumps(dct, protocol=1) b'cUserString\ndefaultdict\nq\x00)Rq\x01.' >>> pickle.dumps(dct, protocol=2, fix_imports=False) b'ccollections\ndefaultdict\nq\x00)Rq\x01.' I think pickling of instances of classes from other modules could also suffer. I don't think it is a good idea to map io to cStringIO or StringIO, or to map http.server to either BaseHTTPServer, SimpleHTTPServer or CGIHTTPServer. Originally found this issue here: https://github.com/nltk/nltk/pull/441/files#L2R67 ---------- components: Library (Lib) messages: 193160 nosy: kmike priority: normal severity: normal status: open title: some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 13:24:42 2013 From: report at bugs.python.org (Mikhail Korobov) Date: Tue, 16 Jul 2013 11:24:42 +0000 Subject: [issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING In-Reply-To: <1373973767.04.0.0542870445433.issue18473@psf.upfronthosting.co.za> Message-ID: <1373973882.27.0.235245811673.issue18473@psf.upfronthosting.co.za> Mikhail Korobov added the comment: my copy-paste went wrong, last statement in the example should be >>> pickle.dumps(dct, protocol=1, fix_imports=False) b'ccollections\ndefaultdict\nq\x00)Rq\x01.' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 13:53:01 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Jul 2013 11:53:01 +0000 Subject: [issue18448] Tools/demo/eiffel.py fails to run tests. In-Reply-To: <1373790396.51.0.890728705996.issue18448@psf.upfronthosting.co.za> Message-ID: <1373975581.38.0.0306582954248.issue18448@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- type: -> behavior versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 14:14:30 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 16 Jul 2013 12:14:30 +0000 Subject: [issue18472] PEP 8 updates - internal interfaces and import * In-Reply-To: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> Message-ID: <1373976870.86.0.835797297745.issue18472@psf.upfronthosting.co.za> Nick Coghlan added the comment: Attached diff has 5 changes: * Explicit note that this is a living document that evolves over time * Adds another explicit reason for not complying with the style guide (i.e. the code is old but still works and there's no other reason to change it) * Fixed outdated info in the Tabs & Spaces section (Python 3 doesn't allow mixing them at all) * Added an admonishment to avoid import * * Added a new "Public and internal interfaces" section, that leans more heavily on documentation and __all__ than any of the proposals posted to python-dev Some other oddities I noticed: - given PEP 352, the admonishment to avoid string exceptions seems old and outdated. Can we just drop that? - given PEP 3151, the suggestion to create a "domain specific base class" for the module also seems ill-advised. Perhaps we should remove that too? - I've never understood the rationale for favouring absolute imports over explicit relative ones, so I had forgotten that suggestion was even in here. I've raised that one on python-dev, since I recall it being controversial, although I've never been able to fathom why. Explicit relative imports are just *better* in every way whenever they're applicable. ---------- keywords: +patch Added file: http://bugs.python.org/file30936/issue18472_pep_8_update.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 14:33:27 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 16 Jul 2013 12:33:27 +0000 Subject: [issue18472] PEP 8 updates - internal interfaces and import * In-Reply-To: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> Message-ID: <1373978007.31.0.118302668627.issue18472@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thomas Wouters made a couple of good points regarding absolute vs explicit relative imports, so I've improved the rationale in the PEP accordingly. ---------- Added file: http://bugs.python.org/file30937/issue18472_pep_8_update2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 14:43:05 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 16 Jul 2013 12:43:05 +0000 Subject: [issue18472] PEP 8 updates - internal interfaces and import * In-Reply-To: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> Message-ID: <1373978585.3.0.449378430029.issue18472@psf.upfronthosting.co.za> Nick Coghlan added the comment: Tweaked the wording in the introduction to cover removal of obsolete conventions along with adding new ones. ---------- Added file: http://bugs.python.org/file30938/issue18472_pep_8_update3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 14:49:25 2013 From: report at bugs.python.org (Aaron Iles) Date: Tue, 16 Jul 2013 12:49:25 +0000 Subject: [issue13266] Add inspect.unwrap(f) to easily unravel "__wrapped__" chains In-Reply-To: <1319611391.89.0.610441716125.issue13266@psf.upfronthosting.co.za> Message-ID: <1373978965.24.0.313195413339.issue13266@psf.upfronthosting.co.za> Aaron Iles added the comment: My +1 is for the callback based approach. The brevity of the search loop for finding the innermost function is (in my opinion at least) non-obvious, relying on for loops not having their own scope as it does. If a generator based API was adopted instead, I propose a convenience function (unwrap_all?) to help developers avoid writing code like: inner = None for inner in functools.unwrap(outer): pass if inner is None: inner = outer Which combines a misunderstanding of the API with for loop scope shortcut. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 16:13:43 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 16 Jul 2013 14:13:43 +0000 Subject: [issue18472] PEP 8 updates - internal interfaces and import * In-Reply-To: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> Message-ID: <1373984023.95.0.768586705836.issue18472@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 16:20:54 2013 From: report at bugs.python.org (James Lu) Date: Tue, 16 Jul 2013 14:20:54 +0000 Subject: [issue18474] Lambda assigned to object does not automatically get self Message-ID: <1373984454.04.0.881865417632.issue18474@psf.upfronthosting.co.za> New submission from James Lu: if you assign a lambda to a object and call it,you get this: Traceback (most recent call last): File "", line 1, in n.__div__(3) TypeError: () takes exactly 2 arguments (1 given) The full test is here: >>> n = num() >>> n.__div__ at 0x040B2DF0> >>> n/3 Traceback (most recent call last): File "", line 1, in n/3 TypeError: unsupported operand type(s) for /: 'num' and 'int' >>> n.__div__(3) Traceback (most recent call last): File "", line 1, in n.__div__(3) TypeError: () takes exactly 2 arguments (1 given) ---------- messages: 193166 nosy: James.Lu priority: normal severity: normal status: open title: Lambda assigned to object does not automatically get self _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 16:21:18 2013 From: report at bugs.python.org (James Lu) Date: Tue, 16 Jul 2013 14:21:18 +0000 Subject: [issue18474] Lambda assigned to object does not automatically get self In-Reply-To: <1373984454.04.0.881865417632.issue18474@psf.upfronthosting.co.za> Message-ID: <1373984478.37.0.001160301628.issue18474@psf.upfronthosting.co.za> Changes by James Lu : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 16:23:24 2013 From: report at bugs.python.org (Brett Cannon) Date: Tue, 16 Jul 2013 14:23:24 +0000 Subject: [issue18474] Lambda assigned to object does not automatically get self In-Reply-To: <1373984454.04.0.881865417632.issue18474@psf.upfronthosting.co.za> Message-ID: <1373984604.88.0.399946427555.issue18474@psf.upfronthosting.co.za> Brett Cannon added the comment: What version of Python is this and did you assign the lambda to an instance or class (and if this is Python 2, new-style or classic class)? ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 16:23:30 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Tue, 16 Jul 2013 14:23:30 +0000 Subject: [issue18475] No unittest.main in Lib/test/test_email/test_inversion.py Message-ID: <1373984610.72.0.308801369568.issue18475@psf.upfronthosting.co.za> New submission from Vajrasky Kok: There is no unittest.main in Lib/test/test_email/test_inversion.py. In other word, you can not execute the test by doing something like this: [abcdef at localhost cpython]$ ./python Lib/test/test_email/test_inversion.py Attached the menial fix. ---------- components: Tests files: add_unittest_main_to_test_inversion.txt messages: 193168 nosy: r.david.murray, vajrasky priority: normal severity: normal status: open title: No unittest.main in Lib/test/test_email/test_inversion.py versions: Python 3.4 Added file: http://bugs.python.org/file30939/add_unittest_main_to_test_inversion.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 16:24:45 2013 From: report at bugs.python.org (James Lu) Date: Tue, 16 Jul 2013 14:24:45 +0000 Subject: [issue18474] Lambda assigned to object does not automatically get self In-Reply-To: <1373984454.04.0.881865417632.issue18474@psf.upfronthosting.co.za> Message-ID: <1373984685.35.0.40292745021.issue18474@psf.upfronthosting.co.za> James Lu added the comment: 2.5,new-style ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 16:25:41 2013 From: report at bugs.python.org (James Lu) Date: Tue, 16 Jul 2013 14:25:41 +0000 Subject: [issue18474] Lambda assigned to object does not automatically get self In-Reply-To: <1373984454.04.0.881865417632.issue18474@psf.upfronthosting.co.za> Message-ID: <1373984741.5.0.540626152555.issue18474@psf.upfronthosting.co.za> James Lu added the comment: instance,assinged during __init__ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 16:36:17 2013 From: report at bugs.python.org (James Lu) Date: Tue, 16 Jul 2013 14:36:17 +0000 Subject: [issue18474] Lambda assigned to object does not automatically get self In-Reply-To: <1373984454.04.0.881865417632.issue18474@psf.upfronthosting.co.za> Message-ID: <1373985377.18.0.690111350349.issue18474@psf.upfronthosting.co.za> James Lu added the comment: Also,there were some bugs, but after I fixed them, it would only work if I did this: n.__div__(n,3) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 16:46:16 2013 From: report at bugs.python.org (Piotr Dobrogost) Date: Tue, 16 Jul 2013 14:46:16 +0000 Subject: [issue18476] No way to pass custom arguments for loggers and formatters. Message-ID: <1373985976.45.0.145483904171.issue18476@psf.upfronthosting.co.za> New submission from Piotr Dobrogost: It seems there's no way to pass custom arguments for loggers (http://hg.python.org/cpython/file/d9893d13c628/Lib/logging/__init__.py#l1111) and formatters (http://hg.python.org/cpython/file/d9893d13c628/Lib/logging/config.py#l117) the same way they are being passed to handlers (http://hg.python.org/cpython/file/d9893d13c628/Lib/logging/config.py#l139). The problem came out when we tried to create base formatter which would read prefix from configuration of formatter to be prepended to all subsequent lines of every multi line message. ---------- components: Library (Lib) messages: 193172 nosy: piotr.dobrogost, vinay.sajip priority: normal severity: normal status: open title: No way to pass custom arguments for loggers and formatters. type: enhancement versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 16:48:20 2013 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 16 Jul 2013 14:48:20 +0000 Subject: [issue18474] Lambda assigned to object does not automatically get self In-Reply-To: <1373984454.04.0.881865417632.issue18474@psf.upfronthosting.co.za> Message-ID: <1373986100.01.0.318571472632.issue18474@psf.upfronthosting.co.za> Eric V. Smith added the comment: Could you provide an entire example, showing the class num and how you assign __div__? ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 16:58:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Jul 2013 14:58:43 +0000 Subject: [issue17778] Fix test discovery for test_multiprocessing.py In-Reply-To: <1366218082.59.0.595129290582.issue17778@psf.upfronthosting.co.za> Message-ID: <3bvl9b0FV1z7Ljy@mail.python.org> Roundup Robot added the comment: New changeset 8a922b28b97d by Richard Oudkerk in branch '3.3': Issue #17778: Fix test discovery for test_multiprocessing. (Patch by http://hg.python.org/cpython/rev/8a922b28b97d New changeset c704735487ae by Richard Oudkerk in branch 'default': Issue #17778: Fix test discovery for test_multiprocessing. (Patch by http://hg.python.org/cpython/rev/c704735487ae ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 17:00:17 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 16 Jul 2013 15:00:17 +0000 Subject: [issue18474] Lambda assigned to object does not automatically get self In-Reply-To: <1373984454.04.0.881865417632.issue18474@psf.upfronthosting.co.za> Message-ID: <1373986817.09.0.207274727443.issue18474@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This is expected. When you assign to "n.__div__" a function which takes two parameters, you have to call it with two parameters: aFunction = lambda x, y: (x, y) n.__div__ = aFunction aFunction(1, 2) n.__div__(1, 2) After all, aFunction and n.__div__ are the same object. Now, it would be different if you had attached the function to the *class* instead: n.__class__.__div__ = aFunction n.__div__(2) # returns (n, 2) In this second example, n.__div__ is a bound method; the first parameter (usually named "self") is already filled, and only the second one is required. ---------- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 17:05:39 2013 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 16 Jul 2013 15:05:39 +0000 Subject: [issue18476] No way to pass custom arguments for loggers and formatters. In-Reply-To: <1373985976.45.0.145483904171.issue18476@psf.upfronthosting.co.za> Message-ID: <1373987139.26.0.830973608904.issue18476@psf.upfronthosting.co.za> Vinay Sajip added the comment: I would prefer not to extend the functionality of fileConfig(), as dictConfig() is the preferred configuration approach. It's much more general than fileConfig() can be (without doing significant work on fileConfig(), which I'd like to not develop any further). ---------- resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 17:35:41 2013 From: report at bugs.python.org (Brett Cannon) Date: Tue, 16 Jul 2013 15:35:41 +0000 Subject: [issue18475] No unittest.main in Lib/test/test_email/test_inversion.py In-Reply-To: <1373984610.72.0.308801369568.issue18475@psf.upfronthosting.co.za> Message-ID: <1373988941.73.0.846996530831.issue18475@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 17:45:08 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 16 Jul 2013 15:45:08 +0000 Subject: [issue17778] Fix test discovery for test_multiprocessing.py In-Reply-To: <1366218082.59.0.595129290582.issue17778@psf.upfronthosting.co.za> Message-ID: <1373989508.73.0.757550481665.issue17778@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Thanks for the patches! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 17:46:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Jul 2013 15:46:25 +0000 Subject: [issue18475] No unittest.main in Lib/test/test_email/test_inversion.py In-Reply-To: <1373984610.72.0.308801369568.issue18475@psf.upfronthosting.co.za> Message-ID: <3bvmDc1VCjz7Lkp@mail.python.org> Roundup Robot added the comment: New changeset b92db0aebc42 by R David Murray in branch '3.3': Closes #18475: add unittest.main() to test_email/test_inversions. http://hg.python.org/cpython/rev/b92db0aebc42 New changeset 48f27b745519 by R David Murray in branch 'default': Merge: Closes #18475: add unittest.main() to test_email/test_inversions. http://hg.python.org/cpython/rev/48f27b745519 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 18:05:27 2013 From: report at bugs.python.org (=?utf-8?q?F=C3=A9vry_Thibault?=) Date: Tue, 16 Jul 2013 16:05:27 +0000 Subject: [issue18448] Tools/demo/eiffel.py fails to run tests. In-Reply-To: <1373790396.51.0.890728705996.issue18448@psf.upfronthosting.co.za> Message-ID: <1373990727.92.0.506505198849.issue18448@psf.upfronthosting.co.za> F?vry Thibault added the comment: One more update. When it fails, it sometimes fails with : ====================================================================== ERROR: testEiffelMetaClass1 (__main__.Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "./Tools/demo/eiffel.py", line 102, in testEiffelMetaClass1 self._test(EiffelMetaClass1) File "./Tools/demo/eiffel.py", line 112, in _test class Test(Eiffel): File "./Tools/demo/eiffel.py", line 17, in __new__ meta, name, bases, dict) TypeError: type __qualname__ must be a str, not function ====================================================================== ERROR: testEiffelMetaClass2 (__main__.Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "./Tools/demo/eiffel.py", line 105, in testEiffelMetaClass2 self._test(EiffelMetaClass2) File "./Tools/demo/eiffel.py", line 112, in _test class Test(Eiffel): File "./Tools/demo/eiffel.py", line 17, in __new__ meta, name, bases, dict) TypeError: type __qualname__ must be a str, not EiffelDescriptor ---------------------------------------------------------------------- Ran 2 tests in 0.004s As I have no experience with metaclasses and all that stuff, I won't be able to fix it/find what's wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 18:06:20 2013 From: report at bugs.python.org (Yury V. Zaytsev) Date: Tue, 16 Jul 2013 16:06:20 +0000 Subject: [issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input In-Reply-To: <1236786647.39.0.745171492116.issue5476@psf.upfronthosting.co.za> Message-ID: <1373990780.69.0.438940674316.issue5476@psf.upfronthosting.co.za> Yury V. Zaytsev added the comment: NumPy no longer uses the Trac for issues, the tracking has been moved to GitHub. I hope that the problem will be finally solved in NumPy by https://github.com/numpy/numpy/pull/3526 . ---------- nosy: +zaytsev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 18:10:10 2013 From: report at bugs.python.org (Yury V. Zaytsev) Date: Tue, 16 Jul 2013 16:10:10 +0000 Subject: [issue2263] struct.pack() + numpy int raises SystemError In-Reply-To: <1205134764.8.0.415620235375.issue2263@psf.upfronthosting.co.za> Message-ID: <1373991010.47.0.519517836727.issue2263@psf.upfronthosting.co.za> Yury V. Zaytsev added the comment: As noted in issue5476, I've submitted a pull request for NumPy: ttps://github.com/numpy/numpy/pull/3526 . I hope that this fixes this problem too: on Py2, I've added Py_TPFLAGS_INT_SUBCLASS, on Py3, NumPy doesn't inherit from int anymore, because it's not a fixed-width integer type. I guess it makes sense to close this bug now. ---------- nosy: +zaytsev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 18:14:40 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 16 Jul 2013 16:14:40 +0000 Subject: [issue18211] -Werror=statement-after-declaration problem In-Reply-To: <1371210635.81.0.102822533543.issue18211@psf.upfronthosting.co.za> Message-ID: <1373991280.41.0.525833226345.issue18211@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Why not? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 18:43:30 2013 From: report at bugs.python.org (LDTech) Date: Tue, 16 Jul 2013 16:43:30 +0000 Subject: [issue17214] http.client.HTTPConnection.putrequest encode error In-Reply-To: <1361011959.8.0.221376430084.issue17214@psf.upfronthosting.co.za> Message-ID: <1373993010.77.0.411579321359.issue17214@psf.upfronthosting.co.za> LDTech added the comment: This problem still exist in Python 3.3.2. The following code gives you an example: import urllib.request url = "http://www.libon.it/libon/search/isbn/3499155443" req = urllib.request.Request(url) response = urllib.request.urlopen(req, timeout=30) the_page = response.read().decode('utf-8') print(the_page) Traceback (most recent call last): File "C:\X\webpy.py", line 4, in response = urllib.request.urlopen(req, timeout=30) File "C:\Python33\lib\urllib\request.py", line 156, in urlopen return opener.open(url, data, timeout) File "C:\Python33\lib\urllib\request.py", line 475, in open response = meth(req, response) File "C:\Python33\lib\urllib\request.py", line 587, in http_response 'http', request, response, code, msg, hdrs) File "C:\Python33\lib\urllib\request.py", line 507, in error result = self._call_chain(*args) File "C:\Python33\lib\urllib\request.py", line 447, in _call_chain result = func(*args) File "C:\Python33\lib\urllib\request.py", line 692, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "C:\Python33\lib\urllib\request.py", line 469, in open response = self._open(req, data) File "C:\Python33\lib\urllib\request.py", line 487, in _open '_open', req) File "C:\Python33\lib\urllib\request.py", line 447, in _call_chain result = func(*args) File "C:\Python33\lib\urllib\request.py", line 1268, in http_open return self.do_open(http.client.HTTPConnection, req) File "C:\Python33\lib\urllib\request.py", line 1248, in do_open h.request(req.get_method(), req.selector, req.data, headers) File "C:\Python33\lib\http\client.py", line 1061, in request self._send_request(method, url, body, headers) File "C:\Python33\lib\http\client.py", line 1089, in _send_request self.putrequest(method, url, **skips) File "C:\Python33\lib\http\client.py", line 953, in putrequest self._output(request.encode('ascii')) UnicodeEncodeError: 'ascii' codec can't encode characters in position 78-79: ordinal not in range(128) ---------- nosy: +LDTech _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 20:02:03 2013 From: report at bugs.python.org (paul j3) Date: Tue, 16 Jul 2013 18:02:03 +0000 Subject: [issue10984] argparse add_mutually_exclusive_group should accept existing arguments to register conflicts In-Reply-To: <1295737320.83.0.942830837874.issue10984@psf.upfronthosting.co.za> Message-ID: <1373997723.14.0.188716195569.issue10984@psf.upfronthosting.co.za> paul j3 added the comment: This patch produces the same usage as before, but I have rewritten _format_actions_usage() for both HelpFormatter and MultiGroupFormater. The original HelpFormatter._format_actions_usage() formats the actions, splices in group markings, cleans up the text, if needed, tries to break it down into parts. But this is fragile, as shown here and in issues 11874, 18349). Now _format_group_usage() and _format_just_actions_usage() format groups and actions directly, without the splice and divide steps. _format_actions_usage() for both classes call these to build a list of usage parts. This change also solves http://bugs.python.org/issue11874 and http://bugs.python.org/issue18349, since it does not have to break up a formatted text line (and in the process get confused by [] and ()). ---------- Added file: http://bugs.python.org/file30940/multigroup_4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 20:59:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Jul 2013 18:59:43 +0000 Subject: [issue18457] Fix and cleanup the ss1.py demo In-Reply-To: <1373890041.01.0.998276597574.issue18457@psf.upfronthosting.co.za> Message-ID: <3bvrWf3tjBz7Lkq@mail.python.org> Roundup Robot added the comment: New changeset 9098a4ad4d3e by Serhiy Storchaka in branch '3.3': Issue #18457: Fixed saving of formulas and complex numbers in Tools/demo/ss1.py. http://hg.python.org/cpython/rev/9098a4ad4d3e New changeset c6b91d894577 by Serhiy Storchaka in branch 'default': Issue #18457: Fixed saving of formulas and complex numbers in Tools/demo/ss1.py. http://hg.python.org/cpython/rev/c6b91d894577 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 21:16:35 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Jul 2013 19:16:35 +0000 Subject: [issue18448] Tools/demo/eiffel.py fails to run tests. In-Reply-To: <1373790396.51.0.890728705996.issue18448@psf.upfronthosting.co.za> Message-ID: <3bvrv63B25zSg0@mail.python.org> Roundup Robot added the comment: New changeset a9f7c2d49149 by Serhiy Storchaka in branch '2.7': Issue #18448: Fix a typo in Demo/newmetaclasses/Eiffel.py. http://hg.python.org/cpython/rev/a9f7c2d49149 New changeset 6e8ad6071100 by Serhiy Storchaka in branch '3.3': Issue #18448: Fix a typo in Tools/demo/eiffel.py. http://hg.python.org/cpython/rev/6e8ad6071100 New changeset 128618d2589c by Serhiy Storchaka in branch 'default': Issue #18448: Fix a typo in Tools/demo/eiffel.py. http://hg.python.org/cpython/rev/128618d2589c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 21:39:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Jul 2013 19:39:58 +0000 Subject: [issue18448] Tools/demo/eiffel.py fails to run tests. In-Reply-To: <1373790396.51.0.890728705996.issue18448@psf.upfronthosting.co.za> Message-ID: <1374003598.19.0.513569463361.issue18448@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 21:40:35 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Jul 2013 19:40:35 +0000 Subject: [issue18448] Tools/demo/eiffel.py fails to run tests. In-Reply-To: <1373790396.51.0.890728705996.issue18448@psf.upfronthosting.co.za> Message-ID: <1374003635.3.0.680096378179.issue18448@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 21:40:43 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Jul 2013 19:40:43 +0000 Subject: [issue18457] Fix and cleanup the ss1.py demo In-Reply-To: <1373890041.01.0.998276597574.issue18457@psf.upfronthosting.co.za> Message-ID: <1374003643.52.0.675505602574.issue18457@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 Tue Jul 16 22:26:25 2013 From: report at bugs.python.org (paul j3) Date: Tue, 16 Jul 2013 20:26:25 +0000 Subject: [issue11874] argparse assertion failure with brackets in metavars In-Reply-To: <1303201252.58.0.236363581255.issue11874@psf.upfronthosting.co.za> Message-ID: <1374006385.31.0.855150013096.issue11874@psf.upfronthosting.co.za> paul j3 added the comment: Here's a patch that takes a different approach - rewrite _format_actions_usage() so it formats groups (and unattached actions) directly. It uses the same logic to determine when to format a group, but then it calls _format_group_usage() to format the group, without the error prone insert and cleanup business. And by keeping a list of the parts, it avoids the complications of parsing the text. The only cleanup regex removes () from single element groups. In the nested get_lines function, I added 'line and' to if line and line_len + 1 + len(part) > text_width: so it does not create a blank line before an extra long entry (e.g. 'c'*76). I'm using the _format_group_usage() and _format_just_actions_usage() in the Issue 10984 MultiGroupFormatter, just rearranging the logic in its _format_actions_usage() method. That patch could be rewritten to depend on this one. This patch also fixes http://bugs.python.org/issue18349, since the metavar is never parsed. ---------- Added file: http://bugs.python.org/file30941/format_usage.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 22:34:49 2013 From: report at bugs.python.org (paul j3) Date: Tue, 16 Jul 2013 20:34:49 +0000 Subject: [issue18349] argparse usage should preserve () in metavars such as range(20) In-Reply-To: <1372832211.16.0.544648995095.issue18349@psf.upfronthosting.co.za> Message-ID: <1374006889.49.0.536724344366.issue18349@psf.upfronthosting.co.za> paul j3 added the comment: I just submitted at patch to http://bugs.python.org/issue11874 that takes care of this issue as well. I rewrote _format_actions_usage() so it formats the parts directly, so there is no need cleanup or parse the full text string. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 22:44:40 2013 From: report at bugs.python.org (p0lar_bear) Date: Tue, 16 Jul 2013 20:44:40 +0000 Subject: [issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers In-Reply-To: <1273759972.28.0.178671810955.issue8704@psf.upfronthosting.co.za> Message-ID: <1374007480.76.0.689437559987.issue8704@psf.upfronthosting.co.za> p0lar_bear added the comment: I get similar results if my CGI script sends a Content-Type header of anything besides "text/html", e.g. print('Content-Type: text/json'). ---------- nosy: +p0lar_bear _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 22:45:31 2013 From: report at bugs.python.org (paul j3) Date: Tue, 16 Jul 2013 20:45:31 +0000 Subject: [issue16468] argparse only supports iterable choices In-Reply-To: <1352867539.71.0.970228461518.issue16468@psf.upfronthosting.co.za> Message-ID: <1374007531.9.0.518381736787.issue16468@psf.upfronthosting.co.za> paul j3 added the comment: I just submitted a patch to http://bugs.python.org/issue11874 which rewrites _format_actions_usage(). It now formats the groups and actions directly, keeping a list of these parts. It no longer has to cleanup or split a usage line into parts. So it is not sensitive to special characters (space, [] or () ) in the choices metavar. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 22:51:52 2013 From: report at bugs.python.org (p0lar_bear) Date: Tue, 16 Jul 2013 20:51:52 +0000 Subject: [issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers In-Reply-To: <1273759972.28.0.178671810955.issue8704@psf.upfronthosting.co.za> Message-ID: <1374007912.88.0.370803051496.issue8704@psf.upfronthosting.co.za> Changes by p0lar_bear : ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 22:53:23 2013 From: report at bugs.python.org (paul j3) Date: Tue, 16 Jul 2013 20:53:23 +0000 Subject: [issue17890] argparse: mutually exclusive groups full of suppressed args can cause AssertionErrors In-Reply-To: <1367455382.45.0.0611766927148.issue17890@psf.upfronthosting.co.za> Message-ID: <1374008003.69.0.97297065702.issue17890@psf.upfronthosting.co.za> paul j3 added the comment: I just submitted a patch to http://bugs.python.org/issue11874 that substantially rewrites _format_actions_usage(). It generates the group and action parts separately, and does not do the kind of cleanup that produces this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 23:09:14 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Jul 2013 21:09:14 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3bvvP54p8yz7LkZ@mail.python.org> Roundup Robot added the comment: New changeset 533eb9ab895a by Victor Stinner in branch 'default': Issue #18408: Fix fileio_read() on _PyBytes_Resize() failure http://hg.python.org/cpython/rev/533eb9ab895a New changeset f0efd7ea1627 by Victor Stinner in branch 'default': Issue #18408: Fix cjkcodecs decoders, add a new MBERR_EXCEPTION constant to http://hg.python.org/cpython/rev/f0efd7ea1627 New changeset 395e67f348e7 by Victor Stinner in branch 'default': Issue #18408: Fix list.extend(), handle list_resize() failure http://hg.python.org/cpython/rev/395e67f348e7 New changeset ac4e8e6a7436 by Victor Stinner in branch 'default': Issue #18408: Fix PyDict_GetItemString(), suppress PyUnicode_FromString() error http://hg.python.org/cpython/rev/ac4e8e6a7436 New changeset b7c6d203c9fb by Victor Stinner in branch 'default': Issue #18408: dict_new() now fails on new_keys_object() error http://hg.python.org/cpython/rev/b7c6d203c9fb New changeset 28ff7ac91477 by Victor Stinner in branch 'default': Issue #18408: Py_ReprLeave() now saves/restores the current exception, http://hg.python.org/cpython/rev/28ff7ac91477 New changeset 6bd01a59762a by Victor Stinner in branch 'default': Issue #18408: handle PySys_GetObject() failure, raise a RuntimeError http://hg.python.org/cpython/rev/6bd01a59762a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 23:10:50 2013 From: report at bugs.python.org (ProgVal) Date: Tue, 16 Jul 2013 21:10:50 +0000 Subject: [issue18477] fix_import (2to3 fixer) is not case-sensitive Message-ID: <1374009050.19.0.500947498255.issue18477@psf.upfronthosting.co.za> New submission from ProgVal: In a project, I have a package with a module named Socket.py, and the __init__.py imports the "socket" module (from the standard Python lib). However, when fix_import went over it _on Windows_, it converted "import socket" to "from . import Socket". I also had this issue from a package containing a subpackage named "Math", and a __init__.py importing "math" (from the standard Python lib). This issue is caused by using os.path.exists(), which is case-insensitive on Windows. However, PEP 235 says imports are case-sensitive. I'm including a patch I have wrote for this. ---------- components: 2to3 (2.x to 3.x conversion tool), Windows files: fix_case-sensitivity_of_fix-import.patch keywords: patch messages: 193193 nosy: Valentin.Lorentz priority: normal severity: normal status: open title: fix_import (2to3 fixer) is not case-sensitive type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file30942/fix_case-sensitivity_of_fix-import.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 23:12:09 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2013 21:12:09 +0000 Subject: [issue18477] fix_import (2to3 fixer) is not case-sensitive In-Reply-To: <1374009050.19.0.500947498255.issue18477@psf.upfronthosting.co.za> Message-ID: <1374009129.4.0.876818358384.issue18477@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 23:17:52 2013 From: report at bugs.python.org (paul j3) Date: Tue, 16 Jul 2013 21:17:52 +0000 Subject: [issue18467] argparse - problematic 'default' behavior In-Reply-To: <1373927590.26.0.302211166373.issue18467@psf.upfronthosting.co.za> Message-ID: <1374009472.13.0.577764911842.issue18467@psf.upfronthosting.co.za> Changes by paul j3 : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 23:47:34 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Jul 2013 21:47:34 +0000 Subject: [issue18472] PEP 8 updates - internal interfaces and import * In-Reply-To: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> Message-ID: <1374011254.8.0.554507272546.issue18472@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 23:57:31 2013 From: report at bugs.python.org (A Kaptur) Date: Tue, 16 Jul 2013 21:57:31 +0000 Subject: [issue18036] "How do I create a .pyc file?" FAQ entry is out of date In-Reply-To: <1369244271.04.0.495588356743.issue18036@psf.upfronthosting.co.za> Message-ID: <1374011851.86.0.871339341575.issue18036@psf.upfronthosting.co.za> A Kaptur added the comment: Here is a suggestion for updated documentation in this section. I've added the description of __pycache__, included a very short description of what a .pyc file is, and moved the troubleshooting to the end of the section. I'm not sure whether the description ("a byte code cache file") is desirable here, but my sense is that people asking how to generate .pyc files are generally confused beginners. ---------- keywords: +patch nosy: +akaptur Added file: http://bugs.python.org/file30943/better_pyc_doc_akaptur.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 00:23:47 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Jul 2013 22:23:47 +0000 Subject: [issue18472] PEP 8 updates - internal interfaces and import * In-Reply-To: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> Message-ID: <1374013427.5.0.0507027276305.issue18472@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Is the scope of this issue just what is in the title, the whole PEP, or something in between;-? For instance, Guido once approved (on pydev) adding an admonition to Programming Recommendations something like the following. * Use a def statement instead of an assignment with a lambda expression. Yes: def f(x): return 2*x No: f = lambda s: 2*x The (only) difference between these is that the name attribute of the resulting function object is specifically 'f' instead of the generic ''. This is more useful for tracebacks and string representations in general. The entry could point out that a separate statement that binds the function to a name negates the two reasons that justify using lambda, but that is probably unnecessary. This is from a discussion at least 2 years ago, perhaps 3 or more, before I would have been comfortable or perhaps even eligible to push a patch, and no one else picked up on it either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 00:28:48 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Jul 2013 22:28:48 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1374013728.7.0.486323270667.issue18408@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You are great! ---------- assignee: -> haypo nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 00:55:29 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 16 Jul 2013 22:55:29 +0000 Subject: [issue18289] python.org Interactive interpreter linked with libedit can segfault on future OS X In-Reply-To: <1372046917.43.0.988841016926.issue18289@psf.upfronthosting.co.za> Message-ID: <1374015329.88.0.0886532124708.issue18289@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- resolution: wont fix -> duplicate stage: -> committed/rejected superseder: -> libedit history offset workaround _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 00:56:46 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 16 Jul 2013 22:56:46 +0000 Subject: [issue18289] python.org Interactive interpreter linked with libedit can segfault on future OS X In-Reply-To: <1372046917.43.0.988841016926.issue18289@psf.upfronthosting.co.za> Message-ID: <1374015406.31.0.774264896056.issue18289@psf.upfronthosting.co.za> Ned Deily added the comment: Issue18458 has been opened to track this problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 01:01:22 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Jul 2013 23:01:22 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3bvxtV0Xh7z7Ljb@mail.python.org> Roundup Robot added the comment: New changeset c8696ee49291 by Victor Stinner in branch 'default': Issue #18408: Fix typo in build_node_tree() of the parser module http://hg.python.org/cpython/rev/c8696ee49291 New changeset cf8f42eadbd0 by Victor Stinner in branch 'default': Issue #18408: Fix Python-ast.c: handle init_types() failure (ex: MemoryError) http://hg.python.org/cpython/rev/cf8f42eadbd0 New changeset a685f4c6e0b6 by Victor Stinner in branch 'default': Issue #18408: Fix PyErr_NormalizeException(), handle PyObject_IsSubclass() failure http://hg.python.org/cpython/rev/a685f4c6e0b6 New changeset 7fe4a0c0e905 by Victor Stinner in branch 'default': Issue #18408: Fix locale.localeconv(), handle PyDict_SetItemString() failure http://hg.python.org/cpython/rev/7fe4a0c0e905 New changeset 8c1ca6720246 by Victor Stinner in branch 'default': Issue #18408: Handle PyArena_AddPyObject() failure in ast.c http://hg.python.org/cpython/rev/8c1ca6720246 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 01:10:20 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Jul 2013 23:10:20 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3bvy4q6hyJz7LlL@mail.python.org> Roundup Robot added the comment: New changeset 1872555a2f4e by Victor Stinner in branch 'default': Issue #18408: Mention changes in Misc/NEWS http://hg.python.org/cpython/rev/1872555a2f4e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 01:12:10 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2013 23:12:10 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1374016330.6.0.934327729278.issue18408@psf.upfronthosting.co.za> STINNER Victor added the comment: @Serhiy: Would like to review attached patches listpop.patch (msg193130) and frame_fasttolocals.patch (msg193131)? (Other are already commited) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 01:19:49 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 16 Jul 2013 23:19:49 +0000 Subject: [issue18472] PEP 8 updates - internal interfaces and import * In-Reply-To: <1374013427.5.0.0507027276305.issue18472@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Sure, I think it makes sense to put that in. I'll be running the whole patch by python-dev, enumerating the reasons for each change before I commit anything. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 01:24:05 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2013 23:24:05 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1374016330.6.0.934327729278.issue18408@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Oops. @Serhiy: Would *you* like to review attached patches ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 01:24:36 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Jul 2013 23:24:36 +0000 Subject: [issue18469] PyStructSequence does not handle exceptions correctly In-Reply-To: <1373934750.38.0.634861561736.issue18469@psf.upfronthosting.co.za> Message-ID: <3bvyPJ01p6z7Ljg@mail.python.org> Roundup Robot added the comment: New changeset af18829a7754 by Victor Stinner in branch 'default': Close #18469: Replace PyDict_GetItemString() with _PyDict_GetItemId() in structseq.c http://hg.python.org/cpython/rev/af18829a7754 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 01:24:43 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Jul 2013 23:24:43 +0000 Subject: [issue18472] PEP 8 updates - internal interfaces and import * In-Reply-To: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> Message-ID: <1374017083.76.0.490354585543.issue18472@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The public versus internal part of this issue is related to #10434 Document the rules for "public names", which contains among other things a suggested rewrite for PEP 8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 01:39:14 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Jul 2013 23:39:14 +0000 Subject: [issue18478] Class bodies: when does a name become local? Message-ID: <1374017954.45.0.193690883208.issue18478@psf.upfronthosting.co.za> New submission from Terry J. Reedy: http://docs.python.org/3/reference/executionmodel.html#naming-and-binding says "The following are blocks: ... a class definition." and "If a name binding operation occurs anywhere within a code block, all uses of the name within the block are treated as references to the current block. This can lead to errors when a name is used within a block before it is bound. ..." This is definitely true for functions, but not for classes: foo = 'bar' class C: foo = foo print(C().foo) # bar This is the same for 3.3 and 2.7 with and without '(object)' added. Unless the code is considered to be buggy (probably since forever), the doc should be modified to change 'code block' to 'function code block' or maybe 'module or function code block'. (At near as I can think, the statement is true for modules, but only because globals() == locals(), so that part of the issue does not arise.) ---------- assignee: docs at python components: Documentation messages: 193205 nosy: docs at python, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Class bodies: when does a name become local? type: behavior versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 01:59:44 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 16 Jul 2013 23:59:44 +0000 Subject: [issue18478] Class bodies: when does a name become local? In-Reply-To: <1374017954.45.0.193690883208.issue18478@psf.upfronthosting.co.za> Message-ID: <1374019184.36.0.954582622518.issue18478@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 03:13:28 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 17 Jul 2013 01:13:28 +0000 Subject: [issue10434] Document the rules for "public names" In-Reply-To: <1289919338.9.0.394057770971.issue10434@psf.upfronthosting.co.za> Message-ID: <1374023608.48.0.973771589971.issue10434@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 05:17:51 2013 From: report at bugs.python.org (paul j3) Date: Wed, 17 Jul 2013 03:17:51 +0000 Subject: [issue18467] argparse - problematic 'default' behavior In-Reply-To: <1373927590.26.0.302211166373.issue18467@psf.upfronthosting.co.za> Message-ID: <1374031071.21.0.692949531787.issue18467@psf.upfronthosting.co.za> paul j3 added the comment: I think this example illustrates your issue: class FooAction(argparse.Action): def __call__(self, parser, namespace, values, option_string = None): if values=='Q': setattr(namespace, self.dest, {'type':values, 'quick':True, 'slow':False}) else: setattr(namespace, self.dest, {'type':values, 'quick':False, 'slow':True}) def bar(string): return string.upper()[0] parser = argparse.ArgumentParser() parser.add_argument('-a','--algorithm', choices=['Q','S'], default='s', action=FooAction, type=bar) parser.add_argument('foo', choices=['Q','S'], default='s', action=FooAction, nargs='?', type=bar) print(parser.parse_args([])) # Namespace(algorithm='S', # foo={'slow': True, 'type': 'S', 'quick': False}) For both the optional and positional, the lower case default is converted into an upper case letter. For the positional with nargs='?', the action is called with the converted default value. But for the optional, the converted default is assigned to the dest algorithm='S' but action is not called, which would have assigned algorithm={'type': 'S', 'quick': False, 'slow': True} That is consistent with what I remember from the code. A next function 'take_action' is called only if there is an appropriate argument string. For this optional that would be '-a' (or the likes). For the '?' positional and empty argument list enough. There is a relatively recent change that delayed when a default was converted by type (so a filetype wouldn't be opened unnecessarily). But I can't think anyway that the action would be invoked on the default in the absence of '-a'. In this example, would it be possible shift code from the custom action to the custom type? ---------- Added file: http://bugs.python.org/file30944/issue18467.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 05:35:42 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 17 Jul 2013 03:35:42 +0000 Subject: [issue18404] Memory leak in gdbmmodule In-Reply-To: <1373288233.43.0.746729936071.issue18404@psf.upfronthosting.co.za> Message-ID: <1374032142.07.0.88721098834.issue18404@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 06:18:51 2013 From: report at bugs.python.org (=?utf-8?q?Jo=C3=A3o_Bernardo?=) Date: Wed, 17 Jul 2013 04:18:51 +0000 Subject: [issue18159] ConfigParser getters not available on SectionProxy In-Reply-To: <1370627030.12.0.961792763365.issue18159@psf.upfronthosting.co.za> Message-ID: <1374034731.66.0.448709803029.issue18159@psf.upfronthosting.co.za> Jo?o Bernardo added the comment: Was the patch accepted yet? Looks good to me ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 06:33:33 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 17 Jul 2013 04:33:33 +0000 Subject: [issue3158] Doctest fails to find doctests in extension modules In-Reply-To: <1214015505.39.0.384160170018.issue3158@psf.upfronthosting.co.za> Message-ID: <1374035613.52.0.56061299944.issue3158@psf.upfronthosting.co.za> Zachary Ware added the comment: In looking at test_decimal for issue16748, I discovered that not all of the doctests for _decimal are being tested. So, I fixed it (or at least tried to :). This patch does the following: - Replace most inspect.isfunction checks in DocTestFinder with inspect.isroutine - Add a check to DocTestFinder._from_module for method_descriptors - Correct a doctest on float.fromhex (which is incorrect back to 2.7) due to the new float repr - Add a couple doctests to the builtins module because previously there were no functions in builtins with docstrings for testing against. I chose to add to bin(), hex(), and oct(); I believe those three can benefit from having the docstring show the format of the output string. I'm not terribly attached to those, though, so if anyone has a better suggestion for testing, I'm all ears. - Add tests using the builtins module (since it's a C module that's definitely going to be available). - Add doctests to test_builtin (because the tests aren't actually run in test_doctest, just found). While at it, convert test_builtin to unittest.main(). I believe test_builtin should grow doctest running even if the doctests I added to bin, hex, and oct aren't kept; float and int have some doctests that should be kept up to date. - Add notes to the docs. ---------- keywords: +patch nosy: +zach.ware type: -> enhancement versions: +Python 3.4 -Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file30945/issue3158.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 09:33:04 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Jul 2013 07:33:04 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1374046384.85.0.362540228458.issue18408@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: listpop.patch: list_resize(a, Py_SIZE(a) + d) for d < 0 fails only when PyMem_Realloc(p, n) returns NULL if n < allocated size. Is it possible? Is it desired behavior? Perhaps we should declare that PyMem_Realloc() should return the original pointer if it can't shrink an allocated block. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 09:36:13 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Jul 2013 07:36:13 +0000 Subject: [issue18085] Verifying refcounts.dat In-Reply-To: <1369768958.38.0.697954786488.issue18085@psf.upfronthosting.co.za> Message-ID: <1374046573.6.0.479679536196.issue18085@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 10:32:43 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Jul 2013 08:32:43 +0000 Subject: [issue13083] _sre: getstring() releases the buffer before using it In-Reply-To: <1317433851.47.0.137164360321.issue13083@psf.upfronthosting.co.za> Message-ID: <1374049963.45.0.364114623147.issue13083@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett, serhiy.storchaka versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 10:47:41 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Jul 2013 08:47:41 +0000 Subject: [issue18073] pickle.Unpickler may read too many bytes, causing hangs with blocking input stream In-Reply-To: <1369677881.19.0.98233808248.issue18073@psf.upfronthosting.co.za> Message-ID: <1374050861.42.0.182907272328.issue18073@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Seems as the patch for issue17897 fixes this case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 10:47:46 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 17 Jul 2013 08:47:46 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1374050866.95.0.0874436358467.issue18408@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Victor, how about adding pyfailmalloc to the main repo (maybe under Tools), with a script making it easy to run the tests suite with it enabled? This way, it'll make it easier to run it from time to time (one could eve imagine making it part of the test suite at some point, but that's another story...). ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 10:48:28 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Jul 2013 08:48:28 +0000 Subject: [issue17897] Optimize unpickle prefetching In-Reply-To: <1367604999.94.0.501171592637.issue17897@psf.upfronthosting.co.za> Message-ID: <1374050908.19.0.927274333924.issue17897@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See issue18073 for test case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 10:51:48 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Jul 2013 08:51:48 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1374051108.21.0.261209674978.issue18408@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Victor, how about adding pyfailmalloc to the main repo (maybe under Tools), with a script making it easy to run the tests suite with it enabled? Seconded. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 10:52:20 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Jul 2013 08:52:20 +0000 Subject: [issue17897] Optimize unpickle prefetching In-Reply-To: <1367604999.94.0.501171592637.issue17897@psf.upfronthosting.co.za> Message-ID: <1374051140.06.0.667296295105.issue17897@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'd prefer to see efforts go towards finishing the PEP 3154 implementation... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 10:52:29 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Jul 2013 08:52:29 +0000 Subject: [issue17897] Optimize unpickle prefetching In-Reply-To: <1367604999.94.0.501171592637.issue17897@psf.upfronthosting.co.za> Message-ID: <1374051149.07.0.0659216430517.issue17897@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: -pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 11:04:49 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Jul 2013 09:04:49 +0000 Subject: [issue17897] Optimize unpickle prefetching In-Reply-To: <1367604999.94.0.501171592637.issue17897@psf.upfronthosting.co.za> Message-ID: <1374051889.69.0.52201238834.issue17897@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This patch is orthogonal to the PEP 3154 framing. The affecting of issue18073 is only an unexpected side effect. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 11:23:03 2013 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Wed, 17 Jul 2013 09:23:03 +0000 Subject: [issue18397] Python with MinGW In-Reply-To: <1373227373.99.0.371478249642.issue18397@psf.upfronthosting.co.za> Message-ID: <1374052983.35.0.988211082987.issue18397@psf.upfronthosting.co.za> V?clav ?milauer added the comment: @David & others: mingw build is covered in detail under issue17605 by Roumen Petrov. ---------- nosy: +eudoxos _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 11:56:22 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Jul 2013 09:56:22 +0000 Subject: [issue17767] Fix test discovery for test_locale.py In-Reply-To: <1366141872.94.0.252098297991.issue17767@psf.upfronthosting.co.za> Message-ID: <1374054982.4.0.70543842951.issue17767@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 11:56:44 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Jul 2013 09:56:44 +0000 Subject: [issue18266] Fix test discovery for test_largefile.py In-Reply-To: <1371675654.81.0.262540951411.issue18266@psf.upfronthosting.co.za> Message-ID: <1374055004.18.0.0420598900984.issue18266@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 12:11:08 2013 From: report at bugs.python.org (Paul Moore) Date: Wed, 17 Jul 2013 10:11:08 +0000 Subject: [issue18479] Improvements to Powershell activate script for venv Message-ID: <1374055868.56.0.0556139473307.issue18479@psf.upfronthosting.co.za> New submission from Paul Moore: Some small improvements to the powershell "Activate" script for venvs: 1. Can be run as a command, rather than needing to be dot sourced. This matches the behaviour of bat files, and of virtualenv's "activate" script, and avoids a source of user error. 2. Makes the "deactivate" command a function, so that a separate script is not needed, and deactivate can still be run after the environment has been deleted (a common error I make is to remove a temporary venv having forgotten to deactivate it first). 3. Corrects the prompt to have a prefix (name) rather than [(name) ]. This is likely a bug in venv itself, as __VENV_NAME__ is documented as being just the name, not the prompt string. But changing that could be a backward compatibility issue, so I'd prefer to put that in a separate patch if it's needed. These modifications are based on the virtualenv activate.ps1 script, which has been in use for some time, so they should be relatively well tested. ---------- assignee: vinay.sajip components: Library (Lib) files: venv.diff keywords: patch messages: 193217 nosy: pmoore, vinay.sajip priority: normal severity: normal stage: patch review status: open title: Improvements to Powershell activate script for venv type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file30946/venv.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 12:12:14 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jul 2013 10:12:14 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1374046384.85.0.362540228458.issue18408@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: 2013/7/17 Serhiy Storchaka : > listpop.patch: > > list_resize(a, Py_SIZE(a) + d) for d < 0 fails only when PyMem_Realloc(p, n) returns NULL if n < allocated size. Is it possible? Is it desired behavior? Perhaps we should declare that PyMem_Realloc() should return the original pointer if it can't shrink an allocated block. Resizing a buffer to make it smaller "should" not fail, and if it fails, the case is very unlikely. But I prefer to handle the case, rather than hoping that the case cannot occur in the libc implementation. For example, _PyObject_Realloc() of pymalloc allocates a *new* buffer to shrink an existing buffer if the size is reduced by more than 25%: if (nbytes <= size) { /* The block is staying the same or shrinking. If * it's shrinking, there's a tradeoff: it costs * cycles to copy the block to a smaller size class, * but it wastes memory not to copy it. The * compromise here is to copy on shrink only if at * least 25% of size can be shaved off. */ if (4 * nbytes > 3 * size) { /* It's the same, * or shrinking and new/old > 3/4. */ return p; } size = nbytes; } bp = _PyObject_Malloc(ctx, nbytes); I plan also to test Python with PyMem_Malloc using pymalloc to check if it's faster or not. So PyMem_Realloc() may fail when shrinking a buffer ;-) By the way, I already fixed similar bugs (handle PyMem_Realloc failure when shrinking the buffer) in this issue. Examples: http://hg.python.org/cpython/rev/68887e177dd4 http://hg.python.org/cpython/rev/549d8d3297f2 listpop.patch only changes the error handling to make it more resilient when the "very unlikely" case occurs ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 12:24:11 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jul 2013 10:24:11 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1374050866.95.0.0874436358467.issue18408@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: 2013/7/17 Charles-Fran?ois Natali : > Victor, how about adding pyfailmalloc to the main repo (maybe under Tools), with a script making it easy to run the tests suite with it enabled? > This way, it'll make it easier to run it from time to time (one could eve imagine making it part of the test suite at some point, but that's another story...). I plan to write a new module and propose it for inclusion in Python 3.4. It will have the features of pytracemalloc *and* pyfailmalloc, and also statistics (number of calls to each allocator function, with a function to reset counters). The blocker pointer is to get the size of a buffer on free(). In pytracemalloc, I'm using a glib hash lib: pointer => structure {size of the buffer, filename, line number}. The dependency to glib should be removed to integrate the module in Python :-) The simpler solution is to allocate a wider buffer and store the metadata directly in the buffer before the data. The second problem is how this feature would be enabled. Enabling the feature at runtime would require a new environment variable to set the right memory allocator at startup. The choice of the memory allocator must be done before the first memory allocation, so in main(). Integrating pytracemalloc into CPython was my main motivation to write the PEP 445. If you would like to use pyfailmalloc right now, you have to: * build pyfailmalloc with Python 3.4 * apply debug_cpython.patch on Python which is the pyfailmalloc repository * run gdb -x debug_cpython.gdb (which can also be found in the pyfailmalloc repository) * https://bitbucket.org/haypo/pyfailmalloc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 12:25:28 2013 From: report at bugs.python.org (Phil Webster) Date: Wed, 17 Jul 2013 10:25:28 +0000 Subject: [issue18226] IDLE Unit test for FormatParagrah.py In-Reply-To: <1371335636.99.0.534048602964.issue18226@psf.upfronthosting.co.za> Message-ID: <1374056728.05.0.688951810625.issue18226@psf.upfronthosting.co.za> Phil Webster added the comment: Added tests for FormatParagraph using single/multiline comment blocks and single/multiline strings in the mock editor window. Here is a summary of the changes: FormatParagraph.py - description for format_paragraph_event - modified so that selecting a long comment line will comment the new wrapped line - if __name__ == __main__"... mock_tk.py - FormatParagraph uses the 'insert' tag, so I implemented tag_add using a dict (not sure if this is the best option...) - index returns '' if the index refers to selection that doesn't exist (this replicates the real Text widget). It does this by excepting a TypeError and I'm guessing there is a better way to do it than this. - tags (i.e. 'sel.first') can be set to 'end' or other indexes which would not work with a regular Text widget, but it may be useful here. mock_idle.py - added undo start/stop for the mock text widget - used 'sel.first' and 'sel.last' for get_selection_indices() test_rstrip.py - This test used the 'insert' tag, so I set 'insert' to an index to keep the tests passing. test_text.py - Same issue with 'insert' as test_rstrip Should I be submitting multiple patches for these changes or is it ok to combine them? I was also wondering if it would be a good idea to split up the FormatParagraph tests into separate tests. ---------- Added file: http://bugs.python.org/file30947/18226IDLEUnitTestFormatParagraph3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 12:27:12 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Jul 2013 10:27:12 +0000 Subject: [issue17767] Fix test discovery for test_locale.py In-Reply-To: <1366141872.94.0.252098297991.issue17767@psf.upfronthosting.co.za> Message-ID: <3bwF5q6V2pz7Ljy@mail.python.org> Roundup Robot added the comment: New changeset 3b883491a5f2 by Serhiy Storchaka in branch '3.3': Issue #17767: test_locale now works with unittest test discovery. http://hg.python.org/cpython/rev/3b883491a5f2 New changeset 60e72210683c by Serhiy Storchaka in branch 'default': Issue #17767: test_locale now works with unittest test discovery. http://hg.python.org/cpython/rev/60e72210683c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 12:44:40 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Jul 2013 10:44:40 +0000 Subject: [issue18266] Fix test discovery for test_largefile.py In-Reply-To: <1371675654.81.0.262540951411.issue18266@psf.upfronthosting.co.za> Message-ID: <3bwFV0051Qz7LjW@mail.python.org> Roundup Robot added the comment: New changeset dd75dbed1135 by Serhiy Storchaka in branch '3.3': Issue #18266: test_largefile now works with unittest test discovery and http://hg.python.org/cpython/rev/dd75dbed1135 New changeset 2d8573e12591 by Serhiy Storchaka in branch 'default': Issue #18266: test_largefile now works with unittest test discovery and http://hg.python.org/cpython/rev/2d8573e12591 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 13:36:52 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Jul 2013 11:36:52 +0000 Subject: [issue17767] Fix test discovery for test_locale.py In-Reply-To: <1366141872.94.0.252098297991.issue17767@psf.upfronthosting.co.za> Message-ID: <1374061012.85.0.996153726469.issue17767@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I combined two last Zachary's patches and added more robust locale test cleanup (old locale now restored even when print() in setUp() will failed). Thank you for your patch Zachary. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 13:39:33 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Jul 2013 11:39:33 +0000 Subject: [issue18266] Fix test discovery for test_largefile.py In-Reply-To: <1371675654.81.0.262540951411.issue18266@psf.upfronthosting.co.za> Message-ID: <1374061173.02.0.882219440942.issue18266@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 Jul 17 13:43:33 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Jul 2013 11:43:33 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3bwGnw6qMtz7LlP@mail.python.org> Roundup Robot added the comment: New changeset 7b81a535ad14 by Victor Stinner in branch 'default': Issue #18408: Fix structseq_reduce(), handle PyDict_SetItemString() failure http://hg.python.org/cpython/rev/7b81a535ad14 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 13:45:54 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jul 2013 11:45:54 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1374061554.54.0.794513254391.issue18408@psf.upfronthosting.co.za> STINNER Victor added the comment: Open issues (TODO list): - review and apply listpop.patch and frame_fasttolocals.patch - fix CJK codecs: using UNIINV to report _PyUnicodeWriter_WriteChar() failure in Modules/cjkcodecs/cjkcodecs.h does not work. The caller is not aware of the failure: multibytecodec_decerror() receives e=1, whereas it should get MBERR_EXCEPTION - fix Modules/pyexpat.c: handlers do no detect failures - fix sqlite: Modules/_sqlite/connection.c calls the finalize method on the aggregate whereas calling step() failed - fix tests hang when an exception occurs in a thread - fix new bugs found by pyfailmalloc :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 13:46:25 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Jul 2013 11:46:25 +0000 Subject: [issue18258] Fix test discovery for test_codecmaps*.py In-Reply-To: <1371590163.56.0.716538742533.issue18258@psf.upfronthosting.co.za> Message-ID: <1374061585.6.0.729542996191.issue18258@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 13:48:07 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Jul 2013 11:48:07 +0000 Subject: [issue16968] Fix test discovery for test_concurrent_futures.py In-Reply-To: <1358201974.23.0.0352259739582.issue16968@psf.upfronthosting.co.za> Message-ID: <1374061687.15.0.352458243129.issue16968@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 14:54:58 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 17 Jul 2013 12:54:58 +0000 Subject: [issue18480] _elementtree: missing PyType_Ready call Message-ID: <1374065698.77.0.654171815801.issue18480@psf.upfronthosting.co.za> New submission from Ronald Oussoren: The _elementtree extension calls PyType_Ready for most, but not all, types defined in the extension. The attached patch calls PyType_Ready for the ElementIter_Type. ---------- components: Extension Modules, XML files: elementtree-missing-type-ready.txt messages: 193226 nosy: ronaldoussoren priority: normal severity: normal stage: patch review status: open title: _elementtree: missing PyType_Ready call type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30948/elementtree-missing-type-ready.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 14:55:21 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 17 Jul 2013 12:55:21 +0000 Subject: [issue18480] _elementtree: missing PyType_Ready call In-Reply-To: <1374065698.77.0.654171815801.issue18480@psf.upfronthosting.co.za> Message-ID: <1374065721.71.0.575865325633.issue18480@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- keywords: +needs review, patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 15:16:45 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Jul 2013 13:16:45 +0000 Subject: [issue18480] _elementtree: missing PyType_Ready call In-Reply-To: <1374065698.77.0.654171815801.issue18480@psf.upfronthosting.co.za> Message-ID: <1374067005.64.0.991929060846.issue18480@psf.upfronthosting.co.za> Christian Heimes added the comment: Good catch! ElementIter_Type has no prototype, too. $ grep Type Modules/_elementtree.c | grep static static PyTypeObject Element_Type; static PyTypeObject Element_Type = { static PyTypeObject ElementIter_Type = { static PyTypeObject TreeBuilder_Type; static PyTypeObject TreeBuilder_Type = { static PyTypeObject XMLParser_Type; static PyTypeObject XMLParser_Type = { How about you move the prototypes for all four types to the head of the file? For example the ssl.c module declares all types up front. It makes it more clear which types are defined by the module. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 15:20:32 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Jul 2013 13:20:32 +0000 Subject: [issue18480] _elementtree: missing PyType_Ready call In-Reply-To: <1374065698.77.0.654171815801.issue18480@psf.upfronthosting.co.za> Message-ID: <1374067232.18.0.270987008297.issue18480@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 15:30:24 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 17 Jul 2013 13:30:24 +0000 Subject: [issue18480] _elementtree: missing PyType_Ready call In-Reply-To: <1374065698.77.0.654171815801.issue18480@psf.upfronthosting.co.za> Message-ID: <1374067824.31.0.0813239632626.issue18480@psf.upfronthosting.co.za> Ronald Oussoren added the comment: It was a pretty easy catch, the _elementtree caused a crash while I was working on an implementation for PEP 447. The missing call to PyType_Ready helped to make that implementation more robust :-) I'm not entirely convinced that adding forward declarations for the type is really useful, but have added a patch that moves the forward declarations to the start of the file and adds one for the iter type. ---------- Added file: http://bugs.python.org/file30949/elementtree-missing-type-ready-with-forwards.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 16:19:51 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Jul 2013 14:19:51 +0000 Subject: [issue18258] Fix test discovery for test_codecmaps*.py In-Reply-To: <1371590163.56.0.716538742533.issue18258@psf.upfronthosting.co.za> Message-ID: <1374070791.4.0.134698191007.issue18258@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What is a purpose of `support.use_resources = ['urlfetch']`? I don't see any effect. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 16:40:36 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Jul 2013 14:40:36 +0000 Subject: [issue18481] lcov report Message-ID: <1374072036.39.0.598411326766.issue18481@psf.upfronthosting.co.za> New submission from Christian Heimes: The patch adds a couple of ignores and three Makefile targets for gcov and lcov reports. lcov [1] is a project that can create html reports from gcov output for C files. make coverage-report first cleans up the source tree, then recompiles Python with gcov, runs the unit test and finally creates a HTML report. I have a sample output on my box. Do we have a server where I can host about 55 MB? [1] http://ltp.sourceforge.net/coverage/lcov.php ---------- files: lcov.patch keywords: patch messages: 193230 nosy: christian.heimes priority: low severity: normal stage: patch review status: open title: lcov report type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file30950/lcov.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 16:51:36 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 17 Jul 2013 14:51:36 +0000 Subject: [issue18258] Fix test discovery for test_codecmaps*.py In-Reply-To: <1371590163.56.0.716538742533.issue18258@psf.upfronthosting.co.za> Message-ID: <1374072696.46.0.284670538456.issue18258@psf.upfronthosting.co.za> R. David Murray added the comment: It enables the resource when the tests are run via unittest. (That is, it is equivalent to specifying '-u urlfetch' when running regrtest.) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 16:57:53 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 17 Jul 2013 14:57:53 +0000 Subject: [issue18181] Add type.__locallookup__ In-Reply-To: <1370870153.93.0.646087371852.issue18181@psf.upfronthosting.co.za> Message-ID: <1374073073.01.0.83849597985.issue18181@psf.upfronthosting.co.za> Ronald Oussoren added the comment: issue-18181-full-v1.txt implements support for __locallookup__ to both super and _PyType_Lookup and should implement the entire PEP. The patch is not yet 100% and is missing: * Tests that add __locallookup__ to a metaclass at runtime, should enable the new behavior * Tests that use the tp_locallookup slot in an type defined in C code * Documentation has not been updated. Changes to the implementation: * _PyType_Lookup is now _PyType_LookupName and returns a new reference (not a borrowed one) * _PyType_Lookup and super.__getattribute__ use the __locallookup__ method when present * __locallookup__ is not defined on "type", and the type attribute lookup cache is disabled for types that have a metatype with __locallookup__ * The type attribute cache is disabled for types that are not ready (Py_TPFLAGS_READY), primarily as a side effect of the implementation. The cache is also disabled for types with a metaclass that has a tp_locallookup attribute, as mentioned in the PEP. The code does not change the VERSION flags of the type because dynamicly adding a __locallookup__ method to the metaclass would have to change all instances of that metaclass and that's not easily possible. ---------- stage: needs patch -> patch review title: super vs. someclass.__getattribute__ -> Add type.__locallookup__ Added file: http://bugs.python.org/file30951/issue-18181-full-v1.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 17:23:22 2013 From: report at bugs.python.org (TD22057) Date: Wed, 17 Jul 2013 15:23:22 +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: <1374074602.36.0.795803720858.issue9338@psf.upfronthosting.co.za> Changes by TD22057 : ---------- nosy: +TD22057 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 17:26:08 2013 From: report at bugs.python.org (James Lu) Date: Wed, 17 Jul 2013 15:26:08 +0000 Subject: [issue18482] dis.dis fails on one letter strings. Message-ID: <1374074768.26.0.424583146631.issue18482@psf.upfronthosting.co.za> New submission from James Lu: dis.dis fails on one letter strings. dis.dis("t") Traceback (most recent call last): File "", line 1, in dis.dis("t") File "C:\python 25\lib\dis.py", line 44, in dis disassemble_string(x) File "C:\python 25\lib\dis.py", line 111, in disassemble_string labels = findlabels(code) File "C:\python 25\lib\dis.py", line 165, in findlabels oparg = ord(code[i]) + ord(code[i+1])*256 IndexError: string index out of range ---------- components: Library (Lib) messages: 193233 nosy: James.Lu priority: normal severity: normal status: open title: dis.dis fails on one letter strings. type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 17:30:37 2013 From: report at bugs.python.org (Yury V. Zaytsev) Date: Wed, 17 Jul 2013 15:30:37 +0000 Subject: [issue9307] Py_TPFLAGS_LONG_SUBCLASS is not documented In-Reply-To: <1279561825.23.0.120090245801.issue9307@psf.upfronthosting.co.za> Message-ID: <1374075037.9.0.701817662083.issue9307@psf.upfronthosting.co.za> Yury V. Zaytsev added the comment: Hi, I agree with Alexander, I've been recently investigating a related problem and I found the lack of documentation on the subject quite frustrating; I therefore propose the attached patch to the docs. Hope that helps, --Yury. ---------- keywords: +patch nosy: +zaytsev Added file: http://bugs.python.org/file30952/tpflags-doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 17:48:32 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Jul 2013 15:48:32 +0000 Subject: [issue18481] lcov report In-Reply-To: <1374072036.39.0.598411326766.issue18481@psf.upfronthosting.co.za> Message-ID: <1374076112.03.0.0624152069637.issue18481@psf.upfronthosting.co.za> Christian Heimes added the comment: https://dl.dropboxusercontent.com/u/19557108/python-lcov/index.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 17:50:34 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 17 Jul 2013 15:50:34 +0000 Subject: [issue18483] Add hour-24 type of time to test_http2time_formats in test_http_cookiejar.py Message-ID: <1374076234.14.0.497135423695.issue18483@psf.upfronthosting.co.za> New submission from Vajrasky Kok: In test_http2time_formats test function, they test many type of date & time format, such as: ... 'Thu, 03 Feb 1994 00:00:00 GMT', # proposed new HTTP format 'Thursday, 03-Feb-94 00:00:00 GMT', # old rfc850 HTTP format 'Thursday, 03-Feb-1994 00:00:00 GMT', # broken rfc850 HTTP format '03 Feb 1994 00:00:00 GMT', # HTTP format (no weekday) ... I think it would be a good idea to add hour-24 to this list. See the patch file. ---------- components: Tests files: add_hour_24_in_test_http2time_format.txt messages: 193236 nosy: vajrasky priority: normal severity: normal status: open title: Add hour-24 type of time to test_http2time_formats in test_http_cookiejar.py versions: Python 3.4 Added file: http://bugs.python.org/file30953/add_hour_24_in_test_http2time_format.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 17:57:25 2013 From: report at bugs.python.org (Matthew Barnett) Date: Wed, 17 Jul 2013 15:57:25 +0000 Subject: [issue13083] _sre: getstring() releases the buffer before using it In-Reply-To: <1317433851.47.0.137164360321.issue13083@psf.upfronthosting.co.za> Message-ID: <1374076645.71.0.81975480376.issue13083@psf.upfronthosting.co.za> Matthew Barnett added the comment: It looks like this was fixed for issue #14212. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 18:00:23 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 17 Jul 2013 16:00:23 +0000 Subject: [issue18482] dis.dis fails on one letter strings. In-Reply-To: <1374074768.26.0.424583146631.issue18482@psf.upfronthosting.co.za> Message-ID: <1374076823.01.0.464247081905.issue18482@psf.upfronthosting.co.za> R. David Murray added the comment: NB: This is only a bug in python2. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 18:04:21 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Jul 2013 16:04:21 +0000 Subject: [issue18258] Fix test discovery for test_codecmaps*.py In-Reply-To: <1371590163.56.0.716538742533.issue18258@psf.upfronthosting.co.za> Message-ID: <1374077061.32.0.637133508153.issue18258@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: But I don't see any effect. $ ./python -m test.regrtest -v test_codecmaps_tw == CPython 3.3.2+ (3.3:359002d4370d+, Jul 14 2013, 15:34:54) [GCC 4.6.3] == Linux-3.8.0-27-generic-i686-with-debian-wheezy-sid little-endian == /home/serhiy/py/cpython-3.3/build/test_python_6295 Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1) [1/1] test_codecmaps_tw test_errorhandle (test.test_codecmaps_tw.TestBIG5Map) ... skipped "Use of the 'urlfetch' resource not enabled" test_mapping_file (test.test_codecmaps_tw.TestBIG5Map) ... skipped "Use of the 'urlfetch' resource not enabled" test_mapping_supplemental (test.test_codecmaps_tw.TestBIG5Map) ... skipped "Use of the 'urlfetch' resource not enabled" test_errorhandle (test.test_codecmaps_tw.TestCP950Map) ... skipped "Use of the 'urlfetch' resource not enabled" test_mapping_file (test.test_codecmaps_tw.TestCP950Map) ... skipped "Use of the 'urlfetch' resource not enabled" test_mapping_supplemental (test.test_codecmaps_tw.TestCP950Map) ... skipped "Use of the 'urlfetch' resource not enabled" $ ./python -m unittest discover -v Lib/test/ "test_codecmaps_tw.py" test_errorhandle (test_codecmaps_tw.TestBIG5Map) ... skipped "Use of the 'urlfetch' resource not enabled" test_mapping_file (test_codecmaps_tw.TestBIG5Map) ... skipped "Use of the 'urlfetch' resource not enabled" test_mapping_supplemental (test_codecmaps_tw.TestBIG5Map) ... skipped "Use of the 'urlfetch' resource not enabled" test_errorhandle (test_codecmaps_tw.TestCP950Map) ... skipped "Use of the 'urlfetch' resource not enabled" test_mapping_file (test_codecmaps_tw.TestCP950Map) ... skipped "Use of the 'urlfetch' resource not enabled" test_mapping_supplemental (test_codecmaps_tw.TestCP950Map) ... skipped "Use of the 'urlfetch' resource not enabled" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 18:10:26 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 17 Jul 2013 16:10:26 +0000 Subject: [issue18258] Fix test discovery for test_codecmaps*.py In-Reply-To: <1371590163.56.0.716538742533.issue18258@psf.upfronthosting.co.za> Message-ID: <1374077426.09.0.439916660506.issue18258@psf.upfronthosting.co.za> R. David Murray added the comment: I'm sorry, I misspoke. It only works when you run the test file as command: ./python Lib/test/test_codecmaps_cn.py (which uses unittest.main, thus my error in calling it 'via unittest'). So, the fact that the tests don't run if discovery is used is still a bug. I'm not sure how we fix it, given the nature of the resource. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 18:37:57 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 17 Jul 2013 16:37:57 +0000 Subject: [issue18484] No unit test for iso2time function from http.cookiejar module Message-ID: <1374079077.48.0.0605853512742.issue18484@psf.upfronthosting.co.za> New submission from Vajrasky Kok: >From http.cookiejar module, we have http2time and iso2time functions. We have unit test for http2time, but not for iso2time. That's not fair. Attached the extended coverage test for iso2time function. ---------- components: Tests files: add_iso2time_test.txt messages: 193241 nosy: vajrasky priority: normal severity: normal status: open title: No unit test for iso2time function from http.cookiejar module versions: Python 3.4 Added file: http://bugs.python.org/file30954/add_iso2time_test.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 19:18:54 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 17 Jul 2013 17:18:54 +0000 Subject: [issue18258] Fix test discovery for test_codecmaps*.py In-Reply-To: <1371590163.56.0.716538742533.issue18258@psf.upfronthosting.co.za> Message-ID: <1374081534.72.0.233124874627.issue18258@psf.upfronthosting.co.za> Zachary Ware added the comment: R. David Murray wrote: > So, the fact that the tests don't run if discovery is used is still a > bug. I'm not sure how we fix it, given the nature of the resource. My preferred solution short of adding resource management to unittest is to add a "regrtest_run" flag to test.support, defaulting to False and set to True by regrtest (like verbose, use_resources, etc.). Then we can replace the sys._getframe hack in support.requires with a simple check of support.regrtest_run. If it's False, return. This way, running the test module directly or via discovery will work the same way: all resources enabled. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 20:20:24 2013 From: report at bugs.python.org (Ankur Ankan) Date: Wed, 17 Jul 2013 18:20:24 +0000 Subject: [issue16293] curses.ungetch raises OverflowError when given -1 In-Reply-To: <1350782737.16.0.822622780307.issue16293@psf.upfronthosting.co.za> Message-ID: <1374085224.27.0.427561011104.issue16293@psf.upfronthosting.co.za> Changes by Ankur Ankan : ---------- nosy: +Ankur.Ankan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 21:02:10 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 17 Jul 2013 19:02:10 +0000 Subject: [issue16405] Explain how to set up the whitespace commit hook locally In-Reply-To: <1352041451.32.0.465920697634.issue16405@psf.upfronthosting.co.za> Message-ID: <1374087730.88.0.400008500778.issue16405@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 21:20:10 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 17 Jul 2013 19:20:10 +0000 Subject: [issue18258] Fix test discovery for test_codecmaps*.py In-Reply-To: <1371590163.56.0.716538742533.issue18258@psf.upfronthosting.co.za> Message-ID: <1374088810.37.0.871900600419.issue18258@psf.upfronthosting.co.za> R. David Murray added the comment: +1. You should probably open a new issue for that proposal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 21:48:46 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Jul 2013 19:48:46 +0000 Subject: [issue18481] lcov report In-Reply-To: <1374072036.39.0.598411326766.issue18481@psf.upfronthosting.co.za> Message-ID: <1374090526.67.0.432355261645.issue18481@psf.upfronthosting.co.za> Christian Heimes added the comment: The new patch removes 3rd party components like expat and libffi. lcov doesn't support complex matches so I had to remove each library on its own. ---------- Added file: http://bugs.python.org/file30955/lcov.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 21:49:44 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Jul 2013 19:49:44 +0000 Subject: [issue18481] lcov report In-Reply-To: <1374072036.39.0.598411326766.issue18481@psf.upfronthosting.co.za> Message-ID: <1374090584.44.0.923711679948.issue18481@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file30950/lcov.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 21:51:47 2013 From: report at bugs.python.org (Michael Foord) Date: Wed, 17 Jul 2013 19:51:47 +0000 Subject: [issue18472] PEP 8 updates - internal interfaces and import * In-Reply-To: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> Message-ID: <1374090707.47.0.931791406672.issue18472@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 22:11:49 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Jul 2013 20:11:49 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3bwV4N17lVz7Lk0@mail.python.org> Roundup Robot added the comment: New changeset 4d3bb9763bf9 by Victor Stinner in branch 'default': Issue #18408: Fix time.tzset(), detect exception when calling PyInit_timezone() http://hg.python.org/cpython/rev/4d3bb9763bf9 New changeset 563b27bef79f by Victor Stinner in branch 'default': Issue #18408: Fix heapq.heappop(), handle PyList_SetSlice() failure http://hg.python.org/cpython/rev/563b27bef79f New changeset 6fb3414710ab by Victor Stinner in branch 'default': Issue #18408: Fix ast_for_atom(), PyErr_Fetch(&type, &value, &tback) can set value to NULL http://hg.python.org/cpython/rev/6fb3414710ab New changeset 479af6ca3a3c by Victor Stinner in branch 'default': Issue #18408: Fix _PyImport_LoadDynamicModule(), handle PyUnicode_FromFormat() failure http://hg.python.org/cpython/rev/479af6ca3a3c New changeset 573f7d485ce8 by Victor Stinner in branch 'default': Issue #18408: Fix PyErr_SetImportError(), handle PyDict_SetItemString() failure http://hg.python.org/cpython/rev/573f7d485ce8 New changeset 97bb3bdf1443 by Victor Stinner in branch 'default': Issue #18408: Fix listpop(), handle list_ass_slice() failure http://hg.python.org/cpython/rev/97bb3bdf1443 New changeset 2f5f1db8eb88 by Victor Stinner in branch 'default': Issue #18408: Fix Py_ReprEnter(), handle PyList_Append() failure http://hg.python.org/cpython/rev/2f5f1db8eb88 New changeset c2d90ff0780c by Victor Stinner in branch 'default': Issue #18408: Fix PyType_Ready(), handle _PyDict_SetItemId() failure http://hg.python.org/cpython/rev/c2d90ff0780c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 22:21:32 2013 From: report at bugs.python.org (Roumen Petrov) Date: Wed, 17 Jul 2013 20:21:32 +0000 Subject: [issue18485] mingw: configure for shared build Message-ID: <1374092492.69.0.0184006927142.issue18485@psf.upfronthosting.co.za> New submission from Roumen Petrov: Split of issue3871 - part for build of core modules. ---------- components: Build files: 0004-MINGW-configure-for-shared-build.patch keywords: patch messages: 193246 nosy: rpetrov priority: normal severity: normal status: open title: mingw: configure for shared build type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file30956/0004-MINGW-configure-for-shared-build.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 22:26:37 2013 From: report at bugs.python.org (Roumen Petrov) Date: Wed, 17 Jul 2013 20:26:37 +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: <1374092797.4.0.586276077662.issue6672@psf.upfronthosting.co.za> Roumen Petrov added the comment: new patch - improved version with support for build of core modules ---------- Added file: http://bugs.python.org/file30957/0003-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 22:29:10 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jul 2013 20:29:10 +0000 Subject: [issue18482] dis.dis fails on one letter strings. In-Reply-To: <1374074768.26.0.424583146631.issue18482@psf.upfronthosting.co.za> Message-ID: <1374092950.17.0.694301919396.issue18482@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't understand why do you consider IndexError as an issue. Do you expect another exception? b"t" is not a valid bytecode. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 22:31:51 2013 From: report at bugs.python.org (Roumen Petrov) Date: Wed, 17 Jul 2013 20:31:51 +0000 Subject: [issue18486] mingw: dynamic loading support Message-ID: <1374093111.95.0.0778484284701.issue18486@psf.upfronthosting.co.za> New submission from Roumen Petrov: Split of issue3871 - part for build of core modules. ---------- components: Build files: 0005-MINGW-dynamic-loading-support.patch keywords: patch messages: 193249 nosy: rpetrov priority: normal severity: normal status: open title: mingw: dynamic loading support type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file30958/0005-MINGW-dynamic-loading-support.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 22:33:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Jul 2013 20:33:57 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3bwVYx0QSwzS6Y@mail.python.org> Roundup Robot added the comment: New changeset 736514fb7b52 by Victor Stinner in branch 'default': Issue #18408: Rewrite NEGATE() macro in longobject.c to handle PyLong_FromLong() failure http://hg.python.org/cpython/rev/736514fb7b52 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 22:41:45 2013 From: report at bugs.python.org (Roumen Petrov) Date: Wed, 17 Jul 2013 20:41:45 +0000 Subject: [issue18487] mingw implement exec prefix Message-ID: <1374093705.74.0.166827931169.issue18487@psf.upfronthosting.co.za> New submission from Roumen Petrov: Enhancement of issue3871 - part for build of core modules. Patch in scope of 3871 is designed for compatibility with specific for MSC build installation scheme. Users don't like this. Updated patch is part of support 'posix' build and installation scheme for windows hosts. For now functionality is activated only for GNU C compiler. ---------- components: Build files: 0006-MINGW-implement-exec-prefix.patch keywords: patch messages: 193251 nosy: rpetrov priority: normal severity: normal status: open title: mingw implement exec prefix type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file30959/0006-MINGW-implement-exec-prefix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 22:55:54 2013 From: report at bugs.python.org (Phil Webster) Date: Wed, 17 Jul 2013 20:55:54 +0000 Subject: [issue18226] IDLE Unit test for FormatParagrah.py In-Reply-To: <1371335636.99.0.534048602964.issue18226@psf.upfronthosting.co.za> Message-ID: <1374094554.83.0.324574087776.issue18226@psf.upfronthosting.co.za> Phil Webster added the comment: After reading Terry's comments on the initial patch I turned FormatParagraph's initial comments into a docstring and made sure that all lines were < 80 characters. ---------- Added file: http://bugs.python.org/file30960/18226IDLEUnitTestFormatParagraph4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 22:57:12 2013 From: report at bugs.python.org (Roumen Petrov) Date: Wed, 17 Jul 2013 20:57:12 +0000 Subject: [issue10615] Trivial mingw compile fixes In-Reply-To: <1291380362.46.0.195053370852.issue10615@psf.upfronthosting.co.za> Message-ID: <1374094632.48.0.158401944349.issue10615@psf.upfronthosting.co.za> Roumen Petrov added the comment: This patch cannot be closed as contain some fixes not reported/proposed yet . For instance I'm not aware of name clash in Modules/_pickle.c . I think that other are in scope of issue3871 or earlier . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 23:30:25 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 17 Jul 2013 21:30:25 +0000 Subject: [issue18482] dis.dis fails on one letter strings. In-Reply-To: <1374074768.26.0.424583146631.issue18482@psf.upfronthosting.co.za> Message-ID: <1374096625.72.0.697662839891.issue18482@psf.upfronthosting.co.za> R. David Murray added the comment: Haypo: it gives a result on python3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 23:35:41 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jul 2013 21:35:41 +0000 Subject: [issue18482] dis.dis fails on one letter strings. In-Reply-To: <1374074768.26.0.424583146631.issue18482@psf.upfronthosting.co.za> Message-ID: <1374096941.95.0.876516458853.issue18482@psf.upfronthosting.co.za> STINNER Victor added the comment: > Haypo: it gives a result on python3. It is a new feature of Python 3.2: see issue #6507. New features are no more added to Python 2, so you now have a good reason to upgrade to Python 3 ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 23:55:37 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 17 Jul 2013 21:55:37 +0000 Subject: [issue18482] dis.dis fails on one letter strings. In-Reply-To: <1374074768.26.0.424583146631.issue18482@psf.upfronthosting.co.za> Message-ID: <1374098137.67.0.400050263578.issue18482@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, yes, I see that you are correct. ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed type: crash -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 01:39:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jul 2013 23:39:52 +0000 Subject: [issue18488] sqlite: finalize() method of user function may be called with an exception set if a call to step() method failed Message-ID: <1374104392.89.0.672278845185.issue18488@psf.upfronthosting.co.za> New submission from STINNER Victor: In Modules/_sqlite/connection.c, _pysqlite_final_callback() calls the finalize() method of the user function. Calling this method may clear the current exception, whereas test_sqlite excepts that exceptions of step() are reported. ---------- messages: 193257 nosy: haypo priority: normal severity: normal status: open title: sqlite: finalize() method of user function may be called with an exception set if a call to step() method failed versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 01:43:38 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jul 2013 23:43:38 +0000 Subject: [issue18488] sqlite: finalize() method of user function may be called with an exception set if a call to step() method failed In-Reply-To: <1374104392.89.0.672278845185.issue18488@psf.upfronthosting.co.za> Message-ID: <1374104618.58.0.733412915006.issue18488@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +christian.heimes, ghaering, pitrou, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 01:46:16 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Jul 2013 23:46:16 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3bwZqr0Mt8z7LjY@mail.python.org> Roundup Robot added the comment: New changeset d85b0c355052 by Victor Stinner in branch 'default': Issue #18408: Fix array_index(), handle getarrayitem() failure http://hg.python.org/cpython/rev/d85b0c355052 New changeset b05a6a6eb525 by Victor Stinner in branch 'default': Issue #18408: Fix array_tolist(), handle PyList_SetItem() failure http://hg.python.org/cpython/rev/b05a6a6eb525 New changeset 161de66cae49 by Victor Stinner in branch 'default': Issue #18408: Fix dict_repr(), don't call PyObject_Repr() with an exception set http://hg.python.org/cpython/rev/161de66cae49 New changeset 48a869a39e2d by Victor Stinner in branch 'default': Issue #18408: PyEval_EvalFrameEx() and PyEval_CallObjectWithKeywords() now fail http://hg.python.org/cpython/rev/48a869a39e2d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 01:46:17 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Jul 2013 23:46:17 +0000 Subject: [issue18488] sqlite: finalize() method of user function may be called with an exception set if a call to step() method failed In-Reply-To: <1374104392.89.0.672278845185.issue18488@psf.upfronthosting.co.za> Message-ID: <3bwZqr5jYQz7LjY@mail.python.org> Roundup Robot added the comment: New changeset a2214ab0812e by Victor Stinner in branch 'default': Issue #18488: _pysqlite_final_callback() should not clear the exception set by http://hg.python.org/cpython/rev/a2214ab0812e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 01:56:18 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Jul 2013 23:56:18 +0000 Subject: [issue18488] sqlite: finalize() method of user function may be called with an exception set if a call to step() method failed In-Reply-To: <1374104392.89.0.672278845185.issue18488@psf.upfronthosting.co.za> Message-ID: <1374105378.74.0.372633800927.issue18488@psf.upfronthosting.co.za> STINNER Victor added the comment: What is the expected behaviour? Should sqlite call finalize() if step() failed? If finalize() must be called: which exception should be kept? step() or failure() exception? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 01:57:33 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Jul 2013 23:57:33 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3bwb4r2K8Wz7Ljq@mail.python.org> Roundup Robot added the comment: New changeset 9bae7696951f by Victor Stinner in branch 'default': Issue #18408: Fix _pysqlite_fetch_one_row(), in debug mode, don't call http://hg.python.org/cpython/rev/9bae7696951f New changeset 5bd9db528aed by Victor Stinner in branch 'default': Issue #18408: PyObject_Str(), PyObject_Repr() and type_call() now fail with an http://hg.python.org/cpython/rev/5bd9db528aed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 02:31:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 Jul 2013 00:31:43 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3bwbrG0xfKzRp9@mail.python.org> Roundup Robot added the comment: New changeset ddff866d820d by Victor Stinner in branch 'default': Issue #18408: Fix PyInit__curses_panel(), handle import_curses() failure http://hg.python.org/cpython/rev/ddff866d820d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 02:51:10 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Jul 2013 00:51:10 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1374108670.72.0.274623644785.issue18408@psf.upfronthosting.co.za> STINNER Victor added the comment: Changesets 48a869a39e2d and 5bd9db528aed adding "assert(!PyErr_Occurred());" broke some buildbots. I fixed the issue on OpenSolaris, I'm unable to reproduce the 2 remaining issues (I tested on Fedora 18 and FreeBSD 9). http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/8236/steps/test/logs/stdio python: Python/ceval.c:1210: PyEval_EvalFrameEx: Assertion `!PyErr_Occurred()' failed. Fatal Python error: Aborted Current thread 0x404df8c0: File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/sqlite3/test/userfunctions.py", line 441 in authorizer_cb File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/sqlite3/test/userfunctions.py", line 406 in test_table_access File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/case.py", line 496 in run ... http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.0%203.x/builds/98/steps/test/logs/stdio FAIL: test_finalize_runnning_thread (test.test_threading.ThreadTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/koobs-freebsd10/3.x.koobs-freebsd10/build/Lib/test/test_threading.py", line 298, in test_finalize_runnning_thread self.assertEqual(rc, 42) AssertionError: -6 != 42 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 03:08:06 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Jul 2013 01:08:06 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1374109686.77.0.527644783147.issue18408@psf.upfronthosting.co.za> STINNER Victor added the comment: Another buildbot failure: [150/375/4] test_ctypes Assertion failed: __EX, file Python/ceval.c, line 4064 Fatal Python error: Aborted Current thread 0x00000001: File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/ctypes/test/test_random_things.py", line 44 in capture_stderr File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/ctypes/test/test_random_things.py", line 63 in test_FloatDivisionError ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 03:08:26 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Jul 2013 01:08:26 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1374109706.63.0.500884104749.issue18408@psf.upfronthosting.co.za> STINNER Victor added the comment: http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/310/steps/test/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 05:30:19 2013 From: report at bugs.python.org (Phil Webster) Date: Thu, 18 Jul 2013 03:30:19 +0000 Subject: [issue18489] IDLE Unit test for SearchEngine.py Message-ID: <1374118219.91.0.797974191988.issue18489@psf.upfronthosting.co.za> New submission from Phil Webster: This test uses the mock text widget to search forwards and backwards, with and without wrapping. It also tests for empty matches with the 'ok' flag set in search_text(). The patch relies on the mock text tag_add function implemented in #18226. ---------- components: IDLE files: test_searchengine.patch keywords: patch messages: 193266 nosy: JayKrish, Todd.Rovito, philwebster, terry.reedy priority: normal severity: normal status: open title: IDLE Unit test for SearchEngine.py type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30961/test_searchengine.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 05:40:07 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 Jul 2013 03:40:07 +0000 Subject: [issue18226] IDLE Unit test for FormatParagrah.py In-Reply-To: <1371335636.99.0.534048602964.issue18226@psf.upfronthosting.co.za> Message-ID: <1374118807.33.0.609904838642.issue18226@psf.upfronthosting.co.za> Terry J. Reedy added the comment: What I think still needs to be done. * FormatParagraph.py: As near as I can tell from the patch, the comments are correct except that one is needed for reformat_paragraph. I gather that the substantive code change allows reformatting of a comment block when it is properly selected (with the beginning at the beginning of the line). The proof will be in the testing. The middle of format_paragraph_event currently looks like if comment_header: else: newdata = reformat_paragraph(data, maxformatwidth) where reformat_paragraph is no-gui code. The comment formatting code should be pulled out into a no-gui reformat_comment function (with docstring) and replaced with in its current location with newdata = reformat_comment(data, maxformatwidth, comment_header). * test_formatparagraph.py: As I hinted before, the test file should begin with the simplest functions and those that do not require widgets (or mocks thereof). In the initial idle test issue #15392, Nick recommended "As much as possible, push logic testing down into the non-GUI tests." This is easiet when non-gui logic and widget manipulation are isolated in different function. When logic has already been pushed into non-gui functions, they should normally be tested first. Is_Get_Test (with methods for is_ and get_ functions) ReformatCommentTest ReformatParagraphTest would be straightforward text test cases. FindTest FormatEventTest (split into multiple test cases) require widgets. If the helper functions do not work, the functions that use them will not work. So FormatEventTest does not really test the method unless all the other tests pass. For this file, there is the additional factor that the latter test cases (or groups of test cases) require Text methods that do not currently exist and will not be added immediately. See my message on #18425, as well as below. So they should first be implemented using the tk Text widget and requires('gui'). An advantage of starting with real widgets is that it separates problems with the tested and test files from problems with the mocks. Remember that mocks are only needed for the buildbots, not our desktops with graphics screens. I have not yet looked at the individual tests, but please do a patch for only these two files. ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 06:40:26 2013 From: report at bugs.python.org (Roger Serwy) Date: Thu, 18 Jul 2013 04:40:26 +0000 Subject: [issue18226] IDLE Unit test for FormatParagrah.py In-Reply-To: <1371335636.99.0.534048602964.issue18226@psf.upfronthosting.co.za> Message-ID: <1374122426.07.0.235671277773.issue18226@psf.upfronthosting.co.za> Changes by Roger Serwy : ---------- nosy: +roger.serwy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 07:29:19 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 Jul 2013 05:29:19 +0000 Subject: [issue18226] IDLE Unit test for FormatParagrah.py In-Reply-To: <1371335636.99.0.534048602964.issue18226@psf.upfronthosting.co.za> Message-ID: <1374125359.6.0.375313057281.issue18226@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am dubious that the current code will work with tkinter. Marks name slice positions. Tags name 0 to many pairs of slice positions, with 'sel' predefined as corresponding to a mouse selection and limited to one pair. According to my tests, tag_add('sel.first', None) adds a *new* tag that has nothing to do with the 'sel' selection tag. Tag.first and tag.last, if not used themselves as tag names, refer to the first and second slice positions of the first pair. Idle only uses 'sel.first' and 'sel.last', which simplifies what we need in Text._decode. Experiments indicate that the two sel marks can be set with mark_set, in the sense that the internal structures are set even though the editor screen is not affected: >>> t.mark_set('sel.first', 1.0) >>> t.mark_set('sel.last', 1.3) >>> e. get_selection_indices() ('1.0', '1.3') 'Find in files' indicates that Idle never does this. Except for two instances, the only three marks set are 'insert', 'iomark', and 'my_anchor', which again simplifies mock Text. Once tests are running with Tk, we can comment out the tk use code (see test_rstrip.py) and add to the mocks what is either needed, or appears reusable for other tests, to make these tests pass again. For instance, we could subclass mock_tk.Test to add test-specific methods with either 'pass' or minimal specialized code needed. *mock_idle.Editor: To use the subclass of Test, one option would be a subclass of mock_idle.Editor that uses the subclass of Text. Editor.__init__. Or we could add a parameter text_class to init that defaults to mock_tk.Text, so we can inject a subclass thereof without subclassing Editor. The two undo_block lines are ok but irrelevant until we can use mock test. You might have mentioned that they are copied from EditorWindow. (The reason they work is that EditorWindow().text is not tkinter.Text() but a Python wrapper thereof.) The purpose of get_selection_indices is to report the endpoints of the user-selected slice of text. Normal users do so with the mouse. We will have to do so by directly setting the return values. If I did not want to be able to run the rests with tk, the following would be sufficient. _selection = ('', '') def get_selection_indices(self): return self._selection # with test code setting editor._selection = ('u.v', 'x.y') However, since that will not work with tk, which as near as I can tell, requires text.mark_set. mock_tk.Text: Any (non-trivial) changes to this and its tests should be a separate issue or at least a separate patch. In any case, the patch is wrong as it is. So are the ones for test_rstrip.py and test_text.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 08:58:02 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Jul 2013 06:58:02 +0000 Subject: [issue18488] sqlite: finalize() method of user function may be called with an exception set if a call to step() method failed In-Reply-To: <1374104392.89.0.672278845185.issue18488@psf.upfronthosting.co.za> Message-ID: <1374130682.54.0.719045380582.issue18488@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think both (PyException_SetContext), as in Python code. See textiowrapper_close() in Modules/_io/textio.c for example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 10:21:00 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Jul 2013 08:21:00 +0000 Subject: [issue18373] implement sys.get/setbyteswarningflag() In-Reply-To: <1373065124.82.0.249288626652.issue18373@psf.upfronthosting.co.za> Message-ID: <1374135660.44.0.941678151006.issue18373@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > if > (perhaps someone is calling your library and passing it the wrong type) > they would be guarded against this common error. OTOH, if your library is concerned about unwanted bytes objects, you can add an explicit type check. That said, I don't see any counter-argument against this proposal; only that I'm not sure it's very useful. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 10:22:11 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Jul 2013 08:22:11 +0000 Subject: [issue18373] implement sys.get/setbyteswarningflag() In-Reply-To: <1373065124.82.0.249288626652.issue18373@psf.upfronthosting.co.za> Message-ID: <1374135731.24.0.879917696914.issue18373@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't know why your patch is putting this in the thread state, though... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 11:42:42 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Jul 2013 09:42:42 +0000 Subject: [issue17911] Extracting tracebacks does too much work In-Reply-To: <1367789486.16.0.484658151136.issue17911@psf.upfronthosting.co.za> Message-ID: <1374140562.29.0.803197326438.issue17911@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think ExceptionSummary could be the visible API, instead of adding an indirection through a separate global function. Also, I don't think having the "exc_traceback" list of tuples is future-proof. What if we want to add some information to each traceback entry, or refactor it to take __loader__ into account? Instead, ExceptionSummary could expose the desired operations (e.g. iterate over traceback lines and the associated source code lines) without being constrained by some implementation details. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 11:44:13 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Jul 2013 09:44:13 +0000 Subject: [issue18451] Omit test files in devinabox coverage run In-Reply-To: <1373815169.93.0.694766443004.issue18451@psf.upfronthosting.co.za> Message-ID: <1374140653.84.0.663075736368.issue18451@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Is it common practice to ignore test files in coverage reports? It sounds like not omitting them can help you find out if e.g. some tests are not run by mistake. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 11:47:13 2013 From: report at bugs.python.org (Julien Phalip) Date: Thu, 18 Jul 2013 09:47:13 +0000 Subject: [issue16611] multiple problems with Cookie.py In-Reply-To: <1354654224.49.0.677339520856.issue16611@psf.upfronthosting.co.za> Message-ID: <1374140833.96.0.881692338775.issue16611@psf.upfronthosting.co.za> Julien Phalip added the comment: I'm attaching a suggested patch to fix the issues relating to serializing/deserializing the httponly and secure flags. The main idea is that for a flag to be active, it needs to both be set and have the True value. I think this is a much more correct and saner approach than the current implementation. As it's been discussed previously, currently the httponly and secure flag are systematically given the empty string as default value when instantiating a Morsel object. So one would infer that the empty string means that the flags are inactive. However, when deserializing a Morsel object, the empty string is used to indicate that a flag is active. Both behaviors contradict each other. While the suggested change is backwards-incompatible, it would break the code of developers relying on an inconsistent behavior. So perhaps this might be compelling enough to allow breaking backwards compatibility in this case. Let me know what you think. Thanks! ---------- keywords: +patch nosy: +julien.phalip versions: -Python 2.7 Added file: http://bugs.python.org/file30962/cookies-httponly-secure.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 11:50:00 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Jul 2013 09:50:00 +0000 Subject: [issue9177] ssl.read/write on closed socket raises AttributeError In-Reply-To: <1278409980.47.0.00506027612669.issue9177@psf.upfronthosting.co.za> Message-ID: <1374141000.71.0.177002749282.issue9177@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks for the patch, I will take a look. ---------- stage: needs patch -> patch review versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 12:00:21 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Jul 2013 10:00:21 +0000 Subject: [issue14518] Add bcrypt $2a$ to crypt.py In-Reply-To: <1333741347.69.0.597224923936.issue14518@psf.upfronthosting.co.za> Message-ID: <1374141621.63.0.564762405718.issue14518@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Apparently, Django supports of variant of that format: https://docs.djangoproject.com/en/1.4/topics/auth/#using-bcrypt-with-django ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 12:06:17 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Jul 2013 10:06:17 +0000 Subject: [issue18379] SSLSocket.getpeercert(): OCSP and CRL DP URIs In-Reply-To: <1373113820.69.0.993582296308.issue18379@psf.upfronthosting.co.za> Message-ID: <1374141977.21.0.54648469602.issue18379@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Do you have to put those certs in capath? Things would probably be simpler if you didn't have to trigger capath loading using an actual SSL connection. Also, please a versionadded tag in the doc entry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 12:17:26 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Jul 2013 10:17:26 +0000 Subject: [issue18381] unittest warnings counter In-Reply-To: <1373114259.86.0.274298241842.issue18381@psf.upfronthosting.co.za> Message-ID: <1374142646.06.0.331941253261.issue18381@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +rbcollins _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 12:24:16 2013 From: report at bugs.python.org (R. Jayakrishnan) Date: Thu, 18 Jul 2013 10:24:16 +0000 Subject: [issue18425] IDLE Unit test for IdleHistory.py In-Reply-To: <1373493838.59.0.876568806243.issue18425@psf.upfronthosting.co.za> Message-ID: <1374143056.81.0.770946198729.issue18425@psf.upfronthosting.co.za> R. Jayakrishnan added the comment: Thanks Terry for "we have the option of gui tests when mocking becomes too complicated" I put two separate classes IdleHistoryMockTest and IdleHistoryTKTest for mock and TK text usages and used TK Text to test IdleHistory.history_do function. This worked for me and hopefully IMHO the logic behind history_do is tested enough for now. ---------- Added file: http://bugs.python.org/file30963/test_idlehistory2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 12:29:06 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 18 Jul 2013 10:29:06 +0000 Subject: [issue17214] http.client.HTTPConnection.putrequest encode error In-Reply-To: <1361011959.8.0.221376430084.issue17214@psf.upfronthosting.co.za> Message-ID: <1374143346.35.0.358310371371.issue17214@psf.upfronthosting.co.za> Vajrasky Kok added the comment: The script for demonstrating bug can be simplified to: ----------------------------------------------------------------------- import urllib.request url = "http://www.libon.it/ricerca/7817940/3499155443/dettaglio/3102314/Onkel-Oswald-und-der-Sudan-K??fer/order/date_desc" req = urllib.request.Request(url) response = urllib.request.urlopen(req, timeout=30) the_page = response.read().decode('utf-8') print(the_page) ----------------------------------------------------------------------- Attached the simple patch to solve this problem. The question is whether we should fix this problem in urllib or not because strictly speaking the url should be ascii characters only. But if the Firefox can open this url, why not urllib? I will contemplate about this problem and if I (or other people) think that urllib should handle url containing non-ascii characters, then I will add additional unit test. Until then, people can use third party package, which is request package from http://docs.python-requests.org/en/latest/ ---------------------------------------------------------------- r = requests.get("http://www.libon.it/ricerca/7817940/3499155443/dettaglio/3102314/Onkel-Oswald-und-der-Sudan-K??fer/order/date_desc") print(r.text) ---------------------------------------------------------------- ---------- nosy: +vajrasky Added file: http://bugs.python.org/file30964/patch_to_urllib_handle_non_ascii_char_in_url.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 12:33:57 2013 From: report at bugs.python.org (abdulet) Date: Thu, 18 Jul 2013 10:33:57 +0000 Subject: [issue18490] Error embedding datetime in C++ Message-ID: <1374143636.97.0.424755315923.issue18490@psf.upfronthosting.co.za> New submission from abdulet: Hi all, I'm ebedding a python program into C++ ecap library. Everything works fine until I'v try to import sqlite3. When I try to import it I give the following exception: Traceback (most recent call last): ', ' File "/usr/local/squid/bin/putAdds.py", line 4, in import sqlite3 ', ' File "/usr/lib/python2.7/sqlite3/__init__.py", line 24, in from dbapi2 import * ', ' File "/usr/lib/python2.7/sqlite3/dbapi2.py", line 24, in import datetime ', 'ImportError: /usr/lib/python2.7/lib-dynload/datetime.i386-linux-gnu.so: undefined symbol: PyExc_SystemError So it seems that is a problem in datetime module. How can i solve that? Thanks and regards Abdul ---------- components: Extension Modules messages: 193280 nosy: abduelt priority: normal severity: normal status: open title: Error embedding datetime in C++ versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 13:13:51 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 18 Jul 2013 11:13:51 +0000 Subject: [issue18490] Error embedding datetime in C++ In-Reply-To: <1374143636.97.0.424755315923.issue18490@psf.upfronthosting.co.za> Message-ID: <1374146031.2.0.986783643619.issue18490@psf.upfronthosting.co.za> Christian Heimes added the comment: Hello Abdulet, the issue tracker isn't the best place to get help for your problem. May I suggest that you write a mail to the Python user list or one of the more specialized lists like the CAPI SIG and C++ SIG? http://mail.python.org/mailman/listinfo ---------- nosy: +christian.heimes resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 13:17:06 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 18 Jul 2013 11:17:06 +0000 Subject: [issue14518] Add bcrypt $2a$ to crypt.py In-Reply-To: <1333741347.69.0.597224923936.issue14518@psf.upfronthosting.co.za> Message-ID: <1374146226.71.0.861808777673.issue14518@psf.upfronthosting.co.za> Christian Heimes added the comment: The crypt module is just a thin wrapper around crypt(3). Some operating systems have support for $2a$ but apparently I don't have one at home. Django uses https://code.google.com/p/py-bcrypt/source/browse/#hg%2Fbcrypt http://linux.die.net/man/3/crypt ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 13:50:49 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 18 Jul 2013 11:50:49 +0000 Subject: [issue18379] SSLSocket.getpeercert(): OCSP and CRL DP URIs In-Reply-To: <1373113820.69.0.993582296308.issue18379@psf.upfronthosting.co.za> Message-ID: <1374148249.08.0.109161648801.issue18379@psf.upfronthosting.co.za> Christian Heimes added the comment: It's just one certificate. The hash format of OpenSSL has changed over the years so we have to duplicate all certificates. But I don't need the extra stuff. I figured out that the Nokia test certificate has all new fields. My initial patch has a versionchanged doc update. Did you have too much French wine again? *scnr* :) ---------- Added file: http://bugs.python.org/file30965/ssl_ocsp_crldp2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 13:52:38 2013 From: report at bugs.python.org (abdulet) Date: Thu, 18 Jul 2013 11:52:38 +0000 Subject: [issue18490] Error embedding datetime in C++ In-Reply-To: <1374146031.2.0.986783643619.issue18490@psf.upfronthosting.co.za> Message-ID: <7310dec33f4e4a9a8682371315c2bd3d@DB3PR03MB107.eurprd03.prod.outlook.com> abdulet added the comment: Ok it looks like a bug for me, sorry for the inconveniences Thanks and regards Abdul TECNOCOM Abdul Pallar?s Calvi T?cnico Especialista Sistemas gestionados Enten?a, 335 Barcelona 08029 Tel. Fijo: (+34) 934953167 Tel. M?vil / Fax: (+34) 647970296 / (+34) email: abdul.pallares at tecnocom.es http://www.tecnocom.es Por favor, antes de imprimir este mensaje, aseg?rate de que es necesario. Ayudemos a cuidar el medio ambiente Este mensaje puede contener informaci?n confidencial o privilegiada. Si le ha llegado por error, rogamos no haga uso del mismo, avise al remitente y b?rrelo. Consulte aviso legal This message may contain confidential or privileged information. If it has been sent to you in error, please do not use it, notify the sender of the error and delete it. _______________________________________ From report at bugs.python.org Thu Jul 18 14:55:51 2013 From: report at bugs.python.org (Daniel Holth) Date: Thu, 18 Jul 2013 12:55:51 +0000 Subject: [issue18373] implement sys.get/setbyteswarningflag() In-Reply-To: <1374135731.24.0.879917696914.issue18373@psf.upfronthosting.co.za> Message-ID: <1374152142.23990.140661257123865.1A91DBE5@webmail.messagingengine.com> Daniel Holth added the comment: On Thu, Jul 18, 2013, at 04:22 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > I don't know why your patch is putting this in the thread state, > though... If you have multiple threads one thread might want exceptions when str(bytes), and the other might not. str(bytes) has been an insidious problem for me. No exceptions, seemingly working code, and b'' in serialized data. I am motivated to turn it off. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 15:05:08 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Jul 2013 13:05:08 +0000 Subject: [issue18373] implement sys.get/setbyteswarningflag() In-Reply-To: <1374152142.23990.140661257123865.1A91DBE5@webmail.messagingengine.com> Message-ID: <1130292131.4181274.1374152701976.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > > I don't know why your patch is putting this in the thread state, > > though... > > If you have multiple threads one thread might want exceptions when > str(bytes), and the other might not. That sounds too much of a special case to me. You can still catch BytesWarnings inside a context manager or something. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 15:05:15 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 18 Jul 2013 13:05:15 +0000 Subject: [issue18468] re.group() should never return a bytearray In-Reply-To: <1373931432.85.0.594082146564.issue18468@psf.upfronthosting.co.za> Message-ID: <1374152715.43.0.84616492973.issue18468@psf.upfronthosting.co.za> Ezio Melotti added the comment: I'm not sure it's worth changing it. As I see it, match/search are supposed to work with str or bytes and they return str/bytes accordingly. The fact that they work with other bytes-like objects seems to me an undocumented implementation detail people should not rely on. If they are passing bytes-like object, both the current behavior (return same type) or the new proposed behavior (always return bytes) seem reasonable expectations. IIUC the advantage of changing the behavior is that it won't keep the target string alive anymore, but on the other hand is not backward compatible and makes things more difficult for people who want the same type back. If people always want bytes back regardless of the input, they can convert the input or output to bytes explicitly. ---------- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 15:23:37 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 18 Jul 2013 13:23:37 +0000 Subject: [issue18451] Omit test files in devinabox coverage run In-Reply-To: <1373815169.93.0.694766443004.issue18451@psf.upfronthosting.co.za> Message-ID: <1374153817.27.0.517238061077.issue18451@psf.upfronthosting.co.za> Brett Cannon added the comment: The key problem with keeping them is that beginners might mistake that a test didn't run simply because some resource wasn't available when the tests were run (e.g. I forget to run the coverage report so I do it on an airport to the conference and have no Internet). Plus if you find this out you need to know hours in advance as a complete coverage run takes quite a while. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 15:32:54 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Jul 2013 13:32:54 +0000 Subject: [issue18451] Omit test files in devinabox coverage run In-Reply-To: <1374153817.27.0.517238061077.issue18451@psf.upfronthosting.co.za> Message-ID: <488533128.4243818.1374154368519.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > The key problem with keeping them is that beginners might mistake > that a test didn't run simply because some resource wasn't available > when the tests were run (e.g. I forget to run the coverage report so > I do it on an airport to the conference and have no Internet). Plus > if you find this out you need to know hours in advance as a complete > coverage run takes quite a while. I don't understand what the problem is. The coverage shows you precisely what was run and what wasn't. How is it a bug? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 15:33:39 2013 From: report at bugs.python.org (Matthew Barnett) Date: Thu, 18 Jul 2013 13:33:39 +0000 Subject: [issue18468] re.group() should never return a bytearray In-Reply-To: <1373931432.85.0.594082146564.issue18468@psf.upfronthosting.co.za> Message-ID: <1374154419.48.0.202768734055.issue18468@psf.upfronthosting.co.za> Matthew Barnett added the comment: There's also the fact that the match object keeps a reference to the target string anyway: >>> import re >>> t = memoryview(b"a") >>> t >>> m = re.match(b"a", t) >>> m.string On that subject, buried in the source code (_sre.c) is the comment: """ /* FIXME: implement setattr("string", None) as a special case (to detach the associated string, if any */ """ In the regex module I added a method "detach_string" to perform that function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 15:34:57 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 18 Jul 2013 13:34:57 +0000 Subject: [issue18373] implement sys.get/setbyteswarningflag() In-Reply-To: <1373065124.82.0.249288626652.issue18373@psf.upfronthosting.co.za> Message-ID: <1374154497.59.0.955684725574.issue18373@psf.upfronthosting.co.za> R. David Murray added the comment: I presume you mean you are motivated to turn it on (to catch the bugs). I still think that also fixing the bugs in the other places str(bytes) is used would be better. Are they occurring in third party libraries? How often do you run into it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 15:35:10 2013 From: report at bugs.python.org (=?utf-8?q?Bj=C3=B6rn_Sandberg_Lynch?=) Date: Thu, 18 Jul 2013 13:35:10 +0000 Subject: [issue17911] Extracting tracebacks does too much work In-Reply-To: <1367789486.16.0.484658151136.issue17911@psf.upfronthosting.co.za> Message-ID: <1374154510.52.0.396789001745.issue17911@psf.upfronthosting.co.za> Bj?rn Sandberg Lynch added the comment: I was trying to stay with the established pattern of the existing methods. There are two unrelated issues to solve here - deferring linecache access, and the extract_exception functionality. When it comes to deferral, we could wrap each line in a different class than tuple, but this constitutes a public API change (and this is a *very* widely used library). Even changing to a namedtuple would cause a lot of grief, since we'd break lots of doctests, and subclassing tuple is a lot of effort for little benefit. If we only do it for the deferred usage, it would "only" be inconsistent. I suppose we could have a completely separate way of doing things for ExceptionSummary, but again, inconsistent, and I think if one extract_xxx method provides the functionality, users would expect it to be available in the others. For ExceptionSummary, the same summary instance is used more than once if you have a cause set, so object creation had to be separated from the graph population. Either this is done in a constructor function or we would need some obscure tricks with the class kwargs. This way, there's a separation of concerns - the class wraps *one* exception, and the function creates a bunch and links them together as needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 15:44:45 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 18 Jul 2013 13:44:45 +0000 Subject: [issue18468] re.group() should never return a bytearray In-Reply-To: <1373931432.85.0.594082146564.issue18468@psf.upfronthosting.co.za> Message-ID: <1374155085.69.0.61251513529.issue18468@psf.upfronthosting.co.za> Ezio Melotti added the comment: > match/search are supposed to work with str or bytes and > they return str/bytes accordingly. s/they return/calling m.group() returns/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 15:45:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Jul 2013 13:45:23 +0000 Subject: [issue17911] Extracting tracebacks does too much work In-Reply-To: <1374154510.52.0.396789001745.issue17911@psf.upfronthosting.co.za> Message-ID: <594652886.4271641.1374155117213.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > When it comes to deferral, we could wrap each line in a different > class than tuple, but this constitutes a public API change (and this > is a *very* widely used library). Even changing to a namedtuple > would cause a lot of grief, since we'd break lots of doctests, and > subclassing tuple is a lot of effort for little benefit. If we only > do it for the deferred usage, it would "only" be inconsistent. I > suppose we could have a completely separate way of doing things for > ExceptionSummary, but again, inconsistent, and I think if one > extract_xxx method provides the functionality, users would expect it > to be available in the others. YMMV, but I think we should go for inconsistency here. The other APIs in the traceback module are low-level and clearly limited by the type of objects they return. This feature request is a good opportunity to design something a little more future-proof. I'd love to know what other developers/contributors think here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 15:53:22 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 18 Jul 2013 13:53:22 +0000 Subject: [issue18451] Omit test files in devinabox coverage run In-Reply-To: <1373815169.93.0.694766443004.issue18451@psf.upfronthosting.co.za> Message-ID: <1374155602.04.0.181221997447.issue18451@psf.upfronthosting.co.za> Brett Cannon added the comment: The problem is confusing new contributors. "Why wasn't this test run?" "Because you're not on OS X." "Why wasn't this run?" "I didn't have internet at the time." It's noise that's unnecessary. People should be focusing on the coverage of the modules in the stdlib and not the tests themselves. Plus the process takes so darn long already I don't think it's worth the time to waste on covering the tests as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 16:12:31 2013 From: report at bugs.python.org (John Dennis) Date: Thu, 18 Jul 2013 14:12:31 +0000 Subject: [issue16611] multiple problems with Cookie.py In-Reply-To: <1354654224.49.0.677339520856.issue16611@psf.upfronthosting.co.za> Message-ID: <1374156751.32.0.0225823908923.issue16611@psf.upfronthosting.co.za> John Dennis added the comment: I think your basic approach is fine and it's O.K. to break backwards compatibility. I'm not sure anyone was using the httponly and secure flags in the past because it was so broken, the logic was completely contradictory, so backwards compatibility should not trump fixing obviously broken logic. I didn't review your patch carefully, just a really quick glance. The one thing that did pop out was compiling the static regexp every time the function is called. Why not make it a module or class object and compile once at load time? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 16:14:17 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Jul 2013 14:14:17 +0000 Subject: [issue18451] Omit test files in devinabox coverage run In-Reply-To: <1374155602.04.0.181221997447.issue18451@psf.upfronthosting.co.za> Message-ID: <58288876.4340385.1374156851490.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > The problem is confusing new contributors. > > "Why wasn't this test run?" > "Because you're not on OS X." > "Why wasn't this run?" > "I didn't have internet at the time." Well, you're trying to fix a symptom, rather than the underlying cause. And the concept of skipped tests is quite basic, it shouldn't be very hard to grasp. > It's noise that's unnecessary. People should be focusing on the > coverage of the modules in the stdlib and not the tests themselves. > Plus the process takes so darn long already I don't think it's worth > the time to waste on covering the tests as well. Whether or not the report includes the test files shouldn't impact the test runtime. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 16:46:05 2013 From: report at bugs.python.org (Paul Moore) Date: Thu, 18 Jul 2013 14:46:05 +0000 Subject: [issue18491] Add "exe wrapper" functionality to Windows launcher Message-ID: <1374158765.31.0.00467890617544.issue18491@psf.upfronthosting.co.za> New submission from Paul Moore: Adds "exe wrapper" functionality to the Windows launcher. This is a preliminary patch, for comments - the code is there and works, but I need to add documentation (and maybe tests - are there any existing tests for the launcher?) Also to be considered: should the launcher be bundled somewhere accessible to Python code (locating where the launcher has been installed is a non-trivial task) and supplementing that, should there be some sort of wrapper creation API in the standard library. The script wrapper functionality in distlib may be a good model for this, but may be too complex. I'd rather see this patch accepted without support code than see it deferred due to concerns about the quality/design of additional support code. ---------- assignee: vinay.sajip components: Windows messages: 193300 nosy: pmoore, vinay.sajip priority: normal severity: normal stage: patch review status: open title: Add "exe wrapper" functionality to Windows launcher type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 16:46:18 2013 From: report at bugs.python.org (Paul Moore) Date: Thu, 18 Jul 2013 14:46:18 +0000 Subject: [issue18491] Add "exe wrapper" functionality to Windows launcher In-Reply-To: <1374158765.31.0.00467890617544.issue18491@psf.upfronthosting.co.za> Message-ID: <1374158778.92.0.0577271577796.issue18491@psf.upfronthosting.co.za> Changes by Paul Moore : ---------- keywords: +patch Added file: http://bugs.python.org/file30966/launcher_wrapper.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 16:46:41 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 18 Jul 2013 14:46:41 +0000 Subject: [issue17933] test_ftp failure / ftplib error formatting issue In-Reply-To: <1367974224.67.0.224732033427.issue17933@psf.upfronthosting.co.za> Message-ID: <1374158801.52.0.215665925123.issue17933@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 16:47:22 2013 From: report at bugs.python.org (Paul Moore) Date: Thu, 18 Jul 2013 14:47:22 +0000 Subject: [issue18491] Add "exe wrapper" functionality to Windows launcher In-Reply-To: <1374158765.31.0.00467890617544.issue18491@psf.upfronthosting.co.za> Message-ID: <1374158842.11.0.00716713959654.issue18491@psf.upfronthosting.co.za> Changes by Paul Moore : ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 16:55:10 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 18 Jul 2013 14:55:10 +0000 Subject: [issue17933] test_ftp failure / ftplib error formatting issue In-Reply-To: <1367974224.67.0.224732033427.issue17933@psf.upfronthosting.co.za> Message-ID: <1374159310.86.0.25671758381.issue17933@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I cannot reproduce the issue on Ubuntu. As for the second exception I think it's safe to just do: - raise URLError('ftp error: %d' % reason) from reason + raise URLError('ftp error: %s' % reason) from reason (will commit that later) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 17:02:17 2013 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 18 Jul 2013 15:02:17 +0000 Subject: [issue18468] re.group() should never return a bytearray In-Reply-To: <1374152715.43.0.84616492973.issue18468@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: > Ezio Melotti added the comment: [...] > IIUC the advantage of changing the behavior is that it won't keep the target string alive anymore, but on the other hand is not backward compatible and makes things more difficult for people who want the same type back. Everyone seems to be afraid of backward compatibility here. I will take full responsibility, so let's just discuss what's the better API, regardless of what we did (and in 99% of the cases it's the same anyway). "People who want the same type back" -- there is no evidence that anyone wants this. "People who want a bytes object" -- this is definitely a valid use case. > If people always want bytes back regardless of the input, they can convert the input or output to bytes explicitly. But this requires an extra copy if the input is a bytearray. I suspect this might be the most commonly used non-bytes non-str target in Python 3 programs, and we are striving to support bytearray as input in as many places as possible where plain bytes is accepted. But generally getting bytearray as output requires a different API, e.g. recv_into(). I think a very reasonable general rule is that for functions that take either str or bytes and adjust their output to the input type, if their input is one of the bytes alternatives (bytearray, memoryview, array.array('b'), maybe others) the output is always a bytes object. The reason is that while the buffer API makes it easy to access the underlying bytes from C, it doesn't give you a way to create a new object of the same type (except by slicing, which doesn't always apply, e.g. os.listdir()). So for creating return values that match a memoryview (or bytearray, etc.) input, the only reasonable thing is to return a bytes object. (FWIW os.listdir() violates this too -- os.listdir(b'.') returns a list of bytes objects, while os.listdir(bytearray(b'.')) returns a list of str objects. This seems caused by revesed logic -- it probably tests "if the type is bytes" rather than "if the type isn't str" for the output type, even though it does the right thing with the input...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 17:02:25 2013 From: report at bugs.python.org (Rock Lee) Date: Thu, 18 Jul 2013 15:02:25 +0000 Subject: [issue17933] test_ftp failure / ftplib error formatting issue In-Reply-To: <1367974224.67.0.224732033427.issue17933@psf.upfronthosting.co.za> Message-ID: <1374159745.38.0.937911160275.issue17933@psf.upfronthosting.co.za> Rock Lee added the comment: Bug in urllib/request.py. format string formatted error type variable 2373 except ftplib.error_perm as reason: 2374 raise URLError('ftp error: %d' % reason) from reason variable reason here is a instance of class ftplib.error_perm. We need to passed in a integer object. Patch supplied. ---------- keywords: +patch nosy: +rock Added file: http://bugs.python.org/file30967/urllib-request-format-type-bug.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 17:03:41 2013 From: report at bugs.python.org (Rock Lee) Date: Thu, 18 Jul 2013 15:03:41 +0000 Subject: [issue17933] test_ftp failure / ftplib error formatting issue In-Reply-To: <1367974224.67.0.224732033427.issue17933@psf.upfronthosting.co.za> Message-ID: <1374159821.67.0.45763788529.issue17933@psf.upfronthosting.co.za> Rock Lee added the comment: Fixed like this: raise URLError('ftp error: %d' % int(str(reason)[:3])) from reason I think this is the original author's intention. Actually, need to fix two places in urllib/request.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 17:07:40 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 18 Jul 2013 15:07:40 +0000 Subject: [issue17933] test_ftp failure / ftplib error formatting issue In-Reply-To: <1367974224.67.0.224732033427.issue17933@psf.upfronthosting.co.za> Message-ID: <1374160060.89.0.791038906444.issue17933@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: That's not safe as a misbehaving FTP server might not send a response code at all (highly unlikely but still...). Furthermore having the complete server response (response code + accompaining message) is a lot more helpful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 17:10:43 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 18 Jul 2013 15:10:43 +0000 Subject: [issue17214] http.client.HTTPConnection.putrequest encode error In-Reply-To: <1361011959.8.0.221376430084.issue17214@psf.upfronthosting.co.za> Message-ID: <1374160243.29.0.560739136632.issue17214@psf.upfronthosting.co.za> Vajrasky Kok added the comment: I have no problem if this ticket is classified as "won't fix". I am writing this for the confused souls who want to use urllib to access url containing non-ascii characters: import urllib.request from urllib.parse import quote url = "http://www.libon.it/ricerca/7817940/3499155443/dettaglio/3102314/Onkel-Oswald-und-der-Sudan-K??fer/order/date_desc" req = urllib.request.Request(url) try: req.selector.encode('ascii') except UnicodeEncodeError: req.selector = quote(req.selector) response = urllib.request.urlopen(req, timeout=30) the_page = response.read().decode('utf-8') print(the_page) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 17:13:13 2013 From: report at bugs.python.org (Rock Lee) Date: Thu, 18 Jul 2013 15:13:13 +0000 Subject: [issue17933] test_ftp failure / ftplib error formatting issue In-Reply-To: <1367974224.67.0.224732033427.issue17933@psf.upfronthosting.co.za> Message-ID: <1374160393.84.0.56168648763.issue17933@psf.upfronthosting.co.za> Rock Lee added the comment: yes, the malformed server could do evil things. If we need to cover this situation, we need to some extra fixes in this file. Maybe the exception message look like this is the better one ? ftplib.error_perm: 550 Failed to change directory ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 17:21:52 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 18 Jul 2013 15:21:52 +0000 Subject: [issue17933] test_ftp failure / ftplib error formatting issue In-Reply-To: <1367974224.67.0.224732033427.issue17933@psf.upfronthosting.co.za> Message-ID: <1374160912.11.0.817289666311.issue17933@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I think "raise URLError('ftp error: %s' % reason) from reason" is just fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 17:34:04 2013 From: report at bugs.python.org (Rock Lee) Date: Thu, 18 Jul 2013 15:34:04 +0000 Subject: [issue17933] test_ftp failure / ftplib error formatting issue In-Reply-To: <1367974224.67.0.224732033427.issue17933@psf.upfronthosting.co.za> Message-ID: <1374161644.96.0.051636785517.issue17933@psf.upfronthosting.co.za> Rock Lee added the comment: Yes, the simplest fix is just replace '%d' to '%s'. Line 2362 and 2374 all need to modify. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 17:38:20 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 18 Jul 2013 15:38:20 +0000 Subject: [issue18492] Add test.support.regrtest_run flag, simplify support.requires Message-ID: <1374161900.43.0.881425486921.issue18492@psf.upfronthosting.co.za> New submission from Zachary Ware: Here's a patch to implement the idea I posted in issue18258, msg193242. The patch also removes usage of "support.use_resources = ['']" from the test package since it is no longer needed. (No test_main -> unittest.main conversions are done in this patch; the modules changed that still us. test_main are either covered by another issue or are more complex than a simple remove-and-replace conversion, and so I didn't want to lump them into this patch) ---------- components: Tests files: regrtest_run.diff keywords: patch messages: 193310 nosy: ezio.melotti, r.david.murray, serhiy.storchaka, zach.ware priority: normal severity: normal status: open title: Add test.support.regrtest_run flag, simplify support.requires type: enhancement versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30968/regrtest_run.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 17:41:59 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 18 Jul 2013 15:41:59 +0000 Subject: [issue18258] Fix test discovery for test_codecmaps*.py In-Reply-To: <1371590163.56.0.716538742533.issue18258@psf.upfronthosting.co.za> Message-ID: <1374162119.37.0.390504630014.issue18258@psf.upfronthosting.co.za> Zachary Ware added the comment: Done, issue18492. I'll submit and updated patch here when (if :)) that one is applied. I'm also looking into adding resource handling to unittest itself and it is going pretty well; I hope to have a patch ready for review for that soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 18:41:24 2013 From: report at bugs.python.org (Lars Ivarsson) Date: Thu, 18 Jul 2013 16:41:24 +0000 Subject: [issue17214] http.client.HTTPConnection.putrequest encode error In-Reply-To: <1361011959.8.0.221376430084.issue17214@psf.upfronthosting.co.za> Message-ID: <1374165684.23.0.762099268606.issue17214@psf.upfronthosting.co.za> Lars Ivarsson added the comment: The problem isn't the original requested url, as it is legit. The problem appears after the 302 redirect when a new (malformed) url is received from the server. There need to be some kind of check of the validity of that second url. And, preferably, an URLError returned if something is wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 19:47:37 2013 From: report at bugs.python.org (Claudio Freire) Date: Thu, 18 Jul 2013 17:47:37 +0000 Subject: [issue18493] make profile-opt fails with pre-existing python2.7 in path Message-ID: <1374169657.94.0.400718605789.issue18493@psf.upfronthosting.co.za> New submission from Claudio Freire: When building with --enable-shared in an environment that already has a python2.7 (and I'd expect the same to happen to 3.x), make profile-opt fails because it attempts to load the existing libpython instead of the just-built one. run_profile_task should use RUNSHARED. In fact, it builds fine if $(RUNSHARED) is added to that line. Patch inline below, for 2.7.5: --- Makefile.pre.in.bk 2013-07-18 17:46:28.671773378 +0000 +++ Makefile.pre.in 2013-07-18 17:46:47.759806100 +0000 @@ -420,7 +420,7 @@ run_profile_task: : # FIXME: can't run for a cross build - ./$(BUILDPYTHON) $(PROFILE_TASK) + $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) build_all_use_profile: $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use" ---------- components: Build messages: 193313 nosy: Claudio.Freire priority: normal severity: normal status: open title: make profile-opt fails with pre-existing python2.7 in path versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:03:52 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Jul 2013 19:03:52 +0000 Subject: [issue18492] Add test.support.regrtest_run flag, simplify support.requires In-Reply-To: <1374161900.43.0.881425486921.issue18492@psf.upfronthosting.co.za> Message-ID: <1374174232.53.0.409475653143.issue18492@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't think we should accept anything if not running under regrtest, We can unintentionally run a testfile in which some tests consume a lot of resources. Also we need in skipping this tests for the test testing. I think it will be better just add a support of the -u option to discovery command line interface. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:10:54 2013 From: report at bugs.python.org (Wolf Ihlenfeldt) Date: Thu, 18 Jul 2013 19:10:54 +0000 Subject: [issue18494] PyType_GenericSet/GetDict functions misnamed in docs? Message-ID: <1374174654.87.0.00339141994483.issue18494@psf.upfronthosting.co.za> New submission from Wolf Ihlenfeldt: Are the names of functions PyType_GenericSetDict and -GetDict correctly documented (for 3.3.2), or should they be documented as PyObject_GenericGet/SetDict instead? The PyType-prefixed names are out of place in the section, and functions of these names not in the source. The PyObject_-variants are present. ---------- assignee: docs at python components: Documentation messages: 193315 nosy: Wolf.Ihlenfeldt, docs at python priority: normal severity: normal status: open title: PyType_GenericSet/GetDict functions misnamed in docs? versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:26:35 2013 From: report at bugs.python.org (Jeremy Kloth) Date: Thu, 18 Jul 2013 19:26:35 +0000 Subject: [issue18491] Add "exe wrapper" functionality to Windows launcher In-Reply-To: <1374158765.31.0.00467890617544.issue18491@psf.upfronthosting.co.za> Message-ID: <1374175595.23.0.742375603358.issue18491@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:49:24 2013 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 18 Jul 2013 19:49:24 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1374176964.6.0.957983387168.issue18408@psf.upfronthosting.co.za> Stefan Behnel added the comment: This test from lxml's ElementTree test suite crashes for me now when run against (c)ElementTree: def test_parser_target_error_in_start(self): assertEqual = self.assertEqual events = [] class Target(object): def start(self, tag, attrib): events.append("start") assertEqual("TAG", tag) raise ValueError("TEST") def end(self, tag): events.append("end") assertEqual("TAG", tag) def close(self): return "DONE" parser = ET.XMLParser(target=Target()) try: parser.feed("") except ValueError: self.assertTrue('TEST' in str(sys.exc_info()[1])) else: self.assertTrue(False) self.assertTrue("start" in events) Python/ceval.c:1210: PyEval_EvalFrameEx: Assertion `!PyErr_Occurred()' failed. (note: this is not the exact code, I removed a couple of conditions that are not used by ET) ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:59:55 2013 From: report at bugs.python.org (Julien Phalip) Date: Thu, 18 Jul 2013 19:59:55 +0000 Subject: [issue16611] multiple problems with Cookie.py In-Reply-To: <1354654224.49.0.677339520856.issue16611@psf.upfronthosting.co.za> Message-ID: <1374177595.21.0.0681078369602.issue16611@psf.upfronthosting.co.za> Julien Phalip added the comment: Thank you for the feedback. I've updated the patch to compile the regular expression at load time. ---------- Added file: http://bugs.python.org/file30969/cookies-httponly-secure-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 22:10:20 2013 From: report at bugs.python.org (Roumen Petrov) Date: Thu, 18 Jul 2013 20:10:20 +0000 Subject: [issue18495] mingw: ignore main program for frozen scripts Message-ID: <1374178220.38.0.0504340051034.issue18495@psf.upfronthosting.co.za> New submission from Roumen Petrov: Split of issue3871 - part for build of core modules. ---------- components: Build files: 0007-MINGW-ignore-main-program-for-frozen-scripts.patch keywords: patch messages: 193318 nosy: rpetrov priority: normal severity: normal status: open title: mingw: ignore main program for frozen scripts type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file30970/0007-MINGW-ignore-main-program-for-frozen-scripts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 22:11:57 2013 From: report at bugs.python.org (Roumen Petrov) Date: Thu, 18 Jul 2013 20:11:57 +0000 Subject: [issue18496] mingw: setup exclude termios module Message-ID: <1374178317.83.0.753467697868.issue18496@psf.upfronthosting.co.za> New submission from Roumen Petrov: Split of issue3871 - part for build of core modules. ---------- components: Build files: 0008-MINGW-setup-exclude-termios-module.patch keywords: patch messages: 193319 nosy: rpetrov priority: normal severity: normal status: open title: mingw: setup exclude termios module type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file30971/0008-MINGW-setup-exclude-termios-module.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 22:14:20 2013 From: report at bugs.python.org (Roumen Petrov) Date: Thu, 18 Jul 2013 20:14:20 +0000 Subject: [issue18497] mingw: setup _multiprocessing module Message-ID: <1374178460.6.0.189052379472.issue18497@psf.upfronthosting.co.za> New submission from Roumen Petrov: Split of issue3871 - build core modules. ---------- components: Build files: 0009-MINGW-setup-_multiprocessing-module.patch keywords: patch messages: 193320 nosy: rpetrov priority: normal severity: normal status: open title: mingw: setup _multiprocessing module type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file30972/0009-MINGW-setup-_multiprocessing-module.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 22:16:26 2013 From: report at bugs.python.org (Roumen Petrov) Date: Thu, 18 Jul 2013 20:16:26 +0000 Subject: [issue18498] mingw: setup select module Message-ID: <1374178586.07.0.280642289771.issue18498@psf.upfronthosting.co.za> New submission from Roumen Petrov: Split of issue3871 - build core modules. ---------- components: Build files: 0010-MINGW-setup-select-module.patch keywords: patch messages: 193321 nosy: rpetrov priority: normal severity: normal status: open title: mingw: setup select module type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file30973/0010-MINGW-setup-select-module.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 22:27:39 2013 From: report at bugs.python.org (Roumen Petrov) Date: Thu, 18 Jul 2013 20:27:39 +0000 Subject: [issue18499] mingw: setup _ctypes module with system libffi Message-ID: <1374179259.91.0.757433514975.issue18499@psf.upfronthosting.co.za> New submission from Roumen Petrov: enhancement of issue3871 ( build core modules ). Part of issue 3871 is python libffi source for gnu assembler on 32 windows platform. The functionality is same as inlined assembled for MSC. Note python specific libffi customization is not in mainstream libffi source. This patch adds build with system libffi. You you like to use customized libffi then please extract from previous 'all in one' patch. ---------- components: Build files: 0011-MINGW-setup-_ctypes-module-with-system-libffi.patch keywords: patch messages: 193322 nosy: rpetrov priority: normal severity: normal status: open title: mingw: setup _ctypes module with system libffi type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file30974/0011-MINGW-setup-_ctypes-module-with-system-libffi.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 22:34:29 2013 From: report at bugs.python.org (Roumen Petrov) Date: Thu, 18 Jul 2013 20:34:29 +0000 Subject: [issue18500] mingw: defect winsock2 and setup _socket module Message-ID: <1374179669.42.0.252427857289.issue18500@psf.upfronthosting.co.za> New submission from Roumen Petrov: Split of issue3871 (build core modules) - improved winsock detection. Requires NT 5.1+ (wxp). Note if you like python winsock for w2k then please extract from old 'all in one' patch. ---------- components: Build files: 0012-MINGW-defect-winsock2-and-setup-_socket-module.patch keywords: patch messages: 193323 nosy: rpetrov priority: normal severity: normal status: open title: mingw: defect winsock2 and setup _socket module type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file30975/0012-MINGW-defect-winsock2-and-setup-_socket-module.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 22:46:48 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 Jul 2013 20:46:48 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3bx6pJ17lfz7Ljd@mail.python.org> Roundup Robot added the comment: New changeset 6ec0e9347dd4 by Victor Stinner in branch 'default': Issue #18408: Fix _elementtree.c, don't call Python function from an expat http://hg.python.org/cpython/rev/6ec0e9347dd4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 23:01:01 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Jul 2013 21:01:01 +0000 Subject: [issue18501] _elementtree.c calls Python callbacks while a Python exception is set Message-ID: <1374181261.54.0.8148762893.issue18501@psf.upfronthosting.co.za> New submission from STINNER Victor: The ElementTree module allows to write a XML parser using Python callbacks. The module relies on the expat library which is implemented in C. Expat calls these Python callbacks, but ElementTree does not check if a Python exception was raised or not. Example 1: ------------------- import unittest from xml.etree import ElementTree as ET class Target(object): def start(self, tag, attrib): print("start") raise ValueError("raise start") def end(self, tag): print("end") raise ValueError("raise end") def close(self): print("close") raise ValueError("raise close") parser = ET.XMLParser(target=Target()) parser.feed("") ------------------- Output with Python 3.3: ------------------- start startendendTraceback (most recent call last): File "x.py", line 18, in parser.feed("") File "x.py", line 10, in end print("end") File "x.py", line 10, in end print("end") File "x.py", line 6, in start print("start") File "x.py", line 7, in start raise ValueError("raise start") ValueError: raise start ------------------- start() was called twice, as end() method, even if the first start() method raised an exception. The traceback is strange: it looks like end() was called by start(), which is wrong. Example 2: ------------------- import unittest from xml.etree import ElementTree as ET class Target(object): def start(self, tag, attrib): raise ValueError("raise start") def end(self, tag): raise ValueError("raise end") def close(self): raise ValueError("raise close") parser = ET.XMLParser(target=Target()) parser.feed("") ------------------- Output with Python 3.3: ------------------- Traceback (most recent call last): File "x.py", line 15, in parser.feed("") File "x.py", line 9, in end raise ValueError("raise end") ValueError: raise end ------------------- end() was called even if start() already failed. The exception which was set by start has been replaced by end() exception. In my opinion, it's not a good thing to call PyEval_EvalFrameEx() and similar functions when a Python exception is set, because it behaves badly (ex: print("end") in Example 1 raises an exception... which is wrong, the traceback is also corrupted) and may replaces the old exception with a new exception (ex: "end" replaces "started"). ---------- messages: 193325 nosy: haypo priority: normal severity: normal status: open title: _elementtree.c calls Python callbacks while a Python exception is set versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 23:04:47 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Jul 2013 21:04:47 +0000 Subject: [issue18501] _elementtree.c calls Python callbacks while a Python exception is set In-Reply-To: <1374181261.54.0.8148762893.issue18501@psf.upfronthosting.co.za> Message-ID: <1374181487.7.0.883080946196.issue18501@psf.upfronthosting.co.za> STINNER Victor added the comment: For the issue #18408, I added assertions in PyEval_EvalFrameEx() and similar functions to exit with an assertion error in debug mode if these functions are called with an exception set: New changeset 48a869a39e2d by Victor Stinner in branch 'default': Issue #18408: PyEval_EvalFrameEx() and PyEval_CallObjectWithKeywords() now fail http://hg.python.org/cpython/rev/48a869a39e2d New changeset 5bd9db528aed by Victor Stinner in branch 'default': Issue #18408: PyObject_Str(), PyObject_Repr() and type_call() now fail with an http://hg.python.org/cpython/rev/5bd9db528aed lxml test suite failed with an C assertion error because of these changes. I fixed the issue with the following change: New changeset 6ec0e9347dd4 by Victor Stinner in branch 'default': Issue #18408: Fix _elementtree.c, don't call Python function from an expat http://hg.python.org/cpython/rev/6ec0e9347dd4 Instead of having to check if an exception is set in each Python callback, it would be better to "stop" the XML parser. Modules/pyexpat.c calls "flag_error(self); XML_SetCharacterDataHandler(self->itself, noop_character_data_handler);" on error: /* This handler is used when an error has been detected, in the hope that actual parsing can be terminated early. This will only help if an external entity reference is encountered. */ static int error_external_entity_ref_handler(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId) { return 0; } /* Dummy character data handler used when an error (exception) has been detected, and the actual parsing can be terminated early. This is needed since character data handler can't be safely removed from within the character data handler, but can be replaced. It is used only from the character data handler trampoline, and must be used right after `flag_error()` is called. */ static void noop_character_data_handler(void *userData, const XML_Char *data, int len) { /* Do nothing. */ } static void flag_error(xmlparseobject *self) { clear_handlers(self, 0); XML_SetExternalEntityRefHandler(self->itself, error_external_entity_ref_handler); } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 23:05:09 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 18 Jul 2013 21:05:09 +0000 Subject: [issue18501] _elementtree.c calls Python callbacks while a Python exception is set In-Reply-To: <1374181261.54.0.8148762893.issue18501@psf.upfronthosting.co.za> Message-ID: <1374181509.74.0.899526979371.issue18501@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 23:07:03 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Jul 2013 21:07:03 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1374181623.08.0.606962108836.issue18408@psf.upfronthosting.co.za> STINNER Victor added the comment: > This test from lxml's ElementTree test suite crashes for me now when run against (c)ElementTree: (...) Thanks for the quick report! Are you testing automatically lxml with the Python HEAD? The issue should be fixed by the changeset 6ec0e9347dd4. I also opened the issue #18501 to discuss how ElementTree should handle Python exceptions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 23:08:43 2013 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Thu, 18 Jul 2013 21:08:43 +0000 Subject: [issue18501] _elementtree.c calls Python callbacks while a Python exception is set In-Reply-To: <1374181261.54.0.8148762893.issue18501@psf.upfronthosting.co.za> Message-ID: <1374181723.3.0.490797349419.issue18501@psf.upfronthosting.co.za> Changes by Fred L. Drake, Jr. : ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 23:10:32 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 18 Jul 2013 21:10:32 +0000 Subject: [issue17349] wsgiref.simple_server.demo_app is not PEP-3333 compatible In-Reply-To: <1362400053.87.0.0342035983925.issue17349@psf.upfronthosting.co.za> Message-ID: <1374181832.55.0.673934655886.issue17349@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 23:43:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 Jul 2013 21:43:43 +0000 Subject: [issue18501] _elementtree.c calls Python callbacks while a Python exception is set In-Reply-To: <1374181261.54.0.8148762893.issue18501@psf.upfronthosting.co.za> Message-ID: <3bx83y5kPnz7Ljf@mail.python.org> Roundup Robot added the comment: New changeset 5a6cdc0d7de1 by Victor Stinner in branch 'default': Issue #18501, #18408: Fix expat handlers in pyexpat, don't call Python http://hg.python.org/cpython/rev/5a6cdc0d7de1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 23:43:44 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 Jul 2013 21:43:44 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3bx83z3wgWzSS6@mail.python.org> Roundup Robot added the comment: New changeset 5a6cdc0d7de1 by Victor Stinner in branch 'default': Issue #18501, #18408: Fix expat handlers in pyexpat, don't call Python http://hg.python.org/cpython/rev/5a6cdc0d7de1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 23:57:41 2013 From: report at bugs.python.org (Daniel Holth) Date: Thu, 18 Jul 2013 21:57:41 +0000 Subject: [issue18373] implement sys.get/setbyteswarningflag() In-Reply-To: <1373065124.82.0.249288626652.issue18373@psf.upfronthosting.co.za> Message-ID: <1374184661.92.0.294639601488.issue18373@psf.upfronthosting.co.za> Daniel Holth added the comment: Python 3 is supposed to make it easier to do Unicode correctly. str(bytes) does not. I felt strongly enough about that to write this patch. With this feature my library can have control in a way that is much more practical than ensuring a particular flag has been passed to the interpreter. It might make sense to modify the patch so str(bytes) can throw a regular exception instead of a warning while under the influence of the new flag. The reason being that the warning will be suppressed the second time around but for this use case you wouldn't want that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 00:04:27 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Jul 2013 22:04:27 +0000 Subject: [issue18373] implement sys.get/setbyteswarningflag() In-Reply-To: <1374184661.92.0.294639601488.issue18373@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > Python 3 is supposed to make it easier to do Unicode correctly. str(bytes) does not. str(bytes) does not make sense, that's why an exception is raised when the -bb command line option is used ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 00:11:22 2013 From: report at bugs.python.org (Steven Johnson) Date: Thu, 18 Jul 2013 22:11:22 +0000 Subject: [issue18502] CDLL does not use same paths as util.find_library Message-ID: <1374185482.63.0.0818947870098.issue18502@psf.upfronthosting.co.za> New submission from Steven Johnson: CDLL does not use the same paths as find_library and thus you can *find* a library, but you can't necessarily use it. In my case, I had SDL2 in /usr/local/lib. find_library correctly gets the name, but does not return the path. CDLL apparently does not search /usr/local/lib and fails. Python 3.4.0a0 (default:5a6cdc0d7de1, Jul 18 2013, 17:55:27) [GCC 4.7.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from ctypes import * >>> import ctypes.util >>> ctypes.util.find_library("SDL2") 'libSDL2-2.0.so.0' >>> CDLL(_) Traceback (most recent call last): File "", line 1, in File "/home/steven/Programming/cpython/Lib/ctypes/__init__.py", line 351, in __init__ self._handle = _dlopen(self._name, mode) OSError: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory >>> CDLL("/usr/local/lib/libSDL2.so") ---------- components: ctypes messages: 193332 nosy: shjohnson.pi priority: normal severity: normal status: open title: CDLL does not use same paths as util.find_library type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 01:06:16 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 18 Jul 2013 23:06:16 +0000 Subject: [issue17911] Extracting tracebacks does too much work In-Reply-To: <594652886.4271641.1374155117213.JavaMail.root@zimbra10-e2.priv.proxad.net> Message-ID: Nick Coghlan added the comment: For dis, we introduced a new rich bytecode introspection API. Ditto for inspect.Signature. I think it makes sense to treat this as a completely new traceback introspection API and ignore the low level details of the legacy API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 01:11:40 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 18 Jul 2013 23:11:40 +0000 Subject: [issue18264] enum.IntEnum is not compatible with JSON serialisation In-Reply-To: <1371649541.07.0.776235119954.issue18264@psf.upfronthosting.co.za> Message-ID: <1374189100.68.0.363467454305.issue18264@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 01:36:28 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Jul 2013 23:36:28 +0000 Subject: [issue9177] ssl.read/write on closed socket raises AttributeError In-Reply-To: <1278409980.47.0.00506027612669.issue9177@psf.upfronthosting.co.za> Message-ID: <1374190588.66.0.0564106151656.issue9177@psf.upfronthosting.co.za> STINNER Victor added the comment: ssl-socket-readwrite-after-close.diff: instead of testing "not self._sslobj", I would prefer an explicit "self._sslobj is None". ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 01:38:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Jul 2013 23:38:52 +0000 Subject: [issue9177] ssl.read/write on closed socket raises AttributeError In-Reply-To: <1278409980.47.0.00506027612669.issue9177@psf.upfronthosting.co.za> Message-ID: <1374190732.26.0.0387627076226.issue9177@psf.upfronthosting.co.za> STINNER Victor added the comment: The check should be moved into the _checkClosed() method. Example: def _checkClosed(self): io.RawIOBase._checkClosed(self) if self._sslobj is None: raise ValueError("I/O operation on closed SSL socket") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 01:41:29 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Jul 2013 23:41:29 +0000 Subject: [issue9177] ssl.read/write on closed socket raises AttributeError In-Reply-To: <1278409980.47.0.00506027612669.issue9177@psf.upfronthosting.co.za> Message-ID: <1374190889.2.0.594542244867.issue9177@psf.upfronthosting.co.za> STINNER Victor added the comment: Oops, remove "io.RawIOBase._checkClosed(self)" from my example (I read socket.py at the same time, SSLSocket inherits from socket, not from RawIOBase). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 01:43:33 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Jul 2013 23:43:33 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1374191013.15.0.369564622323.issue18408@psf.upfronthosting.co.za> STINNER Victor added the comment: I created the issue #18488: "sqlite: finalize() method of user function may be called with an exception set if a call to step() method failed". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 01:44:37 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Jul 2013 23:44:37 +0000 Subject: [issue18488] sqlite: finalize() method of user function may be called with an exception set if a call to step() method failed In-Reply-To: <1374104392.89.0.672278845185.issue18488@psf.upfronthosting.co.za> Message-ID: <1374191077.06.0.395948322177.issue18488@psf.upfronthosting.co.za> STINNER Victor added the comment: See also isue #18501, similar issue in ElementTree. I created the issue while working on the issue #18408. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 01:44:58 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Jul 2013 23:44:58 +0000 Subject: [issue18501] _elementtree.c calls Python callbacks while a Python exception is set In-Reply-To: <1374181261.54.0.8148762893.issue18501@psf.upfronthosting.co.za> Message-ID: <1374191098.7.0.542986819027.issue18501@psf.upfronthosting.co.za> STINNER Victor added the comment: See also the issue #18488, similar issue in sqlite. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 02:05:56 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Jul 2013 00:05:56 +0000 Subject: [issue18042] Provide enum.unique class decorator In-Reply-To: <1369299378.37.0.789518154232.issue18042@psf.upfronthosting.co.za> Message-ID: <3bxCD3297qz7Ljc@mail.python.org> Roundup Robot added the comment: New changeset 2079a517193b by Ethan Furman in branch 'default': closes issue18042 -- a `unique` decorator is added to enum.py http://hg.python.org/cpython/rev/2079a517193b ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 02:07:27 2013 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 19 Jul 2013 00:07:27 +0000 Subject: [issue18491] Add "exe wrapper" functionality to Windows launcher In-Reply-To: <1374158765.31.0.00467890617544.issue18491@psf.upfronthosting.co.za> Message-ID: <1374192447.86.0.734761039288.issue18491@psf.upfronthosting.co.za> Vinay Sajip added the comment: My initial comments - seems like a reasonable approach. I think you may need to consider -script.pyw for the GUI case. I will look into it in more detail. I'll add Mark to the nosy list, as the launcher was originally his idea and he might have a view. What "support code" are you referring to? Re. tests - there are tests, see the repo on BitBucket: https://bitbucket.org/pypa/pylauncher/src/tip/tests.py?at=default There are no tests in the Python suite; because of the specialised nature of the launcher, to do proper tests you need 2.x and 3.x installed on the test machine, preferably both 32- and 64-bit variants. This doesn't match our buildbot configurations. ---------- nosy: +mhammond _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 02:25:20 2013 From: report at bugs.python.org (Mark Hammond) Date: Fri, 19 Jul 2013 00:25:20 +0000 Subject: [issue18491] Add "exe wrapper" functionality to Windows launcher In-Reply-To: <1374158765.31.0.00467890617544.issue18491@psf.upfronthosting.co.za> Message-ID: <1374193520.78.0.886147609035.issue18491@psf.upfronthosting.co.za> Mark Hammond added the comment: I don't understand the motivation for this - how will it be used in practice? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 02:32:15 2013 From: report at bugs.python.org (Chris Rebert) Date: Fri, 19 Jul 2013 00:32:15 +0000 Subject: [issue18264] enum.IntEnum is not compatible with JSON serialisation In-Reply-To: <1371649541.07.0.776235119954.issue18264@psf.upfronthosting.co.za> Message-ID: <1374193935.48.0.279952616076.issue18264@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 02:58:55 2013 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 19 Jul 2013 00:58:55 +0000 Subject: [issue18491] Add "exe wrapper" functionality to Windows launcher In-Reply-To: <1374158765.31.0.00467890617544.issue18491@psf.upfronthosting.co.za> Message-ID: <1374195535.04.0.403498237346.issue18491@psf.upfronthosting.co.za> Vinay Sajip added the comment: > I don't understand the motivation for this - how will it be used in practice? It allows the launcher to do double duty as an executable launcher for scripts which works in the same way as executable launchers in setuptools-installed scripts. Its use in this way is redundant if the launcher is actually installed. However, if the launcher isn't installed, it's considered the only fool-proof way of invoking Python scripts on Windows. This patch is a consequence of discussions ongoing on distutils-sig about bundling setuptools and pip in Python. In practice, a Python script 'foo' in a distribution, which would be called just plain 'foo' on Unix and have a Python shebang line, would be named 'foo-script.py' with a copy of the launcher as 'foo.exe' alongside, which invokes the Python script when run. A GUI script would be called 'foo-script.pyw' and have the GUI version of the launcher in 'foo.exe'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 03:11:13 2013 From: report at bugs.python.org (Mark Hammond) Date: Fri, 19 Jul 2013 01:11:13 +0000 Subject: [issue18491] Add "exe wrapper" functionality to Windows launcher In-Reply-To: <1374158765.31.0.00467890617544.issue18491@psf.upfronthosting.co.za> Message-ID: <1374196273.31.0.473218276541.issue18491@psf.upfronthosting.co.za> Mark Hammond added the comment: Obviously I'm missing a little context, but it seems a little wrong for the same launcher to be doing this double-duty. It seems we only want to use the launcher in this way as it already has some of the interesting code we need - but the vast majority of users aren't going to want to have it behave this way implicitly (ie, when they start what they consider the "launcher", they aren't going to expect this magic. Conversely, when someone executes "foo", they are going to be expecting exactly 1 thing to happen and that isn't "do what py.exe with no args does") So maybe this could be behind a #define, and have another .exe built from the same sources? One exe sticks with the launcher semantics (ie, never looks for foo-script.py), and the other sticks with the wrapper semantics (ie, terminates with an error if foo-script.py can't be found) All that said though, I'm not involved in the distutils discussions and acknowledge the general requirements as real, so do whatever you need to do :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 03:44:57 2013 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 19 Jul 2013 01:44:57 +0000 Subject: [issue18480] _elementtree: missing PyType_Ready call In-Reply-To: <1374065698.77.0.654171815801.issue18480@psf.upfronthosting.co.za> Message-ID: <1374198297.53.0.108087351891.issue18480@psf.upfronthosting.co.za> Eli Bendersky added the comment: LGTM, thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 06:45:12 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Fri, 19 Jul 2013 04:45:12 +0000 Subject: [issue17214] http.client.HTTPConnection.putrequest encode error In-Reply-To: <1361011959.8.0.221376430084.issue17214@psf.upfronthosting.co.za> Message-ID: <1374209112.46.0.0649274757557.issue17214@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Lars, I see. For the uninitiated, the issue is the original url (containing only ascii character) redirects to the url containing non-ascii characters which upsets urllib. To handle that situation, you can do something like this: --------------------- import urllib.request from urllib.parse import quote url = "http://www.libon.it/libon/search/isbn/3499155443" req = urllib.request.Request(url) req.selector = urllib.parse.quote(req.selector) response = urllib.request.urlopen(req, timeout=30) the_page = response.read().decode('utf-8') print(the_page) --------------------- I admit it that this code is clunky and not pythonic. I also believe in python standard library, we should have a module to access url containing non-ascii character in an easy manner. At the very least, maybe we can give proper error message. Something like this would be nice: "The url is not valid and contains non-ascii character: http://www.libon.it/ricerca/7817940/3499155443/dettaglio/3102314/Onkel-Oswald-und-der-Sudan-K??fer/order/date_desc. This url is redirected from this url: http://www.libon.it/libon/search/isbn/3499155443" Because users can be confused. They thought they already gave only-ascii-characters url (http://www.libon.it/libon/search/isbn/3499155443) to urllib, but why did they get encoding error? What do you say, Christian? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 08:55:45 2013 From: report at bugs.python.org (Paul Moore) Date: Fri, 19 Jul 2013 06:55:45 +0000 Subject: [issue18491] Add "exe wrapper" functionality to Windows launcher In-Reply-To: <1374158765.31.0.00467890617544.issue18491@psf.upfronthosting.co.za> Message-ID: <1374216945.36.0.585221708774.issue18491@psf.upfronthosting.co.za> Paul Moore added the comment: Correct about .pyw files - I had forgotten those, I will update the patch. The idea of "support code" was to (somewhat) alleviate Mark's question about "what is this for", I was wondering if it was worth adding a module to the stdlib which did the job of saving a renamed copy of the launcher alongside a user-specified script. Note that (AIUI) there is still value in this even if the launcher is installed - people have suggested that other approaches don't work for one reason or another. For example, you cannot execute .py scripts directly from the command line unless you manually add .py to the PATHEXT variable (as the Python installer does not do this). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 09:53:32 2013 From: report at bugs.python.org (Tim Golden) Date: Fri, 19 Jul 2013 07:53:32 +0000 Subject: [issue18491] Add "exe wrapper" functionality to Windows launcher In-Reply-To: <1374158765.31.0.00467890617544.issue18491@psf.upfronthosting.co.za> Message-ID: <1374220412.13.0.31999091433.issue18491@psf.upfronthosting.co.za> Tim Golden added the comment: Glancing back, it isn't perhaps clear to the casual reader what's being proposed here, and why. The idea is that a pip-style installer become part of core Python. For Windows users, any standalone scripts from an installed package would be placed in scripts/ with a stub .exe which is a copy of the py.exe launcher which would launch the corresponding Python file. So, for a package Foo with a run-foo script, there would be: scripts/run-foo-script.py and scripts/run-foo.exe. The latter is a copy of the PEP397 launcher which interrogates its own filename (run-foo.exe) and looks for a corresponding Python script (run-foo-script.py) and then uses the launcher mechanics to run it, making use of all the built-in shebang-handling, command-line switches, etc. This patch allows the py.exe launcher to be used in either way, transparently, inserting the run-foo-script.py filepath as a first parameter before the rest of the code runs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 10:05:05 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 19 Jul 2013 08:05:05 +0000 Subject: [issue18480] _elementtree: missing PyType_Ready call In-Reply-To: <1374065698.77.0.654171815801.issue18480@psf.upfronthosting.co.za> Message-ID: <1374221105.16.0.478594277228.issue18480@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- assignee: -> ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 10:05:48 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 19 Jul 2013 08:05:48 +0000 Subject: [issue18488] sqlite: finalize() method of user function may be called with an exception set if a call to step() method failed In-Reply-To: <1374104392.89.0.672278845185.issue18488@psf.upfronthosting.co.za> Message-ID: <1374221148.43.0.379980052337.issue18488@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: +1 for PyException_SetContext or similar. The C code should behave like a "finally: x.finalize()". ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 11:11:26 2013 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 19 Jul 2013 09:11:26 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1374225086.76.0.297502322743.issue18408@psf.upfronthosting.co.za> Stefan Behnel added the comment: @Victor: yes, the Cython project has CI tests running against debug builds of all CPython branches since 2.4, updated daily. lxml is part of an extended set of tests for Cython, and the test suite of lxml includes several compatibility tests for ElementTree. https://sage.math.washington.edu:8091/hudson/ https://sage.math.washington.edu:8091/hudson/job/cython-devel-lxml-trunk/ I noticed the failures when those tests started failing. Thanks for the quick fix, and actually for all the work you're doing here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 11:14:23 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Jul 2013 09:14:23 +0000 Subject: [issue18480] _elementtree: missing PyType_Ready call In-Reply-To: <1374065698.77.0.654171815801.issue18480@psf.upfronthosting.co.za> Message-ID: <3bxRNt3wkBz7Ljd@mail.python.org> Roundup Robot added the comment: New changeset cd4c9d4bd88f by Ronald Oussoren in branch '3.3': #18480: Add missing PyType_Ready call to _elementtree extension http://hg.python.org/cpython/rev/cd4c9d4bd88f New changeset 7362722646f7 by Ronald Oussoren in branch 'default': (3.3->default): #18480: Add missing PyType_Ready call to _elementtree extension http://hg.python.org/cpython/rev/7362722646f7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 11:14:53 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 19 Jul 2013 09:14:53 +0000 Subject: [issue18480] _elementtree: missing PyType_Ready call In-Reply-To: <1374065698.77.0.654171815801.issue18480@psf.upfronthosting.co.za> Message-ID: <1374225293.38.0.469109702825.issue18480@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- keywords: -needs review resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 11:23:28 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 19 Jul 2013 09:23:28 +0000 Subject: [issue17214] http.client.HTTPConnection.putrequest encode error In-Reply-To: <1361011959.8.0.221376430084.issue17214@psf.upfronthosting.co.za> Message-ID: <1374225808.25.0.637230172434.issue17214@psf.upfronthosting.co.za> Christian Heimes added the comment: Something else is going on here. A valid server never returns an URL with non-ASCII chars. Your test server does the right thing, too: $ LC_ALL=C wget http://www.libon.it/libon/search/isbn/3499155443 --2013-07-19 11:01:54-- http://www.libon.it/libon/search/isbn/3499155443 Resolving www.libon.it (www.libon.it)... 83.103.59.131 Connecting to www.libon.it (www.libon.it)|83.103.59.131|:80... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: http://www.libon.it/ricerca/7818684/3499155443/dettaglio/3102314/Onkel-Oswald-und-der-Sudan-K%C3%A4fer/order/date_desc [following] Incomplete or invalid multibyte sequence encountered --2013-07-19 11:01:54-- http://www.libon.it/ricerca/7818684/3499155443/dettaglio/3102314/Onkel-Oswald-und-der-Sudan-K%C3%A4fer/order/date_desc Reusing existing connection to www.libon.it:80. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] I have digged through the code. Now I think that I know what's going on here. The header parsing code unquotes and converts the Location header. The code in the 302 handler doesn't compensate and therefore fails. Here is a patch that corrects the code in the 302 function. ---------- keywords: +patch Added file: http://bugs.python.org/file30976/issue17214.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 11:40:34 2013 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 19 Jul 2013 09:40:34 +0000 Subject: [issue18491] Add "exe wrapper" functionality to Windows launcher In-Reply-To: <1374158765.31.0.00467890617544.issue18491@psf.upfronthosting.co.za> Message-ID: <1374226834.71.0.479541523285.issue18491@psf.upfronthosting.co.za> Vinay Sajip added the comment: How about the following? 1. Paul updates the patch to include .pyw files, but also puts all the functionality of this patch in #if defined(SCRIPT_WRAPPER). 2. SCRIPT_WRAPPER is left undefined in the launcher Visual Studio project, so it will build identically to how it does now. 3. Once the dust has settled on distutils-sig, and we know for sure what we need for script wrappers, we add a separate Visual Studio project to the Python solution which defines SCRIPT_WRAPPER and puts the built files in whatever destination is appropriate. This will give the benefit that we can reuse common functionality at the source code level, without changing the existing behaviour of py.exe/pyw.exe. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 12:00:00 2013 From: report at bugs.python.org (Paul Moore) Date: Fri, 19 Jul 2013 10:00:00 +0000 Subject: [issue18491] Add "exe wrapper" functionality to Windows launcher In-Reply-To: <1374158765.31.0.00467890617544.issue18491@psf.upfronthosting.co.za> Message-ID: <1374228000.89.0.848109536107.issue18491@psf.upfronthosting.co.za> Paul Moore added the comment: I've no problem with that suggestion. The patch is clean enough that ifdef-ing it out won't be hard. Revised patch incoming :-) It's needed for the pyw support in any case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 12:04:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Jul 2013 10:04:06 +0000 Subject: [issue18479] Improvements to Powershell activate script for venv In-Reply-To: <1374055868.56.0.0556139473307.issue18479@psf.upfronthosting.co.za> Message-ID: <3bxSVF3Tgvz7Lkl@mail.python.org> Roundup Robot added the comment: New changeset 1ff5e7505696 by Vinay Sajip in branch 'default': Closes #18479: Changed venv Activate.ps1 to make deactivate a function, and removed Deactivate.ps1. http://hg.python.org/cpython/rev/1ff5e7505696 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 13:10:17 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Fri, 19 Jul 2013 11:10:17 +0000 Subject: [issue18503] No assertion in test_del_param_on_nonexistent_header function Message-ID: <1374232217.26.0.713438373749.issue18503@psf.upfronthosting.co.za> New submission from Vajrasky Kok: In Lib/test/test_email/test_email.py, line 389, there is a unit test function: def test_del_param_on_nonexistent_header(self): msg = Message() msg.del_param('filename', 'content-disposition') There is no assertion here, unlike other unit test functions, such as: def test_del_param_on_other_header(self): msg = Message() msg.add_header('Content-Disposition', 'attachment', filename='bud.gif') msg.del_param('filename', 'content-disposition') self.assertEqual(msg['content-disposition'], 'attachment') ---------- components: Tests files: add_assert_equal_on_test_del_param_on_nonexistent_header.txt messages: 193356 nosy: r.david.murray, vajrasky priority: normal severity: normal status: open title: No assertion in test_del_param_on_nonexistent_header function versions: Python 3.4 Added file: http://bugs.python.org/file30977/add_assert_equal_on_test_del_param_on_nonexistent_header.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 14:03:06 2013 From: report at bugs.python.org (Mark Hammond) Date: Fri, 19 Jul 2013 12:03:06 +0000 Subject: [issue18491] Add "exe wrapper" functionality to Windows launcher In-Reply-To: <1374158765.31.0.00467890617544.issue18491@psf.upfronthosting.co.za> Message-ID: <1374235386.69.0.102381794244.issue18491@psf.upfronthosting.co.za> Mark Hammond added the comment: Vinay's idea makes sense to me. Paul can also subtly change the patch such that when SCRIPT_WRAPPER is defined, failure to find the wrapper is fatal and prints a message specific to this fact rather than just starting an interactive Python (assuming I read the patch correctly, that is :) Then a new .exe is built named something innocuous, installed in a single well-known location as the "stub" and that pip-style code creating the wrapper has a nice easy job :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 15:00:52 2013 From: report at bugs.python.org (R. Jayakrishnan) Date: Fri, 19 Jul 2013 13:00:52 +0000 Subject: [issue18504] IDLE:Improvements- Improving Mock_Text Message-ID: <1374238852.66.0.963662486602.issue18504@psf.upfronthosting.co.za> New submission from R. Jayakrishnan: Following the Idle: mock Text class and test thereof created #18365 I am trying to improve the _decode function because most of the Idletests needs the mock text and requires some more features to handle indexes. Started improving the mockText _decode method while writing unit test for AutoExpand.py at #18292. For now I want the mock text to decode following indexes: line.char, insert, end, +-#c/chars, lineend, linestart, wordstart, wordend For this I am trying to write regular expressions to extract the parts of index. The submitted decodeTest.py is a sample script to show how my regular expression starts manipulating the decoding of indexes. I have attached a checklist of several indexes. So you can easily run them and get an understanding of my approach. ---------- files: decodeTest.py messages: 193358 nosy: JayKrish priority: normal severity: normal status: open title: IDLE:Improvements- Improving Mock_Text Added file: http://bugs.python.org/file30978/decodeTest.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 15:02:01 2013 From: report at bugs.python.org (R. Jayakrishnan) Date: Fri, 19 Jul 2013 13:02:01 +0000 Subject: [issue18504] IDLE:Improvements- Improving Mock_Text In-Reply-To: <1374238852.66.0.963662486602.issue18504@psf.upfronthosting.co.za> Message-ID: <1374238921.21.0.2319064935.issue18504@psf.upfronthosting.co.za> Changes by R. Jayakrishnan : Added file: http://bugs.python.org/file30979/decodeChecklist.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 15:04:12 2013 From: report at bugs.python.org (R. Jayakrishnan) Date: Fri, 19 Jul 2013 13:04:12 +0000 Subject: [issue18504] IDLE:Improvements- Improving Mock_Text In-Reply-To: <1374238852.66.0.963662486602.issue18504@psf.upfronthosting.co.za> Message-ID: <1374239052.11.0.784485782484.issue18504@psf.upfronthosting.co.za> Changes by R. Jayakrishnan : Removed file: http://bugs.python.org/file30978/decodeTest.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 15:04:43 2013 From: report at bugs.python.org (R. Jayakrishnan) Date: Fri, 19 Jul 2013 13:04:43 +0000 Subject: [issue18504] IDLE:Improvements- Improving Mock_Text In-Reply-To: <1374238852.66.0.963662486602.issue18504@psf.upfronthosting.co.za> Message-ID: <1374239083.15.0.0137585924489.issue18504@psf.upfronthosting.co.za> Changes by R. Jayakrishnan : Added file: http://bugs.python.org/file30980/decodeTest.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 15:08:39 2013 From: report at bugs.python.org (R. Jayakrishnan) Date: Fri, 19 Jul 2013 13:08:39 +0000 Subject: [issue18292] IDLE Improvements: Unit test for AutoExpand.py In-Reply-To: <1372098554.92.0.798687151295.issue18292@psf.upfronthosting.co.za> Message-ID: <1374239319.54.0.452229033174.issue18292@psf.upfronthosting.co.za> R. Jayakrishnan added the comment: I am trying to improve the _decode function of mock Text class because most of the Idletests needs the mock text and requires some more features to handle indexes. Created an issue IDLE:Improvements- Improving Mock_Text http://bugs.python.org/issue18504 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 16:44:01 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Jul 2013 14:44:01 +0000 Subject: [issue18492] Add test.support.regrtest_run flag, simplify support.requires In-Reply-To: <1374161900.43.0.881425486921.issue18492@psf.upfronthosting.co.za> Message-ID: <1374245041.2.0.825777897335.issue18492@psf.upfronthosting.co.za> R. David Murray added the comment: Since we only use unittest for running subsets of our test suite, I think the better behavior is to run everything that -u all normally runs. That is, when one uses unittest to run a bit of the test suite, one generally wants to run the tests one specifies, not have them skipped. Obviously this is open to discussion, however ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 16:46:16 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 19 Jul 2013 14:46:16 +0000 Subject: [issue16595] Add resource.prlimit In-Reply-To: <1354446881.9.0.288115855459.issue16595@psf.upfronthosting.co.za> Message-ID: <1374245176.49.0.217127101446.issue16595@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: >From my original post which unfortunately was ignored :( : http://mail.python.org/pipermail/python-ideas/2012-June/015323.html ...for completeness perhaps it also makes sense to expose Linux-specific RLIMIT constants: RLIMIT_MSGQUEUE RLIMIT_NICE RLIMIT_RTPRIO RLIMIT_RTTIME RLIMIT_SIGPENDING ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 16:49:26 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Jul 2013 14:49:26 +0000 Subject: [issue18503] No assertion in test_del_param_on_nonexistent_header function In-Reply-To: <1374232217.26.0.713438373749.issue18503@psf.upfronthosting.co.za> Message-ID: <1374245366.72.0.37258430468.issue18503@psf.upfronthosting.co.za> R. David Murray added the comment: That's because there's nothing to assert. The test is making sure no exception is raised. (Why no exception is raised is a good question, but that design predates my stewardship of the module :) A comment to that effect would probably be a good idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 18:01:59 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Fri, 19 Jul 2013 16:01:59 +0000 Subject: [issue18503] No assertion in test_del_param_on_nonexistent_header function In-Reply-To: <1374232217.26.0.713438373749.issue18503@psf.upfronthosting.co.za> Message-ID: <1374249719.19.0.659080291602.issue18503@psf.upfronthosting.co.za> Vajrasky Kok added the comment: I see. Anyway, I am just curious. Why not doing try and catch? def test_del_param_on_nonexistent_header(self): msg = Message() try: msg.del_param('filename', 'content-disposition') except: self.fail('del_param on empty msg raised exception!') Or is it better this way? def test_del_param_on_nonexistent_header(self): msg = Message() # Deleting param on empty msg should not raise exception. msg.del_param('filename', 'content-disposition') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 18:06:37 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Fri, 19 Jul 2013 16:06:37 +0000 Subject: [issue18503] No assertion in test_del_param_on_nonexistent_header function In-Reply-To: <1374232217.26.0.713438373749.issue18503@psf.upfronthosting.co.za> Message-ID: <1374249997.56.0.452353924918.issue18503@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Anyway, I found another issue on line 393 on the same file: def test_del_nonexistent_param(self): msg = Message() msg.add_header('Content-Type', 'text/plain', charset='utf-8') existing_header = msg['Content-Type'] msg.del_param('foobar', header='Content-Type') self.assertEqual(msg['Content-Type'], 'text/plain; charset="utf-8"') The variable existing_header is never used. Either we can remove it or change it to: def test_del_nonexistent_param(self): msg = Message() msg.add_header('Content-Type', 'text/plain', charset='utf-8') existing_header = msg['Content-Type'] msg.del_param('foobar', header='Content-Type') self.assertEqual(msg['Content-Type'], existing_header) At first, I wanted to create a ticket for this. But then, I thought why do not we combine these menial problems together? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 18:10:26 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Fri, 19 Jul 2013 16:10:26 +0000 Subject: [issue18503] No assertion in test_del_param_on_nonexistent_header function and unused variables in some places in test_email.py In-Reply-To: <1374232217.26.0.713438373749.issue18503@psf.upfronthosting.co.za> Message-ID: <1374250226.43.0.504056090165.issue18503@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Another unused variable in line 2268 on function test_bad_multipart: def test_bad_multipart(self): eq = self.assertEqual msg1 = Message() msg1['Subject'] = 'subpart 1' msg2 = Message() msg2['Subject'] = 'subpart 2' r = MIMEMessage(msg1) self.assertRaises(errors.MultipartConversionError, r.attach, msg2) The variable eq is never used and can be removed. I have changed the title of the ticket to reflect the problem better. ---------- title: No assertion in test_del_param_on_nonexistent_header function -> No assertion in test_del_param_on_nonexistent_header function and unused variables in some places in test_email.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 18:22:41 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Fri, 19 Jul 2013 16:22:41 +0000 Subject: [issue18505] Duplicate function names in test_email.py Message-ID: <1374250961.33.0.0492824952219.issue18505@psf.upfronthosting.co.za> New submission from Vajrasky Kok: In Lib/test/test_email/test_email.py, Part 1: line 4210 and 4217 have same function name, which is test_encode_one_long_line. In fact, they have same function body! def test_encode_one_long_line(self): self._test_encode('x' * 100 + '\n', 'x' * 75 + '=\n' + 'x' * 25 + '\n') One of them can be removed. Part 2: line 928 and 1009 have same function name, which is test_splitter_split_on_punctuation_only_if_fws. This time, they have different function body and one of them (line 928) is overshadowed (not being executed by unit test) by the other. So we must rename one of them. ---------- components: Tests files: fix_duplicate_function_names.txt messages: 193366 nosy: r.david.murray, vajrasky priority: normal severity: normal status: open title: Duplicate function names in test_email.py versions: Python 3.4 Added file: http://bugs.python.org/file30981/fix_duplicate_function_names.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 18:31:00 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Fri, 19 Jul 2013 16:31:00 +0000 Subject: [issue16595] Add resource.prlimit In-Reply-To: <1354446881.9.0.288115855459.issue16595@psf.upfronthosting.co.za> Message-ID: <1374251460.34.0.959590997372.issue16595@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Fedora 18, this is the result after applying your patch and execute your unit test: [sky at localhost cpython]$ ./python Lib/test/test_resource.py test_args (__main__.ResourceTest) ... ok test_fsize_enforced (__main__.ResourceTest) ... ok test_fsize_ismax (__main__.ResourceTest) ... ok test_fsize_toobig (__main__.ResourceTest) ... ok test_getrusage (__main__.ResourceTest) ... ok test_prlimit (__main__.ResourceTest) ... ERROR test_setrusage_refcount (__main__.ResourceTest) ... ok ====================================================================== ERROR: test_prlimit (__main__.ResourceTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_resource.py", line 131, in test_prlimit 1, resource.RLIMIT_AS) File "/home/sky/Code/python/programming_language/cpython/Lib/unittest/case.py", line 614, in assertRaises return context.handle('assertRaises', callableObj, args, kwargs) File "/home/sky/Code/python/programming_language/cpython/Lib/unittest/case.py", line 150, in handle callable_obj(*args, **kwargs) PermissionError: [Errno 1] Operation not permitted ---------------------------------------------------------------------- Ran 7 tests in 0.990s FAILED (errors=1) Traceback (most recent call last): File "Lib/test/test_resource.py", line 143, in test_main() File "Lib/test/test_resource.py", line 140, in test_main support.run_unittest(ResourceTest) File "/home/sky/Code/python/programming_language/cpython/Lib/test/support.py", line 1615, in run_unittest _run_suite(suite) File "/home/sky/Code/python/programming_language/cpython/Lib/test/support.py", line 1590, in _run_suite raise TestFailed(err) test.support.TestFailed: Traceback (most recent call last): File "Lib/test/test_resource.py", line 131, in test_prlimit 1, resource.RLIMIT_AS) File "/home/sky/Code/python/programming_language/cpython/Lib/unittest/case.py", line 614, in assertRaises return context.handle('assertRaises', callableObj, args, kwargs) File "/home/sky/Code/python/programming_language/cpython/Lib/unittest/case.py", line 150, in handle callable_obj(*args, **kwargs) PermissionError: [Errno 1] Operation not permitted With sudo, I got this: [sky at localhost cpython]$ sudo ./python Lib/test/test_resource.py [sudo] password for sky: test_args (__main__.ResourceTest) ... ok test_fsize_enforced (__main__.ResourceTest) ... ok test_fsize_ismax (__main__.ResourceTest) ... ok test_fsize_toobig (__main__.ResourceTest) ... ok test_getrusage (__main__.ResourceTest) ... ok test_prlimit (__main__.ResourceTest) ... FAIL test_setrusage_refcount (__main__.ResourceTest) ... ok ====================================================================== FAIL: test_prlimit (__main__.ResourceTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_resource.py", line 131, in test_prlimit 1, resource.RLIMIT_AS) AssertionError: ValueError not raised by prlimit ---------------------------------------------------------------------- Ran 7 tests in 1.002s FAILED (failures=1) Traceback (most recent call last): File "Lib/test/test_resource.py", line 143, in test_main() File "Lib/test/test_resource.py", line 140, in test_main support.run_unittest(ResourceTest) File "/home/sky/Code/python/programming_language/cpython/Lib/test/support.py", line 1615, in run_unittest _run_suite(suite) File "/home/sky/Code/python/programming_language/cpython/Lib/test/support.py", line 1590, in _run_suite raise TestFailed(err) test.support.TestFailed: Traceback (most recent call last): File "Lib/test/test_resource.py", line 131, in test_prlimit 1, resource.RLIMIT_AS) AssertionError: ValueError not raised by prlimit ---------- nosy: +vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 18:57:35 2013 From: report at bugs.python.org (Niklas Koep) Date: Fri, 19 Jul 2013 16:57:35 +0000 Subject: [issue18287] PyType_Ready() should sanity-check the tp_name field In-Reply-To: <1372000372.42.0.425313116494.issue18287@psf.upfronthosting.co.za> Message-ID: <1374253055.83.0.9750242921.issue18287@psf.upfronthosting.co.za> Changes by Niklas Koep : Removed file: http://bugs.python.org/file30678/patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 20:17:22 2013 From: report at bugs.python.org (Chris Rebert) Date: Fri, 19 Jul 2013 18:17:22 +0000 Subject: [issue18436] Add mapping of symbol to function to operator module In-Reply-To: <1373662006.12.0.760343850871.issue18436@psf.upfronthosting.co.za> Message-ID: <1374257842.04.0.641973948183.issue18436@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 20:43:11 2013 From: report at bugs.python.org (Kaushik Ghose) Date: Fri, 19 Jul 2013 18:43:11 +0000 Subject: [issue18506] DISABLEd Tkinter.Listbox still fires <> for mouse click Message-ID: <1374259391.68.0.438429255276.issue18506@psf.upfronthosting.co.za> New submission from Kaushik Ghose: Run the script below. Clicking on the window will fire off <> events even though the widget is disabled. Keyboard actions do not fire this event. #-- Test file -- import Tkinter as tki def selection_changed(event): print 'Selection changed' root = tki.Tk() listbox = tki.Listbox(root, selectmode=tki.BROWSE) listbox.pack(side='left', fill='both', expand=True) listbox.bind('<>', selection_changed) listbox.config(state=tki.DISABLED) root.mainloop() ---------- components: Tkinter messages: 193368 nosy: kghose priority: normal severity: normal status: open title: DISABLEd Tkinter.Listbox still fires <> for mouse click type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 21:08:49 2013 From: report at bugs.python.org (Marc Abramowitz) Date: Fri, 19 Jul 2013 19:08:49 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1374260929.09.0.0139507015297.issue15805@psf.upfronthosting.co.za> Changes by Marc Abramowitz : ---------- nosy: +Marc.Abramowitz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 21:20:57 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 19 Jul 2013 19:20:57 +0000 Subject: [issue18506] DISABLEd Tkinter.Listbox still fires <> for mouse click In-Reply-To: <1374259391.68.0.438429255276.issue18506@psf.upfronthosting.co.za> Message-ID: <1374261657.95.0.518331615217.issue18506@psf.upfronthosting.co.za> Ned Deily added the comment: The behavior you are reporting is in the Tk listbox widget. Python's Tkinter is a fairly thin wrapper around Tk and its widgets. I believe you will see the same behavior if you translate your Python code snippet to an equivalent Tcl wish script. If you think the behavior is incorrect, I suggest you ask on one of the Tk related forums. ---------- nosy: +ned.deily resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 21:23:54 2013 From: report at bugs.python.org (Kaushik Ghose) Date: Fri, 19 Jul 2013 19:23:54 +0000 Subject: [issue18506] DISABLEd Tkinter.Listbox still fires <> for mouse click In-Reply-To: <1374259391.68.0.438429255276.issue18506@psf.upfronthosting.co.za> Message-ID: <1374261834.19.0.400368003966.issue18506@psf.upfronthosting.co.za> Kaushik Ghose added the comment: Thanks for your response. Best -Kaushik ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 21:54:54 2013 From: report at bugs.python.org (Phil Webster) Date: Fri, 19 Jul 2013 19:54:54 +0000 Subject: [issue18226] IDLE Unit test for FormatParagrah.py In-Reply-To: <1371335636.99.0.534048602964.issue18226@psf.upfronthosting.co.za> Message-ID: <1374263694.34.0.157009357981.issue18226@psf.upfronthosting.co.za> Phil Webster added the comment: I added and rewrote tests to use the Text widget (when necessary). The only changes made to FormatParagraph are documentation/comment formatting and the if __main__ function. I will work on the comment header behavior separately and can post the patch in this issue. Thanks for your guidance Terry! ---------- Added file: http://bugs.python.org/file30982/18226IDLEUnitTestFormatParagraph5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 21:55:48 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Jul 2013 19:55:48 +0000 Subject: [issue18438] Obsolete url in comment inside decimal module In-Reply-To: <1373686911.48.0.750703855786.issue18438@psf.upfronthosting.co.za> Message-ID: <1374263748.67.0.782072891926.issue18438@psf.upfronthosting.co.za> ?ric Araujo added the comment: Praise the Wayback Machine: http://web.archive.org/web/20050309223101/http://www.cs.berkeley.edu/~ejr/projects/754/private/drafts/854-1987/dir.html ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 22:34:32 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Jul 2013 20:34:32 +0000 Subject: [issue18503] No assertion in test_del_param_on_nonexistent_header function and unused variables in some places in test_email.py In-Reply-To: <1374232217.26.0.713438373749.issue18503@psf.upfronthosting.co.za> Message-ID: <1374266072.71.0.946198318751.issue18503@psf.upfronthosting.co.za> R. David Murray added the comment: We prefer one ticket per issue. The line is fuzzy...I think it would be OK to fix these all at once since they are all small cleanups in test_email, but as you can tell from how complex the title got, they are not really conceptually related. The try/except/fail is a valid style. I prefer to just let the exception raise, and put in a comment to that effect, but it is definitely a personal style thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 23:14:35 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Jul 2013 21:14:35 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3bxlMt3YwCzPHn@mail.python.org> Roundup Robot added the comment: New changeset 3f25a7dd8346 by Victor Stinner in branch 'default': Issue #18408: Fix list_ass_slice(), handle list_resize() failure http://hg.python.org/cpython/rev/3f25a7dd8346 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 23:19:34 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Jul 2013 21:19:34 +0000 Subject: [issue18453] There are unused variables inside DateTimeTestCase class in test_xmlrpc.py In-Reply-To: <1373817539.24.0.0142880431752.issue18453@psf.upfronthosting.co.za> Message-ID: <1374268774.39.0.375384518537.issue18453@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 23:30:24 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 19 Jul 2013 21:30:24 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1374269424.95.0.717644710045.issue15805@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't think this has anything to do in contextlib (which isn't a library of context managers, but a library of tools to work with context managers), it probably belongs in the io module instead. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 23:31:11 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Jul 2013 21:31:11 +0000 Subject: [issue18460] .chm documentation files advertised in download.html but not there. In-Reply-To: <1373893631.43.0.158733965695.issue18460@psf.upfronthosting.co.za> Message-ID: <1374269471.97.0.973370687583.issue18460@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The files are built and included with the Windows installer. Perhaps they can be installed without installing anything else. In any case, unless they are (again?) made available as a separate download, "HTML Help (.chm) files are made available in the "Windows" section on the Python download page." should be changed to something like "Compiled HTML Help (.chm) files are included with the Windows MSI Installer on the Python download page." ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 23:39:11 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Jul 2013 21:39:11 +0000 Subject: [issue18507] import_init() should not use Py_FatalError() but return an error Message-ID: <1374269951.83.0.221076121181.issue18507@psf.upfronthosting.co.za> New submission from STINNER Victor: The import_init() function calls Py_FatalError() at any error. This is not kind for Py_NewInterpreter() which calls import_init(): Py_NewInterpreter() exits Python with a fatal error, instead of returning NULL, on import_init() failure. The pyfailmalloc tool can be used to easily inject faults (memory allocation failure) to test this issue: see issue #18408. import_init() should return an error instead of using Py_FatalError(). ---------- messages: 193377 nosy: brett.cannon, haypo, ncoghlan priority: normal severity: normal status: open title: import_init() should not use Py_FatalError() but return an error type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 23:39:39 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Jul 2013 21:39:39 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1374269979.08.0.560949716062.issue18408@psf.upfronthosting.co.za> STINNER Victor added the comment: "import_init() calls Py_FatalError() at any error. This is not kind for Py_NewInterpreter() which calls import_init(): Py_NewInterpreter() exits Python with a fatal error, instead of returning NULL, on import_init() failure." I created the issue #18507 for that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 23:41:10 2013 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 19 Jul 2013 21:41:10 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1374270070.63.0.382092934246.issue18408@psf.upfronthosting.co.za> Changes by Stefan Behnel : ---------- nosy: -scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 23:51:39 2013 From: report at bugs.python.org (Chris Lambacher) Date: Fri, 19 Jul 2013 21:51:39 +0000 Subject: [issue18508] enum.Enum population of _value2member_map does not match fallback search Message-ID: <1374270699.59.0.0195577431177.issue18508@psf.upfronthosting.co.za> New submission from Chris Lambacher: When an Enum is being created, the _value2member_map class property is defined to speed lookup of Enum values later on. If the value does not exist then it falls back to a linear search through the _member_map.values() looking for member.value == value. This differs from population of the _value2member_map dictionary since population happens like this: enum_class._value2member_map[value] = enum_member This differs because "value" is the value of the property in the definition, not the _value property of enum_member. In most cases this does not matter, but for instances where a __new__ or __init__ is doing something funky with the values (like auto-numbering) then the _value2member_map dict won't have the right information. ---------- messages: 193379 nosy: lambacck priority: normal severity: normal status: open title: enum.Enum population of _value2member_map does not match fallback search type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 23:54:59 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Jul 2013 21:54:59 +0000 Subject: [issue18466] Spelling mistakes in various code comments. In-Reply-To: <1373909571.44.0.949892598858.issue18466@psf.upfronthosting.co.za> Message-ID: <1374270899.85.0.395491906712.issue18466@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 'everytime' is not an English word and should be corrected; hardcoded should be hard-coded. Could you at least describe your script. My fantasy is being able to check text parts of files with the help of a program such as LibreOffice. ---------- nosy: +terry.reedy versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 23:56:34 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Jul 2013 21:56:34 +0000 Subject: [issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING In-Reply-To: <1373973767.04.0.0542870445433.issue18473@psf.upfronthosting.co.za> Message-ID: <1374270994.34.0.485336924794.issue18473@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +alexandre.vassalotti, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 00:00:47 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Jul 2013 22:00:47 +0000 Subject: [issue18509] CJK decoders should return MBERR_EXCEPTION on PyUnicodeWriter error Message-ID: <1374271247.45.0.0168623931287.issue18509@psf.upfronthosting.co.za> New submission from STINNER Victor: I modified CJK codecs to reuse the new PyUnicodeWriter API (to use the PEP 393 instead of Py_UNICODE*). The problem is that PyUnicodeWriter error is not handled correctly: the decoder should return MBERR_EXCEPTION, whereas the error is not handled at all currently. I found this issue while working on issue #18408, using the pyfailmalloc tool to inject faults (memory allocation error). ---------- messages: 193381 nosy: haypo priority: normal severity: normal status: open title: CJK decoders should return MBERR_EXCEPTION on PyUnicodeWriter error versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 00:01:27 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Jul 2013 22:01:27 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1374271287.46.0.170772110644.issue18408@psf.upfronthosting.co.za> STINNER Victor added the comment: "fix CJK codecs: using UNIINV to report _PyUnicodeWriter_WriteChar() failure in Modules/cjkcodecs/cjkcodecs.h does not work. The caller is not aware of the failure: multibytecodec_decerror() receives e=1, whereas it should get MBERR_EXCEPTION" I created the issue #18509 for that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 00:03:36 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Jul 2013 22:03:36 +0000 Subject: [issue18484] No unit test for iso2time function from http.cookiejar module In-Reply-To: <1374079077.48.0.0605853512742.issue18484@psf.upfronthosting.co.za> Message-ID: <1374271416.67.0.116576188677.issue18484@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Alexander, I added you for possible review because of your interest in time functions. I wonder a bit if this function is redundant with functions in other modules. ---------- nosy: +belopolsky, terry.reedy stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 00:46:27 2013 From: report at bugs.python.org (Ethan Furman) Date: Fri, 19 Jul 2013 22:46:27 +0000 Subject: [issue18508] enum.Enum population of _value2member_map does not match fallback search In-Reply-To: <1374270699.59.0.0195577431177.issue18508@psf.upfronthosting.co.za> Message-ID: <1374273987.75.0.611102093865.issue18508@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- assignee: -> ethan.furman nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 01:43:58 2013 From: report at bugs.python.org (Ethan Furman) Date: Fri, 19 Jul 2013 23:43:58 +0000 Subject: [issue18510] if Enum member value is not hashable an exception is raised Message-ID: <1374277438.72.0.885233823426.issue18510@psf.upfronthosting.co.za> New submission from Ethan Furman: While working on issue #18508 I stumbled across this: Traceback (most recent call last): ... File "/usr/local/lib/python3.4/enum.py", line 417, in __new__ if value in cls._value2member_map: TypeError: unhashable type: 'list' I'll wrap it in a try-except block, but I must admit I was surprised the answer wasn't False. ---------- assignee: ethan.furman messages: 193384 nosy: ethan.furman priority: normal severity: normal status: open title: if Enum member value is not hashable an exception is raised type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 02:00:59 2013 From: report at bugs.python.org (=?utf-8?q?F=C3=A9vry_Thibault?=) Date: Sat, 20 Jul 2013 00:00:59 +0000 Subject: [issue18466] Spelling mistakes in various code comments. In-Reply-To: <1373909571.44.0.949892598858.issue18466@psf.upfronthosting.co.za> Message-ID: <1374278459.82.0.581017293564.issue18466@psf.upfronthosting.co.za> F?vry Thibault added the comment: Terry Reedy : The scripts needs to be improved and I won't be able to access my computer until mid August so I don't think I will be able to do anything until then. But the script should be able to do that if I work on it a bit. I would use python enchant rather than libre-office for spell-checking and would need a text file about words specifics to python that should not be reported. I'll work on it once I get back (8th August) and when it is a bit more polished I'll update this post. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 02:02:27 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 20 Jul 2013 00:02:27 +0000 Subject: [issue18510] if Enum member value is not hashable an exception is raised In-Reply-To: <1374277438.72.0.885233823426.issue18510@psf.upfronthosting.co.za> Message-ID: <1374278547.24.0.842223489709.issue18510@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 02:17:47 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Jul 2013 00:17:47 +0000 Subject: [issue18492] Add test.support.regrtest_run flag, simplify support.requires In-Reply-To: <1374161900.43.0.881425486921.issue18492@psf.upfronthosting.co.za> Message-ID: <1374279467.21.0.876068060763.issue18492@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Currently, all requires() tests pass when the file they occur in is run as '__main__'. This is especially needed when the file ends with the now standard boilerplate. if __name__ == '__main__': ... unittest.main(...) as there is currently no way to set resources within the unittest.main call. The problem is that this permissiveness does not apply to subsidiary files discovered from and run by a main file, even though it should. The current workaround is to explicitly set use_resources for the benefit of subsidiary files, as in test_idle.py. As I see it, the main point of this patch, somewhat obscured by the title, is to extend the current resource permissiveness from tests *in* main files run as main to tests in other files discovered and run from a main file. It also extends the permisiveness to any test not run by regrtest (ie, by unittest). The key change is - if sys._getframe(1).f_globals.get("__name__") == "__main__": + if not regrtest_run: 'regrtest_run == True' is currently spelled 'use_resources is not None', so the latter could be used instead to replace the frame-check without otherwise adding new code. Extending the permissiveness from main files to subsidiary files strikes me as a no-brainer. Splitting a (potentially) large file into a master file and a package of subsidiary files should not affect which tests are run. More interesting is extending the permisiveness to tests run under unittest with "python -m unittest target". Target can be a master file, a test file, or a test case or test methods. Subfile targets can only be run with unittest, not regrtest, and there is no way to enable resources for such targets. python -m unittest idlelib.idle_test.test_xy.TextText # runs python -m unittest idlelib.idle_test.test_xy.GuiText # skips So the patch enables something that is currently not possible. Serhiy is concerned about the possible booby-trap for users that run slow resource intensive tests. Some thoughts: * Running tests as main is mainly done interactively, and usually by developers at that. Humans can stop a test and ignore errors better than buildbots. * There are multiple ways to run a file from the command line. The test chapter of the manual can document that python -m test.test_xyz is more or less equivalent to python -m test -uall test_zyz with -v possibly tossed in. Anyone who does not want that can still run under regrtest by using the currently documented python -m test test_xyz * Anyone running a test file loaded in an Idle window very likely wants to run all tests possible. * Documenting that running under unittest enables all resources is trickier as long as resources are cpython and regrtest specific. I think I would mention this in the test chapter, where resources are discussed, rather than the unittest chapter. *If -u is added to unittest (and 'use=' to .main), a default of all would be the right thing for subfile targets, even if not for file and multi-file targets. --- ---------- nosy: +terry.reedy stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 02:25:26 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Jul 2013 00:25:26 +0000 Subject: [issue18492] Add test.support.regrtest_run flag, simplify support.requires In-Reply-To: <1374161900.43.0.881425486921.issue18492@psf.upfronthosting.co.za> Message-ID: <1374279926.61.0.665026286618.issue18492@psf.upfronthosting.co.za> Terry J. Reedy added the comment: #18441 is partly related in that it also suggests (eventually) moving check code (for guis) from multiple test files to support and regrtest. I do not believe there would be any conflict. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 02:34:04 2013 From: report at bugs.python.org (Wes Turner) Date: Sat, 20 Jul 2013 00:34:04 +0000 Subject: [issue18511] random.shuffle could be faster Message-ID: <1374280444.52.0.0757493000076.issue18511@psf.upfronthosting.co.za> New submission from Wes Turner: random.shuffle [1][2] could be faster. ``xrange(10,1,-1)`` is faster than ``reversed(xrange(1,10))``. [1] http://hg.python.org/cpython/file/v3.3.2/Lib/random.py#l254 [2] http://hg.python.org/cpython/file/v2.7.5/Lib/random.py#l276 ---------- components: Library (Lib) files: random-shuffle_v2.7.5_timeit.py messages: 193388 nosy: westurner priority: normal severity: normal status: open title: random.shuffle could be faster type: performance versions: 3rd party, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file30983/random-shuffle_v2.7.5_timeit.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 02:35:14 2013 From: report at bugs.python.org (Wes Turner) Date: Sat, 20 Jul 2013 00:35:14 +0000 Subject: [issue18511] random.shuffle could be faster In-Reply-To: <1374280444.52.0.0757493000076.issue18511@psf.upfronthosting.co.za> Message-ID: <1374280514.08.0.872085538007.issue18511@psf.upfronthosting.co.za> Wes Turner added the comment: Added patch to random.shuffle for v2.7.5 ---------- keywords: +patch Added file: http://bugs.python.org/file30984/random-shuffle_v2.7.5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 02:35:49 2013 From: report at bugs.python.org (Wes Turner) Date: Sat, 20 Jul 2013 00:35:49 +0000 Subject: [issue18511] random.shuffle could be faster In-Reply-To: <1374280444.52.0.0757493000076.issue18511@psf.upfronthosting.co.za> Message-ID: <1374280549.6.0.283751182231.issue18511@psf.upfronthosting.co.za> Wes Turner added the comment: Added patch to random.shuffle for trunk ---------- Added file: http://bugs.python.org/file30985/random-shuffle_trunk.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 03:27:17 2013 From: report at bugs.python.org (Ethan Furman) Date: Sat, 20 Jul 2013 01:27:17 +0000 Subject: [issue18510] dict.__contains__ raises exception instead of returning False In-Reply-To: <1374277438.72.0.885233823426.issue18510@psf.upfronthosting.co.za> Message-ID: <1374283637.16.0.636388101204.issue18510@psf.upfronthosting.co.za> Ethan Furman added the comment: Commenting further: some_key in dict is conceptually the same as some_key in dict.keys() which /would/ return False for an unhashable key -- at least it did in 2.x; for 3.x you have to say some_key in list(dict.keys()) which seems like a step backwards. Is it worth changing __contains__ and keys() to be in line with equality? ---------- title: if Enum member value is not hashable an exception is raised -> dict.__contains__ raises exception instead of returning False _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 03:29:21 2013 From: report at bugs.python.org (Ethan Furman) Date: Sat, 20 Jul 2013 01:29:21 +0000 Subject: [issue18510] dict.__contains__ raises exception instead of returning False In-Reply-To: <1374277438.72.0.885233823426.issue18510@psf.upfronthosting.co.za> Message-ID: <1374283761.85.0.334326060737.issue18510@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- assignee: ethan.furman -> versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 03:30:09 2013 From: report at bugs.python.org (Ethan Furman) Date: Sat, 20 Jul 2013 01:30:09 +0000 Subject: [issue18510] dict.__contains__ and dict.keys().__contains__ raises exception instead of returning False In-Reply-To: <1374277438.72.0.885233823426.issue18510@psf.upfronthosting.co.za> Message-ID: <1374283809.25.0.82530608824.issue18510@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- title: dict.__contains__ raises exception instead of returning False -> dict.__contains__ and dict.keys().__contains__ raises exception instead of returning False _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 03:45:51 2013 From: report at bugs.python.org (Marc Abramowitz) Date: Sat, 20 Jul 2013 01:45:51 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1374284751.72.0.09001882885.issue15805@psf.upfronthosting.co.za> Marc Abramowitz added the comment: As it happens, I wrote a similar context manager to Victor's recently for a setup.py because I wanted to suppress compiler errors that are output to the console by distutils.ccompiler.CCompiler.has_function. As Victor mentioned, for this to work with subprocesses, you need to go a little more low-level and mess around with file descriptors. Here's my function: http://marc-abramowitz.com/archives/2013/07/19/python-context-manager-for-redirected-stdout-and-stderr/ (Maybe distutils.ccompiler.CCompiler.has_function should redirect its own output automatically, but that's another issue) But then I got to thinking that it could be made a bit more powerful and the syntax could be a little nicer. So I have this code that I'm experimenting with: https://gist.github.com/msabramo/6043474 But critiquing my own function, I wonder if it's trying to do too much in one function and it's using keyword arguments where it could be using the with statement better. So I might like Nick's API better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 03:47:12 2013 From: report at bugs.python.org (Ethan Furman) Date: Sat, 20 Jul 2013 01:47:12 +0000 Subject: [issue18508] enum.Enum population of _value2member_map does not match fallback search In-Reply-To: <1374270699.59.0.0195577431177.issue18508@psf.upfronthosting.co.za> Message-ID: <1374284832.53.0.802064132009.issue18508@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file30986/issue18510.stoneleaf.01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 04:09:16 2013 From: report at bugs.python.org (Ethan Furman) Date: Sat, 20 Jul 2013 02:09:16 +0000 Subject: [issue18508] enum.Enum population of _value2member_map does not match fallback search In-Reply-To: <1374270699.59.0.0195577431177.issue18508@psf.upfronthosting.co.za> Message-ID: <1374286156.29.0.732929885523.issue18508@psf.upfronthosting.co.za> Ethan Furman added the comment: Cleaner patch. ---------- Added file: http://bugs.python.org/file30987/issue18510.stoneleaf.02.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 04:31:21 2013 From: report at bugs.python.org (=?utf-8?q?Juan_Luis_Boya_Garc=C3=ADa?=) Date: Sat, 20 Jul 2013 02:31:21 +0000 Subject: [issue18512] sys.stdout.write does not allow bytes in Python 3.x Message-ID: <1374287481.36.0.643885131326.issue18512@psf.upfronthosting.co.za> New submission from Juan Luis Boya Garc?a: Sometimes developers need to write text to stdout, and it's nice to have on the fly Unicode to UTF-8 conversion (or what matches the platform), but sometimes they also need to output binary blobs, like text encoded in other codifications than the system default, binary files, etc. Python2 does the thing more-or-less right and allows writing both text and binary. I think Python3 should also accept both. ---------- components: Library (Lib) messages: 193394 nosy: ntrrgc priority: normal severity: normal status: open title: sys.stdout.write does not allow bytes in Python 3.x type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 04:31:42 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Jul 2013 02:31:42 +0000 Subject: [issue18504] IDLE:Improvements- Improving Mock_Text In-Reply-To: <1374238852.66.0.963662486602.issue18504@psf.upfronthosting.co.za> Message-ID: <1374287502.04.0.411723271756.issue18504@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Further changes should be aimed at actual idlelib uses. Wordstart and wordend are used once each in AutoExpand.py (and wordstart a couple of times for tag.start positions). So forget them. Does idlelib really have indexes like "2.3 + 1c" ('2.4'), "2.3-1c" ('2.2'), and "22.33-1chars" ('22.32')? The grammar we need to parse is something like index := base modifier* # nearly always 0, 1, few 2, one 3 times, so index := base modifier{0:3} index := base modmaybe modmaybe modmaybe base := numpair | mark numpair := int '.' ( int | 'end' ) mark := 'end' | 'insert' | 'iomark' | 'my_anchor' | 'sel.first' | sel.last # parts tags but this should work modmaybe := modifier | '' modifier := ' linestart' | ' lineend' | incr incr := ' '* ('+' | '-') ' '* int ('c' | 'line') # Could change the one 'char' to 'c' Rather than parse an entire index at once, parse, interpret as position, and remove base from input. While remainder, parse, apply to position, and remove from remainder. Whether the parsing is done with base and modifier REs with groups or code or some mixture does not much matter. ---------- assignee: -> terry.reedy nosy: +terry.reedy stage: -> test needed type: -> enhancement versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 04:36:10 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Jul 2013 02:36:10 +0000 Subject: [issue18508] enum.Enum population of _value2member_map does not match fallback search In-Reply-To: <1374270699.59.0.0195577431177.issue18508@psf.upfronthosting.co.za> Message-ID: <3bxtVy189cz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 37c427e3eb94 by Ethan Furman in branch 'default': Close #18508 -- fix _value2member_map to always have the member's value http://hg.python.org/cpython/rev/37c427e3eb94 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 05:01:54 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 20 Jul 2013 03:01:54 +0000 Subject: [issue18503] No assertion in test_del_param_on_nonexistent_header function and unused variables in some places in test_email.py In-Reply-To: <1374232217.26.0.713438373749.issue18503@psf.upfronthosting.co.za> Message-ID: <1374289314.0.0.927963284024.issue18503@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Okay, next time I'll separate the problems into different tickets. Here is the patch to clean up the test. ---------- Added file: http://bugs.python.org/file30988/small_clean_up_to_test_email.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 06:26:46 2013 From: report at bugs.python.org (paul j3) Date: Sat, 20 Jul 2013 04:26:46 +0000 Subject: [issue18467] argparse - problematic 'default' behavior In-Reply-To: <1373927590.26.0.302211166373.issue18467@psf.upfronthosting.co.za> Message-ID: <1374294406.76.0.0861883216377.issue18467@psf.upfronthosting.co.za> paul j3 added the comment: Since parse_args takes an optional Namespace argument, you can set the its initial value to almost anything. For example, with the functions defined previously: parser = argparse.ArgumentParser() parser.add_argument('-a','--algorithm', choices=['Q','S'], action=FooAction, type=bar) NS = parser.parse_args(['-a','S']) args = parser.parse_args(None, NS) The first parse_args uses FooAction to create a default Namespace, which is then passed to the second. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 07:22:49 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Jul 2013 05:22:49 +0000 Subject: [issue18511] random.shuffle could be faster In-Reply-To: <1374280444.52.0.0757493000076.issue18511@psf.upfronthosting.co.za> Message-ID: <1374297769.14.0.451142706517.issue18511@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 07:25:36 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Jul 2013 05:25:36 +0000 Subject: [issue18511] random.shuffle could be faster In-Reply-To: <1374280444.52.0.0757493000076.issue18511@psf.upfronthosting.co.za> Message-ID: <1374297936.49.0.352429954793.issue18511@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The reversed() call is only executed once and is not inside the loop body, so its runtime is irrelevant to most shuffles. Also, the reason that reversed() is used is that is adds clarity to the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 07:31:16 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Jul 2013 05:31:16 +0000 Subject: [issue18511] random.shuffle could be faster In-Reply-To: <1374280444.52.0.0757493000076.issue18511@psf.upfronthosting.co.za> Message-ID: <1374298276.81.0.349176730188.issue18511@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: normal -> low versions: -3rd party, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 07:32:35 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Jul 2013 05:32:35 +0000 Subject: [issue18511] random.shuffle could be faster In-Reply-To: <1374280444.52.0.0757493000076.issue18511@psf.upfronthosting.co.za> Message-ID: <1374298355.84.0.240742509171.issue18511@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- Removed message: http://bugs.python.org/msg193399 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 07:40:52 2013 From: report at bugs.python.org (Brian Thorne) Date: Sat, 20 Jul 2013 05:40:52 +0000 Subject: [issue18511] random.shuffle could be faster In-Reply-To: <1374280444.52.0.0757493000076.issue18511@psf.upfronthosting.co.za> Message-ID: <1374298852.57.0.575210714695.issue18511@psf.upfronthosting.co.za> Brian Thorne added the comment: Just did some testing on 2.7 and 3.3 on Windows and Ubuntu, the speedup is just noticeable - but much less so as the list grows. ---------- nosy: +Thorney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 08:29:20 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 20 Jul 2013 06:29:20 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1374284751.72.0.09001882885.issue15805@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: +1 for io as an intuitive home for a basic version that redirects the current process output only (and is documented as doing so). While I like the idea of offering a more sophisticated version that affects subprocesses as well, I think that would be a very surprising thing to do by default and should be a separate issue (perhaps proposing such an addition to the subprocess module). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 10:22:09 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Jul 2013 08:22:09 +0000 Subject: [issue18513] test.cmath fails on OS/X with gcc-4.8 in non-debug build Message-ID: <1374308529.32.0.533488651827.issue18513@psf.upfronthosting.co.za> New submission from Raymond Hettinger: ====================================================================== FAIL: test_specific_values (__main__.CMathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/raymondhettinger/cpython/Lib/test/test_cmath.py", line 382, in test_specific_values msg=error_message) File "/Users/raymondhettinger/cpython/Lib/test/test_cmath.py", line 128, in rAssertAlmostEqual 'got {!r}'.format(a, b)) AssertionError: rect1017: rect(complex(0.0, -0.0)) Expected: complex(0.0, -0.0) Received: complex(0.0, 0.0) Received value insufficiently close to expected value. ---------- assignee: mark.dickinson components: Extension Modules messages: 193402 nosy: mark.dickinson, rhettinger priority: normal severity: normal status: open title: test.cmath fails on OS/X with gcc-4.8 in non-debug build type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 11:11:30 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Jul 2013 09:11:30 +0000 Subject: [issue18511] random.shuffle could be faster In-Reply-To: <1374280444.52.0.0757493000076.issue18511@psf.upfronthosting.co.za> Message-ID: <1374311490.88.0.997383574463.issue18511@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Both versions loop over the exact same iterator, so both loops run at the same speed once they are started up. Your timeit code isn't measuring shuffle(). Instead, it measures list() which knows how to extract a useful length hint from xrange() but not from an xrange iterator. The timing difference disappears if you add iter(): current = '''list(reversed(xrange(1, n)))''' proposd = '''list(iter(xrange(n, 1, -1)))''' If you were to time shuffle() directly, you would see almost no difference between the current version and the patched version (there is a small difference in startup time due to the lookup of the reversed() built-in, but that is it). ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 12:50:23 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Sat, 20 Jul 2013 10:50:23 +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: <1374317423.48.0.789224128017.issue18512@psf.upfronthosting.co.za> Richard Oudkerk added the comment: You can do sys.stdout.buffer.write(b"hello") See http://docs.python.org/dev/library/io.html?highlight=buffer#io.TextIOBase.buffer ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 12:56:22 2013 From: report at bugs.python.org (Doug Hellmann) Date: Sat, 20 Jul 2013 10:56:22 +0000 Subject: [issue17998] internal error in regular expression engine In-Reply-To: <1368803354.84.0.768428094886.issue17998@psf.upfronthosting.co.za> Message-ID: <1374317782.49.0.014665283398.issue17998@psf.upfronthosting.co.za> Changes by Doug Hellmann : ---------- nosy: +doughellmann _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 14:19:56 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Jul 2013 12:19:56 +0000 Subject: [issue18327] swapped arguments in compatible_for_assignment()? In-Reply-To: <1372532925.38.0.271653772611.issue18327@psf.upfronthosting.co.za> Message-ID: <3by7SW36tJz7LkQ@mail.python.org> Roundup Robot added the comment: New changeset a65856044ad4 by Christian Heimes in branch 'default': Issue #18327: Fix argument order in call to compatible_for_assignment(oldto, newto, attr). http://hg.python.org/cpython/rev/a65856044ad4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 14:20:36 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 20 Jul 2013 12:20:36 +0000 Subject: [issue18327] swapped arguments in compatible_for_assignment()? In-Reply-To: <1372532925.38.0.271653772611.issue18327@psf.upfronthosting.co.za> Message-ID: <1374322836.13.0.73080523348.issue18327@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 14:40:37 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 20 Jul 2013 12:40:37 +0000 Subject: [issue18514] Unreachable Py_DECREF() in ctypes's PyCData_FromBaseObj() Message-ID: <1374324037.75.0.169548913827.issue18514@psf.upfronthosting.co.za> New submission from Christian Heimes: http://hg.python.org/cpython/file/a65856044ad4/Modules/_ctypes/_ctypes.c#l2673 Coverity analysis: 2672 } else { /* copy contents of adr */ 2673 if (-1 == PyCData_MallocBuffer(cmem, dict)) { 2674 return NULL; CID 715381: Structurally dead code (UNREACHABLE)unreachable: This code cannot be reached: "do { PyObject *_py_decref...". 2675 Py_DECREF(cmem); 2676 } ---------- components: Extension Modules files: frombaseobj.patch keywords: patch messages: 193406 nosy: christian.heimes priority: low severity: normal stage: needs patch status: open title: Unreachable Py_DECREF() in ctypes's PyCData_FromBaseObj() type: resource usage versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30989/frombaseobj.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 15:07:59 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 20 Jul 2013 13:07:59 +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: <1374325679.81.0.914196706334.issue18512@psf.upfronthosting.co.za> R. David Murray added the comment: The fundamental behavior here is not going to change, as maintaining a bright line between bytes and strings is central to Python3's design. The question is, does the method for achieving your goal need better documentation? ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, r.david.murray versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 16:37:24 2013 From: report at bugs.python.org (Daniel Holth) Date: Sat, 20 Jul 2013 14:37:24 +0000 Subject: [issue18515] zipfile._ZipDecryptor generates wasteful crc32 table on import Message-ID: <1374331044.49.0.0628884037506.issue18515@psf.upfronthosting.co.za> New submission from Daniel Holth: http://hg.python.org/cpython/file/e7305517260b/Lib/zipfile.py#l460 I noticed this table taking up time on import. I'd guess that it pre-dates zlib.crc32 which is imported at the top of the file. I also suspect that most of the time this table isn't even used at all. ---------- files: zipfile-no-crc32.patch keywords: patch messages: 193408 nosy: dholth priority: normal severity: normal status: open title: zipfile._ZipDecryptor generates wasteful crc32 table on import versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30990/zipfile-no-crc32.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 17:01:36 2013 From: report at bugs.python.org (Daniel Holth) Date: Sat, 20 Jul 2013 15:01:36 +0000 Subject: [issue18515] zipfile._ZipDecryptor generates wasteful crc32 table on import In-Reply-To: <1374331044.49.0.0628884037506.issue18515@psf.upfronthosting.co.za> Message-ID: <1374332496.36.0.729418153483.issue18515@psf.upfronthosting.co.za> Daniel Holth added the comment: Someone who has a better understanding of zipfile may be able to get zlib.crc32(bytes[ch], running_crc) to work correctly. This patch that passes the zipfile tests generates the crctable only when _ZipDecrypter() is instantiated. ---------- Added file: http://bugs.python.org/file30991/zdlazy.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 17:47:01 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 20 Jul 2013 15:47:01 +0000 Subject: [issue18513] test.cmath fails on OS/X with gcc-4.8 in non-debug build In-Reply-To: <1374308529.32.0.533488651827.issue18513@psf.upfronthosting.co.za> Message-ID: <1374335221.22.0.12326692476.issue18513@psf.upfronthosting.co.za> Mark Dickinson added the comment: Hmm. Looks similar to issue #15477, but that one was fixed (we added a local workaround and reported the OS bug to Apple). And it was with clang rather than gcc. Raymond: from the title, can I assume that you don't see this failure on a debug build? That would tend to point to a compiler optimization bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 18:09:17 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Jul 2013 16:09:17 +0000 Subject: [issue18515] zipfile._ZipDecryptor generates wasteful crc32 table on import In-Reply-To: <1374331044.49.0.0628884037506.issue18515@psf.upfronthosting.co.za> Message-ID: <1374336557.7.0.470698359995.issue18515@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Library (Lib) nosy: +alanmcintyre, loewis, serhiy.storchaka stage: -> patch review type: -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 18:13:21 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Jul 2013 16:13:21 +0000 Subject: [issue18515] zipfile._ZipDecryptor generates wasteful crc32 table on import In-Reply-To: <1374331044.49.0.0628884037506.issue18515@psf.upfronthosting.co.za> Message-ID: <1374336801.88.0.272749983229.issue18515@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: How much time take it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 18:45:33 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 20 Jul 2013 16:45:33 +0000 Subject: [issue18513] test.cmath fails on OS/X with gcc-4.8 in non-debug build In-Reply-To: <1374308529.32.0.533488651827.issue18513@psf.upfronthosting.co.za> Message-ID: <1374338733.94.0.588648920846.issue18513@psf.upfronthosting.co.za> Mark Dickinson added the comment: I can't reproduce this here on OS 10.6 (I don't have access to anything later), but I think I can guess what's happening: I suspect that gcc 4.8 is optimizing the pair of 'cos' and 'sin' calls into a single call to 'cexp'. And then the OS X library implementation of _cexp has buggy behaviour with respect to signs of zeros (this last part is something I've witnessed before, but I forget which version of OS X it was on). It's easy to work around, by adding a special case for zeros in cmath_rect. It's a bit annoying to have to do so, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 19:00:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Jul 2013 17:00:27 +0000 Subject: [issue18513] test.cmath fails on OS/X with gcc-4.8 in non-debug build In-Reply-To: <1374308529.32.0.533488651827.issue18513@psf.upfronthosting.co.za> Message-ID: <3byFhB6bTVz7Ljm@mail.python.org> Roundup Robot added the comment: New changeset ce771c2d0220 by Mark Dickinson in branch '3.3': Issue #18513: Add workaround for OS X 10.8 cexp bug that leads to wrong cmath.rect(0.0,-0.0) results. http://hg.python.org/cpython/rev/ce771c2d0220 New changeset ae769deb45b2 by Mark Dickinson in branch 'default': Issue #18513: Add workaround for OS X 10.8 cexp bug that leads to wrong cmath.rect(0.0,-0.0) results. http://hg.python.org/cpython/rev/ae769deb45b2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 19:01:07 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 20 Jul 2013 17:01:07 +0000 Subject: [issue18513] test.cmath fails on OS/X with gcc-4.8 in non-debug build In-Reply-To: <1374308529.32.0.533488651827.issue18513@psf.upfronthosting.co.za> Message-ID: <1374339667.2.0.835437940115.issue18513@psf.upfronthosting.co.za> Mark Dickinson added the comment: Should be fixed now. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 19:24:26 2013 From: report at bugs.python.org (=?utf-8?q?Jan_Pokorn=C3=BD?=) Date: Sat, 20 Jul 2013 17:24:26 +0000 Subject: [issue14103] argparse: add ability to create a bash completion script In-Reply-To: <1330031882.01.0.825351616002.issue14103@psf.upfronthosting.co.za> Message-ID: <1374341066.8.0.474428129525.issue14103@psf.upfronthosting.co.za> Changes by Jan Pokorn? : ---------- nosy: +jpokorny _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 19:26:43 2013 From: report at bugs.python.org (=?utf-8?q?Jan_Pokorn=C3=BD?=) Date: Sat, 20 Jul 2013 17:26:43 +0000 Subject: [issue9216] FIPS support for hashlib In-Reply-To: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> Message-ID: <1374341203.7.0.385114150538.issue9216@psf.upfronthosting.co.za> Changes by Jan Pokorn? : ---------- nosy: +jpokorny _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 19:27:27 2013 From: report at bugs.python.org (=?utf-8?q?Jan_Pokorn=C3=BD?=) Date: Sat, 20 Jul 2013 17:27:27 +0000 Subject: [issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib" In-Reply-To: <1278097810.42.0.823869291087.issue9146@psf.upfronthosting.co.za> Message-ID: <1374341247.54.0.876940970417.issue9146@psf.upfronthosting.co.za> Changes by Jan Pokorn? : ---------- nosy: +jpokorny _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 19:35:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Jul 2013 17:35:32 +0000 Subject: [issue9177] ssl.read/write on closed socket raises AttributeError In-Reply-To: <1278409980.47.0.00506027612669.issue9177@psf.upfronthosting.co.za> Message-ID: <3byGSg3xm1z7LjR@mail.python.org> Roundup Robot added the comment: New changeset eda7e86bf03c by Antoine Pitrou in branch 'default': Issue #9177: Calling read() or write() now raises ValueError, not AttributeError, on a closed SSL socket. http://hg.python.org/cpython/rev/eda7e86bf03c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 19:36:06 2013 From: report at bugs.python.org (Daniel Holth) Date: Sat, 20 Jul 2013 17:36:06 +0000 Subject: [issue18515] zipfile._ZipDecryptor generates wasteful crc32 table on import In-Reply-To: <1374336801.88.0.272749983229.issue18515@psf.upfronthosting.co.za> Message-ID: <1374341763.9576.9223372036855100357.42E61FC1@webmail.messagingengine.com> Daniel Holth added the comment: It takes 706 microseconds. On my machine %timeit import sys; del sys.modules['zipfile']; import zipfile "import zipfile" takes 2.51 ms without the patch and 1.7 ms with the patch. On Sat, Jul 20, 2013, at 12:13 PM, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > How much time take it? > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 19:39:24 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Jul 2013 17:39:24 +0000 Subject: [issue9177] ssl.read/write on closed socket raises AttributeError In-Reply-To: <1278409980.47.0.00506027612669.issue9177@psf.upfronthosting.co.za> Message-ID: <1374341964.21.0.454479324359.issue9177@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, I tweaked the error message a bit: _sslobj can also be None when unwrap() has been called on the socket. Thank you for contribution! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 19:59:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Jul 2013 17:59:51 +0000 Subject: [issue18513] test.cmath fails on OS/X with gcc-4.8 in non-debug build In-Reply-To: <1374308529.32.0.533488651827.issue18513@psf.upfronthosting.co.za> Message-ID: <3byH0l04Mrz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 91374660355a by Raymond Hettinger in branch '2.7': Issue #18513: Add workaround for OS X 10.8 cexp bug that leads to wrong cmath.rect(0.0,-0.0) results. http://hg.python.org/cpython/rev/91374660355a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 20:01:35 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Jul 2013 18:01:35 +0000 Subject: [issue18513] test.cmath fails on OS/X with gcc-4.8 in non-debug build In-Reply-To: <1374308529.32.0.533488651827.issue18513@psf.upfronthosting.co.za> Message-ID: <1374343295.34.0.319700657042.issue18513@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks Mark. test_cmath passed now. I've also applied this to Python2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 20:12:38 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 20 Jul 2013 18:12:38 +0000 Subject: [issue18513] test.cmath fails on OS/X with gcc-4.8 in non-debug build In-Reply-To: <1374308529.32.0.533488651827.issue18513@psf.upfronthosting.co.za> Message-ID: <1374343958.88.0.607548384469.issue18513@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks, Raymond. Postscript: I had a feeling of deja vu about this, and I've just been searching through old emails. It turns out I filed an OS X bug (#6466807 ) for this exact issue back in 2008; cexp was broken in 10.5, fixed in 10.6, and clearly is now broken again in 10.8. I've added a note to that Apple bug report, for what it's worth. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 00:08:59 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Jul 2013 22:08:59 +0000 Subject: [issue17532] IDLE: Always include "Options" menu on MacOSX In-Reply-To: <1364074890.28.0.799485456817.issue17532@psf.upfronthosting.co.za> Message-ID: <3byNXB4cW7z7Ljc@mail.python.org> Roundup Robot added the comment: New changeset f8df7c50132f by Ned Deily in branch '2.7': Issue #17532: Prevent exception when changing key sets if Options menu is empty. http://hg.python.org/cpython/rev/f8df7c50132f New changeset db6a22943a3f by Ned Deily in branch '3.3': Issue #17532: Prevent exception when changing key sets if Options menu is empty. http://hg.python.org/cpython/rev/db6a22943a3f New changeset 5643e873f06e by Ned Deily in branch 'default': Issue #17532: merge from 3.3 http://hg.python.org/cpython/rev/5643e873f06e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 00:14:58 2013 From: report at bugs.python.org (Daniel Holth) Date: Sat, 20 Jul 2013 22:14:58 +0000 Subject: [issue18515] zipfile._ZipDecryptor generates wasteful crc32 table on import In-Reply-To: <1374331044.49.0.0628884037506.issue18515@psf.upfronthosting.co.za> Message-ID: <1374358498.01.0.530928262746.issue18515@psf.upfronthosting.co.za> Daniel Holth added the comment: I tried it on a raspberry pi. zipfile takes 36 ms to import and 10 ms if it does not generate the crctable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 01:12:42 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 20 Jul 2013 23:12:42 +0000 Subject: [issue15905] Copy to fixed size buffer w/o check in sys_update_path In-Reply-To: <1347293386.49.0.00561600810364.issue15905@psf.upfronthosting.co.za> Message-ID: <1374361962.56.0.58788928889.issue15905@psf.upfronthosting.co.za> Christian Heimes added the comment: Here is a patch for 3.3 and tip that replaces wcscpy() with wcsncpy() and adds a proper NUL terminator at MAXPATHLEN. ---------- keywords: +patch stage: needs patch -> patch review versions: -Python 3.2 Added file: http://bugs.python.org/file30992/path_wcsncpy.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 01:15:38 2013 From: report at bugs.python.org (Derek Wilson) Date: Sat, 20 Jul 2013 23:15:38 +0000 Subject: [issue18233] SSLSocket.getpeercertchain() In-Reply-To: <1371415195.44.0.636993698614.issue18233@psf.upfronthosting.co.za> Message-ID: <1374362138.16.0.709188348344.issue18233@psf.upfronthosting.co.za> Changes by Derek Wilson : ---------- nosy: +Derek.Wilson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 01:42:20 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 20 Jul 2013 23:42:20 +0000 Subject: [issue18233] SSLSocket.getpeercertchain() In-Reply-To: <1371415195.44.0.636993698614.issue18233@psf.upfronthosting.co.za> Message-ID: <1374363740.42.0.451855636599.issue18233@psf.upfronthosting.co.za> Christian Heimes added the comment: >From Rietveld review: --- http://bugs.python.org/review/18233/diff/8422/Modules/_ssl.c#newcode1203 Modules/_ssl.c:1203: chain = X509_STORE_CTX_get1_chain(store_ctx); This isn't appropriate for this method. Specifically, you are asking for the peer cert chain, which purposefully does not include root CA certs that you trust. What you are giving here a complete validate chain from a peer cert to a trusted root. This is a valuable piece of information, but should be returned via another method (perhaps exposed in python as get1chain in SSLContext). But this method should always return the result of SSL_get_peer_cert_chain if a peer cert chain is available. --- You are making a good point. I'm either going to split it up into two function or provide a way to look up a cert by issuer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 04:57:33 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 21 Jul 2013 02:57:33 +0000 Subject: [issue18516] Typos in Lib/email/generator.py and Lib/email/architecture.rst Message-ID: <1374375453.94.0.44126763837.issue18516@psf.upfronthosting.co.za> New submission from Vajrasky Kok: [sky at localhost cpython]$ grep -n boudary Lib/email/generator.py 352: # _make_boudary = Generator._make_boundary [sky at localhost cpython]$ grep -n fuzy Lib/email/architecture.rst 27:This division is intentionally a bit fuzy; the API described by this documentation In addition to that, I found inconsistency in plural form of tuple. [sky at localhost cpython]$ grep -n "\-tuple" Lib/email/utils.py 79: """The inverse of parseaddr(), this takes a 2-tuple of the form 285: params is a sequence of 2-tuples containing (param name, string value). 291: # 3-tuple of the continuation number, the string value, and a flag But I think this issue is very very trivial and we can ignore it. ---------- assignee: docs at python components: Documentation messages: 193425 nosy: docs at python, r.david.murray, vajrasky priority: normal severity: normal status: open title: Typos in Lib/email/generator.py and Lib/email/architecture.rst versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 06:09:50 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 21 Jul 2013 04:09:50 +0000 Subject: [issue18516] Typos in Lib/email/generator.py and Lib/email/architecture.rst In-Reply-To: <1374375453.94.0.44126763837.issue18516@psf.upfronthosting.co.za> Message-ID: <1374379790.03.0.64886207168.issue18516@psf.upfronthosting.co.za> R. David Murray added the comment: The tuple pluralization looks correct to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 09:32:05 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 21 Jul 2013 07:32:05 +0000 Subject: [issue18516] Typos in Lib/email/generator.py and Lib/email/architecture.rst In-Reply-To: <1374375453.94.0.44126763837.issue18516@psf.upfronthosting.co.za> Message-ID: <1374391925.37.0.26297491493.issue18516@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Sorry, my bad. The tuple pluralization is correct. I read it wrongly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 10:02:40 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 21 Jul 2013 08:02:40 +0000 Subject: [issue18517] "xxlimited" extension declared incorrectly in setup.py Message-ID: <1374393760.41.0.977042124577.issue18517@psf.upfronthosting.co.za> New submission from Ned Deily: In the top-level setup.py, the code to define the Extension instance for the "xxlimited" extension is currently incorrectly located near the end of detect_tkinter() rather than in its parent detect_modules(). This has the effect of skipping the build of "xxlimited" on OS X since detect_tkinter() shortcuts to detect_tkinter_darwin() there. The attached patch corrects that. However, it does raise the question of why "xxlimited" is built at all for normal installable builds, since "xxlimited" is a dummy template module. The definition for the somewhat similar "xx" is commented out by default. Perhaps "xxlimited" should be as well. Or perhaps both should only be built for --with-pydebug configs. Opinions? ---------- components: Build messages: 193428 nosy: loewis, ned.deily priority: low severity: normal stage: patch review status: open title: "xxlimited" extension declared incorrectly in setup.py versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 10:04:11 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 21 Jul 2013 08:04:11 +0000 Subject: [issue18517] "xxlimited" extension declared incorrectly in setup.py In-Reply-To: <1374393760.41.0.977042124577.issue18517@psf.upfronthosting.co.za> Message-ID: <1374393851.97.0.70861728999.issue18517@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- keywords: +patch Added file: http://bugs.python.org/file30993/issue_XXXXX_setup_xxlimited.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 11:47:00 2013 From: report at bugs.python.org (icedream91) Date: Sun, 21 Jul 2013 09:47:00 +0000 Subject: [issue18518] timeit bug? Message-ID: <1374400020.0.0.45788018989.issue18518@psf.upfronthosting.co.za> New submission from icedream91: When I ran code below, it printed -1. The question is, the code in variable snippet, has wrong syntax, it can't be run. I think timeit should return only non-negative float type. from timeit import timeit snippet=""" for i in range(10): return -1 """ print(timeit(snippet)) Thanks. ---------- components: Library (Lib) messages: 193429 nosy: icedream91 priority: normal severity: normal status: open title: timeit bug? type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 11:55:34 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 21 Jul 2013 09:55:34 +0000 Subject: [issue18438] Obsolete url in comment inside decimal module In-Reply-To: <1373686911.48.0.750703855786.issue18438@psf.upfronthosting.co.za> Message-ID: <1374400534.42.0.017779753608.issue18438@psf.upfronthosting.co.za> Mark Dickinson added the comment: Searching around a bit, I did find a link to what looks like the actual version of IEEE 854 online. I don't think it would be appropriate to add such a link to the docs, though. It looks as though we'll have to settle for a reasonably persistent link that goes to a page *about* IEEE 854, rather than a link to a draft. The wikipedia page would seem reasonable: http://en.wikipedia.org/wiki/IEEE_854-1987 ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 11:57:50 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 21 Jul 2013 09:57:50 +0000 Subject: [issue18519] test_sqlite crashes on OS X tiger 3.x buildbot Message-ID: <1374400670.71.0.678852160853.issue18519@psf.upfronthosting.co.za> New submission from Ned Deily: See for instance: http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/6626 I was also able to reproduce and bisect on an OS X 10.5 (Leopard) PPC system: $ hg bisec -b The first bad revision is: changeset: 84704:48a869a39e2d user: Victor Stinner date: Thu Jul 18 01:41:08 2013 +0200 summary: Issue #18408: PyEval_EvalFrameEx() and PyEval_CallObjectWithKeywords() now fail Crash and gdb "where" with current tip: $ hg log -r tip changeset: 84749:5643e873f06e tag: tip parent: 84746:c5d128b201af parent: 84748:db6a22943a3f user: Ned Deily date: Sat Jul 20 15:08:22 2013 -0700 summary: Issue #17532: merge from 3.3 $ ./python -m test test_sqlite [1/1] test_sqlite Assertion failed: (!PyErr_Occurred()), function PyEval_EvalFrameEx, file Python/ceval.c, line 1210. Fatal Python error: Aborted Current thread 0xa0343820: File "/Volumes/cache/py/3x/unix/source/Lib/sqlite3/test/userfunctions.py", line 441 in authorizer_cb File "/Volumes/cache/py/3x/unix/source/Lib/sqlite3/test/userfunctions.py", line 406 in test_table_access File "/Volumes/cache/py/3x/unix/source/Lib/unittest/case.py", line 496 in run File "/Volumes/cache/py/3x/unix/source/Lib/unittest/case.py", line 535 in __call__ File "/Volumes/cache/py/3x/unix/source/Lib/unittest/suite.py", line 105 in run File "/Volumes/cache/py/3x/unix/source/Lib/unittest/suite.py", line 67 in __call__ File "/Volumes/cache/py/3x/unix/source/Lib/unittest/suite.py", line 105 in run File "/Volumes/cache/py/3x/unix/source/Lib/unittest/suite.py", line 67 in __call__ File "/Volumes/cache/py/3x/unix/source/Lib/unittest/suite.py", line 105 in run File "/Volumes/cache/py/3x/unix/source/Lib/unittest/suite.py", line 67 in __call__ File "/Volumes/cache/py/3x/unix/source/Lib/unittest/suite.py", line 105 in run File "/Volumes/cache/py/3x/unix/source/Lib/unittest/suite.py", line 67 in __call__ File "/Volumes/cache/py/3x/unix/source/Lib/test/support.py", line 1480 in run File "/Volumes/cache/py/3x/unix/source/Lib/test/support.py", line 1581 in _run_suite File "/Volumes/cache/py/3x/unix/source/Lib/test/support.py", line 1615 in run_unittest File "/Volumes/cache/py/3x/unix/source/Lib/test/regrtest.py", line 1304 in File "/Volumes/cache/py/3x/unix/source/Lib/test/regrtest.py", line 1305 in runtest_inner File "/Volumes/cache/py/3x/unix/source/Lib/test/regrtest.py", line 1009 in runtest File "/Volumes/cache/py/3x/unix/source/Lib/test/regrtest.py", line 796 in main File "/Volumes/cache/py/3x/unix/source/Lib/test/regrtest.py", line 1590 in main_in_temp_cwd File "/Volumes/cache/py/3x/unix/source/Lib/test/__main__.py", line 3 in File "/Volumes/cache/py/3x/unix/source/Lib/runpy.py", line 73 in _run_code File "/Volumes/cache/py/3x/unix/source/Lib/runpy.py", line 160 in _run_module_as_main Abort trap $ gdb ./python GNU gdb 6.3.50-20050815 (Apple version gdb-967) (Tue Jul 14 02:15:14 UTC 2009) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc-apple-darwin"...Reading symbols for shared libraries .... done (gdb) -m test -w -uall,-largefile test_sqlite Undefined command: "-m". Try "help". (gdb) r -m test -w -uall,-largefile test_sqlite Starting program: /Volumes/cache/py/3x/unix/source/python -m test -w -uall,-largefile test_sqlite Reading symbols for shared libraries +++..... done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries ... done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries .. done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries .. done Reading symbols for shared libraries . done Reading symbols for shared libraries . done [1/1] test_sqlite Reading symbols for shared libraries .. done Reading symbols for shared libraries . done Assertion failed: (!PyErr_Occurred()), function PyEval_EvalFrameEx, file Python/ceval.c, line 1210. Program received signal SIGABRT, Aborted. 0x918089f0 in __kill () (gdb) where #0 0x918089f0 in __kill () #1 0x918a3bfc in abort () #2 0x91896c0c in __assert_rtn () #3 0x001bb630 in PyEval_EvalFrameEx (f=0x15e04d0, throwflag=0) at Python/ceval.c:1210 #4 0x001cda1c in PyEval_EvalCodeEx (_co=0x1528df8, globals=0x14fe778, locals=0x0, args=0x12b9cf4, argcount=5, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3567 #5 0x0006a07c in function_call (func=0x152fa58, arg=0x12b9ce0, kw=0x0) at Objects/funcobject.c:633 #6 0x00012918 in PyObject_Call (func=0x152fa58, arg=0x12b9ce0, kw=0x0) at Objects/abstract.c:2105 #7 0x00012b74 in call_function_tail (callable=0x152fa58, args=0x12b9ce0) at Objects/abstract.c:2142 #8 0x00012cc8 in PyObject_CallFunction (callable=0x152fa58, format=0x14eaa88 "issss") at Objects/abstract.c:2166 #9 0x014deaac in _authorizer_callback (user_arg=0x152fa58, action=20, arg1=0x5a2910 "t2", arg2=0x5a21b0 "c2", dbname=0x94145940 "main", access_attempt_source=0x0) at /Volumes/cache/py/3x/unix/source/Modules/_sqlite/connection.c:886 #10 0x940e6a60 in lookupName () #11 0x9412a2f0 in nameResolverStep () #12 0x940c62a8 in walkExprTree () #13 0x94129e40 in sqlite3SelectResolve () #14 0x9410c2f4 in sqlite3Select () #15 0x9411d848 in yy_reduce () #16 0x941213a4 in sqlite3Parser () #17 0x94121928 in sqlite3RunParser () #18 0x94123364 in sqlite3Prepare () #19 0x014e7c94 in pysqlite_statement_create (self=0x15e3290, connection=0x15dc7a8, sql=0x1529388) at /Volumes/cache/py/3x/unix/source/Modules/_sqlite/statement.c:73 #20 0x014dfaf4 in pysqlite_connection_call (self=0x15dc7a8, args=0x15e3150, kwargs=0x0) at /Volumes/cache/py/3x/unix/source/Modules/_sqlite/connection.c:1231 #21 0x00012918 in PyObject_Call (func=0x15dc7a8, arg=0x15e3150, kw=0x0) at Objects/abstract.c:2105 #22 0x00012b74 in call_function_tail (callable=0x15dc7a8, args=0x15e3150) at Objects/abstract.c:2142 #23 0x00012cc8 in PyObject_CallFunction (callable=0x15dc7a8, format=0x14ea730 "O") at Objects/abstract.c:2166 #24 0x014db6d8 in pysqlite_cache_get (self=0x15e3178, args=0x15e3150) at /Volumes/cache/py/3x/unix/source/Modules/_sqlite/cache.c:184 #25 0x014e38a0 in _pysqlite_query_execute (self=0x15cd080, multiple=0, args=0x15e3380) at /Volumes/cache/py/3x/unix/source/Modules/_sqlite/cursor.c:541 #26 0x014e47d4 in pysqlite_cursor_execute (self=0x15cd080, args=0x15e3380) at /Volumes/cache/py/3x/unix/source/Modules/_sqlite/cursor.c:752 #27 0x000a3c00 in PyCFunction_Call (func=0x1502eb8, arg=0x15e3380, kw=0x0) at Objects/methodobject.c:93 #28 0x00012918 in PyObject_Call (func=0x1502eb8, arg=0x15e3380, kw=0x0) at Objects/abstract.c:2105 #29 0x001d0110 in PyEval_CallObjectWithKeywords (func=0x1502eb8, arg=0x15e3380, kw=0x0) at Python/ceval.c:4089 #30 0x0001284c in PyObject_CallObject (o=0x1502eb8, a=0x15e3380) at Objects/abstract.c:2093 #31 0x014dff64 in pysqlite_connection_execute (self=0x15dc7a8, args=0x15e3380, kwargs=0x0) at /Volumes/cache/py/3x/unix/source/Modules/_sqlite/connection.c:1281 #32 0x000a3c00 in PyCFunction_Call (func=0x1502f78, arg=0x15e3380, kw=0x0) at Objects/methodobject.c:93 #33 0x001d0bfc in call_function (pp_stack=0xbffefb70, oparg=1) at Python/ceval.c:4213 #34 0x001c8954 in PyEval_EvalFrameEx (f=0x15e1038, throwflag=0) at Python/ceval.c:2818 #35 0x001d12fc in fast_function (func=0x152f8d8, pp_stack=0xbfff04f0, n=1, na=1, nk=0) at Python/ceval.c:4310 #36 0x001d0e44 in call_function (pp_stack=0xbfff04f0, oparg=0) at Python/ceval.c:4238 #37 0x001c8954 in PyEval_EvalFrameEx (f=0x944220, throwflag=0) at Python/ceval.c:2818 #38 0x001cda1c in PyEval_EvalCodeEx (_co=0x11e2e60, globals=0x11d50f8, locals=0x0, args=0x158558c, argcount=2, kws=0x42804c, kwcount=0, defs=0x121cb04, defcount=1, kwdefs=0x0, closure=0x0) at Python/ceval.c:3567 #39 0x0006a07c in function_call (func=0x1223098, arg=0x1585578, kw=0x1585538) at Objects/funcobject.c:633 #40 0x00012918 in PyObject_Call (func=0x1223098, arg=0x1585578, kw=0x1585538) at Objects/abstract.c:2105 #41 0x001d2668 in ext_do_call (func=0x1223098, pp_stack=0xbfff0fe4, flags=3, na=1, nk=0) at Python/ceval.c:4537 #42 0x001c8d94 in PyEval_EvalFrameEx (f=0x158a038, throwflag=0) at Python/ceval.c:2858 #43 0x001cda1c in PyEval_EvalCodeEx (_co=0x11e2f30, globals=0x11d50f8, locals=0x0, args=0x158550c, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3567 #44 0x0006a07c in function_call (func=0x1223158, arg=0x15854f8, kw=0x0) at Objects/funcobject.c:633 #45 0x00012918 in PyObject_Call (func=0x1223158, arg=0x15854f8, kw=0x0) at Objects/abstract.c:2105 #46 0x0003dec0 in method_call (func=0x1223158, arg=0x15854f8, kw=0x0) at Objects/classobject.c:323 #47 0x00012918 in PyObject_Call (func=0x11d8f78, arg=0x1589188, kw=0x0) at Objects/abstract.c:2105 #48 0x000e3c68 in slot_tp_call (self=0x157dcb0, args=0x1589188, kwds=0x0) at Objects/typeobject.c:5360 #49 0x00012918 in PyObject_Call (func=0x157dcb0, arg=0x1589188, kw=0x0) at Objects/abstract.c:2105 #50 0x001d1ed4 in do_call (func=0x157dcb0, pp_stack=0xbfff1d20, na=1, nk=0) at Python/ceval.c:4442 #51 0x001d0e64 in call_function (pp_stack=0xbfff1d20, oparg=1) at Python/ceval.c:4240 #52 0x001c8954 in PyEval_EvalFrameEx (f=0x15884e8, throwflag=0) at Python/ceval.c:2818 #53 0x001cda1c in PyEval_EvalCodeEx (_co=0x121aab8, globals=0x11d5638, locals=0x0, args=0x15854cc, argcount=2, kws=0x42804c, kwcount=0, defs=0x122b27c, defcount=1, kwdefs=0x0, closure=0x0) at Python/ceval.c:3567 #54 0x0006a07c in function_call (func=0x122d0f8, arg=0x15854b8, kw=0x1585478) at Objects/funcobject.c:633 #55 0x00012918 in PyObject_Call (func=0x122d0f8, arg=0x15854b8, kw=0x1585478) at Objects/abstract.c:2105 #56 0x001d2668 in ext_do_call (func=0x122d0f8, pp_stack=0xbfff2814, flags=3, na=1, nk=0) at Python/ceval.c:4537 #57 0x001c8d94 in PyEval_EvalFrameEx (f=0x1493ab8, throwflag=0) at Python/ceval.c:2858 #58 0x001cda1c in PyEval_EvalCodeEx (_co=0x121aa50, globals=0x11d5638, locals=0x0, args=0x156ff0c, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3567 #59 0x0006a07c in function_call (func=0x1226f98, arg=0x156fef8, kw=0x0) at Objects/funcobject.c:633 #60 0x00012918 in PyObject_Call (func=0x1226f98, arg=0x156fef8, kw=0x0) at Objects/abstract.c:2105 #61 0x0003dec0 in method_call (func=0x1226f98, arg=0x156fef8, kw=0x0) at Objects/classobject.c:323 #62 0x00012918 in PyObject_Call (func=0x1142a78, arg=0x15890e0, kw=0x0) at Objects/abstract.c:2105 #63 0x000e3c68 in slot_tp_call (self=0x157dc40, args=0x15890e0, kwds=0x0) at Objects/typeobject.c:5360 #64 0x00012918 in PyObject_Call (func=0x157dc40, arg=0x15890e0, kw=0x0) at Objects/abstract.c:2105 #65 0x001d1ed4 in do_call (func=0x157dc40, pp_stack=0xbfff3550, na=1, nk=0) at Python/ceval.c:4442 #66 0x001d0e64 in call_function (pp_stack=0xbfff3550, oparg=1) at Python/ceval.c:4240 #67 0x001c8954 in PyEval_EvalFrameEx (f=0x1588358, throwflag=0) at Python/ceval.c:2818 #68 0x001cda1c in PyEval_EvalCodeEx (_co=0x121aab8, globals=0x11d5638, locals=0x0, args=0x156fe8c, argcount=2, kws=0x42804c, kwcount=0, defs=0x122b27c, defcount=1, kwdefs=0x0, closure=0x0) at Python/ceval.c:3567 #69 0x0006a07c in function_call (func=0x122d0f8, arg=0x156fe78, kw=0x1585438) at Objects/funcobject.c:633 #70 0x00012918 in PyObject_Call (func=0x122d0f8, arg=0x156fe78, kw=0x1585438) at Objects/abstract.c:2105 #71 0x001d2668 in ext_do_call (func=0x122d0f8, pp_stack=0xbfff4044, flags=3, na=1, nk=0) at Python/ceval.c:4537 #72 0x001c8d94 in PyEval_EvalFrameEx (f=0x14937b8, throwflag=0) at Python/ceval.c:2858 #73 0x001cda1c in PyEval_EvalCodeEx (_co=0x121aa50, globals=0x11d5638, locals=0x0, args=0x156fe4c, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3567 #74 0x0006a07c in function_call (func=0x1226f98, arg=0x156fe38, kw=0x0) at Objects/funcobject.c:633 #75 0x00012918 in PyObject_Call (func=0x1226f98, arg=0x156fe38, kw=0x0) at Objects/abstract.c:2105 #76 0x0003dec0 in method_call (func=0x1226f98, arg=0x156fe38, kw=0x0) at Objects/classobject.c:323 #77 0x00012918 in PyObject_Call (func=0x12150b8, arg=0x1589038, kw=0x0) at Objects/abstract.c:2105 #78 0x000e3c68 in slot_tp_call (self=0x1485540, args=0x1589038, kwds=0x0) at Objects/typeobject.c:5360 #79 0x00012918 in PyObject_Call (func=0x1485540, arg=0x1589038, kw=0x0) at Objects/abstract.c:2105 #80 0x001d1ed4 in do_call (func=0x1485540, pp_stack=0xbfff4d80, na=1, nk=0) at Python/ceval.c:4442 #81 0x001d0e64 in call_function (pp_stack=0xbfff4d80, oparg=1) at Python/ceval.c:4240 #82 0x001c8954 in PyEval_EvalFrameEx (f=0x15881c8, throwflag=0) at Python/ceval.c:2818 #83 0x001cda1c in PyEval_EvalCodeEx (_co=0x121aab8, globals=0x11d5638, locals=0x0, args=0x156f70c, argcount=2, kws=0x42804c, kwcount=0, defs=0x122b27c, defcount=1, kwdefs=0x0, closure=0x0) at Python/ceval.c:3567 #84 0x0006a07c in function_call (func=0x122d0f8, arg=0x156f6f8, kw=0x15853f8) at Objects/funcobject.c:633 #85 0x00012918 in PyObject_Call (func=0x122d0f8, arg=0x156f6f8, kw=0x15853f8) at Objects/abstract.c:2105 #86 0x001d2668 in ext_do_call (func=0x122d0f8, pp_stack=0xbfff5874, flags=3, na=1, nk=0) at Python/ceval.c:4537 #87 0x001c8d94 in PyEval_EvalFrameEx (f=0x14931b8, throwflag=0) at Python/ceval.c:2858 #88 0x001cda1c in PyEval_EvalCodeEx (_co=0x121aa50, globals=0x11d5638, locals=0x0, args=0x12f7dcc, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3567 #89 0x0006a07c in function_call (func=0x1226f98, arg=0x12f7db8, kw=0x0) at Objects/funcobject.c:633 #90 0x00012918 in PyObject_Call (func=0x1226f98, arg=0x12f7db8, kw=0x0) at Objects/abstract.c:2105 #91 0x0003dec0 in method_call (func=0x1226f98, arg=0x12f7db8, kw=0x0) at Objects/classobject.c:323 #92 0x00012918 in PyObject_Call (func=0x1480878, arg=0x1575460, kw=0x0) at Objects/abstract.c:2105 #93 0x000e3c68 in slot_tp_call (self=0x1581f18, args=0x1575460, kwds=0x0) at Objects/typeobject.c:5360 #94 0x00012918 in PyObject_Call (func=0x1581f18, arg=0x1575460, kw=0x0) at Objects/abstract.c:2105 #95 0x001d1ed4 in do_call (func=0x1581f18, pp_stack=0xbfff65b0, na=1, nk=0) at Python/ceval.c:4442 #96 0x001d0e64 in call_function (pp_stack=0xbfff65b0, oparg=1) at Python/ceval.c:4240 #97 0x001c8954 in PyEval_EvalFrameEx (f=0x1588038, throwflag=0) at Python/ceval.c:2818 #98 0x001cda1c in PyEval_EvalCodeEx (_co=0x121aab8, globals=0x11d5638, locals=0x0, args=0x12c440c, argcount=2, kws=0x42804c, kwcount=0, defs=0x122b27c, defcount=1, kwdefs=0x0, closure=0x0) at Python/ceval.c:3567 #99 0x0006a07c in function_call (func=0x122d0f8, arg=0x12c43f8, kw=0x15853b8) at Objects/funcobject.c:633 #100 0x00012918 in PyObject_Call (func=0x122d0f8, arg=0x12c43f8, kw=0x15853b8) at Objects/abstract.c:2105 #101 0x001d2668 in ext_do_call (func=0x122d0f8, pp_stack=0xbfff70a4, flags=3, na=1, nk=0) at Python/ceval.c:4537 #102 0x001c8d94 in PyEval_EvalFrameEx (f=0x1493938, throwflag=0) at Python/ceval.c:2858 #103 0x001cda1c in PyEval_EvalCodeEx (_co=0x121aa50, globals=0x11d5638, locals=0x0, args=0x136124c, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3567 #104 0x0006a07c in function_call (func=0x1226f98, arg=0x1361238, kw=0x0) at Objects/funcobject.c:633 #105 0x00012918 in PyObject_Call (func=0x1226f98, arg=0x1361238, kw=0x0) at Objects/abstract.c:2105 #106 0x0003dec0 in method_call (func=0x1226f98, arg=0x1361238, kw=0x0) at Objects/classobject.c:323 #107 0x00012918 in PyObject_Call (func=0x1215078, arg=0x12c11f8, kw=0x0) at Objects/abstract.c:2105 #108 0x000e3c68 in slot_tp_call (self=0x147da10, args=0x12c11f8, kwds=0x0) at Objects/typeobject.c:5360 #109 0x00012918 in PyObject_Call (func=0x147da10, arg=0x12c11f8, kw=0x0) at Objects/abstract.c:2105 #110 0x001d1ed4 in do_call (func=0x147da10, pp_stack=0xbfff7de0, na=1, nk=0) at Python/ceval.c:4442 #111 0x001d0e64 in call_function (pp_stack=0xbfff7de0, oparg=1) at Python/ceval.c:4240 #112 0x001c8954 in PyEval_EvalFrameEx (f=0x1484c78, throwflag=0) at Python/ceval.c:2818 #113 0x001d12fc in fast_function (func=0x14795d8, pp_stack=0xbfff8760, n=2, na=2, nk=0) at Python/ceval.c:4310 #114 0x001d0e44 in call_function (pp_stack=0xbfff8760, oparg=1) at Python/ceval.c:4238 #115 0x001c8954 in PyEval_EvalFrameEx (f=0x126ce48, throwflag=0) at Python/ceval.c:2818 #116 0x001d12fc in fast_function (func=0x1479938, pp_stack=0xbfff90e0, n=1, na=1, nk=0) at Python/ceval.c:4310 #117 0x001d0e44 in call_function (pp_stack=0xbfff90e0, oparg=1) at Python/ceval.c:4238 #118 0x001c8954 in PyEval_EvalFrameEx (f=0x126cb28, throwflag=0) at Python/ceval.c:2818 #119 0x001cda1c in PyEval_EvalCodeEx (_co=0x12f1f98, globals=0x129ccf8, locals=0x0, args=0x15862f0, argcount=1, kws=0x15862f4, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3567 #120 0x001d1440 in fast_function (func=0x1479998, pp_stack=0xbfff9b90, n=1, na=1, nk=0) at Python/ceval.c:4320 #121 0x001d0e44 in call_function (pp_stack=0xbfff9b90, oparg=1) at Python/ceval.c:4238 #122 0x001c8954 in PyEval_EvalFrameEx (f=0x15861a8, throwflag=0) at Python/ceval.c:2818 #123 0x001cda1c in PyEval_EvalCodeEx (_co=0x7d9438, globals=0x101e6f8, locals=0x0, args=0x102bb6c, argcount=0, kws=0x102bb6c, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x100a6c8) at Python/ceval.c:3567 #124 0x001d1440 in fast_function (func=0x1331f98, pp_stack=0xbfffa640, n=0, na=0, nk=0) at Python/ceval.c:4320 #125 0x001d0e44 in call_function (pp_stack=0xbfffa640, oparg=0) at Python/ceval.c:4238 #126 0x001c8954 in PyEval_EvalFrameEx (f=0x102b9e8, throwflag=0) at Python/ceval.c:2818 #127 0x001cda1c in PyEval_EvalCodeEx (_co=0x7d94a0, globals=0x101e6f8, locals=0x0, args=0x662f84, argcount=5, kws=0x662f98, kwcount=1, defs=0x1278c0c, defcount=3, kwdefs=0x0, closure=0x0) at Python/ceval.c:3567 #128 0x001d1440 in fast_function (func=0x147b5d8, pp_stack=0xbfffb0f0, n=7, na=5, nk=1) at Python/ceval.c:4320 #129 0x001d0e44 in call_function (pp_stack=0xbfffb0f0, oparg=261) at Python/ceval.c:4238 #130 0x001c8954 in PyEval_EvalFrameEx (f=0x662e00, throwflag=0) at Python/ceval.c:2818 #131 0x001cda1c in PyEval_EvalCodeEx (_co=0x10327e0, globals=0x101e6f8, locals=0x0, args=0x894af8, argcount=5, kws=0x894b0c, kwcount=4, defs=0x12ae6dc, defcount=7, kwdefs=0x0, closure=0x0) at Python/ceval.c:3567 #132 0x001d1440 in fast_function (func=0x147b578, pp_stack=0xbfffbba0, n=13, na=5, nk=4) at Python/ceval.c:4320 #133 0x001d0e44 in call_function (pp_stack=0xbfffbba0, oparg=1029) at Python/ceval.c:4238 #134 0x001c8954 in PyEval_EvalFrameEx (f=0x894820, throwflag=0) at Python/ceval.c:2818 #135 0x001cda1c in PyEval_EvalCodeEx (_co=0x10323d0, globals=0x101e6f8, locals=0x0, args=0x4ba504, argcount=0, kws=0x4ba504, kwcount=0, defs=0x1314afc, defcount=23, kwdefs=0x0, closure=0x0) at Python/ceval.c:3567 #136 0x001d1440 in fast_function (func=0x12c00f8, pp_stack=0xbfffc650, n=0, na=0, nk=0) at Python/ceval.c:4320 #137 0x001d0e44 in call_function (pp_stack=0xbfffc650, oparg=0) at Python/ceval.c:4238 #138 0x001c8954 in PyEval_EvalFrameEx (f=0x4ba3b8, throwflag=0) at Python/ceval.c:2818 #139 0x001d12fc in fast_function (func=0x1331cf8, pp_stack=0xbfffcfd0, n=0, na=0, nk=0) at Python/ceval.c:4310 #140 0x001d0e44 in call_function (pp_stack=0xbfffcfd0, oparg=0) at Python/ceval.c:4238 #141 0x001c8954 in PyEval_EvalFrameEx (f=0x63a1c8, throwflag=0) at Python/ceval.c:2818 #142 0x001cda1c in PyEval_EvalCodeEx (_co=0x1013298, globals=0x49fb38, locals=0x49fb38, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3567 #143 0x001bb274 in PyEval_EvalCode (co=0x1013298, globals=0x49fb38, locals=0x49fb38) at Python/ceval.c:770 #144 0x001b2d84 in builtin_exec (self=0x454178, args=0x78c978) at Python/bltinmodule.c:859 #145 0x000a3c00 in PyCFunction_Call (func=0x4546f8, arg=0x78c978, kw=0x0) at Objects/methodobject.c:93 #146 0x001d0bfc in call_function (pp_stack=0xbfffdb40, oparg=2) at Python/ceval.c:4213 #147 0x001c8954 in PyEval_EvalFrameEx (f=0x6f4418, throwflag=0) at Python/ceval.c:2818 #148 0x001cda1c in PyEval_EvalCodeEx (_co=0x100e090, globals=0x7bfb38, locals=0x0, args=0x10381a4, argcount=7, kws=0x10381c0, kwcount=0, defs=0x101016c, defcount=5, kwdefs=0x0, closure=0x0) at Python/ceval.c:3567 #149 0x001d1440 in fast_function (func=0x100b278, pp_stack=0xbfffe5f0, n=7, na=7, nk=0) at Python/ceval.c:4320 #150 0x001d0e44 in call_function (pp_stack=0xbfffe5f0, oparg=7) at Python/ceval.c:4238 #151 0x001c8954 in PyEval_EvalFrameEx (f=0x1038038, throwflag=0) at Python/ceval.c:2818 #152 0x001cda1c in PyEval_EvalCodeEx (_co=0x100e298, globals=0x7bfb38, locals=0x0, args=0x49f90c, argcount=2, kws=0x0, kwcount=0, defs=0x100aef4, defcount=1, kwdefs=0x0, closure=0x0) at Python/ceval.c:3567 #153 0x0006a07c in function_call (func=0x1036578, arg=0x49f8f8, kw=0x0) at Objects/funcobject.c:633 #154 0x00012918 in PyObject_Call (func=0x1036578, arg=0x49f8f8, kw=0x0) at Objects/abstract.c:2105 #155 0x0024529c in RunModule (modname=0x501b28, set_argv0=1) at Modules/main.c:224 #156 0x00246b24 in Py_Main (argc=6, argv=0x501638) at Modules/main.c:714 #157 0x00001fd0 in main (argc=6, argv=0xbfffeb38) at python.c:64 (gdb) ---------- keywords: buildbot messages: 193431 nosy: haypo, ned.deily priority: high severity: normal status: open title: test_sqlite crashes on OS X tiger 3.x buildbot type: crash versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 11:59:43 2013 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 21 Jul 2013 09:59:43 +0000 Subject: [issue18518] timeit bug? In-Reply-To: <1374400020.0.0.45788018989.issue18518@psf.upfronthosting.co.za> Message-ID: <1374400783.19.0.439423152295.issue18518@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Well, not sure if this is worth fixing, I think this is because timeit runs a modified version of the code using exec(), with the actual code to be timed within a function. (timeit runs something like this with exec(): def actual_code(): #The real code for i in range(10): return -1 actual_code() ---------- nosy: +Ramchandra Apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 12:00:58 2013 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 21 Jul 2013 10:00:58 +0000 Subject: [issue18518] return-ing within timeit.timeit causes wrong return value of timeit.timeit In-Reply-To: <1374400020.0.0.45788018989.issue18518@psf.upfronthosting.co.za> Message-ID: <1374400858.82.0.0647071617418.issue18518@psf.upfronthosting.co.za> Changes by Ramchandra Apte : ---------- title: timeit bug? -> return-ing within timeit.timeit causes wrong return value of timeit.timeit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 12:01:28 2013 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 21 Jul 2013 10:01:28 +0000 Subject: [issue18518] return-ing within code timed with timeit.timeit causes wrong return value of timeit.timeit In-Reply-To: <1374400020.0.0.45788018989.issue18518@psf.upfronthosting.co.za> Message-ID: <1374400888.46.0.292020464765.issue18518@psf.upfronthosting.co.za> Changes by Ramchandra Apte : ---------- title: return-ing within timeit.timeit causes wrong return value of timeit.timeit -> return-ing within code timed with timeit.timeit causes wrong return value of timeit.timeit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 12:04:06 2013 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 21 Jul 2013 10:04:06 +0000 Subject: [issue18466] Spelling mistakes in various code comments. In-Reply-To: <1373909571.44.0.949892598858.issue18466@psf.upfronthosting.co.za> Message-ID: <1374401046.17.0.894471066328.issue18466@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Hmm... once I actually created a short (<50 lines) script which spell-checked the comments. Problem is that many technical words (GCC, for example) were marked incorrect by the spell-checker (Enchant), resulting in about 1000+ "incorrectly" spelled words. ---------- nosy: +Ramchandra Apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 13:04:39 2013 From: report at bugs.python.org (Paul Moore) Date: Sun, 21 Jul 2013 11:04:39 +0000 Subject: [issue18491] Add "exe wrapper" functionality to Windows launcher In-Reply-To: <1374158765.31.0.00467890617544.issue18491@psf.upfronthosting.co.za> Message-ID: <1374404679.93.0.250682349833.issue18491@psf.upfronthosting.co.za> Paul Moore added the comment: Updated patch, as per discussion. ---------- Added file: http://bugs.python.org/file30994/launcher_wrapper.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 13:05:29 2013 From: report at bugs.python.org (Paul Moore) Date: Sun, 21 Jul 2013 11:05:29 +0000 Subject: [issue18491] Add "exe wrapper" functionality to Windows launcher In-Reply-To: <1374158765.31.0.00467890617544.issue18491@psf.upfronthosting.co.za> Message-ID: <1374404729.61.0.168243750816.issue18491@psf.upfronthosting.co.za> Changes by Paul Moore : Removed file: http://bugs.python.org/file30966/launcher_wrapper.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 13:09:24 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 21 Jul 2013 11:09:24 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3byjrg4VpGz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 026593cbc006 by Victor Stinner in branch 'default': Issue #18519, #18408: Fix sqlite authorizer callback http://hg.python.org/cpython/rev/026593cbc006 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 13:09:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 21 Jul 2013 11:09:25 +0000 Subject: [issue18519] test_sqlite crashes on OS X tiger 3.x buildbot In-Reply-To: <1374400670.71.0.678852160853.issue18519@psf.upfronthosting.co.za> Message-ID: <3byjrh2hhDz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 026593cbc006 by Victor Stinner in branch 'default': Issue #18519, #18408: Fix sqlite authorizer callback http://hg.python.org/cpython/rev/026593cbc006 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 13:13:48 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 21 Jul 2013 11:13:48 +0000 Subject: [issue18519] test_sqlite crashes on OS X tiger 3.x buildbot In-Reply-To: <1374400670.71.0.678852160853.issue18519@psf.upfronthosting.co.za> Message-ID: <1374405228.69.0.827683982126.issue18519@psf.upfronthosting.co.za> STINNER Victor added the comment: It's not a crash, but an assertion that I added recently: it means that a previous Python exception is not handled correctly. The problem is that a first call to _authorizer_callback() raised a Python exception and returned SQLITE_DENY, but sqlite called _authorizer_callback() again (with the Python exception set). According to the doc: "SQLITE_DENY to cause the entire SQL statement to be rejected with an error": http://www.sqlite.org/c3ref/set_authorizer.html So I don't expect _authorizer_callback() to be called again if the previous call returned SQLITE_DENY. Whatever, this issue should be fixed by the changeset 026593cbc006. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 13:13:54 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 21 Jul 2013 11:13:54 +0000 Subject: [issue18519] test_sqlite crashes on OS X tiger 3.x buildbot In-Reply-To: <1374400670.71.0.678852160853.issue18519@psf.upfronthosting.co.za> Message-ID: <1374405234.63.0.818054651757.issue18519@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 13:15:04 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 21 Jul 2013 11:15:04 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <1374405304.96.0.0101507102117.issue18408@psf.upfronthosting.co.za> STINNER Victor added the comment: """ python: Python/ceval.c:1210: PyEval_EvalFrameEx: Assertion `!PyErr_Occurred()' failed. Fatal Python error: Aborted Current thread 0x404df8c0: File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/sqlite3/test/userfunctions.py", line 441 in authorizer_cb """ Ned Deily created the issue #18519 for that. It should be fixed by the changeset 026593cbc006. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 13:22:44 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 21 Jul 2013 11:22:44 +0000 Subject: [issue18520] Fixes bugs found by pyfailmalloc during Python initialization Message-ID: <1374405764.28.0.138932329528.issue18520@psf.upfronthosting.co.za> New submission from STINNER Victor: I'm working on a version of pyfailmalloc integrated into CPython to inject memory allocation failures duging Python startup. As expected, I found new bugs. I create this issue to track these bugs and their fix, as I did with the issue #18408. Home page of the project: https://pypi.python.org/pypi/pyfailmalloc ---------- messages: 193439 nosy: haypo priority: normal severity: normal status: open title: Fixes bugs found by pyfailmalloc during Python initialization versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 13:26:05 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 21 Jul 2013 11:26:05 +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: <3bykCw6CB3zRg7@mail.python.org> Roundup Robot added the comment: New changeset 276477d5a548 by Victor Stinner in branch 'default': Issue #18520: Fix initsigs(), handle PyOS_InitInterrupts() error http://hg.python.org/cpython/rev/276477d5a548 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 13:26:44 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 21 Jul 2013 11:26:44 +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: <1374406004.26.0.539978350126.issue18520@psf.upfronthosting.co.za> STINNER Victor added the comment: PyStructSequence_InitTypeWithError() return type is void, whereas it can fail and raise an exception. Can I change the return type, or should I create a new function? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 14:14:09 2013 From: report at bugs.python.org (Julien Nabet) Date: Sun, 21 Jul 2013 12:14:09 +0000 Subject: [issue18521] [cppcheck] Full report Message-ID: <1374408848.64.0.369654911435.issue18521@psf.upfronthosting.co.za> New submission from Julien Nabet: Hello, I retrieved Cpython sources today and runned cppcheck ("git updated" today) on the whole sources with enable=all I attached the full report. There are certainly false positive but some reports may help, eg: [Python/getargs.c:379]: (style) Array index 'i' is used before limits check. Indeed, here is the code: 379 while (levels[i] > 0 && i < 32 && (int)(p-buf) < 220) { [Modules/md5module.c:345] -> [Modules/md5module.c:342]: (style) Found duplicate branches for 'if' and 'else' 342 if (Py_TYPE(self) == &MD5type) { 343 if ( (newobj = newMD5object())==NULL) 344 return NULL; 345 } else { 346 if ( (newobj = newMD5object())==NULL) 347 return NULL; 348 } [Objects/iterobject.c:87]: (error) Uninitialized variable: seqsize [Objects/setobject.c:549]: (error) Address of local auto-variable assigned to a function parameter etc. Hope it helps. Julien ---------- files: cppcheck_reports.txt messages: 193442 nosy: serval2412 priority: normal severity: normal status: open title: [cppcheck] Full report versions: Python 3.5 Added file: http://bugs.python.org/file30995/cppcheck_reports.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 15:06:05 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Jul 2013 13:06:05 +0000 Subject: [issue15905] Copy to fixed size buffer w/o check in sys_update_path In-Reply-To: <1347293386.49.0.00561600810364.issue15905@psf.upfronthosting.co.za> Message-ID: <1374411965.33.0.886983225956.issue15905@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > - wcscpy(q+1, link); > + wcsncpy(q+1, link, MAXPATHLEN); > + argv0copy[2*MAXPATHLEN] = L'\0'; Should be `q[MAXPATHLEN] = L'\0';`. Otherwise there will be a bug when a length of link is MAXPATHLEN. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 15:43:07 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 21 Jul 2013 13:43:07 +0000 Subject: [issue18521] [cppcheck] Full report In-Reply-To: <1374408848.64.0.369654911435.issue18521@psf.upfronthosting.co.za> Message-ID: <1374414187.34.0.892245029546.issue18521@psf.upfronthosting.co.za> Christian Heimes added the comment: The report contains too much noise to be useful. I suggest that you remove some of the noise. * get rid of "The scope of the variable 'foo' can be reduced.". It's nit-picking. * ignore 3rd party code: Modules/_ctypes/libffi*, Modules/_sha3/keccak, Modules/expat, Modules/_decimal/libmpdec * ignore Windows stuff on non-Windows platforms: PC, PCbuild, Tools/msi ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 15:46:26 2013 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 21 Jul 2013 13:46:26 +0000 Subject: [issue18514] Unreachable Py_DECREF() in ctypes's PyCData_FromBaseObj() In-Reply-To: <1374324037.75.0.169548913827.issue18514@psf.upfronthosting.co.za> Message-ID: <1374414386.31.0.378186939789.issue18514@psf.upfronthosting.co.za> Eric V. Smith added the comment: Your patch looks like the output of "hg help", or similar. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 15:53:47 2013 From: report at bugs.python.org (Julien Nabet) Date: Sun, 21 Jul 2013 13:53:47 +0000 Subject: [issue18521] [cppcheck] Full report In-Reply-To: <1374408848.64.0.369654911435.issue18521@psf.upfronthosting.co.za> Message-ID: <1374414827.57.0.339368568473.issue18521@psf.upfronthosting.co.za> Julien Nabet added the comment: Here's a new version of the file after some filtering (for the record, I used this command line: grep -v 'The scope' cppcheck_reports.txt |grep -v 'Modules/_ctypes/libffi' |grep -v Modules/_sha3/keccak| grep -v Modules/expat | grep -v Modules/_decimal/libmpdec |grep -v PC | grep -v msi | grep -v 'Skipping config' |grep -v 'Too many') Is it ok for you? Julien ---------- Added file: http://bugs.python.org/file30996/cppcheck_reports_filtered.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 16:05:41 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 21 Jul 2013 14:05:41 +0000 Subject: [issue18514] Unreachable Py_DECREF() in ctypes's PyCData_FromBaseObj() In-Reply-To: <1374324037.75.0.169548913827.issue18514@psf.upfronthosting.co.za> Message-ID: <1374415541.06.0.99697074767.issue18514@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file30989/frombaseobj.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 16:06:54 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 21 Jul 2013 14:06:54 +0000 Subject: [issue18514] Unreachable Py_DECREF() in ctypes's PyCData_FromBaseObj() In-Reply-To: <1374324037.75.0.169548913827.issue18514@psf.upfronthosting.co.za> Message-ID: <1374415614.2.0.965124615705.issue18514@psf.upfronthosting.co.za> Christian Heimes added the comment: Oh, you are right ... The patch is trivial: I switched the Py_DECREF() and return NULL lines. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 16:09:04 2013 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 21 Jul 2013 14:09:04 +0000 Subject: [issue18514] Unreachable Py_DECREF() in ctypes's PyCData_FromBaseObj() In-Reply-To: <1374324037.75.0.169548913827.issue18514@psf.upfronthosting.co.za> Message-ID: <1374415744.41.0.542763189464.issue18514@psf.upfronthosting.co.za> Eric V. Smith added the comment: For some reason the blank link in the Coverity report confused me. Yes, swapping the lines looks right. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 16:11:53 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 21 Jul 2013 14:11:53 +0000 Subject: [issue18519] test_sqlite crashes on OS X tiger 3.x buildbot In-Reply-To: <1374400670.71.0.678852160853.issue18519@psf.upfronthosting.co.za> Message-ID: <1374415913.06.0.95429545754.issue18519@psf.upfronthosting.co.za> R. David Murray added the comment: Do you understand why it was called again with the exception set? I'm worried that there might be a change in behavior here that the tests aren't catching. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 16:15:21 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 21 Jul 2013 14:15:21 +0000 Subject: [issue18517] "xxlimited" extension declared incorrectly in setup.py In-Reply-To: <1374393760.41.0.977042124577.issue18517@psf.upfronthosting.co.za> Message-ID: <1374416121.9.0.915563409145.issue18517@psf.upfronthosting.co.za> R. David Murray added the comment: My expectation would be that we want the tests to be runnable (and be run, not skipped) with Python installed, and thus we build the test module. (Whether or not our tests actually *can* be run with Python installed is an open question, though.) And skipping some tests when installed is probably OK, too, so if I'm right about the rationale we could still change our minds. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 16:19:31 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 21 Jul 2013 14:19:31 +0000 Subject: [issue18518] return-ing within code timed with timeit.timeit causes wrong return value of timeit.timeit In-Reply-To: <1374400020.0.0.45788018989.issue18518@psf.upfronthosting.co.za> Message-ID: <1374416371.65.0.288748603479.issue18518@psf.upfronthosting.co.za> R. David Murray added the comment: I'm inclined to agree with Ramchandra. It might be worth a doc footnote, though. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 16:25:41 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 21 Jul 2013 14:25:41 +0000 Subject: [issue18514] Unreachable Py_DECREF() in ctypes's PyCData_FromBaseObj() In-Reply-To: <1374324037.75.0.169548913827.issue18514@psf.upfronthosting.co.za> Message-ID: <3bypC90TQcz7LjP@mail.python.org> Roundup Robot added the comment: New changeset 25ffad2e12d6 by Christian Heimes in branch '3.3': Issue #18514: Fix unreachable Py_DECREF() call in PyCData_FromBaseObj() http://hg.python.org/cpython/rev/25ffad2e12d6 New changeset afe119a3619f by Christian Heimes in branch 'default': Issue #18514: Fix unreachable Py_DECREF() call in PyCData_FromBaseObj() http://hg.python.org/cpython/rev/afe119a3619f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 16:26:59 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 21 Jul 2013 14:26:59 +0000 Subject: [issue18514] Unreachable Py_DECREF() in ctypes's PyCData_FromBaseObj() In-Reply-To: <1374324037.75.0.169548913827.issue18514@psf.upfronthosting.co.za> Message-ID: <1374416819.26.0.946484780293.issue18514@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks for the review ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 16:52:43 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 21 Jul 2013 14:52:43 +0000 Subject: [issue18324] set_payload does not handle binary payloads correctly In-Reply-To: <1372446982.29.0.852040030503.issue18324@psf.upfronthosting.co.za> Message-ID: <1374418363.05.0.500633432267.issue18324@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Here is the patch for this ticket. David Murray, am I on the right path? If yes, I'll put more robust tests, such as the ones with Asian encodings and unusual encodings. ---------- Added file: http://bugs.python.org/file30997/set_payload_binary.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 16:54:27 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 21 Jul 2013 14:54:27 +0000 Subject: [issue18324] set_payload does not handle binary payloads correctly In-Reply-To: <1372446982.29.0.852040030503.issue18324@psf.upfronthosting.co.za> Message-ID: <1374418467.3.0.932248376027.issue18324@psf.upfronthosting.co.za> Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file30997/set_payload_binary.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 16:55:27 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 21 Jul 2013 14:55:27 +0000 Subject: [issue18324] set_payload does not handle binary payloads correctly In-Reply-To: <1372446982.29.0.852040030503.issue18324@psf.upfronthosting.co.za> Message-ID: <1374418527.29.0.710657689514.issue18324@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Sorry, got typo for the last patch. ---------- Added file: http://bugs.python.org/file30998/set_payload_binary.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 17:38:47 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 21 Jul 2013 15:38:47 +0000 Subject: [issue18324] set_payload does not handle binary payloads correctly In-Reply-To: <1372446982.29.0.852040030503.issue18324@psf.upfronthosting.co.za> Message-ID: <1374421127.63.0.997110801246.issue18324@psf.upfronthosting.co.za> R. David Murray added the comment: It looks like you are still patching get_payload. This should be a really simple patch against set_payload. It occurs to me that there could be a backward compatibility concern if passing binary to set_payload currently actually works in some cases, so we definitely needs a bunch of test that do that to make sure they all fail before we fix the bug :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 18:07:08 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 21 Jul 2013 16:07:08 +0000 Subject: [issue18519] test_sqlite crashes on OS X tiger 3.x buildbot In-Reply-To: <1374415913.06.0.95429545754.issue18519@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Before my change, the authorizer callback was called even if an exception was raised. This is wrong, it is not how python works. You can try with python 3.3 and an authorizer raising an exception and then increment an attribute. If I understood correctly, the attribute will be incremented but you will get the exception in the caller. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 18:55:02 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 21 Jul 2013 16:55:02 +0000 Subject: [issue18519] test_sqlite crashes on OS X tiger 3.x buildbot In-Reply-To: Message-ID: <20130721165500.9FD69250192@webabinitio.net> R. David Murray added the comment: Raised by what? I thought the callback *was* the thing raising the exception? Are you sure you don't just need to clear the exception if the callback function raises one? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 19:16:19 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Jul 2013 17:16:19 +0000 Subject: [issue18518] return-ing within code timed with timeit.timeit causes wrong return value of timeit.timeit In-Reply-To: <1374400020.0.0.45788018989.issue18518@psf.upfronthosting.co.za> Message-ID: <1374426979.42.0.697279188282.issue18518@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python type: behavior -> enhancement versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 19:17:31 2013 From: report at bugs.python.org (Marc Abramowitz) Date: Sun, 21 Jul 2013 17:17:31 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1374427051.22.0.981734276392.issue15805@psf.upfronthosting.co.za> Marc Abramowitz added the comment: I agree also that io is a good place for the basic version that doesn't do file descriptor stuff and maybe the fancy file descriptor stuff should be a separate issue and should go in subprocess. To move this along and generate more discussion, I took code from Nick earlier in the thread and made a little patch and a test program and put it in a gist: https://gist.github.com/msabramo/6049140 If folks like that, I can convert the test program into an automated test. What do you guys think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 19:19:06 2013 From: report at bugs.python.org (Marc Abramowitz) Date: Sun, 21 Jul 2013 17:19:06 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1374427146.07.0.343150288187.issue15805@psf.upfronthosting.co.za> Marc Abramowitz added the comment: Oops, Nick => Brett. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 20:30:14 2013 From: report at bugs.python.org (Mateusz Lenik) Date: Sun, 21 Jul 2013 18:30:14 +0000 Subject: [issue17128] OS X system openssl deprecated - installer should build local libssl In-Reply-To: <1360002680.77.0.851671416179.issue17128@psf.upfronthosting.co.za> Message-ID: <1374431414.8.0.0766079252473.issue17128@psf.upfronthosting.co.za> Mateusz Lenik added the comment: I finally managed to find some time to clean up the script I used to compile multiarch openssl. The diff is available at https://bitbucket.org/_mlen/cpython/commits/319f10362eb4b947b12750a6eb66fb622bbb0079 For 10.8 I had to comment out Tk related part and use the command below to build: ./build-installer.py --sdk-path=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/ --third-party=/Users/m/Documents/Code/sources --universal-archs=intel --dep-target=10.8 The test results are below: test-osx ? arch -i386 python3 -m test -unetwork test_ssl [1/1] test_ssl Resource 'ipv6.google.com' is not available 1 test OK. test-osx ? arch -x86_64 python3 -m test -unetwork test_ssl [1/1] test_ssl Resource 'ipv6.google.com' is not available 1 test OK. ---------- hgrepos: +204 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 20:54:41 2013 From: report at bugs.python.org (John Jefferies) Date: Sun, 21 Jul 2013 18:54:41 +0000 Subject: [issue18522] Error creating a raw string of r'\\?\' Message-ID: <1374432881.73.0.813388896506.issue18522@psf.upfronthosting.co.za> New submission from John Jefferies: I'm having trouble with a raw string of r'\\?\' as in the following session: ---------------- >>> a = r'\\?\' File "", line 1 a = r'\\?\' ^ SyntaxError: EOL while scanning string literal ---------------- which seems like a bug to me. I see the same behaviour in v3.3, v3.2, and v2.6. I have tried searching for such a bug but search engines don't work well with a string of non-alphanumerics. Why is this string important? It's because the Win32 API functions throw an error with path names longer than 260 chars unless the path names are prefixed with this string, e.g: shutil.copy2(r'\\?\C:\some\quite\long\path\name', dstname) shutil.copy2(r'\\?\' + r'C:\some\quite\long\path\name', dstname) where the first example throws an exception without the path name prefix; while the second example fails to compile. FTR. I can create the desired string in various other ways: ---------------- >>> a = '\\\\?\\' >>> a '\\\\?\\' >>> a = r'\\?\ '[0:4] >>> a '\\\\?\\' >>> ---------------- Thanks John ---------- components: Interpreter Core messages: 193462 nosy: John.Jefferies priority: normal severity: normal status: open title: Error creating a raw string of r'\\?\' type: compile error versions: Python 2.6, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 21:10:23 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 21 Jul 2013 19:10:23 +0000 Subject: [issue18522] Error creating a raw string of r'\\?\' In-Reply-To: <1374432881.73.0.813388896506.issue18522@psf.upfronthosting.co.za> Message-ID: <1374433823.6.0.698080484408.issue18522@psf.upfronthosting.co.za> Tim Peters added the comment: As section 2.4.1. (String literals) of the Python reference manual says, "... (even a raw string cannot end in an odd number of backslashes). Specifically, a raw string cannot end in a single backslash (since the backslash would escape the following quote character)." ---------- nosy: +tim_one _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 21:35:41 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 21 Jul 2013 19:35:41 +0000 Subject: [issue18523] test_signal failure under Windows Message-ID: <1374435341.35.0.309186886798.issue18523@psf.upfronthosting.co.za> New submission from Antoine Pitrou: c31bec42e4112a49c192a16f271faffd5a44b83d (by Victor) seems to be the culprit. See http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/2188 ====================================================================== ERROR: test_issue9324 (test.test_signal.WindowsSignalTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_signal.py", line 213, in test_issue9324 signal.signal(sig, signal.signal(sig, handler)) TypeError: signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a callable object ---------- assignee: haypo components: Tests, Windows messages: 193464 nosy: brian.curtin, haypo, larry, pitrou priority: release blocker severity: normal stage: needs patch status: open title: test_signal failure under Windows type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 21:39:54 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 21 Jul 2013 19:39:54 +0000 Subject: [issue18522] Error creating a raw string of r'\\?\' In-Reply-To: <1374432881.73.0.813388896506.issue18522@psf.upfronthosting.co.za> Message-ID: <1374435594.65.0.137896960701.issue18522@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Indeed, you'll have to use a regular (non-raw) string literal for everything ending up with a backslash. This part of Python's syntax probably won't be changed. ---------- nosy: +pitrou resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 21:58:54 2013 From: report at bugs.python.org (John Jefferies) Date: Sun, 21 Jul 2013 19:58:54 +0000 Subject: [issue18522] Error creating a raw string of r'\\?\' In-Reply-To: <1374432881.73.0.813388896506.issue18522@psf.upfronthosting.co.za> Message-ID: <1374436734.75.0.173371717241.issue18522@psf.upfronthosting.co.za> John Jefferies added the comment: Yes, thankyou; I missed that. Another search reveals the issue has come up under 11451 and 1271 at least. John ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 22:24:53 2013 From: report at bugs.python.org (R. Jayakrishnan) Date: Sun, 21 Jul 2013 20:24:53 +0000 Subject: [issue18425] IDLE Unit test for IdleHistory.py In-Reply-To: <1373493838.59.0.876568806243.issue18425@psf.upfronthosting.co.za> Message-ID: <1374438293.06.0.782728550852.issue18425@psf.upfronthosting.co.za> Changes by R. Jayakrishnan : ---------- resolution: -> works for me _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 23:08:17 2013 From: report at bugs.python.org (Michael Kleehammer) Date: Sun, 21 Jul 2013 21:08:17 +0000 Subject: [issue18458] libedit history offset workaround In-Reply-To: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> Message-ID: <1374440897.3.0.268124442771.issue18458@psf.upfronthosting.co.za> Michael Kleehammer added the comment: Just wanted to chime in that I reported this to Apple and their response was exactly this. (Perhaps Ronald works for Apple?) Is there a temporary work around in the meantime other than rebuilding everything? ---------- nosy: +mkleehammer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 23:19:14 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Jul 2013 21:19:14 +0000 Subject: [issue18425] IDLE Unit test for IdleHistory.py In-Reply-To: <1373493838.59.0.876568806243.issue18425@psf.upfronthosting.co.za> Message-ID: <1374441554.83.0.575333190625.issue18425@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Resolution is for when the issue is closed, and I expect this to be closed as 'fixed'. ---------- assignee: -> terry.reedy resolution: works for me -> stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 23:34:43 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 21 Jul 2013 21:34:43 +0000 Subject: [issue18523] test_signal failure under Windows In-Reply-To: <1374435341.35.0.309186886798.issue18523@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: This issue is a duplicate of #18396. Le 21 juil. 2013 21:35, "Antoine Pitrou" a ?crit : > > New submission from Antoine Pitrou: > > c31bec42e4112a49c192a16f271faffd5a44b83d (by Victor) seems to be the > culprit. > > See > http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/2188 > > > > ====================================================================== > ERROR: test_issue9324 (test.test_signal.WindowsSignalTests) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_signal.py", > line 213, in test_issue9324 > signal.signal(sig, signal.signal(sig, handler)) > TypeError: signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a > callable object > > ---------- > assignee: haypo > components: Tests, Windows > messages: 193464 > nosy: brian.curtin, haypo, larry, pitrou > priority: release blocker > severity: normal > stage: needs patch > status: open > title: test_signal failure under Windows > type: behavior > versions: Python 3.4 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 23:59:41 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 21 Jul 2013 21:59:41 +0000 Subject: [issue18458] libedit history offset workaround In-Reply-To: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> Message-ID: <1374443981.36.0.334297674079.issue18458@psf.upfronthosting.co.za> Ned Deily added the comment: If you are using an existing binary installation, you could disable readline processing altogether by simply renaming the readline extension module, for example: cd /Library/Frameworks/Python.framework/Versions/3.3 cd ./lib/python3.3/lib-dynload sudo mv readline.so readline.so.disabled Of course, then you will not have interactive command line history and much of the editing features. But it shouldn't crash. If you don't mind using GNU readline (which is GPL licensed), you *might* be able to install the third-party readline module from PyPI: https://pypi.python.org/pypi/readline But extension module building on unreleased systems may be problematic. It may be easier to build on a currently supported system and move it. As necessary, we will likely need to provide updates for the OS X installers in conjunction with the official release of 10.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 00:19:16 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Jul 2013 22:19:16 +0000 Subject: [issue18439] Patchcheck for ACKS, NEWS does not work on Windows. In-Reply-To: <1373695819.6.0.661777672646.issue18439@psf.upfronthosting.co.za> Message-ID: <1374445156.77.0.903384252686.issue18439@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Ronald or Ned, is the attached patch OK for Macs? ---------- assignee: -> terry.reedy keywords: +patch nosy: +ned.deily, ronaldoussoren stage: needs patch -> commit review Added file: http://bugs.python.org/file30999/patchcheck.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 01:05:59 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 21 Jul 2013 23:05:59 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1374427051.22.0.981734276392.issue15805@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: A good start, but: 1. io is too low level to depend on unittest (or even contextlib), as anything it imports will be imported automatically at interpreter startup. The context manager will need to be written out directly as a class with the appropriate methods. 2. The name based API should accept the unqualified name and throw a value error if an unexpected name is passed in. 3. The stdin replacement should have a separate optional keyword-only "data" argument to request wrapping with StringIO, rather than duck typing the replacement value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 01:31:48 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 21 Jul 2013 23:31:48 +0000 Subject: [issue18518] return-ing within code timed with timeit.timeit causes wrong return value of timeit.timeit In-Reply-To: <1374400020.0.0.45788018989.issue18518@psf.upfronthosting.co.za> Message-ID: <1374449508.28.0.866964447383.issue18518@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Agreed this should be closed as "won't fix". ---------- nosy: +rhettinger resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 01:32:18 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 21 Jul 2013 23:32:18 +0000 Subject: [issue18439] Patchcheck for ACKS, NEWS does not work on Windows. In-Reply-To: <1373695819.6.0.661777672646.issue18439@psf.upfronthosting.co.za> Message-ID: <1374449538.89.0.283812110126.issue18439@psf.upfronthosting.co.za> Ned Deily added the comment: Re the patch: it looks like there's a debugging print left in it. (Also, FYI, the patch did not apply cleanly using normal Unix patch; I had to strip the \r characters with (tr -d '\r' _______________________________________ From report at bugs.python.org Mon Jul 22 01:58:33 2013 From: report at bugs.python.org (Marc Abramowitz) Date: Sun, 21 Jul 2013 23:58:33 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1374451113.51.0.215762974165.issue15805@psf.upfronthosting.co.za> Marc Abramowitz added the comment: Thanks Nick! I'll work on applying your suggestions a little later. And I'll add a note about it not working with subprocesses because I realized that I forgot to do that. Regarding redirect_stdfile, which is presumably what you meant by "name-based API", I started out with unqualified names like 'stdout', etc. I went with the qualified name as an attempt at making it more general (i.e.: if folks perhaps wanted to use this for something other than sys files) - I don't know whether or not this is useful - I don't have a use case in mind (anyone else got one?) - so I don't know if qualified names brings anything useful or not but that was the thinking. Thoughts on this are welcome. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 02:12:39 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Jul 2013 00:12:39 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1374451959.74.0.116274496012.issue15805@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'm thinking that PrintRedirect is a better name because it coincides with the intent of the primary use case. The more computer-sciency you make the name, the more it becomes opaque to everyday users. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 02:13:47 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Jul 2013 00:13:47 +0000 Subject: [issue18441] Idle: Make test.support.requires('gui') skip when it should. In-Reply-To: <1373754847.55.0.0641648695763.issue18441@psf.upfronthosting.co.za> Message-ID: <3bz3Fk0tcYzSdZ@mail.python.org> Roundup Robot added the comment: New changeset 23b0164b9c82 by Terry Jan Reedy in branch '2.7': Issue #18441: Make test.support.requires('gui') skip when it should. http://hg.python.org/cpython/rev/23b0164b9c82 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 02:14:08 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 22 Jul 2013 00:14:08 +0000 Subject: [issue18441] Idle: Make test.support.requires('gui') skip when it should. In-Reply-To: <1373754847.55.0.0641648695763.issue18441@psf.upfronthosting.co.za> Message-ID: <1374452047.99.0.42250859899.issue18441@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I took a look. Not fun ;-). Pending a more permanent fix, I am applying a revised patch, first to 2.7 to make sure it works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 02:57:19 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 22 Jul 2013 00:57:19 +0000 Subject: [issue18439] Patchcheck for ACKS, NEWS does not work on Windows. In-Reply-To: <1373695819.6.0.661777672646.issue18439@psf.upfronthosting.co.za> Message-ID: <1374454639.14.0.926599285541.issue18439@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Sorry, I forgot to paste the patch diff into Notepad++ rather than Idle in order to save it without \r. (That would be a useful option for Idle too.) Good to know that I can forget about Classic Mac. I deleted the debug print. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 03:14:56 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Jul 2013 01:14:56 +0000 Subject: [issue18439] Patchcheck for ACKS, NEWS does not work on Windows. In-Reply-To: <1373695819.6.0.661777672646.issue18439@psf.upfronthosting.co.za> Message-ID: <3bz4cH2RFHzNl2@mail.python.org> Roundup Robot added the comment: New changeset 26686d227e41 by Terry Jan Reedy in branch '3.3': Issue #18439: Make patchcheck work on Windows for ACKS, NEWS. http://hg.python.org/cpython/rev/26686d227e41 New changeset 13950a33f889 by Terry Jan Reedy in branch '2.7': Issue #18439: Make patchcheck work on Windows for ACKS, NEWS. http://hg.python.org/cpython/rev/13950a33f889 New changeset f737673e909b by Terry Jan Reedy in branch '2.7': Issue #18439: Move news entry misplaced by graft merge. http://hg.python.org/cpython/rev/f737673e909b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 03:20:21 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 22 Jul 2013 01:20:21 +0000 Subject: [issue18439] Patchcheck for ACKS, NEWS does not work on Windows. In-Reply-To: <1373695819.6.0.661777672646.issue18439@psf.upfronthosting.co.za> Message-ID: <1374456021.21.0.909732842311.issue18439@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 03:25:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Jul 2013 01:25:27 +0000 Subject: [issue18441] Idle: Make test.support.requires('gui') skip when it should. In-Reply-To: <1373754847.55.0.0641648695763.issue18441@psf.upfronthosting.co.za> Message-ID: <3bz4rR11Y0zQ16@mail.python.org> Roundup Robot added the comment: New changeset 9f922270a929 by Terry Jan Reedy in branch '2.7': Issue #18441: fix buildbot name-error for TclError. http://hg.python.org/cpython/rev/9f922270a929 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 03:59:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Jul 2013 01:59:01 +0000 Subject: [issue18441] Idle: Make test.support.requires('gui') skip when it should. In-Reply-To: <1373754847.55.0.0641648695763.issue18441@psf.upfronthosting.co.za> Message-ID: <3bz5b83NM4zNl2@mail.python.org> Roundup Robot added the comment: New changeset e8b8279ca118 by Terry Jan Reedy in branch '2.7': Backed out changeset: 23b0164b9c82 #18441 not working http://hg.python.org/cpython/rev/e8b8279ca118 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 04:20:04 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 22 Jul 2013 02:20:04 +0000 Subject: [issue18518] return-ing within code timed with timeit.timeit causes wrong return value of timeit.timeit In-Reply-To: <1374400020.0.0.45788018989.issue18518@psf.upfronthosting.co.za> Message-ID: <1374459604.22.0.512815708377.issue18518@psf.upfronthosting.co.za> R. David Murray added the comment: Rather than closing it, we converted it to a documentation issue. I think it is worth a footnote in the docs, since it is not obvious (without reading the source code) that a return statement will cause timeit to return an invalid result instead of raising a syntax error. ---------- resolution: wont fix -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 04:22:07 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 22 Jul 2013 02:22:07 +0000 Subject: [issue18441] Idle: Make test.support.requires('gui') skip when it should. In-Reply-To: <1373754847.55.0.0641648695763.issue18441@psf.upfronthosting.co.za> Message-ID: <1374459727.16.0.828834351706.issue18441@psf.upfronthosting.co.za> Terry J. Reedy added the comment: (The fix was incomplete because 'delete' in the except clause should be 'remove'.) I finally realized that I could test the except clause by raising TclError explicitly just before it. I reverted both changes because they do not seem to work, even with the additional fix (not committed). With or without patches, python_d -m test -v test_idle # runs 30 tests, as expected python_d -m test -v -ugui test_idle # run 40 tests, as expected After raising TclError, the latter still runs 40 tests, which I did not expect. It seems that 'gui' is not being removed from use_resources. Since debug print()s in test_idle do not show up on the console, I cannot easily see what is going on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 04:31:00 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 22 Jul 2013 02:31:00 +0000 Subject: [issue18453] There are unused variables inside DateTimeTestCase class in test_xmlrpc.py In-Reply-To: <1373817539.24.0.0142880431752.issue18453@psf.upfronthosting.co.za> Message-ID: <1374460260.36.0.120266396629.issue18453@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: LGTM ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 04:34:21 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 22 Jul 2013 02:34:21 +0000 Subject: [issue18441] Idle: Make test.support.requires('gui') skip when it should. In-Reply-To: <1373754847.55.0.0641648695763.issue18441@psf.upfronthosting.co.za> Message-ID: <1374460461.3.0.530703053812.issue18441@psf.upfronthosting.co.za> Terry J. Reedy added the comment: More noise. Much of what I said above was incorrect due to version mixup. The one extra fix I did not commit might have been enough, but I will wait until I have tested it. ---------- stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 04:37:33 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Jul 2013 02:37:33 +0000 Subject: [issue18518] return-ing within code timed with timeit.timeit causes wrong return value of timeit.timeit In-Reply-To: <1374400020.0.0.45788018989.issue18518@psf.upfronthosting.co.za> Message-ID: <1374460653.92.0.796667788058.issue18518@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Go ahead and add a footnote, but do consider that such footnotes are mostly just clutter. It doesn't help someone at the moment there is an invalid return value -- instead it just makes it so that afterward someone can say that it is documented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 04:43:59 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 22 Jul 2013 02:43:59 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1374461039.42.0.00185582669228.issue15805@psf.upfronthosting.co.za> Nick Coghlan added the comment: As Raymond noted, we should resist the temptation to generalise this too much - generalisation almost always comes at the cost of making any *specific* case harder (consider the difference between the complexity of the "support any URL scheme" model in urllib and urllib2 and the relatively API simplicity of the higher level HTTP/HTTPS focused requests module). I'm wary of calling it "PrintRedirect" though, as I believe that's actively misleading: swapping sys.stdout for something else affects more than just the print builtin, and if a particular print call uses the "file" parameter, then the redirection of sys.stdout will have no effect. "Redirection" in general is a bit of a misnomer for what the context manager is doing. So, here's a concrete API suggestion and implementation: def replace_stdin(stream=None, *, data=None): if data is not None: if stream is not None: raise ValueError("Cannot specify both stream & data") stream = StringIO(data) return ReplaceStandardStream('stdin', stream) def replace_stdout(stream=None): return ReplaceStandardStream('stdout', stream) def replace_stderr(stream=None): return ReplaceStandardStream('stderr', stream) class ReplaceStandardStream: """Context manager to temporarily replace a standard stream On entry, replaces the specified sys module stream attribute ('stdin', 'stdout' or 'stderr') with the supplied IO stream object. On exit, restores the previous value of the sys module attribute. Note: as this context manager modifies sys module attributes directly, it is NOT thread-safe. """ def __init__(self, attr, stream): if attr not in ('stdin', 'stdout', 'stderr'): raise ValueError("{.200!r} is not a standard stream name (expected one of: 'stdin', 'stdout', or 'stderr'".format(attr)) self._attr_to_replace = attr self._old_stream = None if stream is None: self._replacement_stream = StringIO() else: self._replacement_stream = stream def __enter__(self): if self._old_stream is not None: raise RuntimeError("Cannot reenter {!r}".format(self)) self._old_stream = getattr(sys, self._attr_to_replace) stream = self._replacement_stream setattr(sys, self._attr_to_replace, stream) return stream def __exit__(self): stream = self._old_stream if stream is None: raise RuntimeError("Never entered {!r}".format(self)) self._old_stream = None setattr(sys, self._attr_to_replace, stream) Cross linking from the print documentation to io.replace_stdout and from the input documentation to io.replace_stdin may also be a good idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 04:48:10 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 22 Jul 2013 02:48:10 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1374461290.98.0.471272032222.issue15805@psf.upfronthosting.co.za> Nick Coghlan added the comment: And reviewing my own draft - the convenience functions would need docstrings too, and the docstrings should mention that a new StringIO instance is created by default and that "as name" can be used to get access to that object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 05:13:27 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 22 Jul 2013 03:13:27 +0000 Subject: [issue18324] set_payload does not handle binary payloads correctly In-Reply-To: <1372446982.29.0.852040030503.issue18324@psf.upfronthosting.co.za> Message-ID: <1374462807.02.0.858298947603.issue18324@psf.upfronthosting.co.za> Vajrasky Kok added the comment: "It looks like you are still patching get_payload. This should be a really simple patch against set_payload." Okay, do I get it right at this time? About your second point, I need more time to think about it. ---------- Added file: http://bugs.python.org/file31000/set_payload_binary_v2.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 05:14:06 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Jul 2013 03:14:06 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1374462846.28.0.742340120114.issue15805@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Nick, it seems to me that you're going way over-board with an otherwise simple idea. I'm aiming for something that looks much like my original posting. That has been tried out on my students with great success. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 05:30:33 2013 From: report at bugs.python.org (Marc Abramowitz) Date: Mon, 22 Jul 2013 03:30:33 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1374463833.03.0.998245053943.issue15805@psf.upfronthosting.co.za> Marc Abramowitz added the comment: I like Nick's version. I don't know if __exit__ really needs error checking, but I like the API. For me, it strikes a good balance between being intuitive and being general enough to do all the stuff I'd like to do. Should the docstrings mention that it only works within the process and doesn't affect subprocesses? I also am having second thoughts about putting it in the io module. Now I'm thinking that sys makes more sense because that's where stdin, stdout, and stderr live. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 05:48:19 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 22 Jul 2013 03:48:19 +0000 Subject: [issue18324] set_payload does not handle binary payloads correctly In-Reply-To: <1372446982.29.0.852040030503.issue18324@psf.upfronthosting.co.za> Message-ID: <1374464899.98.0.800728889029.issue18324@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, that's what I had in mind. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 06:11:01 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 22 Jul 2013 04:11:01 +0000 Subject: [issue18492] Add test.support.regrtest_run flag, simplify support.requires In-Reply-To: <1374279467.21.0.876068060763.issue18492@psf.upfronthosting.co.za> Message-ID: Zachary Ware added the comment: Terry J. Reedy added the comment: > The problem is that this permissiveness does not apply to subsidiary files discovered from and run by a main file, even though it should. The current workaround is to explicitly set use_resources for the benefit of subsidiary files, as in test_idle.py. This is exactly what inspired this issue, though with test_codecmaps_*.py rather than test_idle. > As I see it, the main point of this patch, somewhat obscured by the title, is to extend the current resource permissiveness from tests *in* main files run as main to tests in other files discovered and run from a main file. It also extends the permisiveness to any test not run by regrtest (ie, by unittest). I did choose the title rather poorly, but yes, this is the real point. > The key change is > - if sys._getframe(1).f_globals.get("__name__") == "__main__": > + if not regrtest_run: > > 'regrtest_run == True' is currently spelled 'use_resources is not None', so the latter could be used instead to replace the frame-check without otherwise adding new code. I think using the 'regrtest_run' flag is more explicit about why we're just letting anything go, and could potentially be useful in other situations as well (though I'm coming up blank on what any of those might be right now). > Serhiy is concerned about the possible booby-trap for users that run slow resource intensive tests. Some thoughts: I agree with your thoughts here, which if I'm not mistaken basically boil down to "Yes, it's a booby-trap, but it's not a lethal one and we can document around most of it." > *If -u is added to unittest (and 'use=' to .main), a default of all would be the right thing for subfile targets, even if not for file and multi-file targets. I'm not sure I understand this line. But I do have an initial patch adding -u to unittest which I will be posting shortly which, if accepted, should render this issue moot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 06:12:28 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 22 Jul 2013 04:12:28 +0000 Subject: [issue18441] Idle: Make test.support.requires('gui') skip when it should. In-Reply-To: <1373754847.55.0.0641648695763.issue18441@psf.upfronthosting.co.za> Message-ID: <1374466348.87.0.649990017527.issue18441@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 06:30:21 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 22 Jul 2013 04:30:21 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1374467421.54.0.240386503497.issue15805@psf.upfronthosting.co.za> Nick Coghlan added the comment: OK, Raymond and I had a chat on IRC about this, and I've come back around to the idea that the simple "contextlib.redirect_stdout" model as Raymond originally proposed is the way to go. There are a few pieces to that rationale: 1. Why in contextlib? The io module isn't something people normally need to think about - we mostly hide it from them since they can just call the open builtin. Similarly, most new users don't need to touch the sys module - it's all hidden behind higher level abstractions (like input, print and argparse). However, contextlib is something everyone will be exposed to, both to turn generators into context managers, but also for the utility context managers closing() and ignored(). It also comes down to trusting Raymond's opinion as an experienced Python teacher that contextlib is a more discoverable location than io for this particular piece of functionality. 2. Why only stdout? Why not stdin and stderr? Raymond pointed out that the case for this kind of redirection helper is much weaker for stdin and stderr. Wanting to control where "print" and similar operations write to is quite common, but writing to stderr is often specifically about bypassing typical redirections and faking input through stdin is typically only done for testing purposes. Adding stdlib APIs without compelling use cases isn't a good idea, even when they seem like an "obvious" generalisation. In this case, outside the CPython test suite, I couldn't think of any situation where the limited versions of these helpers would have actually been useful to me, and in the test suite case, the typical answer would be "use a mock" (that just wasn't an option for CPython until recently when unittest.mock was added to the standard library). Instead, I now think both of those cases would be better handled by the more sophisticated API discussed above that would deal with these things at the file descriptor level. So I suggest we split that API out as a new issue targetting the subprocess API. 3. Why not include automatic creation of StringIO objects? Including such a default actually makes the API harder to document and explain. Composing a "you must supply a stream object" API with io.StringIO is easy to get local redirection is easy. If we support implicit creation, then we need to explain that it happens, and that the "as" clause can be used to retrieve the implicitly created object. Raymond plans to work on a patch for this simple version of the API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 06:35:02 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 22 Jul 2013 04:35:02 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1374467702.75.0.403491369039.issue15805@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 06:56:15 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Mon, 22 Jul 2013 04:56:15 +0000 Subject: [issue18524] BufferedReader.read1() documentation/implementation difference Message-ID: <1374468975.95.0.466613665533.issue18524@psf.upfronthosting.co.za> New submission from Nikolaus Rath: The read1() docstring says: "Reads up to n bytes, with at most one read() system call." However, in the implementation read1() calls peek() to refill the buffer if necessary, and then returns whatever is available in the buffer. This means that read1() will only return up to n bytes if n is smaller than the buffer size, otherwise it will return at most bytes. With the current implementation, running a loop that calls obj.read1(n) for large n is therefore much less performant than a loop that calls obj.raw.read(n). I think a call to read1(n) with empty buffer should always attempt to read n bytes from the raw stream, i.e. the implementation should be changed to match the documentation. ---------- components: IO messages: 193496 nosy: Nikratio priority: normal severity: normal status: open title: BufferedReader.read1() documentation/implementation difference versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 07:02:21 2013 From: report at bugs.python.org (Saurabh Gupta) Date: Mon, 22 Jul 2013 05:02:21 +0000 Subject: [issue18525] Shutil cannot import WindowsError on windows Message-ID: <1374469341.59.0.267425457032.issue18525@psf.upfronthosting.co.za> New submission from Saurabh Gupta: I've observed that shutil fails to import WindowsError on our windows 7 systems: from shutil import WindowsError File , line , in from shutil import WindowsError ImportError: cannot import name WindowsError The same statement works absolutely fine on linux. Has anyone else come across it too? Do you know how I could fix it? Python version: 2.6.7 Linux OS: Centos 6.3 Windows OS: Windows 7 Professional x64 ---------- components: Extension Modules, Library (Lib), Windows messages: 193497 nosy: saurabhgupta2u priority: normal severity: normal status: open title: Shutil cannot import WindowsError on windows type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 07:07:01 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Mon, 22 Jul 2013 05:07:01 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1374469621.84.0.312410581074.issue15805@psf.upfronthosting.co.za> Nikolaus Rath added the comment: I think stdout redirection is very useful, and I'm actually have a very similar context manager in my own code. However, I'd like to raise the question if using a context manager for this purpose should really be "officially blessed" in this way. To me, the with statement signals that effects are constrained to the managed block. But redirecting sys.stdout is a change with global scope - the redirection is not restricted to execution of the with block, it affects every other thread that's running at the same time. This effect is obvious if you wrote the redirection context manager yourself, but if you're using code from the standard library, this may be surprising. I don't have a better proposal, but I just wanted to mention this... ---------- nosy: +Nikratio _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 07:21:30 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 22 Jul 2013 05:21:30 +0000 Subject: [issue18526] Add resource management/guarding to unittest Message-ID: <1374470490.47.0.980625465837.issue18526@psf.upfronthosting.co.za> New submission from Zachary Ware: Here is an initial attempt at adding resource management/guarding to unittest, a la test.support.requires. The patch adds 6 new names to unittest.__all__; one function called 'registerResource' which explains itself, one function and one decorator (require and requires, respectively--I'm open to better, more differentiable names) for requiring a resource, and three exceptions (ResourceError for an error and ResourceUnavailable and ResourceDenied for skipping for different reasons). All of these are implemented in a new unittest.resources module. Existing modules are changed as follows: - util.py defines class _BaseSkip(Exception), which ResourceUnavailable inherits from. ResourceDenied subclasses ResourceUnavailable. - case.py: SkipTest inherits from _BaseSkip, and _BaseSkip is checked for to mark a test as skipped in _Outcome.testPartExecutor. Also, TestCase.run is patched to do resource checking for test classes and methods that use the requires decorator. - loader.py checks for util._BaseSkip instead of case.SkipTest - main.py adds -u and --use command line options, and use= TestProgram constructor arg. Tests are added to test_program and a new test_resources. The doc page is updated appropriately. The idea behind the departures from the way test.support.requires works is that since this will be used by far more than just the stdlib tests, there will be more than just the resources we use that unittest will need to know about, so there has to be some way to tell it about them--hence 'registerResource'. Also, to alleviate issues like #18441, I have implemented an easy way to test whether the resource is usable, via the 'checker' argument to registerResource. Lastly, 'requires' is provided as a decorator for ease of use, though it does add the most complication to the implementation. I look forward to reviews :) Thanks, Zach ---------- components: Library (Lib) files: unittest_resources.diff keywords: patch messages: 193499 nosy: ezio.melotti, michael.foord, pitrou, r.david.murray, serhiy.storchaka, terry.reedy, zach.ware priority: normal severity: normal status: open title: Add resource management/guarding to unittest type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file31001/unittest_resources.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 07:43:46 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 22 Jul 2013 05:43:46 +0000 Subject: [issue18458] libedit history offset workaround In-Reply-To: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> Message-ID: <1374471826.1.0.112018220615.issue18458@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Building just the readline extension shouldn't be that hard, using a small custom setup.py script. Then install by manually copying it to the right location. And no, I don't work for Apple. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 07:51:52 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 22 Jul 2013 05:51:52 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1374472312.38.0.0487242795379.issue15805@psf.upfronthosting.co.za> Nick Coghlan added the comment: Yeah, the docs will need to note that it isn't thread safe. However, non thread-safe constructs are often still incredibly useful for scripting use cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 08:02:33 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jul 2013 06:02:33 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1374472953.17.0.304037699342.issue15805@psf.upfronthosting.co.za> STINNER Victor added the comment: Can someone propose a patch instead of inline code? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 08:24:03 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jul 2013 06:24:03 +0000 Subject: [issue18519] test_sqlite crashes on OS X tiger 3.x buildbot In-Reply-To: <1374400670.71.0.678852160853.issue18519@psf.upfronthosting.co.za> Message-ID: <1374474243.72.0.791755853424.issue18519@psf.upfronthosting.co.za> STINNER Victor added the comment: > Raised by what? The test raising the assertion error is a Python authorizer callback which returns a Python int (2**32) larger than a C int (> INT_MAX) and so an OverflowError is raised in the C authorizer callback. > Are you sure you don't just need to clear the exception > if the callback function raises one? I read the code one more time, and I saw this: if (_enable_callback_tracebacks) { PyErr_Print(); } else { PyErr_Clear(); } So it is expected that the C authorizer callback clears the error. Here is a new patch which implement the same behaviour on _PyLong_AsInt() failure. ---------- keywords: +patch resolution: fixed -> status: closed -> open Added file: http://bugs.python.org/file31002/sqlite_authorizer_err.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 08:35:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Jul 2013 06:35:19 +0000 Subject: [issue18488] sqlite: finalize() method of user function may be called with an exception set if a call to step() method failed In-Reply-To: <1374104392.89.0.672278845185.issue18488@psf.upfronthosting.co.za> Message-ID: <3bzCjy4SP3zShJ@mail.python.org> Roundup Robot added the comment: New changeset 020dbfdf9517 by Victor Stinner in branch 'default': Issue #18488: Fix _pysqlite_final_callback() http://hg.python.org/cpython/rev/020dbfdf9517 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 08:39:08 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jul 2013 06:39:08 +0000 Subject: [issue18488] sqlite: finalize() method of user function may be called with an exception set if a call to step() method failed In-Reply-To: <1374104392.89.0.672278845185.issue18488@psf.upfronthosting.co.za> Message-ID: <1374475148.48.0.320655261949.issue18488@psf.upfronthosting.co.za> STINNER Victor added the comment: "+1 for PyException_SetContext or similar. The C code should behave like a "finally: x.finalize()"." If the Python callback failed in _pysqlite_step_callback() or _pysqlite_final_callback(): the exception is printed if sqlite3.enable_callback_tracebacks() has been called, or cleared otherwise. Only one kind of exception is expected to be passed to be caller (according to sqlite unit tests): AttributeError. The changeset 020dbfdf9517 restores the behaviour of Python 3.3 for best backward compatibility. If you want better reporting, please open a new issue. My only concern was just to not call a Python function while an exception is set: I fixed this issue using PyErr_Fetch/PyErr_Restore. So I'm closing the issue. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 08:52:00 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 22 Jul 2013 06:52:00 +0000 Subject: [issue18510] dict.__contains__ and dict.keys().__contains__ raises exception instead of returning False In-Reply-To: <1374277438.72.0.885233823426.issue18510@psf.upfronthosting.co.za> Message-ID: <1374475920.86.0.825491178853.issue18510@psf.upfronthosting.co.za> Ronald Oussoren added the comment: As mentioned on python-dev the current behavior seems sane. 1) Just like __getitem__ and __setitem__, __contains__ raises an exception when the key value cannot be used as a key (which normally is a programming error) 2) There are values that compare equal and where one of them is hashable and the other is not, such a set() and frozenset() with the same contents. If would be strange if set([1,2]) in { frozenset([1,2]): 'a' } returned False, even though the value is equal to a key in the dictionary. BTW. I've always interpreted "key in a_dict" as try: a_dict[key] return True except KeyError: return False (and not as equivalent to "key in a_dict.keys()"). (Also, if this behavior were to be changed this would be a new feature and as such could only be added to 3.4 and would IMHO require a PEP) ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 09:01:18 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Jul 2013 07:01:18 +0000 Subject: [issue18510] dict.__contains__ and dict.keys().__contains__ raises exception instead of returning False In-Reply-To: <1374277438.72.0.885233823426.issue18510@psf.upfronthosting.co.za> Message-ID: <1374476478.44.0.324985712042.issue18510@psf.upfronthosting.co.za> Raymond Hettinger added the comment: There's no bug here. It is the way Python has worked for 23 years. ---------- nosy: +rhettinger versions: -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 09:05:51 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 22 Jul 2013 07:05:51 +0000 Subject: [issue18510] dict.__contains__ and dict.keys().__contains__ raises exception instead of returning False In-Reply-To: <1374277438.72.0.885233823426.issue18510@psf.upfronthosting.co.za> Message-ID: <1374476751.57.0.0586275780564.issue18510@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I agree, and the thread on python-dev[1] also came to that conclusion, I'm therefore closing this issue. [1] http://code.activestate.com/lists/python-dev/123385/ ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 09:26:51 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 22 Jul 2013 07:26:51 +0000 Subject: [issue1687125] cannot catch KeyboardInterrupt when using curses getkey() Message-ID: <1374478011.7.0.131076063085.issue1687125@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I cannot reproduce this with a recent 2.7 build from mercurial, but can reproduce with /usr/bin/python (2.7.2) on OSX 10.8 and python 2.7.3 on Centos 6.4 system. ---------- nosy: +ronaldoussoren versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 09:34:26 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Jul 2013 07:34:26 +0000 Subject: [issue18525] Shutil cannot import WindowsError on windows In-Reply-To: <1374469341.59.0.267425457032.issue18525@psf.upfronthosting.co.za> Message-ID: <1374478466.22.0.0516946784937.issue18525@psf.upfronthosting.co.za> Christian Heimes added the comment: Please open an interactive interpreter shell and show us the output of import shutil print shutil.__file__ print dir(shutil) ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 09:44:17 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jul 2013 07:44:17 +0000 Subject: [issue18524] BufferedReader.read1() documentation/implementation difference In-Reply-To: <1374468975.95.0.466613665533.issue18524@psf.upfronthosting.co.za> Message-ID: <1374479057.49.0.0221926463299.issue18524@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +benjamin.peterson, hynek, pitrou, serhiy.storchaka, stutzbach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 09:45:07 2013 From: report at bugs.python.org (Saurabh Gupta) Date: Mon, 22 Jul 2013 07:45:07 +0000 Subject: [issue18525] Shutil cannot import WindowsError on windows In-Reply-To: <1374469341.59.0.267425457032.issue18525@psf.upfronthosting.co.za> Message-ID: <1374479107.27.0.385075779231.issue18525@psf.upfronthosting.co.za> Saurabh Gupta added the comment: >>> import shutil >>> shutil.__file__ 'C:\\Python26\\lib\\shutil.pyc' >>> dir(shutil) ['Error', '__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '_basename', '_samefile', 'abspath', 'copy', 'copy2', 'copyfile', 'copyfileobj', 'copymode', 'copystat', 'copytree', 'destinsrc', 'errno', 'fnmatch', 'ignore_patterns', 'move', 'os', 'rmtree', 'stat', 'sys'] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 09:47:07 2013 From: report at bugs.python.org (Saurabh Gupta) Date: Mon, 22 Jul 2013 07:47:07 +0000 Subject: [issue18525] Shutil cannot import WindowsError on windows In-Reply-To: <1374469341.59.0.267425457032.issue18525@psf.upfronthosting.co.za> Message-ID: <1374479227.75.0.840085759359.issue18525@psf.upfronthosting.co.za> Saurabh Gupta added the comment: And, the same thing on linux: >>> import shutil >>> print shutil.__file__ /software/package/linux64_centos6/python/2.6.7/lib/python2.6/shutil.pyc >>> print dir(shutil) ['Error', 'WindowsError', '__all__', '__builtins__', '__doc__', '__file__', '__n ame__', '__package__', '_basename', '_samefile', 'abspath', 'copy', 'copy2', 'co pyfile', 'copyfileobj', 'copymode', 'copystat', 'copytree', 'destinsrc', 'errno' , 'fnmatch', 'ignore_patterns', 'move', 'os', 'rmtree', 'stat', 'sys'] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 09:52:26 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Jul 2013 07:52:26 +0000 Subject: [issue18525] Shutil cannot import WindowsError on windows In-Reply-To: <1374469341.59.0.267425457032.issue18525@psf.upfronthosting.co.za> Message-ID: <1374479546.38.0.326254945916.issue18525@psf.upfronthosting.co.za> Christian Heimes added the comment: Seems legit ... I don't have access to a Windows system right now so I can't test it. WindowsError is globally available on Windows. You don't have to import it from shutil. Portable application should use OSError instead of WindowsError. WindowsError is a subclass of OSError with a Windows specific extra field. "try: ... except OSError: ..." catches WindowsError, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 10:17:41 2013 From: report at bugs.python.org (Saurabh Gupta) Date: Mon, 22 Jul 2013 08:17:41 +0000 Subject: [issue18525] Shutil cannot import WindowsError on windows In-Reply-To: <1374469341.59.0.267425457032.issue18525@psf.upfronthosting.co.za> Message-ID: <1374481061.3.0.509404951836.issue18525@psf.upfronthosting.co.za> Saurabh Gupta added the comment: I have a legacy software that has things like: try: some stuff except OSError, why: if WindowsError is not None and isinstance(why, WindowsError): do something else: do something else So I'd ideally like to able to run this software unchanged on Windows systems too. It would be best for me if I could import WindowsError on windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 10:21:08 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 22 Jul 2013 08:21:08 +0000 Subject: [issue18525] Shutil cannot import WindowsError on windows In-Reply-To: <1374469341.59.0.267425457032.issue18525@psf.upfronthosting.co.za> Message-ID: <1374481268.52.0.881086888241.issue18525@psf.upfronthosting.co.za> Ronald Oussoren added the comment: WindowsError is not part of the documented interface of shutil, but is an implementation detail. "from shutil import WindowsUtil" works on Unix platforms because shutil contains a compatibility definition: try: WindowsError except NameError: WindowsError = None shutil.copytree uses this to ignore some errors on Windows (that is, uses "if WindowsError is not None and isinstance(exc, WindowsError): ..."). Note that in 3.4 shutil does not export WindowsError at all, it uses a different way to suppress errors in copytree. In a perfect world the code would have used: try: _WindowsError = WindowsError except NameError: _WindowsError = None This would have avoided accidently exporting WindowsError on Unix platforms. I don't think it is worthwhile to do this change in a bugfix release though. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 10:24:21 2013 From: report at bugs.python.org (Tim Golden) Date: Mon, 22 Jul 2013 08:24:21 +0000 Subject: [issue18525] Shutil cannot import WindowsError on windows In-Reply-To: <1374469341.59.0.267425457032.issue18525@psf.upfronthosting.co.za> Message-ID: <1374481461.11.0.532680089113.issue18525@psf.upfronthosting.co.za> Tim Golden added the comment: Really this should be a wont-fix: the fact that it's possible to import WindowsError from shutil (on Linux) is an accident of its internal implementation. It's certainly not documented as such. Saurabh: WindowsError is a builtin on Windows. If you want to mimic shutil which uses it as a proxy for determining the platform, you can put a conditional import at the head of your own code: try: WindowsError except NameError: WindowsError = None Don't bother trying to import it from shutil where it's an implementation artefact. ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 10:25:38 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 22 Jul 2013 08:25:38 +0000 Subject: [issue18525] Shutil cannot import WindowsError on windows In-Reply-To: <1374469341.59.0.267425457032.issue18525@psf.upfronthosting.co.za> Message-ID: <1374481538.36.0.715060289853.issue18525@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I agree that this should be closed. ---------- resolution: -> wont fix status: open -> closed versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 10:45:46 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Jul 2013 08:45:46 +0000 Subject: [issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory In-Reply-To: <1367608586.39.0.0815102318744.issue17899@psf.upfronthosting.co.za> Message-ID: <1374482746.52.0.331200093994.issue17899@psf.upfronthosting.co.za> Christian Heimes added the comment: I'd like to have a patch by tonight. This issue is one of two remaining bugs that are considered "high impact" by Coverity Scan. The other one looks like a false positive. I have an interview with Coverity tomorrow about the development style and quality of CPython's source code and how we are using their software. I would like to show off a bit... :) ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 10:49:14 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Jul 2013 08:49:14 +0000 Subject: [issue15905] Copy to fixed size buffer w/o check in sys_update_path In-Reply-To: <1347293386.49.0.00561600810364.issue15905@psf.upfronthosting.co.za> Message-ID: <1374482954.02.0.417836724966.issue15905@psf.upfronthosting.co.za> Christian Heimes added the comment: Good point, but I think it should be `q[MAXPATHLEN + 1] = L'\0';`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 10:54:05 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Jul 2013 08:54:05 +0000 Subject: [issue18527] Upgrade Modules/zlib to 1.2.8 Message-ID: <1374483245.68.0.946100267151.issue18527@psf.upfronthosting.co.za> New submission from Christian Heimes: According to http://hg.python.org/cpython/file/878dc9dfc565/Modules/zlib/ChangeLog our repository has zlib 1.2.5. zlib 1.2.8 is out for a while, http://zlib.net/ I'd like to update our copy of zlib to 1.2.8. ---------- assignee: christian.heimes components: Extension Modules messages: 193520 nosy: christian.heimes priority: normal severity: normal stage: needs patch status: open title: Upgrade Modules/zlib to 1.2.8 type: resource usage versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 11:37:04 2013 From: report at bugs.python.org (Larry Hastings) Date: Mon, 22 Jul 2013 09:37:04 +0000 Subject: [issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory In-Reply-To: <1367608586.39.0.0815102318744.issue17899@psf.upfronthosting.co.za> Message-ID: <1374485824.79.0.771653866155.issue17899@psf.upfronthosting.co.za> Larry Hastings added the comment: Patch for 3.3. or trunk? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 12:04:06 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jul 2013 10:04:06 +0000 Subject: [issue15905] Copy to fixed size buffer w/o check in sys_update_path In-Reply-To: <1347293386.49.0.00561600810364.issue15905@psf.upfronthosting.co.za> Message-ID: <1374487446.94.0.488453088677.issue15905@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Agree. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 12:06:02 2013 From: report at bugs.python.org (Saurabh Gupta) Date: Mon, 22 Jul 2013 10:06:02 +0000 Subject: [issue18525] Shutil cannot import WindowsError on windows In-Reply-To: <1374469341.59.0.267425457032.issue18525@psf.upfronthosting.co.za> Message-ID: <1374487562.98.0.743948555456.issue18525@psf.upfronthosting.co.za> Saurabh Gupta added the comment: Thank you all for your inputs! Now I understand what the issue really is & would be fixing it by removing the imports in the legacy software. I agree with the won't fix resolution of the ticket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 12:31:33 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Jul 2013 10:31:33 +0000 Subject: [issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory In-Reply-To: <1367608586.39.0.0815102318744.issue17899@psf.upfronthosting.co.za> Message-ID: <1374489093.22.0.410228598459.issue17899@psf.upfronthosting.co.za> Christian Heimes added the comment: Preferable both but Coverity Scan uses only trunk. We could commit the patch to trunk first and test if Coverity still detects the leak. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 12:33:59 2013 From: report at bugs.python.org (Indra Talip) Date: Mon, 22 Jul 2013 10:33:59 +0000 Subject: [issue4079] new urllib2.Request 'timeout' attribute needs to have a default In-Reply-To: <1223490599.12.0.198174561396.issue4079@psf.upfronthosting.co.za> Message-ID: <1374489239.11.0.286045484896.issue4079@psf.upfronthosting.co.za> Indra Talip added the comment: patch adds regressions tests to ensure timeout value from OpenerDirector is honoured and a failing test for a default value for Request.timeout that passes when the patch that initialises Request.timeout is applied. ---------- Added file: http://bugs.python.org/file31003/issue-4079-tests-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 12:54:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Jul 2013 10:54:31 +0000 Subject: [issue15905] Copy to fixed size buffer w/o check in sys_update_path In-Reply-To: <1347293386.49.0.00561600810364.issue15905@psf.upfronthosting.co.za> Message-ID: <3bzKT263Bsz7Ljn@mail.python.org> Roundup Robot added the comment: New changeset dca92e8a011a by Christian Heimes in branch '3.3': Issue #15905: Fix theoretical buffer overflow in handling of sys.argv[0], http://hg.python.org/cpython/rev/dca92e8a011a New changeset 01597384531f by Christian Heimes in branch 'default': Issue #15905: Fix theoretical buffer overflow in handling of sys.argv[0], http://hg.python.org/cpython/rev/01597384531f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 12:57:54 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Jul 2013 10:57:54 +0000 Subject: [issue15905] Copy to fixed size buffer w/o check in sys_update_path In-Reply-To: <1347293386.49.0.00561600810364.issue15905@psf.upfronthosting.co.za> Message-ID: <1374490674.28.0.448446861482.issue15905@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 13:07:51 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 22 Jul 2013 11:07:51 +0000 Subject: [issue5120] Change _tkinter initialization for new versions of Aqua Tk on OS X In-Reply-To: <1233437150.39.0.445953575427.issue5120@psf.upfronthosting.co.za> Message-ID: <1374491271.18.0.315098558722.issue5120@psf.upfronthosting.co.za> Ronald Oussoren added the comment: As mentioned by Ned this is a duplicate of #8716. The proposed change to tkinter initialization in msg81468 might be useful to look into, but I'm not interested in doing that work because I don't use Tkinter myself which makes it harder to test if the change actually helps. FWIW, the patch looks sane for what it is trying to accomplish. NOTE: If the Tk version in OSX 10.4 is new enough to not need the workaround that will be disabled by the TKINTER_OLD_AQUA in the patch we could just drop the code. ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 14:27:18 2013 From: report at bugs.python.org (Rock Lee) Date: Mon, 22 Jul 2013 12:27:18 +0000 Subject: [issue17933] format str bug in urllib request.py In-Reply-To: <1367974224.67.0.224732033427.issue17933@psf.upfronthosting.co.za> Message-ID: <1374496038.62.0.828953151542.issue17933@psf.upfronthosting.co.za> Rock Lee added the comment: Any progress for this issue? I changed the title of the issue. ---------- title: test_ftp failure / ftplib error formatting issue -> format str bug in urllib request.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 14:34:56 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Jul 2013 12:34:56 +0000 Subject: [issue18528] Possible fd leak in socketmodule Message-ID: <1374496496.68.0.51305379842.issue18528@psf.upfronthosting.co.za> New submission from Christian Heimes: Coverity claims that sock_accept() may leak a fd. I have been starring at the code for a while and I'm still not sure if Coverity is right. The macros make the code paths hard to follow. The attached patch is simple and should not be a performance issue. http://hg.python.org/cpython/file/01597384531f/Modules/socketmodule.c#l1965 6. open_fn: Returning handle opened by function "accept(int, __SOCKADDR_ARG, socklen_t * restrict)". 7. var_assign: Assigning: "newfd" = handle returned from "accept(s->sock_fd, __SOCKADDR_ARG({ .__sockaddr__ = &addrbuf.sa}), &addrlen)". CID 983312 (#1 of 1): Resource leak (RESOURCE_LEAK)14. overwrite_var: Overwriting handle "newfd" in "newfd = accept(s->sock_fd, __SOCKADDR_ARG({ .__sockaddr__ = &addrbuf.sa}), &addrlen)" leaks the handle. 1969 newfd = accept(s->sock_fd, SAS2SA(&addrbuf), &addrlen); ---------- components: Extension Modules files: closesock.patch keywords: needs review, patch messages: 193530 nosy: christian.heimes priority: normal severity: normal stage: patch review status: open title: Possible fd leak in socketmodule type: resource usage versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file31004/closesock.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 14:39:12 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Jul 2013 12:39:12 +0000 Subject: [issue18528] Possible fd leak in socketmodule In-Reply-To: <1374496496.68.0.51305379842.issue18528@psf.upfronthosting.co.za> Message-ID: <1374496752.83.0.809402157563.issue18528@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +pitrou, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 15:06:35 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 22 Jul 2013 13:06:35 +0000 Subject: [issue18528] Possible fd leak in socketmodule In-Reply-To: <1374496496.68.0.51305379842.issue18528@psf.upfronthosting.co.za> Message-ID: <1374498395.25.0.751949509638.issue18528@psf.upfronthosting.co.za> Antoine Pitrou added the comment: What if you add "errno = 0" at the beginning of the function? Perhaps Coverity is confused by the fact that we use CHECK_ERRNO() to infer whether accept() succeeded or not, rather than simply checking the return value. I don't like your patch, because it adds a code path that would really be a logic error and therefore should not pass silently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 15:23:54 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jul 2013 13:23:54 +0000 Subject: [issue18529] Use long dash Message-ID: <1374499433.16.0.583158051605.issue18529@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Currently Python documentation uses four type of dashes for same meaning: 1. Hyphen with spaces. 2. En-dash with spaces. 3. Em-dash with spaces. 4. Em-dash without spaces. Definitely the first case is just wrong and other three cases should be unified. Here is a patch which replaces spaced hyphens, en-dashes and em-dashes to em-dashes without spaces. See also a discussion at Python-Dev: http://mail.python.org/pipermail/python-dev/2013-July/thread.html#127420 http://comments.gmane.org/gmane.comp.python.devel/140593 ---------- files: doc_mdashes_without_spaces.patch keywords: patch messages: 193532 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Use long dash Added file: http://bugs.python.org/file31005/doc_mdashes_without_spaces.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 15:29:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jul 2013 13:29:14 +0000 Subject: [issue18529] Use long dash In-Reply-To: <1374499433.16.0.583158051605.issue18529@psf.upfronthosting.co.za> Message-ID: <1374499754.92.0.543682421426.issue18529@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is an alternative patch which replaces spaced hyphens and en-dashes and non-spaced em-dashes to em-dashes with spaces. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python stage: -> patch review type: -> enhancement versions: +Python 3.4 Added file: http://bugs.python.org/file31006/doc_mdashes_with_spaces.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 15:58:01 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Jul 2013 13:58:01 +0000 Subject: [issue18528] Possible fd leak in socketmodule In-Reply-To: <1374496496.68.0.51305379842.issue18528@psf.upfronthosting.co.za> Message-ID: <1374501481.71.0.74675894815.issue18528@psf.upfronthosting.co.za> Christian Heimes added the comment: Coverity may not understand the interaction with errno at all. Or it may simple point out that some operating systems are not standard conform and our assumption is not universally true. Here is a patch that raises an exception when newfd != INVALID_SOCKET. I would not mind if we close the issue with "false positive". The code seems to work just fine on all major platforms -- or we haven't seen the issue in the wild yet. ---------- Added file: http://bugs.python.org/file31007/closesock2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 16:00:19 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 22 Jul 2013 14:00:19 +0000 Subject: [issue18528] Possible fd leak in socketmodule In-Reply-To: <1374501481.71.0.74675894815.issue18528@psf.upfronthosting.co.za> Message-ID: <1765572434.13282157.1374501613390.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > Coverity may not understand the interaction with errno at all. Or it > may simple point out that some operating systems are not standard > conform and our assumption is not universally true. Have you tried to reset errno at the beginning of the function? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 16:14:23 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 22 Jul 2013 14:14:23 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1374461039.42.0.00185582669228.issue15805@psf.upfronthosting.co.za> Message-ID: <20130722101421.7fb0e717@limelight.wooz.org> Barry A. Warsaw added the comment: In general, I like where this is going. I agree that a stdout redirector is probably the most common case, and for that, it almost always (for me) redirects to an open file. The use case for stderr redirection is usually, but not always, to redirect stderr to stdout, but I agree that that is much more limited. stdin redirection is much more rare, mostly a testing device, and better done with mocking. A suggestion about the name. Thinking about how it will read in a with-statement: with stdout_to(some_file): print('hello') Since this is all about convenience, I'd mildly suggest an API similar to built-in open(). I'd rather write this: with stdout_to('/tmp/debug.log', 'w', encoding='utf-8'): print('hello') than this: with open('/tmp/debug.log', 'w', encoding='utf-8') as tmp_stdout: with stdout_to(tmp_stdout): print('hello') stdout_to() could optionally take a single which would be an already open file object. Anyway, no doubt you'll paint this bikeshed your own particular color. Mine only cost $0.02. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 16:18:42 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Jul 2013 14:18:42 +0000 Subject: [issue18528] Possible fd leak in socketmodule In-Reply-To: <1765572434.13282157.1374501613390.JavaMail.root@zimbra10-e2.priv.proxad.net> Message-ID: <51ED3F3F.7010909@cheimes.de> Christian Heimes added the comment: Am 22.07.2013 16:00, schrieb Antoine Pitrou: > Have you tried to reset errno at the beginning of the function? It doesn't affect Coverity's report: BEGIN_SELECT_LOOP(s) Py_BEGIN_ALLOW_THREADS + errno = 0; timeout = internal_select_ex(s, 0, interval); if (!timeout) { newfd = accept(s->sock_fd, SAS2SA(&addrbuf), &addrlen); ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 16:20:03 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 22 Jul 2013 14:20:03 +0000 Subject: [issue18181] Add type.__locallookup__ In-Reply-To: <1370870153.93.0.646087371852.issue18181@psf.upfronthosting.co.za> Message-ID: <1374502803.89.0.0352497944738.issue18181@psf.upfronthosting.co.za> Ronald Oussoren added the comment: issue-18181-full-v2.txt adds more tests to v1 and has slightly better documentation (still not good enough). A major issue with the patch: for some reason the tests pass when run standalone ("./python.exe -m test.regrtest test_pep447"), but crash when I run another test before it (such as when running "make test"). I'm debugging the problem (this is probably a refcounting issue, but you never know...) ---------- Added file: http://bugs.python.org/file31008/issue-18181-full-v2.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 16:56:02 2013 From: report at bugs.python.org (A. Jesse Jiryu Davis) Date: Mon, 22 Jul 2013 14:56:02 +0000 Subject: [issue18418] Thread.isAlive() sometimes True after fork In-Reply-To: <1373408030.66.0.77258289483.issue18418@psf.upfronthosting.co.za> Message-ID: <1374504962.64.0.834939514053.issue18418@psf.upfronthosting.co.za> A. Jesse Jiryu Davis added the comment: Bump. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 17:07:40 2013 From: report at bugs.python.org (Alex Gaynor) Date: Mon, 22 Jul 2013 15:07:40 +0000 Subject: [issue18530] posixpath.ismount performs extra lstat calls Message-ID: <1374505660.8.0.757245061421.issue18530@psf.upfronthosting.co.za> New submission from Alex Gaynor: Right now it calls islink(), which does an lstat, and then does its own lstat on the same path. This can be optimized by inlining the body of islink and reusing the stat result. (This has been identified as an actual issue in openstack-swift https://review.openstack.org/#/c/37929/ ) ---------- messages: 193540 nosy: alex priority: normal severity: normal status: open title: posixpath.ismount performs extra lstat calls _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 17:07:42 2013 From: report at bugs.python.org (Matthew Barnett) Date: Mon, 22 Jul 2013 15:07:42 +0000 Subject: [issue16964] Add 'm' format specifier for mon_grouping etc. In-Reply-To: <1358182494.33.0.0372215578091.issue16964@psf.upfronthosting.co.za> Message-ID: <1374505662.69.0.47813482184.issue16964@psf.upfronthosting.co.za> Matthew Barnett added the comment: I've attached my attempt at a patch. ---------- keywords: +patch nosy: +mrabarnett Added file: http://bugs.python.org/file31009/issue16964.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 17:14:32 2013 From: report at bugs.python.org (Alex Gaynor) Date: Mon, 22 Jul 2013 15:14:32 +0000 Subject: [issue18530] posixpath.ismount performs extra lstat calls In-Reply-To: <1374505660.8.0.757245061421.issue18530@psf.upfronthosting.co.za> Message-ID: <1374506072.81.0.182383671213.issue18530@psf.upfronthosting.co.za> Alex Gaynor added the comment: Attached is a simple first pass at a diff against 2.7, shoudl be easy to port it to default. ---------- keywords: +patch Added file: http://bugs.python.org/file31010/ismount.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 18:17:41 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 22 Jul 2013 16:17:41 +0000 Subject: [issue12669] test_curses skipped on buildbots In-Reply-To: <1312149135.76.0.0319517534091.issue12669@psf.upfronthosting.co.za> Message-ID: <1374509861.3.0.158982191987.issue12669@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 18:33:15 2013 From: report at bugs.python.org (Alex Gaynor) Date: Mon, 22 Jul 2013 16:33:15 +0000 Subject: [issue18530] posixpath.ismount performs extra lstat calls In-Reply-To: <1374505660.8.0.757245061421.issue18530@psf.upfronthosting.co.za> Message-ID: <1374510795.62.0.384458315806.issue18530@psf.upfronthosting.co.za> Alex Gaynor added the comment: Addresses the review comments: returns to catching all oserrors ---------- Added file: http://bugs.python.org/file31011/ismount.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 18:38:36 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Jul 2013 16:38:36 +0000 Subject: [issue18530] posixpath.ismount performs extra lstat calls In-Reply-To: <1374505660.8.0.757245061421.issue18530@psf.upfronthosting.co.za> Message-ID: <1374511116.02.0.321704923767.issue18530@psf.upfronthosting.co.za> Christian Heimes added the comment: LGTM ---------- nosy: +christian.heimes stage: -> patch review type: -> resource usage versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 18:43:51 2013 From: report at bugs.python.org (Alex Gaynor) Date: Mon, 22 Jul 2013 16:43:51 +0000 Subject: [issue18530] posixpath.ismount performs extra lstat calls In-Reply-To: <1374505660.8.0.757245061421.issue18530@psf.upfronthosting.co.za> Message-ID: <1374511431.19.0.149332332201.issue18530@psf.upfronthosting.co.za> Alex Gaynor added the comment: Attached patch is against default. I don't have my ssh keys set up for this machine, so if someone else could land I'd be appreciative :) (Not sure if this qualifies for a backport) ---------- Added file: http://bugs.python.org/file31012/ismount-3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 18:54:45 2013 From: report at bugs.python.org (Samwyse) Date: Mon, 22 Jul 2013 16:54:45 +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: <1374512085.01.0.323340837202.issue18191@psf.upfronthosting.co.za> Samwyse added the comment: Fixes Serhiy Storchaka's complaints, removes duplicate test. ---------- nosy: +samwyse Added file: http://bugs.python.org/file31013/test_urlparse.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 18:55:13 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Jul 2013 16:55:13 +0000 Subject: [issue18528] Possible fd leak in socketmodule In-Reply-To: <1374496496.68.0.51305379842.issue18528@psf.upfronthosting.co.za> Message-ID: <1374512113.73.0.102002961545.issue18528@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file31004/closesock.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 18:55:17 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Jul 2013 16:55:17 +0000 Subject: [issue18528] Possible fd leak in socketmodule In-Reply-To: <1374496496.68.0.51305379842.issue18528@psf.upfronthosting.co.za> Message-ID: <1374512117.35.0.324998546378.issue18528@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file31007/closesock2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 18:56:02 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 22 Jul 2013 16:56:02 +0000 Subject: [issue18181] PEP447: Add type.__locallookup__ In-Reply-To: <1370870153.93.0.646087371852.issue18181@psf.upfronthosting.co.za> Message-ID: <1374512162.28.0.0761546214532.issue18181@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The crash was due to a bug in the test extension. Fixed in version 2b. ---------- title: Add type.__locallookup__ -> PEP447: Add type.__locallookup__ Added file: http://bugs.python.org/file31014/issue-18181-full-v2b.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 18:56:04 2013 From: report at bugs.python.org (Samwyse) Date: Mon, 22 Jul 2013 16:56:04 +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: <1374512164.61.0.686989671798.issue18191@psf.upfronthosting.co.za> Samwyse added the comment: Handles "raw" IPv6 URLs ---------- Added file: http://bugs.python.org/file31015/urllib.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 18:56:12 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Jul 2013 16:56:12 +0000 Subject: [issue18528] Possible fd leak in socketmodule In-Reply-To: <1374496496.68.0.51305379842.issue18528@psf.upfronthosting.co.za> Message-ID: <1374512172.52.0.328873526161.issue18528@psf.upfronthosting.co.za> Christian Heimes added the comment: This patch does the trick. ---------- Added file: http://bugs.python.org/file31016/closesock3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 19:14:09 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jul 2013 17:14:09 +0000 Subject: [issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory In-Reply-To: <1367608586.39.0.0815102318744.issue17899@psf.upfronthosting.co.za> Message-ID: <1374513249.4.0.811182499671.issue17899@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Larry, you forgot to remove "#undef HAVE_FDOPENDIR" at the start of the file. Beside this line the patch LGTM. I withdraw my objections in msg190887 because `close(fd)` can fail and change errno. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 19:16:36 2013 From: report at bugs.python.org (Brian Curtin) Date: Mon, 22 Jul 2013 17:16:36 +0000 Subject: [issue18530] posixpath.ismount performs extra lstat calls In-Reply-To: <1374505660.8.0.757245061421.issue18530@psf.upfronthosting.co.za> Message-ID: <1374513396.66.0.520675487656.issue18530@psf.upfronthosting.co.za> Brian Curtin added the comment: Benjamin probably has the final say on backporting this to 2.7. I'm doing the 3.3/default commit right now. ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 19:33:29 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jul 2013 17:33:29 +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: <1374514409.64.0.857752497537.issue13153@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: serhiy.storchaka -> stage: committed/rejected -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 20:04:23 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Jul 2013 18:04:23 +0000 Subject: [issue17944] Refactor test_zipfile In-Reply-To: <1368093470.65.0.477520947191.issue17944@psf.upfronthosting.co.za> Message-ID: <3bzW1314VBz7Lk2@mail.python.org> Roundup Robot added the comment: New changeset bb63f813a00f by Serhiy Storchaka in branch '3.3': Issue #17944: test_zipfile now discoverable and uses subclassing to http://hg.python.org/cpython/rev/bb63f813a00f New changeset 5812a3683402 by Serhiy Storchaka in branch 'default': Issue #17944: test_zipfile now discoverable and uses subclassing to http://hg.python.org/cpython/rev/5812a3683402 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 20:08:37 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Jul 2013 18:08:37 +0000 Subject: [issue18530] posixpath.ismount performs extra lstat calls In-Reply-To: <1374505660.8.0.757245061421.issue18530@psf.upfronthosting.co.za> Message-ID: <3bzW5w0Ry2z7LlJ@mail.python.org> Roundup Robot added the comment: New changeset 240adc564539 by Brian Curtin in branch 'default': Fix #18530. Remove extra stat call from posixpath.ismount http://hg.python.org/cpython/rev/240adc564539 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 20:09:49 2013 From: report at bugs.python.org (Brian Curtin) Date: Mon, 22 Jul 2013 18:09:49 +0000 Subject: [issue18530] posixpath.ismount performs extra lstat calls In-Reply-To: <1374505660.8.0.757245061421.issue18530@psf.upfronthosting.co.za> Message-ID: <1374516589.42.0.890221838879.issue18530@psf.upfronthosting.co.za> Brian Curtin added the comment: ^That takes care of default. I misspoke in an earlier comment about 3.3 - that should probably be determined by that RM (Georg?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 20:12:03 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jul 2013 18:12:03 +0000 Subject: [issue17944] Refactor test_zipfile In-Reply-To: <1368093470.65.0.477520947191.issue17944@psf.upfronthosting.co.za> Message-ID: <1374516723.49.0.0282190083337.issue17944@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > This bug should be fixed in 2.7 if it exists. It doesn't exists in 2.7. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 20:13:18 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jul 2013 18:13:18 +0000 Subject: [issue16741] `int()`, `float()`, etc think python strings are null-terminated In-Reply-To: <1356046641.74.0.314140910069.issue16741@psf.upfronthosting.co.za> Message-ID: <1374516798.36.0.928433179715.issue16741@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If there are no objections I'm going to commit patches soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 20:41:30 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 22 Jul 2013 18:41:30 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1374518490.86.0.255886117494.issue15805@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 20:43:29 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Jul 2013 18:43:29 +0000 Subject: [issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory In-Reply-To: <1367608586.39.0.0815102318744.issue17899@psf.upfronthosting.co.za> Message-ID: <1374518609.86.0.120689928987.issue17899@psf.upfronthosting.co.za> Christian Heimes added the comment: May I suggest a simpler patch that closes the fd sooner? ---------- Added file: http://bugs.python.org/file31017/listdir_fd.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 20:45:13 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Jul 2013 18:45:13 +0000 Subject: [issue16741] `int()`, `float()`, etc think python strings are null-terminated In-Reply-To: <1356046641.74.0.314140910069.issue16741@psf.upfronthosting.co.za> Message-ID: <1374518713.9.0.876662873195.issue16741@psf.upfronthosting.co.za> Christian Heimes added the comment: I don't like the idea to change the behavior of 2.7 so late in its release cycle. Benjamin, what's your opinion? ---------- nosy: +benjamin.peterson, christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 20:51:43 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 22 Jul 2013 18:51:43 +0000 Subject: [issue18531] Undocumented different between METH_KEYWORDS and **kws Message-ID: <1374519103.74.0.277776306074.issue18531@psf.upfronthosting.co.za> New submission from Barry A. Warsaw: A colleague discovered an interesting implementation different between C-defined functions and Python-defined functions called with **kws arguments. He tried to do this: >>> from collections import defaultdict >>> '{foo}{bar}'.format(**defaultdict(str)) '' He wondered how this could work, especially given: >>> def what(**kws): ... print(type(kws), repr(kws)) ... >>> what(**defaultdict(str)) {} The Language Reference clearly states that when what() is called, a new dictionary is create, which is populated by keyword arguments not consumed by positional args. http://docs.python.org/3/reference/compound_stmts.html#function-definitions http://docs.python.org/3/reference/expressions.html#calls What isn't described is the behavior when the function is defined in C using METH_KEYWORDS. In that case, the object passed through the ** argument is passed unscathed to the underlying methodobject defined to take METH_KEYWORDS. str.format() is of the latter type so it gets the actual defaultdict. what() of course gets the defined behavior. It would be nice if the implementation details of the function did not leak into this behavior, but this is admittedly a corner case of the CPython implementation. I haven't checked any of the alternative implementations to see what they do. My guess is that CPython won't change for practical and backward compatibility reasons, thus I've opened this issue as a documentation bug. At the very least, an implementation note in the Language Reference should be added. ---------- assignee: docs at python components: Documentation messages: 193559 nosy: barry, docs at python priority: normal severity: normal status: open title: Undocumented different between METH_KEYWORDS and **kws versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 20:53:42 2013 From: report at bugs.python.org (Alex Gaynor) Date: Mon, 22 Jul 2013 18:53:42 +0000 Subject: [issue18531] Undocumented different between METH_KEYWORDS and **kws In-Reply-To: <1374519103.74.0.277776306074.issue18531@psf.upfronthosting.co.za> Message-ID: <1374519222.66.0.18290438434.issue18531@psf.upfronthosting.co.za> Alex Gaynor added the comment: I'll confirm that PyPy raises a KeyError on the format() code. ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 21:11:43 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jul 2013 19:11:43 +0000 Subject: [issue18405] crypt.mksalt() result has unnecessarily low entropy In-Reply-To: <1373306240.23.0.797149936972.issue18405@psf.upfronthosting.co.za> Message-ID: <1374520303.94.0.471973803677.issue18405@psf.upfronthosting.co.za> STINNER Victor added the comment: I prefer to avoid conversion to/from base64, and use random.choice() instead: see attached patch. ---------- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file31018/crypt_salt_choice.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 21:15:45 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jul 2013 19:15:45 +0000 Subject: [issue18523] test_signal failure under Windows In-Reply-To: <1374435341.35.0.309186886798.issue18523@psf.upfronthosting.co.za> Message-ID: <1374520545.59.0.777090927184.issue18523@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> duplicate status: open -> closed superseder: -> test_signal.test_issue9324() fails on buildbot AMD64 Windows7 SP1 3.x _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 21:31:45 2013 From: report at bugs.python.org (Christian Tismer) Date: Mon, 22 Jul 2013 19:31:45 +0000 Subject: [issue9035] os.path.ismount on windows doesn't support windows mount points In-Reply-To: <1277023751.91.0.438330382261.issue9035@psf.upfronthosting.co.za> Message-ID: <1374521505.9.0.569153990191.issue9035@psf.upfronthosting.co.za> Christian Tismer added the comment: Hi Tim, Yes, this would be great to get sorted out. Then we could make watchdog.py automatically configure itself for network mounts. Right now this makes no nense because of windows. cheers - chris ---------- nosy: +Christian.Tismer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 22:29:00 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 22 Jul 2013 20:29:00 +0000 Subject: [issue18532] hashlib.HASH objects should officially expose the hash name Message-ID: <1374524940.42.0.582552143445.issue18532@psf.upfronthosting.co.za> New submission from Jason R. Coombs: In hashlib, the HASH objects currently supply a 'name' attribute, reflecting the name used to initialize the hash object, and they have since Python 2.5. However, this interface is not published so isn't honored by other platforms (namely pypy). I propose the '.name' attribute be formally added to the documentation to reflect the actual implementation. I suggest this change be considered as a bugfix release if the original intention was for the '.name' attribute to be public (as it's a bug in the documentation if the intended and implemented interface isn't fully documented). I plan to do some research to ascertain the intention of this attribute (as can be inferred from tests and the source). For now, I'll assume Python 3.4 only. Any comments or suggestions welcome. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 193563 nosy: docs at python, jason.coombs priority: normal severity: normal status: open title: hashlib.HASH objects should officially expose the hash name versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 22:37:17 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Jul 2013 20:37:17 +0000 Subject: [issue18532] hashlib.HASH objects should officially expose the hash name In-Reply-To: <1374524940.42.0.582552143445.issue18532@psf.upfronthosting.co.za> Message-ID: <1374525437.63.0.617603482209.issue18532@psf.upfronthosting.co.za> Christian Heimes added the comment: Sounds like a good idea. ---------- nosy: +christian.heimes, gregory.p.smith stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 22:42:37 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 22 Jul 2013 20:42:37 +0000 Subject: [issue16741] `int()`, `float()`, etc think python strings are null-terminated In-Reply-To: <1356046641.74.0.314140910069.issue16741@psf.upfronthosting.co.za> Message-ID: <1374525757.07.0.626184342108.issue16741@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Yeah, let's just fix Python 3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 23:58:10 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 22 Jul 2013 21:58:10 +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: <1374530289.99.0.770846136804.issue13153@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In 3.3.2, 3.4.0 the traceback says that the invalid continuation byte (immediately, when '?' is pasted) is ED. Snipped version is File "F:\Python\dev\py33\lib\tkinter\__init__.py", line 1071, self.tk.mainloop(n) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 1: As I understand utf-8 from, for instance, the wikipedia article, continuation bytes are 0b10xxxxxx, or A0 to BF and definitely not ED. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 23:59:05 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Jul 2013 21:59:05 +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: <3bzcCs185Gz7Ljj@mail.python.org> Roundup Robot added the comment: New changeset fc718c177ee6 by Victor Stinner in branch 'default': Issue #18520: Add a new PyStructSequence_InitType2() function, same than http://hg.python.org/cpython/rev/fc718c177ee6 New changeset 9b77b3ee6fb8 by Victor Stinner in branch 'default': Issue #18520: PyErr_NoMemory() now fails with a fatal error if it is called http://hg.python.org/cpython/rev/9b77b3ee6fb8 New changeset 31796b188bec by Victor Stinner in branch 'default': Issue #18520: Fix _PySys_Init(), handle PyDict_SetItemString() errors http://hg.python.org/cpython/rev/31796b188bec New changeset d38348173c46 by Victor Stinner in branch 'default': Issue #18520: initsite() is a little bit more verbose when import site fails http://hg.python.org/cpython/rev/d38348173c46 New changeset 9267a0b836b7 by Victor Stinner in branch 'default': Issue #18520: Fix PyFunction_NewWithQualName() error handling http://hg.python.org/cpython/rev/9267a0b836b7 New changeset 4a69dbe71aeb by Victor Stinner in branch 'default': Issue #18520: Fix _PyDict_GetItemId(), suppress _PyUnicode_FromId() error http://hg.python.org/cpython/rev/4a69dbe71aeb New changeset a4998e8fd7fc by Victor Stinner in branch 'default': Issue #18520: Fix initstdio(), handle PySys_SetObject() failure http://hg.python.org/cpython/rev/a4998e8fd7fc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 00:05:40 2013 From: report at bugs.python.org (Daniel Holth) Date: Mon, 22 Jul 2013 22:05:40 +0000 Subject: [issue18532] hashlib.HASH objects should officially expose the hash name In-Reply-To: <1374524940.42.0.582552143445.issue18532@psf.upfronthosting.co.za> Message-ID: <1374530740.64.0.221392776186.issue18532@psf.upfronthosting.co.za> Daniel Holth added the comment: fwiw pypy 2 supports HASH.name but the older 1.9 (still part of some Linux distributions) did not. ---------- nosy: +dholth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 00:21:34 2013 From: report at bugs.python.org (Derek Wilson) Date: Mon, 22 Jul 2013 22:21:34 +0000 Subject: [issue18293] ssl.wrap_socket (cert_reqs=...), getpeercert, and unvalidated certificates In-Reply-To: <1372100693.76.0.99629035685.issue18293@psf.upfronthosting.co.za> Message-ID: <1374531694.67.0.474439921575.issue18293@psf.upfronthosting.co.za> Derek Wilson added the comment: Custom cert validation may make sense in edge cases, so this looks interesting. But I got here looking to file a bug on the returning empty dict from SSLContext.getpeercert - I don't feel like that makes sense. Its not like a peer cert doesn't exist just because it doesn't pass verification. And I know I can get the binary DER cert, but then I need to figure out how to parse it myself? pyasn1 makes me cry. It would be really nice if we could get the decoded-into-dict peer cert even when verification fails or when CERT_NONE is set. If it isn't possible (or advisable) for getpeercert to return the dict, exposing cert decoder would be really useful. Is this related enough to this request or should I file a separate issue? ---------- nosy: +underrun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 00:22:30 2013 From: report at bugs.python.org (Ben North) Date: Mon, 22 Jul 2013 22:22:30 +0000 Subject: [issue18533] Avoid error from repr() of recursive dictview Message-ID: <1374531750.42.0.70756948567.issue18533@psf.upfronthosting.co.za> New submission from Ben North: #18019 noted the following crash in earlier 2.7: >>> d={} >>> d[42]=d.viewvalues() >>> d This issue has been fixed; the behaviour now is that a RuntimeError is produced for a recursive dictionary view: >>> d={} >>> d[42]=d.viewvalues() >>> d # (output line-broken:) {42: Traceback (most recent call last): File "", line 1, in RuntimeError: maximum recursion depth exceeded while getting the repr of a list Before finding this, though, I'd investigated and made a patch which produces a similar "..." output to a recursive dictionary. Reworking against current 2.7, the behaviour would be: >>> x={} >>> x[42]=x >>> x # existing behaviour for dictionaries: {42: {...}} >>> d={} >>> d[42]=d.viewvalues() >>> d # new behaviour: {42: dict_values([...])} >>> d[43]=d.viewitems() >>> d # (output line-broken:) {42: dict_values([..., dict_items([(42, ...), (43, ...)])]), 43: dict_items([(42, dict_values([..., ...])), (43, ...)])} Attached is the patch, against current 2.7 branch. If there is interest in applying this, I will create a proper patch (changelog entry, fix to Lib/test/test_dictviews.py, etc.). On python-dev, Gregory Smith noted: Given that the RuntimeError fix has been released, your proposed ... behavior is arguably a new feature so I'd only expect this to make sense for consideration in 3.4, not 2.7. (if accepted at all) [http://mail.python.org/pipermail/python-dev/2013-July/127489.html] so I have marked for consideration for versions 2.7 and 3.4. ---------- components: Interpreter Core files: non-error-recursive-dictview.patch keywords: patch messages: 193570 nosy: bennorth priority: normal severity: normal status: open title: Avoid error from repr() of recursive dictview type: behavior versions: Python 2.7, Python 3.4 Added file: http://bugs.python.org/file31019/non-error-recursive-dictview.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 00:24:07 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jul 2013 22:24:07 +0000 Subject: [issue18533] Avoid error from repr() of recursive dictview In-Reply-To: <1374531750.42.0.70756948567.issue18533@psf.upfronthosting.co.za> Message-ID: <1374531847.13.0.654796094012.issue18533@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 00:47:28 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 22 Jul 2013 22:47:28 +0000 Subject: [issue18533] Avoid error from repr() of recursive dictview In-Reply-To: <1374531750.42.0.70756948567.issue18533@psf.upfronthosting.co.za> Message-ID: <1374533248.9.0.30170397453.issue18533@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Fixing 3.3 is more likely that 3.4. I can view RuntimeError as a bug less obnoxious than crash, but others may differ. Ultimately, the release managers can decide. This is definitely appropriate for 3.4, so please add tests. If the patch is for 2.7, please do one for 3.3 or 3.4. For 3.x, d.keys() is not an issue, but d.values() is. >>> d = {} >>> d[1] = d.keys() >>> d {1: dict_keys([1])} >>> d[2] = d.values() >>> d Traceback (most recent call last): File "", line 1, in RuntimeError: maximum recursion depth exceeded while getting the repr of a list ---------- nosy: +terry.reedy stage: -> test needed versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 00:47:29 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Jul 2013 22:47:29 +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: <1374533249.18.0.0992803768891.issue18520@psf.upfronthosting.co.za> STINNER Victor added the comment: I ran my test for more than 30 minutes and I didn't find any interesting bug anymore, so I'm closing the issue. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 01:46:20 2013 From: report at bugs.python.org (Jan Kaliszewski) Date: Mon, 22 Jul 2013 23:46:20 +0000 Subject: [issue18533] Avoid error from repr() of recursive dictview In-Reply-To: <1374531750.42.0.70756948567.issue18533@psf.upfronthosting.co.za> Message-ID: <1374536780.96.0.530674196979.issue18533@psf.upfronthosting.co.za> Jan Kaliszewski added the comment: As I wrote on the list -- IMHO it's still a bug (even though not so painful as segfault) that should also be fixed in 2.7 and 3.2/3.3. In other cases (such as `d={}; d[42]=d; repr(d)`) Python does its best to avoid an error -- why in this case (`d={}; d[42]=d.values(); repr(d)`) should it raise an exception? IMHO it's an obvious oversight in implementation, not a feature that anybody would expect. ---------- nosy: +zuo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 02:32:42 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 23 Jul 2013 00:32:42 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <20130722101421.7fb0e717@limelight.wooz.org> Message-ID: Nick Coghlan added the comment: I'd prefer to keep the separate stream argument rather than duplicating the signature of open. Separation of concerns and all that :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 02:51:17 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 23 Jul 2013 00:51:17 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1374540677.32.0.590693158749.issue15805@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: It would be nice if this context manager had an option to redirect the file descriptor 0 rather than just sys.stdout. (For those familiar with py.test, I am asking for an equivalent of --capture=fd functionality.) Unlike patching sys.stdout, which is within reach to most python users, redirecting fd 0 (and restoring it) is not a trivial task. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 02:53:02 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 23 Jul 2013 00:53:02 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1374540782.76.0.456104944768.issue15805@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: In my post "fd 0" should have been "fd 1", of course. (Proving that it is not trivial to get it right:-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 03:32:11 2013 From: report at bugs.python.org (Meador Inge) Date: Tue, 23 Jul 2013 01:32:11 +0000 Subject: [issue18502] CDLL does not use same paths as util.find_library In-Reply-To: <1374185482.63.0.0818947870098.issue18502@psf.upfronthosting.co.za> Message-ID: <1374543131.46.0.204980200447.issue18502@psf.upfronthosting.co.za> Meador Inge added the comment: On Linux gcc and ld are used to implement 'find_library' and 'dlopen' is used to implement 'CDLL'. ld searches /usr/local/lib. 'dlopen' might not if the LD_LIBRARY_PATH isn't set up to do so. For example: [meadori at li589-207 cpython]$ ls /usr/local/lib libfoo.so libfoo.so.1 libfoo.so.1.0 linode [meadori at li589-207 cpython]$ ./python Python 3.4.0a0 (default:d6213012d87b, Jul 23 2013, 01:00:24) [GCC 4.7.2 20120921 (Red Hat 4.7.2-2)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from ctypes import * >>> import ctypes.util >>> ctypes.util.find_library('foo') 'libfoo.so.1' >>> CDLL(_) Traceback (most recent call last): File "", line 1, in File "/home/meadori/src/cpython/Lib/ctypes/__init__.py", line 351, in __init__ self._handle = _dlopen(self._name, mode)OSError: libfoo.so.1: cannot open shared object file: No such file or directory >>> quit() [meadori at li589-207 cpython]$ echo $LD_LIBRARY_PATH [meadori at li589-207 cpython]$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib [meadori at li589-207 cpython]$ ./python Python 3.4.0a0 (default:d6213012d87b, Jul 23 2013, 01:00:24) [GCC 4.7.2 20120921 (Red Hat 4.7.2-2)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from ctypes import * >>> import ctypes.util >>> ctypes.util.find_library('foo') 'libfoo.so.1' >>> CDLL(_) I am OK with this behavior in ctypes since it matches the system behavior with 'gcc' and 'dlopen'. So, I would fixup LD_LIBRARY_PATH or /etc/ld.so.conf if you want /usr/local/lib to be searched at load time. ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 05:02:11 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 23 Jul 2013 03:02:11 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1374548531.52.0.690239467646.issue15805@psf.upfronthosting.co.za> Nick Coghlan added the comment: Alexander, please read the earlier comments on the issue: we're deliberately *not* doing that. Such functionality is more advanced, and more appropriate for an API in the subprocess module. Anyone interested in exploring that option further should create a separate issue. This API is about making a *particular* common use case genuinely trivial. Generalising it *isn't* desirable, as any such generalisations will be sufficiently complex that people are better off just rolling their own solution from first principles. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 05:09:20 2013 From: report at bugs.python.org (Phil Webster) Date: Tue, 23 Jul 2013 03:09:20 +0000 Subject: [issue18504] IDLE:Improvements- Improving Mock_Text In-Reply-To: <1374238852.66.0.963662486602.issue18504@psf.upfronthosting.co.za> Message-ID: <1374548960.34.0.936766911086.issue18504@psf.upfronthosting.co.za> Changes by Phil Webster : ---------- nosy: +philwebster _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 05:11:05 2013 From: report at bugs.python.org (R. Jayakrishnan) Date: Tue, 23 Jul 2013 03:11:05 +0000 Subject: [issue18504] IDLE:Improvements- Improving Mock_Text In-Reply-To: <1374238852.66.0.963662486602.issue18504@psf.upfronthosting.co.za> Message-ID: <1374549065.85.0.260364710769.issue18504@psf.upfronthosting.co.za> Changes by R. Jayakrishnan : ---------- nosy: +Todd.Rovito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 05:44:22 2013 From: report at bugs.python.org (Larry Hastings) Date: Tue, 23 Jul 2013 03:44:22 +0000 Subject: [issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory In-Reply-To: <1367608586.39.0.0815102318744.issue17899@psf.upfronthosting.co.za> Message-ID: <1374551062.61.0.407034390098.issue17899@psf.upfronthosting.co.za> Larry Hastings added the comment: I've been staring at the code. I just realized: we really should call path_error() as soon as possible once we detect the error--as Christian's patch points out, close() will clear the error. So instead of playing footsie with assigning (further) to errno, I'm leaving the if (dirp == NULL) code where it is. It won't happen any sooner execution-wise; moving the close up only makes it slightly(?) easier to read, at the expense of duplicating some code. Christian, the simplicity of your patch misses one minor point: when FDOPENDIR is not defined, fd is never used, and therefore emits a warning. I was trying to clean that up at the same time as fixing this bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 05:56:00 2013 From: report at bugs.python.org (Larry Hastings) Date: Tue, 23 Jul 2013 03:56:00 +0000 Subject: [issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory In-Reply-To: <1367608586.39.0.0815102318744.issue17899@psf.upfronthosting.co.za> Message-ID: <1374551760.42.0.820728498241.issue17899@psf.upfronthosting.co.za> Larry Hastings added the comment: Attached is a new patch for trunk, removing the #undef HAVE_FDOPENDIR debug scaffolding, and rearranging the lines of error handling so close doesn't clear the errno before we use it. By cracky, while most days I do enjoy the exacting pedantry of the Python community, it sure can slow the process down sometimes. ---------- Added file: http://bugs.python.org/file31020/larry.listdir.fd.leakage.bug.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 06:09:36 2013 From: report at bugs.python.org (Larry Hastings) Date: Tue, 23 Jul 2013 04:09:36 +0000 Subject: [issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory In-Reply-To: <1367608586.39.0.0815102318744.issue17899@psf.upfronthosting.co.za> Message-ID: <1374552576.22.0.730392627694.issue17899@psf.upfronthosting.co.za> Larry Hastings added the comment: And here's an updated patch for 3.3; the only change from the previous 3.3 patch is that I call path_error before calling close. ---------- Added file: http://bugs.python.org/file31021/larry.3.3.listdir.fd.leakage.bug.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 06:10:06 2013 From: report at bugs.python.org (Larry Hastings) Date: Tue, 23 Jul 2013 04:10:06 +0000 Subject: [issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory In-Reply-To: <1367608586.39.0.0815102318744.issue17899@psf.upfronthosting.co.za> Message-ID: <1374552606.66.0.177448352913.issue17899@psf.upfronthosting.co.za> Larry Hastings added the comment: If someone will give me an LGTM I'll check these in tonight, honest, cross my heart. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 06:24:36 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 23 Jul 2013 04:24:36 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1374553476.03.0.407785357312.issue15805@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Yes, I did miss Victor's dup2() comment. (It looks like I did not subscribe to this issue from the start and missed early discussion - sorry.) The simple feature is not very useful for me. I have to deal with too many cases of misguided code like this: def write_xyz(output=sys.stdout): ... for which with RedirectStdout(...): write_xyz() will not work. I will create a separate issue once I have a concrete proposal, but with respect to this specific issue, I think it is better to provide a recipe in contextlib documentation for something like this: @contextlib.contextmanager def redirect_stdout(stream): old_stdout = sys.stdout sys.stdout = stream yield sys.stdout = old_stdout With the proposed RedirectStdout, I think many users will want some tweaks and will copy the "from scratch" implementation instead of discovering contextmanager. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 06:25:25 2013 From: report at bugs.python.org (Steven Johnson) Date: Tue, 23 Jul 2013 04:25:25 +0000 Subject: [issue18502] CDLL does not use same paths as util.find_library In-Reply-To: <1374185482.63.0.0818947870098.issue18502@psf.upfronthosting.co.za> Message-ID: <1374553525.71.0.484087966603.issue18502@psf.upfronthosting.co.za> Steven Johnson added the comment: Should the docs then be changed for find_library to inform that "It is not guaranteed that a found library can be opened" (at least for linux)? Or would a feature request for full paths from find_library for linux be more appropriate? It seems hackish to me, if a program can find a library, but can't use it without asking the user to change some environment variables or testing /usr/local/lib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 07:06:58 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 23 Jul 2013 05:06:58 +0000 Subject: [issue18534] File "name" attribute should always be a text string Message-ID: <1374556018.34.0.468152457131.issue18534@psf.upfronthosting.co.za> New submission from Nick Coghlan: Currently, if a byte sequence is passed to open() as the file name, the resulting file will have that object as its name: >>> open(os.path.expanduser(b"~/.hgrc")) <_io.TextIOWrapper name=b'/home/ncoghlan/.hgrc' mode='r' encoding='UTF-8'> >>> open(os.path.expanduser("~/.hgrc")) <_io.TextIOWrapper name='/home/ncoghlan/.hgrc' mode='r' encoding='UTF-8'> As documented in a recent post from Armin Ronacher [1], this causes the "bytes" to leak out to the public API of the file, causing problems since user code can't assume that "f.name" is a string. When bytes are passed to open() as the filename, os.fsdecode should be used to convert them to a text string before storing them in the name attribute. [1] http://lucumr.pocoo.org/2013/7/2/the-updated-guide-to-unicode/ ---------- messages: 193585 nosy: haypo, ncoghlan priority: normal severity: normal status: open title: File "name" attribute should always be a text string _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 08:15:04 2013 From: report at bugs.python.org (alejandro autalan) Date: Tue, 23 Jul 2013 06:15:04 +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: <1374560104.51.0.820257989032.issue16809@psf.upfronthosting.co.za> alejandro autalan added the comment: Hello. I tried 'tkinter_split.patch' patch against 3.3.2, but a fix for grid_info function is also needed. #test.py import tkinter as tk root = tk.Tk() b = tk.Button(root, text='Button') b.grid() print(b.grid_info()) root.mainloop() Here's is the script's output: alejandro at vostro1:~/tmp$ cpython3.3 test.py Traceback (most recent call last): File "test.py", line 10, in print(b.grid_info()) File "/home/alejandro/apps/cpython3.3.2/lib/python3.3/tkinter/__init__.py", line 2024, in grid_info if value[:1] == '.': TypeError: '_tkinter.Tcl_Obj' object is not subscriptable ---------- nosy: +alejandroautalan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 08:34:37 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 23 Jul 2013 06:34:37 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1346214384.31.0.130580797931.issue15805@psf.upfronthosting.co.za> Message-ID: <1374561277.55.0.740265185957.issue15805@psf.upfronthosting.co.za> Nick Coghlan added the comment: Can we go paint bikesheds somewhere else now, please? Raymond has persuaded me as contextlib maintainer that this small addition is worth making as a way of factoring out repeated calls to print with a file redirection in simple user scripts where thread safety isn't a concern. I think more sophisticated tools are also potentially worthwhile, but *not here*. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 10:23:16 2013 From: report at bugs.python.org (Robert Collins) Date: Tue, 23 Jul 2013 08:23:16 +0000 Subject: [issue18526] Add resource management/guarding to unittest In-Reply-To: <1374470490.47.0.980625465837.issue18526@psf.upfronthosting.co.za> Message-ID: <1374567796.07.0.448553753179.issue18526@psf.upfronthosting.co.za> Changes by Robert Collins : ---------- nosy: +rbcollins _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 10:26:31 2013 From: report at bugs.python.org (Robert Collins) Date: Tue, 23 Jul 2013 08:26:31 +0000 Subject: [issue18526] Add resource management/guarding to unittest In-Reply-To: <1374470490.47.0.980625465837.issue18526@psf.upfronthosting.co.za> Message-ID: <1374567991.95.0.431598002992.issue18526@psf.upfronthosting.co.za> Robert Collins added the comment: I'll do a full review shortly, but at the conceptual level, I don't see any benefit in making a new SkipTest base class, other than instantly breaking other runners when an unknown exception is raised. SkipTest is part of the API. Making a new exception part of the API requires a strong reason - not just 'we want to show it differently' but 'we want the runner to behave differently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 10:37:52 2013 From: report at bugs.python.org (Michael Foord) Date: Tue, 23 Jul 2013 08:37:52 +0000 Subject: [issue18526] Add resource management/guarding to unittest In-Reply-To: <1374470490.47.0.980625465837.issue18526@psf.upfronthosting.co.za> Message-ID: <1374568672.69.0.163716807197.issue18526@psf.upfronthosting.co.za> Michael Foord added the comment: My question is, is this generally useful enough for test suites beyond the Python standard library. Essentially it provides a command line interface to specialized test skipping. I *still* feel that a generalized mechanism for adding command line options to the standard test runner would allow for this and a myriad of other slightly specialized use cases. It's hard to see how to do that cleanly without full blown extension machinery (which I'm in favour of and have prototyped but it is a *much* bigger change set). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 10:55:04 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 23 Jul 2013 08:55:04 +0000 Subject: [issue8716] test_tk/test_tkk_guionly fails on OS X if run from buildbot slave daemon -- crashes Python In-Reply-To: <1273861312.32.0.0344970613986.issue8716@psf.upfronthosting.co.za> Message-ID: <1374569704.8.0.0449340778958.issue8716@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I just noticed that the Tk tests still get skipped on my machine, and rediscovered this issue. The reason that MacOS.WMAvailable() returns False on the buildbot is because it runs "./python.exe", which is not part of an application bundle and therefore has no GUI access. To easily reproduce with a framework install: * Note that MacOS.WMAvailable() returns True when you run the python/pythonw when you are logged in to the machine * Now copy /Library/Framework/Python.frameworks/Versions/Current/Resources/Python.app/Contents/MacOS/Python to "python.exe" * Run "./python.exe" and note that MacOS.WMAvailable() now returns False (and that sys.prefix still refers to the framework) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 10:55:53 2013 From: report at bugs.python.org (Larry Hastings) Date: Tue, 23 Jul 2013 08:55:53 +0000 Subject: [issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory In-Reply-To: <1367608586.39.0.0815102318744.issue17899@psf.upfronthosting.co.za> Message-ID: <1374569753.35.0.0349075539696.issue17899@psf.upfronthosting.co.za> Larry Hastings added the comment: Looks like it's too late for Christian, he's already generated the report with Coverity: https://docs.google.com/file/d/0B5wQCOK_TiRiMWVqQ0xPaDEzbkU/edit But I'm still interested in putting this to bed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 11:10:13 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 23 Jul 2013 09:10:13 +0000 Subject: [issue17496] OS X test for Tk availability in runtktests.py doesn't work In-Reply-To: <1363809005.08.0.908370147082.issue17496@psf.upfronthosting.co.za> Message-ID: <1374570613.49.0.0620960765074.issue17496@psf.upfronthosting.co.za> Ronald Oussoren added the comment: To respond to my own message: running a small Tcl script is not good enough, the process environment of python itself is also important. In particular, GUI frameworks only work from inside an application bundle (or by using some undocumented private APIs) and that's why the Tk tests cannot work on OSX without installing. BTW. I just verified that MacOS.WMAvailable() works just fine in 64-bit processes (python 2.7 on OSX 10.8), and according to the header files the API functions used in its implementation (and the corresponding python code in 3.x) are not deprecated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 11:40:56 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 23 Jul 2013 09:40:56 +0000 Subject: [issue18526] Add resource management/guarding to unittest In-Reply-To: <1374470490.47.0.980625465837.issue18526@psf.upfronthosting.co.za> Message-ID: <1374572456.6.0.93324548359.issue18526@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Does registerResource() mutate some kind of global per-process state? This doesn't sound like a good idea. (and even less so the "default resources", IMO: these are stdlib test suite-specific) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 12:02:02 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Jul 2013 10:02:02 +0000 Subject: [issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory In-Reply-To: <1367608586.39.0.0815102318744.issue17899@psf.upfronthosting.co.za> Message-ID: <1374573722.82.0.463401232157.issue17899@psf.upfronthosting.co.za> Christian Heimes added the comment: That's a preliminary report I made a couple of days ago. I posted it on G+ for some friends, it got re-posted by the official Python account and gone viral on Twitter. The interview is tonight. Coverity is probably going to create their own report after the interview. The "save_errno" approach is a common technique and not a hack. On modern systems with threading support the errno variable is a carefully crafted macro that wraps an internal function + thread local storage. Several Python files like signalmodule, faulthandler and more are using save_errno. Yes, we are pedantic. Sometimes it's not easy to cope with but we are creating a hell of a shiny piece of software. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 14:06:00 2013 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 23 Jul 2013 12:06:00 +0000 Subject: [issue18535] termios.tcgetattr should return namedtuple Message-ID: <1374581160.31.0.0241171129689.issue18535@psf.upfronthosting.co.za> New submission from anatoly techtonik: Names of field for tuple returned by tcgetattr are already in documentation at http://docs.python.org/2/library/termios.html It would be nice to get them into code. ---------- components: Library (Lib) messages: 193595 nosy: techtonik priority: normal severity: normal status: open title: termios.tcgetattr should return namedtuple type: enhancement versions: Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 14:22:08 2013 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 23 Jul 2013 12:22:08 +0000 Subject: [issue18535] termios.tcgetattr should return namedtuple In-Reply-To: <1374581160.31.0.0241171129689.issue18535@psf.upfronthosting.co.za> Message-ID: <1374582128.97.0.881536694501.issue18535@psf.upfronthosting.co.za> anatoly techtonik added the comment: Actually namedtuple doesn't suit the use case well. The use case is to read termios config, (re)set flags set it back. The attributes should be mutable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 14:38:13 2013 From: report at bugs.python.org (ariel brunner) Date: Tue, 23 Jul 2013 12:38:13 +0000 Subject: [issue791968] Arguments tooltip wrong if def contains tuple Message-ID: <1374583093.28.0.323847460688.issue791968@psf.upfronthosting.co.za> ariel brunner added the comment: It seems like the solution has caused a different issue: now, when defining a function with factional default arguments, the text replaces the correct values in the tooltip. Here's an example - >>> def f(a=0.5): pass >>> f( tooltip shows - "(a=0)", i.e. replaces the ".5" with . ---------- nosy: +ariel_bruner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 14:44:09 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 23 Jul 2013 12:44:09 +0000 Subject: [issue18535] termios.tcgetattr should return namedtuple In-Reply-To: <1374581160.31.0.0241171129689.issue18535@psf.upfronthosting.co.za> Message-ID: <1374583449.28.0.0648949143623.issue18535@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: namedtuple has a _replace method, but I agree that it would be an incompatible change. "namedlist" someone? class tcattributes(object): __slots__ = ['iflag', 'oflag', 'cflag', 'lflag', 'ispeed', 'ospeed', 'cc'] def __new__(cls, values): self = object.__new__(cls) for attr, value in zip(cls.__slots__, values): setattr(self, attr, value) return self def __getitem__(self, index): return getattr(self, self.__slots__[index]) ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 14:53:35 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 23 Jul 2013 12:53:35 +0000 Subject: [issue15805] Add stdout redirection tool to contextlib In-Reply-To: <1374553476.03.0.407785357312.issue15805@psf.upfronthosting.co.za> Message-ID: <20130723085332.092ff7ec@anarchist> Barry A. Warsaw added the comment: On Jul 23, 2013, at 04:24 AM, Alexander Belopolsky wrote: >@contextlib.contextmanager >def redirect_stdout(stream): > old_stdout = sys.stdout > sys.stdout = stream > yield > sys.stdout = old_stdout Make that: @contextlib.contextmanager def redirect_stdout(stream): old_stdout = sys.stdout sys.stdout = stream try: yield finally: sys.stdout = old_stdout and I'll be able to remove those 8 lines of code from all my other code bases :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 15:22:52 2013 From: report at bugs.python.org (=?utf-8?b?5rWpIOadjg==?=) Date: Tue, 23 Jul 2013 13:22:52 +0000 Subject: =?utf-8?b?W2lzc3VlMTg1MzZdIOadjua1qeWcqCBHb29nbGUrIOS4iuWIhuS6q+S6hg==?= =?utf-8?b?5LiA5p2h5L+h5oGv?= In-Reply-To: Message-ID: New submission from ? ?: Forwarded conversation Subject: ??? Google+ ???????? ------------------------ From: *?? (Google+)* Date: 2013/7/23 To: hk456kl at gmail.com ????????? ? ???????????????????????? Google Inc., 1600 Amphitheatre Pkwy, Mountain View, CA 94043 USA ---------- From: *?? (Google+)* Date: 2013/7/23 To: hk456kl at gmail.com ????????? ? ????????????????????????????? ????????? Google Inc., 1600 Amphitheatre Pkwy, Mountain View, CA 94043 USA ---------- messages: 193600 nosy: ?.? priority: normal severity: normal status: open title: ??? Google+ ???????? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 15:48:16 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 23 Jul 2013 13:48:16 +0000 Subject: [issue18535] termios.tcgetattr should return namedtuple In-Reply-To: <1374581160.31.0.0241171129689.issue18535@psf.upfronthosting.co.za> Message-ID: <1374587296.43.0.127776902147.issue18535@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Returning a list was probably silly to begin with (a dict would have been more natural). However, I don't think I want to see such a thing as a namedlist in the stdlib. :-( ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 15:49:34 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 23 Jul 2013 13:49:34 +0000 Subject: =?utf-8?b?W2lzc3VlMTg1MzZdIOadjua1qeWcqCBHb29nbGUrIOS4iuWIhuS6q+S6hg==?= =?utf-8?b?5LiA5p2h5L+h5oGv?= In-Reply-To: Message-ID: <1374587374.23.0.869669551581.issue18536@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 15:55:19 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 23 Jul 2013 13:55:19 +0000 Subject: [issue18534] File "name" attribute should always be a text string In-Reply-To: <1374556018.34.0.468152457131.issue18534@psf.upfronthosting.co.za> Message-ID: <1374587719.13.0.659308958843.issue18534@psf.upfronthosting.co.za> Antoine Pitrou added the comment: You can never assume that "name" will be a string: >>> f = open(0, "r") >>> f.name 0 This may be a bit of a bad idea API-wise, but changing it now will start breaking code, so I think we should leave it as-is. ---------- nosy: +aronacher, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 16:00:35 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 23 Jul 2013 14:00:35 +0000 Subject: [issue18293] ssl.wrap_socket (cert_reqs=...), getpeercert, and unvalidated certificates In-Reply-To: <1372100693.76.0.99629035685.issue18293@psf.upfronthosting.co.za> Message-ID: <1374588035.3.0.449452643704.issue18293@psf.upfronthosting.co.za> Antoine Pitrou added the comment: getpeercert() has a crappy API to begin with, but we can't change its behaviour for fear of breaking existing code (and, even, breaking it security-wise). Adding a parameter would make the API even more awful. Which is why I support Christian's idea of exposing a new API, either: - to expose the full cert chain (even if not validated) - or to set the cert verify callback ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 16:18:02 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 23 Jul 2013 14:18:02 +0000 Subject: [issue18458] libedit history offset workaround In-Reply-To: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> Message-ID: <1374589082.37.0.651489335152.issue18458@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 16:49:30 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 23 Jul 2013 14:49:30 +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: <1374590970.13.0.515995676282.issue18520@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 16:57:32 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 23 Jul 2013 14:57:32 +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: <1374591452.09.0.590701238913.issue18512@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Rephrasing R.David's question: ntrrgc: Did you consult any documentation (browsing or searching), and if so, where did you look? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 17:41:48 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 23 Jul 2013 15:41:48 +0000 Subject: [issue18521] [cppcheck] Full report In-Reply-To: <1374408848.64.0.369654911435.issue18521@psf.upfronthosting.co.za> Message-ID: <1374594108.62.0.550337734485.issue18521@psf.upfronthosting.co.za> Ronald Oussoren added the comment: What is cppcheck? The report contains some very dodgy false positives, like: [Modules/_cursesmodule.c:1095]: (style) Variable 'rtn' is assigned a value that is never used. [Modules/_cursesmodule.c:1097]: (style) Unused variable: break 1) The "rtn" is used further on the function 2) "break" is not a variable at all, but a C keyword There are also valid messages, but there appear to be a lot of false positives (based on the limited amount of checking that I've done) ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 17:42:34 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 23 Jul 2013 15:42:34 +0000 Subject: [issue18460] .chm documentation files advertised in download.html but not there. In-Reply-To: <1373893631.43.0.158733965695.issue18460@psf.upfronthosting.co.za> Message-ID: <1374594154.55.0.733222975001.issue18460@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The CHM files for 2.7.x and 3.3.x are now there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 17:43:37 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 23 Jul 2013 15:43:37 +0000 Subject: [issue18460] .chm documentation files advertised in download.html but not there. In-Reply-To: <1373893631.43.0.158733965695.issue18460@psf.upfronthosting.co.za> Message-ID: <1374594217.58.0.373347767848.issue18460@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 17:53:29 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 23 Jul 2013 15:53:29 +0000 Subject: [issue18211] -Werror=statement-after-declaration problem In-Reply-To: <1371210635.81.0.102822533543.issue18211@psf.upfronthosting.co.za> Message-ID: <1374594809.42.0.335735879057.issue18211@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I also don't understand why the optimization level shouldn't be used when building 3th-party extensions. Removing the -O flag for build_ext would be a regression compared to the current behavior because 3th-party extensions would suddenly be compiled with less optimization than before and extension authors would have to arrange for those flags themselves. That's fine on platforms using a compiler with a command-line interface that's simular to GCC, but the are compilers that don't (such as a number of vendor compilers for the various commercial unix systems). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 18:07:38 2013 From: report at bugs.python.org (James Lu) Date: Tue, 23 Jul 2013 16:07:38 +0000 Subject: [issue18537] bool.toggle() Message-ID: <1374595658.34.0.251413939428.issue18537@psf.upfronthosting.co.za> New submission from James Lu: the bool type should have a toggle() function ---------- messages: 193608 nosy: James.Lu priority: normal severity: normal status: open title: bool.toggle() type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 18:10:27 2013 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 23 Jul 2013 16:10:27 +0000 Subject: [issue18537] bool.toggle() In-Reply-To: <1374595658.34.0.251413939428.issue18537@psf.upfronthosting.co.za> Message-ID: <1374595827.34.0.362533665291.issue18537@psf.upfronthosting.co.za> Eric V. Smith added the comment: bool instances are immutable, so all "value.toggle()" could do is the same as "not value". That is, return a new bool with the "toggled" value. ---------- nosy: +eric.smith resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 18:12:11 2013 From: report at bugs.python.org (James Lu) Date: Tue, 23 Jul 2013 16:12:11 +0000 Subject: [issue18537] bool.toggle() In-Reply-To: <1374595827.34.0.362533665291.issue18537@psf.upfronthosting.co.za> Message-ID: James Lu added the comment: I mean, return a value, some people like this style. james On Tue, Jul 23, 2013 at 12:10 PM, Eric V. Smith wrote: > > Eric V. Smith added the comment: > > bool instances are immutable, so all "value.toggle()" could do is the same > as "not value". That is, return a new bool with the "toggled" value. > > ---------- > nosy: +eric.smith > resolution: -> invalid > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 18:23:31 2013 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 23 Jul 2013 16:23:31 +0000 Subject: [issue18537] bool.toggle() In-Reply-To: <1374595658.34.0.251413939428.issue18537@psf.upfronthosting.co.za> Message-ID: <1374596611.33.0.428771542787.issue18537@psf.upfronthosting.co.za> Eric V. Smith added the comment: Since it would be the same as "not value", I can't imagine this would be added to the language. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 18:29:26 2013 From: report at bugs.python.org (James Lu) Date: Tue, 23 Jul 2013 16:29:26 +0000 Subject: [issue18537] bool.toggle() In-Reply-To: <1374596611.33.0.428771542787.issue18537@psf.upfronthosting.co.za> Message-ID: James Lu added the comment: well, filter() could take the function not lambda x:not x james On Tue, Jul 23, 2013 at 12:23 PM, Eric V. Smith wrote: > > Eric V. Smith added the comment: > > Since it would be the same as "not value", I can't imagine this would be > added to the language. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 18:38:01 2013 From: report at bugs.python.org (Julien Nabet) Date: Tue, 23 Jul 2013 16:38:01 +0000 Subject: [issue18521] [cppcheck] Full report In-Reply-To: <1374408848.64.0.369654911435.issue18521@psf.upfronthosting.co.za> Message-ID: <1374597481.73.0.694437729434.issue18521@psf.upfronthosting.co.za> Julien Nabet added the comment: quotation from http://en.wikipedia.org/wiki/Cppcheck : " Cppcheck is a static code analysis tool for the C and C++ programming languages " or from http://cppcheck.sourceforge.net/ " Cppcheck is a static analysis tool for C/C++ code. Unlike C/C++ compilers and many other analysis tools it does not detect syntax errors in the code. Cppcheck primarily detects the types of bugs that the compilers normally do not detect. The goal is to detect only real errors in the code (i.e. have zero false positives). " ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 18:39:25 2013 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 23 Jul 2013 16:39:25 +0000 Subject: [issue18537] bool.toggle() In-Reply-To: <1374595658.34.0.251413939428.issue18537@psf.upfronthosting.co.za> Message-ID: <1374597565.43.0.890881087466.issue18537@psf.upfronthosting.co.za> Eric V. Smith added the comment: If that's your concern, you can use operator.not_. >>> import operator >>> filter(operator.not_, [False, True, False, False, True]) [False, False, False] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 19:16:19 2013 From: report at bugs.python.org (Larry Hastings) Date: Tue, 23 Jul 2013 17:16:19 +0000 Subject: [issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory In-Reply-To: <1367608586.39.0.0815102318744.issue17899@psf.upfronthosting.co.za> Message-ID: <1374599779.06.0.567977336152.issue17899@psf.upfronthosting.co.za> Larry Hastings added the comment: I swear I've seen a compiler where you couldn't assign to errno. But now I'm pretty sure it was MSVC, and possibly a version back in the 90s. So I'm happy to live in a world where errno is an lvalue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 20:36:45 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Jul 2013 18:36:45 +0000 Subject: [issue18534] File "name" attribute should always be a text string In-Reply-To: <1374556018.34.0.468152457131.issue18534@psf.upfronthosting.co.za> Message-ID: <1374604605.31.0.250959172273.issue18534@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Seconded Antoine. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 22:09:13 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 23 Jul 2013 20:09:13 +0000 Subject: [issue791968] Arguments tooltip wrong if def contains tuple Message-ID: <1374610153.28.0.549432667732.issue791968@psf.upfronthosting.co.za> Ned Deily added the comment: Ariel, if you think there is a problem, please open a new issue with all the pertinent information. This issue was closed long ago. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 22:17:00 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 23 Jul 2013 20:17:00 +0000 Subject: [issue18521] [cppcheck] Full report In-Reply-To: <1374408848.64.0.369654911435.issue18521@psf.upfronthosting.co.za> Message-ID: <1374610620.25.0.748713409317.issue18521@psf.upfronthosting.co.za> Ronald Oussoren added the comment: It doesn't really live up to its description. >From the start of the 'filtered' list: * Messages about PyThread_acquire_lock appear to be false positives, that name is a function that's called by the macros expanded on those lines. * Syntax error in _ctypes.h: the code is ugly, but is valid C; the message is about: else if PySlice_Check(item) { This is valid because PySlice_Check is a macro that expands into an expression with parentheses: #define PySlice_Check(op) (Py_TYPE(op) == &PySlice_Type) That said, I would have used explicit parentheses here. * unused variable in _ctypes_test.c: false positives, the variable is used in a function call two lines lower. * callproc.c:1620: False positive because the tool doesn't know that PyMem_Malloc is a malloc function and returns unitialized memory (the first one that isn't a problem with the tool) * messages about alloca: correct, I haven't looked seriously if the use of alloca is defensible here. * callproc.c:751: False positive, the variable is used by some macros that are used in the function. * the unused 'rtn' variable and 'break' in cursesmodule I've mentioned in a previous message. I haven't checked the rest of the list, but so far I'm not impressed by this tool. That's too bad, static analysis tools can be helpful in improving code quality. The high rate of false positives might be due to the preprocessor feature described in chapter 3 of the manual, the tool seems to be confused a lot by code that uses macros. Getting it to run properly on the CPython tools might therefore require significant tuning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 23:11:37 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 23 Jul 2013 21:11:37 +0000 Subject: [issue14853] test_file.py depends on sys.stdin being unseekable In-Reply-To: <1337367006.89.0.99847274779.issue14853@psf.upfronthosting.co.za> Message-ID: <1374613897.98.0.589159934775.issue14853@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Elena, your patch looks ok to me, thank you. Could you sign a contributor's agreement? http://www.python.org/psf/contrib/ (or have you already done so?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 01:20:06 2013 From: report at bugs.python.org (Ben North) Date: Tue, 23 Jul 2013 23:20:06 +0000 Subject: [issue18533] Avoid error from repr() of recursive dictview In-Reply-To: <1374531750.42.0.70756948567.issue18533@psf.upfronthosting.co.za> Message-ID: <1374621606.7.0.56189778969.issue18533@psf.upfronthosting.co.za> Ben North added the comment: New patch including tests attached, against 3.3. Terry Reedy's example above now gives >>> d = {} >>> d[1] = d.keys() >>> d[2] = d.values() >>> d {1: dict_keys([1, 2]), 2: dict_values([dict_keys([1, 2]), ...])} which I think is preferable. Summary of patch: dictobject.c: dictview_repr() now uses a Py_ReprEnter() / Py_ReprLeave() pair to check for recursion, and produces "..." if so. I think I've got the behaviour correct in the case that PySequence_List() fails, but couldn't find a way to trigger this in testing. test_dictviews.py: test_recursive_repr() checks for the correct string (containing "...") rather than a RuntimeError. test_deeply_nested_repr() is a new function, aiming to replace the original test_recursive_repr(). It checks that a RuntimeError is raised in the case of a non-recursive but deeply nested structure. Under --with-pydebug, ./python -m test.regrtest -R20:30 test_dictviews passes. ---------- Added file: http://bugs.python.org/file31022/non-error-recursive-dictview-3.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 01:44:41 2013 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Tue, 23 Jul 2013 23:44:41 +0000 Subject: [issue18538] `python -m dis ` Message-ID: <1374623081.75.0.916984106328.issue18538@psf.upfronthosting.co.za> Changes by Michele Orr? : ---------- components: Library (Lib) nosy: maker priority: normal severity: normal status: open title: `python -m dis ` type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 01:49:15 2013 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Tue, 23 Jul 2013 23:49:15 +0000 Subject: [issue18538] `python -m dis ` relying on argparse Message-ID: <1374623355.46.0.506955235816.issue18538@psf.upfronthosting.co.za> New submission from Michele Orr?: I feel a little bit embarassed for this patch; while reading the stdlib's Lib/dis.py file, I saw that the _test() function parses by itself sys.argv. I tried to clean it up using argparse; diff and "manual tests" attached. ---------- title: `python -m dis ` -> `python -m dis ` relying on argparse Added file: http://bugs.python.org/file31023/issue18538.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 02:18:55 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 24 Jul 2013 00:18:55 +0000 Subject: [issue18519] test_sqlite crashes on OS X tiger 3.x buildbot In-Reply-To: <1374400670.71.0.678852160853.issue18519@psf.upfronthosting.co.za> Message-ID: <1374625135.04.0.802379918247.issue18519@psf.upfronthosting.co.za> R. David Murray added the comment: OK, this makes much more sense to me now :) I take it the overflow error is the only one the C code could ever raise? If so, the patch looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 02:22:15 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Jul 2013 00:22:15 +0000 Subject: [issue18538] `python -m dis ` relying on argparse In-Reply-To: <1374623355.46.0.506955235816.issue18538@psf.upfronthosting.co.za> Message-ID: <1374625335.64.0.976829328968.issue18538@psf.upfronthosting.co.za> STINNER Victor added the comment: Please attach your patch separatly. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 02:24:57 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Jul 2013 00:24:57 +0000 Subject: [issue18533] Avoid error from repr() of recursive dictview In-Reply-To: <1374531750.42.0.70756948567.issue18533@psf.upfronthosting.co.za> Message-ID: <1374625497.62.0.528487634189.issue18533@psf.upfronthosting.co.za> STINNER Victor added the comment: non-error-recursive-dictview-3.3.patch: small nit, initialize result to NULL, instead of setting it to NULL only in case of error. It makes the code more readable and it is the common coding style to handle errors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 02:26:55 2013 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Wed, 24 Jul 2013 00:26:55 +0000 Subject: [issue18538] `python -m dis ` relying on argparse In-Reply-To: <1374623355.46.0.506955235816.issue18538@psf.upfronthosting.co.za> Message-ID: <1374625615.1.0.158060191468.issue18538@psf.upfronthosting.co.za> Changes by Michele Orr? : ---------- keywords: +patch Added file: http://bugs.python.org/file31024/issue18538.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 07:18:00 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 24 Jul 2013 05:18:00 +0000 Subject: [issue18534] File "name" attribute should always be a text string In-Reply-To: <1374604605.31.0.250959172273.issue18534@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Ouch, that complicates matters :( It also occurs to me that given the existence of the "opener" callback, name could be just about any type :P ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 08:36:58 2013 From: report at bugs.python.org (Ben North) Date: Wed, 24 Jul 2013 06:36:58 +0000 Subject: [issue18533] Avoid error from repr() of recursive dictview In-Reply-To: <1374531750.42.0.70756948567.issue18533@psf.upfronthosting.co.za> Message-ID: <1374647818.19.0.0994473508953.issue18533@psf.upfronthosting.co.za> Ben North added the comment: New patch, fixing nit noted in msg193624: non-error-recursive-dictview-3.3-1.patch Otherwise same as previous non-error-recursive-dictview-3.3.patch ---------- Added file: http://bugs.python.org/file31025/non-error-recursive-dictview-3.3-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 08:37:35 2013 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 24 Jul 2013 06:37:35 +0000 Subject: [issue18535] termios.tcgetattr should return namedtuple In-Reply-To: <1374581160.31.0.0241171129689.issue18535@psf.upfronthosting.co.za> Message-ID: <1374647855.41.0.734874014748.issue18535@psf.upfronthosting.co.za> anatoly techtonik added the comment: I've made my own monster, attached. ---------- Added file: http://bugs.python.org/file31026/DictRecord.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 10:28:45 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 24 Jul 2013 08:28:45 +0000 Subject: [issue18535] termios.tcgetattr should return namedtuple In-Reply-To: <1374581160.31.0.0241171129689.issue18535@psf.upfronthosting.co.za> Message-ID: <1374654525.61.0.560174665874.issue18535@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: You need a better use case though. termios awful constant names ('TIOCGWINSZ') and values ('\x1b') won't become more easy with a nametuple. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 10:40:17 2013 From: report at bugs.python.org (ariel brunner) Date: Wed, 24 Jul 2013 08:40:17 +0000 Subject: [issue791968] Arguments tooltip wrong if def contains tuple Message-ID: <1374655217.17.0.799039262333.issue791968@psf.upfronthosting.co.za> ariel brunner added the comment: I will, sorry. I thought it's possible reopen an issue. Since all the relevant information is already contained here, and since the problem is with the fix to the issue, I figured it's best to reopen this one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 11:00:44 2013 From: report at bugs.python.org (Matt Hickford) Date: Wed, 24 Jul 2013 09:00:44 +0000 Subject: [issue2943] Distutils should generate a better error message when the SDK is not installed In-Reply-To: <1211455981.94.0.404413935613.issue2943@psf.upfronthosting.co.za> Message-ID: <1374656444.23.0.0310379056345.issue2943@psf.upfronthosting.co.za> Matt Hickford added the comment: ( Upstreamed from Pip https://github.com/pypa/pip/issues/942 ) There are lot of Python users on Windows. If they succeed in installing a package manager (a struggle), this is typically their first experience with it $ pip install numpy blah blah blah Error: Unable to find vcvarsall.bat The misery is compounded by the cryptic error message. They don't know whether the problem with their computer, the specific package, or pip generally. Let alone how to fix it. You and I know this happens because the package install involves building some C code from source and the user doesn't have a C compiler installed. The fix is to install mingw32 (or Visual Studio) and edit distutils.cfg to specify to use that compiler. Thus, it would be really helpful to print a message after 'error: unable to find vcvarsall.bat' such as > Installing this package requires a C compiler. To fix this error, follow http://stackoverflow.com/q/2817869/284795 ---------- nosy: +Matt.Hickford _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 11:02:55 2013 From: report at bugs.python.org (ariel brunner) Date: Wed, 24 Jul 2013 09:02:55 +0000 Subject: [issue18539] Arguments tooltip wrong if def contains fractional default value Message-ID: <1374656575.04.0.287997860195.issue18539@psf.upfronthosting.co.za> New submission from ariel brunner: When defining a function with factional default arguments, the text replaces the correct values in the tooltip. Here's an example - >>> def f(a=0.5): pass >>> f( tooltip shows - "(a=0)", i.e. replaces the ".5" with . This was found to happen on IDLE with python 2.7.3 and 2.7.5 (the latter was on 64 bit python installation on a windows 7 machine). The problem was discussed here - http://stackoverflow.com/questions/17053492/pythons-idle-behavior-while-defining-fractional-default-values-to-function-para and the problem was found to stem from the CallTips.py file (exact code lines in the link). I believe this is the result of a fix to issue791968. ---------- components: IDLE messages: 193631 nosy: ariel_bruner priority: normal severity: normal status: open title: Arguments tooltip wrong if def contains fractional default value type: behavior versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 11:03:19 2013 From: report at bugs.python.org (ariel brunner) Date: Wed, 24 Jul 2013 09:03:19 +0000 Subject: [issue18539] Arguments tooltip wrong if def contains fractional default value In-Reply-To: <1374656575.04.0.287997860195.issue18539@psf.upfronthosting.co.za> Message-ID: <1374656599.2.0.723448077176.issue18539@psf.upfronthosting.co.za> Changes by ariel brunner : ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 11:19:31 2013 From: report at bugs.python.org (=?utf-8?q?Mat=C4=9Bj_Stuchl=C3=ADk?=) Date: Wed, 24 Jul 2013 09:19:31 +0000 Subject: [issue18540] imaplib.IMAP4() ends with "Name or service not known" on Fedora 18 Message-ID: <1374657571.18.0.17831195671.issue18540@psf.upfronthosting.co.za> New submission from Mat?j Stuchl?k: Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python2.7/imaplib.py", line 163, in __init__ self.open(host, port) File "/usr/lib64/python2.7/imaplib.py", line 229, in open self.sock = socket.create_connection((host, port)) File "/usr/lib64/python2.7/socket.py", line 553, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): socket.gaierror: [Errno -2] Name or service not known Steps to Reproduce: 1. run python interpreter 2. import imaplib 3. imaplib.IMAP4() Expected behavior would be, as per documentation, for imaplib to try to connect to localhost. The root cause is, I believe, this: socket.py::create_connection states "An host of '' [...] tells the OS to use the default." and thus imaplib uses '' as the default value for host, however from getaddrinfo (to which function the host variable is passed) documentation and source it seems to me that it expect None, not '' as the default value. Substituting '' for None as the default value for host in imaplib.py seems to resolve this issue, I've included a tentative patch that does just that. In case this will need patching I'd be more than happy to work on a more complete patch! :) ---------- components: Library (Lib) files: imaplib.patch keywords: patch messages: 193632 nosy: sYnfo priority: normal severity: normal status: open title: imaplib.IMAP4() ends with "Name or service not known" on Fedora 18 type: behavior versions: Python 2.7, Python 3.5 Added file: http://bugs.python.org/file31027/imaplib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 11:27:48 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Jul 2013 09:27:48 +0000 Subject: [issue18541] LoggerAdapter example is counter-productive Message-ID: <1374658068.88.0.794389656378.issue18541@psf.upfronthosting.co.za> New submission from Antoine Pitrou: The idiomatic way to use a LoggerAdapter is to override the process() method. However, the example in the cookbook (*) is some gobbledegook code overriding __getitem__ and __iter__ on a separate class. It's a pity that users are directed to use an insane and impractical idiom while the sane way is simple and powerful. (*) http://docs.python.org/2/howto/logging-cookbook.html#context-info ---------- assignee: docs at python components: Documentation messages: 193633 nosy: docs at python, pitrou, vinay.sajip priority: normal severity: normal status: open title: LoggerAdapter example is counter-productive type: behavior versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 11:47:17 2013 From: report at bugs.python.org (Sumitinder) Date: Wed, 24 Jul 2013 09:47:17 +0000 Subject: [issue18542] httpd memory consuption increasing continously due to mod_python Message-ID: <1374659237.01.0.92417482468.issue18542@psf.upfronthosting.co.za> New submission from Sumitinder: Mod_python is used in our application and continous load of mod_python result in increase in httpd memory usage i.e upto 1.6 Gb. Packets used: mod_python-3.2.8-3.1 httpd-2.2.3-43.el5.centos Centos 5.5 OS Is there any memory leak in mod_python which is resulting in increase in memory ? ---------- messages: 193634 nosy: sumitinder priority: normal severity: normal status: open title: httpd memory consuption increasing continously due to mod_python type: performance versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 11:50:45 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 24 Jul 2013 09:50:45 +0000 Subject: [issue18542] httpd memory consuption increasing continously due to mod_python In-Reply-To: <1374659237.01.0.92417482468.issue18542@psf.upfronthosting.co.za> Message-ID: <1374659445.13.0.690117723658.issue18542@psf.upfronthosting.co.za> Ronald Oussoren added the comment: mod_python isn't part of the cpython std lib. As such, this isn't the right tracker to report problems with mod_python. You may have more success by asking the project itself (). ---------- nosy: +ronaldoussoren resolution: -> invalid status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 12:42:18 2013 From: report at bugs.python.org (Jakub Wilk) Date: Wed, 24 Jul 2013 10:42:18 +0000 Subject: [issue2066] Adding new CNS11643, a *huge* charset, support in cjkcodecs In-Reply-To: <1202731134.77.0.201279568783.issue2066@psf.upfronthosting.co.za> Message-ID: <1374662538.58.0.87192600065.issue2066@psf.upfronthosting.co.za> Changes by Jakub Wilk : ---------- nosy: +jwilk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 13:08:20 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 24 Jul 2013 11:08:20 +0000 Subject: [issue3453] PyType_Ready doesn't ensure that all bases are ready In-Reply-To: <1217171645.31.0.486361917431.issue3453@psf.upfronthosting.co.za> Message-ID: <1374664099.99.0.198549806218.issue3453@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I don't know if multiple inheritance is explicitly supported at the C level, but it is possible to create an extension type with multiple base classes in tp_bases. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 13:56:48 2013 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Wed, 24 Jul 2013 11:56:48 +0000 Subject: [issue10131] deepcopying an xml.dom.minidom.Document generates an invalid XML document In-Reply-To: <1287322940.78.0.0838139062813.issue10131@psf.upfronthosting.co.za> Message-ID: <1374667008.42.0.914694053386.issue10131@psf.upfronthosting.co.za> Changes by Bohuslav "Slavek" Kabrda : ---------- nosy: +bkabrda _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 14:00:55 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Jul 2013 12:00:55 +0000 Subject: [issue4708] os.pipe should return inheritable descriptors (Windows) In-Reply-To: <1229825725.05.0.791696937909.issue4708@psf.upfronthosting.co.za> Message-ID: <1374667255.35.0.913611914886.issue4708@psf.upfronthosting.co.za> STINNER Victor added the comment: Changing the default inheritance value of os.pipe() is not acceptable because it would break backward compatibility. Giving access to Windows extra parameter is nice, but we have to find a way to propose a portable API. That's what I'm trying to do with the PEP 446 (and it's previous version, the PEP 433). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 14:05:02 2013 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 24 Jul 2013 12:05:02 +0000 Subject: [issue18535] termios.tcgetattr should return namedtuple In-Reply-To: <1374581160.31.0.0241171129689.issue18535@psf.upfronthosting.co.za> Message-ID: <1374667502.24.0.986989492204.issue18535@psf.upfronthosting.co.za> anatoly techtonik added the comment: Do not hijack the issue - value interpretation is the next step, which better keep out of scope for this improvement. termios is a C interface, which documents the meaning of TIOCGWINSZ and has defined names for structure entries, such as lflag. This issue is to make Python code at least as readable as C. C doesn't allow you to revert value meaning from ('\x1b') to text form. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 14:06:54 2013 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 24 Jul 2013 12:06:54 +0000 Subject: [issue18535] termios.tcgetattr should return namedtuple In-Reply-To: <1374581160.31.0.0241171129689.issue18535@psf.upfronthosting.co.za> Message-ID: <1374667614.83.0.979623144428.issue18535@psf.upfronthosting.co.za> anatoly techtonik added the comment: If you need a better use case for DictRecord, urlparse is another one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 14:26:58 2013 From: report at bugs.python.org (Moritz Sichert) Date: Wed, 24 Jul 2013 12:26:58 +0000 Subject: [issue18543] urllib.parse.urlopen shouldn't ignore installed opener when called with any ca* argument Message-ID: <1374668818.72.0.697922032573.issue18543@psf.upfronthosting.co.za> New submission from Moritz Sichert: If you pass any of cafile, capath or cadefault to urllib.parse.urlopen it creates a new opener that contains the HTTPSHandler that was according to the ca* arguments. It then uses this new opener to execute the request. If you installed a custom opener with urllib.parse.install_opener it won't be used. urlopen should either add a HTTPSHandler to the installed opener or not accept any Handler specific arguments at all. ---------- components: Library (Lib) messages: 193640 nosy: moritzs priority: normal severity: normal status: open title: urllib.parse.urlopen shouldn't ignore installed opener when called with any ca* argument type: behavior versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 14:39:52 2013 From: report at bugs.python.org (=?utf-8?q?Jo=C3=A3o_Bernardo?=) Date: Wed, 24 Jul 2013 12:39:52 +0000 Subject: [issue18078] threading.Condition to allow notify on a specific waiter In-Reply-To: <1369712419.12.0.434704480843.issue18078@psf.upfronthosting.co.za> Message-ID: <1374669592.6.0.244671326736.issue18078@psf.upfronthosting.co.za> Jo?o Bernardo added the comment: ping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 14:48:18 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Jul 2013 12:48:18 +0000 Subject: [issue18078] threading.Condition to allow notify on a specific waiter In-Reply-To: <1369712419.12.0.434704480843.issue18078@psf.upfronthosting.co.za> Message-ID: <1374670098.9.0.364222785633.issue18078@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Charles-Fran?ois's point about the algorithmic complexity is legitimate, so I think he was actually waiting for you to amend your patch ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 15:03:42 2013 From: report at bugs.python.org (=?utf-8?q?Jo=C3=A3o_Bernardo?=) Date: Wed, 24 Jul 2013 13:03:42 +0000 Subject: [issue18078] threading.Condition to allow notify on a specific waiter In-Reply-To: <1369712419.12.0.434704480843.issue18078@psf.upfronthosting.co.za> Message-ID: <1374671022.02.0.933784909319.issue18078@psf.upfronthosting.co.za> Jo?o Bernardo added the comment: > Charles-Fran?ois's point about the algorithmic complexity is > legitimate, so I think he was actually waiting for you to amend > your patch ;) This doesn't seems to be the actual issue as it would require a big change for something that wasn't proven important... The old behavior is still O(1) in the new implementation. I might change that, but can someone give me an actual idea to implement that? Also, this can be done on another patch. ** The real problem ** I pointed out one issue about which conditions should be considered when waking up and there was no answer: http://bugs.python.org/msg190556 Also, Richard Oudkerk wrote he was expecting "wait_for_any() return a list": http://bugs.python.org/msg190597 I need to get feedback about the first one to change the second one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 15:08:32 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 24 Jul 2013 13:08:32 +0000 Subject: [issue6627] threading.local() does not work with C-created threads In-Reply-To: <1249243364.61.0.822632396677.issue6627@psf.upfronthosting.co.za> Message-ID: <1374671312.98.0.92539318.issue6627@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 15:45:47 2013 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 24 Jul 2013 13:45:47 +0000 Subject: [issue18541] LoggerAdapter example is counter-productive In-Reply-To: <1374658068.88.0.794389656378.issue18541@psf.upfronthosting.co.za> Message-ID: <1374673547.79.0.153087683232.issue18541@psf.upfronthosting.co.za> Vinay Sajip added the comment: That's not quite right. The recommended way *is* to override the process() method. From the page you linked to: "If you need a different method, e.g. if you want to prepend or append the contextual information to the message string, you just need to subclass LoggerAdapter and override process() to do what you need." That does not have a specific example, as it seems simple enough to understand as stated. The example you mention shows something else - how you would adapt an existing class (which might have information to go into the log) so that it could be passed (instead of a dict) to the LoggerAdapter initialiser. Possibly I could put this example into a separate section "Adapting an existing class to provide context information for logging" - this would make it clear that it's a separate use case and not the primary use case when using LoggerAdapter. The text seems clear enough, "illustrates what dict-like behaviour is needed from an arbitrary ?dict-like? object for use in the constructor", but splitting it out into a separate section will make it easier for those who are speed-reading the docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 15:57:05 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Jul 2013 13:57:05 +0000 Subject: [issue18541] LoggerAdapter example is counter-productive In-Reply-To: <1374673547.79.0.153087683232.issue18541@psf.upfronthosting.co.za> Message-ID: <260661816.18360175.1374674219341.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > That does not have a specific example, as it seems simple enough to > understand as stated. I think we should acknowledge that people often have difficulties with the rather simple functionalities of the logging module, not only the advanced ones. > The example you mention shows something else - how you would adapt an > existing class (which might have information to go into the log) so > that it could be passed (instead of a dict) to the LoggerAdapter > initialiser. But how is that necessary for the use case? Your LoggerAdapter-derived class could take the "existing class" as a constructor parameter (*), then inject the required info in its overriden process() method. (*) either by overriding the constructor, or simply by passing the "existing class" as an entry in the "extra" dict. If I had trusted your doc blindly, I would have thought it necessary to go through the "complicated scheme", while the simple scheme is actually sufficient to add per-connection info to log messages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 16:00:00 2013 From: report at bugs.python.org (Robert O'Callahan) Date: Wed, 24 Jul 2013 14:00:00 +0000 Subject: [issue18544] subprocess.Popen support for redirection of arbitrary file descriptors Message-ID: <1374674400.76.0.00470955001934.issue18544@psf.upfronthosting.co.za> New submission from Robert O'Callahan: Popen() ought to support redirection to/from more file descriptors than 0, 1, and 2 when spawning processes. A clear use case is here: http://stackoverflow.com/questions/6050187/write-to-file-descriptor-3-of-a-python-subprocess-popen-object Instead of messing around with os.open() and os.close() calls, my proposed API for Popen would be to accept keyword arguments fdN that would take the same type of values as the stdin, stdout, stderr arguments. Conflicting fd0 and stdin arguments would throw an exception. So the smelly code in the above SO question would be changed to: cmd='gpg --passphrase-fd {fd} -c'.format(fd=fd) with open('passphrase.txt','r') as fd3_fh: with open('filename.txt','r') as stdin_fh: with open('filename.gpg','w') as stdout_fh: proc=subprocess.Popen(shlex.split(cmd), stdin=stdin_fh, stdout=stdout_fh, fd3=fd3_fh) proc.communicate() ---------- components: Library (Lib) messages: 193646 nosy: ropoctorix priority: normal severity: normal status: open title: subprocess.Popen support for redirection of arbitrary file descriptors type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 16:00:58 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 24 Jul 2013 14:00:58 +0000 Subject: [issue18524] BufferedReader.read1() documentation/implementation difference In-Reply-To: <1374468975.95.0.466613665533.issue18524@psf.upfronthosting.co.za> Message-ID: <1374674458.15.0.800403559799.issue18524@psf.upfronthosting.co.za> R. David Murray added the comment: Unless I'm misunderstanding something, the current implementation does match the current documentation: if < n, returning bytes is returning "up to n". "Up to" means it could be "less than". So you are advocating a change in behavior...but I believe there is a reason read1 is implemented the way it is, so I suspect that isn't going to happen. Probably what you want to do is change the buffer size when you open the file so that it is greater than your 'n'. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 16:01:53 2013 From: report at bugs.python.org (Chris Lambacher) Date: Wed, 24 Jul 2013 14:01:53 +0000 Subject: [issue18545] enum always runs member_type when use_args is True Message-ID: <1374674513.33.0.493713574743.issue18545@psf.upfronthosting.co.za> New submission from Chris Lambacher: Starting at line 153 in enum.py there is: 153 if not use_args: 154 enum_member = __new__(enum_class) 155 original_value = value 156 else: 157 enum_member = __new__(enum_class, *args) 158 original_value = member_type(*args) 159 if not hasattr(enum_member, '_value_'): 160 enum_member._value_ = original_value When use_args is True, the member_type is always called with the arguments even if the return value from enum_member has a _value_ attr. If the __new__ function transforms the the *args then the call to member_type(*args) can fail even thought the value would not be used. I've attached a patch with a fix and a test to demonstrate the problem. The use case for the test in the attached patch is to populate Django ORM choices to a field. The first value in the tuple is the value used in the database (and as the Enum value) and the second value in the tuple is the label that Django shows in select boxes. ---------- files: enum_value_transform.patch keywords: patch messages: 193648 nosy: lambacck priority: normal severity: normal status: open title: enum always runs member_type when use_args is True type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file31028/enum_value_transform.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 16:33:27 2013 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 24 Jul 2013 14:33:27 +0000 Subject: [issue18541] LoggerAdapter example is counter-productive In-Reply-To: <1374658068.88.0.794389656378.issue18541@psf.upfronthosting.co.za> Message-ID: <1374676407.42.0.435809757838.issue18541@psf.upfronthosting.co.za> Vinay Sajip added the comment: > I think we should acknowledge that people often have difficulties > with the rather simple functionalities of the logging module, > not only the advanced ones. Perhaps some people do have difficulties, but that's always going to be the case no matter what you do. A cookbook should explore different things, both simple and less simple. > But how is that necessary for the use case? Your LoggerAdapter- > derived class could take the "existing class" as a constructor > parameter (*), then inject the required info in its overriden > process() method. If you can adapt an existing class to look sufficiently like a dict, that's all you need to do - there's no need to subclass LoggerAdapter and override process(). There might be cases where that's the easier option. It's surprising how resistant people can be to subclassing and overriding. For example, for issue #18345 which you raised (which I haven't yet addressed as you said it was low-priority), one straightforward approach would be to subclass the relevant FileHandler classes. > If I had trusted your doc blindly, I would have thought it necessary > to go through the "complicated scheme" It depends on how carefully you read it - I don't think it's *actually* misleading, and I quoted in my earlier response the sentence, which comes before the example, which says that overriding process() is what you'd normally do. What about my suggestion about a separate section for the example, to make it clearer that it's just another approach which might be more suitable in some scenarios? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 16:35:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Jul 2013 14:35:28 +0000 Subject: [issue18524] BufferedReader.read1() documentation/implementation difference In-Reply-To: <1374468975.95.0.466613665533.issue18524@psf.upfronthosting.co.za> Message-ID: <1374676528.04.0.31945479131.issue18524@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > This means that read1() will only return up to n bytes if n is smaller > than the buffer size, otherwise it will return at most > bytes. Did you actually observe such behaviour? If so, this is a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 16:40:08 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 24 Jul 2013 14:40:08 +0000 Subject: [issue18533] Avoid error from repr() of recursive dictview In-Reply-To: <1374531750.42.0.70756948567.issue18533@psf.upfronthosting.co.za> Message-ID: <1374676808.29.0.520154394006.issue18533@psf.upfronthosting.co.za> R. David Murray added the comment: I'm in favor of treating this a bugfix. It is a bug for repr to raise a recursion error, IMO. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 16:47:47 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 24 Jul 2013 14:47:47 +0000 Subject: [issue18535] termios.tcgetattr should return namedtuple In-Reply-To: <1374581160.31.0.0241171129689.issue18535@psf.upfronthosting.co.za> Message-ID: <1374677267.25.0.373396278314.issue18535@psf.upfronthosting.co.za> R. David Murray added the comment: Anatoly: FYI "Do not hijack the issue" is not a collaborative conversation style in English. A more collaborative conversation style would be to leave out that part of the sentence, and just say that you think value interpretation should be a separate, later issue (with your reasons, of course). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 16:49:52 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Jul 2013 14:49:52 +0000 Subject: [issue18541] LoggerAdapter example is counter-productive In-Reply-To: <1374676407.42.0.435809757838.issue18541@psf.upfronthosting.co.za> Message-ID: <1838590296.18469092.1374677386057.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > > But how is that necessary for the use case? Your LoggerAdapter- > > derived class could take the "existing class" as a constructor > > parameter (*), then inject the required info in its overriden > > process() method. > > If you can adapt an existing class to look sufficiently like a dict, > that's all you need to do - there's no need to subclass > LoggerAdapter and override process(). There might be cases where > that's the easier option. I am not talking about "adapting a class". I am taking about overriding process() to do the adapting in a simpler way than in your example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 16:57:14 2013 From: report at bugs.python.org (Derek Wilson) Date: Wed, 24 Jul 2013 14:57:14 +0000 Subject: [issue18546] ssl.get_server_certificate like addition for cert chain Message-ID: <1374677834.03.0.406670886322.issue18546@psf.upfronthosting.co.za> New submission from Derek Wilson: the ssl.get_server_certificate function is very useful for just requesting a cert. It would also be very useful to have a parallel function, possibly ssl.get_server_cert_chain that does the same thing except but provides a tuple of PEM encoded certs comprising the chain provided by the peer. It would also be very useful, given that we have the ability to collect certs and cert chains without validating them, to have a separate convenience method for validation of certs given a cert (or chain) and the file/path to trusted CA root certs. This way we could collect a cert chain once and validate against different ca cert stores, or collect a set of cert chains and do batch validation. oh, and I'd love to see the _ssl._decode_certificate function exposed so that we can get easily get python data structure from certs. If any of this sounds useful I would be happy to submit patches. ---------- components: Extension Modules messages: 193654 nosy: underrun priority: normal severity: normal status: open title: ssl.get_server_certificate like addition for cert chain type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 17:08:37 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 24 Jul 2013 15:08:37 +0000 Subject: [issue18540] imaplib.IMAP4() ends with "Name or service not known" on Fedora 18 In-Reply-To: <1374657571.18.0.17831195671.issue18540@psf.upfronthosting.co.za> Message-ID: <1374678517.12.0.446511130091.issue18540@psf.upfronthosting.co.za> R. David Murray added the comment: So this represents a change in behavior of the socket library on Fedora 18 vs earlier versions? Do any of the impalib tests fail? ---------- components: +email nosy: +barry, r.david.murray versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 17:11:36 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 24 Jul 2013 15:11:36 +0000 Subject: [issue18543] urllib.parse.urlopen shouldn't ignore installed opener when called with any ca* argument In-Reply-To: <1374668818.72.0.697922032573.issue18543@psf.upfronthosting.co.za> Message-ID: <1374678696.04.0.616439851516.issue18543@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 17:12:52 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 24 Jul 2013 15:12:52 +0000 Subject: [issue18545] enum always runs member_type when use_args is True In-Reply-To: <1374674513.33.0.493713574743.issue18545@psf.upfronthosting.co.za> Message-ID: <1374678772.09.0.773281914309.issue18545@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- assignee: -> ethan.furman nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 17:21:52 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 24 Jul 2013 15:21:52 +0000 Subject: [issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer In-Reply-To: <1300164402.79.0.766591131661.issue11549@psf.upfronthosting.co.za> Message-ID: <1374679312.06.0.822908015554.issue11549@psf.upfronthosting.co.za> Nick Coghlan added the comment: Just noting for the record (since it appears it was never brought back to the comments): it is expected that programs that manipulate the AST may require updates before they will work on a new version of Python. Preserving AST backwards compatbility is too limiting to the evolution of the language, so only source compatibility is promised. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 17:22:31 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 24 Jul 2013 15:22:31 +0000 Subject: [issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer In-Reply-To: <1300164402.79.0.766591131661.issue11549@psf.upfronthosting.co.za> Message-ID: <1374679351.92.0.475329285349.issue11549@psf.upfronthosting.co.za> Nick Coghlan added the comment: (That was the outcome of the suggested AST discussions on python-dev that were mentioned earlier) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 17:26:34 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Jul 2013 15:26:34 +0000 Subject: [issue18546] ssl.get_server_certificate like addition for cert chain In-Reply-To: <1374677834.03.0.406670886322.issue18546@psf.upfronthosting.co.za> Message-ID: <1374679594.82.0.708275606708.issue18546@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm already working on the issue and I have a couple of patches in my work queue, e.g. #18369, #18233, #18147, #16487 and #18293 ---------- nosy: +christian.heimes stage: -> needs patch superseder: -> SSLSocket.getpeercertchain() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 17:27:06 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Jul 2013 15:27:06 +0000 Subject: [issue18546] ssl.get_server_certificate like addition for cert chain In-Reply-To: <1374677834.03.0.406670886322.issue18546@psf.upfronthosting.co.za> Message-ID: <1374679626.55.0.114714086464.issue18546@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- assignee: -> christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 17:47:12 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 24 Jul 2013 15:47:12 +0000 Subject: [issue18078] threading.Condition to allow notify on a specific waiter In-Reply-To: <1369712419.12.0.434704480843.issue18078@psf.upfronthosting.co.za> Message-ID: <1374680832.36.0.91126365736.issue18078@psf.upfronthosting.co.za> Richard Oudkerk added the comment: IMHO 1) It should check all predicates. 2) It should return a list of ready conditions. 3) It should *not* accept a list of conditions. 4) from_condition() should be removed. Also notify() should try again if releasing a waiter raises RuntimeError because it has already been released. Otherwise notify() can be a noop even when there are threads waiting on the condition. I would also put for cond in conditions: cond._remove_waiter(waiter) in wait_for_any() in to a finally clause in case the wait was interrupted by KeyboardInterrupt. (Accounting for KeyboardInterrupt everywhere is not feasible, but for blocking calls which can be interrupted I think we should try.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 18:18:36 2013 From: report at bugs.python.org (=?utf-8?q?Jo=C3=A3o_Bernardo?=) Date: Wed, 24 Jul 2013 16:18:36 +0000 Subject: [issue18078] threading.Condition to allow notify on a specific waiter In-Reply-To: <1369712419.12.0.434704480843.issue18078@psf.upfronthosting.co.za> Message-ID: <1374682716.28.0.505473751872.issue18078@psf.upfronthosting.co.za> Jo?o Bernardo added the comment: > 1) It should check all predicates. OK. Maybe later there could be an option for customization? > 2) It should return a list of ready conditions. OK. > 3) It should *not* accept a list of conditions. The list option would be to simplify the "wait" method... Avoiding things like: {cond: (lambda: True)} > 4) from_condition() should be removed. OK. Could the Lock object be made part of the api, then? like "self.lock" instead of "self._lock" I'm OK with the rest of your post. Will make new patch ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 18:19:50 2013 From: report at bugs.python.org (Derek Wilson) Date: Wed, 24 Jul 2013 16:19:50 +0000 Subject: [issue18546] ssl.get_server_certificate like addition for cert chain In-Reply-To: <1374677834.03.0.406670886322.issue18546@psf.upfronthosting.co.za> Message-ID: <1374682790.24.0.624150777324.issue18546@psf.upfronthosting.co.za> Derek Wilson added the comment: very cool - i had seen a couple of those patches and they look good. Most of what I asked for is implemented in supporting bits for those issues. Is their anything you could use some help on? I'm very interested in seeing better ssl support in python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 18:31:59 2013 From: report at bugs.python.org (Jonas Eriksson) Date: Wed, 24 Jul 2013 16:31:59 +0000 Subject: [issue18547] os.path.dirname() does not behave as expected for path without /:es Message-ID: <1374683519.45.0.070204283565.issue18547@psf.upfronthosting.co.za> New submission from Jonas Eriksson: Only tested on marked python versions. Checked the code in hg (a5681f50bae2) and did not see anything related to this in the current development version. Essentially, what I see is this: >>> os.path.dirname("asdf") '' >>> os.path.dirname("./asdf") '.' >>> What I expect is the same output as from the unix command dirname: $ dirname asdf . $ dirname ./asdf . $ The change is quite straight forwards, Lib/posixpath.py needs something like if head = "": head = ".", and Lib/ntpath.py something similar. Now, this bug is a tricky one since it alters the behavior of dirname. However, I cannot see any case where "" would be useful and have seen at least one bug because of this behaviour because the return value "" is treated like an error. So I gracefully hand over the final decision to you :) ---------- components: Library (Lib) messages: 193662 nosy: Jonas.Eriksson priority: normal severity: normal status: open title: os.path.dirname() does not behave as expected for path without /:es type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 18:35:15 2013 From: report at bugs.python.org (=?utf-8?q?Mat=C4=9Bj_Stuchl=C3=ADk?=) Date: Wed, 24 Jul 2013 16:35:15 +0000 Subject: [issue18540] imaplib.IMAP4() ends with "Name or service not known" on Fedora 18 In-Reply-To: <1374657571.18.0.17831195671.issue18540@psf.upfronthosting.co.za> Message-ID: <1374683715.23.0.570448371309.issue18540@psf.upfronthosting.co.za> Mat?j Stuchl?k added the comment: >So this represents a change in behavior of the socket library on Fedora 18 vs earlier versions? I don't believe so. This happens on my Fedora 18 system, my Debian box with Python 2.6.6, on Fedora 19 (https://bugzilla.redhat.com/show_bug.cgi?id=987340), another Debian system (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=591471) and python compiled from the default branch does the same thing. The documentation for imaplib.IMAP4 says: "If host is not specified, '' (the local host) is used." My point is that imaplib.IMAP4 without any arguments should try to connect to localhost, however this is not what is currently happening, at least on the systems mentioned above. Why I think this is happening I've tried to explain in my previous comment. >Do any of the impalib tests fail? Nope. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 18:53:16 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 24 Jul 2013 16:53:16 +0000 Subject: [issue18541] LoggerAdapter example is counter-productive In-Reply-To: <1374658068.88.0.794389656378.issue18541@psf.upfronthosting.co.za> Message-ID: <3c0jL357lHzQlq@mail.python.org> Roundup Robot added the comment: New changeset 16c15d7d4480 by Vinay Sajip in branch '2.7': Issue #18541: simplified LoggerAdapter example. http://hg.python.org/cpython/rev/16c15d7d4480 New changeset adaecee37745 by Vinay Sajip in branch '3.3': Issue #18541: simplified LoggerAdapter example. http://hg.python.org/cpython/rev/adaecee37745 New changeset f931ee89cc1c by Vinay Sajip in branch 'default': Closes #18541: merged update from 3.3. http://hg.python.org/cpython/rev/f931ee89cc1c ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 20:00:02 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 24 Jul 2013 18:00:02 +0000 Subject: [issue18540] imaplib.IMAP4() ends with "Name or service not known" on Fedora 18 In-Reply-To: <1374657571.18.0.17831195671.issue18540@psf.upfronthosting.co.za> Message-ID: <1374688802.09.0.165622613716.issue18540@psf.upfronthosting.co.za> R. David Murray added the comment: OK, yeah, this seems to be long standing, untested behavior. I will take a look at what should be done here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 20:24:52 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Wed, 24 Jul 2013 18:24:52 +0000 Subject: [issue18524] BufferedReader.read1() documentation/implementation difference In-Reply-To: <1374676528.04.0.31945479131.issue18524@psf.upfronthosting.co.za> Message-ID: <51F01C3C.90807@rath.org> Nikolaus Rath added the comment: On 07/24/2013 07:35 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> This means that read1() will only return up to n bytes if n is smaller >> than the buffer size, otherwise it will return at most >> bytes. > > Did you actually observe such behaviour? If so, this is a bug. Yes, that's what I see: $ python3 bug.py Read 20 bytes using read() Read 10 bytes using read1() $ cat bug.py #!/usr/bin/env python3 import io raw = io.BytesIO(bytes(200)) buffered = io.BufferedReader(raw, 10) data = buffered.read(20) print('Read %d bytes using read()' % len(data)) data = buffered.read1(20) print('Read %d bytes using read1()' % len(data)) There should be no problem reading 20 bytes with a single call to BytesIO.read(), yet the buffered reader returns only 10 bytes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 20:48:41 2013 From: report at bugs.python.org (py.user) Date: Wed, 24 Jul 2013 18:48:41 +0000 Subject: [issue18548] In unittest doc change WidgetTestCase to SimpleWidgetTestCase in suite() Message-ID: <1374691721.34.0.862188774104.issue18548@psf.upfronthosting.co.za> New submission from py.user: http://docs.python.org/3/library/unittest.html#organizing-test-code """ def suite(): suite = unittest.TestSuite() suite.addTest(WidgetTestCase('test_default_size')) suite.addTest(WidgetTestCase('test_resize')) return suite """ ---------- assignee: docs at python components: Documentation files: issue.diff keywords: patch messages: 193667 nosy: docs at python, py.user priority: normal severity: normal status: open title: In unittest doc change WidgetTestCase to SimpleWidgetTestCase in suite() type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file31029/issue.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 21:17:05 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 24 Jul 2013 19:17:05 +0000 Subject: [issue18547] os.path.dirname() does not behave as expected for path without /:es In-Reply-To: <1374683519.45.0.070204283565.issue18547@psf.upfronthosting.co.za> Message-ID: <1374693425.28.0.387149013441.issue18547@psf.upfronthosting.co.za> R. David Murray added the comment: Oh, it would definitely be a backward compatibility issue. Imagine code that does a dirname and branches like this: d = dirname(somepath) if d: else: Or to give a more concrete example: path = fn if dirname(fn) else os.path.join(defaultdir, fn) As you can see, the current behavior has significant value in Python. So I think it is behaving correctly. Python is not the shell, even though it does have many functions that provide APIs very similar to the corresponding shell functions. See issue 17545 for a related issue, and specifically msg189401 for another reason why the current behavior of dirname is correct within the logic of Python. Based on the above I'm going to go ahead and close this. If other developers disagree they can reopen. If they don't, and you disagree, I would suggest that talking about it on python-ideas would be your next step. ---------- nosy: +r.david.murray resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 21:20:10 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Jul 2013 19:20:10 +0000 Subject: [issue18549] Dead code in socket_ntohl() Message-ID: <1374693610.23.0.39221855821.issue18549@psf.upfronthosting.co.za> New submission from Christian Heimes: http://hg.python.org/cpython/file/96d817f41c4c/Modules/socketmodule.c#l4642 The code has two checks if (x == (unsigned long) -1 && PyErr_Occurred()). Coverity claims that the second time is dead code and I agree. It looks like an artifact from the time the function didn't check for integer overflow. CID 982369 ---------- messages: 193669 nosy: christian.heimes, haypo, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Dead code in socket_ntohl() type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 21:39:39 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Jul 2013 19:39:39 +0000 Subject: [issue18550] internal_setblocking() doesn't check return value of fcntl() Message-ID: <1374694779.19.0.0902694218162.issue18550@psf.upfronthosting.co.za> New submission from Christian Heimes: http://hg.python.org/cpython/file/96d817f41c4c/Modules/socketmodule.c#l614 CID 715331 (#1 of 1): Unchecked return value from library (CHECKED_RETURN) 5. check_return: Calling function "fcntl(s->sock_fd, 4, delay_flag)" without checking return value. This library function may fail and return an error code. It's rather tedious to fix the issue. No function checks the return value of internal_setblocking()... ---------- messages: 193670 nosy: christian.heimes, haypo priority: low severity: normal stage: needs patch status: open title: internal_setblocking() doesn't check return value of fcntl() type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 21:42:20 2013 From: report at bugs.python.org (Phil Webster) Date: Wed, 24 Jul 2013 19:42:20 +0000 Subject: [issue18489] IDLE Unit test for SearchEngine.py In-Reply-To: <1374118219.91.0.797974191988.issue18489@psf.upfronthosting.co.za> Message-ID: <1374694940.51.0.157611731567.issue18489@psf.upfronthosting.co.za> Phil Webster added the comment: Added tests for the rest of the SearchEngine module. I used the mock tkMessageBox for testing the error display, but used the tkinter Text widget for other tests because mark_set and tag_add/remove haven't been added to the mock yet. ---------- Added file: http://bugs.python.org/file31030/test_searchengine2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 21:45:38 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Jul 2013 19:45:38 +0000 Subject: [issue18551] child_exec() doesn't check return value of fcntl() Message-ID: <1374695138.31.0.553729401393.issue18551@psf.upfronthosting.co.za> New submission from Christian Heimes: http://hg.python.org/cpython/file/96d817f41c4c/Modules/_posixsubprocess.c#l384 CID 715330 (#2 of 2): Unchecked return value from library (CHECKED_RETURN) 17. check_return: Calling function "fcntl(c2pwrite, 2, old & 0xfffffffffffffffe)" without checking return value. This library function may fail and return an error code. Could this cause any kind of trouble or shall I dismiss the issue as intentional? ---------- messages: 193672 nosy: christian.heimes, haypo priority: low severity: normal stage: needs patch status: open title: child_exec() doesn't check return value of fcntl() type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 22:44:46 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 24 Jul 2013 20:44:46 +0000 Subject: [issue18468] re.group() should never return a bytearray In-Reply-To: <1373931432.85.0.594082146564.issue18468@psf.upfronthosting.co.za> Message-ID: <1374698686.03.0.782768617481.issue18468@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 23:22:19 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Jul 2013 21:22:19 +0000 Subject: [issue18552] obj2ast_object() doesn't check return value of PyArena_AddPyObject() Message-ID: <1374700939.92.0.113667527223.issue18552@psf.upfronthosting.co.za> New submission from Christian Heimes: CID 1046712 (#1 of 1): Unchecked return value (CHECKED_RETURN) 3. check_return: Calling function "PyArena_AddPyObject(PyArena *, PyObject *)" without checking return value (as is done elsewhere 5 out of 6 times). 4. unchecked_value: No check of the return value of "PyArena_AddPyObject(arena, obj)". 708 PyArena_AddPyObject(arena, obj); ---------- files: asdl.patch keywords: patch messages: 193673 nosy: christian.heimes priority: normal severity: normal stage: patch review status: open title: obj2ast_object() doesn't check return value of PyArena_AddPyObject() type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file31031/asdl.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 23:28:38 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Jul 2013 21:28:38 +0000 Subject: [issue18524] BufferedReader.read1() documentation/implementation difference In-Reply-To: <51F01C3C.90807@rath.org> Message-ID: <1374701309.2619.1.camel@fsol> Antoine Pitrou added the comment: Le mercredi 24 juillet 2013 ? 18:24 +0000, Nikolaus Rath a ?crit : > There should be no problem reading 20 bytes with a single call to > BytesIO.read(), yet the buffered reader returns only 10 bytes. Er. Your bug report seems to imply that read1(n) can return *more* than n bytes, which would be a bug. That it may return less than n bytes is correct, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 23:45:32 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Wed, 24 Jul 2013 21:45:32 +0000 Subject: [issue18524] BufferedReader.read1() documentation/implementation difference In-Reply-To: <1374701309.2619.1.camel@fsol> Message-ID: <51F04B4F.1030105@rath.org> Nikolaus Rath added the comment: On 07/24/2013 02:28 PM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Le mercredi 24 juillet 2013 ? 18:24 +0000, Nikolaus Rath a ?crit : >> There should be no problem reading 20 bytes with a single call to >> BytesIO.read(), yet the buffered reader returns only 10 bytes. > > Er. Your bug report seems to imply that read1(n) can return *more* than > n bytes, which would be a bug. > That it may return less than n bytes is correct, though. I admit the bug title may not have been chosen carefully enough. The documentation is correct that read1(n) never returns more than n bytes. My complaint is that the actual bound is stricter than this, band read1(n) will never return more than min(n, bufsize) bytes. To me, this seems unnecessary and counterintuitive. Why am I restricted by the buffer size if the underlying raw device could provide the requested amount with one call? Looking at the source, this restriction seems caused by read1() calling peek(). I think it would be straightforward to just delegate a read1(n) call to raw stream's read(n) method. This would improve performance, and also make the documentation more accurate. Did I miss something? Best, Nikolaus ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 23:51:31 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Jul 2013 21:51:31 +0000 Subject: [issue18524] BufferedReader.read1() documentation/implementation difference In-Reply-To: <51F04B4F.1030105@rath.org> Message-ID: <1374702683.2619.5.camel@fsol> Antoine Pitrou added the comment: Le mercredi 24 juillet 2013 ? 21:45 +0000, Nikolaus Rath a ?crit : > The documentation is correct that read1(n) never returns more than n bytes. > > My complaint is that the actual bound is stricter than this, band > read1(n) will never return more than min(n, bufsize) bytes. That's not really true. If the buffer is empty, read1(n) will try to read at most n bytes from the raw stream. So: - if the buffer is not empty, the whole buffer is returned and 0 raw I/O call is issued - if the buffer is empty, 1 raw I/O call is issued and at most 1 byte is returned Therefore, if you call read1(n) in a loop, all calls but the first will really try to read *n* bytes from the raw stream (because the first call will have emptied the buffer). (one implicit goal is to minimize the number of memory copies when returning data to the application; a well-known consumer of read1() calls is TextIOWrapper when it fills its internal buffer) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 23:52:30 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Jul 2013 21:52:30 +0000 Subject: [issue18524] BufferedReader.read1() documentation/implementation difference In-Reply-To: <1374702683.2619.5.camel@fsol> Message-ID: <1374702743.2619.6.camel@fsol> Antoine Pitrou added the comment: Le mercredi 24 juillet 2013 ? 21:51 +0000, Antoine Pitrou a ?crit : > - if the buffer is empty, 1 raw I/O call is issued and at most 1 byte is > returned Make that "at most n bytes are returned", of course. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 23:58:51 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Wed, 24 Jul 2013 21:58:51 +0000 Subject: [issue18524] BufferedReader.read1() documentation/implementation difference In-Reply-To: <1374702683.2619.5.camel@fsol> Message-ID: <51F04E6F.1010904@rath.org> Nikolaus Rath added the comment: On 07/24/2013 02:51 PM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Le mercredi 24 juillet 2013 ? 21:45 +0000, Nikolaus Rath a ?crit : >> The documentation is correct that read1(n) never returns more than n bytes. >> >> My complaint is that the actual bound is stricter than this, band >> read1(n) will never return more than min(n, bufsize) bytes. > > That's not really true. If the buffer is empty, read1(n) will try to > read at most n bytes from the raw stream. So: > - if the buffer is not empty, the whole buffer is returned and 0 raw I/O > call is issued > - if the buffer is empty, 1 raw I/O call is issued and at most 1 byte is > returned > > Therefore, if you call read1(n) in a loop, all calls but the first will > really try to read *n* bytes from the raw stream (because the first call > will have emptied the buffer). I agree that this is how it *should* work. But that's not what's happening in practice: > $ python3 Python 3.2.3 (default, Feb 20 2013, 14:44:27) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import io >>> raw = io.BytesIO(bytes(200)) >>> buffered = io.BufferedReader(raw, 10) >>> while True: ... buf = buffered.read1(20) ... print('Read %d bytes' % len(buf)) ... if not buf: ... break ... Read 10 bytes Read 10 bytes Read 10 bytes Read 10 bytes Read 10 bytes Read 10 bytes Read 10 bytes Read 10 bytes [...] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 00:04:19 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Jul 2013 22:04:19 +0000 Subject: [issue18524] BufferedReader.read1() documentation/implementation difference In-Reply-To: <1374468975.95.0.466613665533.issue18524@psf.upfronthosting.co.za> Message-ID: <1374703459.4.0.166314053955.issue18524@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ah, well. This is already fixed, then: Python 3.4.0a0 (default:ae769deb45b2, Jul 20 2013, 19:28:41) [GCC 4.7.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import io >>> raw = io.BytesIO(bytes(200)) >>> buffered = io.BufferedReader(raw, 10) >>> while True: ... buf = buffered.read1(20) ... print("Got %d bytes" % len(buf)) ... if not buf: ... break ... Got 20 bytes Got 20 bytes Got 20 bytes Got 20 bytes Got 20 bytes Got 20 bytes Got 20 bytes Got 20 bytes Got 20 bytes Got 20 bytes Got 0 bytes However, 3.2 didn't get that improvement, sorry. See changeset 27bf3d0b8e5f and issue #13393. ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 00:06:01 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Jul 2013 22:06:01 +0000 Subject: [issue18524] BufferedReader.read1() documentation/implementation difference In-Reply-To: <1374468975.95.0.466613665533.issue18524@psf.upfronthosting.co.za> Message-ID: <1374703561.98.0.656146178807.issue18524@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- superseder: -> Improve BufferedReader.read1() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 00:17:50 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Wed, 24 Jul 2013 22:17:50 +0000 Subject: [issue18524] BufferedReader.read1() documentation/implementation difference In-Reply-To: <1374703459.4.0.166314053955.issue18524@psf.upfronthosting.co.za> Message-ID: <51F052E2.2070108@rath.org> Nikolaus Rath added the comment: On 07/24/2013 03:04 PM, Antoine Pitrou wrote: > However, 3.2 didn't get that improvement, sorry. See changeset 27bf3d0b8e5f and issue #13393. > > ---------- > resolution: -> duplicate > status: open -> closed Duh. So much back and forth just to find it's already fixed. Python is moving too fast these days... :-). -Nikolaus ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 05:05:15 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 25 Jul 2013 03:05:15 +0000 Subject: [issue16937] -u (unbuffered I/O) command line option documentation mismatch for sys.stdin In-Reply-To: <1357928522.67.0.838908652159.issue16937@psf.upfronthosting.co.za> Message-ID: <3c0ywB1mgfzQGZ@mail.python.org> Roundup Robot added the comment: New changeset 4b33f74ab0f1 by Ezio Melotti in branch '3.3': #16937: document that stdin is always buffered, even when -u is used. Patch by Elena Oat. http://hg.python.org/cpython/rev/4b33f74ab0f1 New changeset 52f0aa0d552a by Ezio Melotti in branch 'default': #16937: merge with 3.3. http://hg.python.org/cpython/rev/52f0aa0d552a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 05:06:29 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Jul 2013 03:06:29 +0000 Subject: [issue16937] -u (unbuffered I/O) command line option documentation mismatch for sys.stdin In-Reply-To: <1357928522.67.0.838908652159.issue16937@psf.upfronthosting.co.za> Message-ID: <1374721589.28.0.325887335867.issue16937@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 type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 05:25:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 25 Jul 2013 03:25:06 +0000 Subject: [issue14853] test_file.py depends on sys.stdin being unseekable In-Reply-To: <1337367006.89.0.99847274779.issue14853@psf.upfronthosting.co.za> Message-ID: <3c0zM53KlfzSg3@mail.python.org> Roundup Robot added the comment: New changeset 17542d36effd by Ezio Melotti in branch '2.7': #14853: remove test that was making too many assumptions about stdin. Patch by Elena Oat. http://hg.python.org/cpython/rev/17542d36effd New changeset c5d847ee354a by Ezio Melotti in branch '3.3': #14853: remove test that was making too many assumptions about stdin. Patch by Elena Oat. http://hg.python.org/cpython/rev/c5d847ee354a New changeset 1d0ff57e392e by Ezio Melotti in branch 'default': #14853: merge with 3.3. http://hg.python.org/cpython/rev/1d0ff57e392e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 05:25:51 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Jul 2013 03:25:51 +0000 Subject: [issue14853] test_file.py depends on sys.stdin being unseekable In-Reply-To: <1337367006.89.0.99847274779.issue14853@psf.upfronthosting.co.za> Message-ID: <1374722751.57.0.301431272028.issue14853@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 versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 05:32:39 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Jul 2013 03:32:39 +0000 Subject: [issue5262] PythonLauncher considered harmfull In-Reply-To: <1234638505.38.0.029039550018.issue5262@psf.upfronthosting.co.za> Message-ID: <1374723159.2.0.676285675344.issue5262@psf.upfronthosting.co.za> Ezio Melotti added the comment: FWIW more than once I tried to open a .py file on Windows just to see a black box flashing by and promptly disappear. I agree that opening the file in an editor (e.g. IDLE) is a better option, but I realize some users might prefer to launch a script when they double-click on it (I always launch them by doing "python file.py"). ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 05:51:58 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Jul 2013 03:51:58 +0000 Subject: [issue18376] show the effective count of process when running the testsuite In-Reply-To: <1373107337.89.0.95411987573.issue18376@psf.upfronthosting.co.za> Message-ID: <1374724318.17.0.0807920285708.issue18376@psf.upfronthosting.co.za> Ezio Melotti added the comment: LGTM. This could go in 2.7 and 3.3 too IMHO. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 06:07:16 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Jul 2013 04:07:16 +0000 Subject: [issue9495] argparse unittest tracebacks are confusing if an error is raised when not expected In-Reply-To: <1280852518.56.0.709280463518.issue9495@psf.upfronthosting.co.za> Message-ID: <1374725236.07.0.877046244221.issue9495@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: -easy nosy: +ezio.melotti stage: needs patch -> patch review versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 06:10:22 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Jul 2013 04:10:22 +0000 Subject: [issue7982] extend captured_output to simulate different stdout.encoding In-Reply-To: <1266844157.92.0.671833558035.issue7982@psf.upfronthosting.co.za> Message-ID: <1374725422.43.0.479874443794.issue7982@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 06:28:48 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Jul 2013 04:28:48 +0000 Subject: [issue18529] Use long dash In-Reply-To: <1374499433.16.0.583158051605.issue18529@psf.upfronthosting.co.za> Message-ID: <1374726528.77.0.3940541324.issue18529@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 07:16:32 2013 From: report at bugs.python.org (Phil Webster) Date: Thu, 25 Jul 2013 05:16:32 +0000 Subject: [issue18226] IDLE Unit test for FormatParagrah.py In-Reply-To: <1371335636.99.0.534048602964.issue18226@psf.upfronthosting.co.za> Message-ID: <1374729392.55.0.0678829076788.issue18226@psf.upfronthosting.co.za> Phil Webster added the comment: This patch moves the comment_header code to reformat_comment, adds tests for reformat_comment, and implements the fix that Todd mentioned in #18429. In addition, I changed the get_comment_header and get_indent regular expressions to only look for spaces and tabs, rather than any whitespace ('\s'). These functions should only ever get single lines, but I don't think characters like newline would ever need to be part of the comment header. ---------- Added file: http://bugs.python.org/file31032/18226IDLEUnitTestFormatParagraph6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 08:31:23 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jul 2013 06:31:23 +0000 Subject: [issue18468] re.group() should never return a bytearray In-Reply-To: <1373931432.85.0.594082146564.issue18468@psf.upfronthosting.co.za> Message-ID: <1374733883.45.0.0483017179184.issue18468@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 08:33:52 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jul 2013 06:33:52 +0000 Subject: [issue18549] Dead code in socket_ntohl() In-Reply-To: <1374693610.23.0.39221855821.issue18549@psf.upfronthosting.co.za> Message-ID: <1374734032.81.0.932676207194.issue18549@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Agree, it can be removed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 11:02:24 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Thu, 25 Jul 2013 09:02:24 +0000 Subject: [issue18418] Thread.isAlive() sometimes True after fork In-Reply-To: <1374504962.64.0.834939514053.issue18418@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Bump. Did you see my review at http://bugs.python.org/review/18418/#ps8668 ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 11:47:35 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 25 Jul 2013 09:47:35 +0000 Subject: [issue18549] Dead code in socket_ntohl() In-Reply-To: <1374693610.23.0.39221855821.issue18549@psf.upfronthosting.co.za> Message-ID: <3c17rQ0bd9zSR1@mail.python.org> Roundup Robot added the comment: New changeset b7ea3f94f6ca by Christian Heimes in branch '3.3': Issue #18549: Eliminate dead code in socket_ntohl(). http://hg.python.org/cpython/rev/b7ea3f94f6ca New changeset 2a59428dbff5 by Christian Heimes in branch 'default': Issue #18549: Eliminate dead code in socket_ntohl(). http://hg.python.org/cpython/rev/2a59428dbff5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 11:48:00 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Jul 2013 09:48:00 +0000 Subject: [issue18549] Dead code in socket_ntohl() In-Reply-To: <1374693610.23.0.39221855821.issue18549@psf.upfronthosting.co.za> Message-ID: <1374745680.57.0.516740735706.issue18549@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks for the review! ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 12:14:40 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 25 Jul 2013 10:14:40 +0000 Subject: [issue18542] httpd memory consuption increasing continously due to mod_python In-Reply-To: <1374659237.01.0.92417482468.issue18542@psf.upfronthosting.co.za> Message-ID: <1374747280.43.0.252384959948.issue18542@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- stage: -> committed/rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 12:21:07 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 25 Jul 2013 10:21:07 +0000 Subject: [issue18491] Add "exe wrapper" functionality to Windows launcher In-Reply-To: <1374158765.31.0.00467890617544.issue18491@psf.upfronthosting.co.za> Message-ID: <3c18b62ggtzMjB@mail.python.org> Roundup Robot added the comment: New changeset 4123e002a1af by Vinay Sajip in branch 'default': Closes #18491: Added script-wrapper functionality to launcher source (but not to executable). http://hg.python.org/cpython/rev/4123e002a1af ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 12:22:01 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 25 Jul 2013 10:22:01 +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: <1374747721.56.0.896379872255.issue18387@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 13:13:08 2013 From: report at bugs.python.org (A. Jesse Jiryu Davis) Date: Thu, 25 Jul 2013 11:13:08 +0000 Subject: [issue18418] Thread.isAlive() sometimes True after fork In-Reply-To: Message-ID: A. Jesse Jiryu Davis added the comment: Oh, no I didn't. I'm learning how this system works. I'll respond there soon. Thanks On Thursday, July 25, 2013, Charles-Fran?ois Natali wrote: > > Charles-Fran?ois Natali added the comment: > > > Bump. > > Did you see my review at http://bugs.python.org/review/18418/#ps8668 ? > > ---------- > > _______________________________________ > Python tracker > > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 13:46:19 2013 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 25 Jul 2013 11:46:19 +0000 Subject: [issue18553] os.isatty() is not Unix only Message-ID: <1374752779.81.0.230915084667.issue18553@psf.upfronthosting.co.za> New submission from anatoly techtonik: It seems like os.isatty(0) works on Windows too. Documentation says Unix only: http://docs.python.org/2/library/os.html#os.isatty http://docs.python.org/3.4/library/os.html#os.isatty C:\>py -c "import os; print os.isatty(0)" True C:\>echo "x" | py -c "import os; print os.isatty(0)" False C:\>py -c "import os; print os.isatty(0)" | more True ---------- components: Library (Lib) messages: 193694 nosy: techtonik priority: normal severity: normal status: open title: os.isatty() is not Unix only versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 14:51:46 2013 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 25 Jul 2013 12:51:46 +0000 Subject: [issue18553] os.isatty() is not Unix only In-Reply-To: <1374752779.81.0.230915084667.issue18553@psf.upfronthosting.co.za> Message-ID: <1374756706.5.0.903607287487.issue18553@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 15:02:03 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 25 Jul 2013 13:02:03 +0000 Subject: [issue18534] State clearly that open() 'file' param is "name" attr of the result In-Reply-To: <1374556018.34.0.468152457131.issue18534@psf.upfronthosting.co.za> Message-ID: <1374757323.5.0.676167714782.issue18534@psf.upfronthosting.co.za> Nick Coghlan added the comment: Switching this to a docs bugs, since http://docs.python.org/3/library/functions.html#open doesn't mention this behaviour at all, and http://docs.python.org/3/library/io.html#io.FileIO.name only notes the fact it may be a file descriptor without mentioning the str/bytes discrepancy. So, at a bare minimum, we need to clearly describe this behaviour in the docs. We may also want to explicitly point out that using os.fsdecode(name) before passing it to open() will ensure that the name attribute is set to a string rather than a bytes object. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python title: File "name" attribute should always be a text string -> State clearly that open() 'file' param is "name" attr of the result versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 15:44:58 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 25 Jul 2013 13:44:58 +0000 Subject: [issue18554] os.__all__ is incomplete Message-ID: <1374759898.69.0.624700414808.issue18554@psf.upfronthosting.co.za> New submission from Ronald Oussoren: On Unix the __all__ of the os module doesn't list the names imported from the posix module. The attached patch ensures that exports from the posix module are added to __all__, just like they are for NT and for Python 2.7. ---------- components: Library (Lib) files: incomplete-os-all.txt keywords: needs review, patch messages: 193696 nosy: ronaldoussoren priority: normal severity: normal stage: patch review status: open title: os.__all__ is incomplete type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file31033/incomplete-os-all.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 16:03:37 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 25 Jul 2013 14:03:37 +0000 Subject: [issue18538] `python -m dis ` relying on argparse In-Reply-To: <1374623355.46.0.506955235816.issue18538@psf.upfronthosting.co.za> Message-ID: <1374761017.53.0.796584449227.issue18538@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 17:18:11 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 25 Jul 2013 15:18:11 +0000 Subject: [issue4079] new urllib2.Request 'timeout' attribute needs to have a default In-Reply-To: <1223490599.12.0.198174561396.issue4079@psf.upfronthosting.co.za> Message-ID: <1374765491.86.0.490390277862.issue4079@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, but the new test doesn't fail. With your test patch, test_default_values fails, but that is explicitly checking for the 'timeout' attribute, which isn't actually part of the public API. The new test passes even without the fix. Reading the original issue, it seems like the problem is a bit more subtle. To quote that issue: * API weirdness: Only some, special, urllib2.Request objects may be passed to handlers, because the constructor does not create objects with a .timeout. The original report here says the problem occurs if a subclass overrides 'open' (like Mechanize does). So that problem will only occur if a request gets passed to a handler without having passed through 'open'. But there is a question whether there is a way for the code that assumes the timeout attribute exists to fail that doesn't involve an override of 'open'. The answer may be no, but I haven't traced the logic or reviewed the API, so I don't know. However, it is clear that if open is overridden, and the code doing so doesn't care about timeouts and so doesn't do the attribute set itself, subsequent code will sometimes fail because it assumes that the attribute does exist. We could write a test that does that kind of override on 'open', and causes one of those code paths that assumes timeout exists to be called. But...I have some question, now, just how real an issue this is...if you override open, you really should be either calling it via super or replicating its functionality...so if there is not in fact any way to cause the lack of a timeout attribute to cause a failure without overriding open, there may not be a "real" issue here. Presumably mechanize ran into it because a keyword argument (new feature) was added. So the mechanize bug was really that there was a backward compatibility issue between 2.6 and previous versions. Is that still an issue for 2.7? Perhaps: there could still be code someone will forward port to 2.7 that overrides open and doesn't know about timeout. So it is worth fixing, since the fix is simple. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 18:18:10 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 25 Jul 2013 16:18:10 +0000 Subject: [issue18503] No assertion in test_del_param_on_nonexistent_header function and unused variables in some places in test_email.py In-Reply-To: <1374232217.26.0.713438373749.issue18503@psf.upfronthosting.co.za> Message-ID: <3c1JW61GSbzSFM@mail.python.org> Roundup Robot added the comment: New changeset 61d9c561b63d by R David Murray in branch '3.3': #18503: small cleanups in test_email. http://hg.python.org/cpython/rev/61d9c561b63d New changeset be5f1f0bea09 by R David Murray in branch 'default': #18503: small cleanups in test_email. http://hg.python.org/cpython/rev/be5f1f0bea09 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 18:19:40 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 25 Jul 2013 16:19:40 +0000 Subject: [issue18503] No assertion in test_del_param_on_nonexistent_header function and unused variables in some places in test_email.py In-Reply-To: <1374232217.26.0.713438373749.issue18503@psf.upfronthosting.co.za> Message-ID: <1374769180.69.0.722011817874.issue18503@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Vajrasky. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 18:32:53 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 25 Jul 2013 16:32:53 +0000 Subject: [issue18036] "How do I create a .pyc file?" FAQ entry is out of date In-Reply-To: <1369244271.04.0.495588356743.issue18036@psf.upfronthosting.co.za> Message-ID: <1374769973.38.0.502834955821.issue18036@psf.upfronthosting.co.za> R. David Murray added the comment: Well, the FAQ entry is "why didn't a .pyc file get created", so presumably the querant knows enough to be looking for one to get created, and so presumably knows more-or-less what it is. It seems to me that your rewording loses the sense of answering the question, and instead becomes more of a mini-tutorial on what a .pyc file is. The changes needed here, it seems to me, are to talk about the __pycache__ directory instead of the .pyc file. In python2, the issue would be that there was no write access to the source directory, and thus the .pyc file could not be created. Now that same lack of access will first of all result in the __pycache__ directory not being created. There is also then a second level: if the __pycache__ directory already exists but is not writable when a new module is first run, the .pyc file will not get created. But I bet almost no one will notice that, and thus it won't be a FAQ :) Still, that issue could be mentioned...but then you also need to mention the full, two-part, version-specific extension, since one has to know which .pyc file to expect, if there are multiple versions of python on the system. That mention could just be a pointer to the relevant docs, though, since most users will only be dealing with one python3 version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 18:43:21 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 25 Jul 2013 16:43:21 +0000 Subject: [issue17818] aifc.Aifc_read/Aifc_write.getparams can return a namedtuple In-Reply-To: <1366659454.45.0.422161537493.issue17818@psf.upfronthosting.co.za> Message-ID: <1374770601.82.0.998603045899.issue17818@psf.upfronthosting.co.za> R. David Murray added the comment: The patch looks good to me. Can you add a pickling test? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 18:50:40 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Jul 2013 16:50:40 +0000 Subject: [issue18555] type_set_bases() doesn't check return value of PyArg_UnpackTuple() Message-ID: <1374771040.36.0.388473328266.issue18555@psf.upfronthosting.co.za> New submission from Christian Heimes: http://hg.python.org/cpython/file/be5f1f0bea09/Objects/typeobject.c#l554 CID 486265 (#1 of 1): Unchecked return value (CHECKED_RETURN) 19. check_return: Calling function "PyArg_UnpackTuple(PyObject *, char const *, Py_ssize_t, Py_ssize_t, ...)" without checking return value (as is done elsewhere 64 out of 65 times). PyArg_UnpackTuple(PyList_GET_ITEM(temp, i), "", 2, 2, &cls, &mro); ---------- components: Interpreter Core messages: 193702 nosy: christian.heimes priority: normal severity: normal stage: needs patch status: open title: type_set_bases() doesn't check return value of PyArg_UnpackTuple() type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 18:52:29 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Jul 2013 16:52:29 +0000 Subject: [issue18556] ctypes' U_set() doesn't check return value of PyUnicode_AsWideChar() Message-ID: <1374771149.82.0.0818752850017.issue18556@psf.upfronthosting.co.za> New submission from Christian Heimes: http://hg.python.org/cpython/file/be5f1f0bea09/Modules/_ctypes/cfield.c#l1235 CID 486657 (#1 of 1): Unchecked return value (CHECKED_RETURN) 5. check_return: Calling function "PyUnicode_AsWideChar(PyObject *, wchar_t *, Py_ssize_t)" without checking return value (as is done elsewhere 7 out of 8 times). 1263 PyUnicode_AsWideChar(value, (wchar_t *)ptr, size); ---------- components: Extension Modules messages: 193703 nosy: christian.heimes priority: low severity: normal stage: needs patch status: open title: ctypes' U_set() doesn't check return value of PyUnicode_AsWideChar() type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 18:56:15 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 25 Jul 2013 16:56:15 +0000 Subject: [issue17545] os.listdir and os.path.join inconsistent on empty path In-Reply-To: <1364228813.43.0.916487849633.issue17545@psf.upfronthosting.co.za> Message-ID: <1374771375.58.0.892017354782.issue17545@psf.upfronthosting.co.za> R. David Murray added the comment: Is your patch backward? "Treat the path naturally" assume everyone agrees with you as to what is natural. It would be better, I think, to be explicit about it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 19:33:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 25 Jul 2013 17:33:52 +0000 Subject: [issue15130] remove redundant paragraph in socket howto In-Reply-To: <1340311752.3.0.940656841103.issue15130@psf.upfronthosting.co.za> Message-ID: <3c1LBR6Jz3zQGZ@mail.python.org> Roundup Robot added the comment: New changeset 68fce7587f72 by R David Murray in branch '3.3': #15130: remove repeat of abstract paragraph from socket howto body. http://hg.python.org/cpython/rev/68fce7587f72 New changeset be4cc946b9df by R David Murray in branch 'default': Merge #15130: remove repeat of abstract paragraph from socket howto body. http://hg.python.org/cpython/rev/be4cc946b9df New changeset a8d8bfb61874 by R David Murray in branch '2.7': #15130: remove repeat of abstract paragraph from socket howto body. http://hg.python.org/cpython/rev/a8d8bfb61874 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 19:35:16 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 25 Jul 2013 17:35:16 +0000 Subject: [issue15130] remove redundant paragraph in socket howto In-Reply-To: <1340311752.3.0.940656841103.issue15130@psf.upfronthosting.co.za> Message-ID: <1374773716.4.0.0300856824222.issue15130@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Tshepang. ---------- nosy: +r.david.murray resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 19:51:27 2013 From: report at bugs.python.org (Lukas Pirl) Date: Thu, 25 Jul 2013 17:51:27 +0000 Subject: [issue18557] email address parser desired Message-ID: <1374774687.14.0.323037279349.issue18557@psf.upfronthosting.co.za> New submission from Lukas Pirl: I am missing a non-hidden equivalent of email._parseaddr.AddressList. AddressList was retained from the former rfc822 module and is still used internally. Yes, there is email.utils but for what I know, with the provided functionality it is not possible to parse a comma separated list of email addresses (ex. "a at example.com, b at example.com"). Since RFC5322 allow commas in the local part [1], one cannot simply split a list of email addresses by comma and use email.utils.getaddresses. [1] http://tools.ietf.org/html/rfc5322#section-3.2.3 ---------- components: email messages: 193707 nosy: barry, lpirl, r.david.murray priority: normal severity: normal status: open title: email address parser desired type: enhancement versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 19:57:14 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Thu, 25 Jul 2013 17:57:14 +0000 Subject: [issue17818] aifc.Aifc_read/Aifc_write.getparams can return a namedtuple In-Reply-To: <1366659454.45.0.422161537493.issue17818@psf.upfronthosting.co.za> Message-ID: <1374775034.37.0.303431151593.issue17818@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Here's the new patch. Also, I noticed a test failing when running ./python -m test, pyclbr, complaining about _Aifc_params not present in some dict, but I don't really know how to fix it.. ---------- Added file: http://bugs.python.org/file31034/aifc_4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 20:00:42 2013 From: report at bugs.python.org (A. Jesse Jiryu Davis) Date: Thu, 25 Jul 2013 18:00:42 +0000 Subject: [issue18418] Thread.isAlive() sometimes True after fork In-Reply-To: <1373408030.66.0.77258289483.issue18418@psf.upfronthosting.co.za> Message-ID: <1374775242.27.0.940192907661.issue18418@psf.upfronthosting.co.za> A. Jesse Jiryu Davis added the comment: New patch for 3.3 branch after Charles-Fran?ois's critique: instead of changing startup sequence in Thread._bootstrap_inner, stop all threads in _limbo after a fork. ---------- Added file: http://bugs.python.org/file31035/issue18418-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 20:24:49 2013 From: report at bugs.python.org (A. Jesse Jiryu Davis) Date: Thu, 25 Jul 2013 18:24:49 +0000 Subject: [issue18418] Thread.isAlive() sometimes True after fork In-Reply-To: <1373408030.66.0.77258289483.issue18418@psf.upfronthosting.co.za> Message-ID: <1374776689.34.0.725076114487.issue18418@psf.upfronthosting.co.za> A. Jesse Jiryu Davis added the comment: (Sorry about the extraneous XML file from my IDE, I made a mistake and allowed the diff to include it.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 20:43:07 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 25 Jul 2013 18:43:07 +0000 Subject: [issue18557] email address parser desired In-Reply-To: <1374774687.14.0.323037279349.issue18557@psf.upfronthosting.co.za> Message-ID: <1374777787.48.0.683613025293.issue18557@psf.upfronthosting.co.za> R. David Murray added the comment: No, but you can do this: >>> utils.getaddresses(['a at example.com, b at example.com']) [('', 'a at example.com'), ('', 'b at example.com')] Not the worlds most intuitive API, I know...which is why we have implemented a new improved API. In 3.3, by using the new (provisional) policies, you can get a parsed list of addresses right from the Message object, without having to do any further processing yourself: >>> import email.policy >>> m = email.message_from_string('To: a at example.com, b at example.com\n\n', policy=email.policy.default) >>> m['to'] 'a at example.com, b at example.com' >>> m['to'].addresses (Address(display_name='', username='a', domain='example.com'), Address(display_name='', username='b', domain='example.com')) This new code is not as battle tested as the old code, so I need people to try using it in order to find the bugs :) ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 20:47:09 2013 From: report at bugs.python.org (Piotr Dobrogost) Date: Thu, 25 Jul 2013 18:47:09 +0000 Subject: [issue18476] No way to pass custom arguments for loggers and formatters. In-Reply-To: <1373985976.45.0.145483904171.issue18476@psf.upfronthosting.co.za> Message-ID: <1374778029.17.0.670440240204.issue18476@psf.upfronthosting.co.za> Changes by Piotr Dobrogost : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 20:53:49 2013 From: report at bugs.python.org (Lukas Pirl) Date: Thu, 25 Jul 2013 18:53:49 +0000 Subject: [issue18557] email address parser desired In-Reply-To: <1374774687.14.0.323037279349.issue18557@psf.upfronthosting.co.za> Message-ID: <1374778429.37.0.837875438568.issue18557@psf.upfronthosting.co.za> Lukas Pirl added the comment: Ah, obviously! :) Thanks for your rapid and enlightening answer. Now, at least, this feature is documented and can be found by others. Best! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 20:57:17 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 25 Jul 2013 18:57:17 +0000 Subject: [issue17818] aifc.Aifc_read/Aifc_write.getparams can return a namedtuple In-Reply-To: <1366659454.45.0.422161537493.issue17818@psf.upfronthosting.co.za> Message-ID: <1374778637.36.0.847926329448.issue17818@psf.upfronthosting.co.za> R. David Murray added the comment: pyclbr is parsing the source code, and since _Aifc_params is not a class, it does not get detected. So we just need to add it to the ignore list in the pyclbr test. I'm also getting this when I run the test with your patch applied: /home/rdmurray/python/p34/Lib/unittest/case.py:496: ResourceWarning: unclosed file <_io.BufferedReader name='@test_9764_tmp'> testMethod() Looks like you are missing a close or two. Oh, and it occurs to me that _Aifc_params doesn't follow pep8. aifc should either be all lower case or, if you are viewing it as a class, it should be _AIFCParams. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 21:20:26 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Thu, 25 Jul 2013 19:20:26 +0000 Subject: [issue17818] aifc.Aifc_read/Aifc_write.getparams can return a namedtuple In-Reply-To: <1366659454.45.0.422161537493.issue17818@psf.upfronthosting.co.za> Message-ID: <1374780026.13.0.317887259115.issue17818@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Here's the new modifications. ---------- Added file: http://bugs.python.org/file31036/aifc_5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 21:28:44 2013 From: report at bugs.python.org (Matthew Barnett) Date: Thu, 25 Jul 2013 19:28:44 +0000 Subject: [issue18556] ctypes' U_set() doesn't check return value of PyUnicode_AsWideChar() In-Reply-To: <1374771149.82.0.0818752850017.issue18556@psf.upfronthosting.co.za> Message-ID: <1374780524.0.0.136966299935.issue18556@psf.upfronthosting.co.za> Matthew Barnett added the comment: Re msg193703: A little before that, 'value' is INCREF'ed, and then: wstr = PyUnicode_AsUnicodeAndSize(value, &size); if (wstr == NULL) return NULL; Shouldn't 'value' be DECREF'ed before returning? ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 22:12:02 2013 From: report at bugs.python.org (Larry Hastings) Date: Thu, 25 Jul 2013 20:12:02 +0000 Subject: [issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory In-Reply-To: <1367608586.39.0.0815102318744.issue17899@psf.upfronthosting.co.za> Message-ID: <1374783122.31.0.3422844666.issue17899@psf.upfronthosting.co.za> Larry Hastings added the comment: Okay, this bug has dragged on long enough. Serhiy already said they looked good to him, and I am now declaring that that's good enough for me. I'll check in my patches Saturday-ish unless someone pipes up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 22:12:22 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 25 Jul 2013 20:12:22 +0000 Subject: [issue17818] aifc.Aifc_read/Aifc_write.getparams can return a namedtuple In-Reply-To: <1366659454.45.0.422161537493.issue17818@psf.upfronthosting.co.za> Message-ID: <3c1PjK32rxzRKx@mail.python.org> Roundup Robot added the comment: New changeset 560c6e9d1beb by R David Murray in branch 'default': #17818: aifc.getparams now returns a namedtuple. http://hg.python.org/cpython/rev/560c6e9d1beb ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 22:13:00 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 25 Jul 2013 20:13:00 +0000 Subject: [issue17818] aifc.Aifc_read/Aifc_write.getparams can return a namedtuple In-Reply-To: <1366659454.45.0.422161537493.issue17818@psf.upfronthosting.co.za> Message-ID: <1374783180.46.0.594364558988.issue17818@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Claudiu. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 22:51:11 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 25 Jul 2013 20:51:11 +0000 Subject: [issue18545] enum always runs member_type when use_args is True In-Reply-To: <1374674513.33.0.493713574743.issue18545@psf.upfronthosting.co.za> Message-ID: <3c1QZ61m1XzSFM@mail.python.org> Roundup Robot added the comment: New changeset 95e1d0efd896 by Ethan Furman in branch 'default': Close #18545: now only executes member_type if no _value_ is assigned in __new__. http://hg.python.org/cpython/rev/95e1d0efd896 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 23:36:39 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 25 Jul 2013 21:36:39 +0000 Subject: [issue18556] ctypes' U_set() doesn't check return value of PyUnicode_AsWideChar() In-Reply-To: <1374771149.82.0.0818752850017.issue18556@psf.upfronthosting.co.za> Message-ID: <3c1RZZ4Lc3zS6G@mail.python.org> Roundup Robot added the comment: New changeset 78e8980ec9f7 by Brett Cannon in branch '3.3': Issue #18556: Check the return value for PyUnicode_AsWideChar() in http://hg.python.org/cpython/rev/78e8980ec9f7 New changeset 2f4c4db9aee5 by Brett Cannon in branch 'default': merge for issue #18556 http://hg.python.org/cpython/rev/2f4c4db9aee5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 23:36:39 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 25 Jul 2013 21:36:39 +0000 Subject: [issue486657] small edit in ext/ownershipRules.html Message-ID: <3c1RZb2RN4zS6G@mail.python.org> Roundup Robot added the comment: New changeset 78e8980ec9f7 by Brett Cannon in branch '3.3': Issue #18556: Check the return value for PyUnicode_AsWideChar() in http://hg.python.org/cpython/rev/78e8980ec9f7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 23:37:45 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 25 Jul 2013 21:37:45 +0000 Subject: [issue18556] ctypes' U_set() doesn't check return value of PyUnicode_AsWideChar() In-Reply-To: <1374771149.82.0.0818752850017.issue18556@psf.upfronthosting.co.za> Message-ID: <1374788265.74.0.581110928579.issue18556@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks for the check, Matthew, but if you look at the other *_set() methods they do not necessarily DECREF their 'value' argument. Plus if PyUnicode_AsWideChar() fails it means memory is full or a fatal error has triggered, so there are bigger worries. =) ---------- nosy: +brett.cannon resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 01:57:32 2013 From: report at bugs.python.org (Stephen Paul Chappell) Date: Thu, 25 Jul 2013 23:57:32 +0000 Subject: [issue18558] Iterables not detected correctly Message-ID: <1374796651.89.0.668716719647.issue18558@psf.upfronthosting.co.za> New submission from Stephen Paul Chappell: The following interactive session shows that iterables are not detected properly by the `collections.abc.Iterable` class. >>> class IsIterable: def __init__(self, data): self.data = data def __getitem__(self, key): return self.data[key] >>> is_iterable = IsIterable(range(5)) >>> for value in is_iterable: value 0 1 2 3 4 >>> from collections.abc import Iterable >>> isinstance(is_iterable, Iterable) False ---------- components: Library (Lib) messages: 193723 nosy: Zero priority: normal severity: normal status: open title: Iterables not detected correctly type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 03:25:40 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 26 Jul 2013 01:25:40 +0000 Subject: [issue18558] Iterable glossary entry needs clarification In-Reply-To: <1374796651.89.0.668716719647.issue18558@psf.upfronthosting.co.za> Message-ID: <1374801940.5.0.979589568485.issue18558@psf.upfronthosting.co.za> R. David Murray added the comment: The definition of an Iterable is a class that defines an __iter__ method. Your class does not, so the behavior you site is correct. The glossary entry for 'iterable' could use a little clarification. A class that defines __getitem__ is an iterable if and only if it returns results when passed integers. Since the documentation for Iterable references that glossary entry, it should probably also be explicit that defining __getitem__ does not (because of the forgoing limitation) cause isinstance(x, Iterable) to be True. For a class that does not define __iter__, you must explicitly register it with Iterable. To see why this must be so, consider this: >>> y = IsIterable({'a': 'b', 'c': 'd'}) >>> [x for x in y] Traceback (most recent call last): File "", line 1, in File "", line 1, in File "", line 5, in __getitem__ KeyError: 0 ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, r.david.murray stage: -> needs patch title: Iterables not detected correctly -> Iterable glossary entry needs clarification versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 03:30:06 2013 From: report at bugs.python.org (Garrett Cooper) Date: Fri, 26 Jul 2013 01:30:06 +0000 Subject: [issue8079] make install fails with -j8 with python2.6/config on FreeBSD In-Reply-To: <1267857630.87.0.870938560397.issue8079@psf.upfronthosting.co.za> Message-ID: <1374802206.01.0.586581938499.issue8079@psf.upfronthosting.co.za> Garrett Cooper added the comment: Feel free to close this. I don't have any interest in pursuing it further. ---------- nosy: +Garrett.Cooper _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 10:00:08 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 26 Jul 2013 08:00:08 +0000 Subject: [issue18555] type_set_bases() doesn't check return value of PyArg_UnpackTuple() In-Reply-To: <1374771040.36.0.388473328266.issue18555@psf.upfronthosting.co.za> Message-ID: <1374825608.82.0.902791014274.issue18555@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This appears to be harmless. The contents of the "temp" list are added by mro_subclasses, and that function only adds tuples of 2 elements. That means that the call to PyArg_UnpackTuple cannot fail. It might be better to explicitly document this, either using an assert() or by calling Py_FatalError. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 13:17:06 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Jul 2013 11:17:06 +0000 Subject: [issue18555] type_set_bases() doesn't check return value of PyArg_UnpackTuple() In-Reply-To: <1374771040.36.0.388473328266.issue18555@psf.upfronthosting.co.za> Message-ID: <1374837426.8.0.183051889031.issue18555@psf.upfronthosting.co.za> Christian Heimes added the comment: Ah, you are right! Good catch :) I have marked CID 486265 as intentional / ignore. ---------- priority: normal -> low stage: needs patch -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 13:19:05 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Jul 2013 11:19:05 +0000 Subject: [issue8079] make install fails with -j8 with python2.6/config on FreeBSD In-Reply-To: <1267857630.87.0.870938560397.issue8079@psf.upfronthosting.co.za> Message-ID: <1374837545.73.0.695921263608.issue8079@psf.upfronthosting.co.za> Christian Heimes added the comment: I have never seen that kind of error with Python 2.7 or 3.3+. It's probably fixed. ---------- nosy: +christian.heimes resolution: -> out of date stage: -> committed/rejected status: open -> closed type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 15:45:57 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Jul 2013 13:45:57 +0000 Subject: [issue18559] _pickle: NULL ptr dereference when PyLong_FromSsize_t() fails Message-ID: <1374846357.58.0.162298392786.issue18559@psf.upfronthosting.co.za> New submission from Christian Heimes: Two functions in _pickle Py_DECREF() a variable although it may be NULL. The patch corrects the error handling paths. CID 1058277 CID 1058278 ---------- components: Extension Modules files: pickle_pylong_null.patch keywords: patch messages: 193729 nosy: christian.heimes priority: normal severity: normal stage: patch review status: open title: _pickle: NULL ptr dereference when PyLong_FromSsize_t() fails type: crash versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file31037/pickle_pylong_null.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 16:33:16 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 26 Jul 2013 14:33:16 +0000 Subject: [issue12978] Figure out extended attributes on BSDs In-Reply-To: <1316014526.21.0.982877507813.issue12978@psf.upfronthosting.co.za> Message-ID: <1374849196.41.0.352789641713.issue12978@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 16:52:26 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Jul 2013 14:52:26 +0000 Subject: [issue18560] builtin_sum() doesn't check return value of PyLong_FromLong() Message-ID: <1374850346.2.0.318881980727.issue18560@psf.upfronthosting.co.za> New submission from Christian Heimes: 2032 result = PyLong_FromLong(i_result); CID 1058287 (#1 of 1): Dereference null return value (NULL_RETURNS) 34. dereference: Dereferencing a pointer that might be null "result" when calling "PyNumber_Add(PyObject *, PyObject *)". [show details] 2033 temp = PyNumber_Add(result, item); ---------- components: Interpreter Core files: builtin_sum.patch keywords: patch messages: 193730 nosy: christian.heimes priority: normal severity: normal stage: patch review status: open title: builtin_sum() doesn't check return value of PyLong_FromLong() type: crash versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file31038/builtin_sum.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 16:56:00 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Jul 2013 14:56:00 +0000 Subject: [issue18561] ctypes _build_callargs() doesn't check name for NULL Message-ID: <1374850560.42.0.7834284106.issue18561@psf.upfronthosting.co.za> New submission from Christian Heimes: http://hg.python.org/cpython/file/40bec72df2a1/Modules/_ctypes/_ctypes.c#l3565 3565 case PARAMFLAG_FIN: 3566 /* 'in' parameter. Copy it from inargs. */ CID 486199 (#1 of 1): Explicit null dereferenced (FORWARD_NULL) 31. var_deref_model: Passing null pointer "name" to function "_get_arg(int *, PyObject *, PyObject *, PyObject *, PyObject *)", which dereferences it. [show details] 3567 ob =_get_arg(&inargs_index, name, defval, inargs, kwds); ---------- components: Extension Modules messages: 193731 nosy: christian.heimes priority: normal severity: normal stage: needs patch status: open title: ctypes _build_callargs() doesn't check name for NULL type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 17:23:35 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 26 Jul 2013 15:23:35 +0000 Subject: [issue12978] Figure out extended attributes on BSDs In-Reply-To: <1316014526.21.0.982877507813.issue12978@psf.upfronthosting.co.za> Message-ID: <1374852215.69.0.767448322806.issue12978@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The OSX API also has a "position" argument for both getting and setting extended attributes. The position should be 0 for normal attributes, and can have other values when accessing the resource fork of a file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 18:07:36 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 26 Jul 2013 16:07:36 +0000 Subject: [issue18562] Regex howto: revision pass Message-ID: <1374854855.56.0.787824851556.issue18562@psf.upfronthosting.co.za> New submission from A.M. Kuchling: I read through the 3.3 regex howto and have made various edits in the attached patch. * describe how \w is different when used in bytes and Unicode patterns. * describe re.ASCII flag to change that behaviour. * remove a personal reference ('I generally prefer...') * some small edits and re-wording. ---------- assignee: docs at python components: Documentation files: regex.diff keywords: patch messages: 193733 nosy: akuchling, docs at python priority: normal severity: normal stage: patch review status: open title: Regex howto: revision pass versions: Python 3.3 Added file: http://bugs.python.org/file31039/regex.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 18:13:16 2013 From: report at bugs.python.org (Berker Peksag) Date: Fri, 26 Jul 2013 16:13:16 +0000 Subject: [issue18562] Regex howto: revision pass In-Reply-To: <1374854855.56.0.787824851556.issue18562@psf.upfronthosting.co.za> Message-ID: <1374855196.09.0.823502060432.issue18562@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +ezio.melotti versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 18:30:20 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Fri, 26 Jul 2013 16:30:20 +0000 Subject: [issue18563] No unit test for yiq to rgb and rgb to yiq converting functions Message-ID: <1374856220.88.0.555143792121.issue18563@psf.upfronthosting.co.za> New submission from Vajrasky Kok: Module colorsys has hsv_to_rgb, rgb_to_hsv, hls_to_rgb, rgb_to_hls, yiq_to_rgb, rgb_to_yig public API functions. But only hsv_to_rgb, rgb_to_hsv, hls_to_rgb, rgb_to_hls functions are being unit tested. Attached the patch for adding unit test to cover the yiq_to_rgb, rgb_to_yig functions as well. ---------- components: Tests files: unit_test_for_yiq.txt messages: 193734 nosy: vajrasky priority: normal severity: normal status: open title: No unit test for yiq to rgb and rgb to yiq converting functions versions: Python 3.4 Added file: http://bugs.python.org/file31040/unit_test_for_yiq.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 19:21:46 2013 From: report at bugs.python.org (paul j3) Date: Fri, 26 Jul 2013 17:21:46 +0000 Subject: [issue14074] argparse allows nargs>1 for positional arguments but doesn't allow metavar to be a tuple In-Reply-To: <1329845918.75.0.31962840333.issue14074@psf.upfronthosting.co.za> Message-ID: <1374859306.69.0.725208407362.issue14074@psf.upfronthosting.co.za> Changes by paul j3 : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 19:26:03 2013 From: report at bugs.python.org (paul j3) Date: Fri, 26 Jul 2013 17:26:03 +0000 Subject: [issue16360] argparse: comma in metavar causes assertion failure when formatting long usage message In-Reply-To: <1351529348.85.0.0475227022594.issue16360@psf.upfronthosting.co.za> Message-ID: <1374859563.96.0.540363986798.issue16360@psf.upfronthosting.co.za> paul j3 added the comment: My rewrite of _format_actions_usage in http://bugs.python.org/issue11874 should take care of this issue. It keeps the groups and actions separate until the final formatting step, bypassing the regular expression parsing. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 19:37:28 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Fri, 26 Jul 2013 17:37:28 +0000 Subject: [issue18538] `python -m dis ` relying on argparse In-Reply-To: <1374623355.46.0.506955235816.issue18538@psf.upfronthosting.co.za> Message-ID: <1374860248.5.0.107571250901.issue18538@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 19:59:05 2013 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Fri, 26 Jul 2013 17:59:05 +0000 Subject: [issue18564] Integer overflow in socketmodule Message-ID: <1374861545.82.0.430674187566.issue18564@psf.upfronthosting.co.za> New submission from Michele Orr?: In Modules/socketmodule.c , the bluetooth address supplied is vulnerable to integer overflow. Attaching patch and a couple of tests, which should be considered as a step forward in #7687. ---------- components: Extension Modules files: btoverflow.patch keywords: patch messages: 193736 nosy: maker priority: normal severity: normal status: open title: Integer overflow in socketmodule type: behavior Added file: http://bugs.python.org/file31041/btoverflow.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 21:57:43 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Jul 2013 19:57:43 +0000 Subject: [issue18538] `python -m dis ` should use argparse In-Reply-To: <1374623355.46.0.506955235816.issue18538@psf.upfronthosting.co.za> Message-ID: <1374868663.58.0.0540747229794.issue18538@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- title: `python -m dis ` relying on argparse -> `python -m dis ` should use argparse versions: +Python 3.4 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 22:20:50 2013 From: report at bugs.python.org (paul j3) Date: Fri, 26 Jul 2013 20:20:50 +0000 Subject: [issue14074] argparse allows nargs>1 for positional arguments but doesn't allow metavar to be a tuple In-Reply-To: <1329845918.75.0.31962840333.issue14074@psf.upfronthosting.co.za> Message-ID: <1374870050.31.0.0460672474295.issue14074@psf.upfronthosting.co.za> paul j3 added the comment: This patch fixes the problem by joining the metavar terms with '|'. So the help for the test case (adapted from an existing tuple test) looks like: usage: PROG [-h] W1 [W2 ...] [X1 [X2 ...]] Y1 Y2 Y3 [Z1] positional arguments: W1|W2 w X1|X2 x Y1|Y2|Y3 y Z1 z Alternatives include: - use ',',' ',or '/' instead of '|' - use just the 1st item of the tuple - use the default (non-tuple) metavar in the help line These all pass existing tests. The last alternative would use: #metavar = '|'.join(metavar) if len(metavar)>1: metavar = default else: metavar = metavar[0] ---------- keywords: +patch Added file: http://bugs.python.org/file31042/issue14074.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 22:24:00 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 26 Jul 2013 20:24:00 +0000 Subject: [issue18519] test_sqlite crashes on OS X tiger 3.x buildbot In-Reply-To: <1374400670.71.0.678852160853.issue18519@psf.upfronthosting.co.za> Message-ID: <3c21wH4NTVzRW2@mail.python.org> Roundup Robot added the comment: New changeset f7a0a4e0ada4 by Victor Stinner in branch 'default': Issue #18519: the Python authorizer callback of sqlite3 must not raise Python exceptions http://hg.python.org/cpython/rev/f7a0a4e0ada4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 22:28:42 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Jul 2013 20:28:42 +0000 Subject: [issue18519] test_sqlite crashes on OS X tiger 3.x buildbot In-Reply-To: <1374400670.71.0.678852160853.issue18519@psf.upfronthosting.co.za> Message-ID: <1374870522.33.0.472907598794.issue18519@psf.upfronthosting.co.za> STINNER Victor added the comment: > I take it the overflow error is the only one the C code > could ever raise? If so, the patch looks good to me. Yes, _PyLong_AsInt() was the last function raising Python exception (without clearing it). Thanks for your help on fixing this function ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 22:35:42 2013 From: report at bugs.python.org (R. Jayakrishnan) Date: Fri, 26 Jul 2013 20:35:42 +0000 Subject: [issue18504] IDLE:Improvements- Improving Mock_Text In-Reply-To: <1374238852.66.0.963662486602.issue18504@psf.upfronthosting.co.za> Message-ID: <1374870942.49.0.774376699106.issue18504@psf.upfronthosting.co.za> R. Jayakrishnan added the comment: Yes,correcting myself. I should aim indexes which actual idlelib uses. Thank you Terry for the grammar. Fighting with the index parsing last week, and finally came up with a level to break the index into base and modifier and decode it along with using regular expressions. Now the mock_tk attached at this patch passes all the existing test cases, and failing the new test I have written on text_test The problem now I am dealing with is, there are four exceeding conditions I have to handle which make errors. 1.returning line < 0 2.returning line > last line 3.returning char < 0 4.returning char > its line length For example, in parsing base the return line may exceed last line but the modifier will say '-2lines' doing that, now the return line is not exceeding last line. ---------- keywords: +patch Added file: http://bugs.python.org/file31043/mocktk_decodeByRE1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 22:39:43 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Jul 2013 20:39:43 +0000 Subject: [issue18559] _pickle: NULL ptr dereference when PyLong_FromSsize_t() fails In-Reply-To: <1374846357.58.0.162298392786.issue18559@psf.upfronthosting.co.za> Message-ID: <1374871183.35.0.343770796568.issue18559@psf.upfronthosting.co.za> STINNER Victor added the comment: The patch looks good to me. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 22:45:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 26 Jul 2013 20:45:57 +0000 Subject: [issue18559] _pickle: NULL ptr dereference when PyLong_FromSsize_t() fails In-Reply-To: <1374846357.58.0.162298392786.issue18559@psf.upfronthosting.co.za> Message-ID: <3c22Pc2lKvz7LjS@mail.python.org> Roundup Robot added the comment: New changeset dbdd07657e23 by Christian Heimes in branch '3.3': Issue #18559: Fix NULL pointer dereference error in _pickle module http://hg.python.org/cpython/rev/dbdd07657e23 New changeset b33f81974516 by Christian Heimes in branch 'default': Issue #18559: Fix NULL pointer dereference error in _pickle module http://hg.python.org/cpython/rev/b33f81974516 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 22:46:26 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Jul 2013 20:46:26 +0000 Subject: [issue18559] _pickle: NULL ptr dereference when PyLong_FromSsize_t() fails In-Reply-To: <1374846357.58.0.162298392786.issue18559@psf.upfronthosting.co.za> Message-ID: <1374871586.42.0.120053759085.issue18559@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks Victor ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 22:47:04 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Jul 2013 20:47:04 +0000 Subject: [issue791968] Arguments tooltip wrong if def contains tuple Message-ID: <1374871624.9.0.888733661208.issue791968@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If someone pushes a patch and closes the issue and the buildbots break, reopening the issue is the appropriate response. Too much later and the pool of potentially interested people will have changed. Anyway, the new issue is #18539. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 22:47:56 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Jul 2013 20:47:56 +0000 Subject: [issue15892] _PyImport_GetDynLoadFunc() doesn't check return value of fstat() In-Reply-To: <1347227762.77.0.329908285172.issue15892@psf.upfronthosting.co.za> Message-ID: <1374871676.13.0.805382297956.issue15892@psf.upfronthosting.co.za> Christian Heimes added the comment: Already fixed ---------- resolution: -> out of date stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 22:47:59 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Jul 2013 20:47:59 +0000 Subject: [issue18560] builtin_sum() doesn't check return value of PyLong_FromLong() In-Reply-To: <1374850346.2.0.318881980727.issue18560@psf.upfronthosting.co.za> Message-ID: <1374871679.67.0.799180752322.issue18560@psf.upfronthosting.co.za> STINNER Victor added the comment: The patch looks good to me. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 22:49:09 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Jul 2013 20:49:09 +0000 Subject: [issue15892] _PyImport_GetDynLoadFunc() doesn't check return value of fstat() In-Reply-To: <1347227762.77.0.329908285172.issue15892@psf.upfronthosting.co.za> Message-ID: <1374871749.13.0.018901166432.issue15892@psf.upfronthosting.co.za> STINNER Victor added the comment: changeset: 84741:654268ff29b5 branch: 3.3 parent: 84736:ce771c2d0220 user: Christian Heimes date: Sat Jul 20 22:17:55 2013 +0200 files: Python/dynload_shlib.c description: Check return value of fstat() in _PyImport_GetDynLoadFunc() CID 486250 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 22:50:10 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 26 Jul 2013 20:50:10 +0000 Subject: [issue18560] builtin_sum() doesn't check return value of PyLong_FromLong() In-Reply-To: <1374850346.2.0.318881980727.issue18560@psf.upfronthosting.co.za> Message-ID: <3c22VV1P3CzMTD@mail.python.org> Roundup Robot added the comment: New changeset de7e4fd634fb by Christian Heimes in branch '3.3': Issue #18560: Fix potential NULL pointer dereference in sum() http://hg.python.org/cpython/rev/de7e4fd634fb New changeset a5d9e2f3f6c7 by Christian Heimes in branch 'default': Issue #18560: Fix potential NULL pointer dereference in sum() http://hg.python.org/cpython/rev/a5d9e2f3f6c7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 22:51:00 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Jul 2013 20:51:00 +0000 Subject: [issue15892] _PyImport_GetDynLoadFunc() doesn't check return value of fstat() In-Reply-To: <1347227762.77.0.329908285172.issue15892@psf.upfronthosting.co.za> Message-ID: <1374871860.44.0.538777974565.issue15892@psf.upfronthosting.co.za> Christian Heimes added the comment: I wonder why I did not mention the issue # in the checkin message... Thanks :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 22:52:06 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Jul 2013 20:52:06 +0000 Subject: [issue18560] builtin_sum() doesn't check return value of PyLong_FromLong() In-Reply-To: <1374850346.2.0.318881980727.issue18560@psf.upfronthosting.co.za> Message-ID: <1374871926.01.0.11437560438.issue18560@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks again! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 22:59:25 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Jul 2013 20:59:25 +0000 Subject: [issue18561] ctypes _build_callargs() doesn't check name for NULL In-Reply-To: <1374850560.42.0.7834284106.issue18561@psf.upfronthosting.co.za> Message-ID: <1374872365.19.0.91179085639.issue18561@psf.upfronthosting.co.za> STINNER Victor added the comment: _get_arg() should skip not check keywords if name is NULL (which looks to be a valid case, since name is check at the end of the function). ---------- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file31044/issue18561.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 23:04:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 26 Jul 2013 21:04:51 +0000 Subject: [issue18561] ctypes _build_callargs() doesn't check name for NULL In-Reply-To: <1374850560.42.0.7834284106.issue18561@psf.upfronthosting.co.za> Message-ID: <3c22qQ3LwJzQQ2@mail.python.org> Roundup Robot added the comment: New changeset 57457028dd7a by Christian Heimes in branch '3.3': Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL. http://hg.python.org/cpython/rev/57457028dd7a New changeset d543829eda7d by Christian Heimes in branch 'default': Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL. http://hg.python.org/cpython/rev/d543829eda7d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 23:17:42 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Jul 2013 21:17:42 +0000 Subject: [issue18528] Possible fd leak in socketmodule In-Reply-To: <1374496496.68.0.51305379842.issue18528@psf.upfronthosting.co.za> Message-ID: <1374873462.3.0.576533399697.issue18528@psf.upfronthosting.co.za> STINNER Victor added the comment: http://bugs.python.org/file31016/closesock3.patch looks overkill. For example, BEGIN_SELECT_LOOP already sets errno to 0. Here is a simpler patch. ---------- nosy: +haypo Added file: http://bugs.python.org/file31045/accept.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 23:23:07 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Jul 2013 21:23:07 +0000 Subject: [issue18528] Possible fd leak in socketmodule In-Reply-To: <1374496496.68.0.51305379842.issue18528@psf.upfronthosting.co.za> Message-ID: <1374873787.47.0.699420491626.issue18528@psf.upfronthosting.co.za> STINNER Victor added the comment: @pitrou: Does accept.patch look correct? I don't understand why we would call accept() more than once. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 23:47:38 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 26 Jul 2013 21:47:38 +0000 Subject: [issue18529] Use long dash In-Reply-To: <1374499433.16.0.583158051605.issue18529@psf.upfronthosting.co.za> Message-ID: <1374875258.82.0.873352643394.issue18529@psf.upfronthosting.co.za> ?ric Araujo added the comment: This looks like the kind of high-churn, low-benefit patches that we typically encourage new contributors not to do. It?s fine to update dashes when modifying the surrounding text for another fix, and it may be useful to encourage using them in the markup docs, but not to do one big change. ---------- nosy: +eric.araujo, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 23:59:25 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Jul 2013 21:59:25 +0000 Subject: [issue18555] type_set_bases() doesn't check return value of PyArg_UnpackTuple() In-Reply-To: <1374771040.36.0.388473328266.issue18555@psf.upfronthosting.co.za> Message-ID: <1374875965.56.0.803727656124.issue18555@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- resolution: -> wont fix stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 00:10:09 2013 From: report at bugs.python.org (Indra Talip) Date: Fri, 26 Jul 2013 22:10:09 +0000 Subject: [issue4079] new urllib2.Request 'timeout' attribute needs to have a default In-Reply-To: <1223490599.12.0.198174561396.issue4079@psf.upfronthosting.co.za> Message-ID: <1374876609.7.0.953211411584.issue4079@psf.upfronthosting.co.za> Indra Talip added the comment: Ah sorry you are right the tests didn't test the specific case of someone overriding the OpenerDirector. The intent was to demonstrate that adding a default timeout to Request didn't break things. I think you are right about how much of an issue this is. I agree that if you are overriding open you probably should be replicating it's functionality and doing something sane about the timeout parameter. Reading the code and the online docs I think that the more pertinent issue here is that it isn't documented how the timeout is passed to the handlers. That is if someone implements a new handler that could timeout just from reading the documentation it isn't clear how the timeout is passed to the handler. Given that open adds the timeout to the Request object perhaps the issue should be that the timeout attribute should be added to the public api of the Request and the docs modified to suit, thus making it explicit how handlers get the expected timeout. That does uglify the api though as you would have two places where you could set the timeout (on the Request and via open) and currently calling open with a Request, with a non-default timeout, means that open would override the timeout on the Request with whatever was set on the call to open. So overall I'm fairly ambivalent about how much of an issue the original report was. I think the larger issue is that how timeouts are handled/passed to handlers/processors should probably be documented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 00:10:30 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Jul 2013 22:10:30 +0000 Subject: [issue18539] Idle 2.7: Calltip wrong if def contains float default value In-Reply-To: <1374656575.04.0.287997860195.issue18539@psf.upfronthosting.co.za> Message-ID: <1374876630.69.0.338682752377.issue18539@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If you are the same 'ariel' as on SO, thank you for the detective work and the informative report here. Without it this 2.7-only bug would be low priority and might have sat open until we stopped patching 2.7. The underlying issue is that a) 2.x had the 'feature' of allowing tuples of parameter names to signal automatic unpacking of tuples of arguments, and b) the unnamed tuple got a pseudoname of the form '.n' in the list of argument names, which calltips uses. >>> def f((a,b), (c,d)): pass >>> f.func_code.co_varnames ('.0', '.1', 'a', 'b', 'c', 'd') Issue #791968 added the following line to change '.n' to ''. arg_text = "(%s)" % re.sub("\.\d+", "", arg_text) But this also changes float strings of form 'm.n' to 'm'. The solution is to recognize the difference between the absence and presence of a preceding digit and not do the substitution in the latter case. Adding the negative lookbehind assertion (?, c=0.0). I am preparing a patch, including the test. ---------- assignee: -> terry.reedy nosy: +terry.reedy stage: -> test needed title: Arguments tooltip wrong if def contains fractional default value -> Idle 2.7: Calltip wrong if def contains float default value _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 00:21:55 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 26 Jul 2013 22:21:55 +0000 Subject: [issue18539] Idle 2.7: Calltip wrong if def contains float default value In-Reply-To: <1374656575.04.0.287997860195.issue18539@psf.upfronthosting.co.za> Message-ID: <3c24XM0TdXz7Ljg@mail.python.org> Roundup Robot added the comment: New changeset 3236709650b0 by Terry Jan Reedy in branch '2.7': Issue #18539: Calltips now work for float default arguments. http://hg.python.org/cpython/rev/3236709650b0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 00:22:45 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Jul 2013 22:22:45 +0000 Subject: [issue18539] Idle 2.7: Calltip wrong if def contains float default value In-Reply-To: <1374656575.04.0.287997860195.issue18539@psf.upfronthosting.co.za> Message-ID: <1374877365.06.0.905503847161.issue18539@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 00:25:26 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Jul 2013 22:25:26 +0000 Subject: [issue18561] ctypes _build_callargs() doesn't check name for NULL In-Reply-To: <1374850560.42.0.7834284106.issue18561@psf.upfronthosting.co.za> Message-ID: <1374877526.33.0.870623793659.issue18561@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks! ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 00:26:18 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Jul 2013 22:26:18 +0000 Subject: [issue18552] obj2ast_object() doesn't check return value of PyArena_AddPyObject() In-Reply-To: <1374700939.92.0.113667527223.issue18552@psf.upfronthosting.co.za> Message-ID: <1374877578.73.0.404231696808.issue18552@psf.upfronthosting.co.za> STINNER Victor added the comment: - Py_XINCREF(obj); + Py_INCREF(obj); This change is not correct. Here is an updated patch. ---------- nosy: +haypo Added file: http://bugs.python.org/file31046/obj2ast_object.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 00:33:46 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 26 Jul 2013 22:33:46 +0000 Subject: [issue18552] obj2ast_object() doesn't check return value of PyArena_AddPyObject() In-Reply-To: <1374700939.92.0.113667527223.issue18552@psf.upfronthosting.co.za> Message-ID: <3c24p14NRTzSHm@mail.python.org> Roundup Robot added the comment: New changeset 65121aa79ab3 by Christian Heimes in branch '3.3': Issue #18552: Check return value of PyArena_AddPyObject() in obj2ast_object(). http://hg.python.org/cpython/rev/65121aa79ab3 New changeset ad90fc28769a by Christian Heimes in branch 'default': Issue #18552: Check return value of PyArena_AddPyObject() in obj2ast_object(). http://hg.python.org/cpython/rev/ad90fc28769a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 00:34:33 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Jul 2013 22:34:33 +0000 Subject: [issue18552] obj2ast_object() doesn't check return value of PyArena_AddPyObject() In-Reply-To: <1374700939.92.0.113667527223.issue18552@psf.upfronthosting.co.za> Message-ID: <1374878073.33.0.128741604083.issue18552@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 00:40:50 2013 From: report at bugs.python.org (Derek Wilson) Date: Fri, 26 Jul 2013 22:40:50 +0000 Subject: [issue18369] X509 cert class for ssl module In-Reply-To: <1373055037.38.0.259814019718.issue18369@psf.upfronthosting.co.za> Message-ID: <1374878450.44.0.92690594265.issue18369@psf.upfronthosting.co.za> Derek Wilson added the comment: For ssl.match_hostname to work with this, you need to get the info dict first. I've attached at patch for it. ---------- nosy: +underrun Added file: http://bugs.python.org/file31047/ssl_pyx509cert_match_hostname_fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 01:06:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 26 Jul 2013 23:06:01 +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: <3c25WF0pHwz7LjM@mail.python.org> Roundup Robot added the comment: New changeset ab8121466785 by Victor Stinner in branch '3.3': Issue #15893: frozenmain.c now handles PyMem_Malloc() failure http://hg.python.org/cpython/rev/ab8121466785 New changeset 386ab2c12301 by Victor Stinner in branch 'default': (Merge 3.3) Issue #15893: frozenmain.c now handles PyMem_Malloc() failure http://hg.python.org/cpython/rev/386ab2c12301 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 01:06:11 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Jul 2013 23:06:11 +0000 Subject: [issue18548] In unittest doc change WidgetTestCase to SimpleWidgetTestCase in suite() In-Reply-To: <1374691721.34.0.862188774104.issue18548@psf.upfronthosting.co.za> Message-ID: <1374879971.2.0.951628070784.issue18548@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +ezio.melotti, michael.foord stage: -> patch review versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 01:10:01 2013 From: report at bugs.python.org (Damien M Calloway) Date: Fri, 26 Jul 2013 23:10:01 +0000 Subject: [issue11152] pb in zipfile module In-Reply-To: <1297178536.07.0.390050074188.issue11152@psf.upfronthosting.co.za> Message-ID: <1374880200.99.0.923781629769.issue11152@psf.upfronthosting.co.za> Changes by Damien M Calloway : ---------- nosy: +dmcalloway _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 01:28:20 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Jul 2013 23:28:20 +0000 Subject: [issue18558] Iterable glossary entry needs clarification In-Reply-To: <1374796651.89.0.668716719647.issue18558@psf.upfronthosting.co.za> Message-ID: <1374881300.41.0.724065168772.issue18558@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Stephen, your class, or rather instances thereof when initialized with a sequence, follow the old iteration protocol. You might call them iterators in the generic sense, though I cannot remember whether we used 'iterator' much before the introduction of the new and now dominant iteration protocol. I am sure 'iterable' was introduced with the new protocol for objects with .__iter__ methods that return iterators, which in this context means an object with a .__next__ method and excludes .__getitem__ objects. It would have been less confusing is we had disabled the old protocol in 3.0, but aside from the predictable confusion, it seemed better to keep it. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 02:01:47 2013 From: report at bugs.python.org (Phil Connell) Date: Sat, 27 Jul 2013 00:01:47 +0000 Subject: [issue18565] Test for closing delegating generator with cleared frame (Issue17669) Message-ID: <1374883307.06.0.100928488796.issue18565@psf.upfronthosting.co.za> New submission from Phil Connell: This is a testcase for issue17669 - it passes against the latest default (and hits the same segfault under 3.3.0). I came up with this while tracking down a thorny generator finalisation crash that turned out to be a variant on 17669. The root cause was gen_close being called on a generator that's delegating to another, and whose frame has already had frame_clear called (so f_stacktop is NULL). It's reproduced by creating a reference cycle that's broken by clearing the delegating generator's frame. ---------- components: Interpreter Core files: gen_close_with_cleared_frame.diff keywords: patch messages: 193765 nosy: benjamin.peterson, isoschiz, pconnell priority: normal severity: normal status: open title: Test for closing delegating generator with cleared frame (Issue17669) type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file31048/gen_close_with_cleared_frame.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 02:39:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Jul 2013 00:39:51 +0000 Subject: [issue18203] Replace direct calls to malloc() with PyMem_Malloc() or PyMem_RawMalloc() In-Reply-To: <1371120759.62.0.420345272246.issue18203@psf.upfronthosting.co.za> Message-ID: <3c27bT1MBFz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 1cba6687993e by Victor Stinner in branch 'default': Issue #18203: Replace PyMem_Malloc() with PyMem_RawMalloc() at Python initialization http://hg.python.org/cpython/rev/1cba6687993e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 02:39:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Jul 2013 00:39:51 +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: <3c27bS34R4z7LjM@mail.python.org> Roundup Robot added the comment: New changeset 47c6aa17fd90 by Victor Stinner in branch 'default': Issue #15893: Improve error handling in main() and Py_FrozenMain() http://hg.python.org/cpython/rev/47c6aa17fd90 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 02:42:08 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Jul 2013 00:42:08 +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: <3c27f708PszQGZ@mail.python.org> Roundup Robot added the comment: New changeset 12af9db5212a by Victor Stinner in branch '3.3': Issue #15893: Remove dead code http://hg.python.org/cpython/rev/12af9db5212a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 02:43:49 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 27 Jul 2013 00:43:49 +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: <1374885829.75.0.649271736065.issue15893@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't know Py_FrozenMain(). I upgraded it to use the same code than main(). Should I backport my fixes to Python 3.3 (except maybe 0001c4100823 which is risky). ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 03:03:29 2013 From: report at bugs.python.org (A. Jesse Jiryu Davis) Date: Sat, 27 Jul 2013 01:03:29 +0000 Subject: [issue18418] Thread.isAlive() sometimes True after fork In-Reply-To: <1374776689.34.0.725076114487.issue18418@psf.upfronthosting.co.za> Message-ID: A. Jesse Jiryu Davis added the comment: By the way, I'm going on vacation through August 4. When I return I'll check if there's anything else I need to do to help resolve this. On Thursday, July 25, 2013, A. Jesse Jiryu Davis wrote: > > A. Jesse Jiryu Davis added the comment: > > (Sorry about the extraneous XML file from my IDE, I made a mistake and > allowed the diff to include it.) > > ---------- > > _______________________________________ > Python tracker > > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 03:19:53 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Jul 2013 01:19:53 +0000 Subject: [issue18553] os.isatty() is not Unix only In-Reply-To: <1374752779.81.0.230915084667.issue18553@psf.upfronthosting.co.za> Message-ID: <1374887993.72.0.0492377915425.issue18553@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> needs patch type: -> behavior versions: -Python 3.1, Python 3.2, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 07:09:09 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 27 Jul 2013 05:09:09 +0000 Subject: [issue18324] set_payload does not handle binary payloads correctly In-Reply-To: <1372446982.29.0.852040030503.issue18324@psf.upfronthosting.co.za> Message-ID: <1374901749.08.0.232404373022.issue18324@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Here is the third version of the patch. I am not sure what to do with the invalid data for base64 and uuencode. I decided to raise exception instead of converting it to None silently. ---------- Added file: http://bugs.python.org/file31049/set_payload_binary_v3.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 07:09:44 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 27 Jul 2013 05:09:44 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> Message-ID: <1374901784.25.0.988648545252.issue18472@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> ncoghlan title: PEP 8 updates - internal interfaces and import * -> Update PEP 8 to encourage modern conventions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 07:12:17 2013 From: report at bugs.python.org (py.user) Date: Sat, 27 Jul 2013 05:12:17 +0000 Subject: [issue18566] In unittest.TestCase docs for setUp() and tearDown() don't mention AssertionError Message-ID: <1374901937.1.0.747872580847.issue18566@psf.upfronthosting.co.za> New submission from py.user: http://docs.python.org/3/library/unittest.html#unittest.TestCase.setUp "any exception raised by this method will be considered an error rather than a test failure" http://docs.python.org/3/library/unittest.html#unittest.TestCase.tearDown "Any exception raised by this method will be considered an error rather than a test failure." utest.py #!/usr/bin/env python3 import unittest class Test(unittest.TestCase): def setUp(self): raise AssertionError def tearDown(self): raise AssertionError def test_nothing(self): pass [guest at localhost py]$ python3 -m unittest -v utest test_nothing (utest.Test) ... FAIL ====================================================================== FAIL: test_nothing (utest.Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "./utest.py", line 8, in setUp raise AssertionError AssertionError ---------------------------------------------------------------------- Ran 1 test in 0.000s FAILED (failures=1) [guest at localhost py]$ also raising unittest.SkipTest works properly ---------- assignee: docs at python components: Documentation messages: 193772 nosy: docs at python, py.user priority: normal severity: normal status: open title: In unittest.TestCase docs for setUp() and tearDown() don't mention AssertionError type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 07:16:16 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 27 Jul 2013 05:16:16 +0000 Subject: [issue18566] In unittest.TestCase docs for setUp() and tearDown() don't mention AssertionError In-Reply-To: <1374901937.1.0.747872580847.issue18566@psf.upfronthosting.co.za> Message-ID: <1374902176.83.0.016762605031.issue18566@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy nosy: +ezio.melotti, michael.foord stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 07:27:55 2013 From: report at bugs.python.org (Denise Mauldin) Date: Sat, 27 Jul 2013 05:27:55 +0000 Subject: [issue18567] Python 2.7.5 CENTOS6 Error building dbm using bdb Message-ID: <1374902875.32.0.446892441408.issue18567@psf.upfronthosting.co.za> New submission from Denise Mauldin: CC='gcc -pthread' LDSHARED='gcc -pthread -shared -L/u5/tools/lib -L/u5/tools/lib64' OPT='-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py $quiet build running build running build_ext building dbm using bdb building '_bsddb' extension gcc -pthread -fPIC -fno-strict-aliasing -fPIC -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include -I. -IInclude -I./Include -I/u5/tools/include -I/usr/include -I/usr/local/include -I/u5/src/Python-2.7.5/Include -I/u5/src/Python-2.7.5 -c /u5/src/Python-2.7.5/Modules/_bsddb.c -o build/temp.linux-x86_64-2.7/u5/src/Python-2.7.5/Modules/_bsddb.o /u5/src/Python-2.7.5/Modules/_bsddb.c: In function ?DB_set_bt_compare?: /u5/src/Python-2.7.5/Modules/_bsddb.c:2764: warning: passing argument 2 of ?self->db->set_bt_compare? from incompatible pointer type /u5/src/Python-2.7.5/Modules/_bsddb.c:2764: note: expected ?int (*)(struct DB *, const struct DBT *, const struct DBT *, size_t *)? but argument is of type ?int (*)(struct DB *, const struct DBT *, const struct DBT *)? /u5/src/Python-2.7.5/Modules/_bsddb.c: In function ?DB_set_dup_compare?: /u5/src/Python-2.7.5/Modules/_bsddb.c:2878: warning: passing argument 2 of ?self->db->set_dup_compare? from incompatible pointer type /u5/src/Python-2.7.5/Modules/_bsddb.c:2878: note: expected ?int (*)(struct DB *, const struct DBT *, const struct DBT *, size_t *)? but argument is of type ?int (*)(struct DB *, const struct DBT *, const struct DBT *)? /u5/src/Python-2.7.5/Modules/_bsddb.c: In function ?DBSequence_get_cachesize?: /u5/src/Python-2.7.5/Modules/_bsddb.c:8565: warning: pointer targets in passing argument 2 of ?self->sequence->get_cachesize? differ in signedness /u5/src/Python-2.7.5/Modules/_bsddb.c:8565: note: expected ?u_int32_t *? but argument is of type ?int *? gcc -pthread -shared -L/u5/tools/lib -L/u5/tools/lib64 -L/u5/tools/lib -L/u5/tools/lib64 -fPIC build/temp.linux-x86_64-2.7/u5/src/Python-2.7.5/Modules/_bsddb.o -L/usr/lib64 -L/u5/tools/lib -L/u5/tools/lib64 -L/lib -L/usr/lib -L/lib64 -L/usr/lib64 -L/usr/local/lib -Wl,-R/usr/lib64 -ldb-4.7 -o build/lib.linux-x86_64-2.7/_bsddb.so *** WARNING: renaming "_bsddb" since importing it failed: build/lib.linux-x86_64-2.7/_bsddb.so: undefined symbol: db_full_version Segmentation fault (core dumped) ---------- components: Build messages: 193773 nosy: Denise.Mauldin priority: normal severity: normal status: open title: Python 2.7.5 CENTOS6 Error building dbm using bdb type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 07:30:43 2013 From: report at bugs.python.org (Denise Mauldin) Date: Sat, 27 Jul 2013 05:30:43 +0000 Subject: [issue18567] Python 2.7.5 CENTOS6 Error building dbm using bdb In-Reply-To: <1374902875.32.0.446892441408.issue18567@psf.upfronthosting.co.za> Message-ID: <1374903043.24.0.57677458987.issue18567@psf.upfronthosting.co.za> Denise Mauldin added the comment: I installed bsddb3-6.0.0, db-6.0.20.NC, and gdbm-1.10 on a 2.6.32-358.11.1.el6.x86_64 CENTOS6 linux server and continue to run into the Segmentation fault. Not sure what's going on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 08:07:53 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 27 Jul 2013 06:07:53 +0000 Subject: [issue18565] Test for closing delegating generator with cleared frame (Issue17669) In-Reply-To: <1374883307.06.0.100928488796.issue18565@psf.upfronthosting.co.za> Message-ID: <1374905273.11.0.420109662958.issue18565@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks! It looks good except I think you could use the support.disable_gc() context manager. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 08:11:22 2013 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 27 Jul 2013 06:11:22 +0000 Subject: [issue18568] Support \e escape code in strings Message-ID: <1374905482.76.0.578530447098.issue18568@psf.upfronthosting.co.za> New submission from Steven D'Aprano: I'm adding this so there is a record in the bug tracker for posterity. No action is needed except to close it as a "Won't Fix". As per this discussion here: http://mail.python.org/pipermail/python-ideas/2013-June/021318.html using \e as an escape code for ASCII ESC character might be nice to have, but it fails backwards compatibility and therefore must be ruled out. (But perhaps could be re-visited in Python 4000?) ---------- components: Interpreter Core messages: 193776 nosy: stevenjd priority: normal severity: normal status: open title: Support \e escape code in strings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 08:12:01 2013 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 27 Jul 2013 06:12:01 +0000 Subject: [issue18568] Support \e escape code in strings In-Reply-To: <1374905482.76.0.578530447098.issue18568@psf.upfronthosting.co.za> Message-ID: <1374905521.63.0.803680101853.issue18568@psf.upfronthosting.co.za> Changes by Steven D'Aprano : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 08:34:10 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Jul 2013 06:34:10 +0000 Subject: [issue18537] bool.toggle() In-Reply-To: <1374595658.34.0.251413939428.issue18537@psf.upfronthosting.co.za> Message-ID: <1374906850.63.0.274828871491.issue18537@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FYI, the itertools module has ifilterfalse() for inverse filtering. ---------- nosy: +rhettinger resolution: invalid -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 08:38:47 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 27 Jul 2013 06:38:47 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> Message-ID: <1374907127.49.0.519033043684.issue18472@psf.upfronthosting.co.za> Nick Coghlan added the comment: Latest version is a more general cleanup patch for PEP 8 (hence the change in the issue title). Enumerating all the changes/additions: 1. Added an intro paragraph that makes it clear this is a living document, not "set and forget". 2. Added a couple more explicit reasons to the "foolish consistency" section, and tweaked the header for that list to help make it clearer that there may be other good reasons, these are just especially good ones. 3. Updated the tabs and spaces section for Python 3 4. Changed the rationale for the line length limit. These days, it is about side-by-side editor windows, diff tools, and online text editing widgets, not ancient terminals with limited column widths. 5. Cleaned up the encoding cookie guidelines for Python 3 6. Changed the absolute vs explicit relative import discussion to state that while absolute imports are recommended, there are valid reasons to use explicit relative imports. Added an explicit admonition that the standard library should always absolute imports, and that *nobody* should use implicit relative imports. 7. Added a guideline to avoid wildcard imports 8. The new section on public vs internal interfaces 9. Clarified that it's not just Jython that omits the += hack, and that it is fairly easy to break it in CPython, too. 10. Added a guideline about using def rather than assigning a lambda to a name. 11. Rewrote the class based exception guideline to account for the requirement that all exceptions inherit from BaseException, as well as the exception hierarchy design lessons we have learned that led to the creation of PEP 3151 (which explicitly *rejects* the per-module generic exception approach previously recommended by PEP 8) 12. Clarified what a "non-error exception" might be used for. 13. Added a guideline about exception chaining 14. For the exception raising guideline, moved Python 3 compatibility up as the main motivating factor 15. Added a guideline about using the "as" clause to bind a caught exception to a name 16. Added a guideline explicitly favouring PEP 3151 based exception handling over errno introspection 17. Added a note about the Python 3 text model changes to the isinstance guideline 18. Added a recommendation that third party experiments with function annotations combine them with a decorator that indicates how they're to be interpreted ---------- Added file: http://bugs.python.org/file31050/issue18472_pep_8_update4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 08:40:13 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Jul 2013 06:40:13 +0000 Subject: [issue18533] Avoid error from repr() of recursive dictview In-Reply-To: <1374531750.42.0.70756948567.issue18533@psf.upfronthosting.co.za> Message-ID: <1374907213.07.0.8054226746.issue18533@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 for backporting the fix. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 08:40:16 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 27 Jul 2013 06:40:16 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> Message-ID: <1374907216.84.0.460849066984.issue18472@psf.upfronthosting.co.za> Changes by Nick Coghlan : Removed file: http://bugs.python.org/file30938/issue18472_pep_8_update3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 08:40:19 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 27 Jul 2013 06:40:19 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> Message-ID: <1374907219.46.0.922301489469.issue18472@psf.upfronthosting.co.za> Changes by Nick Coghlan : Removed file: http://bugs.python.org/file30937/issue18472_pep_8_update2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 08:40:24 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 27 Jul 2013 06:40:24 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> Message-ID: <1374907224.94.0.282384354972.issue18472@psf.upfronthosting.co.za> Changes by Nick Coghlan : Removed file: http://bugs.python.org/file30936/issue18472_pep_8_update.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 08:44:57 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 27 Jul 2013 06:44:57 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> Message-ID: <1374907497.59.0.911759642721.issue18472@psf.upfronthosting.co.za> Nick Coghlan added the comment: Guido, if you have time to review these proposed PEP 8 changes, that would be great. Most should be unobjectionable, but I seem to recall you disliking the recommendation for third party function annotation experiments to use an explicit decorator, so I'm happy to drop that one if you don't like it. I'm also willing to send it back to python-dev at large for further feedback, but I'm not sure that's necessary (the two big changes are the ones about public APIs and the import recommendations, and those have had discussion threads already) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 08:45:21 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 27 Jul 2013 06:45:21 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> Message-ID: <1374907521.29.0.988874937777.issue18472@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 10:07:43 2013 From: report at bugs.python.org (Paul Moore) Date: Sat, 27 Jul 2013 08:07:43 +0000 Subject: [issue18569] Set PATHEXT in the Windows installer Message-ID: <1374912463.83.0.476685307572.issue18569@psf.upfronthosting.co.za> New submission from Paul Moore: Make the Windows Python installer set PATHEXT when "Register Python extensions" is set. This allows users to run a scripy by typing the name of the .py file at the command line without the .py extension. The patch needs review - I have not been able to build the MSI installer and so this patch is untested :-( ---------- assignee: loewis components: Installation, Windows files: pathext.patch keywords: needs review, patch messages: 193781 nosy: loewis, pmoore priority: normal severity: normal stage: patch review status: open title: Set PATHEXT in the Windows installer type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file31051/pathext.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 12:00:22 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 27 Jul 2013 10:00:22 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: <1374907127.49.0.519033043684.issue18472@psf.upfronthosting.co.za> Message-ID: <51F39A33.6030206@egenix.com> Marc-Andre Lemburg added the comment: > 1. Added an intro paragraph that makes it clear this is a living document, not "set and forget". If we want to make this a living document, I think the PEP will have to receive its own internal version number and a history section at the end explaining the changes (basically what you just summarized for the patch). Doing so is important, since companies and tools often reference PEP 8 in internal coding guidelines and any changes need to be easily identifiable for readers of those guidelines. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 13:31:25 2013 From: report at bugs.python.org (Marco Buttu) Date: Sat, 27 Jul 2013 11:31:25 +0000 Subject: [issue18570] OverflowError during division: wrong message Message-ID: <1374924685.41.0.945479313268.issue18570@psf.upfronthosting.co.za> New submission from Marco Buttu: When the integer division result is too large to converto to float, and the operands are inside the limits, the result is `inf` or `-inf`:: >>> 2**1023 / 2**-3 inf >>> 2**1022 / 2**-4 inf >>> 2**1023 / 2**-1074 inf When both the result and an operand are too large to converto to float, we raise an OverflowError:: >>> 2**1028 / 2**-2 Traceback (most recent call last): File "", line 1, in OverflowError: long int too large to convert to float The message says: "long int too large to convert to float". I think in Python 3 it should be "int too large to convert...". In any case, the most important thing is that in the same situation we get a different message [1]_:: >>> 2**1032 / 2**2 Traceback (most recent call last): File "", line 1, in OverflowError: integer division result too large for a float and I think is it muddleheaded, because it should be "long int too large to convert to float", as we got in the case `2**1028 / 2**-2`. I think we should never show "integer division result too large for a float", but just: * `inf` or `-inf` when the operands are inside the limits, but the result does not * `OverflowError: long int too large to convert to float` when the result, and at least one operand, are out of range. .. [1] In this situation, we get the message "OverflowError: integer division result too large for a float" only when the denominator exponent is positive. ---------- messages: 193783 nosy: marco.buttu priority: normal severity: normal status: open title: OverflowError during division: wrong message type: behavior versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 13:32:35 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 27 Jul 2013 11:32:35 +0000 Subject: [issue18570] OverflowError during division: wrong message In-Reply-To: <1374924685.41.0.945479313268.issue18570@psf.upfronthosting.co.za> Message-ID: <1374924755.1.0.104413462766.issue18570@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes, mark.dickinson versions: -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 15:57:29 2013 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sat, 27 Jul 2013 13:57:29 +0000 Subject: [issue8425] a -= b should be fast if a is a small set and b is a large set In-Reply-To: <1271438382.18.0.76932438586.issue8425@psf.upfronthosting.co.za> Message-ID: <1374933449.83.0.438042275524.issue8425@psf.upfronthosting.co.za> Michele Orr? added the comment: ping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 17:13:00 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 27 Jul 2013 15:13:00 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> Message-ID: <1374937980.42.0.680508996663.issue18472@psf.upfronthosting.co.za> Guido van Rossum added the comment: This is mostly fine. FWIW I disagree with MAL's assertion that we need to start adding internal versioning; people who "lawyer" about which version of the PEP should apply are focused on the wrong thing entirely. IIUC the occasional Python-3-specific rule is already flagged as such. Also for real nitpickers there's the Hg revision. :-) My nits on the diff: - You're missing a comma after Barry's name (i.e. before your own). - Also a period at the end of point 3 starting near line 55. - I think we should recommend against tabs outright. They are getting more and more misunderstood. - Regarding line length, I think it is reasonable to mention that many organizations are settling on 100 as a compromise. On newer laptops you can still fit two terminal windows (with a reasonable font size) side by side. (Also many people checking code into the stdlib ignore the 80 char limit. :-( ) - The section about Latin-1 author names sounds a little confused (why recommend Latin-1 over UTF-8 at all?). I believe what is left unsaid is that you don't need a coding cookie when using Latin-1 in comments in Python 2? But in strings the cookie would still be required IIRC. But this will cause problems when the file is converted Python 3 because the UTF-8 default will complain about non-ASCII Latin-1 bytes. - "In performance sensitive parts of the library" -- are we suddenly clinging to the fiction that PEP 8 only applies to the stdlib? I'd change "parts of the library" to "code". Also, it's "performance-sensitive". - Eliminate this: """ +- Use class-based exceptions (recent versions of Python require that all + exceptions inherit from BaseException). """ Instead, I'd add an admonition to derive exceptions from Exception rather than BaseException unless you really know what you're doing. - Which reminds me. Do we have a recommendation yet to write except Exception: instead of except: If not, we should. - I wouldn't mind seeing at least a mild recommendation against using exceptions for non-local control flow. The lessons of StopIteration suggest that such designs are often fraught with subtle problems. - About third party experiments: can you strike "highly"? I don't want mypy to feel out of line (http://www.mypy-lang.org/). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 17:20:37 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 27 Jul 2013 15:20:37 +0000 Subject: [issue17036] Implementation of the PEP 433: Easier suppression of file descriptor inheritance In-Reply-To: <1359151285.62.0.659364968053.issue17036@psf.upfronthosting.co.za> Message-ID: <1374938437.83.0.873503887467.issue17036@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file31052/ecc10f0afb76.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 17:21:43 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 27 Jul 2013 15:21:43 +0000 Subject: [issue17036] Implementation of the PEP 433: Easier suppression of file descriptor inheritance In-Reply-To: <1359151285.62.0.659364968053.issue17036@psf.upfronthosting.co.za> Message-ID: <1374938503.5.0.878742407715.issue17036@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file31052/ecc10f0afb76.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 17:28:51 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 27 Jul 2013 15:28:51 +0000 Subject: [issue18571] Implementation of the PEP 446: non-inheriable file descriptors Message-ID: <1374938931.56.0.308173909507.issue18571@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: haypo priority: normal severity: normal status: open title: Implementation of the PEP 446: non-inheriable file descriptors type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 17:28:59 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 27 Jul 2013 15:28:59 +0000 Subject: [issue18571] Implementation of the PEP 446: non-inheriable file descriptors Message-ID: <1374938939.8.0.0332721578357.issue18571@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- hgrepos: +205 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 17:47:01 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 27 Jul 2013 15:47:01 +0000 Subject: [issue18571] Implementation of the PEP 446: non-inheriable file descriptors Message-ID: <1374940021.73.0.887568879163.issue18571@psf.upfronthosting.co.za> New submission from STINNER Victor: Implementation of the PEP 446. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 18:12:13 2013 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 27 Jul 2013 16:12:13 +0000 Subject: [issue18572] Remove redundant note about surrogates in string escape doc Message-ID: <1374941533.84.0.352957238503.issue18572@psf.upfronthosting.co.za> New submission from Steven D'Aprano: The documentation for string escapes suggests that \uxxxx escapes can be used to generate characters in the Supplementary Multilingual Planes by using surrogate pairs: "Individual code units which form parts of a surrogate pair can be encoded using this escape sequence." http://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals E.g. in Python 3.2: py> '\uD80C\uDC80' == '\U00013080' True but that is no longer the case in Python 3.3. I suggest the documentation should just remove that note. ---------- assignee: docs at python components: Documentation messages: 193787 nosy: docs at python, stevenjd priority: normal severity: normal status: open title: Remove redundant note about surrogates in string escape doc versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 19:52:29 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 27 Jul 2013 17:52:29 +0000 Subject: [issue18571] Implementation of the PEP 446: non-inheriable file descriptors In-Reply-To: <1374940021.73.0.887568879163.issue18571@psf.upfronthosting.co.za> Message-ID: <1374947549.05.0.300917084653.issue18571@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- keywords: +patch Added file: http://bugs.python.org/file31053/327133193321.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 20:20:02 2013 From: report at bugs.python.org (py.user) Date: Sat, 27 Jul 2013 18:20:02 +0000 Subject: [issue18573] In unittest.TestCase.assertWarns doc there is some text about assertRaises() Message-ID: <1374949202.48.0.718203936991.issue18573@psf.upfronthosting.co.za> New submission from py.user: http://docs.python.org/3/library/unittest.html#unittest.TestCase.assertWarns "When used as a context manager, assertRaises() accepts" "... is to perform additional checks on the exception raised" ---------- assignee: docs at python components: Documentation files: issue.diff keywords: patch messages: 193788 nosy: docs at python, py.user priority: normal severity: normal status: open title: In unittest.TestCase.assertWarns doc there is some text about assertRaises() type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file31054/issue.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 21:04:44 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Jul 2013 19:04:44 +0000 Subject: [issue18573] In unittest.TestCase.assertWarns doc there is some text about assertRaises() In-Reply-To: <1374949202.48.0.718203936991.issue18573@psf.upfronthosting.co.za> Message-ID: <1374951884.71.0.839670588323.issue18573@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> needs patch versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 21:05:45 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Jul 2013 19:05:45 +0000 Subject: [issue18572] Remove redundant note about surrogates in string escape doc In-Reply-To: <1374941533.84.0.352957238503.issue18572@psf.upfronthosting.co.za> Message-ID: <1374951945.05.0.36906636316.issue18572@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> needs patch type: -> behavior versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 21:20:32 2013 From: report at bugs.python.org (ariel brunner) Date: Sat, 27 Jul 2013 19:20:32 +0000 Subject: [issue18539] Idle 2.7: Calltip wrong if def contains float default value In-Reply-To: <1374656575.04.0.287997860195.issue18539@psf.upfronthosting.co.za> Message-ID: <1374952832.46.0.745187756788.issue18539@psf.upfronthosting.co.za> ariel brunner added the comment: Superb, and thanks for doing the actual work on fixing it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 21:43:27 2013 From: report at bugs.python.org (Marco Buttu) Date: Sat, 27 Jul 2013 19:43:27 +0000 Subject: [issue18570] OverflowError in division: wrong message In-Reply-To: <1374924685.41.0.945479313268.issue18570@psf.upfronthosting.co.za> Message-ID: <1374954207.2.0.655340621125.issue18570@psf.upfronthosting.co.za> Changes by Marco Buttu : ---------- title: OverflowError during division: wrong message -> OverflowError in division: wrong message _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 22:03:56 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Jul 2013 20:03:56 +0000 Subject: [issue18572] Remove redundant note about surrogates in string escape doc In-Reply-To: <1374941533.84.0.352957238503.issue18572@psf.upfronthosting.co.za> Message-ID: <1374955436.42.0.963253221776.issue18572@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 3.3.2: >>> '\uD80C\uDC80' == '\U00013080' False The statement that surrogate code units can be encoded this way is still true. Indeed, it is now the only way to get such code units into a string. The suggestion that a pair will make an astral char is now false. The sentence could be changed to "Individual surrogate code units can be encoded using this escape sequence." On the other hand, the same is true of *any* BMP char, including all the *other* non-graphic chars that can only be entered this way. So I think the sentence, if not deleted, should be replaced by what seems to me a more useful (complete) statement. "Any Basic Multilingual Plane (BMP) codepoint can be encoded using this escape sequence." ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 22:09:06 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Jul 2013 20:09:06 +0000 Subject: [issue18573] In unittest.TestCase.assertWarns doc there is some text about assertRaises() In-Reply-To: <1374949202.48.0.718203936991.issue18573@psf.upfronthosting.co.za> Message-ID: <1374955746.98.0.583149246871.issue18573@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: docs at python -> terry.reedy nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 22:16:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Jul 2013 20:16:13 +0000 Subject: [issue18573] In unittest.TestCase.assertWarns doc there is some text about assertRaises() In-Reply-To: <1374949202.48.0.718203936991.issue18573@psf.upfronthosting.co.za> Message-ID: <3c2dhr5vxfz7Ljg@mail.python.org> Roundup Robot added the comment: New changeset 55dcf9e065be by Terry Jan Reedy in branch '3.3': Issue #18573: Complete copy-paste from assertRaises entry to assertWarns entry. http://hg.python.org/cpython/rev/55dcf9e065be ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 22:17:33 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Jul 2013 20:17:33 +0000 Subject: [issue18573] In unittest.TestCase.assertWarns doc there is some text about assertRaises() In-Reply-To: <1374949202.48.0.718203936991.issue18573@psf.upfronthosting.co.za> Message-ID: <1374956253.96.0.589410043353.issue18573@psf.upfronthosting.co.za> Terry J. Reedy added the comment: assertWarns is new in 3.2 and not in 2.7. The sentence was copied from the assertRaises section but not changed. Thanks for reporting. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed type: enhancement -> behavior versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 22:30:29 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Jul 2013 20:30:29 +0000 Subject: [issue18570] OverflowError in division: wrong message In-Reply-To: <1374924685.41.0.945479313268.issue18570@psf.upfronthosting.co.za> Message-ID: <1374957029.48.0.972926494363.issue18570@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Yes, 'long int' should just be 'int' in 3.x. However, int/int (integer division) is *not* the same thing as int/float. In the latter case, the int is converted to float first and if that conversion fails, there is no result. Now that int/int is always converted to float, it seems sensible that out of float range results be +-inf. But there may be an issue with back compatibility. I know there has been discussion on overflow vs. inf in various contexts. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 22:37:21 2013 From: report at bugs.python.org (Phil Connell) Date: Sat, 27 Jul 2013 20:37:21 +0000 Subject: [issue18565] Test for closing delegating generator with cleared frame (Issue17669) In-Reply-To: <1374883307.06.0.100928488796.issue18565@psf.upfronthosting.co.za> Message-ID: <1374957441.42.0.0135706505523.issue18565@psf.upfronthosting.co.za> Phil Connell added the comment: Good suggestion, updated patch attached. ---------- Added file: http://bugs.python.org/file31055/gen_close_with_cleared_frame.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 22:38:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 27 Jul 2013 20:38:28 +0000 Subject: [issue18564] Integer overflow in socketmodule In-Reply-To: <1374861545.82.0.430674187566.issue18564@psf.upfronthosting.co.za> Message-ID: <1374957508.0.0.414972554603.issue18564@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Instead of writing try / except / self.fail, you could simply use the context manager form of assertRaises. ---------- nosy: +neologix, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 22:45:41 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 27 Jul 2013 20:45:41 +0000 Subject: [issue18112] PEP 442 implementation In-Reply-To: <1371320764.63.0.0772595125462.issue18112@psf.upfronthosting.co.za> Message-ID: <1374957941.5.0.103434546546.issue18112@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 22:56:14 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Jul 2013 20:56:14 +0000 Subject: [issue18566] In unittest.TestCase docs for setUp() and tearDown() don't mention AssertionError In-Reply-To: <1374901937.1.0.747872580847.issue18566@psf.upfronthosting.co.za> Message-ID: <1374958574.55.0.744145892127.issue18566@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I re-ran with setUp 'raise' changed to 'pass' to see the effect of raise AssertionError or unittest.SkipTest in tearDown and indeed the test fails or skips even then. I suggest adding ', other than AssertionError or SkipTest,' just after 'method'. The same is true of test_xxx methods. A slight anomaly is that AssertionError in test_nothing and SkipTest in tearDown results in "FAILED (failures=1, skipped=1)", which is not really a skip. For setUpClass and setUpModule, AssertionErrors *are* errors, not failures, while SkipTest works everywhere. ---------- nosy: +terry.reedy versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 23:07:37 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Jul 2013 21:07:37 +0000 Subject: [issue17669] Segfault caused by weird combination of imports and yield from In-Reply-To: <1365461726.69.0.844789226325.issue17669@psf.upfronthosting.co.za> Message-ID: <3c2fr867c6zMlh@mail.python.org> Roundup Robot added the comment: New changeset 516303f32bad by Benjamin Peterson in branch '3.3': add a test for issue #17669 (closes #18565) http://hg.python.org/cpython/rev/516303f32bad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 23:07:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Jul 2013 21:07:38 +0000 Subject: [issue18565] Test for closing delegating generator with cleared frame (Issue17669) In-Reply-To: <1374883307.06.0.100928488796.issue18565@psf.upfronthosting.co.za> Message-ID: <3c2fr94xpbzMlh@mail.python.org> Roundup Robot added the comment: New changeset 516303f32bad by Benjamin Peterson in branch '3.3': add a test for issue #17669 (closes #18565) http://hg.python.org/cpython/rev/516303f32bad New changeset f90e7540dcba by Benjamin Peterson in branch 'default': merge 3.3 (#18565) http://hg.python.org/cpython/rev/f90e7540dcba ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 23:43:16 2013 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sat, 27 Jul 2013 21:43:16 +0000 Subject: [issue18564] Integer overflow in socketmodule In-Reply-To: <1374861545.82.0.430674187566.issue18564@psf.upfronthosting.co.za> Message-ID: <1374961396.31.0.506769026975.issue18564@psf.upfronthosting.co.za> Changes by Michele Orr? : Added file: http://bugs.python.org/file31056/issue18564.1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 01:09:42 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Jul 2013 23:09:42 +0000 Subject: [issue18441] Idle: Make test.support.requires('gui') skip when it should. In-Reply-To: <1373754847.55.0.0641648695763.issue18441@psf.upfronthosting.co.za> Message-ID: <3c2jY15YQ9z7LjW@mail.python.org> Roundup Robot added the comment: New changeset dd9941f5fcda by Terry Jan Reedy in branch '2.7': Issue #18441: Make test.support.requires('gui') skip when it should. http://hg.python.org/cpython/rev/dd9941f5fcda New changeset d9a53ab464ea by Terry Jan Reedy in branch '2.7': Issue #18441: Correct previous patch, which hg committed before I wanted it to. http://hg.python.org/cpython/rev/d9a53ab464ea ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 01:54:48 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 27 Jul 2013 23:54:48 +0000 Subject: [issue18564] Integer overflow in socketmodule In-Reply-To: <1374861545.82.0.430674187566.issue18564@psf.upfronthosting.co.za> Message-ID: <1374969288.75.0.0825703938917.issue18564@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 02:03:17 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Jul 2013 00:03:17 +0000 Subject: [issue18112] PEP 442 implementation In-Reply-To: <1371320764.63.0.0772595125462.issue18112@psf.upfronthosting.co.za> Message-ID: <1374969797.92.0.75128594601.issue18112@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 02:36:27 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 28 Jul 2013 00:36:27 +0000 Subject: [issue18574] BaseHTTPRequestHandler.handle_expect_100() sends invalid response Message-ID: <1374971787.85.0.837580893432.issue18574@psf.upfronthosting.co.za> New submission from Nikolaus Rath: The handle_expect_100() implementation in BaseHTTPRequestHandler currently calls send_response_only(100) followed by flush_headers(). However, even a 1xx response is always followed by a (potentially empty) set of response headers (cf. http://tools.ietf.org/html/rfc2616#section-9.9). Therefore, clients will block waiting for an additional '\r\n' before sending the buffer. The attached patch fixes the problem. ---------- components: Library (Lib) files: handle_expect.diff keywords: patch messages: 193800 nosy: Nikratio priority: normal severity: normal status: open title: BaseHTTPRequestHandler.handle_expect_100() sends invalid response versions: Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file31057/handle_expect.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 02:38:05 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 28 Jul 2013 00:38:05 +0000 Subject: [issue18574] BaseHTTPRequestHandler.handle_expect_100() sends invalid response In-Reply-To: <1374971787.85.0.837580893432.issue18574@psf.upfronthosting.co.za> Message-ID: <1374971885.14.0.547767703476.issue18574@psf.upfronthosting.co.za> Nikolaus Rath added the comment: The correct link is http://tools.ietf.org/html/rfc2616#section-10.1: 10.1 Informational 1xx This class of status code indicates a provisional response, consisting only of the Status-Line and optional headers, and is terminated by an empty line. [...] Currently handle_expect_100() does not send this empty line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 03:20:03 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Jul 2013 01:20:03 +0000 Subject: [issue18571] Implementation of the PEP 446: non-inheriable file descriptors In-Reply-To: <1374940021.73.0.887568879163.issue18571@psf.upfronthosting.co.za> Message-ID: <1374974403.76.0.771194875067.issue18571@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file31058/c066794c85cd.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 03:21:34 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Jul 2013 01:21:34 +0000 Subject: [issue18571] Implementation of the PEP 446: non-inheriable file descriptors In-Reply-To: <1374940021.73.0.887568879163.issue18571@psf.upfronthosting.co.za> Message-ID: <1374974494.42.0.336746262537.issue18571@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file31053/327133193321.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 04:29:34 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Jul 2013 02:29:34 +0000 Subject: [issue18441] Idle: Make test.support.requires('gui') skip when it should. In-Reply-To: <1373754847.55.0.0641648695763.issue18441@psf.upfronthosting.co.za> Message-ID: <3c2nzd6jRzz7Ljn@mail.python.org> Roundup Robot added the comment: New changeset 9a4c62c1a4c0 by Terry Jan Reedy in branch '2.7': Issue #18441: add Mac (darwin) gui check. This is not needed today, but has been http://hg.python.org/cpython/rev/9a4c62c1a4c0 New changeset ba5c264d67ea by Terry Jan Reedy in branch '2.7': Issue #18441: Comment out code that will not compile because the standard http://hg.python.org/cpython/rev/ba5c264d67ea New changeset 6420dcd377f9 by Terry Jan Reedy in branch '2.7': Issue #18441: whitespace http://hg.python.org/cpython/rev/6420dcd377f9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 04:39:11 2013 From: report at bugs.python.org (Jason Myers) Date: Sun, 28 Jul 2013 02:39:11 +0000 Subject: [issue1521051] Allow passing DocTestRunner and DocTestCase in doctest Message-ID: <1374979151.49.0.809800874342.issue1521051@psf.upfronthosting.co.za> Jason Myers added the comment: The attached file contains a simple test for this code to make sure the test runner is being applied. I've never submitted anything before, so it might be totally naive. ---------- nosy: +jasonamyers Added file: http://bugs.python.org/file31059/test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 04:49:49 2013 From: report at bugs.python.org (John Cassidy) Date: Sun, 28 Jul 2013 02:49:49 +0000 Subject: [issue12129] Document Object Model API - validation In-Reply-To: <1305928931.2.0.716148568641.issue12129@psf.upfronthosting.co.za> Message-ID: <1374979789.39.0.0494716899247.issue12129@psf.upfronthosting.co.za> John Cassidy added the comment: I added the line print(str(doc)) after the call to getDomImplementation and verified that the errors that I'm seeing are coming from the xml.dom.minidom implemenation of xml.dom. Checking minidom.py I did not see any validation on the tagName that gets passed to createElement. http://www.w3.org/TR/xml11/#NT-NameStartChar lists the format of allowed names. Attached is a file containing the functions I was working on. My thinking is that if the tagName is not valid a ValueError should be thrown. ---------- nosy: +jocassid Added file: http://bugs.python.org/file31060/xmlNameVerification.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 05:37:10 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Jul 2013 03:37:10 +0000 Subject: [issue18441] Idle: Make test.support.requires('gui') skip when it should. In-Reply-To: <1373754847.55.0.0641648695763.issue18441@psf.upfronthosting.co.za> Message-ID: <1374982630.09.0.874367526472.issue18441@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I tried to run the currently unnecessary Mac 'darwin' check in 2.7 with if sys.platform == 'darwin': from lib-tk.test.runtktests import check_tk_availability # tkinter.test.suppport in 3.x try: check_tk_availability() except unittest.SkipTest: raise tk.TclError This fails because 'lib-tk' is not a legal module name. There are workarounds in test/test_tk.py and test_ttk_guionly, but I decided not to bother with them now because I would rather work on moving the function to test.support (and perhaps the package could be given a legal name). If, before that is done, someone adds a Mac buildbot that will not run gui tests but requests that they be run anyway, the above could be added with the different changes needed for 2.7 and 3.x. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 06:01:24 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Jul 2013 04:01:24 +0000 Subject: [issue18441] Idle: Make test.support.requires('gui') skip when it should. In-Reply-To: <1373754847.55.0.0641648695763.issue18441@psf.upfronthosting.co.za> Message-ID: <3c2r1b6TdNzSN6@mail.python.org> Roundup Robot added the comment: New changeset c3936a52f215 by Terry Jan Reedy in branch '3.3': Issue #18441: Make test.support.requires('gui') skip when it should. http://hg.python.org/cpython/rev/c3936a52f215 New changeset 858a72d91162 by Terry Jan Reedy in branch '2.7': Issue #18441: Move commented out code to issue message. http://hg.python.org/cpython/rev/858a72d91162 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 06:10:08 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Jul 2013 04:10:08 +0000 Subject: [issue8425] a -= b should be fast if a is a small set and b is a large set In-Reply-To: <1271438382.18.0.76932438586.issue8425@psf.upfronthosting.co.za> Message-ID: <1374984608.32.0.135747539167.issue8425@psf.upfronthosting.co.za> Raymond Hettinger added the comment: There's no rush on this. I have other work I want to do on set objects before applying further optimizations, so I want to hold off on it for a bit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 06:59:41 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Jul 2013 04:59:41 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> Message-ID: <1374987581.31.0.434083488803.issue18472@psf.upfronthosting.co.za> Raymond Hettinger added the comment: - I think we should recommend against tabs outright. They are getting more and more misunderstood. +1 Perhaps also mention that Python 3 now raises TabError for inconsistent tabs and spaces. - Regarding line length, I think it is reasonable to mention that many organizations are settling on 100 as a compromise. On newer laptops you can still fit two terminal windows (with a reasonable font size) side by side +1 I've seen too many atrocities committed by people trying to scrunch code into 80 columns (weird line splits, over-abbreviated variable names, etc). - The section about Latin-1 author names sounds a little confused (why recommend Latin-1 over UTF-8 at all?). I believe what is left unsaid is that you don't need a coding cookie when using Latin-1 in comments in Python 2? But in strings the cookie would still be required IIRC. But this will cause problems when the file is converted Python 3 because the UTF-8 default will complain about non-ASCII Latin-1 bytes. +1 for UTF-8 as the default preference for everything in the Python world. - Eliminate this: """ +- Use class-based exceptions (recent versions of Python require that all + exceptions inherit from BaseException). """ Instead, I'd add an admonition to derive exceptions from Exception rather than BaseException unless you really know what you're doing. +1 - I wouldn't mind seeing at least a mild recommendation against using exceptions for non-local control flow. The lessons of StopIteration suggest that such designs are often fraught with subtle problems. I'm afraid even a mild admonition would lead of over zealous rejection of legitimate use cases for exceptions. For uses cases that actually need non-local control flow, there are worse things you can do than use exceptions (i.e. returning an error token up a chain of function calls requiring if-error logic at every step along the way). In particular, exceptions for control-flow are a good solution to some challenges that arise in larger programs (i.e. problems encountered in low level logic can only be handled by high level user interface logic, and the intermediate level business logic serves only as a pass through). It seems to me that the issues with StopIteration were mostly caused by having multiple control conditions all sharing the same exception (i.e. a function inside a for-loop can't use StopIteration to control an outer loop; the latter would need its own distinction exception). P.S. For those who are interested, the book "The Little MLer" does a great job showing how exceptions for control-flow can be used simplify recursive functions. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 07:22:07 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 28 Jul 2013 05:22:07 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: <1374987581.31.0.434083488803.issue18472@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: The exception one is near-and-dear to my heart at the moment, as we're in the process of refactoring a large app that currently does various checks in the UI layer so it can present nice errors, when it should really be leaving those checks to the business logic layer and then throwing app specific exceptions that the UI layer understands and can present to the users. As Raymond noted, I think we need to be very cautious when it comes to exception handling, especially with Go advocates propagating all sorts of foolishness about the evils of exceptions and the notion that return codes are somehow now a superior approach :P However, I'm not sure we have a guideline about using deterministic resource management to better cope with unexpected exceptions - I'll look into that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 08:42:40 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 28 Jul 2013 06:42:40 +0000 Subject: [issue18112] PEP 442 implementation In-Reply-To: <1371320764.63.0.0772595125462.issue18112@psf.upfronthosting.co.za> Message-ID: <1374993760.72.0.143702054836.issue18112@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Modulo earlier comments, I think it looks good to land. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 10:26:25 2013 From: report at bugs.python.org (Eduardo Robles Elvira) Date: Sun, 28 Jul 2013 08:26:25 +0000 Subject: [issue18321] Multivolume support in tarfile module In-Reply-To: <1372406777.07.0.523288075904.issue18321@psf.upfronthosting.co.za> Message-ID: <1374999985.93.0.944608854392.issue18321@psf.upfronthosting.co.za> Eduardo Robles Elvira added the comment: Sure, I will fill it out. But is it required? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 10:35:14 2013 From: report at bugs.python.org (Eduardo Robles Elvira) Date: Sun, 28 Jul 2013 08:35:14 +0000 Subject: [issue18575] Fixing tarfile._mode when using gzip via ":gz" Message-ID: <1375000514.51.0.865237758651.issue18575@psf.upfronthosting.co.za> New submission from Eduardo Robles Elvira: A TarFile object constructor accepts a fileobj argument. When this argument is set and it has a "mode" property, tarfile._mode is blindly copied from there. Otherwise, mode is set using the mode argument in the constructor. This usually works, but in the case where fileobj is a gzip.GzipFile, the "mode" property is not a string like "rb" or "wb" but an integer, which is not expected in TarFile. This has not been noticed before probably because the TarFile._mode property is usually unused internally, but in my case it's a problem when using it together with tarfile multivolume mode provided in issue #18321. ---------- components: Library (Lib) files: gzip.patch keywords: patch messages: 193812 nosy: edulix priority: normal severity: normal status: open title: Fixing tarfile._mode when using gzip via ":gz" versions: Python 3.4 Added file: http://bugs.python.org/file31061/gzip.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 10:38:09 2013 From: report at bugs.python.org (Eduardo Robles Elvira) Date: Sun, 28 Jul 2013 08:38:09 +0000 Subject: [issue18575] Fixing tarfile._mode when using gzip via ":gz" In-Reply-To: <1375000514.51.0.865237758651.issue18575@psf.upfronthosting.co.za> Message-ID: <1375000689.29.0.160980419069.issue18575@psf.upfronthosting.co.za> Changes by Eduardo Robles Elvira : Removed file: http://bugs.python.org/file31061/gzip.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 10:39:07 2013 From: report at bugs.python.org (Eduardo Robles Elvira) Date: Sun, 28 Jul 2013 08:39:07 +0000 Subject: [issue18575] Fixing tarfile._mode when using gzip via ":gz" In-Reply-To: <1375000514.51.0.865237758651.issue18575@psf.upfronthosting.co.za> Message-ID: <1375000747.37.0.365630996515.issue18575@psf.upfronthosting.co.za> Eduardo Robles Elvira added the comment: Fixing gzip.patch, it was using basestring (python2) instead of str ---------- Added file: http://bugs.python.org/file31062/gzip.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 12:00:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Jul 2013 10:00:30 +0000 Subject: [issue13266] Add inspect.unwrap(f) to easily unravel "__wrapped__" chains In-Reply-To: <1319611391.89.0.610441716125.issue13266@psf.upfronthosting.co.za> Message-ID: <3c2zzx5DKzz7Lk3@mail.python.org> Roundup Robot added the comment: New changeset 2aa6c1e35b8a by Nick Coghlan in branch 'default': Close #13266: Add inspect.unwrap http://hg.python.org/cpython/rev/2aa6c1e35b8a ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 12:40:56 2013 From: report at bugs.python.org (Drekin) Date: Sun, 28 Jul 2013 10:40:56 +0000 Subject: [issue17620] Python interactive console doesn't use sys.stdin for input In-Reply-To: <1364921954.86.0.527255608282.issue17620@psf.upfronthosting.co.za> Message-ID: <1375008056.72.0.037202233301.issue17620@psf.upfronthosting.co.za> Drekin added the comment: Is there any chance the API will be added and used by python.exe? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 12:56:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Jul 2013 10:56:43 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <3c31Dq2Q3hz7Ljk@mail.python.org> Roundup Robot added the comment: New changeset 203a77e74aa7 by Nick Coghlan in branch 'default': Close #15494: test.support is now a package rather than a module http://hg.python.org/cpython/rev/203a77e74aa7 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 13:41:14 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Jul 2013 11:41:14 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <3c32D95R5Kz7Lkj@mail.python.org> Roundup Robot added the comment: New changeset 0b7ed24f7d33 by Nick Coghlan in branch '3.3': Issue #15494: test.support is now a package rather than a module http://hg.python.org/cpython/rev/0b7ed24f7d33 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 14:01:52 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 28 Jul 2013 12:01:52 +0000 Subject: [issue18574] BaseHTTPRequestHandler.handle_expect_100() sends invalid response In-Reply-To: <1374971787.85.0.837580893432.issue18574@psf.upfronthosting.co.za> Message-ID: <1375012912.98.0.590915521721.issue18574@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +orsenthil versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 14:25:48 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Jul 2013 12:25:48 +0000 Subject: [issue15415] Add temp_dir() and change_cwd() to test.support In-Reply-To: <1342905198.6.0.0438176504742.issue15415@psf.upfronthosting.co.za> Message-ID: <3c33Cb43rZzPsJ@mail.python.org> Roundup Robot added the comment: New changeset 4f0034477ba9 by Nick Coghlan in branch '3.3': Close #15415: Factor out temp dir helpers to test.support http://hg.python.org/cpython/rev/4f0034477ba9 New changeset b20a10c97e08 by Nick Coghlan in branch 'default': Merge #15415 from 3.3 http://hg.python.org/cpython/rev/b20a10c97e08 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 14:32:44 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 28 Jul 2013 12:32:44 +0000 Subject: [issue18576] Rename and document test.script_helper as test.support.script_helper Message-ID: <1375014764.64.0.152576599022.issue18576@psf.upfronthosting.co.za> New submission from Nick Coghlan: tests.script_helper provides various utilities for sensibly testing scripts in a subprocess. It isn't easy for CPython developers to discover, since it is isn't documented and the file is mixed in with actual tests in the main test directory. As discussed in #15494, it should be: 1. Moved from Lib/test/ to Lib/test/support (and imports in tests adjusted accordingly) 2. Documented in Doc/library/test.rst These changes should be made on both the 3.3 and default branches to avoid spurious merge conflicts. ---------- assignee: docs at python components: Documentation, Tests messages: 193819 nosy: docs at python, ncoghlan priority: normal severity: normal status: open title: Rename and document test.script_helper as test.support.script_helper type: enhancement versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 14:32:51 2013 From: report at bugs.python.org (Peter Santoro) Date: Sun, 28 Jul 2013 12:32:51 +0000 Subject: [issue18577] lru_cache enhancement: lru_timestamp helper function Message-ID: <1375014771.52.0.855210720887.issue18577@psf.upfronthosting.co.za> New submission from Peter Santoro: The attached proposed lru_timestamp function provides developers with more control over how often lru_cache entries are refreshed. Doc string follows: def lru_timestamp(refresh_interval=60): """ Return a timestamp string for @lru_cache decorated functions. The returned timestamp is used as the value of an extra parameter to @lru_cache decorated functions, allowing for more control over how often cache entries are refreshed. The lru_timestamp function should be called with the same refresh_interval value for a given lru_cache decorated function. Positional arguments: refresh_interval -- 1-1440 minutes (default 60) as int or float """ Rationale: Some functions have input parameters that rarely change, but yet return different results over time. It would be nice to have a ready-made solution to force lru_cache entries to be refreshed at specified time intervals. An common example is using a stable userid to read user information from a database. By itself, the lru_cache decorator can be used to cache the user information and prevent unnecessary i/o. However, if a given user's information is updated in the database, but the associated lru_cache entry has not yet been discarded, the application will be using stale data. The lru_timestamp function is a simple, ready-made helper function that gives the developer more control over the age of lru_cache entries in such situations. Sample usage: @functools.lru_cache() def user_info(userid, timestamp): # expensive database i/o, but value changes over time # the timestamp parameter is normally not used, it is # for the benefit of the @lru_cache decorator pass # read user info from database, if not in cache or # older than 120 minutes info = user_info('johndoe', functools.lru_timestamp(120)) ---------- components: Library (Lib) files: lru.py messages: 193820 nosy: peter at psantoro.net priority: normal severity: normal status: open title: lru_cache enhancement: lru_timestamp helper function type: enhancement versions: Python 3.3 Added file: http://bugs.python.org/file31063/lru.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 14:35:46 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 28 Jul 2013 12:35:46 +0000 Subject: [issue18578] Rename and document test.bytecode_helper as test.support.bytecode_helper Message-ID: <1375014946.89.0.0130176350727.issue18578@psf.upfronthosting.co.za> New submission from Nick Coghlan: test.bytecode_helper provides various utilities for sensibly testing bytecode generation. It isn't easy for CPython developers to discover, since it isn't documented and the file is mixed in with actual tests in the main test directory. As discussed in #15494, it should be: 1. Moved from Lib/test/ to Lib/test/support (and imports in tests adjusted accordingly) 2. Documented in Doc/library/test.rst This change only affects the default branch (since test.bytecode_helper is new in 3.4) ---------- assignee: ncoghlan messages: 193821 nosy: ncoghlan priority: normal severity: normal status: open title: Rename and document test.bytecode_helper as test.support.bytecode_helper versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 14:44:20 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 28 Jul 2013 12:44:20 +0000 Subject: [issue15403] Refactor package creation support code into a common location In-Reply-To: <1342782793.3.0.140383152387.issue15403@psf.upfronthosting.co.za> Message-ID: <1375015460.7.0.720750900323.issue15403@psf.upfronthosting.co.za> Nick Coghlan added the comment: As noted in #18576 and #18578, I'd like for these relocation patches to include the addition of documentation for the submodule in Doc/library/test.rst ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 14:49:23 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 28 Jul 2013 12:49:23 +0000 Subject: [issue15403] Refactor package creation support code into a common location In-Reply-To: <1342782793.3.0.140383152387.issue15403@psf.upfronthosting.co.za> Message-ID: <1375015763.48.0.53191563871.issue15403@psf.upfronthosting.co.za> Nick Coghlan added the comment: Also, now that test.support is a subpackage, the helper should be a submodule of that (test.support.package_helper) rather than directly in the test directory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 14:50:02 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 28 Jul 2013 12:50:02 +0000 Subject: [issue15376] Refactor the test_runpy walk_package support code into a common location In-Reply-To: <1342509049.53.0.303616016829.issue15376@psf.upfronthosting.co.za> Message-ID: <1375015802.79.0.995445713682.issue15376@psf.upfronthosting.co.za> Nick Coghlan added the comment: test.support is now a subpackage in both 3.3 and default, but test.support.package_helper still needs to be created (see comments on #15403) ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 15:20:06 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 28 Jul 2013 13:20:06 +0000 Subject: [issue18579] Dereference after NULL check in listobject.c merge_hi() Message-ID: <1375017605.96.0.0484069196925.issue18579@psf.upfronthosting.co.za> New submission from Christian Heimes: Coverity Scan may have found an issue in listobject's merge code. I'm not familiar with the code so I don't know if ssb.value can be NULL here. 3. Condition "ssb.values != NULL", taking false branch 4. var_compare_op: Comparing "ssb.values" to null implies that "ssb.values" might be null. 1642 if (ssb.values != NULL) 1643 ssb.values = ms->a.values + nb - 1; [...] CID 715348 (#1 of 2): Dereference after null check (FORWARD_NULL) 18. var_deref_model: Passing "&ssb" to function "sortslice_copy_decr(sortslice *, sortslice *)", which dereferences null "ssb.values". 1711 sortslice_copy_decr(&dest, &ssb); http://hg.python.org/cpython/file/tip/Objects/listobject.c#l1711 ---------- components: Interpreter Core messages: 193825 nosy: christian.heimes, haypo, tim_one priority: normal severity: normal status: open title: Dereference after NULL check in listobject.c merge_hi() type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 15:44:48 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 28 Jul 2013 13:44:48 +0000 Subject: [issue18578] Rename and document test.bytecode_helper as test.support.bytecode_helper In-Reply-To: <1375014946.89.0.0130176350727.issue18578@psf.upfronthosting.co.za> Message-ID: <1375019088.97.0.199159086395.issue18578@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: ncoghlan -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 16:18:25 2013 From: report at bugs.python.org (Alexey Borzenkov) Date: Sun, 28 Jul 2013 14:18:25 +0000 Subject: [issue18580] distutils compilers are unicode strings on OS X since Python 2.7.4 Message-ID: <1375021105.23.0.849162523275.issue18580@psf.upfronthosting.co.za> New submission from Alexey Borzenkov: A user reported getting a TypeError when building greenlet on OS X with Python 2.7.4 built with homebrew. The TypeError happens because we subclass build_ext so before building extensions we can change compiler's compiler_so. The problem is that instead of a list it's a unicode string. I couldn't reproduce the problem myself, but I traced it to the following: In Lib/distutils/ccompiler.py, method CCompiler.set_executable, type check is only for str. So if set_executable is called with a unicode string is would not be turned into a list. In Lib/_osx_support.py, function _read_output, the output is always decoded as utf-8 (why?). This function is used in _find_build_tool, which in turn is used in _find_appropriate_compiler, but only if it cannot find the compiler on the PATH (not sure when this could happen, when the user doesn't have Command Line Support installed?). Because of this compiler will be configured as a unicode string and this would probably mean no extensions can be built. I this either _osx_support should be fixed to not decode output as utf-8, or set_executable should be fixed to test for basestring instead of str. ---------- assignee: eric.araujo components: Distutils messages: 193826 nosy: Alexey.Borzenkov, eric.araujo, tarek priority: normal severity: normal status: open title: distutils compilers are unicode strings on OS X since Python 2.7.4 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 16:33:04 2013 From: report at bugs.python.org (Peter Santoro) Date: Sun, 28 Jul 2013 14:33:04 +0000 Subject: [issue18577] lru_cache enhancement: lru_timestamp helper function In-Reply-To: <1375014771.52.0.855210720887.issue18577@psf.upfronthosting.co.za> Message-ID: <1375021984.74.0.379642026952.issue18577@psf.upfronthosting.co.za> Peter Santoro added the comment: I updated my proposed lru_timestamp function with the following changes: 1) restricted refresh_interval to int type 2) updated doc string Updated doc string follows: def lru_timestamp(refresh_interval=60): """ Return a timestamp string for @lru_cache decorated functions. The returned timestamp is used as the value of an extra parameter to @lru_cache decorated functions, allowing for more control over how often cache entries are refreshed. The lru_timestamp function should be called with the same refresh_interval value for a given @lru_cache decorated function. The returned timestamp is for the benefit of the @lru_cache decorator and is normally not used by the decorated function. Positional arguments: refresh_interval -- in minutes (default 60), values less than 1 are coerced to 1, values more than 1440 are coerced to 1440 """ ---------- Added file: http://bugs.python.org/file31064/lru.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 16:33:58 2013 From: report at bugs.python.org (Alexey Borzenkov) Date: Sun, 28 Jul 2013 14:33:58 +0000 Subject: [issue18071] _osx_support compiler_fixup In-Reply-To: <1369663641.63.0.31152522756.issue18071@psf.upfronthosting.co.za> Message-ID: <1375022038.48.0.550653579158.issue18071@psf.upfronthosting.co.za> Alexey Borzenkov added the comment: I was unaware of this issue (which homebrew works around incorrectly), and because of this I created issue 18580. The problem is indeed with unicode strings which are coming from _read_output in _osx_support. This is probably because this code was merged from Python 3, which in Python 2 it shouldn't use decode('utf-8') on command output. ---------- nosy: +Alexey.Borzenkov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 16:37:19 2013 From: report at bugs.python.org (Alexey Borzenkov) Date: Sun, 28 Jul 2013 14:37:19 +0000 Subject: [issue18071] _osx_support compiler_fixup In-Reply-To: <1369663641.63.0.31152522756.issue18071@psf.upfronthosting.co.za> Message-ID: <1375022239.57.0.57218446644.issue18071@psf.upfronthosting.co.za> Alexey Borzenkov added the comment: Also, to reproduce it you have to temporarily move away your /usr/bin/cc and /usr/bin/clang, which then triggers the affected code path. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 16:51:09 2013 From: report at bugs.python.org (Ralf Schmitt) Date: Sun, 28 Jul 2013 14:51:09 +0000 Subject: [issue18071] _osx_support compiler_fixup In-Reply-To: <1369663641.63.0.31152522756.issue18071@psf.upfronthosting.co.za> Message-ID: <1375023069.48.0.337824727795.issue18071@psf.upfronthosting.co.za> Changes by Ralf Schmitt : ---------- nosy: +schmir _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 16:51:23 2013 From: report at bugs.python.org (Ralf Schmitt) Date: Sun, 28 Jul 2013 14:51:23 +0000 Subject: [issue18580] distutils compilers are unicode strings on OS X since Python 2.7.4 In-Reply-To: <1375021105.23.0.849162523275.issue18580@psf.upfronthosting.co.za> Message-ID: <1375023083.78.0.143072088485.issue18580@psf.upfronthosting.co.za> Changes by Ralf Schmitt : ---------- nosy: +schmir _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 17:04:26 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 28 Jul 2013 15:04:26 +0000 Subject: [issue18580] distutils compilers are unicode strings on OS X since Python 2.7.4 In-Reply-To: <1375021105.23.0.849162523275.issue18580@psf.upfronthosting.co.za> Message-ID: <1375023866.02.0.916676616438.issue18580@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the analysis. I'm consolidating this issue with Issue18580. ---------- assignee: eric.araujo -> ned.deily nosy: +ned.deily resolution: -> duplicate stage: -> committed/rejected superseder: -> _osx_support compiler_fixup _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 17:07:05 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 28 Jul 2013 15:07:05 +0000 Subject: [issue18575] Fixing tarfile._mode when using gzip via ":gz" In-Reply-To: <1375000514.51.0.865237758651.issue18575@psf.upfronthosting.co.za> Message-ID: <1375024025.45.0.304516635261.issue18575@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +lars.gustaebel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 17:09:45 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 28 Jul 2013 15:09:45 +0000 Subject: [issue18581] Duplicate test and missing class test in test_abc.py Message-ID: <1375024185.25.0.955191764132.issue18581@psf.upfronthosting.co.za> New submission from Vajrasky Kok: There are two classes in Lib/test/test_abc.py, which are TestABC and TestLegacyAPI. Only TestABC is being unit tested. Beside that TestLegacyAPI class has one duplicate test, which is test_abstractmethod_integration with TestABC class. ---------- components: Tests files: legacy_api_unit_test.txt messages: 193831 nosy: vajrasky priority: normal severity: normal status: open title: Duplicate test and missing class test in test_abc.py versions: Python 3.4 Added file: http://bugs.python.org/file31065/legacy_api_unit_test.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 17:11:19 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 28 Jul 2013 15:11:19 +0000 Subject: [issue18582] PBKDF2 support Message-ID: <1375024279.36.0.0953079533445.issue18582@psf.upfronthosting.co.za> New submission from Christian Heimes: The patch is a proof of concept for PBKDF2 support for the OpenSSL variant of hashlib. It's a thin wrapper around PKCS5_PBKDF2_HMAC() and is deliberately designed as low level API with bytes and input and output types. High level wrappers can do the conversation and choose sensible values for salt, iterations and key length. ---------- components: Extension Modules files: pbkdf2.patch keywords: patch messages: 193832 nosy: christian.heimes priority: normal severity: normal status: open title: PBKDF2 support type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file31066/pbkdf2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 17:14:22 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 28 Jul 2013 15:14:22 +0000 Subject: [issue18582] PBKDF2 support In-Reply-To: <1375024279.36.0.0953079533445.issue18582@psf.upfronthosting.co.za> Message-ID: <1375024462.95.0.0853252106018.issue18582@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file31066/pbkdf2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 17:14:40 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 28 Jul 2013 15:14:40 +0000 Subject: [issue18582] PBKDF2 support In-Reply-To: <1375024279.36.0.0953079533445.issue18582@psf.upfronthosting.co.za> Message-ID: <1375024480.5.0.375381498917.issue18582@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: http://bugs.python.org/file31067/pbkdf2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 18:55:12 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 28 Jul 2013 16:55:12 +0000 Subject: [issue17134] Use Windows' certificate store for CA certs In-Reply-To: <1360078143.8.0.938168290854.issue17134@psf.upfronthosting.co.za> Message-ID: <1375030512.03.0.652178164516.issue17134@psf.upfronthosting.co.za> Christian Heimes added the comment: I guess I have to revise my patch and go throw Windows' crypto lookup functions... Automatic CA root certificate updates on Windows http://netsekure.org/2011/04/automatic-ca-root-certificate-updates-on-windows/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 19:06:02 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Jul 2013 17:06:02 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> Message-ID: <1375031162.24.0.39585136605.issue18472@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Based on recent python-list posts, there is also 'break is bad' propaganda going around. Perhaps we should say that loop-and-a-half with break is preferred (or at least equally acceptable) to repeating code. while True: value = getvalue() if not value: break process(value) versus value = getvalue() while value process(value) value = getvalue() The latter has the problem that the getvalue code can get out of synch, and indeed, given the alternative of writing it once, it is not obvious that it should be the same in the two places. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 19:44:07 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 28 Jul 2013 17:44:07 +0000 Subject: [issue18582] PBKDF2 support In-Reply-To: <1375024279.36.0.0953079533445.issue18582@psf.upfronthosting.co.za> Message-ID: <1375033447.8.0.780019008835.issue18582@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Please use the "y*" format, not "y#". Also, I would lower-case "pbkdf2", just as we already lower-case "md5", "sha1", etc. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 20:32:46 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 28 Jul 2013 18:32:46 +0000 Subject: [issue18112] PEP 442 implementation In-Reply-To: <1371320764.63.0.0772595125462.issue18112@psf.upfronthosting.co.za> Message-ID: <1375036366.64.0.925842687033.issue18112@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Added file: http://bugs.python.org/file31068/050c6d089164.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 20:33:42 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 28 Jul 2013 18:33:42 +0000 Subject: [issue18112] PEP 442 implementation In-Reply-To: <1371320764.63.0.0772595125462.issue18112@psf.upfronthosting.co.za> Message-ID: <1375036422.23.0.655760660272.issue18112@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Updated patch with the suggested changes, apart from a couple stylistic ones (waiting for your answer on these ones). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 20:38:59 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Jul 2013 18:38:59 +0000 Subject: [issue18577] lru_cache enhancement: lru_timestamp helper function In-Reply-To: <1375014771.52.0.855210720887.issue18577@psf.upfronthosting.co.za> Message-ID: <1375036739.25.0.357291618116.issue18577@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 20:40:36 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Jul 2013 18:40:36 +0000 Subject: [issue18575] Fixing tarfile._mode when using gzip via ":gz" In-Reply-To: <1375000514.51.0.865237758651.issue18575@psf.upfronthosting.co.za> Message-ID: <1375036836.86.0.495522948853.issue18575@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Multivolume support in tarfile module nosy: +serhiy.storchaka stage: -> patch review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 20:52:07 2013 From: report at bugs.python.org (Drekin) Date: Sun, 28 Jul 2013 18:52:07 +0000 Subject: [issue11619] On Windows, don't encode filenames in the import machinery In-Reply-To: <1300665531.85.0.426527059221.issue11619@psf.upfronthosting.co.za> Message-ID: <1375037527.7.0.900295128987.issue11619@psf.upfronthosting.co.za> Drekin added the comment: Is there a chance this will be fixed at least in Python 4? ---------- nosy: +Drekin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 20:52:34 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Jul 2013 18:52:34 +0000 Subject: [issue18563] No unit test for yiq to rgb and rgb to yiq converting functions In-Reply-To: <1374856220.88.0.555143792121.issue18563@psf.upfronthosting.co.za> Message-ID: <1375037554.4.0.151188967248.issue18563@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 21:10:39 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Jul 2013 19:10:39 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> Message-ID: <1375038639.82.0.147089636023.issue18472@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Based on recent python-list posts, there is also 'break is bad' propaganda going around. Perhaps we should say that loop-and-a-half with break is preferred (or at least equally acceptable) to repeating code. Sometimes yet one alternative can be used instead: for value in iter(getvalue, stopvalue): process(value) ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 21:33:11 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 28 Jul 2013 19:33:11 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> Message-ID: <1375039991.61.0.416033869034.issue18472@psf.upfronthosting.co.za> Guido van Rossum added the comment: OK, forget I said anything about exceptions. The language in Nick's patch is fine. Regarding "break is bad", while I agree with Terry's recommendation, I think saying anything about this would be overreaching the scope of a style guide. We shouldn't give style lawyers more ammo to start holy wars. I'm not sure I follow Nick's reference to "deterministic resource management to better cope with unexpected exceptions" -- is that an argument from the Go crowd? (Yawn.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 22:26:15 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Jul 2013 20:26:15 +0000 Subject: [issue18441] Idle: Make test.support.requires('gui') skip when it should. In-Reply-To: <1373754847.55.0.0641648695763.issue18441@psf.upfronthosting.co.za> Message-ID: <3c3Fsz2LY5z7Lkg@mail.python.org> Roundup Robot added the comment: New changeset c57b2a344097 by Terry Jan Reedy in branch '3.3': Issue #18441: Remove check from test_text.py in 3.3,4 (already done in 2.7). http://hg.python.org/cpython/rev/c57b2a344097 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 23:43:35 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Jul 2013 21:43:35 +0000 Subject: [issue15415] Add temp_dir() and change_cwd() to test.support In-Reply-To: <1342905198.6.0.0438176504742.issue15415@psf.upfronthosting.co.za> Message-ID: <1375047815.51.0.123032468168.issue15415@psf.upfronthosting.co.za> Terry J. Reedy added the comment: -def temp_cwd(name='tempcwd', quiet=False, path=None): +def temp_cwd(name='tempcwd', quiet=False): Since this parameter removal was pushed, the Windows buildbots consistently have this new error in this Windows-only test. ERROR: test_empty (test.test_startfile.TestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.3.kloth-win64\build\lib\test\test_startfile.py", line 26, in test_empty with support.temp_cwd(path=path.dirname(sys.executable)): File "C:\buildbot.python.org\3.3.kloth-win64\build\lib\contextlib.py", line 115, in helper return _GeneratorContextManager(func, *args, **kwds) File "C:\buildbot.python.org\3.3.kloth-win64\build\lib\contextlib.py", line 37, in __init__ self.gen = func(*args, **kwds) TypeError: temp_cwd() got an unexpected keyword argument 'path' ---------- nosy: +terry.reedy resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 23:48:54 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 28 Jul 2013 21:48:54 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: <1375039991.61.0.416033869034.issue18472@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: "with statements are good", basically. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 00:52:13 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Jul 2013 22:52:13 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> Message-ID: <1375051933.21.0.594770126293.issue18472@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Nick, +1 from me if you want to make your edits and wrap this one up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 01:13:16 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Jul 2013 23:13:16 +0000 Subject: [issue18226] IDLE Unit test for FormatParagrah.py In-Reply-To: <1371335636.99.0.534048602964.issue18226@psf.upfronthosting.co.za> Message-ID: <1375053196.53.0.113354180952.issue18226@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Some comments on patch 6: 1. tearDownClass was omitted, resulting in boxes left on the screen, at least when running in Idle with win7. I added this to the README. I am also getting messages like "warning: callback failed in WindowList : invalid command name ".57777664.windows" in the Idle Shell window. The number of warnings is not deterministics. I started idle with 'import idlelib.idle' in the console interpreter, I have also gotten messages in the console window but no more at the moment. When I got these with test_text, they disappeared, as I remember, when I added root.destroy(). I do not know what is different this time. I do not see the messages when I run in a console window. python_d -m idlelib.idle_test.test_formatparagraph 2). The only code that needs to go in setUpClass is code that must only be executed when the tests are run rather than when the class is defined. All the string constants should be normal class code. test_string = ( " \"\"\"this is a test of a reformat for a triple " ... 3) Only looking for space and tab for indent is correct. I was thinking that perhaps we should only include the first # in comment headers, in case someone does something like ########################################... # real comment line but after looking at the implementation, I decided that anyone with such a block had better select the normal comment lines and omit the all #s line. 4) Formatting comments by stripping the header and reusing the format_paragraph is nice -- assuming that the latter can handle imbedded blank lines. The end of format_comments is flaky, but something that passes a test is way better than nothing. Format_paragraph looks like it could use improvement also, but I think we have improved FormatParagraph.py enough for now. 5. Like many, I prefer to use map with pre-existing functions and comprehensions for new expressions. I am polishing the tests now and might commit later today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 03:33:42 2013 From: report at bugs.python.org (Damien M Calloway) Date: Mon, 29 Jul 2013 01:33:42 +0000 Subject: [issue11152] pb in zipfile module In-Reply-To: <1297178536.07.0.390050074188.issue11152@psf.upfronthosting.co.za> Message-ID: <1375061622.47.0.593795597167.issue11152@psf.upfronthosting.co.za> Damien M Calloway added the comment: I believe I have isolated the bug - I added a blank string to the SMALL TEST DATA list, since empty strings will not compress. Test now fails on lines 645 and 663 when "extract" and "extract_all" assertions fail. This appears to replicate the issue reported. ---------- keywords: +patch Added file: http://bugs.python.org/file31069/test11152.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 03:40:54 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 29 Jul 2013 01:40:54 +0000 Subject: [issue4079] new urllib2.Request 'timeout' attribute needs to have a default In-Reply-To: <1223490599.12.0.198174561396.issue4079@psf.upfronthosting.co.za> Message-ID: <1375062054.78.0.159261140544.issue4079@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, this is a very good point. (And your passing test is worthwhile, you are correct.) People are expected to be able to write handlers, so clearly the timeout API needs to be documented, if for no other reason than to keep a handler writer from stomping on the timeout attribute inappropriately. But there is a code smell to this "API", and I wonder if it is worth someone taking time to think it all through again to see if there is a better way to do it :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 03:53:44 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 29 Jul 2013 01:53:44 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: <1375051933.21.0.594770126293.issue18472@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: > Raymond Hettinger added the comment: > > Nick, +1 from me if you want to make your edits and wrap this one up. +1 from me too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 04:19:00 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 29 Jul 2013 02:19:00 +0000 Subject: [issue18538] `python -m dis ` should use argparse In-Reply-To: <1374623355.46.0.506955235816.issue18538@psf.upfronthosting.co.za> Message-ID: <1375064340.68.0.175136594873.issue18538@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 04:39:37 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Jul 2013 02:39:37 +0000 Subject: [issue18583] Idle: enhance FormatParagraph Message-ID: <1375065577.4.0.851490009653.issue18583@psf.upfronthosting.co.za> New submission from Terry J. Reedy: Writing tests for FormatParagraph.py #18226 revealed that it could use some improvements. At minimum, some for format_paragraph should probably be replaced with textwrap.wrap (or the class) in order to handles double spacing after sentences. Find_paragraph should find the boundaries of triple-quoted strings. The current end-of-text behavior of find_paragraph should perhaps be changed. ---------- assignee: terry.reedy messages: 193848 nosy: terry.reedy priority: normal severity: normal stage: test needed status: open title: Idle: enhance FormatParagraph type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 04:41:10 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Jul 2013 02:41:10 +0000 Subject: [issue18226] IDLE Unit test for FormatParagrah.py In-Reply-To: <1371335636.99.0.534048602964.issue18226@psf.upfronthosting.co.za> Message-ID: <1375065670.23.0.857589907932.issue18226@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Patch attached with current version. I noted in a comment that we should probably replace some of format_paragraph with textwrap.wrap. The find_paragraph test works fine with the current text mock. I split one test method and will probably do more. It could be considered a bug that find_paragraph included the hidden terminal \n when it finds the final line of the text and that line has no \n. Since that is a fairly unrealistic test case, we might do better to add \n on all test snippets. Certainly, adding \n\n is a bug. I have the impression from what I have looked at so far is that triple quoted strings are not handled as they should be. I opened #18583 for enhancing the module beyond what we have done here. ---------- components: +IDLE Added file: http://bugs.python.org/file31070/18226FormatPara7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:19:42 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 29 Jul 2013 05:19:42 +0000 Subject: [issue15415] Add temp_dir() and change_cwd() to test.support In-Reply-To: <1342905198.6.0.0438176504742.issue15415@psf.upfronthosting.co.za> Message-ID: <3c3TjT4fnFzRgM@mail.python.org> Roundup Robot added the comment: New changeset a76693942de3 by Nick Coghlan in branch '3.3': Attempt to fix #15415 on Windows http://hg.python.org/cpython/rev/a76693942de3 New changeset b14308524cff by Nick Coghlan in branch 'default': Merge #15415 Windows buildbot change from 3.3 http://hg.python.org/cpython/rev/b14308524cff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:21:40 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 29 Jul 2013 05:21:40 +0000 Subject: [issue15415] Add temp_dir() and change_cwd() to test.support In-Reply-To: <1342905198.6.0.0438176504742.issue15415@psf.upfronthosting.co.za> Message-ID: <1375075300.95.0.840726493179.issue15415@psf.upfronthosting.co.za> Nick Coghlan added the comment: I did see the Windows buildbot failure, but stopped scanning the log once I saw the intermittent test_signal failure :P With the more granular API, test_startfile is a better fit for support.change_cwd, so we'll see how that goes on the Windows buildbots. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 08:27:08 2013 From: report at bugs.python.org (rurpy) Date: Mon, 29 Jul 2013 06:27:08 +0000 Subject: [issue18584] examples in email.policy doc are fu'd Message-ID: <1375079228.82.0.247789886969.issue18584@psf.upfronthosting.co.za> New submission from rurpy: In the first example in the documentation for library module email.policy (http://docs.python.org/3/library/email.policy.html#module-email.policy): >>> from email import msg_from_binary_file >>> from email.generator import BytesGenerator >>> from subprocess import Popen, PIPE >>> with open('mymsg.txt', 'b') as f: ... msg = msg_from_binary_file(f) line 1: The module is "message_from_binary_file", not "msg_from_binary_file" line 4: The mode must be "rb", not "b". line 5: Same module (mis-)name problem as line 1. Then in following example... >>> import os >>> with open('converted.txt', 'wb') as f: ... f.write(msg.as_string (policy=msg.policy.clone (linesep=os.linesep)) line 3: Ubnbalanced parens, .as_string() has no "policy" keyword arg. Please note I am trying to figure out how to use the email module for the first time and the above errors are glaring. There may be (probably are) other errors in the examples and in the text that I am unaware of -- I've made no attempt to find any others. I suggest that someone familiar with email module review this page more carefully. ---------- assignee: docs at python components: Documentation messages: 193852 nosy: docs at python, rurpy2 priority: normal severity: normal status: open title: examples in email.policy doc are fu'd versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 09:21:46 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 29 Jul 2013 07:21:46 +0000 Subject: [issue15415] Add temp_dir() and change_cwd() to test.support In-Reply-To: <1342905198.6.0.0438176504742.issue15415@psf.upfronthosting.co.za> Message-ID: <1375082506.38.0.918798828403.issue15415@psf.upfronthosting.co.za> Nick Coghlan added the comment: No dice: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/2399/steps/test/logs/stdio Could someone with a Windows build set up try this out? I'd like to rule out a conflict with the -j setting, since being dependent on the current working directory pretty much rules out being run in parallel with other tests, but I didn't see anything in regrtest that let me say "run this one before fanning out into parallel execution". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 09:52:48 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 29 Jul 2013 07:52:48 +0000 Subject: [issue15415] Add temp_dir() and change_cwd() to test.support In-Reply-To: <1342905198.6.0.0438176504742.issue15415@psf.upfronthosting.co.za> Message-ID: <3c3Y674CCyz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 403b038ff075 by Nick Coghlan in branch '3.3': Third attempt to fix #15415 on Windows http://hg.python.org/cpython/rev/403b038ff075 New changeset fa13a159f063 by Nick Coghlan in branch 'default': Merge #15415 from 3.3 (again) http://hg.python.org/cpython/rev/fa13a159f063 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 09:56:06 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 29 Jul 2013 07:56:06 +0000 Subject: [issue18396] test_signal.test_issue9324() fails on buildbot AMD64 Windows7 SP1 3.x In-Reply-To: <1373208170.43.0.508048091983.issue18396@psf.upfronthosting.co.za> Message-ID: <1375084566.78.0.483796752999.issue18396@psf.upfronthosting.co.za> Nick Coghlan added the comment: Is it possible this is indicating a real bug with faulthandler on Windows? Why are we returning None from signal.getsignal? ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 10:02:39 2013 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 29 Jul 2013 08:02:39 +0000 Subject: [issue18396] test_signal.test_issue9324() fails on buildbot AMD64 Windows7 SP1 3.x In-Reply-To: <1373208170.43.0.508048091983.issue18396@psf.upfronthosting.co.za> Message-ID: <1375084959.23.0.18907314294.issue18396@psf.upfronthosting.co.za> Jeremy Kloth added the comment: It do not think that it is a just a Windows issue wrt faulthandler. It is that there are no similar tests for signals on other platforms. getsignal() needs to return *something* for the value of a handler which is not SIG_DFL or SIG_IGN. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 10:38:48 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Jul 2013 08:38:48 +0000 Subject: [issue15415] Add temp_dir() and change_cwd() to test.support In-Reply-To: <1342905198.6.0.0438176504742.issue15415@psf.upfronthosting.co.za> Message-ID: <1375087128.18.0.325598184851.issue15415@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As of this moment, the test has run on one of the two Win7 machines and the xp buildbot. It also runs by itself on my win7 desktop with a fresh pull. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 10:55:44 2013 From: report at bugs.python.org (Phil Connell) Date: Mon, 29 Jul 2013 08:55:44 +0000 Subject: [issue17669] Segfault caused by weird combination of imports and yield from In-Reply-To: <1365461726.69.0.844789226325.issue17669@psf.upfronthosting.co.za> Message-ID: <1375088144.85.0.378259568194.issue17669@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 13:29:01 2013 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 29 Jul 2013 11:29:01 +0000 Subject: [issue18396] test_signal.test_issue9324() fails on buildbot AMD64 Windows7 SP1 3.x In-Reply-To: <1373208170.43.0.508048091983.issue18396@psf.upfronthosting.co.za> Message-ID: <1375097341.76.0.97850365541.issue18396@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Added nosy list from issue 18523 ---------- nosy: +brian.curtin, larry, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 14:01:19 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 29 Jul 2013 12:01:19 +0000 Subject: [issue15415] Add temp_dir() and change_cwd() to test.support In-Reply-To: <1342905198.6.0.0438176504742.issue15415@psf.upfronthosting.co.za> Message-ID: <1375099279.88.0.678967592005.issue15415@psf.upfronthosting.co.za> Nick Coghlan added the comment: While there are some remaining buildbot failures, they don't appear to be related to this issue any more. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 14:27:06 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 29 Jul 2013 12:27:06 +0000 Subject: [issue18572] Remove redundant note about surrogates in string escape doc In-Reply-To: <1374941533.84.0.352957238503.issue18572@psf.upfronthosting.co.za> Message-ID: <1375100826.53.0.690909771255.issue18572@psf.upfronthosting.co.za> R. David Murray added the comment: Python 3.2.3 (default, Jun 15 2013, 14:13:52) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> '\uD80C\uDC80' '\ud80c\udc80' >>> '\uD80C\uDC80' == '\U00013080' False ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 14:37:33 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 29 Jul 2013 12:37:33 +0000 Subject: [issue18181] PEP447: Add type.__locallookup__ In-Reply-To: <1370870153.93.0.646087371852.issue18181@psf.upfronthosting.co.za> Message-ID: <1375101453.91.0.184557603626.issue18181@psf.upfronthosting.co.za> Ronald Oussoren added the comment: * Improved docmentation * __locallookup__ is now called unconditionally, the attribute lookup cache is now disabled when aType.__locallookup__ != type.__locallookup__ This gives a slightly nicer API (the only reason the new method was optional was due to an implementation detail in _PyType_Lookup) ---------- Added file: http://bugs.python.org/file31071/issue-18181-full-v3.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 14:49:10 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 29 Jul 2013 12:49:10 +0000 Subject: [issue18585] Add a text truncation function Message-ID: <1375102150.65.0.445691594018.issue18585@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Following patch proposed to add a function named textwrap.summarize(): >>> textwrap.summarize("Hello world!", width=12) 'Hello world!' >>> textwrap.summarize("Hello world!", width=11) 'Hello (...)' ---------- components: Library (Lib) files: summarize.patch keywords: patch messages: 193862 nosy: barry, georg.brandl, pitrou priority: normal severity: normal stage: patch review status: open title: Add a text truncation function type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file31072/summarize.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 15:27:19 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 29 Jul 2013 13:27:19 +0000 Subject: [issue17449] dev guide appears not to cover the benchmarking suite In-Reply-To: <1363579697.14.0.518781563777.issue17449@psf.upfronthosting.co.za> Message-ID: <1375104439.49.0.138260952605.issue17449@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Documenting this would be useful because it appears to be non-trivial to actually run the benchmark suite with Python 3. * Using "python perf.py -b default" fails due to some code in the benchmarks that is not python3 compatible * Using "make_perf3.sh" and then running "... -b default" still fails, because not all libraries are translated (the test run stopped because splitfire couldn't be found) * Using "-b 2n3" instead instead of "-b default" or "-b all" works, but runs only a subset of the benchmark. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 15:34:05 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 29 Jul 2013 13:34:05 +0000 Subject: [issue17449] dev guide appears not to cover the benchmarking suite In-Reply-To: <1375104439.49.0.138260952605.issue17449@psf.upfronthosting.co.za> Message-ID: <317742664.29564197.1375104839307.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > * Using "-b 2n3" instead instead of "-b default" or "-b all" works, > but > runs only a subset of the benchmark. I think we should include a copy of the 2to3'ed third-party libs in the benchmarks repo, this would running avoid the length and tedious conversion on every user's computer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 15:40:19 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 29 Jul 2013 13:40:19 +0000 Subject: [issue17449] dev guide appears not to cover the benchmarking suite In-Reply-To: <1363579697.14.0.518781563777.issue17449@psf.upfronthosting.co.za> Message-ID: <1375105219.99.0.823460466064.issue17449@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The overhead of 2to3 isn't too bad, especially because only a subset of the benchmarks is translated in the first place. It is more important that there is better documentation than there is now, it seems that you're supposed to use either '-b 2n3' or make_perf3.sh with '-b py3k'. Neither of which are mentioned in README.txt. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 15:45:43 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 29 Jul 2013 13:45:43 +0000 Subject: [issue17449] dev guide appears not to cover the benchmarking suite In-Reply-To: <1375105219.99.0.823460466064.issue17449@psf.upfronthosting.co.za> Message-ID: <1768775312.29584882.1375105537553.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > The overhead of 2to3 isn't too bad, especially because only a subset > of the benchmarks is translated in the first place. Well, the biggest time is spent translating the third-party libraries, not benchmark files. Also, it's simply tedious manual work (you have to create a separate directory etc.). > It is more important that there is better documentation than there is > now, it seems that you're supposed to use either '-b 2n3' or > make_perf3.sh with '-b py3k'. Neither of which are mentioned in > README.txt. That's because the benchmark suite was initially 2.x-only, and the "make_perf3.sh" was a quick hack to make some of the benchmarks work on 3.x. Nowadays the goal is for benchmark files to be 2.x and 3.x compatible in the same codebase, so that only third-party libs remain to translate. Adding 3.x-compatible versions of the third-party libs would eliminate that last step. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 15:55:30 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 29 Jul 2013 13:55:30 +0000 Subject: [issue18585] Add a text truncation function In-Reply-To: <1375102150.65.0.445691594018.issue18585@psf.upfronthosting.co.za> Message-ID: <1375106130.94.0.876254704259.issue18585@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Perhaps the "placeholder" argument should actually include the last whitespace, to allow people to omit the whitespace, or use a non-breaking space instead? >>> textwrap.summarize("Hello world!", width=11, placeholder='...') 'Hello...' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 16:01:31 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 29 Jul 2013 14:01:31 +0000 Subject: [issue17449] dev guide appears not to cover the benchmarking suite In-Reply-To: <1363579697.14.0.518781563777.issue17449@psf.upfronthosting.co.za> Message-ID: <1375106491.83.0.112655564194.issue17449@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The attached patch for the benchmark README.txt should document the status quo. ---------- Added file: http://bugs.python.org/file31073/issue-18181-full-v3.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 16:33:31 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Jul 2013 14:33:31 +0000 Subject: [issue18481] lcov report In-Reply-To: <1374072036.39.0.598411326766.issue18481@psf.upfronthosting.co.za> Message-ID: <1375108411.72.0.103502710385.issue18481@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- Removed message: http://bugs.python.org/msg193235 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 16:34:02 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Jul 2013 14:34:02 +0000 Subject: [issue18481] lcov report In-Reply-To: <1374072036.39.0.598411326766.issue18481@psf.upfronthosting.co.za> Message-ID: <1375108442.16.0.950275503605.issue18481@psf.upfronthosting.co.za> Christian Heimes added the comment: I have moved the static pages to bitbucket: http://tiran.bitbucket.org/python-lcov/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 17:03:29 2013 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 29 Jul 2013 15:03:29 +0000 Subject: [issue18572] Remove redundant note about surrogates in string escape doc In-Reply-To: <1375100826.53.0.690909771255.issue18572@psf.upfronthosting.co.za> Message-ID: <51F6843B.9070909@pearwood.info> Steven D'Aprano added the comment: On 29/07/13 22:27, R. David Murray wrote: >>>> '\uD80C\uDC80' == '\U00013080' > False Are you running a wide build? In a narrow build, it returns True. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 17:04:11 2013 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 29 Jul 2013 15:04:11 +0000 Subject: [issue17449] dev guide appears not to cover the benchmarking suite In-Reply-To: <1375106491.83.0.112655564194.issue17449@psf.upfronthosting.co.za> Message-ID: <1375110246.23374.5.camel@surprise> Dave Malcolm added the comment: On Mon, 2013-07-29 at 14:01 +0000, Ronald Oussoren wrote: > Ronald Oussoren added the comment: > > The attached patch for the benchmark README.txt should document the status quo. > > ---------- > Added file: http://bugs.python.org/file31073/issue-18181-full-v3.txt It looks like you attached the wrong patch: the patch you attached seems to be unrelated to benchmarking (and presumably relates to issue 18181) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 17:09:13 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 29 Jul 2013 15:09:13 +0000 Subject: [issue17449] dev guide appears not to cover the benchmarking suite In-Reply-To: <1363579697.14.0.518781563777.issue17449@psf.upfronthosting.co.za> Message-ID: <1375110553.3.0.931282552895.issue17449@psf.upfronthosting.co.za> Changes by Ronald Oussoren : Removed file: http://bugs.python.org/file31073/issue-18181-full-v3.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 17:10:46 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 29 Jul 2013 15:10:46 +0000 Subject: [issue17449] dev guide appears not to cover the benchmarking suite In-Reply-To: <1363579697.14.0.518781563777.issue17449@psf.upfronthosting.co.za> Message-ID: <1375110646.6.0.413938367178.issue17449@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Sorry about that. I stored the patch file in the wrong directory and attached the most recent file in the directory where I had expected the patch to be. ---------- Added file: http://bugs.python.org/file31074/issue-17449-readme.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 17:20:38 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 29 Jul 2013 15:20:38 +0000 Subject: [issue18585] Add a text truncation function In-Reply-To: <1375106130.94.0.876254704259.issue18585@psf.upfronthosting.co.za> Message-ID: <20130729112033.6eafab9c@anarchist> Barry A. Warsaw added the comment: On Jul 29, 2013, at 01:55 PM, Antoine Pitrou wrote: >Perhaps the "placeholder" argument should actually include the last whitespace, to allow people to omit the whitespace, or use a non-breaking space instead? > > >>> textwrap.summarize("Hello world!", width=11, placeholder='...') > 'Hello...' I guess the placeholder default is ' (...)' then? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 17:34:38 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 29 Jul 2013 15:34:38 +0000 Subject: [issue18585] Add a text truncation function In-Reply-To: <20130729112033.6eafab9c@anarchist> Message-ID: <1055608903.29793397.1375112071821.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > >Perhaps the "placeholder" argument should actually include the last > >whitespace, to allow people to omit the whitespace, or use a > >non-breaking space instead? > > > > >>> textwrap.summarize("Hello world!", width=11, > > >>> placeholder='...') > > 'Hello...' > > I guess the placeholder default is ' (...)' then? Yeah. (of course, another default could be used) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 17:36:40 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 29 Jul 2013 15:36:40 +0000 Subject: [issue18585] Add a text truncation function In-Reply-To: <1375102150.65.0.445691594018.issue18585@psf.upfronthosting.co.za> Message-ID: <1375112200.57.0.968005443322.issue18585@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 17:38:01 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 29 Jul 2013 15:38:01 +0000 Subject: [issue18586] Allow running benchmarks for Python 3 from same directory Message-ID: <1375112281.72.0.724142875294.issue18586@psf.upfronthosting.co.za> New submission from Brett Cannon: As of right now, to run the benchmark suite you need to use make_perf3.sh to generate a Python 3 compatible version of the benchmarks. That was fine when the benchmark suite didn't have much support for Python 3 and thus was just used for Python 3 very often. But now that a lot more benchmarks work it should be updated so that this extra step can be avoided. ---------- components: Benchmarks messages: 193875 nosy: brett.cannon, pitrou priority: normal severity: normal stage: needs patch status: open title: Allow running benchmarks for Python 3 from same directory type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 17:38:50 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 29 Jul 2013 15:38:50 +0000 Subject: [issue17449] dev guide appears not to cover the benchmarking suite In-Reply-To: <1363579697.14.0.518781563777.issue17449@psf.upfronthosting.co.za> Message-ID: <1375112330.86.0.862797527903.issue17449@psf.upfronthosting.co.za> Brett Cannon added the comment: I agree with Antoine that the time has come to drop make_perf3.sh and make it so that Python 3 doesn't require a separate build of the benchmark directory. Created http://bugs.python.org/issue18586 to track this idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 17:51:55 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 29 Jul 2013 15:51:55 +0000 Subject: [issue18548] In unittest doc change WidgetTestCase to SimpleWidgetTestCase in suite() In-Reply-To: <1374691721.34.0.862188774104.issue18548@psf.upfronthosting.co.za> Message-ID: <1375113115.38.0.274711140306.issue18548@psf.upfronthosting.co.za> Ezio Melotti added the comment: This is a leftover from 2.7. In 2.7 the docs have a SimpleWidgetTestCase used as base class for two other classes, and then the same example is reimplemented by using a single WidgetTestCase class. I think it would be better to make the two docs converge, by renaming the SimpleWidgetTestCase in 3.x to WidgetTestCase, and get rid of the SimpleWidgetTestCase example in 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 18:01:57 2013 From: report at bugs.python.org (Denis) Date: Mon, 29 Jul 2013 16:01:57 +0000 Subject: [issue18587] urllib raises exception with string in 'errno' attribute Message-ID: <1375113717.9.0.650830125901.issue18587@psf.upfronthosting.co.za> New submission from Denis: On 'connection refused' error urllib creates IOError with wrong arguents: args ('socket error', error(, 'Connection refused')) It results to dirty hacks in Python code like 'if e.errno == "socket error": ...' instead of traditional 'id e.errno == errno.ECONNREFUSED: ...' ---------- files: pyerror.py messages: 193878 nosy: denkoren priority: normal severity: normal status: open title: urllib raises exception with string in 'errno' attribute type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file31075/pyerror.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 18:09:02 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 29 Jul 2013 16:09:02 +0000 Subject: [issue18585] Add a text truncation function In-Reply-To: <1375102150.65.0.445691594018.issue18585@psf.upfronthosting.co.za> Message-ID: <1375114142.49.0.862240795779.issue18585@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Something is not right if we use more than one space. >>> textwrap.summarize('hello world!', width=12) 'hello world!' >>> textwrap.summarize('hello world!', width=11) 'hello (...)' >>> textwrap.summarize('hello world!', width=10) '(...)' I expect the last statement would give result: 'hello (...)' because 'hello' is just 5 characters, less than 10. ---------- nosy: +vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 18:33:24 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 29 Jul 2013 16:33:24 +0000 Subject: [issue18585] Add a text truncation function In-Reply-To: <1375102150.65.0.445691594018.issue18585@psf.upfronthosting.co.za> Message-ID: <1375115604.14.0.0588563567862.issue18585@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Beside of that, I notice the new lines are deleted silently. >>> textwrap.summarize('republicans are red,\ndemocrats are blue,\nneither one of them,\ncares about you.', width=46) 'republicans are red, democrats are blue, (...)' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 18:58:04 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 29 Jul 2013 16:58:04 +0000 Subject: [issue18572] Remove redundant note about surrogates in string escape doc In-Reply-To: <1374941533.84.0.352957238503.issue18572@psf.upfronthosting.co.za> Message-ID: <1375117084.81.0.613283294601.issue18572@psf.upfronthosting.co.za> R. David Murray added the comment: Probably. I think the default build on Gentoo is wide. That seems to make the existing text even more incorrect :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 19:12:35 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 29 Jul 2013 17:12:35 +0000 Subject: [issue18584] examples in email.policy doc are fu'd In-Reply-To: <1375079228.82.0.247789886969.issue18584@psf.upfronthosting.co.za> Message-ID: <1375117955.22.0.038468098206.issue18584@psf.upfronthosting.co.za> R. David Murray added the comment: Thank you for the report. We currently don't have automated testing of the doctest strings, and I must have neglected to hand test those examples before release. I will fix (and test!) them ASAP. ---------- components: +email nosy: +barry, r.david.murray stage: -> needs patch type: -> behavior versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 19:16:38 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 29 Jul 2013 17:16:38 +0000 Subject: [issue18587] urllib raises exception with string in 'errno' attribute In-Reply-To: <1375113717.9.0.650830125901.issue18587@psf.upfronthosting.co.za> Message-ID: <1375118198.68.0.859496863009.issue18587@psf.upfronthosting.co.za> R. David Murray added the comment: This is a duplicate of issue 6471, which we really do need to fix. But there are backward compatibility concerns with fixing it in 2.7, I'm afraid. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> errno and strerror attributes incorrectly set on socket errors wrapped by urllib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 19:16:59 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 29 Jul 2013 17:16:59 +0000 Subject: [issue6471] errno and strerror attributes incorrectly set on socket errors wrapped by urllib In-Reply-To: <1247432074.99.0.825435411389.issue6471@psf.upfronthosting.co.za> Message-ID: <1375118219.32.0.0276027492394.issue6471@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +denkoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 19:17:37 2013 From: report at bugs.python.org (Clay McClure) Date: Mon, 29 Jul 2013 17:17:37 +0000 Subject: [issue18588] timeit examples should be consistent Message-ID: <1375118257.9.0.905991463553.issue18588@psf.upfronthosting.co.za> Changes by Clay McClure : ---------- assignee: docs at python components: Documentation nosy: claymation, docs at python priority: normal severity: normal status: open title: timeit examples should be consistent type: enhancement versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 19:20:38 2013 From: report at bugs.python.org (Clay McClure) Date: Mon, 29 Jul 2013 17:20:38 +0000 Subject: [issue18588] timeit examples should be consistent Message-ID: <1375118438.6.0.867422483387.issue18588@psf.upfronthosting.co.za> New submission from Clay McClure: The timeit module documentation includes examples of command-line and programmatic invocation, but the results between the two sets of examples don't agree. This patch brings the results into agreement with each other. ---------- keywords: +patch Added file: http://bugs.python.org/file31076/18588.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 19:53:19 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 29 Jul 2013 17:53:19 +0000 Subject: [issue18481] lcov report In-Reply-To: <1374072036.39.0.598411326766.issue18481@psf.upfronthosting.co.za> Message-ID: <1375120399.86.0.290002324801.issue18481@psf.upfronthosting.co.za> Brett Cannon added the comment: How much slower is the execution of Python under the coverage? And can you run it with regrtest's -j (I assume not, but I thought I would ask)? I'm asking because this would be interesting to try and tie into devinabox, but having to run two multi-hour testing runs might be a bit much to ask of sprint leaders. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 19:59:13 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 29 Jul 2013 17:59:13 +0000 Subject: [issue18481] lcov report In-Reply-To: <1374072036.39.0.598411326766.issue18481@psf.upfronthosting.co.za> Message-ID: <1375120753.26.0.00713649524689.issue18481@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 20:14:29 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Jul 2013 18:14:29 +0000 Subject: [issue18481] lcov report In-Reply-To: <1374072036.39.0.598411326766.issue18481@psf.upfronthosting.co.za> Message-ID: <1375121669.28.0.792978430541.issue18481@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm using the PSF's virtual machine for Coverity Scan to run the lcov tests. A full configure (without pydebug), build, test and analyze cycle takes about 25 to 30 minutes. I'm not sure if gcov supports multiple processes. Maybe we can set up a service that builds C and Py coverage reports once a day? The service could push the reports to a public web site and offer rsync pulls over ssh for developers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 20:22:04 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 29 Jul 2013 18:22:04 +0000 Subject: [issue18589] cross-referencing doesn't work between the extending guide and c-api Message-ID: <1375122124.66.0.67649436332.issue18589@psf.upfronthosting.co.za> New submission from Antoine Pitrou: It doesn't seem possible to make reference links to e.g. the definition for tp_clear. Both :attr:`tp_clear` and :attr:`PyTypeObject.tp_clear` do not make any link. The extending guide is littered with such broken references. ---------- assignee: docs at python components: Documentation messages: 193887 nosy: docs at python, eric.araujo, ezio.melotti, georg.brandl, pitrou priority: high severity: normal status: open title: cross-referencing doesn't work between the extending guide and c-api type: behavior versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 20:29:42 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 29 Jul 2013 18:29:42 +0000 Subject: [issue18589] cross-referencing doesn't work between the extending guide and c-api In-Reply-To: <1375122124.66.0.67649436332.issue18589@psf.upfronthosting.co.za> Message-ID: <1375122582.85.0.368638162829.issue18589@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ahah, it seems the correct markup is :c:member:`~PyTypeObject.tp_clear` Now all the existing references have to be fixed... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 20:35:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 29 Jul 2013 18:35:23 +0000 Subject: [issue18589] cross-referencing doesn't work between the extending guide and c-api In-Reply-To: <1375122124.66.0.67649436332.issue18589@psf.upfronthosting.co.za> Message-ID: <1375122923.79.0.730406322401.issue18589@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The following command does the trick: sed -i "s/:attr:\`tp_/:c:member:\`~PyTypeObject.tp_/g" `find -name "*.rst"` It does not fix word-wrapping, though. Is it ok to commit? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 21:37:20 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 29 Jul 2013 19:37:20 +0000 Subject: [issue18481] lcov report In-Reply-To: <1374072036.39.0.598411326766.issue18481@psf.upfronthosting.co.za> Message-ID: <1375126640.98.0.772127771539.issue18481@psf.upfronthosting.co.za> Brett Cannon added the comment: My long term hope is something exactly like that. I'm about to rewrite the instructions for handling coverage.py to use a venv for devinabox, but it's definitely something that can be entirely automated for a daily report. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 21:37:56 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 29 Jul 2013 19:37:56 +0000 Subject: [issue18481] lcov report In-Reply-To: <1374072036.39.0.598411326766.issue18481@psf.upfronthosting.co.za> Message-ID: <1375126676.72.0.423647754982.issue18481@psf.upfronthosting.co.za> Brett Cannon added the comment: And I should part of the reason I would love a daily report is it currently takes a couple of hours to run a full coverage report and that's without branch coverage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 22:02:12 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 29 Jul 2013 20:02:12 +0000 Subject: [issue18584] examples in email.policy doc are fu'd In-Reply-To: <1375079228.82.0.247789886969.issue18584@psf.upfronthosting.co.za> Message-ID: <3c3sHl6PPzzQq2@mail.python.org> Roundup Robot added the comment: New changeset ffc7ea3c04a5 by R David Murray in branch '3.3': #18584: make doctest examples in email documentation pass. http://hg.python.org/cpython/rev/ffc7ea3c04a5 New changeset 206685a4b19c by R David Murray in branch 'default': Merge #18584: make doctest examples in email documentation pass. http://hg.python.org/cpython/rev/206685a4b19c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 22:06:01 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 29 Jul 2013 20:06:01 +0000 Subject: [issue18584] examples in email.policy doc are fu'd In-Reply-To: <1375079228.82.0.247789886969.issue18584@psf.upfronthosting.co.za> Message-ID: <1375128361.15.0.231499648516.issue18584@psf.upfronthosting.co.za> R. David Murray added the comment: OK, this fixed. The 'as_string' example will still fail, as I never added the policy argument to that method. I'll deal with that in a separate issue. Unfortunately it is quite possible there are other errors in the new docs, since they are new...I will review them in the coming month as I'll be working on adding some additional new features to the provisional policies. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 22:08:58 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Jul 2013 20:08:58 +0000 Subject: [issue18481] lcov report In-Reply-To: <1374072036.39.0.598411326766.issue18481@psf.upfronthosting.co.za> Message-ID: <1375128538.83.0.368083722423.issue18481@psf.upfronthosting.co.za> Christian Heimes added the comment: Yeah, it's horrible slow. We need something like https://bitbucket.org/ned/coveragepy/src/2c5fb3a8b81cc56d8ad57dd1bd83ef7740f0d65d/coverage/tracer.c?at=default in the core. I already talked to Ned about contributing the module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 22:09:25 2013 From: report at bugs.python.org (Sarah) Date: Mon, 29 Jul 2013 20:09:25 +0000 Subject: [issue18590] 'Search' and 'Replace' dialogs don't work on quoted text in Windows Message-ID: <1375128565.7.0.113615028691.issue18590@psf.upfronthosting.co.za> New submission from Sarah: In Windows, the 'find' and 'replace' dialogs do not work properly on text that has been commented out using quotation marks. More specifically, the dialog *finds* the text in question, however, it does not *highlight* it. Without the highlighting, a user can't see which text has been found. Since the whole point of the find function is to show the user where the text is located, this is a bug. Credit for the fix goes to Roger Serwy, who suggested raising the hit tag. My patch uses the show_hit function from patch 17511*. I have included the show_hit function, but not the rest of patch 17511. Are there guidelines for submitting patches that utilize elements of other patches? *show_hit is originally from the ReplaceDialog. 17511 added it to SearchDialog ---------- components: IDLE, Windows files: SearchDialogPatch.patch keywords: patch messages: 193895 nosy: Sarah priority: normal severity: normal status: open title: 'Search' and 'Replace' dialogs don't work on quoted text in Windows type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file31077/SearchDialogPatch.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 22:12:05 2013 From: report at bugs.python.org (Sarah) Date: Mon, 29 Jul 2013 20:12:05 +0000 Subject: [issue18590] 'Search' and 'Replace' dialogs don't work on quoted text in Windows In-Reply-To: <1375128565.7.0.113615028691.issue18590@psf.upfronthosting.co.za> Message-ID: <1375128725.53.0.982465047154.issue18590@psf.upfronthosting.co.za> Changes by Sarah : ---------- resolution: -> works for me Added file: http://bugs.python.org/file31078/ReplaceDialogPatch.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 22:16:35 2013 From: report at bugs.python.org (Peter Santoro) Date: Mon, 29 Jul 2013 20:16:35 +0000 Subject: [issue18577] lru_cache enhancement: lru_timestamp helper function In-Reply-To: <1375014771.52.0.855210720887.issue18577@psf.upfronthosting.co.za> Message-ID: <1375128995.03.0.28574621329.issue18577@psf.upfronthosting.co.za> Peter Santoro added the comment: I updated my proposed lru_timestamp function with the following change: 1) raise TypeError instead of ValueError ---------- Added file: http://bugs.python.org/file31079/lru.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 22:18:27 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 29 Jul 2013 20:18:27 +0000 Subject: [issue18590] 'Search' and 'Replace' dialogs don't work on quoted text in Windows In-Reply-To: <1375128565.7.0.113615028691.issue18590@psf.upfronthosting.co.za> Message-ID: <1375129107.86.0.991771197167.issue18590@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, we make the issue have a dependency on the issue it is using. I have done that for this one. ---------- dependencies: +Idle find function closes after each find operation nosy: +r.david.murray resolution: works for me -> stage: -> patch review versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 22:30:21 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 29 Jul 2013 20:30:21 +0000 Subject: [issue18585] Add a text truncation function In-Reply-To: <1375102150.65.0.445691594018.issue18585@psf.upfronthosting.co.za> Message-ID: <1375129821.69.0.197577379418.issue18585@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Vajrasky, thanks. The former is a bug, but the latter is a feature. summarize() re-uses the textwrap machinery to normalize spaces. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 22:34:11 2013 From: report at bugs.python.org (James Lu) Date: Mon, 29 Jul 2013 20:34:11 +0000 Subject: [issue18591] threading.Thread.run returning a result Message-ID: <1375130050.37.0.102071487502.issue18591@psf.upfronthosting.co.za> New submission from James Lu: I have attached a *possible* new version of threading.py that returns the value of the target. ---------- components: Library (Lib) files: threading.py messages: 193899 nosy: James.Lu priority: normal severity: normal status: open title: threading.Thread.run returning a result type: enhancement Added file: http://bugs.python.org/file31080/threading.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 22:35:14 2013 From: report at bugs.python.org (Catherine Devlin) Date: Mon, 29 Jul 2013 20:35:14 +0000 Subject: [issue1666318] shutil.copytree doesn't give control over directory permissions Message-ID: <1375130114.65.0.761441216779.issue1666318@psf.upfronthosting.co.za> Catherine Devlin added the comment: Attaching a test that verifies that shutil.copytree is, in fact, preserving permissions (as of Python 3.4.0a0 (default:66a3dc613627, Jul 27 2013, 21:23:10) ) As far as I can tell this can be closed. ---------- nosy: +catherinedevlin Added file: http://bugs.python.org/file31081/test1666318.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 22:35:33 2013 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Jul 2013 20:35:33 +0000 Subject: [issue18570] OverflowError in division: wrong message In-Reply-To: <1374924685.41.0.945479313268.issue18570@psf.upfronthosting.co.za> Message-ID: <1375130133.45.0.593937200624.issue18570@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'd prefer to keep the current behaviour for int / int with an out-of-range result (i.e., raise OverflowError). As far as possible, I believe Python should raise an exception rather than return an infinity or nan whenever possible (with exceptions when one or other of the operands was an infinity or nan to begin with). The math module does this consistently; but (mostly for historical reasons) the core of Python doesn't have a lot of consistency w.r.t. overflow versus infinities: Still, my own preference would be to try to move to greater use of exceptions rather than to greater use of 'inf' and 'nan' results. So if anything, 2**1023 / 2**-3 would ideally raise OverflowError rather than return 'inf'. Note that 1 / 0 also currently raises an exception rather than returning an infinity. Agreed that 'long int' should be 'int'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 22:38:37 2013 From: report at bugs.python.org (James Lu) Date: Mon, 29 Jul 2013 20:38:37 +0000 Subject: [issue18591] threading.Thread.run returning a result In-Reply-To: <1375130050.37.0.102071487502.issue18591@psf.upfronthosting.co.za> Message-ID: <1375130317.4.0.103442026175.issue18591@psf.upfronthosting.co.za> James Lu added the comment: run's calling function needs to return. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 22:44:46 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 29 Jul 2013 20:44:46 +0000 Subject: [issue18591] threading.Thread.run returning a result In-Reply-To: <1375130050.37.0.102071487502.issue18591@psf.upfronthosting.co.za> Message-ID: <1375130686.58.0.20122701424.issue18591@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hi! I'm not sure what feature exactly you're proposing here, but please follow the devguide's guidelines to submit a proper patch: http://docs.python.org/devguide/patch.html And more generally: http://docs.python.org/devguide/ ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 22:52:06 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 29 Jul 2013 20:52:06 +0000 Subject: [issue1666318] shutil.copytree doesn't give control over directory permissions Message-ID: <1375131126.39.0.989810724439.issue1666318@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Catherine, I think it would be nice to apply your patch to avoid any further regressions. However, you should first sign a contributor's agreement (http://www.python.org/psf/contrib/). Could you please do so and post here once it is done? ---------- assignee: tarek -> components: +Tests nosy: +pitrou stage: test needed -> patch review type: behavior -> enhancement versions: +Python 3.4 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 23:17:21 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 29 Jul 2013 21:17:21 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: <1374907127.49.0.519033043684.issue18472@psf.upfronthosting.co.za> Message-ID: <20130729171715.76e68037@anarchist> Barry A. Warsaw added the comment: Comments on the diff. > -Two good reasons to break a particular rule: > +Some especially good reasons to ignore a particular guideline: It's probably enough to just s/Two/Some/ - not sure the 'especially' emphasis is really needed. > +3. Because the code in question predates the introduction of the rule and > + there is no other reason to be modifying that code (especially if > + conforming to the updated style guide risks breaking backwards > + compatibility) I'd rather s/rules/recommendation/. Also, I'm not sure the parenthetical comment is necessary, but if you disagree, perhaps remove the parentheses and rephrase more assertively: "...that code. Don't break backward compatibility just to conform to the recommendations in this PEP." > -second-most popular way is with tabs only. Code indented with a > -mixture of tabs and spaces should be converted to using spaces > -exclusively. When invoking the Python command line interpreter with > +second-most popular way is with tabs only. In Python 3, these are the > +only two permitted options (mixing tabs and spaces in the same file will > +raise an error). I don't think the parenthetical comment adds much. They'll find this out soon enough. > + > +Code indented with a mixture of tabs and spaces should be converted to > +using spaces exclusively. Perhaps more assertively (but perhaps controversial): "Spaces-only indentation is recommended." > -There are still many devices around that are limited to 80 character > -lines; plus, limiting windows to 80 characters makes it possible to > -have several windows side-by-side. The default wrapping on such > -devices disrupts the visual structure of the code, making it more > -difficult to understand. Therefore, please limit all lines to a > -maximum of 79 characters. For flowing long blocks of text (docstrings > -or comments), limiting the length to 72 characters is recommended. > +Limiting the required editor window width to 80 characters makes it possible > +to have several files open side-by-side, and works well when using code > +review tools that present the two versions in adjacent columns. > + > +The default wrapping in most tools disrupts the visual structure of the > +code, making it more difficult to understand. Some web based tools may not > +offer line wrapping at all. Therefore, please limit all lines to a maximum > +of 79 characters. For flowing long blocks of text (docstrings or comments), > +limiting the length to 72 characters is recommended. Because I've fielded some questions about this over the years, perhaps add a footnote explaining why 79 characters is recommended instead of 80. Even though the window might be 80 characters wide, some editors (e.g. Emacs) place a glyph in column 80 instead of the 80th character, so the text actually wraps after the 79th character. > -- Relative imports for intra-package imports are highly discouraged. > - Always use the absolute package path for all imports. Even now that > - PEP 328 is fully implemented in Python 2.5, its style of explicit > - relative imports is actively discouraged; absolute imports are more > - portable and usually more readable. > +- Absolute imports are recommended, as they are usually more readable and > + tend to be better behaved (or at least give better error messages) if the > + mport system is incorrectly configured (such as when a directory inside a s/mport/import/ > +- Wildcard imports (``from import *``) should be avoided, as they > + make it unclear which names are present in the namespace, confusing both > + readers and many automated tools. There is one defensible use case for > + a wildcard import, which is to republish an internal interface as part > + of a public API (for example, overwriting a pure Python implementation of > + an interface with the definitions from an optional accelerator module). Although I'll note that even in this case, it can be preferable to explicitly name the symbols being republished. import-* is useful if that list is too difficult to manage, e.g. it changes often, is dynamically created, or is just huge. Perhaps this should also reiterate the recommendation that intentionally republished symbols should be named in the masked module's __all__. [section on public and internal interfaces] Nicely written! > - or ``a = a + b``. Those statements run more slowly in Jython. In > - performance sensitive parts of the library, the ``''.join()`` form > - should be used instead. This will ensure that concatenation occurs > - in linear time across various implementations. > + or ``a = a + b``. This optimisation is fragile even in CPython (it only s/optimisation/optimization/ but I guess we don't need to argue about that particular bikeshed colour :). > + The first form means that the name of the resulting function object is > + specifically 'f' instead of the generic ''. This is more useful > + for tracebacks and string representations in general. The use of the > + assignment statement eliminates the sole benefit a lambda expression can > + offer over an explicit def statement (i.e. that it can be embedded inside > + a larger expression) I'm concerned that the PEP is getting too verbose with all the Talmudic detours. The more verbose the PEP gets, the less useful it is as a reference document. OTOH, explaining why the recommendations exist helps people to understand that it's not just a collection of arbitrary rules. Two thoughts come to mind as a possible solution: * Keep PEP 8 lean and mean, but publish a companion PEP, say 108, that is an "annotated PEP 8". It would contain all the explanatory material. The downside is that it's always harder to keep two documents in sync. Perhaps there are docutils hacks that we can use to delineate "explanation" from "recommendation" and let PEP 108 be auto-generated. * Use footnotes for further discussion. This would keep the main body of the PEP lean and mean, but provide further explanation for those who want to dig into the reasons. > + Design exception hierarchies based on the distinctions that code > + *catching* the exceptions is likely to need, rather than the locations > + where the exceptions are raised. Aim to answer the question > + "What went wrong?" programmatically, rather than only stating that > + "A problem occurred" (see PEP 3151 for an example of this lesson being > + learned for the builtin exception hierarchy) While I agree, this recommendation feels a little squishy to me. This is a perfect example of discussion I'd like to see removed from the main body of the PEP, but could be appropriate for an annotation or footnote. > + It is highly recommended that third party experimants with annotations > + use an associated decorator to indicate how the annotation should be > + intepreted. s/experimants/experiments s/intepreted/interpreted ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 23:28:27 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 29 Jul 2013 21:28:27 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: <1374937980.42.0.680508996663.issue18472@psf.upfronthosting.co.za> Message-ID: <20130729172824.406693be@anarchist> Barry A. Warsaw added the comment: On Jul 27, 2013, at 03:13 PM, Guido van Rossum wrote: >- I think we should recommend against tabs outright. They are getting more >- and more misunderstood. +1 >- Regarding line length, I think it is reasonable to mention that many >- organizations are settling on 100 as a compromise. On newer laptops you >- can still fit two terminal windows (with a reasonable font size) side by >- side. (Also many people checking code into the stdlib ignore the 80 char >- limit. :-( ) Really? I haven't seen much 100 character limits. Have you seen this at Google or Dropbox? As for the stdlib checkins > 80 chars, yeah, that really annoys me! >- Which reminds me. Do we have a recommendation yet to write > except Exception: >instead of > except: >If not, we should. PEP 8 current says this: A bare ``except:`` clause will catch SystemExit and KeyboardInterrupt exceptions, making it harder to interrupt a program with Control-C, and can disguise other problems. If you want to catch all exceptions that signal program errors, use ``except Exception:`` (bare except is equivalent to ``except BaseException:``). >- I wouldn't mind seeing at least a mild recommendation against using >exceptions for non-local control flow. The lessons of StopIteration >suggest that such designs are often fraught with subtle problems. As with everything (and which IMHO does not need to be stated again), there are sometimes good reasons to stray from the recommendations in the PEP. So in general +1 for such a mild con recommendation. Those who understand why it's generally a bad idea will also understand when it's proper to stray. (The only argument against such things is of course the pep8 tool, which codifies the recommendations in this PEP. Some packages actually run the pep8 checker as part of their test suite, so if we change a recommendation and that gets pulled into pep8, then tests can break.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 23:30:33 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 29 Jul 2013 21:30:33 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: <1374987581.31.0.434083488803.issue18472@psf.upfronthosting.co.za> Message-ID: <20130729173031.2be4d5d5@anarchist> Barry A. Warsaw added the comment: On Jul 28, 2013, at 04:59 AM, Raymond Hettinger wrote: >- Regarding line length, I think it is reasonable to mention that many >organizations are settling on 100 as a compromise. On newer laptops you >can still fit two terminal windows (with a reasonable font size) side by >side > >+1 I've seen too many atrocities committed by people trying to scrunch code >into 80 columns (weird line splits, over-abbreviated variable names, etc). That's unfortunately. "Weird" is almost never needed. Long lines are a code smell IMHO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 23:32:12 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 29 Jul 2013 21:32:12 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: Message-ID: <20130729173209.2c7f31d2@anarchist> Barry A. Warsaw added the comment: On Jul 28, 2013, at 09:48 PM, Nick Coghlan wrote: > >Nick Coghlan added the comment: > >"with statements are good", basically. `with ExitStack() as stack` is even better :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 23:40:07 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 29 Jul 2013 21:40:07 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: <20130729172824.406693be@anarchist> Message-ID: Guido van Rossum added the comment: [Guido] >>- Regarding line length, I think it is reasonable to mention that many >>- organizations are settling on 100 as a compromise. On newer laptops you >>- can still fit two terminal windows (with a reasonable font size) side by >>- side. (Also many people checking code into the stdlib ignore the 80 char >>- limit. :-( ) [Barry] > Really? I haven't seen much 100 character limits. Have you seen this at > Google or Dropbox? At Google people argue to raise the 80 char limit forever -- and they use 2-space indents. For Java they've accepted 100 chars. At Dropbox they also use 100 chars (although nobody enforces style rules here, so many lines are even longer :-( ). > (The only argument against such things is of course the pep8 tool, which > codifies the recommendations in this PEP. Some packages actually run the pep8 > checker as part of their test suite, so if we change a recommendation and that > gets pulled into pep8, then tests can break.) I hate that tool. It only covers a small part of the PEP, and is very nitpicky about the part it does support, causing people to contort their code to shut up the tool instead of learning and understanding the PEP and applying common sense. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 23:46:31 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Jul 2013 21:46:31 +0000 Subject: [issue18570] OverflowError in division: wrong message In-Reply-To: <1374924685.41.0.945479313268.issue18570@psf.upfronthosting.co.za> Message-ID: <1375134391.32.0.875610654919.issue18570@psf.upfronthosting.co.za> Terry J. Reedy added the comment: +-infinity and nans were created for reasons that do not apply to standard python. In Fortran, C, etcetera, float arrays can only contain floats (hence calling a non-number a float) and continuing a computation after numerical error is more difficult or impossible. So something as simple as the following is not possible. for time in range(1, 1000): for x in range(1000): for y in range(1000): try: data[x][y] = except Exception as e: data[x][y] = None # will propagate just like NaNs! I think we might be better with two consistently behaving float classes: proper Python floats with no inf or nan, just exceptions; and ieee floats, similar to Decimals, with as complete implementation of the ieee standard as possible, including various nan types and access to FPU flags. What we have now is a compromise that I doubt is truly satisfactory to anyone. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 00:36:58 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 29 Jul 2013 22:36:58 +0000 Subject: [issue18472] Update PEP 8 to encourage modern conventions In-Reply-To: <1373973528.84.0.159091610788.issue18472@psf.upfronthosting.co.za> Message-ID: <1375137418.63.0.0209033574672.issue18472@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 03:12:50 2013 From: report at bugs.python.org (Phil Webster) Date: Tue, 30 Jul 2013 01:12:50 +0000 Subject: [issue18592] IDLE: Unit test for SearchDialogBase.py Message-ID: <1375146770.41.0.774627283078.issue18592@psf.upfronthosting.co.za> New submission from Phil Webster: This is a basic set of tests for SearchDialogBase. It mainly consists of gui code, so I was not completely sure of how/what to test. Before venturing any further, I thought I would make sure I'm heading in the right direction. ---------- components: IDLE messages: 193911 nosy: JayKrish, Todd.Rovito, philwebster, terry.reedy priority: normal severity: normal status: open title: IDLE: Unit test for SearchDialogBase.py type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 03:13:08 2013 From: report at bugs.python.org (Phil Webster) Date: Tue, 30 Jul 2013 01:13:08 +0000 Subject: [issue18592] IDLE: Unit test for SearchDialogBase.py In-Reply-To: <1375146770.41.0.774627283078.issue18592@psf.upfronthosting.co.za> Message-ID: <1375146788.22.0.680063268445.issue18592@psf.upfronthosting.co.za> Changes by Phil Webster : ---------- keywords: +patch Added file: http://bugs.python.org/file31082/test_searchdialogbase.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 03:30:56 2013 From: report at bugs.python.org (Phil Webster) Date: Tue, 30 Jul 2013 01:30:56 +0000 Subject: [issue18583] Idle: enhance FormatParagraph In-Reply-To: <1375065577.4.0.851490009653.issue18583@psf.upfronthosting.co.za> Message-ID: <1375147856.26.0.324352421339.issue18583@psf.upfronthosting.co.za> Changes by Phil Webster : ---------- nosy: +philwebster _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 04:07:16 2013 From: report at bugs.python.org (Brett Cannon) Date: Tue, 30 Jul 2013 02:07:16 +0000 Subject: [issue18481] lcov report In-Reply-To: <1374072036.39.0.598411326766.issue18481@psf.upfronthosting.co.za> Message-ID: <1375150036.14.0.298624588209.issue18481@psf.upfronthosting.co.za> Brett Cannon added the comment: It's actually slower even with tracer.c. You actually can't use the full coverage script without using the tracer extension module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 04:45:48 2013 From: report at bugs.python.org (Todd Rovito) Date: Tue, 30 Jul 2013 02:45:48 +0000 Subject: [issue18583] Idle: enhance FormatParagraph In-Reply-To: <1375065577.4.0.851490009653.issue18583@psf.upfronthosting.co.za> Message-ID: <1375152348.06.0.197978804883.issue18583@psf.upfronthosting.co.za> Changes by Todd Rovito : ---------- nosy: +Todd.Rovito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 06:44:29 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Tue, 30 Jul 2013 04:44:29 +0000 Subject: [issue18593] Typo in Lib/multiprocessing/heap.py Message-ID: <1375159469.25.0.714853217909.issue18593@psf.upfronthosting.co.za> New submission from Vajrasky Kok: $ grep Inheirtable Lib/multiprocessing/* Lib/multiprocessing/heap.py:# Inheirtable class which wraps an mmap, and from which blocks can be allocated ---------- assignee: docs at python components: Documentation messages: 193913 nosy: docs at python, vajrasky priority: normal severity: normal status: open title: Typo in Lib/multiprocessing/heap.py versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 07:52:55 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Jul 2013 05:52:55 +0000 Subject: [issue18593] Typo in Lib/multiprocessing/heap.py In-Reply-To: <1375159469.25.0.714853217909.issue18593@psf.upfronthosting.co.za> Message-ID: <1375163575.14.0.274314233887.issue18593@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 08:49:20 2013 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 30 Jul 2013 06:49:20 +0000 Subject: [issue18594] C accelerator for collections.Counter is slow Message-ID: <1375166960.42.0.521563124847.issue18594@psf.upfronthosting.co.za> New submission from Stefan Behnel: The C accelerator for the collections.Counter class (_count_elements() in _collections.c) is slower than the pure Python versions for data that has many unique entries. This is because the fast path for dicts is not taken (Counter is a subtype of dict) and the slower fallback path raises exceptions for each value that wasn't previously seen. This can apparently make it slower than calling get() on Python side. My suggestion is to drop the fallback path from the accelerator completely and to only call the C function when it's safe to use it, e.g. when "type(self) is Counter" and not a subclass. ---------- components: Library (Lib) messages: 193914 nosy: scoder, serhiy.storchaka priority: normal severity: normal status: open title: C accelerator for collections.Counter is slow type: performance versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 09:45:18 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 30 Jul 2013 07:45:18 +0000 Subject: [issue18595] zipfile: symlinks etc. Message-ID: <1375170318.76.0.496081120587.issue18595@psf.upfronthosting.co.za> New submission from Ronald Oussoren: The zipfile format (as described by .zip file format specification) allows for storing extra unix data, such as symlinks and device nodes in zipfile. Storing at least symlinks would be useful, and is supported by the infozip tools as well (the command-line zip and unzip commands on Linux systems). An implementation would use the "UNIX Extra Field (0x000d)" to store this information. ---------- components: Library (Lib) messages: 193915 nosy: ronaldoussoren priority: normal severity: normal stage: test needed status: open title: zipfile: symlinks etc. type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 09:47:59 2013 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 30 Jul 2013 07:47:59 +0000 Subject: [issue18570] OverflowError in division: wrong message In-Reply-To: <1374924685.41.0.945479313268.issue18570@psf.upfronthosting.co.za> Message-ID: <1375170479.17.0.831006252381.issue18570@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I think we might be better with two consistently behaving float classes That sounds a bit extreme. Personally, I'd look for a solution involving only one float class and a "with float.nonstopmode: ..." setting under which we get infinities and nans as prescribed by IEEE 754; the default would be to produce exceptions in places where IEEE 754 would signal a floating-point exception (any of divide-by-zero, overflow or invalid-operation, but not for inexact or underflow). This is definitely PEP territory, though; and someone needs to undertake to implement it, which is distinctly nontrivial. For this issue, I'd avoid making any small changes to current behaviour without having at least a clear vision set out of where we want to end up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 10:52:39 2013 From: report at bugs.python.org (halfie) Date: Tue, 30 Jul 2013 08:52:39 +0000 Subject: [issue18596] enable usage of AddressSanitizer in CPython [PATCH] Message-ID: <1375174359.28.0.546907495292.issue18596@psf.upfronthosting.co.za> New submission from halfie: Hi, When trying to build CPython "tip" with AddressSanitizer enabled, I get the following crash, make Parser/pgen make[1]: Entering directory `/scratch/repos/cpython' make[1]: `Parser/pgen' is up to date. make[1]: Leaving directory `/scratch/repos/cpython' Parser/pgen ./Grammar/Grammar Include/graminit.h Python/graminit.c ================================================================= ==1375== ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60380000f020 at pc 0x40b260 bp 0x7fff6e6cbbf0 sp 0x7fff6e6cbbe8 READ of size 4 at 0x60380000f020 thread T0 #0 0x40b25f in _PyObject_Realloc /scratch/repos/cpython/Objects/obmalloc.c:1551 #1 0x403048 in PyNode_AddChild /scratch/repos/cpython/Parser/node.c:98 #2 0x4037fe in push /scratch/repos/cpython/Parser/parser.c:126 #3 0x4121bd in parsetok /scratch/repos/cpython/Parser/parsetok.c:211 #4 0x413344 in PyParser_ParseFileFlags /scratch/repos/cpython/Parser/parsetok.c:86 #5 0x413422 in getgrammar /scratch/repos/cpython/Parser/pgenmain.c:92 #6 0x401860 in main /scratch/repos/cpython/Parser/pgenmain.c:55 #7 0x3cb2221b74 in ?? ??:0 #8 0x401994 in _start ??:? 0x60380000f020 is located 96 bytes to the left of 0-byte region [0x60380000f080,0x60380000f080) ==1375== AddressSanitizer CHECK failed: ../../../../libsanitizer/asan/asan_allocator2.cc:216 "((id)) != (0)" (0x0, 0x0) #0 0x3ab681237d in ?? ??:0 #1 0x3ab68191b3 in ?? ??:0 #2 0x3ab680563b in ?? ??:0 #3 0x3ab6816e8f in ?? ??:0 #4 0x3ab6817ff1 in ?? ??:0 #5 0x3ab6812763 in ?? ??:0 #6 0x40b25f in _PyObject_Realloc /scratch/repos/cpython/Objects/obmalloc.c:1551 #7 0x403048 in PyNode_AddChild /scratch/repos/cpython/Parser/node.c:98 #8 0x4037fe in push /scratch/repos/cpython/Parser/parser.c:126 #9 0x4121bd in parsetok /scratch/repos/cpython/Parser/parsetok.c:211 #10 0x413344 in PyParser_ParseFileFlags /scratch/repos/cpython/Parser/parsetok.c:86 #11 0x413422 in getgrammar /scratch/repos/cpython/Parser/pgenmain.c:92 #12 0x401860 in main /scratch/repos/cpython/Parser/pgenmain.c:55 #13 0x3cb2221b74 in ?? ??:0 #14 0x401994 in _start ??:? make: *** [Include/graminit.h] Error 1 ... AddressSanitizer is a fast memory error detector. See http://clang.llvm.org/docs/AddressSanitizer.html for details. Build options used ================== export CFLAGS="-fsanitize=address -g" export LDFLAGS="-fsanitize=address" ./configure --prefix=/opt/python --with-valgrind Software Versions ================== $ hg log changeset: 84902:6e1dd1ce95b8 branch: 2.7 tag: tip parent: 84893:1dbcb0299088 user: Terry Jan Reedy date: Tue Jul 30 01:37:36 2013 -0400 summary: Make all idle test case names end with 'Test'. $ gcc --version gcc (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1) $ cat /etc/redhat-release Fedora release 19 (Schr?dinger?s Cat) Fix / Work-around ================= See http://code.google.com/p/address-sanitizer/wiki/AddressSanitizer#Turning_off_instrumentation Turning off the instrumentation for _PyObject_Free and _PyObject_Realloc is required. Advantages ========== AddressSanitizer can *now* be used to test and debug CPython. AddressSanitizer has helped me find a large number of bugs in other softwares. ---------- components: Interpreter Core files: enable-ASAN-in-CPython.diff keywords: patch messages: 193917 nosy: halfie priority: normal severity: normal status: open title: enable usage of AddressSanitizer in CPython [PATCH] type: crash versions: Python 3.4 Added file: http://bugs.python.org/file31083/enable-ASAN-in-CPython.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 11:13:12 2013 From: report at bugs.python.org (Drekin) Date: Tue, 30 Jul 2013 09:13:12 +0000 Subject: [issue18597] On Windows sys.stdin.readline() doesn't handle Ctrl-C properly Message-ID: <1375175592.24.0.539816782076.issue18597@psf.upfronthosting.co.za> New submission from Drekin: When I run sys.stdin.readline() interactivelly (on Windows and Python 3.3.2) and hit Ctrl-C, sometimes it returns an empty string just before KeyboardInterrupt is raised. Sometimes it isn't even raised and instead after hitting Return some weird SyntaxtError: unknown decode error (on line 0) occurs. Seems like propagation of KeyboardInterrupt is somehow out of sync. sys.stdin.read(n) has the same issue. May be related to recently fixed http://bugs.python.org/issue17619 where was similar situation with input(). ---------- components: Windows messages: 193918 nosy: Drekin priority: normal severity: normal status: open title: On Windows sys.stdin.readline() doesn't handle Ctrl-C properly versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 11:34:05 2013 From: report at bugs.python.org (Tim Golden) Date: Tue, 30 Jul 2013 09:34:05 +0000 Subject: [issue18597] On Windows sys.stdin.readline() doesn't handle Ctrl-C properly In-Reply-To: <1375175592.24.0.539816782076.issue18597@psf.upfronthosting.co.za> Message-ID: <1375176845.07.0.0873506449165.issue18597@psf.upfronthosting.co.za> Tim Golden added the comment: The Ctrl-C handling in Python on Windows is a bit strange in places. I'll add this to my list of things to look at. If you'd care to walk through the code to produce a patch or at least to point to suspect code, that would make it more likely that it be fixed. ---------- assignee: -> tim.golden nosy: +tim.golden stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 11:34:29 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Jul 2013 09:34:29 +0000 Subject: [issue18585] Add a text truncation function In-Reply-To: <1375102150.65.0.445691594018.issue18585@psf.upfronthosting.co.za> Message-ID: <1375176869.9.0.604748899574.issue18585@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Oops, sorry, I was mistaken. There is no bug actually here: >>> textwrap.summarize('hello world!', width=10) '(...)' 'hello (...)' cannot be the right answer since its len() is 11, greater than 10. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 12:05:44 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Jul 2013 10:05:44 +0000 Subject: [issue18585] Add a text truncation function In-Reply-To: <1375102150.65.0.445691594018.issue18585@psf.upfronthosting.co.za> Message-ID: <1375178744.28.0.122456944114.issue18585@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Updated patch to not add any space before the placeholder, with " (...)" as default placeholder value. ---------- Added file: http://bugs.python.org/file31084/summarize2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 12:06:30 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Jul 2013 10:06:30 +0000 Subject: [issue18594] C accelerator for collections.Counter is slow In-Reply-To: <1375166960.42.0.521563124847.issue18594@psf.upfronthosting.co.za> Message-ID: <1375178790.53.0.66914917396.issue18594@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +rhettinger priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 12:30:44 2013 From: report at bugs.python.org (=?utf-8?b?THVrw6HFoSBOxJttZWM=?=) Date: Tue, 30 Jul 2013 10:30:44 +0000 Subject: [issue18598] Importlib, more verbosity please Message-ID: <1375180244.43.0.821767780261.issue18598@psf.upfronthosting.co.za> New submission from Luk?? N?mec: Hello, recently I filed this bugreport to Django, but they clarified this by pointing me to commits for new version of Django that uses python builtin importlib (import_module) But since most of their import_module code is done like [import_module(x) for y if blahblah], it is very difficult for me to debug code where Django tries to import some package, and all I get back is message "relative imports require the 'package' argument" This message tells me exactly nothing :), just that something somewhere, even 3rd party app tried to do relative imports ... what did it import, with what parameters? I edited this locally for debugging, and changed it to this: "relative imports require the 'package' argument, package: %s" % name This simple change of the message allowed me to find the problem in a few seconds.. Would you please consider adding something similar to importlib for better debugging? Thank you :) ---------- components: Library (Lib) messages: 193922 nosy: Luk??.N?mec priority: normal severity: normal status: open title: Importlib, more verbosity please type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 12:54:40 2013 From: report at bugs.python.org (=?utf-8?q?Maciej_Blizi=C5=84ski?=) Date: Tue, 30 Jul 2013 10:54:40 +0000 Subject: [issue6643] Throw away more radioactive locks that could be held across a fork in threading.py In-Reply-To: <1249412209.9.0.200329347238.issue6643@psf.upfronthosting.co.za> Message-ID: <1375181680.39.0.88256828993.issue6643@psf.upfronthosting.co.za> Maciej Blizi?ski added the comment: Python version: 2.7.5 OS: Solaris 9 I'm still observing this issue (or Issue5114) on Solaris 9. The symptom is that test_threading hangs indefinitely (tested: overnight) and running pstack on the process, I'm seeing: ----------------- lwp# 1 / thread# 1 -------------------- ff3dc734 lwp_park (0, 0, 0) ff3d3c74 s9_lwp_park (0, 0, 0, 1, feed4f48, 18f5a4) + 28 ff3dc698 s9_handler (0, 0, 0, 1, feed4f48, 18f5a4) + 90 ff1dea70 _sema_wait (0, feee66a0, fed6b054, feee6000, 2a298478, d1f20) + 1d4 ff1dec30 sema_wait (81aa8, ff1dec24, 722a5b4b, 1101c, feed4f48, 134d60) + c feed4f48 sem_wait (81aa8, 0, fed6b1ac, 0, 0, 1) + 20 ff050890 PyThread_acquire_lock (81aa8, 1, fed6b214, 2, 0, 1ae778) + 5c ff05524c lock_PyThread_acquire_lock (0, 22030, 0, 13ee40, 16a298, 55150) + 50 fefa779c PyCFunction_Call (1ae788, 22030, 0, ff0d8eb8, 55150, ff0551fc) + e4 ff016b14 PyEval_EvalFrameEx (18f5a0, 0, 0, d4f66, 16a298, 22030) + 5ee8 ff0185d0 PyEval_EvalCodeEx (12c968, 0, 18f5a0, 4, 1, 18f5a4) + 924 ff0168f8 PyEval_EvalFrameEx (1902b8, 0, 1, 1765c0, 16a298, 1b12d0) + 5ccc ff0185d0 PyEval_EvalCodeEx (13f608, 0, 1902b8, 4, 1, 1902bc) + 924 ff0168f8 PyEval_EvalFrameEx (154748, 0, 1, 31f7f, 16a298, 1b1250) + 5ccc ff0185d0 PyEval_EvalCodeEx (10d650, 54a50, 154748, 2203c, 0, 2203c) + 924 fef8e11c function_call (22038, 22030, 1386f0, 2203c, 130730, 22030) + 168 fef604e8 PyObject_Call (130730, 22030, 1386f0, ff0e0340, fef8dfb4, 0) + 60 ff0137dc PyEval_EvalFrameEx (169110, 0, 22030, 10e62d, 16a298, 22030) + 2bb0 ff017478 PyEval_EvalFrameEx (168f80, 0, 169114, 1769fa, 16a298, 16a298) + 684c ff017478 PyEval_EvalFrameEx (176cb0, 0, 168f84, 12a2c0, 16a298, 16a298) + 684c ff0185d0 PyEval_EvalCodeEx (13f410, 176cb4, 176cb0, 13433c, 1, 0) + 924 fef8e040 function_call (1b26f0, 134330, 0, ff1bc000, 1b26f0, 0) + 8c fef604e8 PyObject_Call (1b26f0, 134330, 0, ff0e0340, fef8dfb4, 134320) + 60 fef6e530 instancemethod_call (0, 134330, 0, 0, 1b26f0, 134bd0) + a4 fef604e8 PyObject_Call (c3b48, 22030, 0, ff0e0340, fef6e48c, 0) + 60 ff01051c PyEval_CallObjectWithKeywords (c3b48, 22030, 0, 0, 0, 0) + 68 ff05568c t_bootstrap (63bd0, 0, 0, 0, 16a298, ff0e2804) + 4c ff1e53a4 _lwp_start (0, 0, 0, 0, 0, 0) ----------------- lwp# 2 / thread# 2 -------------------- ff3dc734 lwp_park (0, 0, 0) ff3d3c74 s9_lwp_park (0, 0, 0, 1, b64a0d58, 136818) + 28 ff3dc698 s9_handler (0, 0, 0, 1, b64a0d58, 136818) + 90 ff1dea70 _sema_wait (0, feee66a0, fec6b054, feee6000, 2a298478, d1f20) + 1d4 ff1dec30 sema_wait (8ab00, ff1dec24, 722a5b4b, 1101c, feed4f48, 134d60) + c feed4f48 sem_wait (8ab00, 0, fec6b1ac, 0, 0, 1) + 20 ff050890 PyThread_acquire_lock (8ab00, 1, fec6b214, 2, 0, 1ae610) + 5c ff05524c lock_PyThread_acquire_lock (0, 22030, 0, 13ee40, 156168, 55160) + 50 fefa779c PyCFunction_Call (1ae620, 22030, 0, ff0d8eb8, 55160, ff0551fc) + e4 ff016b14 PyEval_EvalFrameEx (18fe60, 0, 0, d4f66, 156168, 22030) + 5ee8 ff0185d0 PyEval_EvalCodeEx (12c968, 0, 18fe60, 4, 1, 18fe64) + 924 ff0168f8 PyEval_EvalFrameEx (18fce8, 0, 1, 1765c0, 156168, 1b11b0) + 5ccc ff0185d0 PyEval_EvalCodeEx (13f608, 0, 18fce8, 4, 1, 18fcec) + 924 ff0168f8 PyEval_EvalFrameEx (18fb88, 0, 1, 136155, 156168, 1a2930) + 5ccc ff0185d0 PyEval_EvalCodeEx (48b60, 18fb8c, 18fb88, 19d41c, 1, 2203c) + 924 fef8e11c function_call (22038, 19d410, 1b3c00, 2203c, 130370, 22030) + 168 fef604e8 PyObject_Call (130370, 19d410, 1b3c00, ff0e0340, fef8dfb4, 19d400) + 60 ff0137dc PyEval_EvalFrameEx (18fa20, 0, 19d410, 10e62d, 156168, 134950) + 2bb0 ff017478 PyEval_EvalFrameEx (18f890, 0, 18fa24, 1769fa, 156168, 156168) + 684c ff017478 PyEval_EvalFrameEx (18f728, 0, 18f894, 12a2c0, 156168, 156168) + 684c ff0185d0 PyEval_EvalCodeEx (13f410, 18f72c, 18f728, 19d3fc, 1, 0) + 924 fef8e040 function_call (1b26f0, 19d3f0, 0, ff1bc000, 1b26f0, 0) + 8c fef604e8 PyObject_Call (1b26f0, 19d3f0, 0, ff0e0340, fef8dfb4, 19d3e0) + 60 fef6e530 instancemethod_call (0, 19d3f0, 0, 0, 1b26f0, 1b1250) + a4 fef604e8 PyObject_Call (1aeaf8, 22030, 0, ff0e0340, fef6e48c, 0) + 60 ff01051c PyEval_CallObjectWithKeywords (1aeaf8, 22030, 0, 0, 0, 0) + 68 ff05568c t_bootstrap (63c30, 0, 0, 0, 156168, ff0e2804) + 4c ff1e53a4 _lwp_start (0, 0, 0, 0, 0, 0) The problem does not occur on Solaris 10. ---------- nosy: +automatthias _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 14:21:11 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 30 Jul 2013 12:21:11 +0000 Subject: [issue8713] multiprocessing needs option to eschew fork() under Linux In-Reply-To: <1273853591.12.0.245920632829.issue8713@psf.upfronthosting.co.za> Message-ID: <1375186871.18.0.0148511313686.issue8713@psf.upfronthosting.co.za> Richard Oudkerk added the comment: The spawn branch is in decent shape, although the documentation is not up-to-date. I would like to commit before the first alpha. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 14:43:37 2013 From: report at bugs.python.org (Brett Cannon) Date: Tue, 30 Jul 2013 12:43:37 +0000 Subject: [issue18598] Importlib, more verbosity please In-Reply-To: <1375180244.43.0.821767780261.issue18598@psf.upfronthosting.co.za> Message-ID: <1375188217.85.0.0948511275141.issue18598@psf.upfronthosting.co.za> Brett Cannon added the comment: It could be changed to something like "the 'package' argument is required to perform a relative import for {!r}".format(name) . Would that have made it more clear? ---------- assignee: -> brett.cannon nosy: +brett.cannon priority: normal -> low stage: -> needs patch versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 14:45:14 2013 From: report at bugs.python.org (=?utf-8?b?THVrw6HFoSBOxJttZWM=?=) Date: Tue, 30 Jul 2013 12:45:14 +0000 Subject: [issue18598] Importlib, more verbosity please In-Reply-To: <1375180244.43.0.821767780261.issue18598@psf.upfronthosting.co.za> Message-ID: <1375188314.64.0.178500226559.issue18598@psf.upfronthosting.co.za> Luk?? N?mec added the comment: Yes, absolutely, that is what was I needed to debug it easily, the name parameter Thank you :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 14:46:17 2013 From: report at bugs.python.org (=?utf-8?b?THVrw6HFoSBOxJttZWM=?=) Date: Tue, 30 Jul 2013 12:46:17 +0000 Subject: [issue18598] Importlib, more verbosity please In-Reply-To: <1375180244.43.0.821767780261.issue18598@psf.upfronthosting.co.za> Message-ID: <1375188377.87.0.380812669032.issue18598@psf.upfronthosting.co.za> Luk?? N?mec added the comment: Also, please do not forget on backports for python 2.6+ :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 14:48:43 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Jul 2013 12:48: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: <1375188523.45.0.347221290755.issue18594@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Are there any cases where the counter class with the C accelerator is faster than the pure Python version? Here is a benchmarking script (modification of Roy Smith's script [1]) and looks as the pure Python version is faster even for data that has not many unique entries. [1] http://permalink.gmane.org/gmane.comp.python.general/738820 ---------- Added file: http://bugs.python.org/file31085/counterbench.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 14:53:03 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 30 Jul 2013 12:53:03 +0000 Subject: [issue18594] C accelerator for collections.Counter is slow In-Reply-To: <1375166960.42.0.521563124847.issue18594@psf.upfronthosting.co.za> Message-ID: <1375188783.43.0.375164796293.issue18594@psf.upfronthosting.co.za> Eli Bendersky added the comment: That sounds like a good idea, Stefan. ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 15:05:12 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 30 Jul 2013 13:05:12 +0000 Subject: [issue18599] _sha1module report "SHA" as its name Message-ID: <1375189512.2.0.0677739604762.issue18599@psf.upfronthosting.co.za> New submission from Christian Heimes: I found the issue while I was working on unit tests. It looks like a honest mistake ... :) PyUnicode_FromStringAndSize("SHA1", 3); ---------- files: sha1name.patch keywords: patch messages: 193930 nosy: christian.heimes, gregory.p.smith, pitrou priority: normal severity: normal stage: needs patch status: open title: _sha1module report "SHA" as its name type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file31086/sha1name.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 15:13:08 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Jul 2013 13:13:08 +0000 Subject: [issue18593] Typo in Lib/multiprocessing/heap.py In-Reply-To: <1375159469.25.0.714853217909.issue18593@psf.upfronthosting.co.za> Message-ID: <3c4J9J07FYz7LkS@mail.python.org> Roundup Robot added the comment: New changeset 634d6307730d by Eli Bendersky in branch '3.3': Issue #18593: fix typo in comment http://hg.python.org/cpython/rev/634d6307730d New changeset b805bace07c5 by Eli Bendersky in branch 'default': Issue #18593: fix typo in comment http://hg.python.org/cpython/rev/b805bace07c5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 15:13:44 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 30 Jul 2013 13:13:44 +0000 Subject: [issue18593] Typo in Lib/multiprocessing/heap.py In-Reply-To: <1375159469.25.0.714853217909.issue18593@psf.upfronthosting.co.za> Message-ID: <1375190024.54.0.57598655691.issue18593@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 15:15:29 2013 From: report at bugs.python.org (Tim Golden) Date: Tue, 30 Jul 2013 13:15:29 +0000 Subject: [issue9035] os.path.ismount on windows doesn't support windows mount points In-Reply-To: <1277023751.91.0.438330382261.issue9035@psf.upfronthosting.co.za> Message-ID: <1375190129.6.0.893819178614.issue9035@psf.upfronthosting.co.za> Tim Golden added the comment: I put a bit of work in on this this morning, following Mark's suggestion (msg138197) since that's the "canonical" approach. Unfortunately, it completely fails to work for the most common case: the root folder of a drive! The documentation for FindFirstFile explicitly precludes that possibility. It looks as though GetVolumePathName is the way to go. I thought I'd previously found some instance where that failed but, ad hoc, I can't make it fail now. I'll try to rework Atsuo's patch against the current posixmodule.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 15:30:30 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Jul 2013 13:30:30 +0000 Subject: [issue18596] enable usage of AddressSanitizer in CPython [PATCH] In-Reply-To: <1375174359.28.0.546907495292.issue18596@psf.upfronthosting.co.za> Message-ID: <1375191030.07.0.640419092674.issue18596@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +christian.heimes, haypo stage: -> patch review type: crash -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 15:34:00 2013 From: report at bugs.python.org (Brett Cannon) Date: Tue, 30 Jul 2013 13:34:00 +0000 Subject: [issue18598] Importlib, more verbosity please In-Reply-To: <1375180244.43.0.821767780261.issue18598@psf.upfronthosting.co.za> Message-ID: <1375191240.09.0.430334442862.issue18598@psf.upfronthosting.co.za> Brett Cannon added the comment: Sorry, I can't backport this change as it's not a bugfix but an enhancement and it could break someone's code who relies on the specific format of the exception message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 15:36:20 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Jul 2013 13:36:20 +0000 Subject: [issue18599] _sha1module report "SHA" as its name In-Reply-To: <1375189512.2.0.0677739604762.issue18599@psf.upfronthosting.co.za> Message-ID: <3c4Jh40JL4z7Ll9@mail.python.org> Roundup Robot added the comment: New changeset c34c018a8390 by Christian Heimes in branch '3.3': Issue #18599: Fix name attribute of _sha1.sha1() object. It now returns http://hg.python.org/cpython/rev/c34c018a8390 New changeset 5fbf23e947d8 by Christian Heimes in branch 'default': Issue #18599: Fix name attribute of _sha1.sha1() object. It now returns http://hg.python.org/cpython/rev/5fbf23e947d8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 15:46:40 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 30 Jul 2013 13:46:40 +0000 Subject: [issue18599] _sha1module report "SHA" as its name In-Reply-To: <1375189512.2.0.0677739604762.issue18599@psf.upfronthosting.co.za> Message-ID: <1375192000.29.0.993449094354.issue18599@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 Jul 30 16:19:37 2013 From: report at bugs.python.org (halfie) Date: Tue, 30 Jul 2013 14:19:37 +0000 Subject: [issue18596] enable usage of AddressSanitizer in CPython [PATCH] In-Reply-To: <1375174359.28.0.546907495292.issue18596@psf.upfronthosting.co.za> Message-ID: <1375193977.07.0.218268434398.issue18596@psf.upfronthosting.co.za> halfie added the comment: This patch should only be applied if we are sure that the allocator is fine and doing such things by design. ---------- type: enhancement -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 16:31:38 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 30 Jul 2013 14:31:38 +0000 Subject: [issue18596] enable usage of AddressSanitizer in CPython [PATCH] In-Reply-To: <1375174359.28.0.546907495292.issue18596@psf.upfronthosting.co.za> Message-ID: <1375194698.07.0.498311555131.issue18596@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- type: crash -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 17:17:58 2013 From: report at bugs.python.org (Drekin) Date: Tue, 30 Jul 2013 15:17:58 +0000 Subject: [issue18597] On Windows sys.stdin.readline() doesn't handle Ctrl-C properly In-Reply-To: <1375175592.24.0.539816782076.issue18597@psf.upfronthosting.co.za> Message-ID: <1375197478.24.0.495307525325.issue18597@psf.upfronthosting.co.za> Drekin added the comment: I haven't experience with Python C code but I tried to find some clues in the code. First for input(): it call PyOS_Readline which may call PyOS_StdioReadline > my_fgets > fgets in Parser/myreadline.c. There is Windows related comment on line 56: ?Ctrl-C anywhere on the line or Ctrl-Z if the only character on a line will set ERROR_OPERATION_ABORTED. Under normal circumstances Ctrl-C will also have caused the SIGINT handler to fire which will have set the event object returned by _PyOS_SigintEvent. This signal fires in another thread and is not guaranteed to have occurred before this point in the code. Therefore: check whether the event is set with a small timeout. If it is, assume this is a Ctrl-C and reset the event. If it isn't set assume that this is a Ctrl-Z on its own and drop through to check for EOF.? For sys.stdin.readline and .read: it goes down the IO machinery from text IO, buffered IO and raw IO (in this case FileIO) to Modules/_io/fileio.c where it ends calling function read(fd, buf, len), probably from . I don't know how read is implemented on Windows. I also tried calling ReadConsoleW from winapi via ctypes to read Unicode charactes from console (see http://bugs.python.org/issue1602). And there was similar issue with Ctrl-C occurring. What seems to work here is to put time.sleep(0.01) after ReadConsoleW. So the general pattern is following: when calling some low-level Windows function to read input from user and when he hits Ctrl-C, the function returns and SIGINT is generated. However it takes time for this signal to arrive. Because it may arrive anywhere in the following code, the strange behaviour may occur. In the input() case, when PyOS_Readline returns, it was probably enough time, so added PyErr_CheckSignals() catched that SIGINT/KeyboardInterrupt. We can find out about Ctrl-C having been pressed by calling winapi function GetLastError() and testing against ERROR_OPERATION_ABORTED. Then we should wait for the signal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 17:19:20 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 30 Jul 2013 15:19:20 +0000 Subject: [issue18600] email.policy doc example passes 'policy' to as_string, but that doesn't work Message-ID: <1375197560.98.0.336881142306.issue18600@psf.upfronthosting.co.za> New submission from R. David Murray: When I wrote those docs I intended to add a policy argument to as_string, but did not do it by the time 3.3 was released. The docs for 3.3 need to be corrected, and I need to decide if I do want to add that keyword to as_string in 3.4 (the answer is probably yes, but I may check with the email-sig first). ---------- assignee: docs at python components: Documentation, email messages: 193937 nosy: barry, docs at python, r.david.murray priority: normal severity: normal stage: needs patch status: open title: email.policy doc example passes 'policy' to as_string, but that doesn't work type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 17:28:59 2013 From: report at bugs.python.org (Tim Golden) Date: Tue, 30 Jul 2013 15:28:59 +0000 Subject: [issue18597] On Windows sys.stdin.readline() doesn't handle Ctrl-C properly In-Reply-To: <1375197478.24.0.495307525325.issue18597@psf.upfronthosting.co.za> Message-ID: <51F7DB82.10705@timgolden.me.uk> Tim Golden added the comment: Thanks for doing the investigation. Yes, that comment was added by me as part of the fix for issue1677. I'll try to have a look at the codepath you describe to see if we can add a similar workaround. The Ctrl-C / SIGINT handling on Windows is less than ideal, I admit. There was a similar problem in issue18040 which I closed as "won't fix" since the fix was arguably too intrusive for the extremely unlikely problem it was fixing. It might be worth seeing if the same root cause applies, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 18:14:47 2013 From: report at bugs.python.org (Tim Golden) Date: Tue, 30 Jul 2013 16:14:47 +0000 Subject: [issue9035] os.path.ismount on windows doesn't support windows mount points In-Reply-To: <1277023751.91.0.438330382261.issue9035@psf.upfronthosting.co.za> Message-ID: <1375200887.04.0.667684175287.issue9035@psf.upfronthosting.co.za> Tim Golden added the comment: issue9035.2.patch is an updated version of Atsuo's patch. Known issues: * I haven't reworked it for the new memory-management API * There's no test for a non-root mount point (which is really the basis for this issue). It's difficult to see how to do that in a robust way on an arbitrary machine without quite a bit of support machinery. I've done ad hoc tests which succeed. ---------- Added file: http://bugs.python.org/file31087/issue9035.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 18:49:06 2013 From: report at bugs.python.org (Derek Wilson) Date: Tue, 30 Jul 2013 16:49:06 +0000 Subject: [issue18369] X509 cert class for ssl module In-Reply-To: <1373055037.38.0.259814019718.issue18369@psf.upfronthosting.co.za> Message-ID: <1375202946.66.0.584216309171.issue18369@psf.upfronthosting.co.za> Derek Wilson added the comment: actually, i suppose rather than change a bunch of existing functions/methods to handle X509 certs it would make more sense to add new methods to the X509 cert class (like match_hostname) so that old stuff doesn't break. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 19:59:58 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Jul 2013 17:59:58 +0000 Subject: [issue18570] OverflowError in division: wrong message In-Reply-To: <1374924685.41.0.945479313268.issue18570@psf.upfronthosting.co.za> Message-ID: <1375207198.17.0.521464362493.issue18570@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I would prefer one type too, if it can be done gracefully enough. I had thought of a set-mode function (method), but anticipate objection to such modal action-at-distance behavior. A context manager, which I had not thought of, somewhat alleviates that objection, though not entirely. If code written in try-except manner is imported and run under the context manager, it might or might not work. My toy example would, in that the final array might contain Nans rather than Nones, which would be all right since the user would anticipate that, having asked for that. But if the imported code used exceptions to switch algorithms, switching from exceptions to inf/nan might not work so well. Consistently replacing 'return inf/nan' and 'raise FPException' (where appropriate) with "if flag: return inf/nam; else: raise FPException" seems not too difficult ;-). But yes, a PEP rather than more piecemeal changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 20:01:04 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Jul 2013 18:01:04 +0000 Subject: [issue18112] PEP 442 implementation In-Reply-To: <1371320764.63.0.0772595125462.issue18112@psf.upfronthosting.co.za> Message-ID: <3c4QYW5TKPz7LjX@mail.python.org> Roundup Robot added the comment: New changeset 3f994367a979 by Antoine Pitrou in branch 'default': Issue #18112: PEP 442 implementation (safe object finalization). http://hg.python.org/cpython/rev/3f994367a979 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 20:04:11 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Jul 2013 18:04:11 +0000 Subject: [issue18112] PEP 442 implementation In-Reply-To: <1371320764.63.0.0772595125462.issue18112@psf.upfronthosting.co.za> Message-ID: <1375207451.28.0.198666780674.issue18112@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed with a couple further doc changes! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 20:18:11 2013 From: report at bugs.python.org (Ben North) Date: Tue, 30 Jul 2013 18:18:11 +0000 Subject: [issue18533] Avoid error from repr() of recursive dictview In-Reply-To: <1374531750.42.0.70756948567.issue18533@psf.upfronthosting.co.za> Message-ID: <1375208291.13.0.263928127234.issue18533@psf.upfronthosting.co.za> Ben North added the comment: I'll attach fresh patches, one against latest 2.7 and one against latest 3.3 (unchanged apart from headers from previous patch). Both branches pass ./python -m test.regrtest -R20:30 test_dictviews ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 20:18:37 2013 From: report at bugs.python.org (Ben North) Date: Tue, 30 Jul 2013 18:18:37 +0000 Subject: [issue18533] Avoid error from repr() of recursive dictview In-Reply-To: <1374531750.42.0.70756948567.issue18533@psf.upfronthosting.co.za> Message-ID: <1375208317.54.0.333515019441.issue18533@psf.upfronthosting.co.za> Changes by Ben North : Added file: http://bugs.python.org/file31088/against-6e1dd1ce95b8-2.7-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 20:18:51 2013 From: report at bugs.python.org (Ben North) Date: Tue, 30 Jul 2013 18:18:51 +0000 Subject: [issue18533] Avoid error from repr() of recursive dictview In-Reply-To: <1374531750.42.0.70756948567.issue18533@psf.upfronthosting.co.za> Message-ID: <1375208331.61.0.628814463415.issue18533@psf.upfronthosting.co.za> Changes by Ben North : Added file: http://bugs.python.org/file31089/against-9bf89c909bd4-3.3-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 20:26:14 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Jul 2013 18:26:14 +0000 Subject: [issue18214] Stop purging modules which are garbage collected before shutdown In-Reply-To: <1371221979.53.0.00385452158182.issue18214@psf.upfronthosting.co.za> Message-ID: <1375208774.49.0.531631461056.issue18214@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Now that PEP 442 is committed, here is the patch. ---------- Added file: http://bugs.python.org/file31090/module_cleanup.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 20:30:34 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Jul 2013 18:30:34 +0000 Subject: [issue18214] Stop purging modules which are garbage collected before shutdown In-Reply-To: <1371221979.53.0.00385452158182.issue18214@psf.upfronthosting.co.za> Message-ID: <1375209034.59.0.886557487708.issue18214@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- components: +Interpreter Core nosy: +amaury.forgeotdarc, gregory.p.smith stage: -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 20:34:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Jul 2013 18:34:23 +0000 Subject: [issue812369] module shutdown procedure based on GC Message-ID: <1375209263.56.0.793251175891.issue812369@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Superceded by patch in issue 18214. ---------- resolution: -> duplicate status: open -> closed superseder: -> module shutdown procedure based on GC _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 20:43:26 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Jul 2013 18:43:26 +0000 Subject: [issue18584] examples in email.policy doc are fu'd In-Reply-To: <1375079228.82.0.247789886969.issue18584@psf.upfronthosting.co.za> Message-ID: <3c4RVP3sn6zQGr@mail.python.org> Roundup Robot added the comment: New changeset 7b86be4e822c by R David Murray in branch '3.3': #18584: s/testcleanup/testsetup/ until we switch to Sphinx 1.1. http://hg.python.org/cpython/rev/7b86be4e822c New changeset 1901a04a3b4a by R David Murray in branch 'default': Merge #18584: s/testcleanup/testsetup/ until we switch to Sphinx 1.1. http://hg.python.org/cpython/rev/1901a04a3b4a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 21:07:26 2013 From: report at bugs.python.org (Stephen Paul Chappell) Date: Tue, 30 Jul 2013 19:07:26 +0000 Subject: [issue18601] Example "command-line interface to difflib" has typographical error Message-ID: <1375211246.29.0.527231910426.issue18601@psf.upfronthosting.co.za> New submission from Stephen Paul Chappell: The example at the bottom is good but has a line with a bad variable it is name. It says: with open(fromlines) as fromf, open(tofile) as tof: fromlines, tolines = list(fromf), list(tof) In the first line, fromlines does no even exist yet. should say: with open(fromlines) as fromf, open(tofile) as tof: from, tolines = list(fromf), list(tof) ---------- assignee: docs at python components: Demos and Tools, Documentation messages: 193948 nosy: Zero, docs at python priority: normal severity: normal status: open title: Example "command-line interface to difflib" has typographical error versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 21:38:02 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Jul 2013 19:38:02 +0000 Subject: [issue18601] Example "command-line interface to difflib" has typographical error In-Reply-To: <1375211246.29.0.527231910426.issue18601@psf.upfronthosting.co.za> Message-ID: <3c4SjP1nT1zR8P@mail.python.org> Roundup Robot added the comment: New changeset 0e1f0faacb0d by R David Murray in branch '3.3': #18601: fix error made when difflib example was converted to use 'with'. http://hg.python.org/cpython/rev/0e1f0faacb0d New changeset c4f377d710da by R David Murray in branch 'default': Merge: #18601: fix error made when difflib example was converted to use 'with'. http://hg.python.org/cpython/rev/c4f377d710da ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 21:39:28 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 30 Jul 2013 19:39:28 +0000 Subject: [issue18601] Example "command-line interface to difflib" has typographical error In-Reply-To: <1375211246.29.0.527231910426.issue18601@psf.upfronthosting.co.za> Message-ID: <1375213168.83.0.872948406302.issue18601@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the report. Actually that first 'fromlines' should be 'fromfile'. Looks like someone made a typo when converting the example to use the 'with' statement. ---------- nosy: +r.david.murray resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 21:53:45 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Jul 2013 19:53:45 +0000 Subject: [issue16273] f.tell() returning negative number on Windows build In-Reply-To: <1350526122.97.0.103530434711.issue16273@psf.upfronthosting.co.za> Message-ID: <3c4T3X3bkFz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 81bc2d64c006 by R David Murray in branch '3.3': #16273: Fix tutorial discussion of seek/tell (opaque text-mode values). http://hg.python.org/cpython/rev/81bc2d64c006 New changeset c7d9a2159c6c by R David Murray in branch 'default': Merge: #16273: Fix tutorial discussion of seek/tell (opaque text-mode values). http://hg.python.org/cpython/rev/c7d9a2159c6c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 21:56:03 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 30 Jul 2013 19:56:03 +0000 Subject: [issue16273] f.tell() returning negative number on Windows build In-Reply-To: <1350526122.97.0.103530434711.issue16273@psf.upfronthosting.co.za> Message-ID: <1375214163.5.0.769237688862.issue16273@psf.upfronthosting.co.za> R. David Murray added the comment: Committed the doc patch. Thanks Sijin. ---------- nosy: +r.david.murray stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 21:57:47 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Jul 2013 19:57:47 +0000 Subject: [issue18602] "_io" module names itself "io" Message-ID: <1375214267.87.0.837503153982.issue18602@psf.upfronthosting.co.za> New submission from Antoine Pitrou: In Modules/_io/_iomodule.c, the name field of the module struct is initialized to "io" rather than "_io". The change should intuitively be harmless, but perhaps there's a reason why it is like that? ---------- components: Library (Lib) messages: 193953 nosy: pitrou priority: low severity: normal status: open title: "_io" module names itself "io" type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 21:57:56 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Jul 2013 19:57:56 +0000 Subject: [issue18602] "_io" module names itself "io" In-Reply-To: <1375214267.87.0.837503153982.issue18602@psf.upfronthosting.co.za> Message-ID: <1375214276.51.0.37353878084.issue18602@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +amaury.forgeotdarc, benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 22:29:30 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 30 Jul 2013 20:29:30 +0000 Subject: [issue16355] inspect.getcomments() does not work in the interactive shell In-Reply-To: <1351511930.82.0.59071323276.issue16355@psf.upfronthosting.co.za> Message-ID: <1375216170.71.0.110907964546.issue16355@psf.upfronthosting.co.za> R. David Murray added the comment: The patch looks good, but I would prefer that the test not use mock+knowledge of how get_comment is implemented, but instead test the public API by actually creating a module and deleting the source file. test.script_helpers can be used to do this easily. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 23:33:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Jul 2013 21:33:43 +0000 Subject: [issue15494] Move test/support.py into a test.support subpackage In-Reply-To: <1343612231.54.0.0439576601623.issue15494@psf.upfronthosting.co.za> Message-ID: <3c4WGt2GXnz7Lk1@mail.python.org> Roundup Robot added the comment: New changeset e6f2f3eda290 by Ned Deily in branch '3.3': Issue #15494: Install new test/support directory. http://hg.python.org/cpython/rev/e6f2f3eda290 New changeset 4df2e094f83e by Ned Deily in branch 'default': Issue #15494: merge from 3.3 http://hg.python.org/cpython/rev/4df2e094f83e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 23:36:27 2013 From: report at bugs.python.org (paul j3) Date: Tue, 30 Jul 2013 21:36:27 +0000 Subject: [issue9253] argparse: optional subparsers In-Reply-To: <1279056589.03.0.566167994161.issue9253@psf.upfronthosting.co.za> Message-ID: <1375220187.96.0.244131784282.issue9253@psf.upfronthosting.co.za> paul j3 added the comment: "msg113512 - (view) Author: Steven Bethard (bethard) Seems like there's minimally the bug that argparse should currently throw an error if you add an argument after subparsers (since that argument will never be parsed under the current semantics)." This isn't quite right. If the main usage signature is: usage: PROG [-h] foo {one,two} ... baz the parser._match_arguments_partial() method will allocate the 1st string to 'foo', the last to 'baz', and pass the rest to the subparser(s). It doesn't know how many the subparsers can use, but it knows that 'baz' requires one. From the standpoint of matching argument strings and arguments, a subparser is essentially a '+' positional. On the other hand if 'baz' (the positional after the subparser) was '*' or '?' it would not get any strings. If it is possible that subparser(s) doesn't need all the strings passed to it, the user could use 'parse_known_args', and deal with the unparsed strings themselves (possibly with another parser). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 23:36:30 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Jul 2013 21:36:30 +0000 Subject: [issue18214] Stop purging modules which are garbage collected before shutdown In-Reply-To: <1371221979.53.0.00385452158182.issue18214@psf.upfronthosting.co.za> Message-ID: <1375220190.46.0.816502177229.issue18214@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Slightly better patch. Also, as I pointed out in python-dev (http://mail.python.org/pipermail/python-dev/2013-July/127673.html), this is still imperfect due to various ways modules can be kept alive from long-lived C variables. ---------- Added file: http://bugs.python.org/file31091/module_cleanup2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 23:36:49 2013 From: report at bugs.python.org (Tim Golden) Date: Tue, 30 Jul 2013 21:36:49 +0000 Subject: [issue9035] os.path.ismount on windows doesn't support windows mount points In-Reply-To: <1375200887.04.0.667684175287.issue9035@psf.upfronthosting.co.za> Message-ID: <51F831EB.1070304@timgolden.me.uk> Tim Golden added the comment: issue9035.3.patch has switched to the new memory management API and has tweaked the tests slightly for robustness. This approach does introduce a behavioural change: the root of a SUBSTed drive (essentially a symlink into the Dos namespace) will raise an OSError because GetVolumePathName returns error 87: invalid parameter. So os.path.ismount("F:\\") will fail where F: is the result of running, eg, "SUBST F: C:\temp". I think the simplest thing is to special-case drive roots (which are always mount points) and then to apply the new GetVolumePathName logic. ---------- Added file: http://bugs.python.org/file31092/issue9035.3.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff --git a/Lib/ntpath.py b/Lib/ntpath.py --- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -336,15 +336,26 @@ return True # Is a path a mount point? Either a root (with or without drive letter) -# or an UNC path with at most a / or \ after the mount point. +# or an UNC path with at most a / or \ after the mount point or a mounted +# drive. The canonical approach which detects the IO_REPARSE_TAG_MOUNT_POINT +# fails for drive roots. -def ismount(path): - """Test whether a path is a mount point (defined as root of drive)""" - seps = _get_bothseps(path) - root, rest = splitdrive(path) - if root and root[0] in seps: - return (not rest) or (rest in seps) - return rest in seps +try: + from nt import _getvolumepathname + def ismount(path): + # + # GetVolumePathName will return the directory itself + # if it is a mount point (including a drive root). + # + return abspath(path).rstrip(sep) == abspath(_getvolumepathname(path)).rstrip(sep) +except ImportError: + def ismount(path): + """Test whether a path is a mount point (defined as root of drive)""" + seps = _get_bothseps(path) + root, rest = splitdrive(path) + if root and root[0] in seps: + return (not rest) or (rest in seps) + return rest in seps # Expand paths beginning with '~' or '~user'. diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py --- a/Lib/test/test_ntpath.py +++ b/Lib/test/test_ntpath.py @@ -256,6 +256,29 @@ # dialogs (#4804) ntpath.sameopenfile(-1, -1) + def test_ismount(self): + self.assertTrue(ntpath.ismount("c:\\")) + self.assertTrue(ntpath.ismount("C:\\")) + self.assertTrue(ntpath.ismount("c:/")) + self.assertTrue(ntpath.ismount("C:/")) + self.assertTrue(ntpath.ismount("\\\\.\\c:\\")) + self.assertTrue(ntpath.ismount("\\\\.\\C:\\")) + + with support.temp_dir() as d: + self.assertFalse(ntpath.ismount(d)) + + # + # Make sure the current folder isn't the root folder + # (or any other volume root). The drive-relative + # locations below cannot then refer to mount points + # + drive, path = ntpath.splitdrive(sys.executable) + with support.change_cwd(os.path.dirname(sys.executable)): + self.assertFalse(ntpath.ismount(drive.lower())) + self.assertFalse(ntpath.ismount(drive.upper())) + + self.assertTrue(ntpath.ismount("\\\\localhost\\c$")) + self.assertTrue(ntpath.ismount("\\\\localhost\\c$\\")) class NtCommonTest(test_genericpath.CommonTest, unittest.TestCase): pathmodule = ntpath diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -3711,6 +3711,47 @@ else Py_RETURN_FALSE; } + +PyDoc_STRVAR(posix__getvolumepathname__doc__, +"Return volume mount point of the specified path."); + +/* A helper function for ismount on windows */ +static PyObject * +posix__getvolumepathname(PyObject *self, PyObject *args) +{ + PyObject *po, *result; + wchar_t *path, *mountpath=NULL; + size_t bufsize; + BOOL ret; + + if (!PyArg_ParseTuple(args, "U|:_getvolumepathname", &po)) + return NULL; + path = PyUnicode_AsUnicode(po); + if (path == NULL) + return NULL; + + /* Volume path should be shorter than entire path */ + bufsize = max(MAX_PATH, wcslen(path) * 2 * sizeof(wchar_t)+1); + mountpath = (wchar_t *)PyMem_Malloc(bufsize); + if (mountpath == NULL) + return PyErr_NoMemory(); + + Py_BEGIN_ALLOW_THREADS + ret = GetVolumePathNameW(path, mountpath, bufsize); + Py_END_ALLOW_THREADS + + if (!ret) { + result = win32_error_object("_getvolumepathname", po); + goto exit; + } + result = PyUnicode_FromWideChar(mountpath, wcslen(mountpath)); + +exit: + PyMem_Free(mountpath); + return result; +} +/* end of posix__getvolumepathname */ + #endif /* MS_WINDOWS */ PyDoc_STRVAR(posix_mkdir__doc__, @@ -10884,6 +10925,7 @@ {"_getfinalpathname", posix__getfinalpathname, METH_VARARGS, NULL}, {"_isdir", posix__isdir, METH_VARARGS, posix__isdir__doc__}, {"_getdiskusage", win32__getdiskusage, METH_VARARGS, win32__getdiskusage__doc__}, + {"_getvolumepathname", posix__getvolumepathname, METH_VARARGS, posix__getvolumepathname__doc__}, #endif #ifdef HAVE_GETLOADAVG {"getloadavg", posix_getloadavg, METH_NOARGS, posix_getloadavg__doc__}, From report at bugs.python.org Tue Jul 30 23:43:53 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 30 Jul 2013 21:43:53 +0000 Subject: [issue18519] test_sqlite crashes on OS X tiger 3.x buildbot In-Reply-To: <1374400670.71.0.678852160853.issue18519@psf.upfronthosting.co.za> Message-ID: <1375220633.58.0.603609070885.issue18519@psf.upfronthosting.co.za> Ned Deily added the comment: The changes for this issue appear to have changed the behavior of test_sqlite. Prior to 5643e873f06e on OS X 10.4 Tiger with the system libsqlite (3.1.3), all test cases of test_sqlite pass. As of current tip on the same platform, there are now two failures in test_sqlite: $ ./python -m test -v test_sqlite == CPython 3.4.0a0 (default:c7d9a2159c6c, Jul 30 2013, 14:20:52) [GCC 4.0.1 (Apple Computer, Inc. build 5370)] == Darwin-8.11.0-Power_Macintosh-powerpc-32bit big-endian == /Volumes/cache/py/main4/3x/unix/source/build/test_python_4328 Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1) [1/1] test_sqlite test_sqlite: testing with version '2.6.0', sqlite_version '3.1.3' [...] ====================================================================== FAIL: CheckAggrExceptionInFinalize (sqlite3.test.userfunctions.AggregateTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Volumes/cache/py/main4/3x/unix/source/Lib/sqlite3/test/userfunctions.py", line 336, in CheckAggrExceptionInFinalize self.fail("should have raised an OperationalError") AssertionError: should have raised an OperationalError ====================================================================== FAIL: CheckAggrNoFinalize (sqlite3.test.userfunctions.AggregateTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Volumes/cache/py/main4/3x/unix/source/Lib/sqlite3/test/userfunctions.py", line 309, in CheckAggrNoFinalize self.fail("should have raised an OperationalError") AssertionError: should have raised an OperationalError ---------------------------------------------------------------------- Ran 232 tests in 2.988s FAILED (failures=2, skipped=1) test test_sqlite failed ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 23:49:12 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 30 Jul 2013 21:49:12 +0000 Subject: [issue18580] distutils compilers are unicode strings on OS X since Python 2.7.4 In-Reply-To: <1375021105.23.0.849162523275.issue18580@psf.upfronthosting.co.za> Message-ID: <1375220952.12.0.277305994381.issue18580@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the analysis. I'm consolidating this issue with Issue18071. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 23:49:20 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 30 Jul 2013 21:49:20 +0000 Subject: [issue18580] distutils compilers are unicode strings on OS X since Python 2.7.4 In-Reply-To: <1375021105.23.0.849162523275.issue18580@psf.upfronthosting.co.za> Message-ID: <1375220960.28.0.46714170272.issue18580@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- Removed message: http://bugs.python.org/msg193830 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 00:03:42 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Jul 2013 22:03:42 +0000 Subject: [issue18214] Stop purging modules which are garbage collected before shutdown In-Reply-To: <1371221979.53.0.00385452158182.issue18214@psf.upfronthosting.co.za> Message-ID: <1375221822.37.0.261739084356.issue18214@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Added file: http://bugs.python.org/file31093/module_cleanup3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 00:26:52 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 30 Jul 2013 22:26:52 +0000 Subject: [issue18519] test_sqlite crashes on OS X tiger 3.x buildbot In-Reply-To: <1374400670.71.0.678852160853.issue18519@psf.upfronthosting.co.za> Message-ID: <1375223212.72.0.375687056408.issue18519@psf.upfronthosting.co.za> R. David Murray added the comment: Heh, that's the kind of behavior change I was worried about :(. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 00:55:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Jul 2013 22:55:30 +0000 Subject: [issue18481] lcov report In-Reply-To: <1374072036.39.0.598411326766.issue18481@psf.upfronthosting.co.za> Message-ID: <3c4Y5F3TXczSmb@mail.python.org> Roundup Robot added the comment: New changeset 85ec2b5bfcd2 by Christian Heimes in branch 'default': Issue #18481: Add C coverage reporting with gcov and lcov. A new make target http://hg.python.org/cpython/rev/85ec2b5bfcd2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 01:17:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Jul 2013 23:17:13 +0000 Subject: [issue18481] lcov report In-Reply-To: <1374072036.39.0.598411326766.issue18481@psf.upfronthosting.co.za> Message-ID: <3c4YZK1ltFz7LjS@mail.python.org> Roundup Robot added the comment: New changeset 116b05b98bea by Christian Heimes in branch 'default': Issue #18481: document new C coverage make targets http://hg.python.org/devguide/rev/116b05b98bea ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 01:19:56 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 30 Jul 2013 23:19:56 +0000 Subject: [issue18481] lcov report In-Reply-To: <1374072036.39.0.598411326766.issue18481@psf.upfronthosting.co.za> Message-ID: <1375226396.79.0.0887692286936.issue18481@psf.upfronthosting.co.za> Christian Heimes added the comment: I have add two new make targets and documented the new stuff in our devguide. I'm going to run and upload the report every now and then. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 01:58:45 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 30 Jul 2013 23:58:45 +0000 Subject: [issue18603] PyOS_mystricmp unused and no longer available Message-ID: <1375228725.23.0.641374823001.issue18603@psf.upfronthosting.co.za> New submission from Christian Heimes: The two functions PyOS_strnicmp() and PyOS_stricmp() from Python/pystrcmp.c are no longer used by any function in the core. Because no module references any object from Python/pystrcmp.c the object file is not included in the Python binary: $ nm -P python | grep ^PyOS | sort PyOS_AfterFork T 000000000044040e 0000000000000036 PyOS_double_to_string T 00000000005da3de 0000000000000119 PyOS_FiniInterrupts T 0000000000440380 000000000000000b PyOS_getsig T 0000000000423994 0000000000000041 PyOS_InitInterrupts T 00000000004402f5 000000000000008b PyOS_InputHook B 000000000095d478 0000000000000008 PyOS_InterruptOccurred T 000000000044038b 000000000000003e PyOS_ReadlineFunctionPointer B 000000000095d5c8 0000000000000008 PyOS_Readline T 000000000063ffb5 000000000000012e PyOS_setsig T 00000000004239d5 0000000000000078 PyOS_snprintf T 000000000041c7bc 00000000000000b8 PyOS_StdioReadline T 000000000063fe1c 0000000000000199 PyOS_string_to_double T 00000000005d9b50 0000000000000146 PyOS_strtol T 00000000005d3ded 00000000000000d6 PyOS_strtoul T 00000000005d3a00 00000000000003ed PyOS_vsnprintf T 000000000041c874 00000000000000c4 Neither Python 2.7 nor 3.3+ include the functions in their binaries. 2.6 and 3.2 are not affected. The functions are part of the documented and stable API but apparently they are not used very often. ---------- keywords: 3.3regression messages: 193965 nosy: christian.heimes priority: normal severity: normal status: open title: PyOS_mystricmp unused and no longer available type: compile error versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 02:13:35 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 31 Jul 2013 00:13:35 +0000 Subject: [issue18604] Consolidate gui available checks in test.support Message-ID: <1375229615.82.0.560303267268.issue18604@psf.upfronthosting.co.za> New submission from Terry J. Reedy: Current situation: test.support.requires starts with if resource == 'gui' and not _is_gui_available(): On windows, _is_gui_available() uses ctypes to determine that there really is a graphics screen. On other systems, it just returns True, even when it should return False. The _is_gui_available check is repeated with each requires('gui') call even though all after the first would be redundant if False were somehow recorded. I think it should be. test/test_ttkguionly first tries to import _tkinter, as does test_idle, which initializes tcl/tk. It then calls tkinter.test.support.check_tk_availability. That either does a 'darwin'-ctypes check similar to the one for Windows in _is_gui_available (again to avoid a crash), or it tries to create a tk widget and looks for a TclError. Given that tcl has already been initialized successfully, the widget creation check is a gui-available check for non-Darwin systems. A global in tkinter.test.support records the result of the check so it is only run once. If 'gui' is in use_resources, test_idle just does the widget check for *nix gui availability. It records a negative result by removing 'gui' from use_resources. The tkinter system does not work for Idle because Idle tests use unittest test discovery instead of tkinter's custom test discovery. Given that, splitting test_idle into test_idle_text and test_idle_gui seems to not be possible. Anyway, if test_idle were to be split, categories like '_windows', '_dialogs', and '_extensions' would be much more sensible and useful. ---------------- For this issue, I propose: 1. Move the custom darwin gui check to test.support, after the custom windows gui check. It should be noted that a) Both of these are gui-framework independent; and b) Neither seems to be needed for any current buildbots (which makes it hard to verify that they work on current systems). However, they were needed in the past and might be again in the future, so each should be checked *once* in each regrtest run with 'gui' set. 2. If the crash-avoidance checks pass, run tkinter.Tk() as a final check on all systems (but especially those not covered by the first checks). But note in comments that this will have to change if tk is augmented or optionally replaced by another gui framework. 3. In requires(), run the above if 'gui' is set and requested, and record a negative result by unsetting 'gui' (removing it from use_resources). Perhaps output a note that this has been done. Subsequent gui requests will skip. I considered putting this logic in regrtest instead, but see 4. 4. Currently, requires never skips when the caller is the main module. Perhaps requires('gui') should skip even then when there is no gui system. This could happen if a no-gui system ran a console script with "python -m test.text_xxx". 5. Remove the current gui check from test_idle. Idle tests should continue to work as they are. 6. Revising test_tk and test_ttk_guionly to use the revised test.support would be a larger patch. It might best be done while modernizing the tkinter test system to use unittest discovery and .main, in another issue. I am still learning the details of the tkinter test system. ----- To avoid immediate controversy, I marked this as an 'enhancement' for 3.4. But if the Mac 'darwin' check were currently needed, I would consider it a bug that it is buried in a tkinter function whose API is not right for Idle, instead of being in test.support. (And in 2.7, the function is buried in a module in a package with an illegal name.) So I think backporting should be considered. ---------- messages: 193966 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: Consolidate gui available checks in test.support type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 02:14:48 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 31 Jul 2013 00:14:48 +0000 Subject: [issue18441] Idle: Make test.support.requires('gui') skip when it should. In-Reply-To: <1373754847.55.0.0641648695763.issue18441@psf.upfronthosting.co.za> Message-ID: <1375229688.58.0.754146081327.issue18441@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is working, so closing. I opened #18604 for consolidating gui checks in test.support. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 02:48:17 2013 From: report at bugs.python.org (=?utf-8?q?Marek_Marczykowski-G=C3=B3recki?=) Date: Wed, 31 Jul 2013 00:48:17 +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: <1375231697.87.0.20181930222.issue16472@psf.upfronthosting.co.za> Marek Marczykowski-G?recki added the comment: I can confirm that when a module is linked against msvcr90, it crashes with "invalid access to memory". When removed that library from the linker options (that is - no explicit msvcr, in any version) - module worked perfectly. Note that comment on http://hg.python.org/cpython/file/6e1dd1ce95b8/Lib/distutils/cygwinccompiler.py#l333 (Minge32CComiler class) already says "no additional libraries needed", but 3 lines later it sets dll_libraries to msvcr90 (via get_msvcr). So just removing lines 336:338 works great. Patch attached. Any chances to get this fixed in the next python 2.7.x release? My system is Windows 7 64bit, Python 2.7.5 64bit (from official msi installer) ---------- keywords: +patch nosy: +marmarek Added file: http://bugs.python.org/file31094/python-distutils-mingw32.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 03:22:37 2013 From: report at bugs.python.org (py.user) Date: Wed, 31 Jul 2013 01:22:37 +0000 Subject: [issue18573] In unittest.TestCase.assertWarns doc there is some text about assertRaises() In-Reply-To: <1374949202.48.0.718203936991.issue18573@psf.upfronthosting.co.za> Message-ID: <1375233757.49.0.730056275794.issue18573@psf.upfronthosting.co.za> py.user added the comment: What about the second line? It doesn't catch any exception utest.py #!/usr/bin/env python3 import unittest class Test(unittest.TestCase): def test_warning(self): import warnings with self.assertWarns(RuntimeWarning) as cm: raise ValueError('f') warnings.warn('f', RuntimeWarning) print(repr(cm.warning)) [guest at localhost py]$ python3 -m unittest utest E ====================================================================== ERROR: test_warning (utest.Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "./utest.py", line 11, in test_warning raise ValueError('f') ValueError: f ---------------------------------------------------------------------- Ran 1 test in 0.000s FAILED (errors=1) [guest at localhost py]$ with commented raise [guest at localhost py]$ python3 -m unittest utest RuntimeWarning('f',) . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK [guest at localhost py]$ in the patch I copied terms from the first sentence of the paragraph ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 03:27:40 2013 From: report at bugs.python.org (paul j3) Date: Wed, 31 Jul 2013 01:27:40 +0000 Subject: [issue11955] 3.3 : test_argparse.py fails 'make test' In-Reply-To: <1304093741.94.0.09129303291.issue11955@psf.upfronthosting.co.za> Message-ID: <1375234060.82.0.962690056488.issue11955@psf.upfronthosting.co.za> paul j3 added the comment: The test names are: FAIL: test_failures_many_groups_listargs (__main__.TestFileTypeW) FAIL: test_failures_many_groups_sysargs (__main__.TestFileTypeW) FAIL: test_failures_no_groups_listargs (__main__.TestFileTypeW) FAIL: test_failures_no_groups_sysargs (__main__.TestFileTypeW) FAIL: test_failures_one_group_listargs (__main__.TestFileTypeW) FAIL: test_failures_one_group_sysargs (__main__.TestFileTypeW) So they differ by [many_groups, no_groups, one_group] and [listargs, sysargs] There are about 170 tests in test_argparse that get multiplied by 6 in this way. If this replication was removed it would cut the number of tests and time to nearly a third. This replication is not useful. listargs and sysargs differ only in how a list of arguments is passed to parse_args, either directly, or via sys.argv. It should be sufficient to test these alternatives once, not 170 times. 'one group' creates an argument group, and adds all arguments to that. 'many groups' creates an argument group for each added argument. But argument groups are not used for 'parse_args'. They are only used when formatting help. By default all the arguments of parser are already put into one of two groups, 'optional arguments' or 'positional arguments'. There are tests for the help formatting, but they don't use this ParserTesterMetaclass. I would recommend removing this test replication. It is both unnecessary and a source of confusion. The simplest would be to change the end of the ParserTesterMetaclass. class ParserTesterMetaclass def __init__() .... for add_arguments in [no_groups]: for parse_args in [listargs]: AddTests(cls, add_arguments, parse_args) I suspect there is some confusion among users and developers as to what argument groups do. As for the TestFileTypeW error, I suspect it has to do with file writing privileges. I haven't encountered it, but I running tests in my own directory. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 04:30:35 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 31 Jul 2013 02:30:35 +0000 Subject: [issue18573] In unittest.TestCase.assertWarns doc there is some text about assertRaises() In-Reply-To: <1374949202.48.0.718203936991.issue18573@psf.upfronthosting.co.za> Message-ID: <1375237835.98.0.6954836576.issue18573@psf.upfronthosting.co.za> Terry J. Reedy added the comment: > What about the second line? What second line? > It doesn't catch any exception It? I do not understand your point. Your example works as documented, including "any unexpected exception is an error". Actually, that should be 'any exception' as none is expected. Also, "additional checks on the exception raised:" should be 'warning caught' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 04:31:47 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Jul 2013 02:31:47 +0000 Subject: [issue18573] In unittest.TestCase.assertWarns doc there is some text about assertRaises() In-Reply-To: <1374949202.48.0.718203936991.issue18573@psf.upfronthosting.co.za> Message-ID: <3c4dtq0FcwzSyG@mail.python.org> Roundup Robot added the comment: New changeset 366beee880aa by Terry Jan Reedy in branch '3.3': Issue #18573: More copy-paste fixes to assertWarns entry. http://hg.python.org/cpython/rev/366beee880aa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 07:24:10 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 31 Jul 2013 05:24:10 +0000 Subject: [issue18596] enable usage of AddressSanitizer in CPython [PATCH] In-Reply-To: <1375174359.28.0.546907495292.issue18596@psf.upfronthosting.co.za> Message-ID: <1375248250.45.0.973738691019.issue18596@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: The warning is due to the Py_ADDRESS_IN_RANGE() macro: it's a know limitation, we have the same problem with valgrind. This would be a nice neature. It would IMO be even nicer to have an ASAN-enabled buildbot. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 08:00:59 2013 From: report at bugs.python.org (halfie) Date: Wed, 31 Jul 2013 06:00:59 +0000 Subject: [issue18596] enable usage of AddressSanitizer in CPython [PATCH] In-Reply-To: <1375174359.28.0.546907495292.issue18596@psf.upfronthosting.co.za> Message-ID: <1375250459.82.0.320903406565.issue18596@psf.upfronthosting.co.za> halfie added the comment: Using, # define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS __attribute__((no_address_safety_analysis)) __attribute__ ((noinline)) instead of, # define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS __attribute__((no_address_safety_analysis)) seems to be a more future-proof (against inlining) solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 08:11:41 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 31 Jul 2013 06:11:41 +0000 Subject: [issue18585] Add a text truncation function In-Reply-To: <1375102150.65.0.445691594018.issue18585@psf.upfronthosting.co.za> Message-ID: <1375251101.38.0.533334977762.issue18585@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Monsieur Pitrou, thanks for the explanation. Actually, IMHO I prefer, 'hello (...)' should be the minimum words we can use not '(...)' because '(...)' does not make any sense. But, anyway, it's your call. :) Anyway, using your summarize2.patch: >>> textwrap.summarize('hello world!', width=6) '(...)' >>> textwrap.summarize('hello world!', width=5) Traceback (most recent call last): File "", line 1, in File "/home/ethan/Documents/code/python/cpython/Lib/textwrap.py", line 378, in summarize return w.summarize(text, placeholder=placeholder) File "/home/ethan/Documents/code/python/cpython/Lib/textwrap.py", line 314, in summarize raise ValueError("placeholder too large for max width") ValueError: placeholder too large for max width Why? '(...)' is 5 characters only. I checked the patch and found out that the placeholder is ' (...)' (with space) and you compare the width with the placeholder. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 08:44:39 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Jul 2013 06:44:39 +0000 Subject: [issue18214] Stop purging modules which are garbage collected before shutdown In-Reply-To: <1371221979.53.0.00385452158182.issue18214@psf.upfronthosting.co.za> Message-ID: <1375253079.18.0.0984868611792.issue18214@psf.upfronthosting.co.za> Antoine Pitrou added the comment: See issue10068 and issue7140. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 08:51:30 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 31 Jul 2013 06:51:30 +0000 Subject: [issue17933] format str bug in urllib request.py In-Reply-To: <1367974224.67.0.224732033427.issue17933@psf.upfronthosting.co.za> Message-ID: <1375253490.18.0.586417078249.issue17933@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 09:01:01 2013 From: report at bugs.python.org (py.user) Date: Wed, 31 Jul 2013 07:01:01 +0000 Subject: [issue18573] In unittest.TestCase.assertWarns doc there is some text about assertRaises() In-Reply-To: <1374949202.48.0.718203936991.issue18573@psf.upfronthosting.co.za> Message-ID: <1375254061.29.0.123016353814.issue18573@psf.upfronthosting.co.za> py.user added the comment: > What second line? the second line patched in the diff file ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 09:03:02 2013 From: report at bugs.python.org (=?utf-8?q?Maciej_Blizi=C5=84ski?=) Date: Wed, 31 Jul 2013 07:03:02 +0000 Subject: [issue18605] 2.7: test_threading hangs on Solaris 9 Message-ID: <1375254182.2.0.923446047018.issue18605@psf.upfronthosting.co.za> New submission from Maciej Blizi?ski: Python version: 2.7.5 OS: Solaris 9 Architecture: sparc Looks similar to Issue5114 and Issue6643 but both are now closed. It seems specific to Solaris 9, I'm not seeing this issue on Solaris 10. The symptom is that test_threading hangs indefinitely (tested overnight) . When running pstack on the process, I'm seeing this: ----------------- lwp# 1 / thread# 1 -------------------- ff3dc734 lwp_park (0, 0, 0) ff3d3c74 s9_lwp_park (0, 0, 0, 1, feed4f48, 18f5a4) + 28 ff3dc698 s9_handler (0, 0, 0, 1, feed4f48, 18f5a4) + 90 ff1dea70 _sema_wait (0, feee66a0, fed6b054, feee6000, 2a298478, d1f20) + 1d4 ff1dec30 sema_wait (81aa8, ff1dec24, 722a5b4b, 1101c, feed4f48, 134d60) + c feed4f48 sem_wait (81aa8, 0, fed6b1ac, 0, 0, 1) + 20 ff050890 PyThread_acquire_lock (81aa8, 1, fed6b214, 2, 0, 1ae778) + 5c ff05524c lock_PyThread_acquire_lock (0, 22030, 0, 13ee40, 16a298, 55150) + 50 fefa779c PyCFunction_Call (1ae788, 22030, 0, ff0d8eb8, 55150, ff0551fc) + e4 ff016b14 PyEval_EvalFrameEx (18f5a0, 0, 0, d4f66, 16a298, 22030) + 5ee8 ff0185d0 PyEval_EvalCodeEx (12c968, 0, 18f5a0, 4, 1, 18f5a4) + 924 ff0168f8 PyEval_EvalFrameEx (1902b8, 0, 1, 1765c0, 16a298, 1b12d0) + 5ccc ff0185d0 PyEval_EvalCodeEx (13f608, 0, 1902b8, 4, 1, 1902bc) + 924 ff0168f8 PyEval_EvalFrameEx (154748, 0, 1, 31f7f, 16a298, 1b1250) + 5ccc ff0185d0 PyEval_EvalCodeEx (10d650, 54a50, 154748, 2203c, 0, 2203c) + 924 fef8e11c function_call (22038, 22030, 1386f0, 2203c, 130730, 22030) + 168 fef604e8 PyObject_Call (130730, 22030, 1386f0, ff0e0340, fef8dfb4, 0) + 60 ff0137dc PyEval_EvalFrameEx (169110, 0, 22030, 10e62d, 16a298, 22030) + 2bb0 ff017478 PyEval_EvalFrameEx (168f80, 0, 169114, 1769fa, 16a298, 16a298) + 684c ff017478 PyEval_EvalFrameEx (176cb0, 0, 168f84, 12a2c0, 16a298, 16a298) + 684c ff0185d0 PyEval_EvalCodeEx (13f410, 176cb4, 176cb0, 13433c, 1, 0) + 924 fef8e040 function_call (1b26f0, 134330, 0, ff1bc000, 1b26f0, 0) + 8c fef604e8 PyObject_Call (1b26f0, 134330, 0, ff0e0340, fef8dfb4, 134320) + 60 fef6e530 instancemethod_call (0, 134330, 0, 0, 1b26f0, 134bd0) + a4 fef604e8 PyObject_Call (c3b48, 22030, 0, ff0e0340, fef6e48c, 0) + 60 ff01051c PyEval_CallObjectWithKeywords (c3b48, 22030, 0, 0, 0, 0) + 68 ff05568c t_bootstrap (63bd0, 0, 0, 0, 16a298, ff0e2804) + 4c ff1e53a4 _lwp_start (0, 0, 0, 0, 0, 0) ----------------- lwp# 2 / thread# 2 -------------------- ff3dc734 lwp_park (0, 0, 0) ff3d3c74 s9_lwp_park (0, 0, 0, 1, b64a0d58, 136818) + 28 ff3dc698 s9_handler (0, 0, 0, 1, b64a0d58, 136818) + 90 ff1dea70 _sema_wait (0, feee66a0, fec6b054, feee6000, 2a298478, d1f20) + 1d4 ff1dec30 sema_wait (8ab00, ff1dec24, 722a5b4b, 1101c, feed4f48, 134d60) + c feed4f48 sem_wait (8ab00, 0, fec6b1ac, 0, 0, 1) + 20 ff050890 PyThread_acquire_lock (8ab00, 1, fec6b214, 2, 0, 1ae610) + 5c ff05524c lock_PyThread_acquire_lock (0, 22030, 0, 13ee40, 156168, 55160) + 50 fefa779c PyCFunction_Call (1ae620, 22030, 0, ff0d8eb8, 55160, ff0551fc) + e4 ff016b14 PyEval_EvalFrameEx (18fe60, 0, 0, d4f66, 156168, 22030) + 5ee8 ff0185d0 PyEval_EvalCodeEx (12c968, 0, 18fe60, 4, 1, 18fe64) + 924 ff0168f8 PyEval_EvalFrameEx (18fce8, 0, 1, 1765c0, 156168, 1b11b0) + 5ccc ff0185d0 PyEval_EvalCodeEx (13f608, 0, 18fce8, 4, 1, 18fcec) + 924 ff0168f8 PyEval_EvalFrameEx (18fb88, 0, 1, 136155, 156168, 1a2930) + 5ccc ff0185d0 PyEval_EvalCodeEx (48b60, 18fb8c, 18fb88, 19d41c, 1, 2203c) + 924 fef8e11c function_call (22038, 19d410, 1b3c00, 2203c, 130370, 22030) + 168 fef604e8 PyObject_Call (130370, 19d410, 1b3c00, ff0e0340, fef8dfb4, 19d400) + 60 ff0137dc PyEval_EvalFrameEx (18fa20, 0, 19d410, 10e62d, 156168, 134950) + 2bb0 ff017478 PyEval_EvalFrameEx (18f890, 0, 18fa24, 1769fa, 156168, 156168) + 684c ff017478 PyEval_EvalFrameEx (18f728, 0, 18f894, 12a2c0, 156168, 156168) + 684c ff0185d0 PyEval_EvalCodeEx (13f410, 18f72c, 18f728, 19d3fc, 1, 0) + 924 fef8e040 function_call (1b26f0, 19d3f0, 0, ff1bc000, 1b26f0, 0) + 8c fef604e8 PyObject_Call (1b26f0, 19d3f0, 0, ff0e0340, fef8dfb4, 19d3e0) + 60 fef6e530 instancemethod_call (0, 19d3f0, 0, 0, 1b26f0, 1b1250) + a4 fef604e8 PyObject_Call (1aeaf8, 22030, 0, ff0e0340, fef6e48c, 0) + 60 ff01051c PyEval_CallObjectWithKeywords (1aeaf8, 22030, 0, 0, 0, 0) + 68 ff05568c t_bootstrap (63c30, 0, 0, 0, 156168, ff0e2804) + 4c ff1e53a4 _lwp_start (0, 0, 0, 0, 0, 0) ---------- components: Tests messages: 193978 nosy: automatthias priority: normal severity: normal status: open title: 2.7: test_threading hangs on Solaris 9 type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 09:07:00 2013 From: report at bugs.python.org (Larry Hastings) Date: Wed, 31 Jul 2013 07:07:00 +0000 Subject: [issue17998] internal error in regular expression engine In-Reply-To: <1368803354.84.0.768428094886.issue17998@psf.upfronthosting.co.za> Message-ID: <1375254420.37.0.205870204025.issue17998@psf.upfronthosting.co.za> Larry Hastings added the comment: There is now a need to rush. I'm hoping to cut the release in about two days, so we can have Python 3.4a1 on time. Can we resolve this in the next day or two? Sorry for the short notice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 09:08:07 2013 From: report at bugs.python.org (Larry Hastings) Date: Wed, 31 Jul 2013 07:08:07 +0000 Subject: [issue18257] Two copies of python-config In-Reply-To: <1371567872.42.0.116049773773.issue18257@psf.upfronthosting.co.za> Message-ID: <1375254487.76.0.057846860191.issue18257@psf.upfronthosting.co.za> Larry Hastings added the comment: Is there any resolution for this likely to happen soon? I'm hoping to cut Python 3.4a1 in about two days, so one of three things is gonna happen: 1) This gets fixed. 2) This gets lowered from "release blocker". 3) The release slips. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 09:14:13 2013 From: report at bugs.python.org (Larry Hastings) Date: Wed, 31 Jul 2013 07:14:13 +0000 Subject: [issue5845] rlcompleter should be enabled automatically In-Reply-To: <1240702039.68.0.55843541961.issue5845@psf.upfronthosting.co.za> Message-ID: <1375254853.62.0.149911365749.issue5845@psf.upfronthosting.co.za> Larry Hastings added the comment: This issue seems to have stalled. But it's still marked as a release blocker, which means I can't release Python 3.4a1 in two days if this issue is still open. One of three things will happen: 1) This issue is marked "closed". 2) This issue is downgraded from "release blocker". 3) The alpha slips. IMO the optimal solution is that tab preceded by only whitespace indents, and tab preceded by any non-whitespace character attempts to complete. Can we goad readline into behaving this way? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 09:15:07 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Jul 2013 07:15:07 +0000 Subject: [issue18071] _osx_support compiler_fixup In-Reply-To: <1369663641.63.0.31152522756.issue18071@psf.upfronthosting.co.za> Message-ID: <3c4m9l1NdFz7Lkm@mail.python.org> Roundup Robot added the comment: New changeset addd9210816b by Ned Deily in branch '2.7': Issue #18071: Extension module builds on OS X could fail with TypeError http://hg.python.org/cpython/rev/addd9210816b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 09:15:08 2013 From: report at bugs.python.org (Larry Hastings) Date: Wed, 31 Jul 2013 07:15:08 +0000 Subject: [issue16245] Update html.entities.html5 dictionary and parseentities.py In-Reply-To: <1350380511.49.0.860998010837.issue16245@psf.upfronthosting.co.za> Message-ID: <1375254908.35.0.918261598796.issue16245@psf.upfronthosting.co.za> Larry Hastings added the comment: This is still marked as a release blocker. I guess this is a "tickler" for Ezio to go check and see if there's a new entities file. Ezio: can you get this issue closed or downgraded in the next two days? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 09:16:54 2013 From: report at bugs.python.org (Larry Hastings) Date: Wed, 31 Jul 2013 07:16:54 +0000 Subject: [issue13463] Fix parsing of package_data In-Reply-To: <1322068433.36.0.783240091616.issue13463@psf.upfronthosting.co.za> Message-ID: <1375255014.29.0.143286024282.issue13463@psf.upfronthosting.co.za> Larry Hastings added the comment: What's the status of this? I want to release Python 3.4a1 in two days, and this issue is still marked as a "release blocker". Given the age of this issue I doubt anything is going to happen in the next two days. Unless I hear a great wailing and gnashing of teeth I'm going to downgrade this to "high" as Eric suggests. ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 09:29:33 2013 From: report at bugs.python.org (Ned Deily) Date: Wed, 31 Jul 2013 07:29:33 +0000 Subject: [issue18071] Extension module builds fail on OS X with TypeError if Xcode command line tools not installed In-Reply-To: <1369663641.63.0.31152522756.issue18071@psf.upfronthosting.co.za> Message-ID: <1375255773.04.0.255594783549.issue18071@psf.upfronthosting.co.za> Ned Deily added the comment: Alexey's analysis is correct. The problem is seen when the Xcode command line tools are not installed. When building an extension module, Distutils is then unable to find a compiler at the normal path and consults the 'xcrun' utility to find the location of an uninstalled compiler. The output from the 'xcrun' is mistakenly converted to Unicode and this triggers the odd behavior in customize_compiler. The fix, applied for release in 2.7.6, is to avoid the Unicode conversion for Python 2. ---------- components: +Distutils nosy: +tarek resolution: -> fixed stage: -> committed/rejected status: open -> closed title: _osx_support compiler_fixup -> Extension module builds fail on OS X with TypeError if Xcode command line tools not installed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 10:04:14 2013 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 31 Jul 2013 08:04:14 +0000 Subject: [issue5845] rlcompleter should be enabled automatically In-Reply-To: <1375254853.62.0.149911365749.issue5845@psf.upfronthosting.co.za> Message-ID: <51F8C4F5.6020506@pearwood.info> Steven D'Aprano added the comment: On 31/07/13 17:14, Larry Hastings wrote: > IMO the optimal solution is that tab preceded by only whitespace indents, and tab preceded by any non-whitespace character attempts to complete. Can we goad readline into behaving this way? Yes we can. Attached are a pair of lightweight modules I've used for this for the last 3-4 years, and it works fine in Python 2.4 through 3.3. I put something like this in my startup.py: import completer import history history = history.History() completer = completer.Completer( bindings=(r'"\C-xo": overwrite-mode', r'"\C-xd": dump-functions', )) Originally they were in a single class, but I was persuaded that it was cleaner to separate them. ---------- Added file: http://bugs.python.org/file31095/completer.py Added file: http://bugs.python.org/file31096/history.py _______________________________________ Python tracker _______________________________________ -------------- next part -------------- """Command line completion. This module relies on both the ``readline`` and ``rlcompleter`` modules. Under Windows, you may be able to use the third-party ``pyreadline`` module (untested). Creating a ``Completer`` instance enables readline completion: >>> completer = Completer() #doctest: +SKIP By default, the TAB key is used for both indenting and completion. See the ``Completer`` class for further instructions, including how to change this behaviour. """ # Keep this module compatible with Python 2.4 and better. # TODO: add "operate and go next" functionality like in bash. # TODO: add filename completion. try: # Everything depends on readline. import readline except ImportError: # May be Windows, so try using a substitute. import pyreadline as readline import rlcompleter def using_libedit(): """Return True if the underlying readline library is libedit.""" # This tests for the libedit library instead of libreadline, which # may indicate OS-X or *BSD - See http://bugs.python.org/issue10666 # # FIXME This is the canonical test as suggested by the docs, but # surely there is a better test than this? Perhaps something like # sys.platform == DARWIN? return 'libedit' in readline.__doc__ # Set up command line completion: class Completer(rlcompleter.Completer): """Readline tab completer with optional support for indenting. All arguments to the class constructor are optional. namespace:: None, or a namespace dict, to use for completions. See the ``rlcompleter`` module for more details. key:: Key to use for completion. ``key`` should be a key combination written in the appropriate syntax for your readline library. If ``key`` is not given or is None, the default TAB key will be used: * if you are using libreadline, 'tab' will be used; * if you are using libedit, '^I' will be used. Any other choice for ``key`` will be used exactly as given, and it is your responsibility to ensure it is in the correct format for the underlying readline library. indent:: String to insert for indents when the completer key is pressed at the start of the line. The default is to insert '\\t' (a literal tab). Another common choice is ' ' (four spaces). If you pass None or the empty string, pressing the completer key will *not* indent. query_items:: The maximum number of items that the completer will show without asking first. The default is 30. bindings:: A tuple of additional readline bindings to be parsed. As a convenience, if you have only one binding to use, you can pass it as a string rather than inside a tuple. See your operating system's readline documentation for syntax. """ def __init__(self, namespace=None, # Tab completion: key=None, indent='\t', query_items=30, # Extra bindings to be used: bindings=(), ): # This is a classic class in Python 2.x, so no super(). rlcompleter.Completer.__init__(self, namespace) self.key = key self.indent = indent self.query_items = query_items if isinstance(bindings, str): bindings = (bindings,) self.bindings = bindings self._enable() def completer(self, text, state): """Completer function with optional support for indenting. If self.indent is not empty or None, it will be used to indent at the start of lines. """ # At the start of a line, indent. if self.indent and (text == '' or text.isspace()): return [self.indent, None][state] return rlcompleter.Completer.complete(self, text, state) def set_completer(self): """Set the completer.""" # Remove the previous completer (possibly installed by rlcompleter). readline.set_completer(None) if using_libedit(): cmd = 'bind %s rl_complete' % (self.key or '^I') else: cmd = '%s: complete' % (self.key or 'tab') readline.parse_and_bind(cmd) readline.set_completer(self.completer) def _enable(self): """Enable tab completion.""" self.set_completer() readline.parse_and_bind( "set completion-query-items %d" % self.query_items) s = ('\x4e\x4f\x42\x4f\x44\x59\x20\x65\x78\x70\x65\x63\x74' '\x73\x20\x74\x68\x65\x20\x53\x70\x61\x6e\x69\x73\x68' '\x20\x49\x6e\x71\x75\x69\x73\x69\x74\x69\x6f\x6e\x21') readline.parse_and_bind(r'"\C-xi": "%s"' % s) for binding in self.bindings: readline.parse_and_bind(binding) -------------- next part -------------- """Enable and control command-line history. This module relies on the ``readline`` module. When ``readline`` is not available, e.g. under Windows, it may work using the third-party ``pyreadline`` module (untested). Any text file can be used as a history file, each line in the file is considered one history command. Creating a ``History`` instance enables command-line history, reads in any contents of the history file, and prepares to write history back to that file when Python exits. Calling ``History()`` with no arguments uses the default history file: >>> history = History() #doctest: +SKIP See the ``History`` class for details on the arguments accepted. You can display the last few commands by calling the instance: >>> history(4) #doctest: +SKIP 119: x = spam(23) + eggs(42) 120: do_this() 121: do_that() 122: do_something_else() You can read lines from a history file at any time. The ``read_history`` method keeps any existing lines in the current history buffer; the ``load_history`` method replaces the current buffer. You can write the current history buffer to a file at any time by calling the ``write_history`` method. The number of lines written is controlled by the readline ``set_history_length`` function. """ # Keep this module compatible with Python 2.4 and better. try: # Everything depends on readline. import readline except ImportError: # May be Windows, so try using a substitute. import pyreadline as readline import atexit import os class History(object): """Enable and control command-line history. Arguments: history_file:: Name of the history file to use. If not given, the attribute DEFAULT_HISTORY_FILE (defaults to '.python_history' in the user's home directory) is used. history_length:: The maximum number of lines which will be saved to the history file. If not given, the attribute DEFAULT_HISTORY_LENGTH (defaults to 500) is used. """ DEFAULT_HISTORY_FILE = '~/.python_history' DEFAULT_HISTORY_LENGTH = 500 MAX_LINES_TO_SHOW = 10 # Use < 0 for unlimited. def __init__(self, history_file=None, history_length=None): if history_file is None: history_file = self.DEFAULT_HISTORY_FILE history_file = os.path.expanduser(history_file) self.history_file = history_file if history_length is None: history_length = self.DEFAULT_HISTORY_LENGTH self.history_length = history_length self._enable() def _enable(self): filename = self.history_file self.read_history(filename) readline.set_history_length(self.history_length) # Save the history file when exiting. atexit.register(readline.write_history_file, filename) def read_history(self, filename=None): """Read history from the named file (if possible). If filename is None or not given, use the ``history_file`` instance attribute. History lines read are appended to the current history buffer. To replace the current buffer, use the ``load_history`` method. """ if filename is None: filename = self.history_file try: readline.read_history_file(os.path.expanduser(filename)) except (IOError, OSError): pass def load_history(self, filename=None): """Clear the current history buffer, then load history from the named file (if possible). If filename is None or not given, use the ``history_file`` instance attribute. To read history lines without overwriting the current buffer, use the ``read_history`` method. """ readline.clear_history() self.read_history(filename) def write_history(self, filename=None): """Write command line history to the named file without waiting for program exit. If ``filename`` is None or not given, use the ``history_file`` instance attribute. """ if filename is None: filename = self.history_file readline.write_history_file(os.path.expanduser(filename)) def get_history_lines(self, start=1, end=None): """Yield history lines between ``start`` and ``end`` inclusive. Unlike Python indexes, the readline history lines are numbered from 1. If not given, ``start`` defaults to 1, and ``end`` defaults to the current history length. """ get = readline.get_history_item if end is None: end = readline.get_current_history_length() return (get(i) for i in range(start, end+1)) def __call__(self, count=None, show_line_numbers=True): """Print the latest ``count`` lines from the history. If ``count`` is None or not given, a default number of lines is shown, given by the attribute MAX_LINES_TO_SHOW. Use a negative count to show unlimited lines. If ``show_line_numbers`` is true (the default), each history line is preceeded by the line number. """ if count is None: count = self.MAX_LINES_TO_SHOW end = readline.get_current_history_length() if count < 0: start = 1 else: start = max(end - count + 1, 1) nums = range(start, end+1) lines = self.get_history_lines(start, end) if show_line_numbers: # Can't use {} formatting as we have to support 2.4 and 2.5. template = "%(lineno)3d: %(line)s" else: template = "%(line)s" for i, line in zip(nums, lines): print(template % {'lineno':i, 'line':line}) From report at bugs.python.org Wed Jul 31 10:14:12 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 31 Jul 2013 08:14:12 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1375258452.78.0.0758877328526.issue10496@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Is there a hope to get this fixed? It can be needed to e.g. run python as nobody user (used for example for CGI scripts, etc). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 10:20:21 2013 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 31 Jul 2013 08:20:21 +0000 Subject: [issue18606] Add statistics module to standard library Message-ID: <1375258820.22.0.0684222529612.issue18606@psf.upfronthosting.co.za> New submission from Steven D'Aprano: I proposed adding a statistics module to the standard library some time ago, and received some encouragement: http://mail.python.org/pipermail/python-ideas/2011-September/011524.html Real life intervened, plus a bad case of over-engineering, but over the last few weeks I have culled my earlier (private) attempt down to manageable size. I would like to propose the attached module for the standard library. I also have a set of unit-tests for this module. At the moment it covers about 30-40% of the functions in the module, but I should be able to supply unit tests for the remaining functions over the next few days. ---------- components: Library (Lib) files: statistics.py messages: 193988 nosy: stevenjd priority: normal severity: normal status: open title: Add statistics module to standard library type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file31097/statistics.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 10:26:22 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 31 Jul 2013 08:26:22 +0000 Subject: [issue9035] os.path.ismount on windows doesn't support windows mount points In-Reply-To: <1277023751.91.0.438330382261.issue9035@psf.upfronthosting.co.za> Message-ID: <1375259182.33.0.104755498435.issue9035@psf.upfronthosting.co.za> Tim Golden added the comment: 4th and hopefully final patch. Added tests for byte paths. Reworked the ismount so it uses the original detection approach first (which is wholly lexical) and drops back to the volume path technique only if the path doesn't appear to be a drive or a share root. This should minimise backwards-incompatibility while still solving the original problem. ---------- Added file: http://bugs.python.org/file31098/issue9035.4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 10:26:33 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 31 Jul 2013 08:26:33 +0000 Subject: [issue9035] os.path.ismount on windows doesn't support windows mount points In-Reply-To: <1277023751.91.0.438330382261.issue9035@psf.upfronthosting.co.za> Message-ID: <1375259193.3.0.720439876822.issue9035@psf.upfronthosting.co.za> Changes by Tim Golden : Removed file: http://bugs.python.org/file31087/issue9035.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 10:26:39 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 31 Jul 2013 08:26:39 +0000 Subject: [issue9035] os.path.ismount on windows doesn't support windows mount points In-Reply-To: <1277023751.91.0.438330382261.issue9035@psf.upfronthosting.co.za> Message-ID: <1375259199.96.0.426485344332.issue9035@psf.upfronthosting.co.za> Changes by Tim Golden : Removed file: http://bugs.python.org/file31092/issue9035.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 11:10:35 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 31 Jul 2013 09:10:35 +0000 Subject: [issue18257] Two copies of python-config In-Reply-To: <1371567872.42.0.116049773773.issue18257@psf.upfronthosting.co.za> Message-ID: <1375261835.13.0.372344144688.issue18257@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I won't be able to work on this before 3.4a1 is released, and that shouldn't be a problem. I do think this should be fixed before the first beta though. (That said, I'd rather not work on this at all, I didn't introduce this problem) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 11:35:14 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Jul 2013 09:35:14 +0000 Subject: [issue18214] Stop purging modules which are garbage collected before shutdown In-Reply-To: <1371221979.53.0.00385452158182.issue18214@psf.upfronthosting.co.za> Message-ID: <1375263314.46.0.915822918596.issue18214@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Updated patch has tests and also removes several cleanup hacks. ---------- Added file: http://bugs.python.org/file31099/module_cleanup4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 11:36:01 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Jul 2013 09:36:01 +0000 Subject: [issue7140] imp.new_module does not function correctly if the module is returned from a function and used directly In-Reply-To: <1255605892.23.0.543488610886.issue7140@psf.upfronthosting.co.za> Message-ID: <1375263361.67.0.417550005861.issue7140@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Work in progress in issue 18214. ---------- nosy: +pitrou resolution: -> duplicate status: open -> closed superseder: -> Stop purging modules which are garbage collected before shutdown _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 12:18:27 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 31 Jul 2013 10:18:27 +0000 Subject: [issue18604] Consolidate gui available checks in test.support In-Reply-To: <1375229615.82.0.560303267268.issue18604@psf.upfronthosting.co.za> Message-ID: <1375265907.53.0.295799843299.issue18604@psf.upfronthosting.co.za> R. David Murray added the comment: I think it is fine to backport this, since it only affects tests, and allows the backported idle tests to be consistent. For 3/4, I agree that requires should skip always if the GUI infrastructure is not available. The "don't skip if main" logic is appropriate only for deciding whether or not to run the tests when the test suite is invoked directly (as opposed to through regrtest), not for deciding whether or not to run them when the actual resource is being checked. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 12:23:45 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Jul 2013 10:23:45 +0000 Subject: [issue18606] Add statistics module to standard library In-Reply-To: <1375258820.22.0.0684222529612.issue18606@psf.upfronthosting.co.za> Message-ID: <1375266225.61.0.177800626076.issue18606@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I suppose you should write a PEP for the module inclusion proposal (and for a summary of the API). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 14:18:39 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Jul 2013 12:18:39 +0000 Subject: [issue18605] 2.7: test_threading hangs on Solaris 9 In-Reply-To: <1375254182.2.0.923446047018.issue18605@psf.upfronthosting.co.za> Message-ID: <1375273118.99.0.554245354633.issue18605@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Please at least run test_threading in verbose mode, to know which test exactly hangs: ./python -m test -v test_threading Also, please try with the default branch too (which will become 3.4 when released). Instructions to check out the code: http://docs.python.org/devguide/#quick-start ---------- nosy: +pitrou versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 14:19:07 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Jul 2013 12:19:07 +0000 Subject: [issue18605] 2.7: test_threading hangs on Solaris 9 In-Reply-To: <1375254182.2.0.923446047018.issue18605@psf.upfronthosting.co.za> Message-ID: <1375273147.09.0.721176584067.issue18605@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Please at least run test_threading in verbose mode, to know which test > exactly hangs: ./python -m test -v test_threading Sorry, I meant: ./python -m test.regrtest -v test_threading ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 15:11:35 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 31 Jul 2013 13:11:35 +0000 Subject: [issue18606] Add statistics module to standard library In-Reply-To: <1375258820.22.0.0684222529612.issue18606@psf.upfronthosting.co.za> Message-ID: <1375276295.5.0.283646897246.issue18606@psf.upfronthosting.co.za> Ronald Oussoren added the comment: At first glance statistics.sum does the same as math.fsum (and statistics. add_partial seems to be a utility for implementing sum). I agree that a PEP would be useful. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 15:31:50 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Wed, 31 Jul 2013 13:31:50 +0000 Subject: [issue7674] select.select() corner cases: duplicate fds, out-of-range fds In-Reply-To: <1263192751.1.0.719382931138.issue7674@psf.upfronthosting.co.za> Message-ID: <1375277510.27.0.408005589557.issue7674@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 16:31:48 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 31 Jul 2013 14:31:48 +0000 Subject: [issue5302] Allow package_data specs/globs to match directories In-Reply-To: <1234909934.56.0.127417684931.issue5302@psf.upfronthosting.co.za> Message-ID: <1375281108.15.0.105617370423.issue5302@psf.upfronthosting.co.za> ?ric Araujo added the comment: packaging is not in the stdlib anymore, and the successors to distutils2 may or may not use package_data in setup.cfg. This is obsolete. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 16:32:08 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 31 Jul 2013 14:32:08 +0000 Subject: [issue13463] Fix parsing of package_data In-Reply-To: <1322068433.36.0.783240091616.issue13463@psf.upfronthosting.co.za> Message-ID: <1375281128.72.0.145558682735.issue13463@psf.upfronthosting.co.za> ?ric Araujo added the comment: packaging is not in the stdlib anymore, and the successors to distutils2 may or may not use package_data in setup.cfg. This is obsolete. ---------- resolution: -> wont fix stage: test needed -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 16:40:47 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 31 Jul 2013 14:40:47 +0000 Subject: [issue4708] os.pipe should return inheritable descriptors (Windows) In-Reply-To: <1229825725.05.0.791696937909.issue4708@psf.upfronthosting.co.za> Message-ID: <1375281647.34.0.314192493755.issue4708@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- assignee: tim.golden -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 17:09:34 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 31 Jul 2013 15:09:34 +0000 Subject: [issue3099] On windows, "import nul" always succeed In-Reply-To: <1213319928.58.0.193615390811.issue3099@psf.upfronthosting.co.za> Message-ID: <1375283374.61.0.555218608252.issue3099@psf.upfronthosting.co.za> Tim Golden added the comment: This one seems to have been fixed by the importlib rebuild. I haven't bothered to trace the code path, but certainly "import nul" returns the expected "ImportError: No module named 'nul'" in both Debug & Release builds. ---------- resolution: -> works for me stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 17:10:03 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 31 Jul 2013 15:10:03 +0000 Subject: [issue2889] curses for windows (alternative patch) In-Reply-To: <1210919907.42.0.842256015219.issue2889@psf.upfronthosting.co.za> Message-ID: <1375283403.48.0.783617759941.issue2889@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- assignee: tim.golden -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 17:11:10 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 31 Jul 2013 15:11:10 +0000 Subject: [issue16921] Docs of subprocess.CREATE_NEW_CONSOLE are wrong In-Reply-To: <1357839740.51.0.95267360969.issue16921@psf.upfronthosting.co.za> Message-ID: <1375283470.84.0.741969694411.issue16921@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 17:12:19 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 31 Jul 2013 15:12:19 +0000 Subject: [issue7443] test.support.unlink issue on Windows platform In-Reply-To: <1260026404.41.0.635406889881.issue7443@psf.upfronthosting.co.za> Message-ID: <1375283539.64.0.897927410257.issue7443@psf.upfronthosting.co.za> Tim Golden added the comment: This has been covered off by work done with the test.support package including context managers for temporary files / directories, and a waitfor mechanism which waits some time if a file can't be accessed. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 17:26:00 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 31 Jul 2013 15:26:00 +0000 Subject: [issue7443] test.support.unlink issue on Windows platform In-Reply-To: <1260026404.41.0.635406889881.issue7443@psf.upfronthosting.co.za> Message-ID: <1375284360.82.0.469591044121.issue7443@psf.upfronthosting.co.za> R. David Murray added the comment: The support package is fixed (I presume :), but there was also a desire expressed to expose this functionality in shutil, since it can arise in "normal" Python programs as well as in the test suite. Given that the fix has been successful in the test suite, shouldn't we open an issue to expose it in shutil? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 17:32:00 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Jul 2013 15:32:00 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1375284720.1.0.906212183527.issue10496@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 19:50:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Jul 2013 17:50:06 +0000 Subject: [issue17616] wave.Wave_read and wave.Wave_write can be context managers In-Reply-To: <1364894166.78.0.454807000252.issue17616@psf.upfronthosting.co.za> Message-ID: <3c52GP25TDzSPp@mail.python.org> Roundup Robot added the comment: New changeset 8327780d3841 by R David Murray in branch 'default': #17616: wave.open now supports the 'with' statement. http://hg.python.org/cpython/rev/8327780d3841 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 19:50:58 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 31 Jul 2013 17:50:58 +0000 Subject: [issue17616] wave.Wave_read and wave.Wave_write can be context managers In-Reply-To: <1364894166.78.0.454807000252.issue17616@psf.upfronthosting.co.za> Message-ID: <1375293058.36.0.928655831175.issue17616@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Claudiu. ---------- nosy: +r.david.murray resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 20:03:42 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 31 Jul 2013 18:03:42 +0000 Subject: [issue5845] rlcompleter should be enabled automatically In-Reply-To: <1240702039.68.0.55843541961.issue5845@psf.upfronthosting.co.za> Message-ID: <1375293822.01.0.582433175915.issue5845@psf.upfronthosting.co.za> Martin v. L?wis added the comment: If R. David agrees (assuming no patch is coming forward), it could be degrated to deferred-blocker, and the alpha phases could be used to see how annoyed people are with "tab not working". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 20:54:34 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 31 Jul 2013 18:54:34 +0000 Subject: [issue10878] asyncore does not react properly on close() In-Reply-To: <1294641638.26.0.753920382409.issue10878@psf.upfronthosting.co.za> Message-ID: <1375296874.98.0.749540433043.issue10878@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am re-closing as there is no defined bug to fix, and 2.7 is closed to enhancements. ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 21:03:36 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 31 Jul 2013 19:03:36 +0000 Subject: [issue17350] Use STAF call python script will case 1124861 issue in 2.7.2 version In-Reply-To: <1362402564.96.0.853290291647.issue17350@psf.upfronthosting.co.za> Message-ID: <1375297416.8.0.287535583764.issue17350@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In in absence of the information needed to consider this a current Python bug, I am closing it as either out-of-date (already fixed) or invalid (a third-party problem). ---------- resolution: -> out of date stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 21:24:21 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 31 Jul 2013 19:24:21 +0000 Subject: [issue18214] Stop purging modules which are garbage collected before shutdown In-Reply-To: <1371221979.53.0.00385452158182.issue18214@psf.upfronthosting.co.za> Message-ID: <1375298661.43.0.608115986369.issue18214@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 21:41:06 2013 From: report at bugs.python.org (Andres Adjimann) Date: Wed, 31 Jul 2013 19:41:06 +0000 Subject: [issue18607] struct.unpack Message-ID: <1375299666.6.0.0308363021993.issue18607@psf.upfronthosting.co.za> New submission from Andres Adjimann: There is something wrong with struct.unpack. import struct print struct.calcsize('BBBBBHB') 8 print struct.calcsize('BBBBBHB') 9 ---------- messages: 194009 nosy: Andres.Adjimann priority: normal severity: normal status: open title: struct.unpack type: behavior versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 21:42:20 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 31 Jul 2013 19:42:20 +0000 Subject: [issue5845] rlcompleter should be enabled automatically In-Reply-To: <1240702039.68.0.55843541961.issue5845@psf.upfronthosting.co.za> Message-ID: <1375299740.64.0.687208865835.issue5845@psf.upfronthosting.co.za> R. David Murray added the comment: Yeah, deferred blocker is fine with me. ---------- priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 21:43:59 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 31 Jul 2013 19:43:59 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1375299839.75.0.163737929763.issue10496@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 21:50:31 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Jul 2013 19:50:31 +0000 Subject: [issue15699] PEP 3121, 384 Refactoring applied to readline module In-Reply-To: <1345147381.91.0.560597639191.issue15699@psf.upfronthosting.co.za> Message-ID: <1375300231.31.0.0696570899531.issue15699@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Updated patch fixing a few issues (i.e. crashes). Reading the module state requires the GIL to be held, but it was taken too late when the hooks are called. ---------- keywords: +patch nosy: +pitrou Added file: http://bugs.python.org/file31100/rl_pep3131.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 21:54:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Jul 2013 19:54:25 +0000 Subject: [issue15699] PEP 3121, 384 Refactoring applied to readline module In-Reply-To: <1345147381.91.0.560597639191.issue15699@psf.upfronthosting.co.za> Message-ID: <3c551s2J6szQKf@mail.python.org> Roundup Robot added the comment: New changeset e4594c7dfeeb by Antoine Pitrou in branch 'default': Issue #15699: The readline module now uses PEP 3121-style module initialization, so as to reclaim allocated resources (Python callbacks) at shutdown. http://hg.python.org/cpython/rev/e4594c7dfeeb ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 21:54:50 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 31 Jul 2013 19:54:50 +0000 Subject: [issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory In-Reply-To: <1367608586.39.0.0815102318744.issue17899@psf.upfronthosting.co.za> Message-ID: <1375300490.62.0.69177683739.issue17899@psf.upfronthosting.co.za> Christian Heimes added the comment: ping... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 21:56:25 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Jul 2013 19:56:25 +0000 Subject: [issue15699] PEP 3121, 384 Refactoring applied to readline module In-Reply-To: <1345147381.91.0.560597639191.issue15699@psf.upfronthosting.co.za> Message-ID: <1375300585.57.0.253433752589.issue15699@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Now committed. Let's hope this doesn't break anything. ---------- resolution: -> fixed stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 22:17:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Jul 2013 20:17:28 +0000 Subject: [issue18214] Stop purging modules which are garbage collected before shutdown In-Reply-To: <1371221979.53.0.00385452158182.issue18214@psf.upfronthosting.co.za> Message-ID: <1375301848.31.0.478653217312.issue18214@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Updated patch with a hack in Lib/site to unpatch builtins early at shutdown. ---------- Added file: http://bugs.python.org/file31101/module_cleanup5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 22:29:32 2013 From: report at bugs.python.org (Tim Peters) Date: Wed, 31 Jul 2013 20:29:32 +0000 Subject: [issue18607] struct.unpack In-Reply-To: <1375299666.6.0.0308363021993.issue18607@psf.upfronthosting.co.za> Message-ID: <1375302572.95.0.160238909758.issue18607@psf.upfronthosting.co.za> Tim Peters added the comment: Looks fine to me. The third one uses native size and alignment (see the "Byte Order, Size, and Alignment" section of the struct docs). After the first 5 B's, a pad byte is inserted so that the next H is properly aligned (to a 2-byte boundary). That makes 6 bytes so far. H then takes 2 bytes, making 8 bytes so far. The final B adds the 9th byte. As the docs say, < and > do no padding, so no pad byte is added in the first two cases. ---------- nosy: +tim_one _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 22:33:30 2013 From: report at bugs.python.org (Andres Adjimann) Date: Wed, 31 Jul 2013 20:33:30 +0000 Subject: [issue18607] struct.unpack In-Reply-To: <1375299666.6.0.0308363021993.issue18607@psf.upfronthosting.co.za> Message-ID: <1375302810.97.0.0472844326843.issue18607@psf.upfronthosting.co.za> Andres Adjimann added the comment: sorry my bad. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 23:09:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Jul 2013 21:09:28 +0000 Subject: [issue15699] PEP 3121, 384 Refactoring applied to readline module In-Reply-To: <1345147381.91.0.560597639191.issue15699@psf.upfronthosting.co.za> Message-ID: <1375304968.52.0.372386830916.issue15699@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Looks ok on the buildbots. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 23:13:34 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 31 Jul 2013 21:13:34 +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: <1375305214.26.0.276843954523.issue16662@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Hah, I just ran into this too. I was perplexed why my load_tests() function wasn't being called and ended up pdb'ing unittest's discover, and found exactly this problem. I'm not surprised lifeless beat me to it. (My use case was to piggyback on load_tests() to implement a package fixture, similar to what nose provides.) Note that in http://docs.python.org/3/library/unittest.html#load-tests-protocol the docs even give you a recipe for a "no-op" load_tests() which would have been perfect, except for this problem with pattern matching the directory. My preference would be to remove the pattern match on the path. I agree that the presence of a load_tests() is probably enough of an opt-in. The question is whether we could classify this change as a bug fix or new feature. I'd love to see this fixed in 3.3 so I'm hoping for the former. ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 23:15:45 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Jul 2013 21:15:45 +0000 Subject: [issue18214] Stop purging modules which are garbage collected before shutdown In-Reply-To: <1371221979.53.0.00385452158182.issue18214@psf.upfronthosting.co.za> Message-ID: <3c56qh5wQBzPmt@mail.python.org> Roundup Robot added the comment: New changeset 79e2f5bbc30c by Antoine Pitrou in branch 'default': Issue #18214: Improve finalization of Python modules to avoid setting their globals to None, in most cases. http://hg.python.org/cpython/rev/79e2f5bbc30c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 23:16:25 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Jul 2013 21:16:25 +0000 Subject: [issue18214] Stop purging modules which are garbage collected before shutdown In-Reply-To: <1371221979.53.0.00385452158182.issue18214@psf.upfronthosting.co.za> Message-ID: <1375305385.18.0.78546096554.issue18214@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Let's wait for the buildbots on this one too. ---------- resolution: -> fixed stage: patch review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 23:17:06 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 31 Jul 2013 21:17:06 +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: <1375305426.47.0.766465758357.issue16662@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Seems like this patch does the trick for my very limited testing. ---------- keywords: +patch Added file: http://bugs.python.org/file31102/16662.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 23:20:31 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Jul 2013 21:20:31 +0000 Subject: [issue18608] Avoid keeping a strong reference to locale in the _io module Message-ID: <1375305631.67.0.684843179592.issue18608@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Keeping a strong reference to locale in _io prevents several modules from being collected before being wiped at shutdown. Attached patch stores a weakref instead. ---------- components: Library (Lib) files: io_locale_ref.patch keywords: patch messages: 194023 nosy: amaury.forgeotdarc, benjamin.peterson, pitrou priority: normal severity: normal stage: patch review status: open title: Avoid keeping a strong reference to locale in the _io module type: resource usage versions: Python 3.4 Added file: http://bugs.python.org/file31103/io_locale_ref.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 23:24:37 2013 From: report at bugs.python.org (David Edelsohn) Date: Wed, 31 Jul 2013 21:24:37 +0000 Subject: [issue18609] test_ctypes failure on AIX in PyEval_CallObjectWithKeywords Message-ID: <1375305877.13.0.891928742401.issue18609@psf.upfronthosting.co.za> New submission from David Edelsohn: test_ctypes now crashes on AIX after the ceval change to PyEval_CallObjectWithKeywords to check PyErr_Occurred(). #5 0x100ff0c8 in PyEval_CallObjectWithKeywords (func=0x300a4c3c, arg=0x3062bb24, kw=0x0) at Python/ceval.c:4066 #6 0x10166bfc in PyCodec_Decode (object=0x305d5834, encoding=0x200a0b80 "iso8859-1", errors=0x102dd0b4 "surrogateescape") at Python/codecs.c:403 #7 0x1006d500 in PyUnicode_Decode ( s=0xdb1c8234 <_GLOBAL__FD__ctypes_so+8356> "_ctypes/callbacks.c", size=19, encoding=0x200a0b80 "iso8859-1", errors=0x102dd0b4 "surrogateescape") at Objects/unicodeobject.c:3045 #8 0x1006f208 in PyUnicode_DecodeFSDefaultAndSize ( s=0xdb1c8234 <_GLOBAL__FD__ctypes_so+8356> "_ctypes/callbacks.c", size=19) at Objects/unicodeobject.c:3640 #9 0x1006f150 in PyUnicode_DecodeFSDefault ( s=0xdb1c8234 <_GLOBAL__FD__ctypes_so+8356> "_ctypes/callbacks.c") at Objects/unicodeobject.c:3618 #10 0x1017b870 in PyCode_NewEmpty ( filename=0xdb1c8234 <_GLOBAL__FD__ctypes_so+8356> "_ctypes/callbacks.c", funcname=0xdb1c8218 <_GLOBAL__FD__ctypes_so+8328> "'calling callback function'", firstlineno=260) at Objects/codeobject.c:174 #11 0xdb1c3960 in _ctypes_add_traceback ( funcname=0xdb1c8218 <_GLOBAL__FD__ctypes_so+8328> "'calling callback function'", filename=0xdb1c8234 <_GLOBAL__FD__ctypes_so+8356> "_ctypes/callbacks.c", lineno=260) at /home/dje/src/cpython/Modules/_ctypes/callbacks.c:104 #12 0xdb1c4204 in _CallPythonObject (mem=0x2ff144d8, restype=0x303a1ddc, setfunc=@0x20365824: 0xdb1bbfd4 , callable=0x3055b454, converters=0x30628e6c, flags=257, pArgs=0x2ff14444) at /home/dje/src/cpython/Modules/_ctypes/callbacks.c:261 #13 0xdb1c4690 in closure_fcn (cif=0x30528de8, resp=0x2ff144d8, args=0x2ff14440, userdata=0x30528dcc) at /home/dje/src/cpython/Modules/_ctypes/callbacks.c:322 #14 0xdb1c2a90 in ffi_closure_helper_DARWIN (closure=0x20367008, rvalue=0x2ff144d8, pgr=0x2ff14570, pfr=0x2ff144f0) at /home/dje/src/cpython/Modules/_ctypes/libffi/src/powerpc/ffi_darwin.c:1355 #15 0xdb1c2c80 in ffi_closure_ASM () from /home/dje/src/cpython/build/lib.aix-7.1-3.4-pydebug/_ctypes.so #16 0xdb1c2ba0 in ffi_call_AIX () from /home/dje/src/cpython/build/lib.aix-7.1-3.4-pydebug/_ctypes.so #17 0xdb1c231c in ffi_call (cif=0x2ff146b8, fn=0x20367008, rvalue=0x2ff14770, avalue=0x2ff14750) at /home/dje/src/cpython/Modules/_ctypes/libffi/src/powerpc/ffi_darwin.c:936 #18 0xdb1a3a68 in _call_function_pointer (flags=4353, pProc=0x20367008, avalues=0x2ff14750, atypes=0x2ff14730, restype=0x303a1ddc, resmem=0x2ff14770, argcount=1) at /home/dje/src/cpython/Modules/_ctypes/callproc.c:811 #19 0xdb1a47c4 in _ctypes_callproc (pProc=0x20367008, argtuple=0x3062be6c, flags=4353, argtypes=0x3062b99c, restype=0x304735a4, checker=0x0) at /home/dje/src/cpython/Modules/_ctypes/callproc.c:1152 #20 0xdb19da70 in PyCFuncPtr_call (self=0x3061e9c4, inargs=0x3062be6c, kwds=0x3062bd1c) at /home/dje/src/cpython/Modules/_ctypes/_ctypes.c:3820 #21 0x1010b85c in PyObject_Call (func=0x3061e9c4, arg=0x3062be6c, kw=0x3062bd1c) at Objects/abstract.c:2105 #22 0x10101778 in ext_do_call (func=0x3061e9c4, pp_stack=0x2ff15154, flags=3, na=0, nk=0) at Python/ceval.c:4537 #23 0x100f8464 in PyEval_EvalFrameEx (f=0x305e5bcc, throwflag=0) at Python/ceval.c:2858 #24 0x100fca84 in PyEval_EvalCodeEx (_co=0x3055a980, globals=0x30554d1c, locals=0x0, args=0x3062c300, argcount=3, kws=0x3062c30c, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3567 #25 0x101004d4 in fast_function (func=0x3055b514, pp_stack=0x2ff15bb0, n=3, na=3, nk=0) at Python/ceval.c:4320 ---------- components: Interpreter Core messages: 194024 nosy: David.Edelsohn priority: normal severity: normal status: open title: test_ctypes failure on AIX in PyEval_CallObjectWithKeywords type: crash versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 23:25:02 2013 From: report at bugs.python.org (David Edelsohn) Date: Wed, 31 Jul 2013 21:25:02 +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: <1375305902.57.0.98305301779.issue18609@psf.upfronthosting.co.za> Changes by David Edelsohn : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 23:53:36 2013 From: report at bugs.python.org (Donald Stufft) Date: Wed, 31 Jul 2013 21:53:36 +0000 Subject: [issue16487] Allow ssl certificates to be specified from memory rather than files. In-Reply-To: <1353078615.85.0.973290481578.issue16487@psf.upfronthosting.co.za> Message-ID: <1375307616.2.0.324623788282.issue16487@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- nosy: +dstufft _______________________________________ Python tracker _______________________________________