Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue23579>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: +ethan.furman
resolution: -> duplicate
status: open -> closed
superseder: -> Amazon.com links
___
Python tracker
<http://bugs.python.or
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
<h
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
<http://bugs.python.org/issue22
Changes by Ethan Furman :
--
stage: patch review -> test needed
___
Python tracker
<http://bugs.python.org/issue22906>
___
___
Python-bugs-list mailing list
Un
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
<h
Changes by Ethan Furman :
--
assignee: -> ethan.furman
___
Python tracker
<http://bugs.python.org/issue23591>
___
___
Python-bugs-list mailing list
Unsubscrib
Ethan Furman added the comment:
If there is a complex number version it will live in cmath, not math.
--
___
Python tracker
<http://bugs.python.org/issue23
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 to be
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue23623>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
<http://bugs.python.org/is
Ethan Furman added the comment:
All tests pass on my ubuntu 13.04 system.
--
___
Python tracker
<http://bugs.python.org/issue2292>
___
___
Python-bugs-list mailin
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.
--
ass
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: +
Changes by Ethan Furman :
--
Removed message: http://bugs.python.org/msg237815
___
Python tracker
<http://bugs.python.org/issue23486>
___
___
Python-bugs-list m
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
<http://bugs.python.org/is
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
Changes by Ethan Furman :
--
stage: -> test needed
___
Python tracker
<http://bugs.python.org/issue23640>
___
___
Python-bugs-list mailing list
Unsubscrib
Changes by Ethan Furman :
--
keywords: +patch
stage: test needed -> needs patch
Added file: http://bugs.python.org/file38444/issue23640.stoneleaf.01.patch
___
Python tracker
<http://bugs.python.org/issu
Ethan Furman added the comment:
Slight reordering of code removed the one user visible change.
--
___
Python tracker
<http://bugs.python.org/issue23486>
___
___
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
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
<http://bugs.python.org/is
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue23556>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
Added in
https://hg.python.org/peps/rev/7fe79194a4f2
--
___
Python tracker
<http://bugs.python.org/issue23467>
___
___
Python-bug
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
<http://bugs.py
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
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 jus
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue22625>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Ethan Furman added the comment:
Removing the 'enum_to_int' function would also take care of the accepting
inappropriate types problem.
--
___
Python tracker
<http://bugs.python.o
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
___
Changes by Ethan Furman :
--
nosy: +ethan.furman, georg.brandl, ncoghlan
___
Python tracker
<http://bugs.python.org/issue23700>
___
___
Python-bugs-list mailin
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue23699>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue23655>
___
___
Python-bugs-list mailing list
Unsubscribe:
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 Pyt
Changes by Ethan Furman :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Ethan Furman added the comment:
Thanks for the explanation, point taken.
However, it seems to me that changing the type of the constants from 'int' to
'function' is backwards incompatible, will break code, and is probably not
worth it (and would require a deprecation perio
Ethan Furman added the comment:
Patch looks good.
Changing the raised exceptions to ValueError would require deprecation periods.
--
___
Python tracker
<http://bugs.python.org/issue23
Ethan Furman added the comment:
Okay, in a perfect world that _enum_to_int function would be unnecessary, but
as Serhiy pointed out the C code is doing pointer comparison, so unless the
exact same int is passed in it does not work.
I'm looking at adjusting the C
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
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue23826>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
assignee: -> ethan.furman
___
Python tracker
<http://bugs.python.org/issue23826>
___
___
Python-bugs-list mailing list
Unsubscrib
Ethan Furman added the comment:
It's a new feature for 3.5 that is partly responsible for compatibility with
2.7 code.
2.7 raises Overflow error, so 3.5 should also (for out of range values -- wrong
value types raise TypeError).
--
___
P
Ethan Furman added the comment:
b'%c' is still raising a TypeError. The error message is fine ("%c requires an
integer in range(256) or a single byte") but it should be an OverflowError for
backwards compatibility.
--
resolution: fixed ->
stage: resolve
Ethan Furman added the comment:
Looks good, thanks Serhiy.
--
stage: needs patch -> patch review
___
Python tracker
<http://bugs.python.org/issue23466>
___
_
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/sou
Ethan Furman added the comment:
Decided to go with a simpler version: one complete doc variable for with and
without docs -- much easier to maintain in the future.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -&g
Ethan Furman added the comment:
We could do something like:
'An enumeration.'
and perhaps even something like:
'An enumeration based on .'
It's not much, but is better than the obviously wrong generic version.
--
a
Changes by Ethan Furman :
--
nosy: +barry, eli.bendersky
___
Python tracker
<http://bugs.python.org/issue23008>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
In 3.5 at least 'pydoc None' works.
--
stage: patch review -> test needed
___
Python tracker
<http://bugs.pytho
Ethan Furman added the comment:
Considering how rare (hopefully!) files of that size are, I wouldn't be adverse
to a "won't fix" resolution.
--
___
Python tracker
<http://bug
Ethan Furman added the comment:
Considering how rare (hopefully!) files of that size are, I wouldn't be adverse
to a "won't fix" resolution.
--
priority: normal -> low
___
Python tracker
<http://
New submission from Ethan Furman:
https://docs.python.org/3/reference/expressions.html#comparisons:
The operators 'in' and 'not in' test for membership. 'x in s' evaluates to true
if x is a member of
Ethan Furman added the comment:
It's not quite that simple -- those containers use the hash to find the objects
that will be first checked by identity, and then equality* -- otherwise they
would have to do a complete scan from first key to last, and that would kill
performance.
...
Ok
Ethan Furman added the comment:
I think I like that better than my suggestion. :)
--
___
Python tracker
<http://bugs.python.org/issue23987>
___
___
Python-bug
Ethan Furman added the comment:
As Christian Heimes explained, this is not a bug. Please do not reopen it.
--
nosy: +ethan.furman
resolution: -> not a bug
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Ethan Furman added the comment:
See:
https://docs.python.org/3/reference/datamodel.html#special-method-names
and
https://docs.python.org/3/reference/datamodel.html#object.__getattribute__
and
https://docs.python.org/3/reference/datamodel.html#special-lookup
Ethan Furman added the comment:
The purpose of callable is to report whether an instance is callable or not,
and that information is available on the instance's class, via the presence of
__call__. It is not up to callable() nor iter() nor ... to figure out that,
even though the sp
Ethan Furman added the comment:
Python 3.4.0 (default, Apr 11 2014, 13:05:18)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
--> class NonIter:
...pass
...
--> list(iter(NonIter()))
Traceback
Ethan Furman added the comment:
Your example shows /having/ an iterator, while mine is /being/ an iterator.
A simple iterator:
# iterator protocol
class uc_iter():
def __init__(self, text):
self.text = text
self.index = 0
def __iter__(self):
return
Ethan Furman added the comment:
I am happy to be proven wrong. :)
--
___
Python tracker
<http://bugs.python.org/issue23990>
___
___
Python-bugs-list mailin
Ethan Furman added the comment:
Perhaps callable() should be in the inspect module? ;)
Speaking of which, how do all the is... functions there work with this
descriptor implementation?
--
___
Python tracker
<http://bugs.python.org/issue23
Ethan Furman added the comment:
Sounds like good incentive to add good docstrings. :)
--
___
Python tracker
<http://bugs.python.org/issue15582>
___
___
Python-bug
Ethan Furman added the comment:
The "right thing", using a meta-class, is to have the meta-class check if the
proxied object is callable, and if so, put in the __call__ function in the
class that is being created.
--
___
Python trac
Ethan Furman added the comment:
So something like:
For container types such as list, tuple, or collections.deque, the expression
'x in y' is equivalent to 'any(x is e or x == e for e in y)'. For container
types such as set, frozenset, and dict, this equivalence expression
New submission from Ethan Furman:
In order to work correctly, threading.local() must be run in global scope, yet
that tidbit is missing from both the docs and the _threading_local.py file.
Something like:
.. note::
threading.local() must be run at global scope to function properly.
That
Ethan Furman added the comment:
Raymond, okay, thanks.
Eryksun, I've written a FUSE file system (for $DAYJOB) and when I switched over
to using threads I would occasionally experience errors such as 'thread.local
object does not have attribute ...'; as soon as I found the SO a
Ethan Furman added the comment:
http://stackoverflow.com/q/1408171/208880
No, it just says (towards the top):
--
> One important thing that everybody seems to neglect to mention is that writing
> threadLocal = threading.local() at the global level is re
Ethan Furman added the comment:
I know it will take some time to add doc strings to places where they are
missing, but I would not roll-back the patch for that. File new issues and get
the over-riding methods properly documented.
--
___
Python
Ethan Furman added the comment:
Patch looks good, get it in! :)
--
___
Python tracker
<http://bugs.python.org/issue23008>
___
___
Python-bugs-list mailin
Ethan Furman added the comment:
Here's a basic outline of what I was trying:
---
CONTEXT = None
class MyFUSE(Fuse):
def __call__(self, op, path, *args):
global CONTEXT
...
CONTEXT = threading.local()
# set several CONTEXT
Ethan Furman added the comment:
+1 for the fix.
Alexander, create a new issue for the problem of converting non-zero values to
zero.
--
___
Python tracker
<http://bugs.python.org/issue14
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue14376>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Ethan Furman:
Not sure if this is a bug, or just One of Those Things:
sys.exit(large_value) can wrap around if the value is too large, but this is
O/S dependent.
linux (ubuntu 14.04)
$ python
Python 2.7.8 (default, Oct 20 2014, 15:05:29)
[GCC 4.9.1] on linux2
Ethan Furman added the comment:
Linux is not the only O/S that Python runs on.
There should be no difference between int and long.
Possible doc fix being tracked in issue24045.
Gareth, please ignore my comments about adding guards on the return value -- it
is up to the O/S to use or adjust
Ethan Furman added the comment:
We can already do
--> some_string.starts_with(('innie','minnie', 'minie', 'moe'))
Your proposal appears to be equivalent to:
--> 'test'.startswith(('a', 'b', 'c'))
How ofte
Ethan Furman added the comment:
I previously wrote:
--
> Gareth, please ignore my comments about adding guards on the return value --
> it is up
> to the O/S to use or adjust whatever Python returns.
Let me clarify that a bit: we need to protect against overflow
Ethan Furman added the comment:
If anything changes here it needs to be O/S dependent. MS Windows can work
with DWORD return values, so truncating to 8-bits is wrong for that platform.
--
nosy: +ethan.furman
___
Python tracker
<h
Ethan Furman added the comment:
Where are EXIT_FAILURE and EXIT_SUCCESS defined?
And we should probably call them EX_FAILURE and EX_SUCESS to match what's
already there.
--
___
Python tracker
<http://bugs.python.org/is
Ethan Furman added the comment:
Windows 7
C:\Python27>python
Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
--> import sys
--> sys.ex
Ethan Furman added the comment:
Sounds good, I have no objections.
--
___
Python tracker
<http://bugs.python.org/issue24053>
___
___
Python-bugs-list mailin
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue24056>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
I agree with Antoine -- all the exit codes should be in one place.
--
___
Python tracker
<http://bugs.python.org/issue24
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue24064>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
An entire PyPI module for two constants?
Change of heart, I'm okay with them going in sys, but only +0 on adding them.
This SO answer* has an interesting point to make about the nature of return
codes and what their values should be; tl;dr - the conve
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue24120>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
>From Frank Woodall on python-ideas:
==
How to reproduce:
mkdir /tmp/path_test && cd /tmp/path_test && mkdir dir1 dir2 dir2/dir3 && touch
dir1/file1 dir1/file2 dir2/file1 dir2/file2 dir2/dir3/file1
su
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue24138>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
Armin indicated in his last comment that the patch still has multiple issues.
Are there tests to catch the issues he previously found? That seems the best
method to verify that the current (and future) patches don't brea
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue22555>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue24195>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
Updated the tests (had to use real defs, not lambdas, and the expected results
for filter_exception weren't right).
Tests pass.
Get some docs written! :)
(More reviews would also be good. ;)
--
Added file: http://bugs.python.org/file39377/issue
Changes by Ethan Furman :
--
nosy: +bquinlan, jnoller, sbt
title: Add `Executor.filter` -> Add `Executor.filter` to concurrent.futures
___
Python tracker
<http://bugs.python.org/issu
Ethan Furman added the comment:
Short History:
=
(Ram Rachum)
What do you think about adding a method: `Executor.filter`?
I was using something like this:
my_things = [thing for thing in things if some_condition(thing)]
But the problem was that `some_condition` took a long
Ethan Furman added the comment:
That comment was from an email by Nick, not to Nick. But now I've added him.
;)
--
nosy: +ncoghlan
___
Python tracker
<http://bugs.python.org/is
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue24205>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue11477>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
>From https://mail.python.org/pipermail/python-dev/2015-May/140003.html
==
Before the Python 3.5 feature freeze, I should step-up and
formally reject PEP 455 for "Adding a key-tran
Ethan Furman added the comment:
Attached is patch and test case.
--
keywords: +patch
stage: -> patch review
Added file: http://bugs.python.org/file39398/issue23572.stoneleaf.01.patch
___
Python tracker
<http://bugs.python.org/issu
1701 - 1800 of 1868 matches
Mail list logo