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
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
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
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
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
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
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
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22625
___
___
Python-bugs-list
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
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
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
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23556
___
___
Python-bugs-list
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
Changes by Ethan Furman et...@stoneleaf.us:
--
stage: - test needed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23640
___
___
Python-bugs-list
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
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
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
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
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
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
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
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
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23623
___
___
Python-bugs-list
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
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
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
Changes by Ethan Furman et...@stoneleaf.us:
--
stage: patch review - test needed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22906
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
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
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
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
Changes by Ethan Furman et...@stoneleaf.us:
--
assignee: - ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23591
___
___
Python-bugs
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
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23579
___
___
Python-bugs-list
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
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
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
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
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
Ethan Furman added the comment:
Yup. Also updated the turtledemo docs.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19075
___
___
Python-bugs
Ethan Furman added the comment:
Sounds great!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
___
Python-bugs-list mailing list
Ethan Furman added the comment:
Yup, that sounds right! ;)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
___
Python-bugs-list
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
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23491
___
___
Python-bugs-list
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
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
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
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
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
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: -ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9938
___
___
Python-bugs-list
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
___
Python-bugs-list
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
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
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23486
___
___
Python-bugs-list
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
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__
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
Changes by Ethan Furman et...@stoneleaf.us:
--
assignee: - ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23467
___
___
Python-bugs
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23455
___
___
Python-bugs-list
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
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
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
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
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
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
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
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
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
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23354
___
___
Python-bugs-list
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
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
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23342
___
___
Python-bugs-list
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11145
___
___
Python-bugs-list
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23334
___
___
Python-bugs-list
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
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
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
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
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
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
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
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
Changes by Ethan Furman et...@stoneleaf.us:
--
assignee: - ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20680
___
___
Python-bugs
Changes by Ethan Furman et...@stoneleaf.us:
--
assignee: - ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20773
___
___
Python-bugs
Changes by Ethan Furman et...@stoneleaf.us:
--
assignee: - ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17576
___
___
Python-bugs
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
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
Changes by Ethan Furman et...@stoneleaf.us:
--
resolution: - fixed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22997
___
___
Python-bugs-list
Ethan Furman added the comment:
Thank you, Simeon!
--
stage: - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22997
Changes by Ethan Furman et...@stoneleaf.us:
--
stage: - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22988
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
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
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
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +eric.smith, lemburg, rhettinger, stutzbach
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23185
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
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
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
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
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
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
1101 - 1200 of 1854 matches
Mail list logo