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

2013-09-11 Thread Sam Ferencik
Sam Ferencik added the comment: Unfortunately, I don't have a patch. Some thoughts: To discover a 32-bit interpreter running on a 64-bit system, we could use platform.architecture(), which returns >>> platform.architecture() ('32bit', 'ELF') What then, though? How do you turn '32bit' t

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

2013-09-11 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

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

2013-09-11 Thread Ethan Furman
Changes by Ethan Furman : -- versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.5 ___ Python tracker ___ ___ Python-bugs-list ma

[issue19003] email.generator.BytesGenerator corrupts data by changing line endings

2013-09-11 Thread Alexander Kruppa
New submission from Alexander Kruppa: This is a follow-up to #16564. In that issue, BytesGenerator was changed to accept a bytes payload, however processing binary data that way leads to data corruption. Repost of the update I posted in #16564:

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

2013-09-11 Thread Alexander Kruppa
Alexander Kruppa added the comment: Opened #19003. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue18967] Find a less conflict prone approach to Misc/NEWS

2013-09-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Automatic generation of NEWS file from commit logs. Commit messages can't be modified after being published, this would be annoying to fix typos etc. >From what I record of the ML discussions, the proposed solutions actually >sounded more annoying than the

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

2013-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a preliminary C implementation. -- Added file: http://bugs.python.org/file31728/ctransformdict.patch ___ Python tracker ___ __

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

2013-09-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file31728/ctransformdict.patch ___ Python tracker ___ ___ Python-bugs-list

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

2013-09-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file31729/ctransformdict.patch ___ Python tracker ___ ___ Python-bugs-list ma

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

2013-09-11 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brian.curtin, tim.golden, tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Un

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

2013-09-11 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: normal -> high resolution: out of date -> stage: -> needs patch versions: +Python 3.3, Python 3.4 -Python 3.2 ___ Python tracker ___ __

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

2013-09-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Which 3.2 version does this break with? As far as I can tell, it should be fixed in 3.2.3: see changeset f15943505db0, issue #7111. -- nosy: +pitrou resolution: -> fixed stage: needs patch -> status: open -> pending versions: +Python 3.2 -Python 3.3,

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

2013-09-11 Thread Mateusz Loskot
Mateusz Loskot added the comment: @Antoine (Re msg197480) I'm not sure which minor version of Python 3.2 it was, but in my comment in msg187362, I confirmed that I have tested the later version with added is_valid_fd function. As far as I understand, the changes in http://hg.python.org/cpytho

[issue19004] datetime: Read in isoformat() output

2013-09-11 Thread Timothy Pederick
New submission from Timothy Pederick: At present, the datetime module does not provide the capability to parse its own output from the isoformat() methods. strptime() can't handle timezones with colons in them (and anyway it seems to me you'd need to try several possible format strings dependi

[issue19005] PyIter_Next crashes if passed a non-iterator

2013-09-11 Thread Evgeny Kapun
New submission from Evgeny Kapun: According to the documentation, PyIter_Next should raise TypeError if passed an object which is not an iterator as an argument. Instead, it calls a function through a null pointer, which leads to a crash. -- components: Interpreter Core messages: 19748

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

2013-09-11 Thread Daniel
Daniel added the comment: Sorry, I used the latest Python3.4 branch, I haven't tested this with prior versions. -- ___ Python tracker ___ ___

[issue18967] Find a less conflict prone approach to Misc/NEWS

2013-09-11 Thread R. David Murray
R. David Murray added the comment: I agree with Antoine, but then as I said I don't run into huge merge conflicts very often. -- ___ Python tracker ___ _

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

2013-09-11 Thread Olivier Grisel
Olivier Grisel added the comment: > Maybe it would be better to have separate contexts for each start method. > That way joblib could use the forkserver context without interfering with the > rest of the user's program. Yes in general it would be great if libraries could customize the multip

[issue18967] Find a less conflict prone approach to Misc/NEWS

2013-09-11 Thread Ezio Melotti
Ezio Melotti added the comment: IMHO the status quo is fine. Most of the time HG gets the merge right on its own. Some times kdiff3 pops up and asks me to solve the conflict [0]. Rarely something goes wrong so I just revert Misc/NEWS and re-add the entry manually. > It seems to me that they

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

2013-09-11 Thread R. David Murray
R. David Murray added the comment: As far as I know dir has always worked this way with classes (certainly back as far as 2.4, which is the oldest python I have on my dev system). So I doubt that this behavior can be open to change, whether or not we think the original decision was correct.

[issue19004] datetime: Read in isoformat() output

2013-09-11 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> datetime: add ability to parse RFC 3339 dates and times versions: +Python 3.4 -Python 3.3 ___ Python tracker

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2013-09-11 Thread R. David Murray
Changes by R. David Murray : -- nosy: +perey ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

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

2013-09-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I'm not sure which minor version of Python 3.2 it was, but in my > comment in msg187362, I confirmed that I have tested the later > version with added is_valid_fd function. As far as I understand, the > changes in http://hg.python.org/cpython/rev/f15943505db0/

[issue18967] Find a less conflict prone approach to Misc/NEWS

2013-09-11 Thread Nick Coghlan
Nick Coghlan added the comment: I don't think I've *ever* had NEWS successfully merge when working on a bug fix (even after the move to hg). It's one of the reasons I prefer working on new features, or bugs where the fix is too intrusive for a maintenance release :P -- _

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

2013-09-11 Thread Ethan Furman
Ethan Furman added the comment: It's going to take more than "I think that that's not true," to get a change made. >From http://docs.python.org/2/library/functions.html#dir : > > Because dir() is supplied primarily as a convenience for use at an > interactive prompt, it tries to supply an inte

[issue18945] Name collision handling in tempfile is not covered by tests

2013-09-11 Thread Vlad Shcherbina
Changes by Vlad Shcherbina : Added file: http://bugs.python.org/file31730/tempfile_collision_tests.patch ___ Python tracker ___ ___ Python-bug

[issue18945] Name collision handling in tempfile is not covered by tests

2013-09-11 Thread Vlad Shcherbina
Changes by Vlad Shcherbina : Removed file: http://bugs.python.org/file31697/tempfile_collision_tests.patch ___ Python tracker ___ ___ Python-b

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2013-09-11 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2013-09-11 Thread Yuri Bochkarev
Changes by Yuri Bochkarev : -- nosy: +Yuri.Bochkarev ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

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

2013-09-11 Thread Ethan Furman
Ethan Furman added the comment: So when you do a `dir(int)` you don't want to know what you can call on 7? You'd rather know what you can call on 'type'? -- ___ Python tracker

[issue19006] UnitTest docs should have a single list of assertions

2013-09-11 Thread Ezio Melotti
Ezio Melotti added the comment: > There's nothing fundamentally different about the two lists I made that division because the ones in the first table are the most common and widely used, and are quite general too. The second table contains assert methods about catching exceptions and warnings

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

2013-09-11 Thread Ramchandra Apte
Ramchandra Apte added the comment: On 11 September 2013 21:41, Ethan Furman wrote: > > Ethan Furman added the comment: > > So when you do a `dir(int)` you don't want to know what you can call on 7? > You'd rather know what you can call on 'type'? > > -- > >

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

2013-09-11 Thread Ramchandra Apte
Ramchandra Apte added the comment: -1 classes themselves are objects, so dir should list the attributes/methods of the class object, not the instances. -- nosy: +Ramchandra Apte ___ Python tracker

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

2013-09-11 Thread Mateusz Loskot
Mateusz Loskot added the comment: On 11 September 2013 12:34, Antoine Pitrou wrote: >> I'm not sure which minor version of Python 3.2 it was, but in my >> comment in msg187362, I confirmed that I have tested the later >> version with added is_valid_fd function. As far as I understand, the >> cha

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

2013-09-11 Thread R. David Murray
R. David Murray added the comment: That's not how people use it at the interactive prompt, though. I call dir(str) to find what methods I can call on an str object, not what methods I can call on the str class object. Same goes for my own classes. Yes, I also call it on instances, but it wou

[issue11163] iter() documentation code doesn't work

2013-09-11 Thread purplezephyr
purplezephyr added the comment: This does not seem to have been changed in any version, per msg135246. If it's not going to be replaced, there's another issue, which is that the link to readline() in the text is incorrect - it goes to the readline module, not file.readline(). -- nosy

[issue18818] Empty PYTHONIOENCODING is not the same as nonexistent

2013-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Nick, could you help me with documentation? I'm sure my wording needs improving. And there is one question left. Is this change appropriate for 2.7 and 3.3, or only for 3.4? -- ___ Python tracker

[issue18995] Enum does not work with reversed

2013-09-11 Thread Ethan Furman
Ethan Furman added the comment: Cool, I didn't even know __reversed__ existed! -- assignee: -> ethan.furman stage: -> patch review ___ Python tracker ___ __

[issue19006] UnitTest docs should have a single list of assertions

2013-09-11 Thread Roy Smith
New submission from Roy Smith: http://docs.python.org/2/library/unittest.html#assert-methods The docs say, "The TestCase class provides a number of methods to check for and report failures, such as", and then when you scroll a couple of screens down, there's another list, "There are also other

[issue19006] UnitTest docs should have a single list of assertions

2013-09-11 Thread Roy Smith
Roy Smith added the comment: Adding a note that there are more methods in the tables below would be useful. Otherwise, you assume you've seen them all when you've read the first table. I agree that the assertions about exceptions and warnings belong in a different group, but I don't see any f

[issue19006] UnitTest docs should have a single list of assertions

2013-09-11 Thread Ezio Melotti
Ezio Melotti added the comment: One reason is that if I list all those assert methods first and keep the assertRaises/Warns in a separate group, they will be pushed way down, and people might miss them. I'll try to prepare a patch that adds links to the other tables and/or changes the wording

[issue11163] iter() documentation code doesn't work

2013-09-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: In the current 3.3.2 docs, 'STOP' has been replaced by '', so there is a change, and no infinite loop. However, this is still does not strike me as an example of 'useful' as for line in iter(fp.readline, "STOP"): # is a bad version of for line in fp: It do

[issue18911] minidom does not encode correctly when calling Document.writexml

2013-09-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> docs@python components: +Documentation nosy: +docs@python ___ Python tracker ___ ___ Py

[issue18988] Tab key doesn't work sometimes.

2013-09-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset c882395e8ed8 by Serhiy Storchaka in branch '3.3': Issue #18988: The "Tab" key now works when a word is already autocompleted. http://hg.python.org/cpython/rev/c882395e8ed8 New changeset 7d38784092d8 by Serhiy Storchaka in branch 'default': Issue #18

[issue18844] allow weights in random.choice

2013-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The proposed patch add two methods to the Random class and two module level functions: weighted_choice() and weighted_choice_generator(). weighted_choice(data) accepts either mapping or sequence and returns a key or index x with probability which is proporti

[issue18844] allow weights in random.choice

2013-09-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue18730] suffix parameter in NamedTemporaryFile silently fails when not prepending with a period

2013-09-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: -serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue18988] Tab key doesn't work sometimes.

2013-09-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue18730] suffix parameter in NamedTemporaryFile silently fails when not prepending with a period

2013-09-11 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +georg.brandl, ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

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

2013-09-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Shortly, is_valid_fd always returns true because fd < 0 is always > false as my tests with Visual Studio 2012 Well, that's not all there is, is_valid_fd() does other checks before returning true. -- ___ Python tra

[issue13107] Text width in optparse.py can become negative

2013-09-11 Thread Elazar Gershuni
Elazar Gershuni added the comment: ok. how about argparse_ugly.patch? below some width it simply won't do any wrapping. (I hadn't touch optparse yet) -- Added file: http://bugs.python.org/file31731/argparse_ugly.patch ___ Python tracker

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

2013-09-11 Thread Mateusz Loskot
Mateusz Loskot added the comment: On 12 September 2013 00:06, Antoine Pitrou wrote: >> Shortly, is_valid_fd always returns true because fd < 0 is always >> false as my tests with Visual Studio 2012 > > Well, that's not all there is, is_valid_fd() does other checks before > returning true. Give

[issue18995] Enum does not work with reversed

2013-09-11 Thread Vajrasky Kok
Vajrasky Kok added the comment: Simplified unit test. I reused enum Season in the test class. By the way, there is another way to add support for enum without implementing __reversed__ method, which is adding support indexing by number (in __getitem__ method), e.g. Season[1] => Season.SPRING.

[issue18995] Enum does not work with reversed

2013-09-11 Thread Ethan Furman
Ethan Furman added the comment: Yes, I was aware of that method (not that we would add it that way). __reversed__ is definitely better for Enum. -- ___ Python tracker ___ _

[issue18844] allow weights in random.choice

2013-09-11 Thread Neil Girdhar
Neil Girdhar added the comment: Should this really be implemented using the cumulative distribution and binary search algorithm? Vose's Alias Method has the same initialization and memory usage cost (O(n)), but is constant time to generate each sample. An excellent tutorial is here: http://ww

[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

2013-09-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 82bdd5fc7a71 by Senthil Kumaran in branch '2.7': Improve the docstring of random.shuffle. Inform users not to provide int arg. http://hg.python.org/cpython/rev/82bdd5fc7a71 New changeset 4782faf29480 by Senthil Kumaran in branch '3.3': Improve the d

[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

2013-09-11 Thread Senthil Kumaran
Senthil Kumaran added the comment: This is fixed in all versions. Thank you! -- nosy: +orsenthil resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed type: -> behavior ___ Python tracker