[issue27186] add os.fspath()

2016-06-04 Thread Ethan Furman
Ethan Furman added the comment: Jelle: the DirEntry patch looks good so far, but it needs a test for a bytes path. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue27186] add os.fspath()

2016-06-04 Thread Ethan Furman
Ethan Furman added the comment: New changeset 00991aa5fdb5 by Ethan Furman in branch 'default': issue27182: update fsencode and fsdecode for os.path(); patch by Dusty Phillips https://hg.python.org/cpython/rev/00991aa5fdb5 (had wrong issue # in commit

[issue27182] PEP 519 support in the stdlib

2016-06-04 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- Removed message: http://bugs.python.org/msg267280 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue27186] add os.fspath()

2016-06-04 Thread Ethan Furman
Ethan Furman added the comment: Dusty: The pathlib tests looks like it's only testing the PurePath implementation; while this /should/ be sufficient, please add tests for the other classes as well. -- ___ Python tracker <rep...@bugs.python.

[issue27184] Support path objects in the ntpath module

2016-06-03 Thread Ethan Furman
Ethan Furman added the comment: The expected scenario, and the purpose of os.fspath(), is to enable high-level libraries to not know or care if they receive a pathlib object or a string. In other words, they already have os.path.join() and os.path.split() calls, and currently break noisily

[issue27182] PEP 519 support in the stdlib

2016-06-03 Thread Ethan Furman
Ethan Furman added the comment: Sorry, Serhiy, I had my module names mixed up. `nt` and `posix` are the same, but `ntpath` and `posixpath` are not (I may have those first two names wrong again, but hopefully you get the idea). -- ___ Python tracker

[issue27186] add os.fspath()

2016-06-03 Thread Ethan Furman
Ethan Furman added the comment: Note: My schedule changed -- I won't be at the sprints today, but tomorrow. I'll finish reviewing these patches and commit this afternoon if no one beats me to it. -- ___ Python tracker <rep...@bugs.python.

[issue27184] Support path objects in the ntpath module

2016-06-03 Thread Ethan Furman
Ethan Furman added the comment: @Serhy: Isn't that backwards? I would think that by doing os.path first most other libraries would not have to change. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26266] add classattribute to enum to handle non-Enum attributes

2016-06-02 Thread Ethan Furman
Ethan Furman added the comment: One possible downside to the `classattribute` route is that we have a descriptor whose only purpose is to shield the item from becoming a member; the up-side is that it's simple to implement. Another possibility is `skip`: class skip: """

[issue27182] PEP 519 support in the stdlib

2016-06-02 Thread Ethan Furman
Ethan Furman added the comment: Nope. There is a posixpath.py and an ntpath.py, and they are not the same. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue27186] add os.fspath()

2016-06-02 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: brett.cannon, ethan.furman, serhiy.storchaka priority: normal severity: normal stage: test needed status: open title: add os.fspath() type: enhancement versions: Python 3.6 ___ Python t

[issue27182] PEP 519 support in the stdlib

2016-06-02 Thread Ethan Furman
Ethan Furman added the comment: os.fspath(): issue27186 -- dependencies: +add os.fspath() ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue27184] Support path objects in the nt module

2016-06-02 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- type: behavior -> enhancement ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue27182] PEP 519 support in the stdlib

2016-06-02 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- dependencies: +Support Path objects in the posix module, Support path objects in the nt module, Update importlib to accept pathlib.Path objects type: -> behavior versions: +Python 3.6 _

[issue27182] PEP 519 support in the stdlib

2016-06-02 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- type: behavior -> enhancement ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue27182] PEP 519 support in the stdlib

2016-06-02 Thread Ethan Furman
Ethan Furman added the comment: nt module: issue27184 -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27182> ___ ___ Python-bugs-

[issue27184] Support path objects in the nt module

2016-06-02 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: brett.cannon, ethan.furman, serhiy.storchaka priority: normal severity: normal stage: test needed status: open title: Support path objects in the nt module type: behavior versions: Pyth

[issue27182] PEP 519 support in the stdlib

2016-06-02 Thread Ethan Furman
Ethan Furman added the comment: importlib: issue26667 -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27182> ___ ___ Python-bugs-

[issue27182] PEP 519 support in the stdlib

2016-06-02 Thread Ethan Furman
Ethan Furman added the comment: posix module: issue26027 -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27182> ___ ___ Pyth

[issue27182] PEP 519 support in the stdlib

2016-06-02 Thread Ethan Furman
New submission from Ethan Furman: Meta issue to track adding PEP 519 support in the various stdlib modules. -- messages: 266891 nosy: brett.cannon, ethan.furman, serhiy.storchaka priority: normal severity: normal status: open title: PEP 519 support in the stdlib

[issue26027] Support Path objects in the posix module

2016-06-02 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26027> ___ _

[issue22570] Better stdlib support for Path objects using .path attribute

2016-06-02 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman title: Better stdlib support for Path objects -> Better stdlib support for Path objects using .path attribute ___ Python tracker <rep...@bugs.python.org> <http

[issue27161] Confusing exception in Path().with_name

2016-05-30 Thread Ethan Furman
Ethan Furman added the comment: I think the request is to raise a single PathlibError instead of the broad range of possible errors. Something like: try: blah blah except TypeError as e: raise PathlibError(str(e)) Since pathlib is a high level library this seems appropriate

[issue23990] Callable builtin doesn't respect descriptors

2016-05-23 Thread Ethan Furman
Ethan Furman added the comment: The BDFL would be the BDFL (Guido van Rossum ;) or whomever he asks to do the job. Don't worry too much about drafts. Pick one of the existing PEPs (409 is fairly short), and follow the same type of layouts. Make your arguments for what should be changed

[issue23990] Callable builtin doesn't respect descriptors

2016-05-23 Thread Ethan Furman
Ethan Furman added the comment: I'm not against them, but there are many diverse opinions. A PEP will: - broaden discussion, so all (or at least most) pros and cons can be considered - highlight any other pieces of Python that would need to change to properly support proxies - get

[issue23990] Callable builtin doesn't respect descriptors

2016-05-23 Thread Ethan Furman
Ethan Furman added the comment: `issubclass` doesn't "do the right thing", as evidenced by another dev. Continued complaining to this issue is not going to get you what you want, but writing a PEP to address the issue might. -- ___ Pyth

[issue23990] Callable builtin doesn't respect descriptors

2016-05-23 Thread Ethan Furman
Ethan Furman added the comment: To change this behavior at this point will require a PEP. The PEP should be something along the lines of "Add proxy support to builtins" and should address such things as callable, issubclass, and whatever else is is appropriate. As for working a

[issue26988] Add AutoNumberedEnum to stdlib

2016-05-09 Thread Ethan Furman
Ethan Furman added the comment: It's in _EnumDict.__getitem__; there's some duplication in __setitem__ for supporting Python 2 (although with 2 you have to use either the empty tuple, or some other handy thing that may go in the __doc__ attribute, for example

[issue26988] Add AutoNumberedEnum to stdlib

2016-05-09 Thread Ethan Furman
Ethan Furman added the comment: On the other hand, if you use aenum you can do: class Color(AutoNumber): red green blue And isn't that better*? ;) * For those in danger of swallowing their tongue over the magic involved: The magic is turned off as soon as any descriptor

[issue26988] Add AutoNumberedEnum to stdlib

2016-05-09 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +barry, eli.bendersky ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue26632] __all__ decorator

2016-05-09 Thread Ethan Furman
Ethan Furman added the comment: For the standalone version I suggest a disclaimer about the `from ... import *` ability. Something like: `from ... import *` should not be used with packages that do not have an __all__ unless they support that usage (check their docs

[issue26981] add compatibility shim for enum34 backport

2016-05-08 Thread Ethan Furman
Ethan Furman added the comment: It would, but that's not what we did. Currently we have _name_ and _value_; the backport uses __order__ because I didn't want the stdlib version having a hairball when someone tried to use a 2.7 Enum in 3.4 and it didn't occur to me at the time to just add

[issue26981] add compatibility shim for enum34 backport

2016-05-08 Thread Ethan Furman
New submission from Ethan Furman: _sunder_ methods are reserved for internal Enum use, and if the user tries to use any an exception is raised. Consequently, the enum34 backport uses __order__ instead of _order_ to specify a definition order for its members. I would like to do two things: 1

[issue23640] int.from_bytes() is broken for subclasses

2016-05-08 Thread Ethan Furman
Ethan Furman added the comment: With the patch: --> import enum --> class Huh(enum.IntEnum): ... blah = 2 ... --> Huh.blah.from_bytes(b'\04', 'big') Traceback (most recent call last): File "", line 1, in File "/home/ethan/source/python/issue2364

[issue23640] int.from_bytes() is broken for subclasses

2016-05-08 Thread Ethan Furman
Ethan Furman added the comment: I think the classmethod-as-constructor behavior is correct, so it's up to IntEnum (or EnumMeta, or foo, or ...), to work around the issue. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue23640] int.from_bytes() is broken for subclasses

2016-05-08 Thread Ethan Furman
Ethan Furman added the comment: 'from_bytes' is a classmethod. As such, it should return the same type as the class it is called on. If that wasn't the intent it would be a staticmethod instead. It is the responsibility of the subclass to override base class behavior, not the other way

[issue23640] int.from_bytes() is broken for subclasses

2016-05-07 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- Removed message: http://bugs.python.org/msg237891 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue23640] int.from_bytes() is broken for subclasses

2016-05-07 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- Removed message: http://bugs.python.org/msg240053 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue23640] int.from_bytes() is broken for subclasses

2016-05-07 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- Removed message: http://bugs.python.org/msg239619 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue23640] int.from_bytes() is broken for subclasses

2016-05-07 Thread Ethan Furman
Ethan Furman added the comment: Not sure what I was thinking at the time, but several of my comments were supportive of `classmethod`s not calling subclass' __new__; I actually do not think that, and am +1 on the patch. -- nosy: +ethan.furman

[issue26893] ValueError exception raised when using IntEnum with an attribute called "name" and @unique decorator

2016-04-30 Thread Ethan Furman
Ethan Furman added the comment: Thanks for catching that. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26893> ___ ___ Pyth

[issue26860] os.walk and os.fwalk yield namedtuple instead of tuple

2016-04-29 Thread Ethan Furman
Ethan Furman added the comment: I'm not clear on what you asking, but regardless we should have both the old (by-index) tests and new by-attribute tests. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26879] new message

2016-04-28 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bu

[issue26865] Meta-issue: support of the android platform

2016-04-26 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26865> ___ _

[issue26860] os.walk and os.fwalk yield namedtuple instead of tuple

2016-04-26 Thread Ethan Furman
Ethan Furman added the comment: Quick review of patch looks good. I'll try to look it over more closely later. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26860] os.walk and os.fwalk yield namedtuple instead of tuple

2016-04-26 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26860> ___ _

[issue26829] update docs: when creating classes a new dict is created for the final class object

2016-04-22 Thread Ethan Furman
New submission from Ethan Furman: https://docs.python.org/3/reference/datamodel.html#creating-the-class-object This section should mention that the final class is created with a new dict(), and all key/value pairs from the dict used during creation are copied over. -- assignee: docs

[issue26823] Shrink recursive tracebacks

2016-04-21 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +georg.brandl ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26823> ___ _

[issue26823] Shrink recursive tracebacks

2016-04-21 Thread Ethan Furman
Ethan Furman added the comment: If you can, give it a go. Make it a new patch, though -- don't delete the existing one. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26823] Shrink recursive tracebacks

2016-04-21 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- type: -> behavior ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26823> ___ __

[issue26823] Shrink recursive tracebacks

2016-04-21 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26823> ___ _

[issue26748] enum.Enum is False-y

2016-04-14 Thread Ethan Furman
Ethan Furman added the comment: Enum classes are now Truth-y in 3.4, 3.5, enum34, and aenum. :) -- assignee: -> ethan.furman resolution: -> fixed stage: -> resolved status: open -> closed versions: -Python 2.7 ___ Python

[issue26748] enum.Enum is False-y

2016-04-13 Thread Ethan Furman
Ethan Furman added the comment: EnumMeta /is/ a collection (at least in the same sense the dict class is a collection). ;) Fix is on it's way... -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26667] Update importlib to accept pathlib.Path objects

2016-04-05 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26667> ___ _

[issue26684] pathlib.Path.with_name() and .with_suffix do not allow combining with an empty Path

2016-04-01 Thread Ethan Furman
Ethan Furman added the comment: Never mind. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue26684] pathlib.Path.with_name() and .with_suffix do not allow combining with an empty Path

2016-03-31 Thread Ethan Furman
New submission from Ethan Furman: The methods .with_name() and .with_suffix() of pathlib.Path (and friends) do not allow a name or suffix to be added to a path alone -- I get ValueError(... has an empty name...). This is the documented behavior, but it seems incredibly user-unfriendly

[issue26681] decorators for attributes

2016-03-31 Thread Ethan Furman
Ethan Furman added the comment: Please discuss this idea on the Python-Ideas mailing list first; if that goes well you can bring the idea to Python-Dev; if that also goes well feel free to reopen this issue. --- In the meantime you could probably do something with a custom descriptor/class

[issue26632] __all__ decorator

2016-03-24 Thread Ethan Furman
Ethan Furman added the comment: Not a fan. :/ How about getting your own copy of the public decorator initialized with the globals you pass in? class Public: def __init__(self, module): """ module should be the globals() dict from the

[issue26632] __all__ decorator

2016-03-23 Thread Ethan Furman
Ethan Furman added the comment: def public(thing, value=None): if isinstance(thing, str): mdict = sys._getframe(1).f_globals name = thing mdict[name] = thing # no need for retyping! ;) else: mdict = sys.modules[thing.__module__].__dict__ name

[issue26632] __all__ decorator

2016-03-23 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26632> ___ _

[issue26614] False/0 and True/1 collision when used as dict keys?

2016-03-22 Thread Ethan Furman
Ethan Furman added the comment: False and True are subtypes of int, so the behaviour you are seeing is known and expected. https://docs.python.org/2/reference/datamodel.html?highlight=bool In the future feel free to ask on Python-List about behaviour -- you'll be sure to get a plethora

[issue26571] turtle regression in 3.5

2016-03-16 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26571> ___ _

[issue26540] Python Macros

2016-03-11 Thread Ethan Furman
Ethan Furman added the comment: That particular use-case is easily handled by simply creating the correct function/method based on the criterion: if py_ver < 3.6: def fribbletz(): # do something in a 3.0-3.5 compatible way else: def fribbletz(): # otherwise use 3.6 meth

[issue26521] add `extend_enum` to Enum

2016-03-10 Thread Ethan Furman
Ethan Furman added the comment: Barry: po-tay-to / po-tah-to ;) Serhiy: The set is known and finite, just scattered over different expensive-to-load modules. Decision: Since no one is jumping up and down with anticipation over this feature, I'll let it stay on SO. -- resolution

[issue26521] add `extend_enum` to Enum

2016-03-09 Thread Ethan Furman
New submission from Ethan Furman: In this SO question [1] the OP has a need to generate an Enum lazily. I created an `extend_enum` function to do so. By the time I was done I realized I would not want anyone to have to create that function by hand, nor keep it up to date (should we ever

[issue26514] Object defines '__ne__' as 'not __eq__' if '__ne__' is not implemented

2016-03-08 Thread Ethan Furman
Ethan Furman added the comment: The following behaviour is from 3.5: --> class Huh: ... def __eq__(self, other): ... return other == 'blah' ... --> h = Huh() --> h == 'ew' False --> h != 'ew' True --> h == 'blah' True --> h != 'blah' False Which seems to be exactly

[issue26490] Leading “0” allowed, only for decimal zero

2016-03-05 Thread Ethan Furman
Ethan Furman added the comment: Short answer: rationale unknown, but any number of zeroes is still unambiguously zero. Closing as duplicate. -- nosy: +ethan.furman resolution: -> duplicate stage: -> resolved status: open -> closed _

[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-03-04 Thread Ethan Furman
Ethan Furman added the comment: I like those code snippets! Thanks, Serhiy! Just to make sure I have understood correctly: every decimal char is also a digit char, but some digit chars are not decimal chars. -- ___ Python tracker <

[issue26483] docs unclear on difference between isdigt() and isdecimal()

2016-03-04 Thread Ethan Furman
New submission from Ethan Furman: The docs use different explanations for what constitutes a decimal verses a digit character; consequently I can't tell if they are the same or different, and if different what the differences are. --- https

[issue26362] Approved API for creating a temporary file path

2016-02-29 Thread Ethan Furman
Ethan Furman added the comment: I don't see the problem. Every Python platform that has `mktemp` has an implementation to generate the names, and that implementation can become the public face instead of `mktemp`. So no more of a burden than `mktemp` is; likewise for the "cognitive b

[issue26362] Approved API for creating a temporary file path

2016-02-29 Thread Ethan Furman
Ethan Furman added the comment: > The request is for a “get the next path generated by a > ‘tempfile._get_candidate_names’ generator”, with an approved and > documented public API. I don't see any problem with this. Patches welcome. -- stage: ->

[issue26447] rstrip() is pilfering my 'p'

2016-02-26 Thread Ethan Furman
Ethan Furman added the comment: https://docs.python.org/3/library/stdtypes.html#str.strip - [...] The chars argument is not a prefix or suffix; rather, all combinations of its values are stripped: -- nosy: +ethan.furman resolution

[issue26380] Add an http method enum

2016-02-18 Thread Ethan Furman
Ethan Furman added the comment: I don't have a firm opinion at this point -- can you give a few examples of how this will help in code? -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26362] Approved API for creating a temporary file path

2016-02-14 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26362> ___ _

[issue26352] getpass incorrectly displays password prompt on stderr on fallback

2016-02-12 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26352> ___ _

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-10 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26331> ___ _

[issue26324] sum() incorrect on negative zeros

2016-02-09 Thread Ethan Furman
Ethan Furman added the comment: If one is using sum on floats, and a list of -0.0's is a possibility, and the sign matters... well, I would hope that one is using -0.0 as the start value. I don't think this is worth "fixing". -- nosy: +et

[issue26266] add classattribute to enum to handle non-Enum attributes

2016-02-02 Thread Ethan Furman
New submission from Ethan Furman: The rules for what objects in an Enum become members and which do not are fairly straight-forward: __double_underscore__ do not (but is reserved for Python) _single_underscore_ do not (but is reserved for Enum itself) any descriptored object (such as functions

[issue26252] Add an example to importlib docs on setting up an importer

2016-01-31 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26252> ___ _

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-01-31 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26186> ___ _

[issue26202] The range() object is deepcopied as atomic

2016-01-25 Thread Ethan Furman
Ethan Furman added the comment: I don't have much experience with the copy module, but I don't see any problems with the code. Does copy.copy suffer from the same problem? If yes, is it fixed with this same patch, or is more work needed? -- nosy: +ethan.furman

[issue26202] The range() object is deepcopied as atomic

2016-01-25 Thread Ethan Furman
Ethan Furman added the comment: Victor, patch was already attached. ;) -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26202> ___ __

[issue26174] Exception alias cause destruction of existing variable

2016-01-21 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26174> ___ _

[issue24840] implement bool conversion for enums to prevent odd edge case

2016-01-16 Thread Ethan Furman
Ethan Furman added the comment: New changeset e4c22eadc25c: use public 'value' -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26123] http.client status code constants incompatible with Python 3.4

2016-01-15 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26123> ___ _

[issue26123] http.client status code constants incompatible with Python 3.4

2016-01-15 Thread Ethan Furman
Ethan Furman added the comment: These changes were made in issue21793. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26123> ___ __

[issue24840] implement bool conversion for enums to prevent odd edge case

2016-01-15 Thread Ethan Furman
Ethan Furman added the comment: Mike, my apologies. In the future I'll make sure and read the docs before I go through with changes. In the docs (https://www.python.org/dev/peps/pep-0435/#id35): The reason for defaulting to 1 as the starting number and not 0 is that 0 is False

[issue26123] http.client status code constants incompatible with Python 3.4

2016-01-15 Thread Ethan Furman
Ethan Furman added the comment: Not using Enum's __str__ was discussed (I think during the initial Enum threads when PEP435 was being debated) and IIRC Guido was strongly against it as it took away half the purpose of using an Enum. -- ___ Python

[issue26044] Name mangling overrides externally defined names

2016-01-07 Thread Ethan Furman
Ethan Furman added the comment: Nice work with the debugging. but what you have proved is that Python is behaving exactly as designed [0]. While true that the current implementation does have the pitfall you have discovered, removing it is not worth the cost in complexity. The proper &quo

[issue26022] string.replace(' ', ' ') has to be called 2 times before it works

2016-01-06 Thread Ethan Furman
Ethan Furman added the comment: The .replace() method is not recursive (it only makes one pass through the string), so for example: >>> example = ' ' # three spaces >>> example = example.replace(' ', ' ') # replace two spaces with one space >>> exam

[issue26032] Use scandir() to speed up pathlib globbing

2016-01-06 Thread Ethan Furman
Ethan Furman added the comment: As I recall, if the platform's DirEntry doesn't provide the cacheable attributes when first called, those attributes will be looked up (and cached) on first access. -- nosy: +ethan.furman ___ Python tracker <

[issue25979] String functions lstrip are not working properly when you have escape sequence

2015-12-29 Thread Ethan Furman
Ethan Furman added the comment: lstrip() works by removing any of the characters in its argument, in any order; for example: 'catchy'.lstrip('cat') # 'hy' 'actchy'.lstrip('tac') # 'hy' is stripping, from the left, all 'c's and all 'a's and all 't's -- not just the first three, and order

[issue24840] implement bool conversion for enums to prevent odd edge case

2015-12-22 Thread Ethan Furman
Ethan Furman added the comment: The enum34 backport has been fixed to not have 3.6 only features (assuming the __bool__ change was the only one). Was that your only objection, or do you not want this change in 3.6 either? -- ___ Python tracker <

[issue25898] Check for subsequence inside a sequence

2015-12-18 Thread Ethan Furman
Ethan Furman added the comment: +1 for sequences +1 for subsequence_index instead of has_subsequence +1 for returning None when not found ;) -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue25898] Check for subsequence inside a sequence

2015-12-17 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +rhettinger ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25898> ___ _

[issue25843] unexpected output using pythons ternary operator in combination with lambda

2015-12-11 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- title: unexpected-output-using-pythons-ternary-operator-in-combination-with-lambda -> unexpected output using pythons ternary operator in combination with lambda ___ Python tra

[issue25762] Calculation Mistake 1.5 * 0.3

2015-11-29 Thread Ethan Furman
Ethan Furman added the comment: Floating point calculations are not exact. https://docs.python.org/3/tutorial/floatingpoint.html https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html -- nosy: +ethan.furman resolution: -> not a bug stage: -> resolved status: open -&g

[issue25634] Add a dedicated subclass for attribute missing errors

2015-11-28 Thread Ethan Furman
Ethan Furman added the comment: Note for posterity: the current behavior of __getattr__ is what allows Enum to work correctly. -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue25594] enum instance attribute access possible

2015-11-20 Thread Ethan Furman
Ethan Furman added the comment: Other changeset f4b495ceab17 in default branch. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue25672] set SSL_MODE_RELEASE_BUFFERS

2015-11-19 Thread Ethan Furman
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +alex, christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou title: Unconditionally set SSL_MODE_RELEASE_BUFFERS -> set SSL_MODE_RELEASE_BUFFERS ___ Python tracker <rep...@bug

<    4   5   6   7   8   9   10   11   12   13   >