[issue23673] IntEnum is unpicklable by previous Python versions

2015-03-18 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23673

[issue20680] Pickle socket enums by names

2015-03-18 Thread Ethan Furman
Ethan Furman added the comment: Enum members that are replacing constants now pickle by name (see issue23673). -- resolution: - duplicate stage: patch review - resolved status: open - closed superseder: - IntEnum is unpicklable by previous Python versions

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2015-03-17 Thread Ethan Furman
Ethan Furman added the comment: A private method is being added to Enum to better support Enum replacement of constants, part of which includes changing __reduce_ex__ to return the string of the name. These changes answer points 1 and 4. Point 2 would be nice, but seems somewhat less

[issue23695] idiom for clustering a data series into n-length groups

2015-03-17 Thread Ethan Furman
Ethan Furman added the comment: I think an example should suffice: s = [1, 2, 3, 4, 5, 6, 7, 8, 9] n = 3 zip(*[iter(s)]*n) [(1, 2, 3), (4, 5, 6), (7, 8, 9)] -- nosy: +ethan.furman versions: -Python 3.2, Python 3.3 ___ Python tracker rep

[issue21076] Turn signal.SIG* constants into enums

2015-03-17 Thread Ethan Furman
Ethan Furman added the comment: Working on issue23673 I saw this in the new signal.py: +def _enum_to_int(value): +Convert an IntEnum member to a numeric value. +If it's not a IntEnum member return the value itself. + +try: +return int(value) +except (ValueError

[issue21076] Turn signal.SIG* constants into enums

2015-03-17 Thread Ethan Furman
Ethan Furman added the comment: Removing the 'enum_to_int' function would also take care of the accepting inappropriate types problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21076

[issue23673] IntEnum is unpicklable by previous Python versions

2015-03-16 Thread Ethan Furman
Ethan Furman added the comment: Patch adds Enum._convert which is a class method that handles: - creating the new Enum - adding the appropriate members - adding the new Enum to the module's namespace (which is a passed parameter) - replacing the __reduce_ex__ method to return just

[issue22625] When cross-compiling, don’t try to execute binaries

2015-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/issue22625 ___ ___ Python-bugs-list

[issue23673] IntEnum is unpicklable by previous Python versions

2015-03-15 Thread Ethan Furman
New submission from Ethan Furman: IntEnum is advertised as being a drop-in replacement for integer contants; however this fails in the case of unpickling on previous Python versions. This occurs because when a pickle is created the module, class, and value are stored -- but those don't exist

[issue20680] Pickle socket enums by names

2015-03-15 Thread Ethan Furman
Ethan Furman added the comment: Serhiy, sorry for taking so long to get back to this -- we spent so much time making sure pickling worked I had no idea that unpickling didn't work in prior versions. -- ___ Python tracker rep...@bugs.python.org http

[issue23467] Improve byte formatting compatibility between Py2 and Py3

2015-03-14 Thread Ethan Furman
Ethan Furman added the comment: Added in https://hg.python.org/peps/rev/7fe79194a4f2 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23467

[issue23556] Scope for raise without argument is different in Python 2 and 3

2015-03-13 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23556 ___ ___ Python-bugs-list

[issue23486] Enum member lookup is 20x slower than normal class attribute lookup

2015-03-11 Thread Ethan Furman
Ethan Furman added the comment: Slight reordering of code removed the one user visible change. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23486

[issue23640] Enum.from_bytes() is broken

2015-03-11 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23640 ___ ___ Python-bugs-list

[issue23640] Enum.from_bytes() is broken

2015-03-11 Thread Ethan Furman
Ethan Furman added the comment: The only solution that is coming to mind is to have EnumMeta go through the other base classes, wrap any classmethods it finds, and ensure that they return their appropriate type and not an Enum type. Any other ideas

[issue23640] Enum.from_bytes() is broken

2015-03-11 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- keywords: +patch stage: test needed - needs patch Added file: http://bugs.python.org/file38444/issue23640.stoneleaf.01.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23640

[issue23640] Enum.from_bytes() is broken

2015-03-11 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.python.org/issue23640

[issue23486] Enum member lookup is 20x slower than normal class attribute lookup

2015-03-11 Thread Ethan Furman
Ethan Furman added the comment: Argh, sorry -- that was supposed to be *does not* change user behavior nor the API, it's *just* a performance increase. Does that change your inclination? -- ___ Python tracker rep...@bugs.python.org http

[issue23486] Enum member lookup is 20x slower than normal class attribute lookup

2015-03-11 Thread Ethan Furman
Ethan Furman added the comment: In getting everything fixed up and tested I realized there was one slight user-facing change: with this patch it is now possible to say: SomeEnum.SomeMember = SomeMember In other words, it is possible to set a value on the class as long as it is the same

[issue23486] Enum member lookup is 20x slower than normal class attribute lookup

2015-03-10 Thread Ethan Furman
Ethan Furman added the comment: Larry, I have a very small patch (~4 lines) that does change user behavior or the API, but does have a significant performance boost. I'm still learning what is/is not okay to add to maintenance releases, so wanted to run this by you. -- nosy: +larry

[issue23486] Enum member lookup is 20x slower than normal class attribute lookup

2015-03-10 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- Removed message: http://bugs.python.org/msg237815 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23486

[issue23486] Enum member lookup is 20x slower than normal class attribute lookup

2015-03-10 Thread Ethan Furman
Ethan Furman added the comment: Larry, I have a very small patch (~4 lines) that does change user behavior or the API, but does have a significant performance boost. I'm still learning what is/is not okay to add to maintenance releases, so wanted to run this by you. -- assignee

[issue23623] Python 3.5 docs need to clarify how to set PATH, etc

2015-03-09 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23623 ___ ___ Python-bugs-list

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-03-09 Thread Ethan Furman
Ethan Furman added the comment: This would be a build-bot for cross-compiling? As opposed to an android build-bot (which we'll also need) ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23496

[issue2292] Missing *-unpacking generalizations

2015-03-09 Thread Ethan Furman
Ethan Furman added the comment: All tests pass on my ubuntu 13.04 system. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292 ___ ___ Python

[issue23591] Add IntFlags

2015-03-07 Thread Ethan Furman
Ethan Furman added the comment: The current patch is more along the lines of a proof-of-concept. The final IntFlag type (if there is one) would be quite a bit more extensive since part of the reason for its existence is to not lose type -- so pretty much every __op__ would have

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-03-05 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- stage: patch review - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22906

[issue23595] Split the math module into _math (C) + math (py)

2015-03-05 Thread Ethan Furman
Ethan Furman added the comment: I have no problem with having Python versions, but we should not remove anything from the C implementation -- at a minimum they should be good for testing against. -- nosy: +ethan.furman ___ Python tracker rep

[issue23595] Split the math module into _math (C) + math (py)

2015-03-05 Thread Ethan Furman
Ethan Furman added the comment: If there is a complex number version it will live in cmath, not math. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23595

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-03-05 Thread Ethan Furman
Ethan Furman added the comment: Thanks, Neil, for catching that. I did run the entire test suite with the patch, and nothing new broke, so it would seem the patch is at least benign. :) -- nosy: +ethan.furman ___ Python tracker rep

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-03-05 Thread Ethan Furman
Ethan Furman added the comment: Oh, and my tests ran on Ubuntu 13.04 (GNU/Linux 3.8.0-22-generic x86_64). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22906

[issue23591] Add IntFlags

2015-03-05 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- assignee: - ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23591 ___ ___ Python-bugs

[issue23580] Amazon.com links

2015-03-03 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman resolution: - duplicate status: open - closed superseder: - Amazon.com links ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23580

[issue23579] Amazon.com links

2015-03-03 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23579 ___ ___ Python-bugs-list

[issue17352] Be clear that __prepare__ must be declared as a class method

2015-03-02 Thread Ethan Furman
Ethan Furman added the comment: Should __prepare__ be special-cased as a classmethod, like __new__ is? Is there any reason to ever have __prepare__ /not/ be a classmethod? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue19075] Add sorting algorithm visualization to turtledemo

2015-03-02 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- assignee: - ethan.furman resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19075

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-02-27 Thread Ethan Furman
Ethan Furman added the comment: I will work on the build slave (note: it will definitely be /work/ so if anyone has the resource and know-how to just do it, I will not be offended ;) . -- ___ Python tracker rep...@bugs.python.org http

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-02-27 Thread Ethan Furman
Ethan Furman added the comment: Cyd, if you want to be a CPython/Android resource that's great. If you don't have time for it, I completely understand. What I'm hoping for is to take your initial efforts and build from there, as there are others who can take what you've started and run

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-02-27 Thread Ethan Furman
Ethan Furman added the comment: I'm afraid I know next to nothing about git, so cannot help there. I would think that it wouldn't be too hard for someone (such as Ryan or myself) to forward port a set of 3.4.2 patches to 3.5 -- so whatever is easiest for you

[issue19075] Add sorting algorithm visualization to turtledemo

2015-02-27 Thread Ethan Furman
Ethan Furman added the comment: Yup. Also updated the turtledemo docs. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19075 ___ ___ Python-bugs

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-02-27 Thread Ethan Furman
Ethan Furman added the comment: Sounds great! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23496 ___ ___ Python-bugs-list mailing list

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-02-27 Thread Ethan Furman
Ethan Furman added the comment: Yup, that sounds right! ;) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23496 ___ ___ Python-bugs-list

[issue19075] Add sorting algorithm visualization to turtledemo

2015-02-26 Thread Ethan Furman
Ethan Furman added the comment: Code spiffied: added randomization routine that can be used after a sort to test a different sort method (or the same one). Larry, can this extra demo go into 3.4.4, or only 3.5? -- nosy: +larry Added file: http://bugs.python.org/file38256/issue19075

[issue23491] PEP 441 - Improving Python Zip Application Support

2015-02-26 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23491 ___ ___ Python-bugs-list

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-02-26 Thread Ethan Furman
Ethan Furman added the comment: Once this android Python is built, can it: - be copied from/to other android devices? - run without KBOX? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23496

[issue6549] ttk.Style -- minor issues with element_names and configure

2015-02-25 Thread Ethan Furman
Ethan Furman added the comment: Redid patch against current branch, fixing the typos I had in them. Any reason not to move forward? -- nosy: +serhiy.storchaka Added file: http://bugs.python.org/file38238/issue6549.stoneleaf.01.patch ___ Python

[issue23486] Enum member lookup is 20x slower than normal class attribute lookup

2015-02-24 Thread Ethan Furman
Ethan Furman added the comment: This isn't a change to the API or any visible user behavior (besides performance), so I don't see a reason to not add it to 3.4. -- nosy: +barry, eli.bendersky ___ Python tracker rep...@bugs.python.org http

[issue23517] datetime.utcfromtimestamp parses timestamps incorrectly

2015-02-24 Thread Ethan Furman
Ethan Furman added the comment: This seems to have changed in 3.3 (versions up to 3.2 return 274000). -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23517

[issue17963] Deprecate the frame hack for implicitly getting module details

2015-02-24 Thread Ethan Furman
Ethan Furman added the comment: Eli, did you ever make any progress with this? Anything you can post so someone else can run with it if you don't have time? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17963

[issue9938] Documentation for argparse interactive use

2015-02-24 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: -ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9938 ___ ___ Python-bugs-list

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-02-21 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23496 ___ ___ Python-bugs-list

[issue23486] Enum member lookup is 20x slower than normal class attribute lookup

2015-02-20 Thread Ethan Furman
Ethan Furman added the comment: Oh, and the slowdown dropped from 20 to 3 (for non-DynamicClassAttributes -- which is probably more than 99% of them). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23486

[issue23486] Enum member lookup is 20x slower than normal class attribute lookup

2015-02-20 Thread Ethan Furman
Ethan Furman added the comment: Out of curiousity I tried: took two new lines, one modified line, and one comment. :) -- keywords: +patch Added file: http://bugs.python.org/file38182/issue23486.stoneleaf.01.patch ___ Python tracker rep

[issue23486] Enum comparisons are 20x slower than comparing equivalent ints

2015-02-19 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23486 ___ ___ Python-bugs-list

[issue23486] Enum comparisons are 20x slower than comparing equivalent ints

2015-02-19 Thread Ethan Furman
Ethan Furman added the comment: Craig Holmquist wrote: - The consumer of that iteration processes each object with a switch-case-like comparison of the category, checking it sequentially against each instance of the Enum. So for every object you compare against every Enum

[issue23486] Enum member lookup is 20x slower than normal class attribute lookup

2015-02-19 Thread Ethan Furman
Ethan Furman added the comment: Yup, you have it figured out. It's the lookup that is the slowdown. When performance is an issue one of the standard tricks is to create a local name, like you did with tiny = Category.tiny. For the curious (taken from the docstring for Enum.__getattr__

[issue23467] Improve byte formatting compatibility between Py2 and Py3

2015-02-15 Thread Ethan Furman
Ethan Furman added the comment: Sometimes practicality wins; it's why we allow %s, and we should also allow %r. Both %s and %r need to be clearly documented as an aid to Py2/3 code bases, and not recommended for new code. Serhiy, do you have time to take

[issue23467] Improve byte formatting compatibility between Py2 and Py3

2015-02-15 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- assignee: - ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23467 ___ ___ Python-bugs

[issue23455] file iterator deemed broken; can resume after StopIteration

2015-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/issue23455 ___ ___ Python-bugs-list

[issue23383] Clean up bytes formatting

2015-02-10 Thread Ethan Furman
Ethan Furman added the comment: As long as it works I have no objections. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23383

[issue20680] Pickle socket enums by names

2015-02-08 Thread Ethan Furman
Ethan Furman added the comment: An IntEnum is just a fancy int. You can add them, subtract them, multiply them, all that kind of thing. If you attempt to unpickle a 3.4 _PickleByNameIntEnum on a 3.3 system, what's going to happen? -- ___ Python

[issue21793] httplib client/server status refactor

2015-02-08 Thread Ethan Furman
Ethan Furman added the comment: Without having looked at the code I would guess the fix is as simple as changing a %s to a %d. Having said that, it would be nice if the name was also in the log -- something like: 127.0.0.1 - - [08/Feb/2015 05:05:28] GET / HTTP/1.1 200 (OK

[issue20680] Pickle socket enums by names

2015-02-07 Thread Ethan Furman
Ethan Furman added the comment: To make sure I understand correctly: On platform ABC the value 1 could mean SOCK_STREAM but on platform XYZ SOCK_STREAM is value 32? Assuming the need to pickle socket types is not new, then people have been doing it, possibly with painful workarounds

[issue23398] calendar.monthrange for February 2015

2015-02-05 Thread Ethan Furman
Ethan Furman added the comment: https://docs.python.org/3/library/calendar.html#calendar.monthrange -- nosy: +ethan.furman resolution: - not a bug stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http

[issue2292] Missing *-unpacking generalizations

2015-02-03 Thread Ethan Furman
Ethan Furman added the comment: All test pass on my system. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292 ___ ___ Python-bugs-list

[issue2292] Missing *-unpacking generalizations

2015-02-02 Thread Ethan Furman
Ethan Furman added the comment: Thanks, Terry! I'll do that next time -- after I make sure and re-compile. :/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292

[issue2292] Missing *-unpacking generalizations

2015-02-02 Thread Ethan Furman
Ethan Furman added the comment: Argh -- I applied the patch, but didn't recompile. Doing that now... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292

[issue2292] Missing *-unpacking generalizations

2015-02-02 Thread Ethan Furman
Ethan Furman added the comment: Tried running tests, tests that failed with patch: test_ast test_collections test_extcall test_grammar test_importlib test_parser test_syntax test_unpack_ex test_zipfile Running Ubuntu 13.04 (GNU/Linux 3.8.0-22-generic x86_64

[issue23354] Loading 2 GiLOC file which raises exception causes wrong traceback

2015-01-30 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23354 ___ ___ Python-bugs-list

[issue20284] patch to implement PEP 461 (%-interpolation for bytes)

2015-01-29 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20284

[issue23342] run() - unified high-level interface for subprocess

2015-01-28 Thread Ethan Furman
Ethan Furman added the comment: I haven't checked the code, but does check_output and friends combine stdout and stderr when ouput=PIPE? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23342

[issue23342] run() - unified high-level interface for subprocess

2015-01-28 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23342 ___ ___ Python-bugs-list

[issue11145] '%o' % user-defined instance

2015-01-28 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11145 ___ ___ Python-bugs-list

[issue23334] http.client refactor

2015-01-27 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23334 ___ ___ Python-bugs-list

[issue20284] patch to implement PEP 461 (%-interpolation for bytes)

2015-01-26 Thread Ethan Furman
Ethan Furman added the comment: it does seem a bit odd -- on the other hand, %s is an alias for %b, is deprecated for new 3-only code, and this might help serve as a reminder of that. Or we could fix it. ;) -- ___ Python tracker rep

[issue21076] Turn signal.SIG* constants into enums

2015-01-26 Thread Ethan Furman
Ethan Furman added the comment: I know nothing about this part of CPython, but wouldn't the correct solution be to not compare by identity? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21076

[issue23292] Enum doc suggestion

2015-01-25 Thread Ethan Furman
Ethan Furman added the comment: Amusingly enough, I posted a question/answer to StackOverflow (http://stackoverflow.com/q/28130683/208880) and so far the only other respondent posted an answer with similar functionality to my own, and also recommended that such a method be added to the base

[issue23292] Enum doc suggestion

2015-01-23 Thread Ethan Furman
Ethan Furman added the comment: Currently the way to add an Enum's members to a module's namespace is: globals().update(MyEnumeration.__members__) but that seems quite ugly. Is there anywhere else that the user is required to use __xxx__ methods for common functionality? I think a new

[issue20284] patch to implement PEP 461 (%-interpolation for bytes)

2015-01-18 Thread Ethan Furman
Ethan Furman added the comment: Here's the patch -- the code for % and %= is in place for bytes and bytearray; I still need to get the doc patch done. I'll commit Wednesday-ish barring problems. Big question Background -- There is a Python C ABI function called

[issue20284] patch to implement PEP 461 (%-interpolation for bytes)

2015-01-18 Thread Ethan Furman
Ethan Furman added the comment: Thanks, Victor, for the feedback. I was able to figure out some more of the C side thanks to Georg, and I think the code is looking pretty good. There may be room for optimization by having the bytes code call the unicode implementation for more

[issue20284] patch to implement PEP 461 (%-interpolation for bytes)

2015-01-17 Thread Ethan Furman
Ethan Furman added the comment: Better patch, along the lines of my original thought: - byarrayformat converts bytearray to bytes - calls bytesformat (now _PyBytes_Format) to do the heavy lifting - uses PyByteArray_FromObject to tranform back to bytearray Now working on in-place format

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

2015-01-14 Thread Ethan Furman
Ethan Furman added the comment: 3.5 is almost here; Raymond, care to make a ruling? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18986

[issue20680] Pickle socket enums by names

2015-01-14 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- assignee: - ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20680 ___ ___ Python-bugs

[issue20773] Improve docs for DynamicClassAttribute

2015-01-14 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- assignee: - ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20773 ___ ___ Python-bugs

[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie)

2015-01-14 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- assignee: - ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17576 ___ ___ Python-bugs

[issue17422] language reference should specify restrictions on class namespace

2015-01-14 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- keywords: +patch stage: needs patch - patch review versions: +Python 3.5 Added file: http://bugs.python.org/file37712/issue17422.stoneleaf.01.patch ___ Python tracker rep...@bugs.python.org http

[issue20467] Confusing wording about __init__

2015-01-14 Thread Ethan Furman
Ethan Furman added the comment: Changed 'no value may be returned' to 'no non-None value may be returned'. -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue22997] Minor improvements to Functional API section of Enum documentation

2015-01-14 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- resolution: - fixed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22997 ___ ___ Python-bugs-list

[issue22997] Minor improvements to Functional API section of Enum documentation

2015-01-14 Thread Ethan Furman
Ethan Furman added the comment: Thank you, Simeon! -- stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22997

[issue22988] No error when yielding from `finally`

2015-01-14 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22988

[issue17546] Document the circumstances where the locals() dict get updated

2015-01-14 Thread Ethan Furman
Ethan Furman added the comment: Combined the second and last lines, discarded duplication. -- nosy: +ethan.furman versions: +Python 3.5 Added file: http://bugs.python.org/file37711/issue17546.stoneleaf.01.patch ___ Python tracker rep

[issue20284] patch to implement PEP 461 (%-interpolation for bytes)

2015-01-13 Thread Ethan Furman
Ethan Furman added the comment: Removed the new ABI functions, all new functions are static. Duplicated bytes code in bytearray. in-place interpolation returns new bytearray at this point. I'll work on getting in-place working, but otherwise I'll commit this in a week so we have something

[issue20284] patch to implement PEP 461 (%-interpolation for bytes)

2015-01-12 Thread Ethan Furman
Ethan Furman added the comment: I've been digging into this over the last week and come to the realization that I won't be able to finish this patch. My apologies. Victor, can you take over? I would appreciate it. The tests I have written are only for the Python side. The patch I

[issue23185] add inf and nan to math module

2015-01-10 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +eric.smith, lemburg, rhettinger, stutzbach ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23185

[issue23210] clarify virtual sequence and range docs

2015-01-09 Thread Ethan Furman
New submission from Ethan Furman: The help() function explains range as being a virtual sequence, but that phrase cannot be found anywhere in the docs. Suggestion is to insert a phrase below: The advantage of the range type over a regular list or tuple is that a range object is a virtual

[issue23210] clarify virtual sequence and range docs

2015-01-09 Thread Ethan Furman
Ethan Furman added the comment: On 01/09/2015 09:39 AM, Guido van Rossum wrote: Please don't add this to the glossary and don't start using virtual (it is my favorite example of terminology gone wrong in C++ as well as in colloquial language). The terminology virtual sequence is only used

[issue23210] remove the word virtual from help(range)

2015-01-09 Thread Ethan Furman
Ethan Furman added the comment: Others have chimed in for removal of the word virtual, with the Best In Class comment going to Guido for: To me it is a poisonous buzzword that we're better without. It has virtually no semantics left. :-) -- assignee: docs@python - components

[issue23210] clarify virtual sequence and range docs

2015-01-09 Thread Ethan Furman
Ethan Furman added the comment: Update: per Guido, we need to drop the word virtual from the help() for range. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23210

[issue23185] add inf and nan to math module

2015-01-07 Thread Ethan Furman
New submission from Ethan Furman: Proposal: math.nan = float('nan') math.inf = float('inf') Guido's approval: https://mail.python.org/pipermail/python-ideas/2015-January/030775.html Followup question: Do we add a math.neginf, or somesuch, for float('-inf')? Or just use -math.inf

[issue20284] patch to implement PEP 461 (%-interpolation for bytes)

2015-01-06 Thread Ethan Furman
Ethan Furman added the comment: Here is what I have so far: - complete tests for bytes and bytearry (bytearray currently commented out at line 71) - pep461 implemented for bytes This is basically an adaptation of the 2.7 code for str, adjusted appropriately. I was planning on having

<    7   8   9   10   11   12   13   14   15   16   >