[issue18078] threading.Condition to allow notify on a specific waiter

2013-05-31 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18078 ___ ___

[issue18105] ElementTree writes invalid files when UTF-16 encoding is specified

2013-05-31 Thread Adam Urban
New submission from Adam Urban: import xml.etree.ElementTree as ET tree = ET.parse(myinput.xml) tree.write(myoutput.xml, encoding=utf-16) ...Output is a garbled mess, often a mix of UTF-8 and UTF-16 bytes... UTF-8 output works fine, but when UTF-16, UTF-16LE, or UTF-16BE are specified the

[issue12425] gettext breaks on empty plural-forms value

2013-05-31 Thread Bohuslav Slavek Kabrda
Changes by Bohuslav Slavek Kabrda bkab...@redhat.com: -- nosy: +bkabrda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12425 ___ ___

[issue18106] There are unused variables in Lib/test/test_collections.py

2013-05-31 Thread Vajrasky Kok
New submission from Vajrasky Kok: In two test_copying methods in Lib/test/test_collections.py, variable i is never used. My guess is the original test writer forgot to utilize the variable i. For example, in test_copying method in TestOrderedDict class: def test_copying(self): #

[issue18106] There are unused variables in Lib/test/test_collections.py

2013-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Perhaps it will be even better to extract loop body as a local function and then call it with different arguments. def check(dup): self.assertTrue(dup is not od) self.assertEqual(dup, od) ... check(od.copy())

[issue18105] ElementTree writes invalid files when UTF-16 encoding is specified

2013-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For 3.3+ it was fixed in issue1767933. -- nosy: +eli.bendersky, serhiy.storchaka versions: -3rd party, Python 2.6, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker

[issue10224] Build 3.x documentation using python3.x

2013-05-31 Thread Cherniavsky Beni
Cherniavsky Beni added the comment: I was only thinking of 3.4, which will have venv and a pip bootstrapper. Is changing the doc build / doctest in scope for minor releases of 3.3 (or even earlier)? The commands I listed (using setup_distribute.py) also work with 3.3. (But they're unsecure --

[issue18107] 'str(long)' can be made faster

2013-05-31 Thread Armin Rigo
New submission from Armin Rigo: If you have in x some very large number, like 3**20, then the computation for 'str(x)' is sub-efficient. Nathan Hurst posted to the pypy-dev mailing list a pure Python algo that gives the same result in 2/3rd of the time (in either CPython or PyPy). We

[issue18107] 'str(long)' can be made faster

2013-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue3451. -- nosy: +mark.dickinson, serhiy.storchaka versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18107 ___

[issue18106] There are unused variables in Lib/test/test_collections.py

2013-05-31 Thread Vajrasky Kok
Vajrasky Kok added the comment: According to R. David Murray in Python core-mentorship mailing list addressing me: It could be that the bug is that the i is not used...it may have been intended to be used in an extended error message in the asserts, so that it would be clear which input

[issue18106] There are unused variables in Lib/test/test_collections.py

2013-05-31 Thread Vajrasky Kok
Vajrasky Kok added the comment: Anyway to make it complete, I upload the patch according to Storchaka's advice too. May the best patch wins! -- Added file: http://bugs.python.org/file30434/test_copying_with_def.patch ___ Python tracker

[issue18039] dbm.open(..., flag=n) does not work and does not give a warning

2013-05-31 Thread Berker Peksag
Berker Peksag added the comment: I can't reproduce it on Windows 7 with Python 3.3.2. Attaching my test script. Here's the output: C:\Python33python.exe -V Python 3.3.2 C:\Python33python.exe dbmopen.py dbm.dumb._Database object at 0x027C15B0 bzdew.dat exists? True bzdew.dir exists? True

[issue744841] Python-Profiler bug: Bad call

2013-05-31 Thread Terje Wiesener
Terje Wiesener added the comment: This bug seems to have resurfaced in newer python versions. I have tested the file attached in the original report (prof2.py) in python 2.6.6 and 2.7 (x86 versions) under Windows 7, and both give the same output: c:\tempc:\Python27\python.exe prof2.py type

[issue18039] dbm.open(..., flag=n) does not work and does not give a warning

2013-05-31 Thread Sashko Kopyl
Sashko Kopyl added the comment: Here is the output. *** Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)] on win32. *** *** Remote Python engine is active *** *** Remote Interpreter Reinitialized *** dbm.dumb._Database object at 0x02B95210 yoqaA.dat

[issue18108] shutil.chown should support dir_fd and follow_symlinks keyword arguments

2013-05-31 Thread Colin Watson
New submission from Colin Watson: Python 3.3 added the dir_fd and follow_symlinks keyword arguments to os.chown; it also added the shutil.chown function. Unfortunately the latter, while useful, does not support these new keyword arguments. It would be helpful if it did. --

[issue15239] Abandoned Tools/unicode/mkstringprep.py

2013-05-31 Thread Martin v . Löwis
Martin v. Löwis added the comment: Ok, these patches all look fine. Thanks for your effort. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15239 ___

[issue18107] 'str(long)' can be made faster

2013-05-31 Thread Armin Rigo
Armin Rigo added the comment: Thanks, I missed it. Sorry for the noise. -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18107 ___

[issue3451] Asymptotically faster divmod and str(long)

2013-05-31 Thread Eric V. Smith
Eric V. Smith added the comment: See also issue18107, in particular http://mail.python.org/pipermail/pypy-dev/2013-May/011433.html. -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3451

[issue18093] Move main functions to a separate Programs directory

2013-05-31 Thread Zachary Ware
Zachary Ware added the comment: I can confirm that the patch doesn't break building on Windows. Would it make any sense to move Windows-specific sources for things like kill_python.exe (PCbuild/kill_python.c), make_buildinfo.exe, make_versioninfo.exe, py.exe (PC/launcher.c) into Programs? Or

[issue18094] Skip tests in test_uuid not silently

2013-05-31 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- nosy: +zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18094 ___ ___ Python-bugs-list

[issue18103] Create a GUI test framework for Idle

2013-05-31 Thread Todd Rovito
Changes by Todd Rovito rovit...@gmail.com: -- nosy: +Todd.Rovito ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18103 ___ ___ Python-bugs-list

[issue18104] Idle: make human-mediated GUI tests usable

2013-05-31 Thread Todd Rovito
Changes by Todd Rovito rovit...@gmail.com: -- nosy: +Todd.Rovito ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18104 ___ ___ Python-bugs-list

[issue18108] shutil.chown should support dir_fd and follow_symlinks keyword arguments

2013-05-31 Thread Hynek Schlawack
Changes by Hynek Schlawack h...@ox.cx: -- nosy: +hynek versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18108 ___

[issue18066] Remove SGI-specific code from pty.py

2013-05-31 Thread Éric Araujo
Éric Araujo added the comment: LGTM. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18066 ___ ___ Python-bugs-list mailing

[issue18094] Skip tests in test_uuid not silently

2013-05-31 Thread Éric Araujo
Éric Araujo added the comment: +1 -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18094 ___ ___ Python-bugs-list mailing list

[issue18094] Skip tests in test_uuid not silently

2013-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 81c02d2c830d by Serhiy Storchaka in branch '3.3': Issue #18094: test_uuid no more reports skipped tests as passed. http://hg.python.org/cpython/rev/81c02d2c830d New changeset ebd11a19d830 by Serhiy Storchaka in branch 'default': Issue #18094:

[issue18094] Skip tests in test_uuid not silently

2013-05-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka resolution: - fixed stage: patch review - committed/rejected status: open - closed versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org

[issue15239] Abandoned Tools/unicode/mkstringprep.py

2013-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for review. Should we regenerate Lib/stringprep.py now? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15239 ___

[issue18109] os.uname() crashes if hostname contains non-ascii characters

2013-05-31 Thread Dominik Richter
New submission from Dominik Richter: To reproduce (tested on Arch Linux, python 3.3.2): sudo hostname hât python -c import os; os.uname() produces: Traceback (most recent call last): File string, line 1, in module UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in

[issue18085] Verifying refcounts.dat

2013-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since creating refcounts.dat many functions changed their argument's types from `char*` to `const char*`. Here is a patch which fixes mismatches (perhaps not all). refcounts.dat in 3.x contains PyInt_* functions which don't exist in 3.x. --

[issue18048] Merging test_pep263.py and test_coding.py

2013-05-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18048 ___ ___ Python-bugs-list

[issue18109] os.uname() crashes if hostname contains non-ascii characters

2013-05-31 Thread Charles-François Natali
Changes by Charles-François Natali cf.nat...@gmail.com: -- type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18109 ___ ___

[issue18109] os.uname() crashes if hostname contains non-ascii characters

2013-05-31 Thread STINNER Victor
STINNER Victor added the comment: I'm unable to set an non-ASCII hostname on Fedora 18 (Linux kernel 3.9.2): $ sudo hostname hât hostname: the specified hostname is invalid -- nosy: +haypo ___ Python tracker rep...@bugs.python.org

[issue18109] os.uname() crashes if hostname contains non-ascii characters

2013-05-31 Thread STINNER Victor
STINNER Victor added the comment: See also issue #9377 (similar issue with the socket module). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18109 ___

[issue18109] os.uname() crashes if hostname contains non-ascii characters

2013-05-31 Thread Dmi Baranov
Dmi Baranov added the comment: I just checked RFC952 [1] and RFC1123 [2], that host name is incorrect. I think, you need report to Arch Linux bug-tracker. $ sudo hostname hât hostname: the specified hostname is invalid $ uname -a Linux d9frog9n-desktop 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26

[issue18109] os.uname() crashes if hostname contains non-ascii characters

2013-05-31 Thread Dmi Baranov
Dmi Baranov added the comment: /offtop Dumn, sorry for duplication here, Victor. We not having websockets here, my page not refreshed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18109

[issue17005] Add a topological sort algorithm

2013-05-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: +1 I had tsort in my own utilities library for so long that I thought it was in stdlib already. I found this issue after unsuccessfully searching docs.python.org. :-) I think functools will be a fine place for it. It is somewhat related to total

[issue18110] Nested set comprehensions in class scope fail

2013-05-31 Thread Eric Wieser
New submission from Eric Wieser: This code: class Sudoku(dict): COLUMNS = [ {(x, y) for y in xrange(9)} for x in xrange(9) ] When run on Python 2.7.5, fails with this traceback: Traceback (most recent call last): File pyshell#3, line 1, in module

[issue18090] dict_contains first argument declared register, and shouldn't be

2013-05-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: Guido, do you still believe in using 'register' in C code in general or in particular, for function arguments. Many of the uses in dictobject.c go back to your rev1256 and rev5396. The one that caught Larry's eye for dict_contains appears to be from the

[issue18088] Create importlib.abc.Loader.init_module_attrs()

2013-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset e873f2e67353 by Brett Cannon in branch 'default': Issues #18088, 18089: Introduce http://hg.python.org/cpython/rev/e873f2e67353 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org

[issue18109] os.uname() crashes if hostname contains non-ascii characters

2013-05-31 Thread Dominik Richter
Dominik Richter added the comment: @dmi.baranov: You're right, according to: http://tools.ietf.org/html/rfc952 hname ::= name*[.name] name ::= let[*[let-or-digit-or-hyphen]let-or-digit] http://tools.ietf.org/html/rfc1178 Don't use non-alphanumeric characters in a name. If you use posix

[issue18089] Create importlib.abc.InspectLoader.load_module()

2013-05-31 Thread Brett Cannon
Brett Cannon added the comment: New changeset e873f2e67353 by Brett Cannon in branch 'default': Issues #18088, 18089: Introduce http://hg.python.org/cpython/rev/e873f2e67353 -- resolution: - fixed stage: test needed - committed/rejected status: open - closed

[issue18088] Create importlib.abc.Loader.init_module_attrs()

2013-05-31 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- resolution: - fixed stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18088 ___

[issue18109] os.uname() crashes if hostname contains non-ascii characters

2013-05-31 Thread STINNER Victor
STINNER Victor added the comment: http://tools.ietf.org/html/rfc1178 Don't use non-alphanumeric characters in a name. This is a recommendation, it does not mean that it is forbidden. But on Fedora, I'm unable to set a non-ASCII hostname. Arch Linux may be different. Python should not fail

[issue18111] Add a default argument to min max

2013-05-31 Thread Julian Berman
New submission from Julian Berman: This has come up a number of times I'm aware, but no one has ever written a patch for it as far as a quick look uncovered. So here's one (written by Thomas Wouters but with permission to submit). Submitting without tests and docs, but those are incoming when

[issue18111] Add a default argument to min max

2013-05-31 Thread Julian Berman
Changes by Julian Berman julian+python@grayvines.com: -- keywords: +patch Added file: http://bugs.python.org/file30437/minmaxdefault.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18111

[issue13483] Use VirtualAlloc to allocate memory arenas

2013-05-31 Thread STINNER Victor
STINNER Victor added the comment: I tested VirtualAlloc/VirtualFree versus malloc/free on Windows 7 SP1 64-bit. On my small test, when using VirtualAlloc/VirtualFree, the memory peak is lower (ex: 58.1 MB vs 59.0), and the memory usage is the same or sometimes lower. The difference is small,

[issue18110] Nested set comprehensions in class scope fail

2013-05-31 Thread Dmi Baranov
Changes by Dmi Baranov dmi.bara...@gmail.com: -- nosy: +dmi.baranov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18110 ___ ___ Python-bugs-list

[issue18109] os.uname() crashes if hostname contains non-ascii characters

2013-05-31 Thread Dominik Richter
Dominik Richter added the comment: @haypo: You're right, RFC1178 is only a recommendation. RFC952 however is mandatory, although it doesn't seem to define let-or-digit explicitly (or at least i wasn't able to find it; thus referencing POSIX). Regarding Arch Linux's hostname: It is part of the

[issue18112] PEP 442 implementation

2013-05-31 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- components: Interpreter Core hgrepos: 194 nosy: pitrou priority: normal severity: normal stage: patch review status: open title: PEP 442 implementation type: enhancement versions: Python 3.4 ___ Python

[issue3329] API for setting the memory allocator used by Python

2013-05-31 Thread STINNER Victor
STINNER Victor added the comment: typedef void *(*PyCCP_Malloc_t)(size_t size, void *arg, const char *file, int line, const char *msg); I don't understand the purpose of the filename and line number. Python does not have such information. Is it just to have the API expected by Unreal

[issue18104] Idle: make human-mediated GUI tests usable

2013-05-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: What I want is for the tests to be discovered when they should be and not when they should not ;-) -- without jumping through too many hoops. I probably once read 'recursing into subdirectories' but forgot. I like 'h_test...' for 'human test ...'. Thinking

[issue18109] os.uname() crashes if hostname contains non-ascii characters

2013-05-31 Thread R. David Murray
R. David Murray added the comment: Issue 10097 may also have some relevant discussion, even though that issue originates from Windows. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18109

[issue18111] Add a default argument to min max

2013-05-31 Thread R. David Murray
R. David Murray added the comment: Issue 7153 and the discussions linked therefrom is presumably relevant here. Do you have a concrete use case? -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18111

[issue18113] Memory leak in curses.panel

2013-05-31 Thread Atsuo Ishimoto
New submission from Atsuo Ishimoto: Objects associated to the panel with panel.set_userptr() are never DECREF()ed. Attached file is script to reproduce the leak. Confirmed with Python2.7/3.3. -- files: userptr-leak.py messages: 190433 nosy: ishimoto priority: normal severity: normal

[issue18114] Update PyImport_ImportFrozenModuleObject() to use importlib

2013-05-31 Thread Brett Cannon
New submission from Brett Cannon: _imp.init_frozen is not really necessary; you can implement imports entirely using the other frozen-related functions. Because of that it's probably better to simply rewrite PyImport_ImportFrozenModuleObject() to use importlib to make the code easier to

[issue18115] Use importlib.util.module_to_load in all loaders in importlib

2013-05-31 Thread Brett Cannon
New submission from Brett Cannon: BuiltinImporter, FrozenImporter, and ExtensionFileLoader all have their own custom code to manage clearing sys.modules if something goes wrong. Should see if any of them would break if they used importlib.util.module_to_load. And if they would break thanks to

[issue18065] set __path__ = [] for frozen packages

2013-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 82db02a2e023 by Brett Cannon in branch 'default': Issue #18065: For frozen packages set __path__ to []. http://hg.python.org/cpython/rev/82db02a2e023 -- nosy: +python-dev ___ Python tracker

[issue18065] set __path__ = [] for frozen packages

2013-05-31 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- resolution: - fixed stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18065 ___

[issue18115] Use importlib.util.module_to_load in all loaders in importlib

2013-05-31 Thread Brett Cannon
Brett Cannon added the comment: Turns out BuiltinImporter doesn't like having a pre-existing module, so a new keyword argument will be necessary to allow for only the cleanup code to run and not the construction of a new module. -- ___ Python

[issue18104] Idle: make human-mediated GUI tests usable

2013-05-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: While improving the self-test for confixSectionNameDialog.py after fixing the error that stopped it from running, I discovered an error in the NameOk method: names were not really stripped before being tested. so duplicate section names were erroneously

[issue18110] Nested set comprehensions in class scope fail

2013-05-31 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- resolution: - duplicate status: open - closed superseder: - improper scope in list comprehension, when used in class declaration ___ Python tracker rep...@bugs.python.org