[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-01 Thread anon
anon added the comment: Above I included a first attempt however I don't think my code is good and I couldn't figure out the case for negative integers. There's some discussion above about its inclusion. I like your x.bits suggestion actually, assuming x.bits returns an IntBitsView object wit

[issue14573] json iterencode can not handle general iterators

2014-10-01 Thread Alfred Morgan
Alfred Morgan added the comment: Need a patch? Here you go. https://github.com/Zectbumo/cpython/compare/master How to use it: encoder = JSONEncoder(stream=True) This will iterencode() iterators as lists and file objects as strings and stream them when constructed with stream=True. -

[issue22528] Missing hint to source code

2014-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset b51742cb1685 by Georg Brandl in branch '3.4': closes #22528: add source links to symtable and compileall https://hg.python.org/cpython/rev/b51742cb1685 New changeset 5144c7d0ef29 by Georg Brandl in branch '2.7': closes #22528: add source links to sy

[issue19342] Improve grp module docstrings

2014-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset de0ca868d44f by Georg Brandl in branch '2.7': Closes #19342: improve docstrings in grp module. https://hg.python.org/cpython/rev/de0ca868d44f -- ___ Python tracker ___

[issue19342] Improve grp module docstrings

2014-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset e2b757baaef1 by Georg Brandl in branch '3.4': Closes #19342: improve docstrings in grp module. https://hg.python.org/cpython/rev/e2b757baaef1 -- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed

[issue19342] Improve grp module docstrings

2014-10-01 Thread Georg Brandl
Georg Brandl added the comment: LGTM. -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue22537] Failure building 2.7 docs on Windows

2014-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset fd2530294d50 by Georg Brandl in branch '2.7': Closes #22537: Make sphinx extensions compatible with Python 2 or 3, like in the 3.x branches https://hg.python.org/cpython/rev/fd2530294d50 -- nosy: +python-dev resolution: -> fixed stage: nee

[issue22536] subprocess should include filename in FileNotFoundError exception

2014-10-01 Thread Ned Deily
Changes by Ned Deily : -- assignee: ronaldoussoren -> components: +Library (Lib) -Interpreter Core, Macintosh nosy: +gregory.p.smith title: Missing filename in FileNotFoundError -> subprocess should include filename in FileNotFoundError exception versions: +Python 3.5 -Python 3.4

[issue22537] Failure building 2.7 docs on Windows

2014-10-01 Thread Georg Brandl
Georg Brandl added the comment: > you now do need You always did :) However, it should not be a problem to make the extensions 2.x and 3.x compatible in both branches. -- ___ Python tracker _

[issue22103] bdist_wininst does not run install script

2014-10-01 Thread Ned Deily
Changes by Ned Deily : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> PyCFunction_New no longer exposed by python DLL breaking bdist_wininst installers ___ Python tracker _

[issue12029] Catching virtual subclasses in except clauses

2014-10-01 Thread Guido van Rossum
Guido van Rossum added the comment: ISTM Nick meant that the exception that was raised can't cause arbitrary code execution. On Wednesday, October 1, 2014, Antony Lee wrote: > > Antony Lee added the comment: > > "it looks like all the avenues for arbitrary code execution while checking > if an

[issue12029] Catching virtual subclasses in except clauses

2014-10-01 Thread Antony Lee
Antony Lee added the comment: "it looks like all the avenues for arbitrary code execution while checking if an exception handler matches a thrown an exception are closed off." This seems to be directly contradicted by your previous sentence: "the except clause accepts any expressions producing

[issue21971] Index and update turtledemo doc.

2014-10-01 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___ ___

[issue21971] Index and update turtledemo doc.

2014-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 191c83f7c850 by Terry Jan Reedy in branch '3.4': Issue #21971: Index and update turtledemo doc. https://hg.python.org/cpython/rev/191c83f7c850 -- nosy: +python-dev ___ Python tracker

[issue21971] Index and update turtledemo doc.

2014-10-01 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- assignee: -> terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue22523] [regression] Lib/ssl.py still references _ssl.sslwrap

2014-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1a36d4e8cf4e by Benjamin Peterson in branch '2.7': fix sslwrap_simple (closes #22523) https://hg.python.org/cpython/rev/1a36d4e8cf4e -- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _

[issue22538] turtledemo two_canvases reversion

2014-10-01 Thread Terry J. Reedy
New submission from Terry J. Reedy: The turtledemo two-canvases was fixed a couple of months ago but subsequent patches have returned its bad behavior. The first time selected, it runs but does not display the code. The second time, the code is displayed. Clicking start freezes the viewer b

[issue22537] Failure building 2.7 docs on Windows

2014-10-01 Thread Ned Deily
Ned Deily added the comment: Your analysis is correct: you now do need to use a 2.7 sphinx to build 2.7 docs. It looks like you may be using a 3.4 version of pip. However you invoke python2.7, try "python -m pip install sphinx". -- nosy: +ned.deily __

[issue22535] headerregistry.Address introduces extra quotes without addr_spec parameter

2014-10-01 Thread R. David Murray
R. David Murray added the comment: That example is wrong, but that fact weighs heavily in favor of the idea that the "natural" way to write it is the way it is in the example. Since this part of the email api is still provisional, I propose we change the signature of Address to be: Address(

[issue22537] Failure building 2.7 docs on Windows

2014-10-01 Thread Terry J. Reedy
New submission from Terry J. Reedy: I was able to build docs of all versions with the old system. When 3.4 was changed to the new system, 'pip install sphinx' installed everything needed so that 'sphinx-build -bhtml . build/html' in .../Doc (Devguide 7.5.2) works for 3.4 (and 3.5). "PYTHON=

[issue10109] itertools.product with infinite iterator cause MemoryError.

2014-10-01 Thread yegle
yegle added the comment: Found another example that shows horrible performance when using itertools.product: def gen(): l = [itertools.permutations(range(10)) for _ in range(10)] g = itertools.product(*l) for i in g: yield i A simple next() to this generator takes 16 seconds on my de

[issue22523] [regression] Lib/ssl.py still references _ssl.sslwrap

2014-10-01 Thread Alex Gaynor
Alex Gaynor added the comment: Updated patch fixes a refcounting issue spotted by gutworth. -- Added file: http://bugs.python.org/file36775/issue22523.diff ___ Python tracker ___

[issue19622] Default buffering for input and output pipes in subprocess module

2014-10-01 Thread Martin Panter
Martin Panter added the comment: I agree that it is misleading to say it matches Python 2 behaviour, as I said in my original post. Do you think I should reopen this and get that bit removed from the documentation? I don’t see an easy way to make the behaviour consistent in all cases. My unde

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-01 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue19342] Improve grp module docstrings

2014-10-01 Thread Mark Lawrence
Mark Lawrence added the comment: The patch only changes six lines. At a quick glance it seems fine to me so can we have a formal review please. -- nosy: +BreamoreBoy ___ Python tracker ___

[issue22536] Missing filename in FileNotFoundError

2014-10-01 Thread Michel Charpentier
New submission from Michel Charpentier: FileNotFoundError should contain a 'filename' information, as per its specification. It's 'None' after a failure to execute a subprocess. -- assignee: ronaldoussoren components: Interpreter Core, Macintosh files: bug.py messages: 228147 nosy: cha

[issue18982] Add tests for CLI of the calendar module

2014-10-01 Thread Mark Lawrence
Mark Lawrence added the comment: Just a gentle reminder guys. -- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 ___ Python tracker ___ _

[issue22534] Possible Memory Leak with 'shelve'

2014-10-01 Thread TJ
TJ added the comment: Put it in the while loop. Same result. Memory usage grows about 1 GiB per minute. -- ___ Python tracker ___ ___

[issue11646] 2to3: msvcrt.(get|put)ch -> (get|put)wch

2014-10-01 Thread Mark Lawrence
Mark Lawrence added the comment: The original function names are still listed and the wide versions have been added to the docs so this can be closed as "out of date". -- nosy: +BreamoreBoy ___ Python tracker

[issue17799] settrace docs are wrong about "c_call" events

2014-10-01 Thread Mark Lawrence
Mark Lawrence added the comment: @Ned can you provide a patch for this? -- nosy: +BreamoreBoy type: -> behavior versions: +Python 3.4, Python 3.5 -Python 3.3 ___ Python tracker

[issue17219] cross add Python's library directory when building python standard extensions

2014-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 222e0faa5fa9 by doko in branch '2.7': - Issue #17219: Add library build dir for Python extension cross-builds. https://hg.python.org/cpython/rev/222e0faa5fa9 New changeset c5f908c56fbd by doko in branch '3.4': - Issue #17219: Add library build dir f

[issue18096] bad library order returned by python-config.in

2014-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6316475af62d by doko in branch '2.7': - Issue #18096: Fix library order returned by python-config. https://hg.python.org/cpython/rev/6316475af62d New changeset b826ba76d1ce by doko in branch '3.4': - Issue #18096: Fix library order returned by pytho

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

2014-10-01 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: -brian.curtin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue21614] Case sensitivity problem in multiprocessing.

2014-10-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Can you try with Python 3.x? The import machinery is different there. -- nosy: +ncoghlan, pitrou ___ Python tracker ___

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

2014-10-01 Thread Steve Dower
Steve Dower added the comment: We could add an afxres.h file alongside install.rc that includes the code posted by Lorenz Aebi. That will avoid the auto-generation issue, though it may be overwritten if VS does actually generate code for it. (I had thought that file was generated on project c

[issue22533] Counter with no keys does not compare equal to Counter with keys which zero value

2014-10-01 Thread Ethan Furman
Ethan Furman added the comment: Exactly what operation is unary minus supposed to be? It seems to act like absolute value. -- ___ Python tracker ___ ___

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

2014-10-01 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: +steve.dower, tim.golden, zach.ware type: -> compile error ___ Python tracker ___ ___ Python-bugs

[issue22401] argparse: 'resolve' conflict handler damages the actions of the parent parser

2014-10-01 Thread paul j3
paul j3 added the comment: A simpler solution is to make a copy of each Action when importing a parent parser. The current practice is to just copy references. With a copy, an Action will belong to only one group and parser, and the 'resolve' handler will operate without problems. In the at

[issue21999] shlex: bug in posix mode handling of empty strings

2014-10-01 Thread Vinay Sajip
Vinay Sajip added the comment: I've updated the patch on #1521950 to address this case, and also added a test there (which is not in this patch). Thanks, RDM, for the notification. -- ___ Python tracker __

[issue22534] Possible Memory Leak with 'shelve'

2014-10-01 Thread Ned Deily
Ned Deily added the comment: What happens if you use xrange instead of range? >>> range(100).__sizeof__() 856 >>> xrange(100).__sizeof__() 56 -- nosy: +ned.deily ___ Python tracker

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

2014-10-01 Thread Cybjit
Cybjit added the comment: Building bdist_wininst with VS2010 Express also gives RC1015. With this patch it works. -- nosy: +Cybjit ___ Python tracker ___ ___

[issue1521950] shlex.split() does not tokenize like the shell

2014-10-01 Thread Vinay Sajip
Changes by Vinay Sajip : Added file: http://bugs.python.org/file36772/80eea6bd898c.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue22103] bdist_wininst does not run install script

2014-10-01 Thread Cybjit
Cybjit added the comment: Turns out I had a build problem (#11598). 0c8f41ca9c94 + t.patch does actually solve the problem. -- ___ Python tracker ___

[issue22533] Counter with no keys does not compare equal to Counter with keys which zero value

2014-10-01 Thread Ned Deily
Changes by Ned Deily : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue22523] [regression] Lib/ssl.py still references _ssl.sslwrap

2014-10-01 Thread Alex Gaynor
Alex Gaynor added the comment: New patch resolves the issue. Turns out there were tests, but they weren't being run. Now they are. -- Added file: http://bugs.python.org/file36771/issue22523.diff ___ Python tracker

[issue22523] [regression] Lib/ssl.py still references _ssl.sslwrap

2014-10-01 Thread Alex Gaynor
Alex Gaynor added the comment: My patch is incomplete, I'm working on an improved one. -- ___ Python tracker ___ ___ Python-bugs-list

[issue22533] Counter with no keys does not compare equal to Counter with keys which zero value

2014-10-01 Thread Josh Rosenberg
Josh Rosenberg added the comment: Reading the note on the Counter class (about intent vs. actual use), it looks like changing this behavior would involve potentially breaking a lot of code. If you're using Counters that are intended to maintain positive counts (treating a count <= 0 as if the

[issue22523] [regression] Lib/ssl.py still references _ssl.sslwrap

2014-10-01 Thread Alex Gaynor
Alex Gaynor added the comment: Attached patch sound fix the issue. I guess this function has no tests :-( -- keywords: +needs review, patch Added file: http://bugs.python.org/file36770/issue22523.diff ___ Python tracker

[issue20076] Add UTF-8 locale aliases

2014-10-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue22535] headerregistry.Address introduces extra quotes without addr_spec parameter

2014-10-01 Thread Kristian Rother
New submission from Kristian Rother: I am trying to create an email address as in the Python doc example https://docs.python.org/3/library/email-examples.html The example does not work as given on the page. I tried Python 3.4rc1 and the 3.5 compiled from source on Ubuntu 12. I found two possi

[issue22534] Possible Memory Leak with 'shelve'

2014-10-01 Thread TJ
New submission from TJ: The following code causes memory usage to grow excessively. ''' import shelve def func(): for i in range(100): sh = shelve.open('blah') sh.close() func() ''' -- components: Library (Lib) messages: 228127 nosy: tjhnson priority: normal se

[issue17780] the test suite should use a TEMPDIR in the build directory, not the source directory

2014-10-01 Thread Mark Lawrence
Mark Lawrence added the comment: @Matthias can you provide a patch for this? -- nosy: +BreamoreBoy ___ Python tracker ___ ___ Python-b

[issue20079] Add support for glibc supported locales

2014-10-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue20079] Add support for glibc supported locales

2014-10-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your review Marc-Andre. See also related issue20087. -- ___ Python tracker ___ ___

[issue17784] the test suite should honor an http_proxy for running the test suite

2014-10-01 Thread Mark Lawrence
Mark Lawrence added the comment: @Matthias can you provide a patch for this? -- nosy: +BreamoreBoy type: -> enhancement versions: +Python 3.5 ___ Python tracker ___

[issue20076] Add UTF-8 locale aliases

2014-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset c4284fa75ec7 by Serhiy Storchaka in branch '2.7': Issue #20076: Added non derived UTF-8 aliases to locale aliases table. https://hg.python.org/cpython/rev/c4284fa75ec7 New changeset 3bff73df6dab by Serhiy Storchaka in branch '3.4': Issue #20076: Add

[issue17753] test_zipfile: requires write access to test and email.test

2014-10-01 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: +alanmcintyre, serhiy.storchaka type: -> behavior versions: +Python 3.5 -Python 3.3 ___ Python tracker ___ __

[issue17582] xml.etree.ElementTree does not preserve whitespaces in attributes

2014-10-01 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: +eli.bendersky, scoder type: -> behavior versions: +Python 3.4, Python 3.5 -Python 3.2 ___ Python tracker ___ ___

[issue17446] doctest test finder doesnt find line numbers of properties

2014-10-01 Thread Mark Lawrence
Mark Lawrence added the comment: @Ronny can you provide a patch for this? -- nosy: +BreamoreBoy type: -> behavior versions: +Python 2.7, Python 3.4, Python 3.5 ___ Python tracker __

[issue8138] wsgiref.simple_server.SimpleServer claims to be multithreaded

2014-10-01 Thread Mark Lawrence
Mark Lawrence added the comment: @Santiago can you provide a patch for this issue? -- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.4, Python 3.5 -Python 2.6 ___ Python tracker _

[issue20076] Add UTF-8 locale aliases

2014-10-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: After applying patch from issue20079, pa_pk.utf8, te_in.utf8, and zh_sg.utf8 are eliminated from this patch. -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: @anon: if there is a patch, any committer here can get it into 3.5. You'll recognize them as they have a nice Python logo next to their usernames ;-) If you want to try your hand at a patch, see https://docs.python.org/devguide/ By the way, I think it would be

[issue9274] code.InteractiveInterpreter fails to change locals when invoked in a function

2014-10-01 Thread Mark Lawrence
Mark Lawrence added the comment: @Eric can you provide a doc patch for this? -- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 2.6, Python 3.1, Python 3.2 ___ Python tracker ___

[issue20079] Add support for glibc supported locales

2014-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 810542d07b4e by Serhiy Storchaka in branch 'default': Issue #20079: Added locales supported in glibc 2.18 to locale alias table. https://hg.python.org/cpython/rev/810542d07b4e New changeset 00e4190b308f by Serhiy Storchaka in branch '3.4': Issue #20

[issue4609] Allow use of > 256 FD's on solaris in 32 bit mode

2014-10-01 Thread Mark Lawrence
Mark Lawrence added the comment: @Peter could you provide a patch for this? -- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.2 ___ Python tracker ___

[issue21614] Case sensitivity problem in multiprocessing.

2014-10-01 Thread Nathan McCorkle
Nathan McCorkle added the comment: I've just got done experiencing this bug. It would be much more helpful if the error message was a bit more helpful (I had no idea where to start looking with the "ImportError: No module named [moduleStartingMultiprocess]" exception message) -- nosy:

[issue19855] uuid._find_mac fails if an executable not in /sbin or /usr/sbin

2014-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7ce56727edc7 by Georg Brandl in branch '3.2': ref #19855: skip uuid test_find_mac on non-Posix as in later branches https://hg.python.org/cpython/rev/7ce56727edc7 -- ___ Python tracker

[issue19855] uuid._find_mac fails if an executable not in /sbin or /usr/sbin

2014-10-01 Thread Georg Brandl
Changes by Georg Brandl : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue19855] uuid._find_mac fails if an executable not in /sbin or /usr/sbin

2014-10-01 Thread Georg Brandl
Georg Brandl added the comment: I see test failures on Windows: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%20custom/builds/62/steps/test/logs/stdio http://buildbot.python.org/all/builders/x86%20Windows7%20custom/builds/52/steps/test/logs/stdio Do the tests need changing too

[issue20079] Add support for glibc supported locales

2014-10-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, sorry, issue20076 doesn't eliminate additions in this issue, but vice verse this issue eliminates some additions of issue20076. So this patch should be applied first. -- assignee: -> serhiy.storchaka ___ Pyth

[issue22533] Counter with no keys does not compare equal to Counter with keys which zero value

2014-10-01 Thread Ethan Furman
New submission from Ethan Furman: According to the docs [1]: > Counter objects have a dictionary interface except that they return a > zero count for missing items instead of raising a KeyError Which a simple test confirms: --> Counter()['b'] 0 However, if the key is present but set to zero,

[issue22492] small addition to print() docs: no binary streams.

2014-10-01 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- assignee: -> terry.reedy resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue22492] small addition to print() docs: no binary streams.

2014-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9b519f72860a by Terry Jan Reedy in branch '3.4': Issue 22492: Be explicit that print does not support binary mode files. https://hg.python.org/cpython/rev/9b519f72860a -- nosy: +python-dev ___ Python trac

[issue22103] bdist_wininst does not run install script

2014-10-01 Thread Cybjit
Cybjit added the comment: 3f7d5c235d82 runs script, 70ea05f762a1 does not. 0c8f41ca9c94 + t.patch from #21354 does not run script. -- ___ Python tracker ___

[issue17293] uuid.getnode() MAC address on AIX

2014-10-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Aivars for your patch. I have verified and confirm that this method works on AIX and True64 UNIX (it should also work on IRIX, but I can't login in Snakebite's i6). Here is modified patch. MAC address is now searched only in column with the "Addre

[issue18096] bad library order returned by python-config.in

2014-10-01 Thread Logan Chien
Logan Chien added the comment: It seems that this is still reproducible with Python 3.5 (dev) by running: $ gcc test.c `python3-config --includes --ldflags` cpython-install/lib/python3.5/config-3.5m/libpython3.5m.a(pytime.o): In function `_PyTime_ObjectToTime_t': cpython-build/../cpython/Pytho

[issue19622] Default buffering for input and output pipes in subprocess module

2014-10-01 Thread Ryan
Ryan added the comment: This is not fixed. The documentation may be more correct now, but the behavior still does not match Python 2 as purported. The default bufsize changed in 3.3.1 is incorrect, at least when tested in 3.4.0 and 3.4.1. Here is a test for systems with cat available. im

[issue21356] Support LibreSSL (instead of OpenSSL): make RAND_egd optional

2014-10-01 Thread Andrej A Antonov
Changes by Andrej A Antonov : -- nosy: +polymorphm ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue22515] Implement partial order on Counter

2014-10-01 Thread Ethan Furman
Ethan Furman added the comment: [1] https://docs.python.org/3/library/collections.html#collections.Counter -- ___ Python tracker ___ _

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-01 Thread anon
anon added the comment: I noticed feature freeze for 3.5 is in May 2015 which is actually only 7-8 months. It'd be really awesome if this feature could make it. Is there anyone who can get this into 3.5? -- status: open -> pending ___ Python tracker

[issue22512] 'test_distutils.test_bdist_rpm' causes creation of directory '.rpmdb' on home dir

2014-10-01 Thread Francis MB
Francis MB added the comment: I have to thank for your time, David! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue22515] Implement partial order on Counter

2014-10-01 Thread Ram Rachum
Ram Rachum added the comment: Ah, now I understand you Stefan. That sounds like a good scheme; let any comparison errors between the values simply propagate up. -- ___ Python tracker __

[issue22515] Implement partial order on Counter

2014-10-01 Thread Ethan Furman
Ethan Furman added the comment: I have to disagree. The intent is clearly expressed in the docs [1]. However, if I have a need to deal with partial amounts (say, 2.5 apples because I gave half of one to my horse ;), Counter will still work with that: --> treats = Counter({'carrots':12, 'ap

[issue22515] Implement partial order on Counter

2014-10-01 Thread Stefan Behnel
Stefan Behnel added the comment: I'd raise an exception whenever the values of the Counter turn out to be uncomparable. If users manage to fill Counters with non-number values that are comparable amongst each other, or even if each key has a value of a different type, why not just support that

[issue22515] Implement partial order on Counter

2014-10-01 Thread Ram Rachum
Ram Rachum added the comment: Stefan: If you'd want to raise an exception, you'll need to define in which cases. Should it raise an exception for decimal numbers? Complex numbers? etc. Personally I'd enjoy it raising exceptions in as many situations as possible (so we could keep Counter usage

[issue22515] Implement partial order on Counter

2014-10-01 Thread Stefan Behnel
Stefan Behnel added the comment: > That does seem odd -- how can you have 'b' of something? Don't ask this kind of question as long as any math guys are listening. But seriously, I consider this proposal reasonable. If the problem is that the counter values can be non-integers, then why not ju

[issue22515] Implement partial order on Counter

2014-10-01 Thread Ram Rachum
Ram Rachum added the comment: The real problem is that `Counter` was put into the standard library with such lenient conditions on how it should be used-- basically looking at it as a `dict` subclass rather than a counter, putting emphasis on implementation rather than purpose, which was a mis

[issue22187] commands.mkarg() buggy in East Asian locales

2014-10-01 Thread Glyph Lefkowitz
Glyph Lefkowitz added the comment: Would simply replacing this function with pipes.quote resolve the issue? -- nosy: +glyph ___ Python tracker ___ ___

[issue22515] Implement partial order on Counter

2014-10-01 Thread Ethan Furman
Ethan Furman added the comment: That does seem odd -- how can you have 'b' of something? -- ___ Python tracker ___ ___ Python-bugs-lis

[issue22515] Implement partial order on Counter

2014-10-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I'll go with +0.5. :) I was going to make a joke about Counters only accepting integral values, but the constructor is actually quite laxist: >>> Counter({'a': 2.5}) Counter({'a': 2.5}) >>> Counter({'a': 2.5 + 1j}) Counter({'a': (2.5+1j)}) >>> Counter({'a':

[issue19529] Fix unicode_aswidechar() with 4byte unicode and 2byte wchar_t, for AIX

2014-10-01 Thread Georg Brandl
Georg Brandl added the comment: Committed in 18983332626b. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue20218] Add methods to `pathlib.Path`: `write_text`, `read_text`, `write_bytes`, `read_bytes`

2014-10-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks, Georg! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue20218] Add methods to `pathlib.Path`: `write_text`, `read_text`, `write_bytes`, `read_bytes`

2014-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset a4da150fbfd4 by Georg Brandl in branch 'default': Closes #20218: Added convenience methods read_text/write_text and read_bytes/ https://hg.python.org/cpython/rev/a4da150fbfd4 -- nosy: +python-dev resolution: -> fixed stage: -> resolved sta

[issue22515] Implement partial order on Counter

2014-10-01 Thread Ram Rachum
Ram Rachum added the comment: If/when there's general agreement that this functionality should be merged in (assuming the implementation is acceptable), let me know and I'll be happy to write the code and tests. -- ___ Python tracker

[issue22515] Implement partial order on Counter

2014-10-01 Thread Ethan Furman
Ethan Furman added the comment: I'll go with +0.5. :) If this goes in, I think a missing key in either Counter should default to 0 for purposes of the ordering. -- stage: -> test needed ___ Python tracker _

[issue9949] os.path.realpath on Windows does not follow symbolic links

2014-10-01 Thread Thomas Kluyver
Changes by Thomas Kluyver : -- nosy: +takluyver ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue22515] Implement partial order on Counter

2014-10-01 Thread Steven D'Aprano
Steven D'Aprano added the comment: Ethan said: > If it is so specialized as to only be needed in complex combinatorial > calculations, does it belong in the general-purpose part of the > language? It's a multi-set, a general purpose and fairly fundamental data type. https://en.wikipedia.org/

[issue22515] Implement partial order on Counter

2014-10-01 Thread Ethan Furman
Ethan Furman added the comment: --> s1 = set([1]) --> s2 = set([1, 2]) --> s3 = set([1, 2, 3]) --> s4 = set([2]) --> s5 = set([2, 3]) --> s6 = set([3]) --> l = [s1, s2, s3, s4, s5, s6] --> sorted(l) [{1}, {2}, {1, 2}, {3}, {2, 3}, {1, 2, 3}] --> s1 < s4 False --> s4 < s2 True --> s1 < s2 True

[issue22515] Implement partial order on Counter

2014-10-01 Thread Ram Rachum
Ram Rachum added the comment: I don't see why it's so hard to imagine how this will be used. Say I have a counter signifying how many of each product I have in my warehouse, and I have another counter saying how many of each product a client wants. I may use `counter2 <= counter1` to check whe

[issue22515] Implement partial order on Counter

2014-10-01 Thread Ethan Furman
Ethan Furman added the comment: If it is so specialized as to only be needed in complex combinatorial calculations, does it belong in the general-purpose part of the language? After all, we have the math and cmath modules for more specialized arithmetic operations. -- __

  1   2   >