[issue18993] There is an overshadowed and invalid test in testmock.py

2013-09-10 Thread Vajrasky Kok
New submission from Vajrasky Kok: In Lib/unittest/test/testmock/testmock.py, there are two test_attribute_deletion. One of them is overshadowed (not executed) by the other. def test_attribute_deletion(self): # this behaviour isn't *useful*, but at least it's now tested...

[issue18994] Inside fcntl module, we does not check the return code of all_ins function

2013-09-10 Thread Vajrasky Kok
New submission from Vajrasky Kok: In Modules/fcntlmodule.c, there is a code to insert symbolic constants to the module. all_ins(m); But we don't check the return code of the function whether it is successful or not, unlike in posix module in which we check it. if (all_ins(m))

[issue18903] IDLE file-completion is case-sensitive in Windows

2013-09-10 Thread Westley Martínez
Westley Martínez added the comment: I've written a patch that sort of implements the functionality that makes the most sense to me. The problem is it only works right for the first entry. It's kind of wonky and I'm not entirely sure how it behaves, nor do I know the cause of the bug, but

[issue18943] argparse: default args in mutually exclusive groups

2013-09-10 Thread Armin Rigo
Armin Rigo added the comment: The patch looks good to me. It may break existing code, though, as reported on https://bugs.pypy.org/issue1595. I would say that it should only go to trunk. We can always fix PyPy (at Python 2.7) in a custom manner, in a bug-to-bug compatibility mode.

[issue18995] Enum does not work with reversed

2013-09-10 Thread Vajrasky Kok
New submission from Vajrasky Kok: cutecat@amiau:~/cpython$ cat /tmp/innerplanets.py from enum import Enum class innerplanets(Enum): mercury = 1 venus = 2 earth = 3 mars = 4 for planet in innerplanets: print(planet) for planet in reversed(innerplanets): print(planet)

[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

2013-09-10 Thread A.M. Kuchling
A.M. Kuchling added the comment: I'm happy to change the function name, though I'll note that the traceback module does have print_tb(), format_tb() and extract_tb(). I'm OK with both of Victor's suggestions but personally slightly prefer traceback.clear_frames(tb). Rationale: People who

[issue18986] Add a case-insensitive case-preserving dict

2013-09-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: (now relayed on python-dev) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18986 ___ ___ Python-bugs-list

[issue18992] test_sax fails on Windows under 3.4.0a2

2013-09-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: Is there an easy way to recheck the entire tree, possibly reverting any files that don't match the content that they should have? I'd rather not throw the tree away. -- ___ Python tracker rep...@bugs.python.org

[issue18992] test_sax fails on Windows under 3.4.0a2

2013-09-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: hg update -C default -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18992 ___ ___

[issue18996] unittest: more helpful truncating long strings

2013-09-10 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Error message in assertEqual() is not vary useful when compared long strings with long common prefix. It looks as: 'For the first time in his life h [truncated]...' != 'For the first time in his life h [truncated]...' With the proposed patch it will look

[issue18986] Add a case-insensitive case-preserving dict

2013-09-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm uploading a pure Python transformdict implementation + tests, for Serhiy's benefits (and others') :-) -- keywords: +patch Added file: http://bugs.python.org/file31713/transform.patch ___ Python tracker

[issue16564] email.generator.BytesGenerator fails with bytes payload

2013-09-10 Thread Alexander Kruppa
Alexander Kruppa added the comment: It seems to me that this issue is not fixed correctly yet. I've tried Python 3.3.2: ~/build/Python-3.3.2$ ./python --version Python 3.3.2 When modifying the test case in Lib/test/test_email/test_email.py like this: --- Lib/test/test_email/test_email.py

[issue4636] bdist_wininst installer with install script raises exception

2013-09-10 Thread Dan Nicholson
Dan Nicholson added the comment: It turns out this is pretty easy to fix by just changing the stub to import builtins or __builtin__ depending on the python install version. Attached are patches that fix this for both the default and 2.7 branches. My test case is a pure python module with an

[issue4636] bdist_wininst installer with install script raises exception

2013-09-10 Thread Dan Nicholson
Changes by Dan Nicholson dbn.li...@gmail.com: Added file: http://bugs.python.org/file31716/wininst-10.0-compat.exe ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4636 ___

[issue4636] bdist_wininst installer with install script raises exception

2013-09-10 Thread Dan Nicholson
Changes by Dan Nicholson dbn.li...@gmail.com: Added file: http://bugs.python.org/file31715/wininst-compat-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4636 ___

[issue4636] bdist_wininst installer with install script raises exception

2013-09-10 Thread Dan Nicholson
Changes by Dan Nicholson dbn.li...@gmail.com: Added file: http://bugs.python.org/file31717/wininst-9.0-compat-2.7.exe ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4636 ___

[issue18281] tarfile defines stat constants

2013-09-10 Thread Eli Bendersky
Eli Bendersky added the comment: lgtm. kill 'em -- nosy: +eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18281 ___ ___

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2013-09-10 Thread Daniel
Daniel added the comment: After contacting Microsoft they answered that they cannot fix that within the VS2012 or VS2013 cycle. Very bad. Any ideas? -- nosy: +m_python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17797

[issue11598] missing afxres.h error when building bdist_wininst in Visual Studio 2008 Express

2013-09-10 Thread Dan Nicholson
Dan Nicholson added the comment: Like the previous users, I've only got VS Express, so I can't tell exactly what happens when you have VS Pro and it generates the install.rc file. However, I might as well post this fuller patch, which I think would do the right thing since it also fixes the

[issue18997] Crash when using pickle and ElementTree

2013-09-10 Thread Germán M . Bravo
New submission from Germán M. Bravo: On the tip of 3.3, I've found `Element.__getstate__` doesn't work and neither as `pickle.dumps(Element)` under certain circumstances. This crashes: e1 = ElementTree().parse('houses.xml') e1.__getstate__() This doesn't crash: e2 =

[issue4636] bdist_wininst installer with install script raises exception

2013-09-10 Thread Éric Araujo
Éric Araujo added the comment: I think the exe files are specific to one Python version, so the version check would not be necessary. I may be wrong though, as I’m not a windows dev or user, so I’m adding Mark to this issue. -- nosy: +mhammond ___

[issue18998] iter() not working in ElementTree

2013-09-10 Thread Germán M . Bravo
New submission from Germán M. Bravo: The added iter/itertext methods in Element are not working under certain circumstances (crashes): This crashes: e = ElementTree().parse('/Users/kronuz/Desktop/tests/houses.xml') e.iter() But the problem is not there if I use bootstrapped iterators

[issue18986] Add a case-insensitive case-preserving dict

2013-09-10 Thread Richard Oudkerk
Richard Oudkerk added the comment: With the current patch __repr__() will fail if the untransformed key is unhashable: d = collections.transformdict(id) L = [1,2,3] d[L] = None d.keys() Traceback (most recent call last): File stdin, line 1, in module File

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-10 Thread Lars Buitinck
Changes by Lars Buitinck larsm...@gmail.com: -- title: Allow multiple calls to multiprocessing.set_start_method - Robustness issues in multiprocessing.{get,set}_start_method ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18999

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-10 Thread Olivier Grisel
Olivier Grisel added the comment: Related question: is there any good reason that would prevent to pass a custom `start_method` kwarg to the `Pool` constructor to make it use an alternative `Popen` instance (that is an instance different from the `multiprocessing._Popen` singleton)? This

[issue18999] Allow multiple calls to multiprocessing.set_start_method

2013-09-10 Thread Lars Buitinck
New submission from Lars Buitinck: The new multiprocessing based on forkserver (issue8713) looks great, but it has two problems. The first: set_start_method() should not be used more than once in the program. The documentation does not explain what the effect of calling it twice would be.

[issue18999] Allow multiple calls to multiprocessing.set_start_method

2013-09-10 Thread Lars Buitinck
Changes by Lars Buitinck l.j.buiti...@uva.nl: -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18999 ___ ___ Python-bugs-list mailing

[issue18986] Add a case-insensitive case-preserving dict

2013-09-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: With the current patch __repr__() will fail if the untransformed key is unhashable: Yeah, the __repr__() implementation will be a bit annoying to get right :-) -- ___ Python tracker rep...@bugs.python.org

[issue19000] Alt + Num Does Not Work in IDLE.

2013-09-10 Thread Howitzer21
New submission from Howitzer21: While Num Lock is in use, if I hold Alt, type 234, then release Alt, Ω is supposed to be printed (and it is printed in most other programs). If I try to do this in IDLE, however, IDLE will toggle its maximization along the y-axis and move the cursor to the

[issue19000] Alt + Num Does Not Work in IDLE.

2013-09-10 Thread Howitzer21
Howitzer21 added the comment: Sorry, it may be a UTF-8 issue. I would delete this, but I don't see a way to do so. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19000

[issue18998] iter() not working in ElementTree

2013-09-10 Thread irakli
irakli added the comment: Can you clearify under which circumstances python 3.3 crashes? -- nosy: +iraklid94 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18998 ___

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-10 Thread Richard Oudkerk
Richard Oudkerk added the comment: With your patch, I think if you call get_start_method() without later calling set_start_method() then the helper process(es) will never be started. With the current code, popen.Popen() automatically starts the helper processes if they have not already been

[issue18997] Crash when using pickle and ElementTree

2013-09-10 Thread Germán M . Bravo
Germán M. Bravo added the comment: The attached patch fixes the problem (there were some missing JOIN_OBJ()) -- keywords: +patch Added file: http://bugs.python.org/file31723/join_obj.diff ___ Python tracker rep...@bugs.python.org

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-10 Thread Lars Buitinck
Changes by Lars Buitinck larsm...@gmail.com: Removed file: http://bugs.python.org/file31721/mp_getset_start_method.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18999 ___

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-10 Thread Lars Buitinck
Lars Buitinck added the comment: Cleaned up the patch. -- Added file: http://bugs.python.org/file31722/mp_getset_start_method.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18999 ___

[issue18998] iter() not working in ElementTree

2013-09-10 Thread Germán M . Bravo
Germán M. Bravo added the comment: It crashes when I run that code snippet I posted (using the attached xml file) The problem was introduced by the commit that added iterator support. -- ___ Python tracker rep...@bugs.python.org

[issue18992] test_sax fails on Windows under 3.4.0a2

2013-09-10 Thread Tim Peters
Tim Peters added the comment: Serhiy, did you test hg update -C default? Didn't work for me :-( Martin, I don't know an easy way. eol fiddling in Hg seems brittle :-( I suppose you could get a fresh clone and then _compare_ the checked-out files to your old clone. Then, from the old clone,

[issue18996] unittest: more helpful truncating long strings

2013-09-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file31712/assertEqual_shorten.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18996 ___

[issue18997] Crash when using pickle and ElementTree

2013-09-10 Thread Germán M . Bravo
Changes by Germán M. Bravo german...@gmail.com: Removed file: http://bugs.python.org/file31723/join_obj.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18997 ___

[issue18997] Crash when using pickle and ElementTree

2013-09-10 Thread Germán M . Bravo
Changes by Germán M. Bravo german...@gmail.com: Added file: http://bugs.python.org/file31725/join_obj.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18997 ___

[issue18992] test_sax fails on Windows under 3.4.0a2

2013-09-10 Thread Tim Peters
Tim Peters added the comment: OK, hg up -C _can_ work, but it appears to require that hg stat shows that the files with the bad line endings are modified (M). That may or may not be the case, depending on lots of things. Martin, can you verify that (for example) test.xml.out does have \r\n

[issue18992] test_sax fails on Windows under 3.4.0a2

2013-09-10 Thread Tim Peters
Tim Peters added the comment: BTW, the reason I wonder whether you don't have bad line ends in your tree is this: if you did, test_sax would have been failing for you too. I assume you run the test suite before building the installer ;-) -- ___

[issue18998] iter() not working in ElementTree

2013-09-10 Thread Eli Bendersky
Eli Bendersky added the comment: I'm having trouble reproducing the problem, Germán. Running with Python 3.3.2 from a couple of days ago: Python 3.3.2+ (3.3:0eef1670f316, Sep 8 2013, 08:31:59) [GCC 4.6.3] on linux Type help, copyright, credits or license for more information. from

[issue18997] Crash when using pickle and ElementTree

2013-09-10 Thread Eli Bendersky
Eli Bendersky added the comment: Thanks for this report, Germán (and the other issue as well). I'll do my best to take a look later this week. -- assignee: - eli.bendersky stage: - patch review type: - behavior versions: +Python 3.4 ___ Python

[issue18986] Add a case-insensitive case-preserving dict

2013-09-10 Thread Éric Araujo
Éric Araujo added the comment: FTR this is one message from the previous thread about this: https://mail.python.org/pipermail/python-ideas/2010-June/007332.html -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org

[issue18962] Add special case for single iterator in heapq.merge function

2013-09-10 Thread Wouter Bolsterlee
Wouter Bolsterlee added the comment: Thanks Raymond, that is exactly what I had in mind (see my previous comment). Here's a slightly cleaned up version of the patch (stylistic/PEP8 cleanups), with some benchmarks included below. In case the two longest iterators have about the same size, no

[issue18992] test_sax fails on Windows under 3.4.0a2

2013-09-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: It turns out that TortoiseHg was showing the files as modified. I have now reverted my local changes, so this should be fine now. I was somewhat under time pressure when making the release, so I didn't notice then (and TortoiseHg seems to needs some time

[issue4832] IDLE does not supply a default ext of .py on Windows or OS X for new file saves

2013-09-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: With PEP 434, this can and I think should be backported. I should have done it for 2.7.5 and will try to do soon. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4832

[issue19001] test_gdb fails on Fedora buildbot

2013-09-10 Thread Antoine Pitrou
New submission from Antoine Pitrou: This is on Stefan's Fedora without threads buildbot, and it's the sets pretty-printing tests which fail: http://buildbot.python.org/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/5119 -- components: Demos and Tools, Interpreter Core

[issue18986] Add a case-insensitive case-preserving dict

2013-09-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch: fixes repr(), and retains the first key not the last. -- Added file: http://bugs.python.org/file31727/transformdict.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18986

[issue16564] email.generator.BytesGenerator fails with bytes payload

2013-09-10 Thread R. David Murray
R. David Murray added the comment: That's a different bug, and is probably due to the fact that \x0b is considered a line-ending character by the 'splitlines' method. Could you please open a new issue for this? It could be that this can't be fixed in Python3 until support for the 'binary'

[issue18992] test_sax fails on Windows under 3.4.0a2

2013-09-10 Thread Tim Peters
Tim Peters added the comment: No problems, Martin - thanks for following up on this! :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18992 ___

[issue17477] update the bsddb module do build with db 5.x versions

2013-09-10 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17477 ___

[issue18986] Add a case-insensitive case-preserving dict

2013-09-10 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18986 ___

[issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine

2013-09-10 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18987 ___

[issue18997] Crash when using pickle and ElementTree

2013-09-10 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18997 ___

[issue18936] 2.7 distutils getopt chokes on unicode option names

2013-09-10 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18936 ___

[issue18734] Berkeley DB versions 4.4-4.9 are not discovered by setup.py

2013-09-10 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18734 ___

[issue18996] unittest: more helpful truncating long strings

2013-09-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file31724/assertEqual_shorten.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18996 ___

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-10 Thread Lars Buitinck
Lars Buitinck added the comment: In my patched version, the private popen.get_start_method gets a kwarg set_if_needed=True. popen.Popen calls that as before, so its behavior should not change, while the public get_start_method sets the kwarg to False. I realise now that this has the side

[issue10977] Concrete object C API considered harmful to subclasses of builtin types

2013-09-10 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10977 ___

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-10 Thread Richard Oudkerk
Richard Oudkerk added the comment: In my patched version, the private popen.get_start_method gets a kwarg set_if_needed=True. popen.Popen calls that as before, so its behavior should not change, while the public get_start_method sets the kwarg to False. My mistake. --

[issue18986] Add a case-insensitive case-preserving dict

2013-09-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: I would *really* like for this to start outside the standard library. It needs to mature with user feedback before being dumped in the collections module (which was never intended to be a giant pile of every collection a person could think of). Adding yet