[issue22379] Empty exception message of str.join

2014-09-27 Thread Yongzhi Pan
Yongzhi Pan added the comment: Do the patches still have problems? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue22253] ConfigParser does not handle files without sections

2014-09-27 Thread Martin Panter
Martin Panter added the comment: See also Issue 549037, about handling files with a single anonymous section -- ___ Python tracker ___ ___

[issue21329] configparser can't parse MySQL style config

2014-09-27 Thread Martin Panter
Martin Panter added the comment: See Issue 12662 for a related earlier proposal. (Although the multimap proposal here sounds better than concatenating the values as proposed there.) -- nosy: +vadmium ___ Python tracker

[issue22509] Website incorrect link

2014-09-27 Thread Ned Deily
Ned Deily added the comment: Thanks for the report. However, as noted on the python.org web site help page, https://www.python.org/about/help/, the place to report web site problems is here: https://github.com/python/pythondotorg/issues/ I've opened a new issue there on your behalf: https://

[issue20164] Undocumented KeyError from os.path.expanduser

2014-09-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think the doc should be considered correct and posixpath buggy. The ntpath code checks for the existence of HOME and substitutes before returning the arg unchanged, as documented. if 'HOME' in os.environ: userhome = os.environ['HOME'] elif '

[issue10496] Python startup should not require passwd entry

2014-09-27 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> patch review versions: +Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker ___ ___ Python

[issue22509] Website incorrect link

2014-09-27 Thread Prof Oak
New submission from Prof Oak: On the python.org website, if you follow the link to PFS on the top, then click on the media tab (not any of the items in the dropdown menu), it takes you to this web page: https://www.python.org/inner/ It looks to be a sample page. -- assignee: docs@pyth

[issue22506] `dir` on Enum subclass doesn't expose parent class attributes

2014-09-27 Thread Ethan Furman
Ethan Furman added the comment: More just a note to myself to research this further, to see exactly what does and does not get inherited. Any tests added will likely be more comprehensive than your example. -- ___ Python tracker

[issue9179] Lookback with group references incorrect (two issues?)

2014-09-27 Thread Mark Lawrence
Mark Lawrence added the comment: Given the comment from Matthew Barnett in msg109399 "...I had a look at the re module, found it too difficult..." can this be closed as "won't fix"? -- nosy: +BreamoreBoy, serhiy.storchaka ___ Python tracker

[issue19062] Idle: problem confighandler getting userdir

2014-09-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: The fact that Idle quits when there is a problem getting (or writing to) the home directory is a design bug discussed in #8231. I do not see any other bug with Idle. So I am closing this as a duplicate. -- resolution: -> duplicate stage: test needed

[issue20135] FAQ need list mutation answers

2014-09-27 Thread R. David Murray
R. David Murray added the comment: Here is my version of Ezio's patch. -- Added file: http://bugs.python.org/file36748/mutable_faq.patch ___ Python tracker ___ __

[issue22103] bdist_wininst does not run install script

2014-09-27 Thread Ned Deily
Changes by Ned Deily : -- nosy: +steve.dower, tim.golden, zach.ware ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue22139] python windows 2.7.8 64-bit did not install

2014-09-27 Thread Henning von Bargen
Henning von Bargen added the comment: Martin, while I technically understand your anwers, I have to say that from an ordinary developer's perspective, the behavior is actually *not* expected. It may be expected for python-dev experts, but not for those who are just programming _with_ python.

[issue22506] `dir` on Enum subclass doesn't expose parent class attributes

2014-09-27 Thread Ram Rachum
Ram Rachum added the comment: Ethan, I saw you just marked this as "test needed". I just gave you code to reproduce this problem. Isn't that sufficient? Or you want me to do add it to Python's test suite? -- ___ Python tracker

[issue22506] `dir` on Enum subclass doesn't expose parent class attributes

2014-09-27 Thread Ethan Furman
Changes by Ethan Furman : -- stage: -> test needed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue22505] Expose an Enum object's serial number

2014-09-27 Thread Ethan Furman
Ethan Furman added the comment: Yes, we're sure. ;) Enums have a definition order to aid in the use-case of auto-numbering, and to make displays consistent. However, the basic Enum type is unordered. I do not see a serial number as being an intrinsic property of an enum -- outside of auto-n

[issue21044] tarfile does not handle file .name being an int

2014-09-27 Thread R. David Murray
Changes by R. David Murray : -- stage: commit review -> test needed versions: +Python 2.7 -Python 3.4, Python 3.5 ___ Python tracker ___ _

[issue22504] Add ordering between `Enum` objects

2014-09-27 Thread Ethan Furman
Ethan Furman added the comment: Enums have a definition order to aid in the use-case of auto-numbering, and to make displays consistent. However, the basic Enum type is unordered. If you need/want your particular enum type to be ordered, mix-in the ordered magic methods. -- assignee:

[issue10766] optparse uses %s in gettext calls

2014-09-27 Thread R. David Murray
R. David Murray added the comment: OK, since there seems to be some concern about backward compatibility (in the related argparse issue) and optparse is indeed no longer maintained, let's close this. -- resolution: -> rejected stage: commit review -> resolved status: open -> closed _

[issue21578] Misleading error message when ImportError called with invalid keyword args

2014-09-27 Thread R. David Murray
R. David Murray added the comment: The standard error message for this case is: xxx() got an unexpected keyword argument 'foo' I have no idea where that gets generated (a grep didn't teach me anything useful), but I think it would make sense to use that form for the message. I think the fix

[issue17849] Missing size argument in readline() method for httplib's class LineAndFileWrapper

2014-09-27 Thread R. David Murray
R. David Murray added the comment: I tried the patch, but the test fails for me: test test_httplib failed -- Traceback (most recent call last): File "/home/rdmurray/python/p27/Lib/test/test_httplib.py", line 434, in test_proxy_tunnel_without_status_line conn.set_tunnel('foo') File "/hom

[issue22508] Remove __version__ string from email

2014-09-27 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 27, 2014, at 09:05 PM, R. David Murray wrote: >There is no longer a concept of a separate 'email' release from the stdlib >release. The __version__ string didn't get updated in either 3.3 or 3.4 (my >fault). I propose that we simply delete the __versio

[issue16837] Number ABC can be instantiated

2014-09-27 Thread Claudiu Popa
Claudiu Popa added the comment: I'd say that this should be fixed, it breaks the expectancy imposed by the documentation, so +1 from me. -- nosy: +Claudiu.Popa ___ Python tracker __

[issue22508] Remove __version__ string from email

2014-09-27 Thread R. David Murray
New submission from R. David Murray: There is no longer a concept of a separate 'email' release from the stdlib release. The __version__ string didn't get updated in either 3.3 or 3.4 (my fault). I propose that we simply delete the __version__ variable from __init__.py (patch attached). Any

[issue16837] Number ABC can be instantiated

2014-09-27 Thread Claudiu Popa
Changes by Claudiu Popa : -- components: +Library (Lib) versions: +Python 3.5 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list

[issue22251] Various markup errors in documentation

2014-09-27 Thread Berker Peksag
Berker Peksag added the comment: I was using Sphinx 1.2.2 and found two related issues: issue 16805 and issue 20961. I've just upgraded Sphinx to 1.2.3, did a clean checkout, reverted the changes and everything looks good. Sorry for the noise! -- status: open -> closed _

[issue22251] Various markup errors in documentation

2014-09-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0b84904c9471 by Berker Peksag in branch '3.4': Revert #22251 https://hg.python.org/cpython/rev/0b84904c9471 New changeset 78ae78f967f1 by Berker Peksag in branch 'default': Revert #22251 https://hg.python.org/cpython/rev/78ae78f967f1 -- __

[issue10510] distutils upload/register should use CRLF in HTTP requests

2014-09-27 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___ _

[issue10510] distutils upload/register should use CRLF in HTTP requests

2014-09-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5e3f8bd33cf2 by R David Murray in branch '3.4': #10510: make distuitls upload/register use HTML standards compliant CRLF. https://hg.python.org/cpython/rev/5e3f8bd33cf2 New changeset ea665bae2ea0 by R David Murray in branch 'default': Merge: #10510:

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2014-09-27 Thread eryksun
eryksun added the comment: MSC has __declspec(deprecated). See http://stackoverflow.com/a/21265197, for example. It's a level 3 (/W3) warning. http://msdn.microsoft.com/en-us/library/ttcz0bys%28v=vs.100%29.aspx -- nosy: +eryksun ___ Python tracker

[issue22506] `dir` on Enum subclass doesn't expose parent class attributes

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

[issue22504] Add ordering between `Enum` objects

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

[issue22251] Various markup errors in documentation

2014-09-27 Thread R. David Murray
R. David Murray added the comment: I suppose this is one disadvantage of using the system sphinx when 'make html' is run? -- nosy: +r.david.murray status: closed -> open ___ Python tracker

[issue22251] Various markup errors in documentation

2014-09-27 Thread Georg Brandl
Georg Brandl added the comment: These "errors" are all valid markup. They would have been discovered much earlier had they been errors. Please consider checking why your Sphinx setup produces the errors, fixing it and then reverting the changes. -- __

[issue22251] Various markup errors in documentation

2014-09-27 Thread Berker Peksag
Berker Peksag added the comment: See issue 16805 for a similar issue. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue22251] Various markup errors in documentation

2014-09-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0ec56e677bc3 by Berker Peksag in branch '3.4': Issue #22251: Fix ReST markup to avoid errors building docs. https://hg.python.org/cpython/rev/0ec56e677bc3 New changeset ed1dbac90b92 by Berker Peksag in branch 'default': Issue #22251: Fix ReST markup

[issue22251] Various markup errors in documentation

2014-09-27 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue22103] bdist_wininst does not run install script

2014-09-27 Thread Cybjit
Cybjit added the comment: Probably caused by issue #21354 -- nosy: +Cybjit ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue16252] bytes and bytearray methods are undocumented

2014-09-27 Thread Berker Peksag
Berker Peksag added the comment: Fixed in issue 21777. -- nosy: +berker.peksag resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker __

[issue10702] bytes and bytearray methods are not documented

2014-09-27 Thread Berker Peksag
Berker Peksag added the comment: Fixed in issue 21777. -- nosy: +berker.peksag resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker __

[issue16537] Python’s setup.py raises a ValueError when self.extensions is empty

2014-09-27 Thread Berker Peksag
Berker Peksag added the comment: Committed. Thanks for the patch, Jonathan! -- assignee: -> berker.peksag nosy: +berker.peksag resolution: -> fixed stage: commit review -> resolved status: open -> closed versions: +Python 3.5 -Python 3.2, Python 3.3 ___

[issue16537] Python’s setup.py raises a ValueError when self.extensions is empty

2014-09-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6946036f21ef by Berker Peksag in branch '2.7': Issue #16537: Check whether self.extensions is empty in setup.py. https://hg.python.org/cpython/rev/6946036f21ef -- ___ Python tracker

[issue16537] Python’s setup.py raises a ValueError when self.extensions is empty

2014-09-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset a169ee4f254a by Berker Peksag in branch '3.4': Issue #16537: Check whether self.extensions is empty in setup.py. https://hg.python.org/cpython/rev/a169ee4f254a New changeset 491a4d3e2bdd by Berker Peksag in branch 'default': Issue #16537: Check whet

[issue18854] is_multipart and walk should document their treatment of 'message' parts.

2014-09-27 Thread R. David Murray
R. David Murray added the comment: Thanks Abhilash. I decided to use the full example after all, but tuned up the language a bit. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed type: -> behavior versions: +Python 3.5 -Python 3.3 _

[issue18854] is_multipart and walk should document their treatment of 'message' parts.

2014-09-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset b717128799b5 by R David Murray in branch '3.4': #18854: make it explicit that is_multipart does not mean 'multipart/xxx'. https://hg.python.org/cpython/rev/b717128799b5 New changeset 9909de463dc9 by R David Murray in branch 'default': Merge: #18854:

[issue20974] email module docs say not compatible with current python version

2014-09-27 Thread R. David Murray
R. David Murray added the comment: I've updated the table (thanks for the patch) but noted that after 5.1/3.2 there is no independent email version. I'd like to just delete __version__ in 3.5, but I don't know if I have to deprecate the constant first :) It didn't get updated in 3.3 or 3.4,

[issue20974] email module docs say not compatible with current python version

2014-09-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2eea52c287b7 by R David Murray in branch '3.4': #20974: Update version table in email intro. https://hg.python.org/cpython/rev/2eea52c287b7 New changeset 655b34cd8871 by R David Murray in branch 'default': Merge: #20974: Update version table in emai

[issue7665] test_urllib2 and test_ntpath fail if path contains "\"

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The ntpath test failure is replicated when the test is ran directly: ~/py/cpython\1$ ./python Lib/test/test_ntpath.py sE. == ERROR: test_relpath (__main__.T

[issue22486] Add math.gcd()

2014-09-27 Thread Stefan Behnel
Stefan Behnel added the comment: My personal take is: if there is an implementation in the stdlib, it should be the one that's most widely applicable. And that includes large numbers. We have a working implementation that is algorithmically faster for large numbers, so I can't see why we shoul

[issue9104] test.support method for dual-testing accelerated code (fixes test_exceptions and other's pickle testing)

2014-09-27 Thread R. David Murray
R. David Murray added the comment: Looks like there is still some disagreement about the implementation here, so this isn't actually ready to commit yet? -- resolution: accepted -> stage: commit review -> needs patch title: test_exceptions does not test pickling with pickle.py -> test.

[issue22501] Optimise PyLong division by 1 or -1

2014-09-27 Thread Stefan Behnel
Stefan Behnel added the comment: One more comment: I also benchmarked the change in long_true_div() now and found that it's only a minor improvement for large numbers and a *pessimisation* for small numbers: Before: $ ./python -m timeit -s 'x = 5' 'x / -1' 1000 loops, best of 3: 0.0313 us

[issue4755] Add function to get common path prefix

2014-09-27 Thread Skip Montanaro
Skip Montanaro added the comment: Feel free to close this ticket. I long ago gave up on it. -- ___ Python tracker ___ ___ Python-bugs-l

[issue6623] Lib/ftplib.py Netrc class should be removed.

2014-09-27 Thread R. David Murray
R. David Murray added the comment: Great. The patch looks good to me, too. Can someone add a What's New removal entry to the patch? (See the 3.4 What's New for a model of what removals look like in What's New.) (It would also be nice if the patch were in hg format so that we get a 'review'

[issue22507] PyType_IsSubtype doesn't call __subclasscheck__

2014-09-27 Thread Maries Ionel Cristian
New submission from Maries Ionel Cristian: It appears it just does a reference check: https://hg.python.org/cpython/file/3.4/Objects/typeobject.c#l1300 It appears it's the same in 2.7: https://hg.python.org/cpython/file/2.7/Objects/typeobject.c#l1161 But this is not the intended behaviour rig

[issue6623] Lib/ftplib.py Netrc class should be removed.

2014-09-27 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list maili

[issue6623] Lib/ftplib.py Netrc class should be removed.

2014-09-27 Thread Francis MB
Francis MB added the comment: I've downloaded 'remove_Netrc_class2.patch' and passes the test suite, the examples on the documentation run ok and manually from the command line: $hg tip changeset: 92597:e29866cb6b98 tag: tip parent: 92594:d43d4d4ebf2c parent: 92596:54987723d

[issue19062] Idle: problem confighandler getting userdir

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I suppose that on patrick's computeron his account (but not on admin account) HOME is literal "%userprofile%". It looks as just misconfiguration. -- nosy: +serhiy.storchaka ___ Python tracker

[issue20021] "modernize" makeopcodetargets.py

2014-09-27 Thread Berker Peksag
Berker Peksag added the comment: Here's a patch. -- keywords: +patch nosy: +berker.peksag, brett.cannon stage: needs patch -> patch review Added file: http://bugs.python.org/file36745/issue20021.diff ___ Python tracker

[issue22505] Expose an Enum object's serial number

2014-09-27 Thread Ram Rachum
Ram Rachum added the comment: > Enum members are also defined to be unordered, so their serial number is > meaningless. Are you sure? The documentation says "Enumerations support iteration, in definition order" and shows how `tuple(MyEnum)` outputs the values in definition order. > Likewise

[issue22505] Expose an Enum object's serial number

2014-09-27 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 27, 2014, at 04:15 PM, Ram Rachum wrote: >The main principle is: If something has an important property (in this case >an enum object's numerical value), it should be publicly exposed. I think this is a misunderstanding. Only IntEnum members have a def

[issue20267] TemporaryDirectory does not resolve path when created using a relative path

2014-09-27 Thread Yury Selivanov
Yury Selivanov added the comment: > Note that abspath() can return incorrect result in case of symbolic links to > directories and pardir components. I.e. abspath('symlink/..'). Good catch.. Should I use os.path.realpath? -- ___ Python tracker

[issue4755] Add function to get common path prefix

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is more developed patch in issue10395. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue11479] Add discussion of trailing backslash in raw string to tutorial

2014-09-27 Thread R. David Murray
R. David Murray added the comment: I'm on a quest to clear my 'commit ready' queue. This issue needs to go back to 'needs patch' stage...I'll leave it to someone else to rewrite my original patch based on the feedback, since it is unlikely I will get back to it any time soon. I'll commit it

[issue16121] shlex.shlex.error_leader() reports incorrect line number

2014-09-27 Thread R. David Murray
R. David Murray added the comment: I think I'll leave it up to whoever works on this whether they want to tackle making posix mode and non-posix mode return the same values or turn this into an enhancement ticket for the proposed wrapped_lineno. Or, if no one is interested, we can just close

[issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This looks to me as documentation issue. Unfortunately it is not explicitly documented that os.path.join() shouldn't mix str and unicode components (except ascii-only str, such as '.'). There is relevant note in 3.x documentation. It should be adapted to 2.7

[issue11102] configure doesn't find "major()" on HP-UX v11.31

2014-09-27 Thread R. David Murray
Changes by R. David Murray : -- nosy: -r.david.murray stage: commit review -> needs patch versions: +Python 3.4, Python 3.5 ___ Python tracker ___ __

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Deprecated macros can be replaced by deprecated functions. -- ___ Python tracker ___ ___ Python-bu

[issue22505] Expose an Enum object's serial number

2014-09-27 Thread Ram Rachum
Ram Rachum added the comment: > https://docs.python.org/3/library/enum.html#orderedenum As I said in the other ticket: I can easily use a subclass, but I think it's general enough functionality for it to be included in the standard library. I could continue the discussion about databases, but

[issue22504] Add ordering between `Enum` objects

2014-09-27 Thread Ram Rachum
Ram Rachum added the comment: My particular use case is that I have objects with a tuple of enum objects to each, and I want the tuple to be in canonical order rather than random, for convenience. I can easily use a subclass, but I think it's general enough functionality for it to be included

[issue22505] Expose an Enum object's serial number

2014-09-27 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 27, 2014, at 02:59 PM, Ram Rachum wrote: >Right now I want it for this: > >http://bugs.python.org/issue22504 https://docs.python.org/3/library/enum.html#orderedenum >Another use case I can think of is that if you store enum values in a >database, you'

[issue22496] urllib2 fails against IIS (urllib2 can't parse 401 reply www-authenticate headers)

2014-09-27 Thread Daniel Holth
Daniel Holth added the comment: I am not the copyright holder, I only maintain the pypi package for python-ntlm. I might have 10 lines of my own code in the whole package. If running on Windows it would be great to have out of the box "native windows NTLM" which can be done somehow with the win3

[issue22504] Add ordering between `Enum` objects

2014-09-27 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: https://docs.python.org/3/library/enum.html#orderedenum -- ___ Python tracker ___ ___ Python-bugs-l

[issue9850] obsolete macpath module dangerously broken and should be removed

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Committed macpath_join_fix_with_test.patch with some additional tests. Thank you for your contribution Oleg. Needed a patch for deprecating all module or some functions. -- nosy: +serhiy.storchaka stage: commit review -> needs patch type: behavior ->

[issue22503] Signal stack overflow in faulthandler_user

2014-09-27 Thread R. David Murray
Changes by R. David Murray : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue22504] Add ordering between `Enum` objects

2014-09-27 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 27, 2014, at 03:35 PM, Ram Rachum wrote: >Just because I want to be able to get the `int` value of an enum object, >doesn't mean I want the enum object to *be* an `int`, which is what `IntEnum` >means. I don't want it to be comparable to an int, I don't

[issue9850] obsolete macpath module dangerously broken and should be removed

2014-09-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2ae2ca9d2b66 by Serhiy Storchaka in branch '2.7': Issue #9850: Fixed macpath.join() for empty first component. Patch by https://hg.python.org/cpython/rev/2ae2ca9d2b66 New changeset 54987723de99 by Serhiy Storchaka in branch '3.4': Issue #9850: Fixe

[issue22504] Add ordering between `Enum` objects

2014-09-27 Thread Ram Rachum
Ram Rachum added the comment: Just because I want to be able to get the `int` value of an enum object, doesn't mean I want the enum object to *be* an `int`, which is what `IntEnum` means. I don't want it to be comparable to an int, I don't want to use arithmetic on it, and most importantly I d

[issue22504] Add ordering between `Enum` objects

2014-09-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Why don't you use IntEnum? -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue18855] Inconsistent README filenames

2014-09-27 Thread Berker Peksag
Changes by Berker Peksag : -- keywords: +easy stage: -> needs patch versions: +Python 3.5 -Python 3.4 ___ Python tracker ___ ___ Pyth

[issue22504] Add ordering between `Enum` objects

2014-09-27 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 27, 2014, at 02:28 PM, Ram Rachum wrote: >I suggest making Enum members orderable, according to their order in the enum >type. Can you please provide a motivating use case? -- nosy: +barry ___ Python tracker

[issue22505] Expose an Enum object's serial number

2014-09-27 Thread Ram Rachum
Ram Rachum added the comment: Right now I want it for this: http://bugs.python.org/issue22504 Another use case I can think of is that if you store enum values in a database, you're probably using an int field and you'd want to easily convert between an enum and it's int value. -- _

[issue22505] Expose an Enum object's serial number

2014-09-27 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 27, 2014, at 02:40 PM, Ram Rachum wrote: >I'd like Enum objects to expose their serial numbers. Can you please provide some motivating use cases? -- ___ Python tracker __

[issue22506] `dir` on Enum subclass doesn't expose parent class attributes

2014-09-27 Thread Ram Rachum
New submission from Ram Rachum: Calling `dir` on an enum subclass shows only the contents of that class, not its parent classes. In normal classes, you can do this: Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600 64 bit (AMD64)] on win32 Type "help", "copyright",

[issue22505] Expose an Enum object's serial number

2014-09-27 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +barry, eli.bendersky, ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue21301] pathlib missing Path.expandvars(env=os.environ)

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: expandvars() works with string, not with path, and I don't think there is a place for it in pathlib. -- nosy: +serhiy.storchaka ___ Python tracker __

[issue1669539] Add os.path.isrelative() and improve ntpath.isabs()

2014-09-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- title: Improve Windows os.path.join (ntpath.join) "smart" joining -> Add os.path.isrelative() and improve ntpath.isabs() versions: +Python 3.5 -Python 3.4 ___ Python tracker

[issue22505] Expose an Enum object's serial number

2014-09-27 Thread Ram Rachum
New submission from Ram Rachum: I'd like Enum objects to expose their serial numbers. Currently it seems the only way to get this is `MyEnum._member_names_.index(my_enum.name)`, which is not cool because it's cumbersome and involves private variables. Perhaps we can use `int(my_enum) == 7`? Or

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2014-09-27 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue15414] os.path.join behavior on Windows (ntpath.join) is unexpected and not well documented

2014-09-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +needs review stage: -> patch review versions: +Python 2.7 ___ Python tracker ___ ___ Pyth

[issue20164] Undocumented KeyError from os.path.expanduser

2014-09-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> docs@python components: +Documentation nosy: +docs@python stage: -> needs patch versions: +Python 3.5 -Python 3.3 ___ Python tracker _

[issue22504] Add ordering between `Enum` objects

2014-09-27 Thread Ram Rachum
New submission from Ram Rachum: I suggest making Enum members orderable, according to their order in the enum type. Currently trying to order them raises an exception: >>> import enum >>> class Number(enum.Enum): ... one = 1 ... two = 2 ... three = 3 >>> sort

[issue17174] Posix os.path.join should raise TypeError when passed unusable type

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fixed in issue22034. See also issue21883. -- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2014-09-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Does the __attribute__ work for macros as well? -- nosy: +pitrou ___ Python tracker ___ ___ Python-b

[issue20335] bytes constructor accepts more than one argument even if the first one is not a string

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. Do you want to provide a test Renaud? -- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka stage: -> test needed type: -> behavior versions: +Python 2.7, Python 3.4, Python 3.5 -Python 3.3 ___ Python tr

[issue20021] "modernize" makeopcodetargets.py

2014-09-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +easy stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Idea looks good to me. -- components: +Interpreter Core nosy: +serhiy.storchaka type: -> enhancement versions: +Python 3.5 -Python 3.4 ___ Python tracker ___

[issue9393] shelve.open/bsddb.hashopen exception with unicode paths

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: dbm_open_unicode-32.patch no longer applied cleanly due to Argument Clinic. I'm not sure about applying patches to 2.7. I support this, but it looks as new feature, and you should ask on Python-Dev mailing list. -- nosy: +serhiy.storchaka __

[issue22486] Add math.gcd()

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Why are the two Py_ABS() calls at the end needed when we start off the > algorithm with long_abs()? Because long_abs()'s are omitted for small enough numbers (common case). So we avoid a copying for negative numbers or int subclasses. > I guess that's why

[issue21883] relpath: Provide better errors when mixing bytes and strings

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, tests fail when Python runs without the -bb option. Here is fixed path. -- Added file: http://bugs.python.org/file36744/os_path_typeerrors_2.patch ___ Python tracker ___

[issue22486] Add math.gcd()

2014-09-27 Thread Stefan Behnel
Stefan Behnel added the comment: Patch 7 works for me. Why are the two Py_ABS() calls at the end needed when we start off the algorithm with long_abs()? The Lehmer code is complex (I guess that's why you added the pure Euclidean implementation), but it's the right algorithm to use here, so I'd

  1   2   >