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

2013-09-10 Thread Daniel
Daniel added the comment: Here are some solutions which might help you until MS fixed the bug. 1) Even if the subsystem is Windows one solution is to call AllocConsole() before Py_Initialize() to create a console. 2) Second Solution: If you don't want to open a console and your application ha

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

2013-09-10 Thread Wouter Bolsterlee
Wouter Bolsterlee added the comment: (In case you missed it: my latest comment included a cleaned up version of an earlier patch.) -- ___ Python tracker ___

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

2013-09-10 Thread Wouter Bolsterlee
Wouter Bolsterlee added the comment: Thanks for the quick response. Btw, do I understand correctly code cleanups are not welcome, even when touching the code anyway? -- ___ Python tracker ___

[issue19002] ``dir`` function does not work correctly with classes.

2013-09-10 Thread David Halter
New submission from David Halter: I recently stumbled over the ``dir`` function not working correctly with classes. This means that ``dir(object)`` won't list ``object.__bases__`` or ``object.__subclasses`` (and many other useful methods). I think that we should change that. The C function ``t

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

2013-09-10 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

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

2013-09-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0e70bf1f32a3 by Raymond Hettinger in branch 'default': Issue #18962: Optimize the single iterator case for heapq.merge() http://hg.python.org/cpython/rev/0e70bf1f32a3 -- nosy: +python-dev ___ Python tra

[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 m

[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. -- __

[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 : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[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 effec

[issue18996] unittest: more helpful truncating long strings

2013-09-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file31724/assertEqual_shorten.patch ___ Python tracker ___ ___ Python-bugs-li

[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 : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue18936] 2.7 distutils getopt chokes on unicode option names

2013-09-10 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue18997] Crash when using pickle and ElementTree

2013-09-10 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[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 : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

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

2013-09-10 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[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 : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[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 ___ ___ Python-bugs-lis

[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' CTE

[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

[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 me

[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 ___

[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 al

[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 perf

[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 ___

[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

[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

[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 ;-) -- ___ Py

[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 \

[issue18997] Crash when using pickle and ElementTree

2013-09-10 Thread Germán M . Bravo
Changes by Germán M. Bravo : Added file: http://bugs.python.org/file31725/join_obj.diff ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue18997] Crash when using pickle and ElementTree

2013-09-10 Thread Germán M . Bravo
Changes by Germán M. Bravo : Removed file: http://bugs.python.org/file31723/join_obj.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue18996] unittest: more helpful truncating long strings

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

[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

[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 ___

[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 ___ ___

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

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

[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 ___

[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 st

[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 ___ __

[issue19000] Alt + 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 ___

[issue19000] Alt + 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 begi

[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

[issue18999] Allow multiple calls to multiprocessing.set_start_method

2013-09-10 Thread Lars Buitinck
Changes by Lars Buitinck : -- nosy: +sbt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.or

[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 wou

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

2013-09-10 Thread Lars Buitinck
Changes by Lars Buitinck : -- title: Allow multiple calls to multiprocessing.set_start_method -> Robustness issues in multiprocessing.{get,set}_start_method ___ Python tracker _

[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. J

[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 "", line 1, in File "C:\Repos\cpython-dirty\lib

[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 inste

[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 ___

[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 = ElementTree().parse('

[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 pa

[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 __

[issue18281] tarfile defines stat constants

2013-09-10 Thread Eli Bendersky
Eli Bendersky added the comment: lgtm. kill 'em -- nosy: +eli.bendersky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue4636] bdist_wininst installer with install script raises exception

2013-09-10 Thread Dan Nicholson
Changes by Dan Nicholson : Added file: http://bugs.python.org/file31717/wininst-9.0-compat-2.7.exe ___ Python tracker ___ ___ Python-bugs-list

[issue4636] bdist_wininst installer with install script raises exception

2013-09-10 Thread Dan Nicholson
Changes by Dan Nicholson : Added file: http://bugs.python.org/file31715/wininst-compat-2.7.patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue4636] bdist_wininst installer with install script raises exception

2013-09-10 Thread Dan Nicholson
Changes by Dan Nicholson : Added file: http://bugs.python.org/file31716/wininst-10.0-compat.exe ___ Python tracker ___ ___ Python-bugs-list mai

[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 i

[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 201

[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

[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

[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 ___ ___ Python-bugs-list mailin

[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

[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 ___ ___ Python-bugs-list mailing list Unsubscribe:

[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 are

[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) cut

[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. --

[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 it'

[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))